bootstrap-table-filter-control.js 185 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250
  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 ($$k) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$k);
  8. function _typeof(obj) {
  9. "@babel/helpers - typeof";
  10. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  11. return typeof obj;
  12. } : function (obj) {
  13. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  14. }, _typeof(obj);
  15. }
  16. function _classCallCheck(instance, Constructor) {
  17. if (!(instance instanceof Constructor)) {
  18. throw new TypeError("Cannot call a class as a function");
  19. }
  20. }
  21. function _defineProperties(target, props) {
  22. for (var i = 0; i < props.length; i++) {
  23. var descriptor = props[i];
  24. descriptor.enumerable = descriptor.enumerable || false;
  25. descriptor.configurable = true;
  26. if ("value" in descriptor) descriptor.writable = true;
  27. Object.defineProperty(target, descriptor.key, descriptor);
  28. }
  29. }
  30. function _createClass(Constructor, protoProps, staticProps) {
  31. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  32. if (staticProps) _defineProperties(Constructor, staticProps);
  33. Object.defineProperty(Constructor, "prototype", {
  34. writable: false
  35. });
  36. return Constructor;
  37. }
  38. function _inherits(subClass, superClass) {
  39. if (typeof superClass !== "function" && superClass !== null) {
  40. throw new TypeError("Super expression must either be null or a function");
  41. }
  42. subClass.prototype = Object.create(superClass && superClass.prototype, {
  43. constructor: {
  44. value: subClass,
  45. writable: true,
  46. configurable: true
  47. }
  48. });
  49. Object.defineProperty(subClass, "prototype", {
  50. writable: false
  51. });
  52. if (superClass) _setPrototypeOf(subClass, superClass);
  53. }
  54. function _getPrototypeOf(o) {
  55. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  56. return o.__proto__ || Object.getPrototypeOf(o);
  57. };
  58. return _getPrototypeOf(o);
  59. }
  60. function _setPrototypeOf(o, p) {
  61. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  62. o.__proto__ = p;
  63. return o;
  64. };
  65. return _setPrototypeOf(o, p);
  66. }
  67. function _isNativeReflectConstruct() {
  68. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  69. if (Reflect.construct.sham) return false;
  70. if (typeof Proxy === "function") return true;
  71. try {
  72. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  73. return true;
  74. } catch (e) {
  75. return false;
  76. }
  77. }
  78. function _assertThisInitialized(self) {
  79. if (self === void 0) {
  80. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  81. }
  82. return self;
  83. }
  84. function _possibleConstructorReturn(self, call) {
  85. if (call && (typeof call === "object" || typeof call === "function")) {
  86. return call;
  87. } else if (call !== void 0) {
  88. throw new TypeError("Derived constructors may only return object or undefined");
  89. }
  90. return _assertThisInitialized(self);
  91. }
  92. function _createSuper(Derived) {
  93. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  94. return function _createSuperInternal() {
  95. var Super = _getPrototypeOf(Derived),
  96. result;
  97. if (hasNativeReflectConstruct) {
  98. var NewTarget = _getPrototypeOf(this).constructor;
  99. result = Reflect.construct(Super, arguments, NewTarget);
  100. } else {
  101. result = Super.apply(this, arguments);
  102. }
  103. return _possibleConstructorReturn(this, result);
  104. };
  105. }
  106. function _superPropBase(object, property) {
  107. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  108. object = _getPrototypeOf(object);
  109. if (object === null) break;
  110. }
  111. return object;
  112. }
  113. function _get() {
  114. if (typeof Reflect !== "undefined" && Reflect.get) {
  115. _get = Reflect.get.bind();
  116. } else {
  117. _get = function _get(target, property, receiver) {
  118. var base = _superPropBase(target, property);
  119. if (!base) return;
  120. var desc = Object.getOwnPropertyDescriptor(base, property);
  121. if (desc.get) {
  122. return desc.get.call(arguments.length < 3 ? target : receiver);
  123. }
  124. return desc.value;
  125. };
  126. }
  127. return _get.apply(this, arguments);
  128. }
  129. function _toConsumableArray(arr) {
  130. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  131. }
  132. function _arrayWithoutHoles(arr) {
  133. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  134. }
  135. function _iterableToArray(iter) {
  136. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  137. }
  138. function _unsupportedIterableToArray(o, minLen) {
  139. if (!o) return;
  140. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  141. var n = Object.prototype.toString.call(o).slice(8, -1);
  142. if (n === "Object" && o.constructor) n = o.constructor.name;
  143. if (n === "Map" || n === "Set") return Array.from(o);
  144. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  145. }
  146. function _arrayLikeToArray(arr, len) {
  147. if (len == null || len > arr.length) len = arr.length;
  148. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  149. return arr2;
  150. }
  151. function _nonIterableSpread() {
  152. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  153. }
  154. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  155. var check = function (it) {
  156. return it && it.Math == Math && it;
  157. };
  158. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  159. var global$n =
  160. // eslint-disable-next-line es/no-global-this -- safe
  161. check(typeof globalThis == 'object' && globalThis) ||
  162. check(typeof window == 'object' && window) ||
  163. // eslint-disable-next-line no-restricted-globals -- safe
  164. check(typeof self == 'object' && self) ||
  165. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  166. // eslint-disable-next-line no-new-func -- fallback
  167. (function () { return this; })() || Function('return this')();
  168. var objectGetOwnPropertyDescriptor = {};
  169. var fails$q = function (exec) {
  170. try {
  171. return !!exec();
  172. } catch (error) {
  173. return true;
  174. }
  175. };
  176. var fails$p = fails$q;
  177. // Detect IE8's incomplete defineProperty implementation
  178. var descriptors = !fails$p(function () {
  179. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  180. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  181. });
  182. var fails$o = fails$q;
  183. var functionBindNative = !fails$o(function () {
  184. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  185. var test = (function () { /* empty */ }).bind();
  186. // eslint-disable-next-line no-prototype-builtins -- safe
  187. return typeof test != 'function' || test.hasOwnProperty('prototype');
  188. });
  189. var NATIVE_BIND$3 = functionBindNative;
  190. var call$j = Function.prototype.call;
  191. var functionCall = NATIVE_BIND$3 ? call$j.bind(call$j) : function () {
  192. return call$j.apply(call$j, arguments);
  193. };
  194. var objectPropertyIsEnumerable = {};
  195. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  196. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  197. var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
  198. // Nashorn ~ JDK8 bug
  199. var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  200. // `Object.prototype.propertyIsEnumerable` method implementation
  201. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  202. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  203. var descriptor = getOwnPropertyDescriptor$2(this, V);
  204. return !!descriptor && descriptor.enumerable;
  205. } : $propertyIsEnumerable$1;
  206. var createPropertyDescriptor$3 = function (bitmap, value) {
  207. return {
  208. enumerable: !(bitmap & 1),
  209. configurable: !(bitmap & 2),
  210. writable: !(bitmap & 4),
  211. value: value
  212. };
  213. };
  214. var NATIVE_BIND$2 = functionBindNative;
  215. var FunctionPrototype$2 = Function.prototype;
  216. var call$i = FunctionPrototype$2.call;
  217. var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$i, call$i);
  218. var functionUncurryThisRaw = function (fn) {
  219. return NATIVE_BIND$2 ? uncurryThisWithBind(fn) : function () {
  220. return call$i.apply(fn, arguments);
  221. };
  222. };
  223. var uncurryThisRaw$1 = functionUncurryThisRaw;
  224. var toString$c = uncurryThisRaw$1({}.toString);
  225. var stringSlice$5 = uncurryThisRaw$1(''.slice);
  226. var classofRaw$2 = function (it) {
  227. return stringSlice$5(toString$c(it), 8, -1);
  228. };
  229. var classofRaw$1 = classofRaw$2;
  230. var uncurryThisRaw = functionUncurryThisRaw;
  231. var functionUncurryThis = function (fn) {
  232. // Nashorn bug:
  233. // https://github.com/zloirock/core-js/issues/1128
  234. // https://github.com/zloirock/core-js/issues/1130
  235. if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
  236. };
  237. var uncurryThis$p = functionUncurryThis;
  238. var fails$n = fails$q;
  239. var classof$9 = classofRaw$2;
  240. var $Object$3 = Object;
  241. var split = uncurryThis$p(''.split);
  242. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  243. var indexedObject = fails$n(function () {
  244. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  245. // eslint-disable-next-line no-prototype-builtins -- safe
  246. return !$Object$3('z').propertyIsEnumerable(0);
  247. }) ? function (it) {
  248. return classof$9(it) == 'String' ? split(it, '') : $Object$3(it);
  249. } : $Object$3;
  250. // we can't use just `it == null` since of `document.all` special case
  251. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  252. var isNullOrUndefined$7 = function (it) {
  253. return it === null || it === undefined;
  254. };
  255. var isNullOrUndefined$6 = isNullOrUndefined$7;
  256. var $TypeError$g = TypeError;
  257. // `RequireObjectCoercible` abstract operation
  258. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  259. var requireObjectCoercible$8 = function (it) {
  260. if (isNullOrUndefined$6(it)) throw $TypeError$g("Can't call method on " + it);
  261. return it;
  262. };
  263. // toObject with fallback for non-array-like ES3 strings
  264. var IndexedObject$3 = indexedObject;
  265. var requireObjectCoercible$7 = requireObjectCoercible$8;
  266. var toIndexedObject$6 = function (it) {
  267. return IndexedObject$3(requireObjectCoercible$7(it));
  268. };
  269. var documentAll$2 = typeof document == 'object' && document.all;
  270. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  271. var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
  272. var documentAll_1 = {
  273. all: documentAll$2,
  274. IS_HTMLDDA: IS_HTMLDDA
  275. };
  276. var $documentAll$1 = documentAll_1;
  277. var documentAll$1 = $documentAll$1.all;
  278. // `IsCallable` abstract operation
  279. // https://tc39.es/ecma262/#sec-iscallable
  280. var isCallable$j = $documentAll$1.IS_HTMLDDA ? function (argument) {
  281. return typeof argument == 'function' || argument === documentAll$1;
  282. } : function (argument) {
  283. return typeof argument == 'function';
  284. };
  285. var isCallable$i = isCallable$j;
  286. var $documentAll = documentAll_1;
  287. var documentAll = $documentAll.all;
  288. var isObject$a = $documentAll.IS_HTMLDDA ? function (it) {
  289. return typeof it == 'object' ? it !== null : isCallable$i(it) || it === documentAll;
  290. } : function (it) {
  291. return typeof it == 'object' ? it !== null : isCallable$i(it);
  292. };
  293. var global$m = global$n;
  294. var isCallable$h = isCallable$j;
  295. var aFunction = function (argument) {
  296. return isCallable$h(argument) ? argument : undefined;
  297. };
  298. var getBuiltIn$8 = function (namespace, method) {
  299. return arguments.length < 2 ? aFunction(global$m[namespace]) : global$m[namespace] && global$m[namespace][method];
  300. };
  301. var uncurryThis$o = functionUncurryThis;
  302. var objectIsPrototypeOf = uncurryThis$o({}.isPrototypeOf);
  303. var getBuiltIn$7 = getBuiltIn$8;
  304. var engineUserAgent = getBuiltIn$7('navigator', 'userAgent') || '';
  305. var global$l = global$n;
  306. var userAgent$5 = engineUserAgent;
  307. var process$3 = global$l.process;
  308. var Deno$1 = global$l.Deno;
  309. var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
  310. var v8 = versions && versions.v8;
  311. var match, version;
  312. if (v8) {
  313. match = v8.split('.');
  314. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  315. // but their correct versions are not interesting for us
  316. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  317. }
  318. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  319. // so check `userAgent` even if `.v8` exists, but 0
  320. if (!version && userAgent$5) {
  321. match = userAgent$5.match(/Edge\/(\d+)/);
  322. if (!match || match[1] >= 74) {
  323. match = userAgent$5.match(/Chrome\/(\d+)/);
  324. if (match) version = +match[1];
  325. }
  326. }
  327. var engineV8Version = version;
  328. /* eslint-disable es/no-symbol -- required for testing */
  329. var V8_VERSION$3 = engineV8Version;
  330. var fails$m = fails$q;
  331. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  332. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$m(function () {
  333. var symbol = Symbol();
  334. // Chrome 38 Symbol has incorrect toString conversion
  335. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  336. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  337. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  338. !Symbol.sham && V8_VERSION$3 && V8_VERSION$3 < 41;
  339. });
  340. /* eslint-disable es/no-symbol -- required for testing */
  341. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  342. var useSymbolAsUid = NATIVE_SYMBOL$1
  343. && !Symbol.sham
  344. && typeof Symbol.iterator == 'symbol';
  345. var getBuiltIn$6 = getBuiltIn$8;
  346. var isCallable$g = isCallable$j;
  347. var isPrototypeOf$3 = objectIsPrototypeOf;
  348. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  349. var $Object$2 = Object;
  350. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  351. return typeof it == 'symbol';
  352. } : function (it) {
  353. var $Symbol = getBuiltIn$6('Symbol');
  354. return isCallable$g($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$2(it));
  355. };
  356. var $String$3 = String;
  357. var tryToString$5 = function (argument) {
  358. try {
  359. return $String$3(argument);
  360. } catch (error) {
  361. return 'Object';
  362. }
  363. };
  364. var isCallable$f = isCallable$j;
  365. var tryToString$4 = tryToString$5;
  366. var $TypeError$f = TypeError;
  367. // `Assert: IsCallable(argument) is true`
  368. var aCallable$8 = function (argument) {
  369. if (isCallable$f(argument)) return argument;
  370. throw $TypeError$f(tryToString$4(argument) + ' is not a function');
  371. };
  372. var aCallable$7 = aCallable$8;
  373. var isNullOrUndefined$5 = isNullOrUndefined$7;
  374. // `GetMethod` abstract operation
  375. // https://tc39.es/ecma262/#sec-getmethod
  376. var getMethod$6 = function (V, P) {
  377. var func = V[P];
  378. return isNullOrUndefined$5(func) ? undefined : aCallable$7(func);
  379. };
  380. var call$h = functionCall;
  381. var isCallable$e = isCallable$j;
  382. var isObject$9 = isObject$a;
  383. var $TypeError$e = TypeError;
  384. // `OrdinaryToPrimitive` abstract operation
  385. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  386. var ordinaryToPrimitive$1 = function (input, pref) {
  387. var fn, val;
  388. if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
  389. if (isCallable$e(fn = input.valueOf) && !isObject$9(val = call$h(fn, input))) return val;
  390. if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
  391. throw $TypeError$e("Can't convert object to primitive value");
  392. };
  393. var shared$4 = {exports: {}};
  394. var global$k = global$n;
  395. // eslint-disable-next-line es/no-object-defineproperty -- safe
  396. var defineProperty$4 = Object.defineProperty;
  397. var defineGlobalProperty$3 = function (key, value) {
  398. try {
  399. defineProperty$4(global$k, key, { value: value, configurable: true, writable: true });
  400. } catch (error) {
  401. global$k[key] = value;
  402. } return value;
  403. };
  404. var global$j = global$n;
  405. var defineGlobalProperty$2 = defineGlobalProperty$3;
  406. var SHARED = '__core-js_shared__';
  407. var store$3 = global$j[SHARED] || defineGlobalProperty$2(SHARED, {});
  408. var sharedStore = store$3;
  409. var store$2 = sharedStore;
  410. (shared$4.exports = function (key, value) {
  411. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  412. })('versions', []).push({
  413. version: '3.25.5',
  414. mode: 'global',
  415. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  416. license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
  417. source: 'https://github.com/zloirock/core-js'
  418. });
  419. var requireObjectCoercible$6 = requireObjectCoercible$8;
  420. var $Object$1 = Object;
  421. // `ToObject` abstract operation
  422. // https://tc39.es/ecma262/#sec-toobject
  423. var toObject$7 = function (argument) {
  424. return $Object$1(requireObjectCoercible$6(argument));
  425. };
  426. var uncurryThis$n = functionUncurryThis;
  427. var toObject$6 = toObject$7;
  428. var hasOwnProperty = uncurryThis$n({}.hasOwnProperty);
  429. // `HasOwnProperty` abstract operation
  430. // https://tc39.es/ecma262/#sec-hasownproperty
  431. // eslint-disable-next-line es/no-object-hasown -- safe
  432. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  433. return hasOwnProperty(toObject$6(it), key);
  434. };
  435. var uncurryThis$m = functionUncurryThis;
  436. var id = 0;
  437. var postfix = Math.random();
  438. var toString$b = uncurryThis$m(1.0.toString);
  439. var uid$2 = function (key) {
  440. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$b(++id + postfix, 36);
  441. };
  442. var global$i = global$n;
  443. var shared$3 = shared$4.exports;
  444. var hasOwn$9 = hasOwnProperty_1;
  445. var uid$1 = uid$2;
  446. var NATIVE_SYMBOL = symbolConstructorDetection;
  447. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  448. var WellKnownSymbolsStore = shared$3('wks');
  449. var Symbol$2 = global$i.Symbol;
  450. var symbolFor = Symbol$2 && Symbol$2['for'];
  451. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
  452. var wellKnownSymbol$i = function (name) {
  453. if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  454. var description = 'Symbol.' + name;
  455. if (NATIVE_SYMBOL && hasOwn$9(Symbol$2, name)) {
  456. WellKnownSymbolsStore[name] = Symbol$2[name];
  457. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  458. WellKnownSymbolsStore[name] = symbolFor(description);
  459. } else {
  460. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  461. }
  462. } return WellKnownSymbolsStore[name];
  463. };
  464. var call$g = functionCall;
  465. var isObject$8 = isObject$a;
  466. var isSymbol$1 = isSymbol$2;
  467. var getMethod$5 = getMethod$6;
  468. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  469. var wellKnownSymbol$h = wellKnownSymbol$i;
  470. var $TypeError$d = TypeError;
  471. var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
  472. // `ToPrimitive` abstract operation
  473. // https://tc39.es/ecma262/#sec-toprimitive
  474. var toPrimitive$1 = function (input, pref) {
  475. if (!isObject$8(input) || isSymbol$1(input)) return input;
  476. var exoticToPrim = getMethod$5(input, TO_PRIMITIVE);
  477. var result;
  478. if (exoticToPrim) {
  479. if (pref === undefined) pref = 'default';
  480. result = call$g(exoticToPrim, input, pref);
  481. if (!isObject$8(result) || isSymbol$1(result)) return result;
  482. throw $TypeError$d("Can't convert object to primitive value");
  483. }
  484. if (pref === undefined) pref = 'number';
  485. return ordinaryToPrimitive(input, pref);
  486. };
  487. var toPrimitive = toPrimitive$1;
  488. var isSymbol = isSymbol$2;
  489. // `ToPropertyKey` abstract operation
  490. // https://tc39.es/ecma262/#sec-topropertykey
  491. var toPropertyKey$3 = function (argument) {
  492. var key = toPrimitive(argument, 'string');
  493. return isSymbol(key) ? key : key + '';
  494. };
  495. var global$h = global$n;
  496. var isObject$7 = isObject$a;
  497. var document$3 = global$h.document;
  498. // typeof document.createElement is 'object' in old IE
  499. var EXISTS$1 = isObject$7(document$3) && isObject$7(document$3.createElement);
  500. var documentCreateElement$2 = function (it) {
  501. return EXISTS$1 ? document$3.createElement(it) : {};
  502. };
  503. var DESCRIPTORS$a = descriptors;
  504. var fails$l = fails$q;
  505. var createElement$1 = documentCreateElement$2;
  506. // Thanks to IE8 for its funny defineProperty
  507. var ie8DomDefine = !DESCRIPTORS$a && !fails$l(function () {
  508. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  509. return Object.defineProperty(createElement$1('div'), 'a', {
  510. get: function () { return 7; }
  511. }).a != 7;
  512. });
  513. var DESCRIPTORS$9 = descriptors;
  514. var call$f = functionCall;
  515. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  516. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  517. var toIndexedObject$5 = toIndexedObject$6;
  518. var toPropertyKey$2 = toPropertyKey$3;
  519. var hasOwn$8 = hasOwnProperty_1;
  520. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  521. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  522. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  523. // `Object.getOwnPropertyDescriptor` method
  524. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  525. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  526. O = toIndexedObject$5(O);
  527. P = toPropertyKey$2(P);
  528. if (IE8_DOM_DEFINE$1) try {
  529. return $getOwnPropertyDescriptor$1(O, P);
  530. } catch (error) { /* empty */ }
  531. if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$f(propertyIsEnumerableModule$1.f, O, P), O[P]);
  532. };
  533. var objectDefineProperty = {};
  534. var DESCRIPTORS$8 = descriptors;
  535. var fails$k = fails$q;
  536. // V8 ~ Chrome 36-
  537. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  538. var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$k(function () {
  539. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  540. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  541. value: 42,
  542. writable: false
  543. }).prototype != 42;
  544. });
  545. var isObject$6 = isObject$a;
  546. var $String$2 = String;
  547. var $TypeError$c = TypeError;
  548. // `Assert: Type(argument) is Object`
  549. var anObject$g = function (argument) {
  550. if (isObject$6(argument)) return argument;
  551. throw $TypeError$c($String$2(argument) + ' is not an object');
  552. };
  553. var DESCRIPTORS$7 = descriptors;
  554. var IE8_DOM_DEFINE = ie8DomDefine;
  555. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  556. var anObject$f = anObject$g;
  557. var toPropertyKey$1 = toPropertyKey$3;
  558. var $TypeError$b = TypeError;
  559. // eslint-disable-next-line es/no-object-defineproperty -- safe
  560. var $defineProperty = Object.defineProperty;
  561. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  562. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  563. var ENUMERABLE = 'enumerable';
  564. var CONFIGURABLE$1 = 'configurable';
  565. var WRITABLE = 'writable';
  566. // `Object.defineProperty` method
  567. // https://tc39.es/ecma262/#sec-object.defineproperty
  568. objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  569. anObject$f(O);
  570. P = toPropertyKey$1(P);
  571. anObject$f(Attributes);
  572. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  573. var current = $getOwnPropertyDescriptor(O, P);
  574. if (current && current[WRITABLE]) {
  575. O[P] = Attributes.value;
  576. Attributes = {
  577. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  578. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  579. writable: false
  580. };
  581. }
  582. } return $defineProperty(O, P, Attributes);
  583. } : $defineProperty : function defineProperty(O, P, Attributes) {
  584. anObject$f(O);
  585. P = toPropertyKey$1(P);
  586. anObject$f(Attributes);
  587. if (IE8_DOM_DEFINE) try {
  588. return $defineProperty(O, P, Attributes);
  589. } catch (error) { /* empty */ }
  590. if ('get' in Attributes || 'set' in Attributes) throw $TypeError$b('Accessors not supported');
  591. if ('value' in Attributes) O[P] = Attributes.value;
  592. return O;
  593. };
  594. var DESCRIPTORS$6 = descriptors;
  595. var definePropertyModule$5 = objectDefineProperty;
  596. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  597. var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value) {
  598. return definePropertyModule$5.f(object, key, createPropertyDescriptor$1(1, value));
  599. } : function (object, key, value) {
  600. object[key] = value;
  601. return object;
  602. };
  603. var makeBuiltIn$2 = {exports: {}};
  604. var DESCRIPTORS$5 = descriptors;
  605. var hasOwn$7 = hasOwnProperty_1;
  606. var FunctionPrototype$1 = Function.prototype;
  607. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  608. var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
  609. var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
  610. // additional protection from minified / mangled / dropped function names
  611. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  612. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  613. var functionName = {
  614. EXISTS: EXISTS,
  615. PROPER: PROPER,
  616. CONFIGURABLE: CONFIGURABLE
  617. };
  618. var uncurryThis$l = functionUncurryThis;
  619. var isCallable$d = isCallable$j;
  620. var store$1 = sharedStore;
  621. var functionToString = uncurryThis$l(Function.toString);
  622. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  623. if (!isCallable$d(store$1.inspectSource)) {
  624. store$1.inspectSource = function (it) {
  625. return functionToString(it);
  626. };
  627. }
  628. var inspectSource$3 = store$1.inspectSource;
  629. var global$g = global$n;
  630. var isCallable$c = isCallable$j;
  631. var WeakMap$1 = global$g.WeakMap;
  632. var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1));
  633. var shared$2 = shared$4.exports;
  634. var uid = uid$2;
  635. var keys = shared$2('keys');
  636. var sharedKey$2 = function (key) {
  637. return keys[key] || (keys[key] = uid(key));
  638. };
  639. var hiddenKeys$4 = {};
  640. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  641. var global$f = global$n;
  642. var isObject$5 = isObject$a;
  643. var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
  644. var hasOwn$6 = hasOwnProperty_1;
  645. var shared$1 = sharedStore;
  646. var sharedKey$1 = sharedKey$2;
  647. var hiddenKeys$3 = hiddenKeys$4;
  648. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  649. var TypeError$2 = global$f.TypeError;
  650. var WeakMap = global$f.WeakMap;
  651. var set$1, get, has;
  652. var enforce = function (it) {
  653. return has(it) ? get(it) : set$1(it, {});
  654. };
  655. var getterFor = function (TYPE) {
  656. return function (it) {
  657. var state;
  658. if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
  659. throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
  660. } return state;
  661. };
  662. };
  663. if (NATIVE_WEAK_MAP || shared$1.state) {
  664. var store = shared$1.state || (shared$1.state = new WeakMap());
  665. /* eslint-disable no-self-assign -- prototype methods protection */
  666. store.get = store.get;
  667. store.has = store.has;
  668. store.set = store.set;
  669. /* eslint-enable no-self-assign -- prototype methods protection */
  670. set$1 = function (it, metadata) {
  671. if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
  672. metadata.facade = it;
  673. store.set(it, metadata);
  674. return metadata;
  675. };
  676. get = function (it) {
  677. return store.get(it) || {};
  678. };
  679. has = function (it) {
  680. return store.has(it);
  681. };
  682. } else {
  683. var STATE = sharedKey$1('state');
  684. hiddenKeys$3[STATE] = true;
  685. set$1 = function (it, metadata) {
  686. if (hasOwn$6(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
  687. metadata.facade = it;
  688. createNonEnumerableProperty$3(it, STATE, metadata);
  689. return metadata;
  690. };
  691. get = function (it) {
  692. return hasOwn$6(it, STATE) ? it[STATE] : {};
  693. };
  694. has = function (it) {
  695. return hasOwn$6(it, STATE);
  696. };
  697. }
  698. var internalState = {
  699. set: set$1,
  700. get: get,
  701. has: has,
  702. enforce: enforce,
  703. getterFor: getterFor
  704. };
  705. var fails$j = fails$q;
  706. var isCallable$b = isCallable$j;
  707. var hasOwn$5 = hasOwnProperty_1;
  708. var DESCRIPTORS$4 = descriptors;
  709. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  710. var inspectSource$2 = inspectSource$3;
  711. var InternalStateModule$1 = internalState;
  712. var enforceInternalState = InternalStateModule$1.enforce;
  713. var getInternalState$1 = InternalStateModule$1.get;
  714. // eslint-disable-next-line es/no-object-defineproperty -- safe
  715. var defineProperty$3 = Object.defineProperty;
  716. var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$j(function () {
  717. return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  718. });
  719. var TEMPLATE = String(String).split('String');
  720. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  721. if (String(name).slice(0, 7) === 'Symbol(') {
  722. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  723. }
  724. if (options && options.getter) name = 'get ' + name;
  725. if (options && options.setter) name = 'set ' + name;
  726. if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  727. if (DESCRIPTORS$4) defineProperty$3(value, 'name', { value: name, configurable: true });
  728. else value.name = name;
  729. }
  730. if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
  731. defineProperty$3(value, 'length', { value: options.arity });
  732. }
  733. try {
  734. if (options && hasOwn$5(options, 'constructor') && options.constructor) {
  735. if (DESCRIPTORS$4) defineProperty$3(value, 'prototype', { writable: false });
  736. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  737. } else if (value.prototype) value.prototype = undefined;
  738. } catch (error) { /* empty */ }
  739. var state = enforceInternalState(value);
  740. if (!hasOwn$5(state, 'source')) {
  741. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  742. } return value;
  743. };
  744. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  745. // eslint-disable-next-line no-extend-native -- required
  746. Function.prototype.toString = makeBuiltIn$1(function toString() {
  747. return isCallable$b(this) && getInternalState$1(this).source || inspectSource$2(this);
  748. }, 'toString');
  749. var isCallable$a = isCallable$j;
  750. var definePropertyModule$4 = objectDefineProperty;
  751. var makeBuiltIn = makeBuiltIn$2.exports;
  752. var defineGlobalProperty$1 = defineGlobalProperty$3;
  753. var defineBuiltIn$6 = function (O, key, value, options) {
  754. if (!options) options = {};
  755. var simple = options.enumerable;
  756. var name = options.name !== undefined ? options.name : key;
  757. if (isCallable$a(value)) makeBuiltIn(value, name, options);
  758. if (options.global) {
  759. if (simple) O[key] = value;
  760. else defineGlobalProperty$1(key, value);
  761. } else {
  762. try {
  763. if (!options.unsafe) delete O[key];
  764. else if (O[key]) simple = true;
  765. } catch (error) { /* empty */ }
  766. if (simple) O[key] = value;
  767. else definePropertyModule$4.f(O, key, {
  768. value: value,
  769. enumerable: false,
  770. configurable: !options.nonConfigurable,
  771. writable: !options.nonWritable
  772. });
  773. } return O;
  774. };
  775. var objectGetOwnPropertyNames = {};
  776. var ceil = Math.ceil;
  777. var floor$2 = Math.floor;
  778. // `Math.trunc` method
  779. // https://tc39.es/ecma262/#sec-math.trunc
  780. // eslint-disable-next-line es/no-math-trunc -- safe
  781. var mathTrunc = Math.trunc || function trunc(x) {
  782. var n = +x;
  783. return (n > 0 ? floor$2 : ceil)(n);
  784. };
  785. var trunc = mathTrunc;
  786. // `ToIntegerOrInfinity` abstract operation
  787. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  788. var toIntegerOrInfinity$4 = function (argument) {
  789. var number = +argument;
  790. // eslint-disable-next-line no-self-compare -- NaN check
  791. return number !== number || number === 0 ? 0 : trunc(number);
  792. };
  793. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  794. var max$2 = Math.max;
  795. var min$3 = Math.min;
  796. // Helper for a popular repeating case of the spec:
  797. // Let integer be ? ToInteger(index).
  798. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  799. var toAbsoluteIndex$2 = function (index, length) {
  800. var integer = toIntegerOrInfinity$3(index);
  801. return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
  802. };
  803. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  804. var min$2 = Math.min;
  805. // `ToLength` abstract operation
  806. // https://tc39.es/ecma262/#sec-tolength
  807. var toLength$4 = function (argument) {
  808. return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  809. };
  810. var toLength$3 = toLength$4;
  811. // `LengthOfArrayLike` abstract operation
  812. // https://tc39.es/ecma262/#sec-lengthofarraylike
  813. var lengthOfArrayLike$6 = function (obj) {
  814. return toLength$3(obj.length);
  815. };
  816. var toIndexedObject$4 = toIndexedObject$6;
  817. var toAbsoluteIndex$1 = toAbsoluteIndex$2;
  818. var lengthOfArrayLike$5 = lengthOfArrayLike$6;
  819. // `Array.prototype.{ indexOf, includes }` methods implementation
  820. var createMethod$4 = function (IS_INCLUDES) {
  821. return function ($this, el, fromIndex) {
  822. var O = toIndexedObject$4($this);
  823. var length = lengthOfArrayLike$5(O);
  824. var index = toAbsoluteIndex$1(fromIndex, length);
  825. var value;
  826. // Array#includes uses SameValueZero equality algorithm
  827. // eslint-disable-next-line no-self-compare -- NaN check
  828. if (IS_INCLUDES && el != el) while (length > index) {
  829. value = O[index++];
  830. // eslint-disable-next-line no-self-compare -- NaN check
  831. if (value != value) return true;
  832. // Array#indexOf ignores holes, Array#includes - not
  833. } else for (;length > index; index++) {
  834. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  835. } return !IS_INCLUDES && -1;
  836. };
  837. };
  838. var arrayIncludes = {
  839. // `Array.prototype.includes` method
  840. // https://tc39.es/ecma262/#sec-array.prototype.includes
  841. includes: createMethod$4(true),
  842. // `Array.prototype.indexOf` method
  843. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  844. indexOf: createMethod$4(false)
  845. };
  846. var uncurryThis$k = functionUncurryThis;
  847. var hasOwn$4 = hasOwnProperty_1;
  848. var toIndexedObject$3 = toIndexedObject$6;
  849. var indexOf$1 = arrayIncludes.indexOf;
  850. var hiddenKeys$2 = hiddenKeys$4;
  851. var push$5 = uncurryThis$k([].push);
  852. var objectKeysInternal = function (object, names) {
  853. var O = toIndexedObject$3(object);
  854. var i = 0;
  855. var result = [];
  856. var key;
  857. for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push$5(result, key);
  858. // Don't enum bug & hidden keys
  859. while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
  860. ~indexOf$1(result, key) || push$5(result, key);
  861. }
  862. return result;
  863. };
  864. // IE8- don't enum bug keys
  865. var enumBugKeys$3 = [
  866. 'constructor',
  867. 'hasOwnProperty',
  868. 'isPrototypeOf',
  869. 'propertyIsEnumerable',
  870. 'toLocaleString',
  871. 'toString',
  872. 'valueOf'
  873. ];
  874. var internalObjectKeys$1 = objectKeysInternal;
  875. var enumBugKeys$2 = enumBugKeys$3;
  876. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  877. // `Object.getOwnPropertyNames` method
  878. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  879. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  880. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  881. return internalObjectKeys$1(O, hiddenKeys$1);
  882. };
  883. var objectGetOwnPropertySymbols = {};
  884. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  885. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  886. var getBuiltIn$5 = getBuiltIn$8;
  887. var uncurryThis$j = functionUncurryThis;
  888. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  889. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  890. var anObject$e = anObject$g;
  891. var concat$2 = uncurryThis$j([].concat);
  892. // all object keys, includes non-enumerable and symbols
  893. var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
  894. var keys = getOwnPropertyNamesModule.f(anObject$e(it));
  895. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  896. return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
  897. };
  898. var hasOwn$3 = hasOwnProperty_1;
  899. var ownKeys = ownKeys$1;
  900. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  901. var definePropertyModule$3 = objectDefineProperty;
  902. var copyConstructorProperties$1 = function (target, source, exceptions) {
  903. var keys = ownKeys(source);
  904. var defineProperty = definePropertyModule$3.f;
  905. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  906. for (var i = 0; i < keys.length; i++) {
  907. var key = keys[i];
  908. if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
  909. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  910. }
  911. }
  912. };
  913. var fails$i = fails$q;
  914. var isCallable$9 = isCallable$j;
  915. var replacement = /#|\.prototype\./;
  916. var isForced$2 = function (feature, detection) {
  917. var value = data[normalize(feature)];
  918. return value == POLYFILL ? true
  919. : value == NATIVE ? false
  920. : isCallable$9(detection) ? fails$i(detection)
  921. : !!detection;
  922. };
  923. var normalize = isForced$2.normalize = function (string) {
  924. return String(string).replace(replacement, '.').toLowerCase();
  925. };
  926. var data = isForced$2.data = {};
  927. var NATIVE = isForced$2.NATIVE = 'N';
  928. var POLYFILL = isForced$2.POLYFILL = 'P';
  929. var isForced_1 = isForced$2;
  930. var global$e = global$n;
  931. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  932. var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
  933. var defineBuiltIn$5 = defineBuiltIn$6;
  934. var defineGlobalProperty = defineGlobalProperty$3;
  935. var copyConstructorProperties = copyConstructorProperties$1;
  936. var isForced$1 = isForced_1;
  937. /*
  938. options.target - name of the target object
  939. options.global - target is the global object
  940. options.stat - export as static methods of target
  941. options.proto - export as prototype methods of target
  942. options.real - real prototype method for the `pure` version
  943. options.forced - export even if the native feature is available
  944. options.bind - bind methods to the target, required for the `pure` version
  945. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  946. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  947. options.sham - add a flag to not completely full polyfills
  948. options.enumerable - export as enumerable property
  949. options.dontCallGetSet - prevent calling a getter on target
  950. options.name - the .name of the function if it does not match the key
  951. */
  952. var _export = function (options, source) {
  953. var TARGET = options.target;
  954. var GLOBAL = options.global;
  955. var STATIC = options.stat;
  956. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  957. if (GLOBAL) {
  958. target = global$e;
  959. } else if (STATIC) {
  960. target = global$e[TARGET] || defineGlobalProperty(TARGET, {});
  961. } else {
  962. target = (global$e[TARGET] || {}).prototype;
  963. }
  964. if (target) for (key in source) {
  965. sourceProperty = source[key];
  966. if (options.dontCallGetSet) {
  967. descriptor = getOwnPropertyDescriptor$1(target, key);
  968. targetProperty = descriptor && descriptor.value;
  969. } else targetProperty = target[key];
  970. FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  971. // contained in target
  972. if (!FORCED && targetProperty !== undefined) {
  973. if (typeof sourceProperty == typeof targetProperty) continue;
  974. copyConstructorProperties(sourceProperty, targetProperty);
  975. }
  976. // add a flag to not completely full polyfills
  977. if (options.sham || (targetProperty && targetProperty.sham)) {
  978. createNonEnumerableProperty$2(sourceProperty, 'sham', true);
  979. }
  980. defineBuiltIn$5(target, key, sourceProperty, options);
  981. }
  982. };
  983. var uncurryThis$i = functionUncurryThis;
  984. var aCallable$6 = aCallable$8;
  985. var NATIVE_BIND$1 = functionBindNative;
  986. var bind$5 = uncurryThis$i(uncurryThis$i.bind);
  987. // optional / simple context binding
  988. var functionBindContext = function (fn, that) {
  989. aCallable$6(fn);
  990. return that === undefined ? fn : NATIVE_BIND$1 ? bind$5(fn, that) : function (/* ...args */) {
  991. return fn.apply(that, arguments);
  992. };
  993. };
  994. var classof$8 = classofRaw$2;
  995. // `IsArray` abstract operation
  996. // https://tc39.es/ecma262/#sec-isarray
  997. // eslint-disable-next-line es/no-array-isarray -- safe
  998. var isArray$2 = Array.isArray || function isArray(argument) {
  999. return classof$8(argument) == 'Array';
  1000. };
  1001. var wellKnownSymbol$g = wellKnownSymbol$i;
  1002. var TO_STRING_TAG$2 = wellKnownSymbol$g('toStringTag');
  1003. var test$1 = {};
  1004. test$1[TO_STRING_TAG$2] = 'z';
  1005. var toStringTagSupport = String(test$1) === '[object z]';
  1006. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  1007. var isCallable$8 = isCallable$j;
  1008. var classofRaw = classofRaw$2;
  1009. var wellKnownSymbol$f = wellKnownSymbol$i;
  1010. var TO_STRING_TAG$1 = wellKnownSymbol$f('toStringTag');
  1011. var $Object = Object;
  1012. // ES3 wrong here
  1013. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  1014. // fallback for IE11 Script Access Denied error
  1015. var tryGet = function (it, key) {
  1016. try {
  1017. return it[key];
  1018. } catch (error) { /* empty */ }
  1019. };
  1020. // getting tag from ES6+ `Object.prototype.toString`
  1021. var classof$7 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  1022. var O, tag, result;
  1023. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1024. // @@toStringTag case
  1025. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$1)) == 'string' ? tag
  1026. // builtinTag case
  1027. : CORRECT_ARGUMENTS ? classofRaw(O)
  1028. // ES3 arguments fallback
  1029. : (result = classofRaw(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
  1030. };
  1031. var uncurryThis$h = functionUncurryThis;
  1032. var fails$h = fails$q;
  1033. var isCallable$7 = isCallable$j;
  1034. var classof$6 = classof$7;
  1035. var getBuiltIn$4 = getBuiltIn$8;
  1036. var inspectSource$1 = inspectSource$3;
  1037. var noop = function () { /* empty */ };
  1038. var empty = [];
  1039. var construct = getBuiltIn$4('Reflect', 'construct');
  1040. var constructorRegExp = /^\s*(?:class|function)\b/;
  1041. var exec$3 = uncurryThis$h(constructorRegExp.exec);
  1042. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1043. var isConstructorModern = function isConstructor(argument) {
  1044. if (!isCallable$7(argument)) return false;
  1045. try {
  1046. construct(noop, empty, argument);
  1047. return true;
  1048. } catch (error) {
  1049. return false;
  1050. }
  1051. };
  1052. var isConstructorLegacy = function isConstructor(argument) {
  1053. if (!isCallable$7(argument)) return false;
  1054. switch (classof$6(argument)) {
  1055. case 'AsyncFunction':
  1056. case 'GeneratorFunction':
  1057. case 'AsyncGeneratorFunction': return false;
  1058. }
  1059. try {
  1060. // we can't check .prototype since constructors produced by .bind haven't it
  1061. // `Function#toString` throws on some built-it function in some legacy engines
  1062. // (for example, `DOMQuad` and similar in FF41-)
  1063. return INCORRECT_TO_STRING || !!exec$3(constructorRegExp, inspectSource$1(argument));
  1064. } catch (error) {
  1065. return true;
  1066. }
  1067. };
  1068. isConstructorLegacy.sham = true;
  1069. // `IsConstructor` abstract operation
  1070. // https://tc39.es/ecma262/#sec-isconstructor
  1071. var isConstructor$2 = !construct || fails$h(function () {
  1072. var called;
  1073. return isConstructorModern(isConstructorModern.call)
  1074. || !isConstructorModern(Object)
  1075. || !isConstructorModern(function () { called = true; })
  1076. || called;
  1077. }) ? isConstructorLegacy : isConstructorModern;
  1078. var isArray$1 = isArray$2;
  1079. var isConstructor$1 = isConstructor$2;
  1080. var isObject$4 = isObject$a;
  1081. var wellKnownSymbol$e = wellKnownSymbol$i;
  1082. var SPECIES$5 = wellKnownSymbol$e('species');
  1083. var $Array$1 = Array;
  1084. // a part of `ArraySpeciesCreate` abstract operation
  1085. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1086. var arraySpeciesConstructor$1 = function (originalArray) {
  1087. var C;
  1088. if (isArray$1(originalArray)) {
  1089. C = originalArray.constructor;
  1090. // cross-realm fallback
  1091. if (isConstructor$1(C) && (C === $Array$1 || isArray$1(C.prototype))) C = undefined;
  1092. else if (isObject$4(C)) {
  1093. C = C[SPECIES$5];
  1094. if (C === null) C = undefined;
  1095. }
  1096. } return C === undefined ? $Array$1 : C;
  1097. };
  1098. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1099. // `ArraySpeciesCreate` abstract operation
  1100. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1101. var arraySpeciesCreate$2 = function (originalArray, length) {
  1102. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1103. };
  1104. var bind$4 = functionBindContext;
  1105. var uncurryThis$g = functionUncurryThis;
  1106. var IndexedObject$2 = indexedObject;
  1107. var toObject$5 = toObject$7;
  1108. var lengthOfArrayLike$4 = lengthOfArrayLike$6;
  1109. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1110. var push$4 = uncurryThis$g([].push);
  1111. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1112. var createMethod$3 = function (TYPE) {
  1113. var IS_MAP = TYPE == 1;
  1114. var IS_FILTER = TYPE == 2;
  1115. var IS_SOME = TYPE == 3;
  1116. var IS_EVERY = TYPE == 4;
  1117. var IS_FIND_INDEX = TYPE == 6;
  1118. var IS_FILTER_REJECT = TYPE == 7;
  1119. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1120. return function ($this, callbackfn, that, specificCreate) {
  1121. var O = toObject$5($this);
  1122. var self = IndexedObject$2(O);
  1123. var boundFunction = bind$4(callbackfn, that);
  1124. var length = lengthOfArrayLike$4(self);
  1125. var index = 0;
  1126. var create = specificCreate || arraySpeciesCreate$1;
  1127. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1128. var value, result;
  1129. for (;length > index; index++) if (NO_HOLES || index in self) {
  1130. value = self[index];
  1131. result = boundFunction(value, index, O);
  1132. if (TYPE) {
  1133. if (IS_MAP) target[index] = result; // map
  1134. else if (result) switch (TYPE) {
  1135. case 3: return true; // some
  1136. case 5: return value; // find
  1137. case 6: return index; // findIndex
  1138. case 2: push$4(target, value); // filter
  1139. } else switch (TYPE) {
  1140. case 4: return false; // every
  1141. case 7: push$4(target, value); // filterReject
  1142. }
  1143. }
  1144. }
  1145. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1146. };
  1147. };
  1148. var arrayIteration = {
  1149. // `Array.prototype.forEach` method
  1150. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1151. forEach: createMethod$3(0),
  1152. // `Array.prototype.map` method
  1153. // https://tc39.es/ecma262/#sec-array.prototype.map
  1154. map: createMethod$3(1),
  1155. // `Array.prototype.filter` method
  1156. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1157. filter: createMethod$3(2),
  1158. // `Array.prototype.some` method
  1159. // https://tc39.es/ecma262/#sec-array.prototype.some
  1160. some: createMethod$3(3),
  1161. // `Array.prototype.every` method
  1162. // https://tc39.es/ecma262/#sec-array.prototype.every
  1163. every: createMethod$3(4),
  1164. // `Array.prototype.find` method
  1165. // https://tc39.es/ecma262/#sec-array.prototype.find
  1166. find: createMethod$3(5),
  1167. // `Array.prototype.findIndex` method
  1168. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1169. findIndex: createMethod$3(6),
  1170. // `Array.prototype.filterReject` method
  1171. // https://github.com/tc39/proposal-array-filtering
  1172. filterReject: createMethod$3(7)
  1173. };
  1174. var fails$g = fails$q;
  1175. var wellKnownSymbol$d = wellKnownSymbol$i;
  1176. var V8_VERSION$2 = engineV8Version;
  1177. var SPECIES$4 = wellKnownSymbol$d('species');
  1178. var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
  1179. // We can't use this feature detection in V8 since it causes
  1180. // deoptimization and serious performance degradation
  1181. // https://github.com/zloirock/core-js/issues/677
  1182. return V8_VERSION$2 >= 51 || !fails$g(function () {
  1183. var array = [];
  1184. var constructor = array.constructor = {};
  1185. constructor[SPECIES$4] = function () {
  1186. return { foo: 1 };
  1187. };
  1188. return array[METHOD_NAME](Boolean).foo !== 1;
  1189. });
  1190. };
  1191. var $$j = _export;
  1192. var $filter = arrayIteration.filter;
  1193. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
  1194. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('filter');
  1195. // `Array.prototype.filter` method
  1196. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1197. // with adding support of @@species
  1198. $$j({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1199. filter: function filter(callbackfn /* , thisArg */) {
  1200. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1201. }
  1202. });
  1203. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1204. var classof$5 = classof$7;
  1205. // `Object.prototype.toString` method implementation
  1206. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1207. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1208. return '[object ' + classof$5(this) + ']';
  1209. };
  1210. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1211. var defineBuiltIn$4 = defineBuiltIn$6;
  1212. var toString$a = objectToString;
  1213. // `Object.prototype.toString` method
  1214. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1215. if (!TO_STRING_TAG_SUPPORT) {
  1216. defineBuiltIn$4(Object.prototype, 'toString', toString$a, { unsafe: true });
  1217. }
  1218. var internalObjectKeys = objectKeysInternal;
  1219. var enumBugKeys$1 = enumBugKeys$3;
  1220. // `Object.keys` method
  1221. // https://tc39.es/ecma262/#sec-object.keys
  1222. // eslint-disable-next-line es/no-object-keys -- safe
  1223. var objectKeys$3 = Object.keys || function keys(O) {
  1224. return internalObjectKeys(O, enumBugKeys$1);
  1225. };
  1226. var $$i = _export;
  1227. var toObject$4 = toObject$7;
  1228. var nativeKeys = objectKeys$3;
  1229. var fails$f = fails$q;
  1230. var FAILS_ON_PRIMITIVES = fails$f(function () { nativeKeys(1); });
  1231. // `Object.keys` method
  1232. // https://tc39.es/ecma262/#sec-object.keys
  1233. $$i({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  1234. keys: function keys(it) {
  1235. return nativeKeys(toObject$4(it));
  1236. }
  1237. });
  1238. var $TypeError$a = TypeError;
  1239. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1240. var doesNotExceedSafeInteger$1 = function (it) {
  1241. if (it > MAX_SAFE_INTEGER) throw $TypeError$a('Maximum allowed index exceeded');
  1242. return it;
  1243. };
  1244. var toPropertyKey = toPropertyKey$3;
  1245. var definePropertyModule$2 = objectDefineProperty;
  1246. var createPropertyDescriptor = createPropertyDescriptor$3;
  1247. var createProperty$2 = function (object, key, value) {
  1248. var propertyKey = toPropertyKey(key);
  1249. if (propertyKey in object) definePropertyModule$2.f(object, propertyKey, createPropertyDescriptor(0, value));
  1250. else object[propertyKey] = value;
  1251. };
  1252. var $$h = _export;
  1253. var fails$e = fails$q;
  1254. var isArray = isArray$2;
  1255. var isObject$3 = isObject$a;
  1256. var toObject$3 = toObject$7;
  1257. var lengthOfArrayLike$3 = lengthOfArrayLike$6;
  1258. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1259. var createProperty$1 = createProperty$2;
  1260. var arraySpeciesCreate = arraySpeciesCreate$2;
  1261. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
  1262. var wellKnownSymbol$c = wellKnownSymbol$i;
  1263. var V8_VERSION$1 = engineV8Version;
  1264. var IS_CONCAT_SPREADABLE = wellKnownSymbol$c('isConcatSpreadable');
  1265. // We can't use this feature detection in V8 since it causes
  1266. // deoptimization and serious performance degradation
  1267. // https://github.com/zloirock/core-js/issues/679
  1268. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION$1 >= 51 || !fails$e(function () {
  1269. var array = [];
  1270. array[IS_CONCAT_SPREADABLE] = false;
  1271. return array.concat()[0] !== array;
  1272. });
  1273. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1274. var isConcatSpreadable = function (O) {
  1275. if (!isObject$3(O)) return false;
  1276. var spreadable = O[IS_CONCAT_SPREADABLE];
  1277. return spreadable !== undefined ? !!spreadable : isArray(O);
  1278. };
  1279. var FORCED$2 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1280. // `Array.prototype.concat` method
  1281. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1282. // with adding support of @@isConcatSpreadable and @@species
  1283. $$h({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
  1284. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1285. concat: function concat(arg) {
  1286. var O = toObject$3(this);
  1287. var A = arraySpeciesCreate(O, 0);
  1288. var n = 0;
  1289. var i, k, length, len, E;
  1290. for (i = -1, length = arguments.length; i < length; i++) {
  1291. E = i === -1 ? O : arguments[i];
  1292. if (isConcatSpreadable(E)) {
  1293. len = lengthOfArrayLike$3(E);
  1294. doesNotExceedSafeInteger(n + len);
  1295. for (k = 0; k < len; k++, n++) if (k in E) createProperty$1(A, n, E[k]);
  1296. } else {
  1297. doesNotExceedSafeInteger(n + 1);
  1298. createProperty$1(A, n++, E);
  1299. }
  1300. }
  1301. A.length = n;
  1302. return A;
  1303. }
  1304. });
  1305. var objectDefineProperties = {};
  1306. var DESCRIPTORS$3 = descriptors;
  1307. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1308. var definePropertyModule$1 = objectDefineProperty;
  1309. var anObject$d = anObject$g;
  1310. var toIndexedObject$2 = toIndexedObject$6;
  1311. var objectKeys$2 = objectKeys$3;
  1312. // `Object.defineProperties` method
  1313. // https://tc39.es/ecma262/#sec-object.defineproperties
  1314. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1315. objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1316. anObject$d(O);
  1317. var props = toIndexedObject$2(Properties);
  1318. var keys = objectKeys$2(Properties);
  1319. var length = keys.length;
  1320. var index = 0;
  1321. var key;
  1322. while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
  1323. return O;
  1324. };
  1325. var getBuiltIn$3 = getBuiltIn$8;
  1326. var html$2 = getBuiltIn$3('document', 'documentElement');
  1327. /* global ActiveXObject -- old IE, WSH */
  1328. var anObject$c = anObject$g;
  1329. var definePropertiesModule = objectDefineProperties;
  1330. var enumBugKeys = enumBugKeys$3;
  1331. var hiddenKeys = hiddenKeys$4;
  1332. var html$1 = html$2;
  1333. var documentCreateElement$1 = documentCreateElement$2;
  1334. var sharedKey = sharedKey$2;
  1335. var GT = '>';
  1336. var LT = '<';
  1337. var PROTOTYPE = 'prototype';
  1338. var SCRIPT = 'script';
  1339. var IE_PROTO = sharedKey('IE_PROTO');
  1340. var EmptyConstructor = function () { /* empty */ };
  1341. var scriptTag = function (content) {
  1342. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1343. };
  1344. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1345. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1346. activeXDocument.write(scriptTag(''));
  1347. activeXDocument.close();
  1348. var temp = activeXDocument.parentWindow.Object;
  1349. activeXDocument = null; // avoid memory leak
  1350. return temp;
  1351. };
  1352. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1353. var NullProtoObjectViaIFrame = function () {
  1354. // Thrash, waste and sodomy: IE GC bug
  1355. var iframe = documentCreateElement$1('iframe');
  1356. var JS = 'java' + SCRIPT + ':';
  1357. var iframeDocument;
  1358. iframe.style.display = 'none';
  1359. html$1.appendChild(iframe);
  1360. // https://github.com/zloirock/core-js/issues/475
  1361. iframe.src = String(JS);
  1362. iframeDocument = iframe.contentWindow.document;
  1363. iframeDocument.open();
  1364. iframeDocument.write(scriptTag('document.F=Object'));
  1365. iframeDocument.close();
  1366. return iframeDocument.F;
  1367. };
  1368. // Check for document.domain and active x support
  1369. // No need to use active x approach when document.domain is not set
  1370. // see https://github.com/es-shims/es5-shim/issues/150
  1371. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1372. // avoid IE GC bug
  1373. var activeXDocument;
  1374. var NullProtoObject = function () {
  1375. try {
  1376. activeXDocument = new ActiveXObject('htmlfile');
  1377. } catch (error) { /* ignore */ }
  1378. NullProtoObject = typeof document != 'undefined'
  1379. ? document.domain && activeXDocument
  1380. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1381. : NullProtoObjectViaIFrame()
  1382. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1383. var length = enumBugKeys.length;
  1384. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1385. return NullProtoObject();
  1386. };
  1387. hiddenKeys[IE_PROTO] = true;
  1388. // `Object.create` method
  1389. // https://tc39.es/ecma262/#sec-object.create
  1390. // eslint-disable-next-line es/no-object-create -- safe
  1391. var objectCreate = Object.create || function create(O, Properties) {
  1392. var result;
  1393. if (O !== null) {
  1394. EmptyConstructor[PROTOTYPE] = anObject$c(O);
  1395. result = new EmptyConstructor();
  1396. EmptyConstructor[PROTOTYPE] = null;
  1397. // add "__proto__" for Object.getPrototypeOf polyfill
  1398. result[IE_PROTO] = O;
  1399. } else result = NullProtoObject();
  1400. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1401. };
  1402. var wellKnownSymbol$b = wellKnownSymbol$i;
  1403. var create$1 = objectCreate;
  1404. var defineProperty$2 = objectDefineProperty.f;
  1405. var UNSCOPABLES = wellKnownSymbol$b('unscopables');
  1406. var ArrayPrototype$1 = Array.prototype;
  1407. // Array.prototype[@@unscopables]
  1408. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1409. if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
  1410. defineProperty$2(ArrayPrototype$1, UNSCOPABLES, {
  1411. configurable: true,
  1412. value: create$1(null)
  1413. });
  1414. }
  1415. // add a key to Array.prototype[@@unscopables]
  1416. var addToUnscopables$2 = function (key) {
  1417. ArrayPrototype$1[UNSCOPABLES][key] = true;
  1418. };
  1419. var $$g = _export;
  1420. var $includes = arrayIncludes.includes;
  1421. var fails$d = fails$q;
  1422. var addToUnscopables$1 = addToUnscopables$2;
  1423. // FF99+ bug
  1424. var BROKEN_ON_SPARSE = fails$d(function () {
  1425. return !Array(1).includes();
  1426. });
  1427. // `Array.prototype.includes` method
  1428. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1429. $$g({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1430. includes: function includes(el /* , fromIndex = 0 */) {
  1431. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1432. }
  1433. });
  1434. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1435. addToUnscopables$1('includes');
  1436. var isObject$2 = isObject$a;
  1437. var classof$4 = classofRaw$2;
  1438. var wellKnownSymbol$a = wellKnownSymbol$i;
  1439. var MATCH$1 = wellKnownSymbol$a('match');
  1440. // `IsRegExp` abstract operation
  1441. // https://tc39.es/ecma262/#sec-isregexp
  1442. var isRegexp = function (it) {
  1443. var isRegExp;
  1444. return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$4(it) == 'RegExp');
  1445. };
  1446. var isRegExp$1 = isRegexp;
  1447. var $TypeError$9 = TypeError;
  1448. var notARegexp = function (it) {
  1449. if (isRegExp$1(it)) {
  1450. throw $TypeError$9("The method doesn't accept regular expressions");
  1451. } return it;
  1452. };
  1453. var classof$3 = classof$7;
  1454. var $String$1 = String;
  1455. var toString$9 = function (argument) {
  1456. if (classof$3(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1457. return $String$1(argument);
  1458. };
  1459. var wellKnownSymbol$9 = wellKnownSymbol$i;
  1460. var MATCH = wellKnownSymbol$9('match');
  1461. var correctIsRegexpLogic = function (METHOD_NAME) {
  1462. var regexp = /./;
  1463. try {
  1464. '/./'[METHOD_NAME](regexp);
  1465. } catch (error1) {
  1466. try {
  1467. regexp[MATCH] = false;
  1468. return '/./'[METHOD_NAME](regexp);
  1469. } catch (error2) { /* empty */ }
  1470. } return false;
  1471. };
  1472. var $$f = _export;
  1473. var uncurryThis$f = functionUncurryThis;
  1474. var notARegExp = notARegexp;
  1475. var requireObjectCoercible$5 = requireObjectCoercible$8;
  1476. var toString$8 = toString$9;
  1477. var correctIsRegExpLogic = correctIsRegexpLogic;
  1478. var stringIndexOf$1 = uncurryThis$f(''.indexOf);
  1479. // `String.prototype.includes` method
  1480. // https://tc39.es/ecma262/#sec-string.prototype.includes
  1481. $$f({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  1482. includes: function includes(searchString /* , position = 0 */) {
  1483. return !!~stringIndexOf$1(
  1484. toString$8(requireObjectCoercible$5(this)),
  1485. toString$8(notARegExp(searchString)),
  1486. arguments.length > 1 ? arguments[1] : undefined
  1487. );
  1488. }
  1489. });
  1490. // iterable DOM collections
  1491. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  1492. var domIterables = {
  1493. CSSRuleList: 0,
  1494. CSSStyleDeclaration: 0,
  1495. CSSValueList: 0,
  1496. ClientRectList: 0,
  1497. DOMRectList: 0,
  1498. DOMStringList: 0,
  1499. DOMTokenList: 1,
  1500. DataTransferItemList: 0,
  1501. FileList: 0,
  1502. HTMLAllCollection: 0,
  1503. HTMLCollection: 0,
  1504. HTMLFormElement: 0,
  1505. HTMLSelectElement: 0,
  1506. MediaList: 0,
  1507. MimeTypeArray: 0,
  1508. NamedNodeMap: 0,
  1509. NodeList: 1,
  1510. PaintRequestList: 0,
  1511. Plugin: 0,
  1512. PluginArray: 0,
  1513. SVGLengthList: 0,
  1514. SVGNumberList: 0,
  1515. SVGPathSegList: 0,
  1516. SVGPointList: 0,
  1517. SVGStringList: 0,
  1518. SVGTransformList: 0,
  1519. SourceBufferList: 0,
  1520. StyleSheetList: 0,
  1521. TextTrackCueList: 0,
  1522. TextTrackList: 0,
  1523. TouchList: 0
  1524. };
  1525. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  1526. var documentCreateElement = documentCreateElement$2;
  1527. var classList = documentCreateElement('span').classList;
  1528. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  1529. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  1530. var fails$c = fails$q;
  1531. var arrayMethodIsStrict$4 = function (METHOD_NAME, argument) {
  1532. var method = [][METHOD_NAME];
  1533. return !!method && fails$c(function () {
  1534. // eslint-disable-next-line no-useless-call -- required for testing
  1535. method.call(null, argument || function () { return 1; }, 1);
  1536. });
  1537. };
  1538. var $forEach = arrayIteration.forEach;
  1539. var arrayMethodIsStrict$3 = arrayMethodIsStrict$4;
  1540. var STRICT_METHOD$3 = arrayMethodIsStrict$3('forEach');
  1541. // `Array.prototype.forEach` method implementation
  1542. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1543. var arrayForEach = !STRICT_METHOD$3 ? function forEach(callbackfn /* , thisArg */) {
  1544. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1545. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  1546. } : [].forEach;
  1547. var global$d = global$n;
  1548. var DOMIterables = domIterables;
  1549. var DOMTokenListPrototype = domTokenListPrototype;
  1550. var forEach = arrayForEach;
  1551. var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
  1552. var handlePrototype = function (CollectionPrototype) {
  1553. // some Chrome versions have non-configurable methods on DOMTokenList
  1554. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  1555. createNonEnumerableProperty$1(CollectionPrototype, 'forEach', forEach);
  1556. } catch (error) {
  1557. CollectionPrototype.forEach = forEach;
  1558. }
  1559. };
  1560. for (var COLLECTION_NAME in DOMIterables) {
  1561. if (DOMIterables[COLLECTION_NAME]) {
  1562. handlePrototype(global$d[COLLECTION_NAME] && global$d[COLLECTION_NAME].prototype);
  1563. }
  1564. }
  1565. handlePrototype(DOMTokenListPrototype);
  1566. var anObject$b = anObject$g;
  1567. // `RegExp.prototype.flags` getter implementation
  1568. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1569. var regexpFlags$1 = function () {
  1570. var that = anObject$b(this);
  1571. var result = '';
  1572. if (that.hasIndices) result += 'd';
  1573. if (that.global) result += 'g';
  1574. if (that.ignoreCase) result += 'i';
  1575. if (that.multiline) result += 'm';
  1576. if (that.dotAll) result += 's';
  1577. if (that.unicode) result += 'u';
  1578. if (that.unicodeSets) result += 'v';
  1579. if (that.sticky) result += 'y';
  1580. return result;
  1581. };
  1582. var fails$b = fails$q;
  1583. var global$c = global$n;
  1584. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  1585. var $RegExp$2 = global$c.RegExp;
  1586. var UNSUPPORTED_Y$2 = fails$b(function () {
  1587. var re = $RegExp$2('a', 'y');
  1588. re.lastIndex = 2;
  1589. return re.exec('abcd') != null;
  1590. });
  1591. // UC Browser bug
  1592. // https://github.com/zloirock/core-js/issues/1008
  1593. var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$b(function () {
  1594. return !$RegExp$2('a', 'y').sticky;
  1595. });
  1596. var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$b(function () {
  1597. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  1598. var re = $RegExp$2('^r', 'gy');
  1599. re.lastIndex = 2;
  1600. return re.exec('str') != null;
  1601. });
  1602. var regexpStickyHelpers = {
  1603. BROKEN_CARET: BROKEN_CARET,
  1604. MISSED_STICKY: MISSED_STICKY,
  1605. UNSUPPORTED_Y: UNSUPPORTED_Y$2
  1606. };
  1607. var fails$a = fails$q;
  1608. var global$b = global$n;
  1609. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  1610. var $RegExp$1 = global$b.RegExp;
  1611. var regexpUnsupportedDotAll = fails$a(function () {
  1612. var re = $RegExp$1('.', 's');
  1613. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  1614. });
  1615. var fails$9 = fails$q;
  1616. var global$a = global$n;
  1617. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  1618. var $RegExp = global$a.RegExp;
  1619. var regexpUnsupportedNcg = fails$9(function () {
  1620. var re = $RegExp('(?<a>b)', 'g');
  1621. return re.exec('b').groups.a !== 'b' ||
  1622. 'b'.replace(re, '$<a>c') !== 'bc';
  1623. });
  1624. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1625. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1626. var call$e = functionCall;
  1627. var uncurryThis$e = functionUncurryThis;
  1628. var toString$7 = toString$9;
  1629. var regexpFlags = regexpFlags$1;
  1630. var stickyHelpers$1 = regexpStickyHelpers;
  1631. var shared = shared$4.exports;
  1632. var create = objectCreate;
  1633. var getInternalState = internalState.get;
  1634. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  1635. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  1636. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1637. var nativeExec = RegExp.prototype.exec;
  1638. var patchedExec = nativeExec;
  1639. var charAt$3 = uncurryThis$e(''.charAt);
  1640. var indexOf = uncurryThis$e(''.indexOf);
  1641. var replace$2 = uncurryThis$e(''.replace);
  1642. var stringSlice$4 = uncurryThis$e(''.slice);
  1643. var UPDATES_LAST_INDEX_WRONG = (function () {
  1644. var re1 = /a/;
  1645. var re2 = /b*/g;
  1646. call$e(nativeExec, re1, 'a');
  1647. call$e(nativeExec, re2, 'a');
  1648. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1649. })();
  1650. var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
  1651. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1652. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1653. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  1654. if (PATCH) {
  1655. patchedExec = function exec(string) {
  1656. var re = this;
  1657. var state = getInternalState(re);
  1658. var str = toString$7(string);
  1659. var raw = state.raw;
  1660. var result, reCopy, lastIndex, match, i, object, group;
  1661. if (raw) {
  1662. raw.lastIndex = re.lastIndex;
  1663. result = call$e(patchedExec, raw, str);
  1664. re.lastIndex = raw.lastIndex;
  1665. return result;
  1666. }
  1667. var groups = state.groups;
  1668. var sticky = UNSUPPORTED_Y$1 && re.sticky;
  1669. var flags = call$e(regexpFlags, re);
  1670. var source = re.source;
  1671. var charsAdded = 0;
  1672. var strCopy = str;
  1673. if (sticky) {
  1674. flags = replace$2(flags, 'y', '');
  1675. if (indexOf(flags, 'g') === -1) {
  1676. flags += 'g';
  1677. }
  1678. strCopy = stringSlice$4(str, re.lastIndex);
  1679. // Support anchored sticky behavior.
  1680. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  1681. source = '(?: ' + source + ')';
  1682. strCopy = ' ' + strCopy;
  1683. charsAdded++;
  1684. }
  1685. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1686. // simulate the 'y' flag.
  1687. reCopy = new RegExp('^(?:' + source + ')', flags);
  1688. }
  1689. if (NPCG_INCLUDED) {
  1690. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1691. }
  1692. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1693. match = call$e(nativeExec, sticky ? reCopy : re, strCopy);
  1694. if (sticky) {
  1695. if (match) {
  1696. match.input = stringSlice$4(match.input, charsAdded);
  1697. match[0] = stringSlice$4(match[0], charsAdded);
  1698. match.index = re.lastIndex;
  1699. re.lastIndex += match[0].length;
  1700. } else re.lastIndex = 0;
  1701. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1702. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1703. }
  1704. if (NPCG_INCLUDED && match && match.length > 1) {
  1705. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1706. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  1707. call$e(nativeReplace, match[0], reCopy, function () {
  1708. for (i = 1; i < arguments.length - 2; i++) {
  1709. if (arguments[i] === undefined) match[i] = undefined;
  1710. }
  1711. });
  1712. }
  1713. if (match && groups) {
  1714. match.groups = object = create(null);
  1715. for (i = 0; i < groups.length; i++) {
  1716. group = groups[i];
  1717. object[group[0]] = match[group[1]];
  1718. }
  1719. }
  1720. return match;
  1721. };
  1722. }
  1723. var regexpExec$3 = patchedExec;
  1724. var $$e = _export;
  1725. var exec$2 = regexpExec$3;
  1726. // `RegExp.prototype.exec` method
  1727. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1728. $$e({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
  1729. exec: exec$2
  1730. });
  1731. var NATIVE_BIND = functionBindNative;
  1732. var FunctionPrototype = Function.prototype;
  1733. var apply$3 = FunctionPrototype.apply;
  1734. var call$d = FunctionPrototype.call;
  1735. // eslint-disable-next-line es/no-reflect -- safe
  1736. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$d.bind(apply$3) : function () {
  1737. return call$d.apply(apply$3, arguments);
  1738. });
  1739. // TODO: Remove from `core-js@4` since it's moved to entry points
  1740. var uncurryThis$d = functionUncurryThis;
  1741. var defineBuiltIn$3 = defineBuiltIn$6;
  1742. var regexpExec$2 = regexpExec$3;
  1743. var fails$8 = fails$q;
  1744. var wellKnownSymbol$8 = wellKnownSymbol$i;
  1745. var createNonEnumerableProperty = createNonEnumerableProperty$4;
  1746. var SPECIES$3 = wellKnownSymbol$8('species');
  1747. var RegExpPrototype$2 = RegExp.prototype;
  1748. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1749. var SYMBOL = wellKnownSymbol$8(KEY);
  1750. var DELEGATES_TO_SYMBOL = !fails$8(function () {
  1751. // String methods call symbol-named RegEp methods
  1752. var O = {};
  1753. O[SYMBOL] = function () { return 7; };
  1754. return ''[KEY](O) != 7;
  1755. });
  1756. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$8(function () {
  1757. // Symbol-named RegExp methods call .exec
  1758. var execCalled = false;
  1759. var re = /a/;
  1760. if (KEY === 'split') {
  1761. // We can't use real regex here since it causes deoptimization
  1762. // and serious performance degradation in V8
  1763. // https://github.com/zloirock/core-js/issues/306
  1764. re = {};
  1765. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1766. // a new one. We need to return the patched regex when creating the new one.
  1767. re.constructor = {};
  1768. re.constructor[SPECIES$3] = function () { return re; };
  1769. re.flags = '';
  1770. re[SYMBOL] = /./[SYMBOL];
  1771. }
  1772. re.exec = function () { execCalled = true; return null; };
  1773. re[SYMBOL]('');
  1774. return !execCalled;
  1775. });
  1776. if (
  1777. !DELEGATES_TO_SYMBOL ||
  1778. !DELEGATES_TO_EXEC ||
  1779. FORCED
  1780. ) {
  1781. var uncurriedNativeRegExpMethod = uncurryThis$d(/./[SYMBOL]);
  1782. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1783. var uncurriedNativeMethod = uncurryThis$d(nativeMethod);
  1784. var $exec = regexp.exec;
  1785. if ($exec === regexpExec$2 || $exec === RegExpPrototype$2.exec) {
  1786. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1787. // The native String method already delegates to @@method (this
  1788. // polyfilled function), leasing to infinite recursion.
  1789. // We avoid it by directly calling the native @@method method.
  1790. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  1791. }
  1792. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  1793. }
  1794. return { done: false };
  1795. });
  1796. defineBuiltIn$3(String.prototype, KEY, methods[0]);
  1797. defineBuiltIn$3(RegExpPrototype$2, SYMBOL, methods[1]);
  1798. }
  1799. if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
  1800. };
  1801. var isConstructor = isConstructor$2;
  1802. var tryToString$3 = tryToString$5;
  1803. var $TypeError$8 = TypeError;
  1804. // `Assert: IsConstructor(argument) is true`
  1805. var aConstructor$1 = function (argument) {
  1806. if (isConstructor(argument)) return argument;
  1807. throw $TypeError$8(tryToString$3(argument) + ' is not a constructor');
  1808. };
  1809. var anObject$a = anObject$g;
  1810. var aConstructor = aConstructor$1;
  1811. var isNullOrUndefined$4 = isNullOrUndefined$7;
  1812. var wellKnownSymbol$7 = wellKnownSymbol$i;
  1813. var SPECIES$2 = wellKnownSymbol$7('species');
  1814. // `SpeciesConstructor` abstract operation
  1815. // https://tc39.es/ecma262/#sec-speciesconstructor
  1816. var speciesConstructor$2 = function (O, defaultConstructor) {
  1817. var C = anObject$a(O).constructor;
  1818. var S;
  1819. return C === undefined || isNullOrUndefined$4(S = anObject$a(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
  1820. };
  1821. var uncurryThis$c = functionUncurryThis;
  1822. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  1823. var toString$6 = toString$9;
  1824. var requireObjectCoercible$4 = requireObjectCoercible$8;
  1825. var charAt$2 = uncurryThis$c(''.charAt);
  1826. var charCodeAt = uncurryThis$c(''.charCodeAt);
  1827. var stringSlice$3 = uncurryThis$c(''.slice);
  1828. var createMethod$2 = function (CONVERT_TO_STRING) {
  1829. return function ($this, pos) {
  1830. var S = toString$6(requireObjectCoercible$4($this));
  1831. var position = toIntegerOrInfinity$1(pos);
  1832. var size = S.length;
  1833. var first, second;
  1834. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  1835. first = charCodeAt(S, position);
  1836. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  1837. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  1838. ? CONVERT_TO_STRING
  1839. ? charAt$2(S, position)
  1840. : first
  1841. : CONVERT_TO_STRING
  1842. ? stringSlice$3(S, position, position + 2)
  1843. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  1844. };
  1845. };
  1846. var stringMultibyte = {
  1847. // `String.prototype.codePointAt` method
  1848. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  1849. codeAt: createMethod$2(false),
  1850. // `String.prototype.at` method
  1851. // https://github.com/mathiasbynens/String.prototype.at
  1852. charAt: createMethod$2(true)
  1853. };
  1854. var charAt$1 = stringMultibyte.charAt;
  1855. // `AdvanceStringIndex` abstract operation
  1856. // https://tc39.es/ecma262/#sec-advancestringindex
  1857. var advanceStringIndex$3 = function (S, index, unicode) {
  1858. return index + (unicode ? charAt$1(S, index).length : 1);
  1859. };
  1860. var toAbsoluteIndex = toAbsoluteIndex$2;
  1861. var lengthOfArrayLike$2 = lengthOfArrayLike$6;
  1862. var createProperty = createProperty$2;
  1863. var $Array = Array;
  1864. var max$1 = Math.max;
  1865. var arraySliceSimple = function (O, start, end) {
  1866. var length = lengthOfArrayLike$2(O);
  1867. var k = toAbsoluteIndex(start, length);
  1868. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1869. var result = $Array(max$1(fin - k, 0));
  1870. for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
  1871. result.length = n;
  1872. return result;
  1873. };
  1874. var call$c = functionCall;
  1875. var anObject$9 = anObject$g;
  1876. var isCallable$6 = isCallable$j;
  1877. var classof$2 = classofRaw$2;
  1878. var regexpExec$1 = regexpExec$3;
  1879. var $TypeError$7 = TypeError;
  1880. // `RegExpExec` abstract operation
  1881. // https://tc39.es/ecma262/#sec-regexpexec
  1882. var regexpExecAbstract = function (R, S) {
  1883. var exec = R.exec;
  1884. if (isCallable$6(exec)) {
  1885. var result = call$c(exec, R, S);
  1886. if (result !== null) anObject$9(result);
  1887. return result;
  1888. }
  1889. if (classof$2(R) === 'RegExp') return call$c(regexpExec$1, R, S);
  1890. throw $TypeError$7('RegExp#exec called on incompatible receiver');
  1891. };
  1892. var apply$2 = functionApply;
  1893. var call$b = functionCall;
  1894. var uncurryThis$b = functionUncurryThis;
  1895. var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
  1896. var anObject$8 = anObject$g;
  1897. var isNullOrUndefined$3 = isNullOrUndefined$7;
  1898. var isRegExp = isRegexp;
  1899. var requireObjectCoercible$3 = requireObjectCoercible$8;
  1900. var speciesConstructor$1 = speciesConstructor$2;
  1901. var advanceStringIndex$2 = advanceStringIndex$3;
  1902. var toLength$2 = toLength$4;
  1903. var toString$5 = toString$9;
  1904. var getMethod$4 = getMethod$6;
  1905. var arraySlice$3 = arraySliceSimple;
  1906. var callRegExpExec = regexpExecAbstract;
  1907. var regexpExec = regexpExec$3;
  1908. var stickyHelpers = regexpStickyHelpers;
  1909. var fails$7 = fails$q;
  1910. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  1911. var MAX_UINT32 = 0xFFFFFFFF;
  1912. var min$1 = Math.min;
  1913. var $push = [].push;
  1914. var exec$1 = uncurryThis$b(/./.exec);
  1915. var push$3 = uncurryThis$b($push);
  1916. var stringSlice$2 = uncurryThis$b(''.slice);
  1917. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  1918. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  1919. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$7(function () {
  1920. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  1921. var re = /(?:)/;
  1922. var originalExec = re.exec;
  1923. re.exec = function () { return originalExec.apply(this, arguments); };
  1924. var result = 'ab'.split(re);
  1925. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  1926. });
  1927. // @@split logic
  1928. fixRegExpWellKnownSymbolLogic$2('split', function (SPLIT, nativeSplit, maybeCallNative) {
  1929. var internalSplit;
  1930. if (
  1931. 'abbc'.split(/(b)*/)[1] == 'c' ||
  1932. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  1933. 'test'.split(/(?:)/, -1).length != 4 ||
  1934. 'ab'.split(/(?:ab)*/).length != 2 ||
  1935. '.'.split(/(.?)(.?)/).length != 4 ||
  1936. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  1937. '.'.split(/()()/).length > 1 ||
  1938. ''.split(/.?/).length
  1939. ) {
  1940. // based on es5-shim implementation, need to rework it
  1941. internalSplit = function (separator, limit) {
  1942. var string = toString$5(requireObjectCoercible$3(this));
  1943. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  1944. if (lim === 0) return [];
  1945. if (separator === undefined) return [string];
  1946. // If `separator` is not a regex, use native split
  1947. if (!isRegExp(separator)) {
  1948. return call$b(nativeSplit, string, separator, lim);
  1949. }
  1950. var output = [];
  1951. var flags = (separator.ignoreCase ? 'i' : '') +
  1952. (separator.multiline ? 'm' : '') +
  1953. (separator.unicode ? 'u' : '') +
  1954. (separator.sticky ? 'y' : '');
  1955. var lastLastIndex = 0;
  1956. // Make `global` and avoid `lastIndex` issues by working with a copy
  1957. var separatorCopy = new RegExp(separator.source, flags + 'g');
  1958. var match, lastIndex, lastLength;
  1959. while (match = call$b(regexpExec, separatorCopy, string)) {
  1960. lastIndex = separatorCopy.lastIndex;
  1961. if (lastIndex > lastLastIndex) {
  1962. push$3(output, stringSlice$2(string, lastLastIndex, match.index));
  1963. if (match.length > 1 && match.index < string.length) apply$2($push, output, arraySlice$3(match, 1));
  1964. lastLength = match[0].length;
  1965. lastLastIndex = lastIndex;
  1966. if (output.length >= lim) break;
  1967. }
  1968. if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
  1969. }
  1970. if (lastLastIndex === string.length) {
  1971. if (lastLength || !exec$1(separatorCopy, '')) push$3(output, '');
  1972. } else push$3(output, stringSlice$2(string, lastLastIndex));
  1973. return output.length > lim ? arraySlice$3(output, 0, lim) : output;
  1974. };
  1975. // Chakra, V8
  1976. } else if ('0'.split(undefined, 0).length) {
  1977. internalSplit = function (separator, limit) {
  1978. return separator === undefined && limit === 0 ? [] : call$b(nativeSplit, this, separator, limit);
  1979. };
  1980. } else internalSplit = nativeSplit;
  1981. return [
  1982. // `String.prototype.split` method
  1983. // https://tc39.es/ecma262/#sec-string.prototype.split
  1984. function split(separator, limit) {
  1985. var O = requireObjectCoercible$3(this);
  1986. var splitter = isNullOrUndefined$3(separator) ? undefined : getMethod$4(separator, SPLIT);
  1987. return splitter
  1988. ? call$b(splitter, separator, O, limit)
  1989. : call$b(internalSplit, toString$5(O), separator, limit);
  1990. },
  1991. // `RegExp.prototype[@@split]` method
  1992. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  1993. //
  1994. // NOTE: This cannot be properly polyfilled in engines that don't support
  1995. // the 'y' flag.
  1996. function (string, limit) {
  1997. var rx = anObject$8(this);
  1998. var S = toString$5(string);
  1999. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  2000. if (res.done) return res.value;
  2001. var C = speciesConstructor$1(rx, RegExp);
  2002. var unicodeMatching = rx.unicode;
  2003. var flags = (rx.ignoreCase ? 'i' : '') +
  2004. (rx.multiline ? 'm' : '') +
  2005. (rx.unicode ? 'u' : '') +
  2006. (UNSUPPORTED_Y ? 'g' : 'y');
  2007. // ^(? + rx + ) is needed, in combination with some S slicing, to
  2008. // simulate the 'y' flag.
  2009. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  2010. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  2011. if (lim === 0) return [];
  2012. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  2013. var p = 0;
  2014. var q = 0;
  2015. var A = [];
  2016. while (q < S.length) {
  2017. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  2018. var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice$2(S, q) : S);
  2019. var e;
  2020. if (
  2021. z === null ||
  2022. (e = min$1(toLength$2(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  2023. ) {
  2024. q = advanceStringIndex$2(S, q, unicodeMatching);
  2025. } else {
  2026. push$3(A, stringSlice$2(S, p, q));
  2027. if (A.length === lim) return A;
  2028. for (var i = 1; i <= z.length - 1; i++) {
  2029. push$3(A, z[i]);
  2030. if (A.length === lim) return A;
  2031. }
  2032. q = p = e;
  2033. }
  2034. }
  2035. push$3(A, stringSlice$2(S, p));
  2036. return A;
  2037. }
  2038. ];
  2039. }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  2040. // a string of all valid unicode whitespaces
  2041. var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  2042. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  2043. var uncurryThis$a = functionUncurryThis;
  2044. var requireObjectCoercible$2 = requireObjectCoercible$8;
  2045. var toString$4 = toString$9;
  2046. var whitespaces$2 = whitespaces$3;
  2047. var replace$1 = uncurryThis$a(''.replace);
  2048. var whitespace = '[' + whitespaces$2 + ']';
  2049. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  2050. var rtrim = RegExp(whitespace + whitespace + '*$');
  2051. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  2052. var createMethod$1 = function (TYPE) {
  2053. return function ($this) {
  2054. var string = toString$4(requireObjectCoercible$2($this));
  2055. if (TYPE & 1) string = replace$1(string, ltrim, '');
  2056. if (TYPE & 2) string = replace$1(string, rtrim, '');
  2057. return string;
  2058. };
  2059. };
  2060. var stringTrim = {
  2061. // `String.prototype.{ trimLeft, trimStart }` methods
  2062. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  2063. start: createMethod$1(1),
  2064. // `String.prototype.{ trimRight, trimEnd }` methods
  2065. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  2066. end: createMethod$1(2),
  2067. // `String.prototype.trim` method
  2068. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2069. trim: createMethod$1(3)
  2070. };
  2071. var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
  2072. var fails$6 = fails$q;
  2073. var whitespaces$1 = whitespaces$3;
  2074. var non = '\u200B\u0085\u180E';
  2075. // check that a method works with the correct list
  2076. // of whitespaces and has a correct name
  2077. var stringTrimForced = function (METHOD_NAME) {
  2078. return fails$6(function () {
  2079. return !!whitespaces$1[METHOD_NAME]()
  2080. || non[METHOD_NAME]() !== non
  2081. || (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
  2082. });
  2083. };
  2084. var $$d = _export;
  2085. var $trim = stringTrim.trim;
  2086. var forcedStringTrimMethod = stringTrimForced;
  2087. // `String.prototype.trim` method
  2088. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2089. $$d({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  2090. trim: function trim() {
  2091. return $trim(this);
  2092. }
  2093. });
  2094. var DESCRIPTORS$2 = descriptors;
  2095. var uncurryThis$9 = functionUncurryThis;
  2096. var objectKeys$1 = objectKeys$3;
  2097. var toIndexedObject$1 = toIndexedObject$6;
  2098. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  2099. var propertyIsEnumerable = uncurryThis$9($propertyIsEnumerable);
  2100. var push$2 = uncurryThis$9([].push);
  2101. // `Object.{ entries, values }` methods implementation
  2102. var createMethod = function (TO_ENTRIES) {
  2103. return function (it) {
  2104. var O = toIndexedObject$1(it);
  2105. var keys = objectKeys$1(O);
  2106. var length = keys.length;
  2107. var i = 0;
  2108. var result = [];
  2109. var key;
  2110. while (length > i) {
  2111. key = keys[i++];
  2112. if (!DESCRIPTORS$2 || propertyIsEnumerable(O, key)) {
  2113. push$2(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  2114. }
  2115. }
  2116. return result;
  2117. };
  2118. };
  2119. var objectToArray = {
  2120. // `Object.entries` method
  2121. // https://tc39.es/ecma262/#sec-object.entries
  2122. entries: createMethod(true),
  2123. // `Object.values` method
  2124. // https://tc39.es/ecma262/#sec-object.values
  2125. values: createMethod(false)
  2126. };
  2127. var $$c = _export;
  2128. var $values = objectToArray.values;
  2129. // `Object.values` method
  2130. // https://tc39.es/ecma262/#sec-object.values
  2131. $$c({ target: 'Object', stat: true }, {
  2132. values: function values(O) {
  2133. return $values(O);
  2134. }
  2135. });
  2136. var call$a = functionCall;
  2137. var hasOwn$2 = hasOwnProperty_1;
  2138. var isPrototypeOf$2 = objectIsPrototypeOf;
  2139. var regExpFlags = regexpFlags$1;
  2140. var RegExpPrototype$1 = RegExp.prototype;
  2141. var regexpGetFlags = function (R) {
  2142. var flags = R.flags;
  2143. return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn$2(R, 'flags') && isPrototypeOf$2(RegExpPrototype$1, R)
  2144. ? call$a(regExpFlags, R) : flags;
  2145. };
  2146. var PROPER_FUNCTION_NAME = functionName.PROPER;
  2147. var defineBuiltIn$2 = defineBuiltIn$6;
  2148. var anObject$7 = anObject$g;
  2149. var $toString = toString$9;
  2150. var fails$5 = fails$q;
  2151. var getRegExpFlags = regexpGetFlags;
  2152. var TO_STRING = 'toString';
  2153. var RegExpPrototype = RegExp.prototype;
  2154. var nativeToString = RegExpPrototype[TO_STRING];
  2155. var NOT_GENERIC = fails$5(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  2156. // FF44- RegExp#toString has a wrong name
  2157. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
  2158. // `RegExp.prototype.toString` method
  2159. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  2160. if (NOT_GENERIC || INCORRECT_NAME) {
  2161. defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
  2162. var R = anObject$7(this);
  2163. var pattern = $toString(R.source);
  2164. var flags = $toString(getRegExpFlags(R));
  2165. return '/' + pattern + '/' + flags;
  2166. }, { unsafe: true });
  2167. }
  2168. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  2169. var $$b = _export;
  2170. var uncurryThis$8 = functionUncurryThis;
  2171. var $indexOf = arrayIncludes.indexOf;
  2172. var arrayMethodIsStrict$2 = arrayMethodIsStrict$4;
  2173. var nativeIndexOf = uncurryThis$8([].indexOf);
  2174. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  2175. var STRICT_METHOD$2 = arrayMethodIsStrict$2('indexOf');
  2176. // `Array.prototype.indexOf` method
  2177. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  2178. $$b({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$2 }, {
  2179. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  2180. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  2181. return NEGATIVE_ZERO
  2182. // convert -0 to +0
  2183. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  2184. : $indexOf(this, searchElement, fromIndex);
  2185. }
  2186. });
  2187. var global$9 = global$n;
  2188. var fails$4 = fails$q;
  2189. var uncurryThis$7 = functionUncurryThis;
  2190. var toString$3 = toString$9;
  2191. var trim = stringTrim.trim;
  2192. var whitespaces = whitespaces$3;
  2193. var $parseInt$1 = global$9.parseInt;
  2194. var Symbol$1 = global$9.Symbol;
  2195. var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
  2196. var hex = /^[+-]?0x/i;
  2197. var exec = uncurryThis$7(hex.exec);
  2198. var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
  2199. // MS Edge 18- broken with boxed symbols
  2200. || (ITERATOR$3 && !fails$4(function () { $parseInt$1(Object(ITERATOR$3)); }));
  2201. // `parseInt` method
  2202. // https://tc39.es/ecma262/#sec-parseint-string-radix
  2203. var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
  2204. var S = trim(toString$3(string));
  2205. return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
  2206. } : $parseInt$1;
  2207. var $$a = _export;
  2208. var $parseInt = numberParseInt;
  2209. // `parseInt` method
  2210. // https://tc39.es/ecma262/#sec-parseint-string-radix
  2211. $$a({ global: true, forced: parseInt != $parseInt }, {
  2212. parseInt: $parseInt
  2213. });
  2214. var DESCRIPTORS$1 = descriptors;
  2215. var uncurryThis$6 = functionUncurryThis;
  2216. var call$9 = functionCall;
  2217. var fails$3 = fails$q;
  2218. var objectKeys = objectKeys$3;
  2219. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  2220. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  2221. var toObject$2 = toObject$7;
  2222. var IndexedObject$1 = indexedObject;
  2223. // eslint-disable-next-line es/no-object-assign -- safe
  2224. var $assign = Object.assign;
  2225. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  2226. var defineProperty$1 = Object.defineProperty;
  2227. var concat$1 = uncurryThis$6([].concat);
  2228. // `Object.assign` method
  2229. // https://tc39.es/ecma262/#sec-object.assign
  2230. var objectAssign = !$assign || fails$3(function () {
  2231. // should have correct order of operations (Edge bug)
  2232. if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
  2233. enumerable: true,
  2234. get: function () {
  2235. defineProperty$1(this, 'b', {
  2236. value: 3,
  2237. enumerable: false
  2238. });
  2239. }
  2240. }), { b: 2 })).b !== 1) return true;
  2241. // should work with symbols and should have deterministic property order (V8 bug)
  2242. var A = {};
  2243. var B = {};
  2244. // eslint-disable-next-line es/no-symbol -- safe
  2245. var symbol = Symbol();
  2246. var alphabet = 'abcdefghijklmnopqrst';
  2247. A[symbol] = 7;
  2248. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  2249. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  2250. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  2251. var T = toObject$2(target);
  2252. var argumentsLength = arguments.length;
  2253. var index = 1;
  2254. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  2255. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  2256. while (argumentsLength > index) {
  2257. var S = IndexedObject$1(arguments[index++]);
  2258. var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  2259. var length = keys.length;
  2260. var j = 0;
  2261. var key;
  2262. while (length > j) {
  2263. key = keys[j++];
  2264. if (!DESCRIPTORS$1 || call$9(propertyIsEnumerable, S, key)) T[key] = S[key];
  2265. }
  2266. } return T;
  2267. } : $assign;
  2268. var $$9 = _export;
  2269. var assign = objectAssign;
  2270. // `Object.assign` method
  2271. // https://tc39.es/ecma262/#sec-object.assign
  2272. // eslint-disable-next-line es/no-object-assign -- required for testing
  2273. $$9({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  2274. assign: assign
  2275. });
  2276. var $$8 = _export;
  2277. var $find = arrayIteration.find;
  2278. var addToUnscopables = addToUnscopables$2;
  2279. var FIND = 'find';
  2280. var SKIPS_HOLES = true;
  2281. // Shouldn't skip holes
  2282. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  2283. // `Array.prototype.find` method
  2284. // https://tc39.es/ecma262/#sec-array.prototype.find
  2285. $$8({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  2286. find: function find(callbackfn /* , that = undefined */) {
  2287. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  2288. }
  2289. });
  2290. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  2291. addToUnscopables(FIND);
  2292. var classof$1 = classofRaw$2;
  2293. var global$8 = global$n;
  2294. var engineIsNode = classof$1(global$8.process) == 'process';
  2295. var isCallable$5 = isCallable$j;
  2296. var $String = String;
  2297. var $TypeError$6 = TypeError;
  2298. var aPossiblePrototype$1 = function (argument) {
  2299. if (typeof argument == 'object' || isCallable$5(argument)) return argument;
  2300. throw $TypeError$6("Can't set " + $String(argument) + ' as a prototype');
  2301. };
  2302. /* eslint-disable no-proto -- safe */
  2303. var uncurryThis$5 = functionUncurryThis;
  2304. var anObject$6 = anObject$g;
  2305. var aPossiblePrototype = aPossiblePrototype$1;
  2306. // `Object.setPrototypeOf` method
  2307. // https://tc39.es/ecma262/#sec-object.setprototypeof
  2308. // Works with __proto__ only. Old v8 can't work with null proto objects.
  2309. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  2310. var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  2311. var CORRECT_SETTER = false;
  2312. var test = {};
  2313. var setter;
  2314. try {
  2315. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  2316. setter = uncurryThis$5(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
  2317. setter(test, []);
  2318. CORRECT_SETTER = test instanceof Array;
  2319. } catch (error) { /* empty */ }
  2320. return function setPrototypeOf(O, proto) {
  2321. anObject$6(O);
  2322. aPossiblePrototype(proto);
  2323. if (CORRECT_SETTER) setter(O, proto);
  2324. else O.__proto__ = proto;
  2325. return O;
  2326. };
  2327. }() : undefined);
  2328. var defineProperty = objectDefineProperty.f;
  2329. var hasOwn$1 = hasOwnProperty_1;
  2330. var wellKnownSymbol$6 = wellKnownSymbol$i;
  2331. var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
  2332. var setToStringTag$1 = function (target, TAG, STATIC) {
  2333. if (target && !STATIC) target = target.prototype;
  2334. if (target && !hasOwn$1(target, TO_STRING_TAG)) {
  2335. defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
  2336. }
  2337. };
  2338. var getBuiltIn$2 = getBuiltIn$8;
  2339. var definePropertyModule = objectDefineProperty;
  2340. var wellKnownSymbol$5 = wellKnownSymbol$i;
  2341. var DESCRIPTORS = descriptors;
  2342. var SPECIES$1 = wellKnownSymbol$5('species');
  2343. var setSpecies$1 = function (CONSTRUCTOR_NAME) {
  2344. var Constructor = getBuiltIn$2(CONSTRUCTOR_NAME);
  2345. var defineProperty = definePropertyModule.f;
  2346. if (DESCRIPTORS && Constructor && !Constructor[SPECIES$1]) {
  2347. defineProperty(Constructor, SPECIES$1, {
  2348. configurable: true,
  2349. get: function () { return this; }
  2350. });
  2351. }
  2352. };
  2353. var isPrototypeOf$1 = objectIsPrototypeOf;
  2354. var $TypeError$5 = TypeError;
  2355. var anInstance$1 = function (it, Prototype) {
  2356. if (isPrototypeOf$1(Prototype, it)) return it;
  2357. throw $TypeError$5('Incorrect invocation');
  2358. };
  2359. var uncurryThis$4 = functionUncurryThis;
  2360. var arraySlice$2 = uncurryThis$4([].slice);
  2361. var $TypeError$4 = TypeError;
  2362. var validateArgumentsLength$1 = function (passed, required) {
  2363. if (passed < required) throw $TypeError$4('Not enough arguments');
  2364. return passed;
  2365. };
  2366. var userAgent$4 = engineUserAgent;
  2367. var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
  2368. var global$7 = global$n;
  2369. var apply$1 = functionApply;
  2370. var bind$3 = functionBindContext;
  2371. var isCallable$4 = isCallable$j;
  2372. var hasOwn = hasOwnProperty_1;
  2373. var fails$2 = fails$q;
  2374. var html = html$2;
  2375. var arraySlice$1 = arraySlice$2;
  2376. var createElement = documentCreateElement$2;
  2377. var validateArgumentsLength = validateArgumentsLength$1;
  2378. var IS_IOS$1 = engineIsIos;
  2379. var IS_NODE$3 = engineIsNode;
  2380. var set = global$7.setImmediate;
  2381. var clear = global$7.clearImmediate;
  2382. var process$2 = global$7.process;
  2383. var Dispatch = global$7.Dispatch;
  2384. var Function$1 = global$7.Function;
  2385. var MessageChannel = global$7.MessageChannel;
  2386. var String$1 = global$7.String;
  2387. var counter = 0;
  2388. var queue$1 = {};
  2389. var ONREADYSTATECHANGE = 'onreadystatechange';
  2390. var $location, defer, channel, port;
  2391. try {
  2392. // Deno throws a ReferenceError on `location` access without `--location` flag
  2393. $location = global$7.location;
  2394. } catch (error) { /* empty */ }
  2395. var run = function (id) {
  2396. if (hasOwn(queue$1, id)) {
  2397. var fn = queue$1[id];
  2398. delete queue$1[id];
  2399. fn();
  2400. }
  2401. };
  2402. var runner = function (id) {
  2403. return function () {
  2404. run(id);
  2405. };
  2406. };
  2407. var listener = function (event) {
  2408. run(event.data);
  2409. };
  2410. var post = function (id) {
  2411. // old engines have not location.origin
  2412. global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
  2413. };
  2414. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  2415. if (!set || !clear) {
  2416. set = function setImmediate(handler) {
  2417. validateArgumentsLength(arguments.length, 1);
  2418. var fn = isCallable$4(handler) ? handler : Function$1(handler);
  2419. var args = arraySlice$1(arguments, 1);
  2420. queue$1[++counter] = function () {
  2421. apply$1(fn, undefined, args);
  2422. };
  2423. defer(counter);
  2424. return counter;
  2425. };
  2426. clear = function clearImmediate(id) {
  2427. delete queue$1[id];
  2428. };
  2429. // Node.js 0.8-
  2430. if (IS_NODE$3) {
  2431. defer = function (id) {
  2432. process$2.nextTick(runner(id));
  2433. };
  2434. // Sphere (JS game engine) Dispatch API
  2435. } else if (Dispatch && Dispatch.now) {
  2436. defer = function (id) {
  2437. Dispatch.now(runner(id));
  2438. };
  2439. // Browsers with MessageChannel, includes WebWorkers
  2440. // except iOS - https://github.com/zloirock/core-js/issues/624
  2441. } else if (MessageChannel && !IS_IOS$1) {
  2442. channel = new MessageChannel();
  2443. port = channel.port2;
  2444. channel.port1.onmessage = listener;
  2445. defer = bind$3(port.postMessage, port);
  2446. // Browsers with postMessage, skip WebWorkers
  2447. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  2448. } else if (
  2449. global$7.addEventListener &&
  2450. isCallable$4(global$7.postMessage) &&
  2451. !global$7.importScripts &&
  2452. $location && $location.protocol !== 'file:' &&
  2453. !fails$2(post)
  2454. ) {
  2455. defer = post;
  2456. global$7.addEventListener('message', listener, false);
  2457. // IE8-
  2458. } else if (ONREADYSTATECHANGE in createElement('script')) {
  2459. defer = function (id) {
  2460. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  2461. html.removeChild(this);
  2462. run(id);
  2463. };
  2464. };
  2465. // Rest old browsers
  2466. } else {
  2467. defer = function (id) {
  2468. setTimeout(runner(id), 0);
  2469. };
  2470. }
  2471. }
  2472. var task$1 = {
  2473. set: set,
  2474. clear: clear
  2475. };
  2476. var userAgent$3 = engineUserAgent;
  2477. var global$6 = global$n;
  2478. var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && global$6.Pebble !== undefined;
  2479. var userAgent$2 = engineUserAgent;
  2480. var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
  2481. var global$5 = global$n;
  2482. var bind$2 = functionBindContext;
  2483. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  2484. var macrotask = task$1.set;
  2485. var IS_IOS = engineIsIos;
  2486. var IS_IOS_PEBBLE = engineIsIosPebble;
  2487. var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
  2488. var IS_NODE$2 = engineIsNode;
  2489. var MutationObserver = global$5.MutationObserver || global$5.WebKitMutationObserver;
  2490. var document$2 = global$5.document;
  2491. var process$1 = global$5.process;
  2492. var Promise$1 = global$5.Promise;
  2493. // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
  2494. var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$5, 'queueMicrotask');
  2495. var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
  2496. var flush, head, last, notify$1, toggle, node, promise, then;
  2497. // modern engines have queueMicrotask method
  2498. if (!queueMicrotask) {
  2499. flush = function () {
  2500. var parent, fn;
  2501. if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
  2502. while (head) {
  2503. fn = head.fn;
  2504. head = head.next;
  2505. try {
  2506. fn();
  2507. } catch (error) {
  2508. if (head) notify$1();
  2509. else last = undefined;
  2510. throw error;
  2511. }
  2512. } last = undefined;
  2513. if (parent) parent.enter();
  2514. };
  2515. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  2516. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  2517. if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
  2518. toggle = true;
  2519. node = document$2.createTextNode('');
  2520. new MutationObserver(flush).observe(node, { characterData: true });
  2521. notify$1 = function () {
  2522. node.data = toggle = !toggle;
  2523. };
  2524. // environments with maybe non-completely correct, but existent Promise
  2525. } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
  2526. // Promise.resolve without an argument throws an error in LG WebOS 2
  2527. promise = Promise$1.resolve(undefined);
  2528. // workaround of WebKit ~ iOS Safari 10.1 bug
  2529. promise.constructor = Promise$1;
  2530. then = bind$2(promise.then, promise);
  2531. notify$1 = function () {
  2532. then(flush);
  2533. };
  2534. // Node.js without promises
  2535. } else if (IS_NODE$2) {
  2536. notify$1 = function () {
  2537. process$1.nextTick(flush);
  2538. };
  2539. // for other environments - macrotask based on:
  2540. // - setImmediate
  2541. // - MessageChannel
  2542. // - window.postMessage
  2543. // - onreadystatechange
  2544. // - setTimeout
  2545. } else {
  2546. // strange IE + webpack dev server bug - use .bind(global)
  2547. macrotask = bind$2(macrotask, global$5);
  2548. notify$1 = function () {
  2549. macrotask(flush);
  2550. };
  2551. }
  2552. }
  2553. var microtask$1 = queueMicrotask || function (fn) {
  2554. var task = { fn: fn, next: undefined };
  2555. if (last) last.next = task;
  2556. if (!head) {
  2557. head = task;
  2558. notify$1();
  2559. } last = task;
  2560. };
  2561. var global$4 = global$n;
  2562. var hostReportErrors$1 = function (a, b) {
  2563. var console = global$4.console;
  2564. if (console && console.error) {
  2565. arguments.length == 1 ? console.error(a) : console.error(a, b);
  2566. }
  2567. };
  2568. var perform$3 = function (exec) {
  2569. try {
  2570. return { error: false, value: exec() };
  2571. } catch (error) {
  2572. return { error: true, value: error };
  2573. }
  2574. };
  2575. var Queue$1 = function () {
  2576. this.head = null;
  2577. this.tail = null;
  2578. };
  2579. Queue$1.prototype = {
  2580. add: function (item) {
  2581. var entry = { item: item, next: null };
  2582. if (this.head) this.tail.next = entry;
  2583. else this.head = entry;
  2584. this.tail = entry;
  2585. },
  2586. get: function () {
  2587. var entry = this.head;
  2588. if (entry) {
  2589. this.head = entry.next;
  2590. if (this.tail === entry) this.tail = null;
  2591. return entry.item;
  2592. }
  2593. }
  2594. };
  2595. var queue = Queue$1;
  2596. var global$3 = global$n;
  2597. var promiseNativeConstructor = global$3.Promise;
  2598. /* global Deno -- Deno case */
  2599. var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
  2600. var IS_DENO$1 = engineIsDeno;
  2601. var IS_NODE$1 = engineIsNode;
  2602. var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
  2603. && typeof window == 'object'
  2604. && typeof document == 'object';
  2605. var global$2 = global$n;
  2606. var NativePromiseConstructor$3 = promiseNativeConstructor;
  2607. var isCallable$3 = isCallable$j;
  2608. var isForced = isForced_1;
  2609. var inspectSource = inspectSource$3;
  2610. var wellKnownSymbol$4 = wellKnownSymbol$i;
  2611. var IS_BROWSER = engineIsBrowser;
  2612. var IS_DENO = engineIsDeno;
  2613. var V8_VERSION = engineV8Version;
  2614. NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
  2615. var SPECIES = wellKnownSymbol$4('species');
  2616. var SUBCLASSING = false;
  2617. var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$2.PromiseRejectionEvent);
  2618. var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
  2619. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
  2620. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
  2621. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  2622. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  2623. // We can't detect it synchronously, so just check versions
  2624. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  2625. // We can't use @@species feature detection in V8 since it causes
  2626. // deoptimization and performance degradation
  2627. // https://github.com/zloirock/core-js/issues/679
  2628. if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
  2629. // Detect correctness of subclassing with @@species support
  2630. var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
  2631. var FakePromise = function (exec) {
  2632. exec(function () { /* empty */ }, function () { /* empty */ });
  2633. };
  2634. var constructor = promise.constructor = {};
  2635. constructor[SPECIES] = FakePromise;
  2636. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  2637. if (!SUBCLASSING) return true;
  2638. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  2639. } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
  2640. });
  2641. var promiseConstructorDetection = {
  2642. CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
  2643. REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
  2644. SUBCLASSING: SUBCLASSING
  2645. };
  2646. var newPromiseCapability$2 = {};
  2647. var aCallable$5 = aCallable$8;
  2648. var $TypeError$3 = TypeError;
  2649. var PromiseCapability = function (C) {
  2650. var resolve, reject;
  2651. this.promise = new C(function ($$resolve, $$reject) {
  2652. if (resolve !== undefined || reject !== undefined) throw $TypeError$3('Bad Promise constructor');
  2653. resolve = $$resolve;
  2654. reject = $$reject;
  2655. });
  2656. this.resolve = aCallable$5(resolve);
  2657. this.reject = aCallable$5(reject);
  2658. };
  2659. // `NewPromiseCapability` abstract operation
  2660. // https://tc39.es/ecma262/#sec-newpromisecapability
  2661. newPromiseCapability$2.f = function (C) {
  2662. return new PromiseCapability(C);
  2663. };
  2664. var $$7 = _export;
  2665. var IS_NODE = engineIsNode;
  2666. var global$1 = global$n;
  2667. var call$8 = functionCall;
  2668. var defineBuiltIn$1 = defineBuiltIn$6;
  2669. var setPrototypeOf = objectSetPrototypeOf;
  2670. var setToStringTag = setToStringTag$1;
  2671. var setSpecies = setSpecies$1;
  2672. var aCallable$4 = aCallable$8;
  2673. var isCallable$2 = isCallable$j;
  2674. var isObject$1 = isObject$a;
  2675. var anInstance = anInstance$1;
  2676. var speciesConstructor = speciesConstructor$2;
  2677. var task = task$1.set;
  2678. var microtask = microtask$1;
  2679. var hostReportErrors = hostReportErrors$1;
  2680. var perform$2 = perform$3;
  2681. var Queue = queue;
  2682. var InternalStateModule = internalState;
  2683. var NativePromiseConstructor$2 = promiseNativeConstructor;
  2684. var PromiseConstructorDetection = promiseConstructorDetection;
  2685. var newPromiseCapabilityModule$3 = newPromiseCapability$2;
  2686. var PROMISE = 'Promise';
  2687. var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
  2688. var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
  2689. var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
  2690. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  2691. var setInternalState = InternalStateModule.set;
  2692. var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
  2693. var PromiseConstructor = NativePromiseConstructor$2;
  2694. var PromisePrototype = NativePromisePrototype$1;
  2695. var TypeError$1 = global$1.TypeError;
  2696. var document$1 = global$1.document;
  2697. var process = global$1.process;
  2698. var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
  2699. var newGenericPromiseCapability = newPromiseCapability$1;
  2700. var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
  2701. var UNHANDLED_REJECTION = 'unhandledrejection';
  2702. var REJECTION_HANDLED = 'rejectionhandled';
  2703. var PENDING = 0;
  2704. var FULFILLED = 1;
  2705. var REJECTED = 2;
  2706. var HANDLED = 1;
  2707. var UNHANDLED = 2;
  2708. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  2709. // helpers
  2710. var isThenable = function (it) {
  2711. var then;
  2712. return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
  2713. };
  2714. var callReaction = function (reaction, state) {
  2715. var value = state.value;
  2716. var ok = state.state == FULFILLED;
  2717. var handler = ok ? reaction.ok : reaction.fail;
  2718. var resolve = reaction.resolve;
  2719. var reject = reaction.reject;
  2720. var domain = reaction.domain;
  2721. var result, then, exited;
  2722. try {
  2723. if (handler) {
  2724. if (!ok) {
  2725. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  2726. state.rejection = HANDLED;
  2727. }
  2728. if (handler === true) result = value;
  2729. else {
  2730. if (domain) domain.enter();
  2731. result = handler(value); // can throw
  2732. if (domain) {
  2733. domain.exit();
  2734. exited = true;
  2735. }
  2736. }
  2737. if (result === reaction.promise) {
  2738. reject(TypeError$1('Promise-chain cycle'));
  2739. } else if (then = isThenable(result)) {
  2740. call$8(then, result, resolve, reject);
  2741. } else resolve(result);
  2742. } else reject(value);
  2743. } catch (error) {
  2744. if (domain && !exited) domain.exit();
  2745. reject(error);
  2746. }
  2747. };
  2748. var notify = function (state, isReject) {
  2749. if (state.notified) return;
  2750. state.notified = true;
  2751. microtask(function () {
  2752. var reactions = state.reactions;
  2753. var reaction;
  2754. while (reaction = reactions.get()) {
  2755. callReaction(reaction, state);
  2756. }
  2757. state.notified = false;
  2758. if (isReject && !state.rejection) onUnhandled(state);
  2759. });
  2760. };
  2761. var dispatchEvent = function (name, promise, reason) {
  2762. var event, handler;
  2763. if (DISPATCH_EVENT) {
  2764. event = document$1.createEvent('Event');
  2765. event.promise = promise;
  2766. event.reason = reason;
  2767. event.initEvent(name, false, true);
  2768. global$1.dispatchEvent(event);
  2769. } else event = { promise: promise, reason: reason };
  2770. if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
  2771. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  2772. };
  2773. var onUnhandled = function (state) {
  2774. call$8(task, global$1, function () {
  2775. var promise = state.facade;
  2776. var value = state.value;
  2777. var IS_UNHANDLED = isUnhandled(state);
  2778. var result;
  2779. if (IS_UNHANDLED) {
  2780. result = perform$2(function () {
  2781. if (IS_NODE) {
  2782. process.emit('unhandledRejection', value, promise);
  2783. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  2784. });
  2785. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  2786. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  2787. if (result.error) throw result.value;
  2788. }
  2789. });
  2790. };
  2791. var isUnhandled = function (state) {
  2792. return state.rejection !== HANDLED && !state.parent;
  2793. };
  2794. var onHandleUnhandled = function (state) {
  2795. call$8(task, global$1, function () {
  2796. var promise = state.facade;
  2797. if (IS_NODE) {
  2798. process.emit('rejectionHandled', promise);
  2799. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  2800. });
  2801. };
  2802. var bind$1 = function (fn, state, unwrap) {
  2803. return function (value) {
  2804. fn(state, value, unwrap);
  2805. };
  2806. };
  2807. var internalReject = function (state, value, unwrap) {
  2808. if (state.done) return;
  2809. state.done = true;
  2810. if (unwrap) state = unwrap;
  2811. state.value = value;
  2812. state.state = REJECTED;
  2813. notify(state, true);
  2814. };
  2815. var internalResolve = function (state, value, unwrap) {
  2816. if (state.done) return;
  2817. state.done = true;
  2818. if (unwrap) state = unwrap;
  2819. try {
  2820. if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
  2821. var then = isThenable(value);
  2822. if (then) {
  2823. microtask(function () {
  2824. var wrapper = { done: false };
  2825. try {
  2826. call$8(then, value,
  2827. bind$1(internalResolve, wrapper, state),
  2828. bind$1(internalReject, wrapper, state)
  2829. );
  2830. } catch (error) {
  2831. internalReject(wrapper, error, state);
  2832. }
  2833. });
  2834. } else {
  2835. state.value = value;
  2836. state.state = FULFILLED;
  2837. notify(state, false);
  2838. }
  2839. } catch (error) {
  2840. internalReject({ done: false }, error, state);
  2841. }
  2842. };
  2843. // constructor polyfill
  2844. if (FORCED_PROMISE_CONSTRUCTOR$4) {
  2845. // 25.4.3.1 Promise(executor)
  2846. PromiseConstructor = function Promise(executor) {
  2847. anInstance(this, PromisePrototype);
  2848. aCallable$4(executor);
  2849. call$8(Internal, this);
  2850. var state = getInternalPromiseState(this);
  2851. try {
  2852. executor(bind$1(internalResolve, state), bind$1(internalReject, state));
  2853. } catch (error) {
  2854. internalReject(state, error);
  2855. }
  2856. };
  2857. PromisePrototype = PromiseConstructor.prototype;
  2858. // eslint-disable-next-line no-unused-vars -- required for `.length`
  2859. Internal = function Promise(executor) {
  2860. setInternalState(this, {
  2861. type: PROMISE,
  2862. done: false,
  2863. notified: false,
  2864. parent: false,
  2865. reactions: new Queue(),
  2866. rejection: false,
  2867. state: PENDING,
  2868. value: undefined
  2869. });
  2870. };
  2871. // `Promise.prototype.then` method
  2872. // https://tc39.es/ecma262/#sec-promise.prototype.then
  2873. Internal.prototype = defineBuiltIn$1(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
  2874. var state = getInternalPromiseState(this);
  2875. var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
  2876. state.parent = true;
  2877. reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
  2878. reaction.fail = isCallable$2(onRejected) && onRejected;
  2879. reaction.domain = IS_NODE ? process.domain : undefined;
  2880. if (state.state == PENDING) state.reactions.add(reaction);
  2881. else microtask(function () {
  2882. callReaction(reaction, state);
  2883. });
  2884. return reaction.promise;
  2885. });
  2886. OwnPromiseCapability = function () {
  2887. var promise = new Internal();
  2888. var state = getInternalPromiseState(promise);
  2889. this.promise = promise;
  2890. this.resolve = bind$1(internalResolve, state);
  2891. this.reject = bind$1(internalReject, state);
  2892. };
  2893. newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
  2894. return C === PromiseConstructor || C === PromiseWrapper
  2895. ? new OwnPromiseCapability(C)
  2896. : newGenericPromiseCapability(C);
  2897. };
  2898. if (isCallable$2(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
  2899. nativeThen = NativePromisePrototype$1.then;
  2900. if (!NATIVE_PROMISE_SUBCLASSING) {
  2901. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  2902. defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
  2903. var that = this;
  2904. return new PromiseConstructor(function (resolve, reject) {
  2905. call$8(nativeThen, that, resolve, reject);
  2906. }).then(onFulfilled, onRejected);
  2907. // https://github.com/zloirock/core-js/issues/640
  2908. }, { unsafe: true });
  2909. }
  2910. // make `.constructor === Promise` work for native promise-based APIs
  2911. try {
  2912. delete NativePromisePrototype$1.constructor;
  2913. } catch (error) { /* empty */ }
  2914. // make `instanceof Promise` work for native promise-based APIs
  2915. if (setPrototypeOf) {
  2916. setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
  2917. }
  2918. }
  2919. }
  2920. $$7({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
  2921. Promise: PromiseConstructor
  2922. });
  2923. setToStringTag(PromiseConstructor, PROMISE, false);
  2924. setSpecies(PROMISE);
  2925. var iterators = {};
  2926. var wellKnownSymbol$3 = wellKnownSymbol$i;
  2927. var Iterators$1 = iterators;
  2928. var ITERATOR$2 = wellKnownSymbol$3('iterator');
  2929. var ArrayPrototype = Array.prototype;
  2930. // check on default Array iterator
  2931. var isArrayIteratorMethod$1 = function (it) {
  2932. return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
  2933. };
  2934. var classof = classof$7;
  2935. var getMethod$3 = getMethod$6;
  2936. var isNullOrUndefined$2 = isNullOrUndefined$7;
  2937. var Iterators = iterators;
  2938. var wellKnownSymbol$2 = wellKnownSymbol$i;
  2939. var ITERATOR$1 = wellKnownSymbol$2('iterator');
  2940. var getIteratorMethod$2 = function (it) {
  2941. if (!isNullOrUndefined$2(it)) return getMethod$3(it, ITERATOR$1)
  2942. || getMethod$3(it, '@@iterator')
  2943. || Iterators[classof(it)];
  2944. };
  2945. var call$7 = functionCall;
  2946. var aCallable$3 = aCallable$8;
  2947. var anObject$5 = anObject$g;
  2948. var tryToString$2 = tryToString$5;
  2949. var getIteratorMethod$1 = getIteratorMethod$2;
  2950. var $TypeError$2 = TypeError;
  2951. var getIterator$1 = function (argument, usingIterator) {
  2952. var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
  2953. if (aCallable$3(iteratorMethod)) return anObject$5(call$7(iteratorMethod, argument));
  2954. throw $TypeError$2(tryToString$2(argument) + ' is not iterable');
  2955. };
  2956. var call$6 = functionCall;
  2957. var anObject$4 = anObject$g;
  2958. var getMethod$2 = getMethod$6;
  2959. var iteratorClose$1 = function (iterator, kind, value) {
  2960. var innerResult, innerError;
  2961. anObject$4(iterator);
  2962. try {
  2963. innerResult = getMethod$2(iterator, 'return');
  2964. if (!innerResult) {
  2965. if (kind === 'throw') throw value;
  2966. return value;
  2967. }
  2968. innerResult = call$6(innerResult, iterator);
  2969. } catch (error) {
  2970. innerError = true;
  2971. innerResult = error;
  2972. }
  2973. if (kind === 'throw') throw value;
  2974. if (innerError) throw innerResult;
  2975. anObject$4(innerResult);
  2976. return value;
  2977. };
  2978. var bind = functionBindContext;
  2979. var call$5 = functionCall;
  2980. var anObject$3 = anObject$g;
  2981. var tryToString$1 = tryToString$5;
  2982. var isArrayIteratorMethod = isArrayIteratorMethod$1;
  2983. var lengthOfArrayLike$1 = lengthOfArrayLike$6;
  2984. var isPrototypeOf = objectIsPrototypeOf;
  2985. var getIterator = getIterator$1;
  2986. var getIteratorMethod = getIteratorMethod$2;
  2987. var iteratorClose = iteratorClose$1;
  2988. var $TypeError$1 = TypeError;
  2989. var Result = function (stopped, result) {
  2990. this.stopped = stopped;
  2991. this.result = result;
  2992. };
  2993. var ResultPrototype = Result.prototype;
  2994. var iterate$2 = function (iterable, unboundFunction, options) {
  2995. var that = options && options.that;
  2996. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  2997. var IS_RECORD = !!(options && options.IS_RECORD);
  2998. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  2999. var INTERRUPTED = !!(options && options.INTERRUPTED);
  3000. var fn = bind(unboundFunction, that);
  3001. var iterator, iterFn, index, length, result, next, step;
  3002. var stop = function (condition) {
  3003. if (iterator) iteratorClose(iterator, 'normal', condition);
  3004. return new Result(true, condition);
  3005. };
  3006. var callFn = function (value) {
  3007. if (AS_ENTRIES) {
  3008. anObject$3(value);
  3009. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  3010. } return INTERRUPTED ? fn(value, stop) : fn(value);
  3011. };
  3012. if (IS_RECORD) {
  3013. iterator = iterable.iterator;
  3014. } else if (IS_ITERATOR) {
  3015. iterator = iterable;
  3016. } else {
  3017. iterFn = getIteratorMethod(iterable);
  3018. if (!iterFn) throw $TypeError$1(tryToString$1(iterable) + ' is not iterable');
  3019. // optimisation for array iterators
  3020. if (isArrayIteratorMethod(iterFn)) {
  3021. for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
  3022. result = callFn(iterable[index]);
  3023. if (result && isPrototypeOf(ResultPrototype, result)) return result;
  3024. } return new Result(false);
  3025. }
  3026. iterator = getIterator(iterable, iterFn);
  3027. }
  3028. next = IS_RECORD ? iterable.next : iterator.next;
  3029. while (!(step = call$5(next, iterator)).done) {
  3030. try {
  3031. result = callFn(step.value);
  3032. } catch (error) {
  3033. iteratorClose(iterator, 'throw', error);
  3034. }
  3035. if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
  3036. } return new Result(false);
  3037. };
  3038. var wellKnownSymbol$1 = wellKnownSymbol$i;
  3039. var ITERATOR = wellKnownSymbol$1('iterator');
  3040. var SAFE_CLOSING = false;
  3041. try {
  3042. var called = 0;
  3043. var iteratorWithReturn = {
  3044. next: function () {
  3045. return { done: !!called++ };
  3046. },
  3047. 'return': function () {
  3048. SAFE_CLOSING = true;
  3049. }
  3050. };
  3051. iteratorWithReturn[ITERATOR] = function () {
  3052. return this;
  3053. };
  3054. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  3055. Array.from(iteratorWithReturn, function () { throw 2; });
  3056. } catch (error) { /* empty */ }
  3057. var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
  3058. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  3059. var ITERATION_SUPPORT = false;
  3060. try {
  3061. var object = {};
  3062. object[ITERATOR] = function () {
  3063. return {
  3064. next: function () {
  3065. return { done: ITERATION_SUPPORT = true };
  3066. }
  3067. };
  3068. };
  3069. exec(object);
  3070. } catch (error) { /* empty */ }
  3071. return ITERATION_SUPPORT;
  3072. };
  3073. var NativePromiseConstructor$1 = promiseNativeConstructor;
  3074. var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
  3075. var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
  3076. var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
  3077. NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
  3078. });
  3079. var $$6 = _export;
  3080. var call$4 = functionCall;
  3081. var aCallable$2 = aCallable$8;
  3082. var newPromiseCapabilityModule$2 = newPromiseCapability$2;
  3083. var perform$1 = perform$3;
  3084. var iterate$1 = iterate$2;
  3085. var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
  3086. // `Promise.all` method
  3087. // https://tc39.es/ecma262/#sec-promise.all
  3088. $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
  3089. all: function all(iterable) {
  3090. var C = this;
  3091. var capability = newPromiseCapabilityModule$2.f(C);
  3092. var resolve = capability.resolve;
  3093. var reject = capability.reject;
  3094. var result = perform$1(function () {
  3095. var $promiseResolve = aCallable$2(C.resolve);
  3096. var values = [];
  3097. var counter = 0;
  3098. var remaining = 1;
  3099. iterate$1(iterable, function (promise) {
  3100. var index = counter++;
  3101. var alreadyCalled = false;
  3102. remaining++;
  3103. call$4($promiseResolve, C, promise).then(function (value) {
  3104. if (alreadyCalled) return;
  3105. alreadyCalled = true;
  3106. values[index] = value;
  3107. --remaining || resolve(values);
  3108. }, reject);
  3109. });
  3110. --remaining || resolve(values);
  3111. });
  3112. if (result.error) reject(result.value);
  3113. return capability.promise;
  3114. }
  3115. });
  3116. var $$5 = _export;
  3117. var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
  3118. var NativePromiseConstructor = promiseNativeConstructor;
  3119. var getBuiltIn$1 = getBuiltIn$8;
  3120. var isCallable$1 = isCallable$j;
  3121. var defineBuiltIn = defineBuiltIn$6;
  3122. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  3123. // `Promise.prototype.catch` method
  3124. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  3125. $$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
  3126. 'catch': function (onRejected) {
  3127. return this.then(undefined, onRejected);
  3128. }
  3129. });
  3130. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  3131. if (isCallable$1(NativePromiseConstructor)) {
  3132. var method = getBuiltIn$1('Promise').prototype['catch'];
  3133. if (NativePromisePrototype['catch'] !== method) {
  3134. defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
  3135. }
  3136. }
  3137. var $$4 = _export;
  3138. var call$3 = functionCall;
  3139. var aCallable$1 = aCallable$8;
  3140. var newPromiseCapabilityModule$1 = newPromiseCapability$2;
  3141. var perform = perform$3;
  3142. var iterate = iterate$2;
  3143. var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
  3144. // `Promise.race` method
  3145. // https://tc39.es/ecma262/#sec-promise.race
  3146. $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  3147. race: function race(iterable) {
  3148. var C = this;
  3149. var capability = newPromiseCapabilityModule$1.f(C);
  3150. var reject = capability.reject;
  3151. var result = perform(function () {
  3152. var $promiseResolve = aCallable$1(C.resolve);
  3153. iterate(iterable, function (promise) {
  3154. call$3($promiseResolve, C, promise).then(capability.resolve, reject);
  3155. });
  3156. });
  3157. if (result.error) reject(result.value);
  3158. return capability.promise;
  3159. }
  3160. });
  3161. var $$3 = _export;
  3162. var call$2 = functionCall;
  3163. var newPromiseCapabilityModule = newPromiseCapability$2;
  3164. var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
  3165. // `Promise.reject` method
  3166. // https://tc39.es/ecma262/#sec-promise.reject
  3167. $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
  3168. reject: function reject(r) {
  3169. var capability = newPromiseCapabilityModule.f(this);
  3170. call$2(capability.reject, undefined, r);
  3171. return capability.promise;
  3172. }
  3173. });
  3174. var anObject$2 = anObject$g;
  3175. var isObject = isObject$a;
  3176. var newPromiseCapability = newPromiseCapability$2;
  3177. var promiseResolve$1 = function (C, x) {
  3178. anObject$2(C);
  3179. if (isObject(x) && x.constructor === C) return x;
  3180. var promiseCapability = newPromiseCapability.f(C);
  3181. var resolve = promiseCapability.resolve;
  3182. resolve(x);
  3183. return promiseCapability.promise;
  3184. };
  3185. var $$2 = _export;
  3186. var getBuiltIn = getBuiltIn$8;
  3187. var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
  3188. var promiseResolve = promiseResolve$1;
  3189. getBuiltIn('Promise');
  3190. // `Promise.resolve` method
  3191. // https://tc39.es/ecma262/#sec-promise.resolve
  3192. $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  3193. resolve: function resolve(x) {
  3194. return promiseResolve(this, x);
  3195. }
  3196. });
  3197. var tryToString = tryToString$5;
  3198. var $TypeError = TypeError;
  3199. var deletePropertyOrThrow$1 = function (O, P) {
  3200. if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  3201. };
  3202. var arraySlice = arraySliceSimple;
  3203. var floor$1 = Math.floor;
  3204. var mergeSort = function (array, comparefn) {
  3205. var length = array.length;
  3206. var middle = floor$1(length / 2);
  3207. return length < 8 ? insertionSort(array, comparefn) : merge(
  3208. array,
  3209. mergeSort(arraySlice(array, 0, middle), comparefn),
  3210. mergeSort(arraySlice(array, middle), comparefn),
  3211. comparefn
  3212. );
  3213. };
  3214. var insertionSort = function (array, comparefn) {
  3215. var length = array.length;
  3216. var i = 1;
  3217. var element, j;
  3218. while (i < length) {
  3219. j = i;
  3220. element = array[i];
  3221. while (j && comparefn(array[j - 1], element) > 0) {
  3222. array[j] = array[--j];
  3223. }
  3224. if (j !== i++) array[j] = element;
  3225. } return array;
  3226. };
  3227. var merge = function (array, left, right, comparefn) {
  3228. var llength = left.length;
  3229. var rlength = right.length;
  3230. var lindex = 0;
  3231. var rindex = 0;
  3232. while (lindex < llength || rindex < rlength) {
  3233. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  3234. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  3235. : lindex < llength ? left[lindex++] : right[rindex++];
  3236. } return array;
  3237. };
  3238. var arraySort = mergeSort;
  3239. var userAgent$1 = engineUserAgent;
  3240. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  3241. var engineFfVersion = !!firefox && +firefox[1];
  3242. var UA = engineUserAgent;
  3243. var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
  3244. var userAgent = engineUserAgent;
  3245. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  3246. var engineWebkitVersion = !!webkit && +webkit[1];
  3247. var $$1 = _export;
  3248. var uncurryThis$3 = functionUncurryThis;
  3249. var aCallable = aCallable$8;
  3250. var toObject$1 = toObject$7;
  3251. var lengthOfArrayLike = lengthOfArrayLike$6;
  3252. var deletePropertyOrThrow = deletePropertyOrThrow$1;
  3253. var toString$2 = toString$9;
  3254. var fails$1 = fails$q;
  3255. var internalSort = arraySort;
  3256. var arrayMethodIsStrict$1 = arrayMethodIsStrict$4;
  3257. var FF = engineFfVersion;
  3258. var IE_OR_EDGE = engineIsIeOrEdge;
  3259. var V8 = engineV8Version;
  3260. var WEBKIT = engineWebkitVersion;
  3261. var test = [];
  3262. var nativeSort = uncurryThis$3(test.sort);
  3263. var push$1 = uncurryThis$3(test.push);
  3264. // IE8-
  3265. var FAILS_ON_UNDEFINED = fails$1(function () {
  3266. test.sort(undefined);
  3267. });
  3268. // V8 bug
  3269. var FAILS_ON_NULL = fails$1(function () {
  3270. test.sort(null);
  3271. });
  3272. // Old WebKit
  3273. var STRICT_METHOD$1 = arrayMethodIsStrict$1('sort');
  3274. var STABLE_SORT = !fails$1(function () {
  3275. // feature detection can be too slow, so check engines versions
  3276. if (V8) return V8 < 70;
  3277. if (FF && FF > 3) return;
  3278. if (IE_OR_EDGE) return true;
  3279. if (WEBKIT) return WEBKIT < 603;
  3280. var result = '';
  3281. var code, chr, value, index;
  3282. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  3283. for (code = 65; code < 76; code++) {
  3284. chr = String.fromCharCode(code);
  3285. switch (code) {
  3286. case 66: case 69: case 70: case 72: value = 3; break;
  3287. case 68: case 71: value = 4; break;
  3288. default: value = 2;
  3289. }
  3290. for (index = 0; index < 47; index++) {
  3291. test.push({ k: chr + index, v: value });
  3292. }
  3293. }
  3294. test.sort(function (a, b) { return b.v - a.v; });
  3295. for (index = 0; index < test.length; index++) {
  3296. chr = test[index].k.charAt(0);
  3297. if (result.charAt(result.length - 1) !== chr) result += chr;
  3298. }
  3299. return result !== 'DGBEFHACIJK';
  3300. });
  3301. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT;
  3302. var getSortCompare = function (comparefn) {
  3303. return function (x, y) {
  3304. if (y === undefined) return -1;
  3305. if (x === undefined) return 1;
  3306. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  3307. return toString$2(x) > toString$2(y) ? 1 : -1;
  3308. };
  3309. };
  3310. // `Array.prototype.sort` method
  3311. // https://tc39.es/ecma262/#sec-array.prototype.sort
  3312. $$1({ target: 'Array', proto: true, forced: FORCED }, {
  3313. sort: function sort(comparefn) {
  3314. if (comparefn !== undefined) aCallable(comparefn);
  3315. var array = toObject$1(this);
  3316. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  3317. var items = [];
  3318. var arrayLength = lengthOfArrayLike(array);
  3319. var itemsLength, index;
  3320. for (index = 0; index < arrayLength; index++) {
  3321. if (index in array) push$1(items, array[index]);
  3322. }
  3323. internalSort(items, getSortCompare(comparefn));
  3324. itemsLength = lengthOfArrayLike(items);
  3325. index = 0;
  3326. while (index < itemsLength) array[index] = items[index++];
  3327. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  3328. return array;
  3329. }
  3330. });
  3331. var uncurryThis$2 = functionUncurryThis;
  3332. var toObject = toObject$7;
  3333. var floor = Math.floor;
  3334. var charAt = uncurryThis$2(''.charAt);
  3335. var replace = uncurryThis$2(''.replace);
  3336. var stringSlice$1 = uncurryThis$2(''.slice);
  3337. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  3338. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  3339. // `GetSubstitution` abstract operation
  3340. // https://tc39.es/ecma262/#sec-getsubstitution
  3341. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  3342. var tailPos = position + matched.length;
  3343. var m = captures.length;
  3344. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  3345. if (namedCaptures !== undefined) {
  3346. namedCaptures = toObject(namedCaptures);
  3347. symbols = SUBSTITUTION_SYMBOLS;
  3348. }
  3349. return replace(replacement, symbols, function (match, ch) {
  3350. var capture;
  3351. switch (charAt(ch, 0)) {
  3352. case '$': return '$';
  3353. case '&': return matched;
  3354. case '`': return stringSlice$1(str, 0, position);
  3355. case "'": return stringSlice$1(str, tailPos);
  3356. case '<':
  3357. capture = namedCaptures[stringSlice$1(ch, 1, -1)];
  3358. break;
  3359. default: // \d\d?
  3360. var n = +ch;
  3361. if (n === 0) return match;
  3362. if (n > m) {
  3363. var f = floor(n / 10);
  3364. if (f === 0) return match;
  3365. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  3366. return match;
  3367. }
  3368. capture = captures[n - 1];
  3369. }
  3370. return capture === undefined ? '' : capture;
  3371. });
  3372. };
  3373. var apply = functionApply;
  3374. var call$1 = functionCall;
  3375. var uncurryThis$1 = functionUncurryThis;
  3376. var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
  3377. var fails = fails$q;
  3378. var anObject$1 = anObject$g;
  3379. var isCallable = isCallable$j;
  3380. var isNullOrUndefined$1 = isNullOrUndefined$7;
  3381. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  3382. var toLength$1 = toLength$4;
  3383. var toString$1 = toString$9;
  3384. var requireObjectCoercible$1 = requireObjectCoercible$8;
  3385. var advanceStringIndex$1 = advanceStringIndex$3;
  3386. var getMethod$1 = getMethod$6;
  3387. var getSubstitution = getSubstitution$1;
  3388. var regExpExec$1 = regexpExecAbstract;
  3389. var wellKnownSymbol = wellKnownSymbol$i;
  3390. var REPLACE = wellKnownSymbol('replace');
  3391. var max = Math.max;
  3392. var min = Math.min;
  3393. var concat = uncurryThis$1([].concat);
  3394. var push = uncurryThis$1([].push);
  3395. var stringIndexOf = uncurryThis$1(''.indexOf);
  3396. var stringSlice = uncurryThis$1(''.slice);
  3397. var maybeToString = function (it) {
  3398. return it === undefined ? it : String(it);
  3399. };
  3400. // IE <= 11 replaces $0 with the whole match, as if it was $&
  3401. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  3402. var REPLACE_KEEPS_$0 = (function () {
  3403. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  3404. return 'a'.replace(/./, '$0') === '$0';
  3405. })();
  3406. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  3407. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  3408. if (/./[REPLACE]) {
  3409. return /./[REPLACE]('a', '$0') === '';
  3410. }
  3411. return false;
  3412. })();
  3413. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  3414. var re = /./;
  3415. re.exec = function () {
  3416. var result = [];
  3417. result.groups = { a: '7' };
  3418. return result;
  3419. };
  3420. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  3421. return ''.replace(re, '$<a>') !== '7';
  3422. });
  3423. // @@replace logic
  3424. fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCallNative) {
  3425. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  3426. return [
  3427. // `String.prototype.replace` method
  3428. // https://tc39.es/ecma262/#sec-string.prototype.replace
  3429. function replace(searchValue, replaceValue) {
  3430. var O = requireObjectCoercible$1(this);
  3431. var replacer = isNullOrUndefined$1(searchValue) ? undefined : getMethod$1(searchValue, REPLACE);
  3432. return replacer
  3433. ? call$1(replacer, searchValue, O, replaceValue)
  3434. : call$1(nativeReplace, toString$1(O), searchValue, replaceValue);
  3435. },
  3436. // `RegExp.prototype[@@replace]` method
  3437. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  3438. function (string, replaceValue) {
  3439. var rx = anObject$1(this);
  3440. var S = toString$1(string);
  3441. if (
  3442. typeof replaceValue == 'string' &&
  3443. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  3444. stringIndexOf(replaceValue, '$<') === -1
  3445. ) {
  3446. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  3447. if (res.done) return res.value;
  3448. }
  3449. var functionalReplace = isCallable(replaceValue);
  3450. if (!functionalReplace) replaceValue = toString$1(replaceValue);
  3451. var global = rx.global;
  3452. if (global) {
  3453. var fullUnicode = rx.unicode;
  3454. rx.lastIndex = 0;
  3455. }
  3456. var results = [];
  3457. while (true) {
  3458. var result = regExpExec$1(rx, S);
  3459. if (result === null) break;
  3460. push(results, result);
  3461. if (!global) break;
  3462. var matchStr = toString$1(result[0]);
  3463. if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode);
  3464. }
  3465. var accumulatedResult = '';
  3466. var nextSourcePosition = 0;
  3467. for (var i = 0; i < results.length; i++) {
  3468. result = results[i];
  3469. var matched = toString$1(result[0]);
  3470. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  3471. var captures = [];
  3472. // NOTE: This is equivalent to
  3473. // captures = result.slice(1).map(maybeToString)
  3474. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  3475. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  3476. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  3477. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  3478. var namedCaptures = result.groups;
  3479. if (functionalReplace) {
  3480. var replacerArgs = concat([matched], captures, position, S);
  3481. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  3482. var replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
  3483. } else {
  3484. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  3485. }
  3486. if (position >= nextSourcePosition) {
  3487. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  3488. nextSourcePosition = position + matched.length;
  3489. }
  3490. }
  3491. return accumulatedResult + stringSlice(S, nextSourcePosition);
  3492. }
  3493. ];
  3494. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  3495. var call = functionCall;
  3496. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  3497. var anObject = anObject$g;
  3498. var isNullOrUndefined = isNullOrUndefined$7;
  3499. var toLength = toLength$4;
  3500. var toString = toString$9;
  3501. var requireObjectCoercible = requireObjectCoercible$8;
  3502. var getMethod = getMethod$6;
  3503. var advanceStringIndex = advanceStringIndex$3;
  3504. var regExpExec = regexpExecAbstract;
  3505. // @@match logic
  3506. fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
  3507. return [
  3508. // `String.prototype.match` method
  3509. // https://tc39.es/ecma262/#sec-string.prototype.match
  3510. function match(regexp) {
  3511. var O = requireObjectCoercible(this);
  3512. var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
  3513. return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
  3514. },
  3515. // `RegExp.prototype[@@match]` method
  3516. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  3517. function (string) {
  3518. var rx = anObject(this);
  3519. var S = toString(string);
  3520. var res = maybeCallNative(nativeMatch, rx, S);
  3521. if (res.done) return res.value;
  3522. if (!rx.global) return regExpExec(rx, S);
  3523. var fullUnicode = rx.unicode;
  3524. rx.lastIndex = 0;
  3525. var A = [];
  3526. var n = 0;
  3527. var result;
  3528. while ((result = regExpExec(rx, S)) !== null) {
  3529. var matchStr = toString(result[0]);
  3530. A[n] = matchStr;
  3531. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  3532. n++;
  3533. }
  3534. return n === 0 ? null : A;
  3535. }
  3536. ];
  3537. });
  3538. var $ = _export;
  3539. var uncurryThis = functionUncurryThis;
  3540. var IndexedObject = indexedObject;
  3541. var toIndexedObject = toIndexedObject$6;
  3542. var arrayMethodIsStrict = arrayMethodIsStrict$4;
  3543. var nativeJoin = uncurryThis([].join);
  3544. var ES3_STRINGS = IndexedObject != Object;
  3545. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  3546. // `Array.prototype.join` method
  3547. // https://tc39.es/ecma262/#sec-array.prototype.join
  3548. $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  3549. join: function join(separator) {
  3550. return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  3551. }
  3552. });
  3553. /* eslint-disable no-use-before-define */
  3554. var Utils$1 = $__default["default"].fn.bootstrapTable.utils;
  3555. var searchControls = 'select, input:not([type="checkbox"]):not([type="radio"])';
  3556. function getInputClass(that) {
  3557. var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3558. var formControlClass = isSelect ? that.constants.classes.select : that.constants.classes.input;
  3559. return that.options.iconSize ? Utils$1.sprintf('%s %s-%s', formControlClass, formControlClass, that.options.iconSize) : formControlClass;
  3560. }
  3561. function getOptionsFromSelectControl(selectControl) {
  3562. return selectControl[0].options;
  3563. }
  3564. function getControlContainer(that) {
  3565. if (that.options.filterControlContainer) {
  3566. return $__default["default"]("".concat(that.options.filterControlContainer));
  3567. }
  3568. if (that.options.height && that._initialized) {
  3569. return $__default["default"]('.fixed-table-header table thead');
  3570. }
  3571. return that.$header;
  3572. }
  3573. function isKeyAllowed(keyCode) {
  3574. return $__default["default"].inArray(keyCode, [37, 38, 39, 40]) > -1;
  3575. }
  3576. function getSearchControls(that) {
  3577. return getControlContainer(that).find(searchControls);
  3578. }
  3579. function existOptionInSelectControl(selectControl, value) {
  3580. var options = getOptionsFromSelectControl(selectControl);
  3581. for (var i = 0; i < options.length; i++) {
  3582. if (options[i].value === Utils$1.unescapeHTML(value)) {
  3583. // The value is not valid to add
  3584. return true;
  3585. }
  3586. }
  3587. // If we get here, the value is valid to add
  3588. return false;
  3589. }
  3590. function addOptionToSelectControl(selectControl, _value, text, selected, shouldCompareText) {
  3591. var value = _value === undefined || _value === null ? '' : _value.toString().trim();
  3592. value = Utils$1.removeHTML(Utils$1.unescapeHTML(value));
  3593. text = Utils$1.removeHTML(Utils$1.unescapeHTML(text));
  3594. if (existOptionInSelectControl(selectControl, value)) {
  3595. return;
  3596. }
  3597. var isSelected = shouldCompareText ? value === selected || text === selected : value === selected;
  3598. var option = new Option(text, value, false, isSelected);
  3599. selectControl.get(0).add(option);
  3600. }
  3601. function sortSelectControl(selectControl, orderBy, options) {
  3602. var $selectControl = selectControl.get(0);
  3603. if (orderBy === 'server') {
  3604. return;
  3605. }
  3606. var tmpAry = new Array();
  3607. for (var i = 0; i < $selectControl.options.length; i++) {
  3608. tmpAry[i] = new Array();
  3609. tmpAry[i][0] = $selectControl.options[i].text;
  3610. tmpAry[i][1] = $selectControl.options[i].value;
  3611. tmpAry[i][2] = $selectControl.options[i].selected;
  3612. }
  3613. tmpAry.sort(function (a, b) {
  3614. return Utils$1.sort(a[0], b[0], orderBy === 'desc' ? -1 : 1, options);
  3615. });
  3616. while ($selectControl.options.length > 0) {
  3617. $selectControl.options[0] = null;
  3618. }
  3619. for (var _i = 0; _i < tmpAry.length; _i++) {
  3620. var op = new Option(tmpAry[_i][0], tmpAry[_i][1], false, tmpAry[_i][2]);
  3621. $selectControl.add(op);
  3622. }
  3623. }
  3624. function fixHeaderCSS(_ref) {
  3625. var $tableHeader = _ref.$tableHeader;
  3626. $tableHeader.css('height', $tableHeader.find('table').outerHeight(true));
  3627. }
  3628. function getElementClass($element) {
  3629. return $element.attr('class').replace('form-control', '').replace('form-select', '').replace('focus-temp', '').replace('search-input', '').trim();
  3630. }
  3631. function getCursorPosition(el) {
  3632. if ($__default["default"](el).is('input[type=search]')) {
  3633. var pos = 0;
  3634. if ('selectionStart' in el) {
  3635. pos = el.selectionStart;
  3636. } else if ('selection' in document) {
  3637. el.focus();
  3638. var Sel = document.selection.createRange();
  3639. var SelLength = document.selection.createRange().text.length;
  3640. Sel.moveStart('character', -el.value.length);
  3641. pos = Sel.text.length - SelLength;
  3642. }
  3643. return pos;
  3644. }
  3645. return -1;
  3646. }
  3647. function cacheValues(that) {
  3648. var searchControls = getSearchControls(that);
  3649. that._valuesFilterControl = [];
  3650. searchControls.each(function () {
  3651. var $field = $__default["default"](this);
  3652. var fieldClass = getElementClass($field);
  3653. if (that.options.height && !that.options.filterControlContainer) {
  3654. $field = that.$el.find(".fixed-table-header .".concat(fieldClass));
  3655. } else if (that.options.filterControlContainer) {
  3656. $field = $__default["default"]("".concat(that.options.filterControlContainer, " .").concat(fieldClass));
  3657. } else {
  3658. $field = that.$el.find(".".concat(fieldClass));
  3659. }
  3660. that._valuesFilterControl.push({
  3661. field: $field.closest('[data-field]').data('field'),
  3662. value: $field.val(),
  3663. position: getCursorPosition($field.get(0)),
  3664. hasFocus: $field.is(':focus')
  3665. });
  3666. });
  3667. }
  3668. function setCaretPosition(elem, caretPos) {
  3669. try {
  3670. if (elem) {
  3671. if (elem.createTextRange) {
  3672. var range = elem.createTextRange();
  3673. range.move('character', caretPos);
  3674. range.select();
  3675. } else {
  3676. elem.setSelectionRange(caretPos, caretPos);
  3677. }
  3678. }
  3679. } catch (ex) {
  3680. // ignored
  3681. }
  3682. }
  3683. function setValues(that) {
  3684. var field = null;
  3685. var result = [];
  3686. var searchControls = getSearchControls(that);
  3687. if (that._valuesFilterControl.length > 0) {
  3688. // Callback to apply after settings fields values
  3689. var callbacks = [];
  3690. searchControls.each(function (i, el) {
  3691. var $this = $__default["default"](el);
  3692. field = $this.closest('[data-field]').data('field');
  3693. result = that._valuesFilterControl.filter(function (valueObj) {
  3694. return valueObj.field === field;
  3695. });
  3696. if (result.length > 0) {
  3697. if (result[0].hasFocus || result[0].value) {
  3698. var fieldToFocusCallback = function (element, cacheElementInfo) {
  3699. // Closure here to capture the field information
  3700. var closedCallback = function closedCallback() {
  3701. if (cacheElementInfo.hasFocus) {
  3702. element.focus();
  3703. }
  3704. if (Array.isArray(cacheElementInfo.value)) {
  3705. var $element = $__default["default"](element);
  3706. $__default["default"].each(cacheElementInfo.value, function (i, e) {
  3707. $element.find(Utils$1.sprintf('option[value=\'%s\']', e)).prop('selected', true);
  3708. });
  3709. } else {
  3710. element.value = cacheElementInfo.value;
  3711. }
  3712. setCaretPosition(element, cacheElementInfo.position);
  3713. };
  3714. return closedCallback;
  3715. }($this.get(0), result[0]);
  3716. callbacks.push(fieldToFocusCallback);
  3717. }
  3718. }
  3719. });
  3720. // Callback call.
  3721. if (callbacks.length > 0) {
  3722. callbacks.forEach(function (callback) {
  3723. return callback();
  3724. });
  3725. }
  3726. }
  3727. }
  3728. function collectBootstrapTableFilterCookies() {
  3729. var cookies = [];
  3730. var foundCookies = document.cookie.match(/bs\.table\.(filterControl|searchText)/g);
  3731. var foundLocalStorage = localStorage;
  3732. if (foundCookies) {
  3733. $__default["default"].each(foundCookies, function (i, _cookie) {
  3734. var cookie = _cookie;
  3735. if (/./.test(cookie)) {
  3736. cookie = cookie.split('.').pop();
  3737. }
  3738. if ($__default["default"].inArray(cookie, cookies) === -1) {
  3739. cookies.push(cookie);
  3740. }
  3741. });
  3742. }
  3743. if (foundLocalStorage) {
  3744. for (var i = 0; i < foundLocalStorage.length; i++) {
  3745. var cookie = foundLocalStorage.key(i);
  3746. if (/./.test(cookie)) {
  3747. cookie = cookie.split('.').pop();
  3748. }
  3749. if (!cookies.includes(cookie)) {
  3750. cookies.push(cookie);
  3751. }
  3752. }
  3753. }
  3754. return cookies;
  3755. }
  3756. function escapeID(id) {
  3757. // eslint-disable-next-line no-useless-escape
  3758. return String(id).replace(/([:.\[\],])/g, '\\$1');
  3759. }
  3760. function isColumnSearchableViaSelect(_ref2) {
  3761. var filterControl = _ref2.filterControl,
  3762. searchable = _ref2.searchable;
  3763. return filterControl && filterControl.toLowerCase() === 'select' && searchable;
  3764. }
  3765. function isFilterDataNotGiven(_ref3) {
  3766. var filterData = _ref3.filterData;
  3767. return filterData === undefined || filterData.toLowerCase() === 'column';
  3768. }
  3769. function hasSelectControlElement(selectControl) {
  3770. return selectControl && selectControl.length > 0;
  3771. }
  3772. function initFilterSelectControls(that) {
  3773. var data = that.options.data;
  3774. $__default["default"].each(that.header.fields, function (j, field) {
  3775. var column = that.columns[that.fieldsColumnsIndex[field]];
  3776. var selectControl = getControlContainer(that).find("select.bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3777. if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
  3778. if (!selectControl[0].multiple && selectControl.get(selectControl.length - 1).options.length === 0) {
  3779. // Added the default option, must use a non-breaking space(&nbsp;) to pass the W3C validator
  3780. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder || ' ', column.filterDefault);
  3781. }
  3782. var uniqueValues = {};
  3783. for (var i = 0; i < data.length; i++) {
  3784. // Added a new value
  3785. var fieldValue = Utils$1.getItemField(data[i], field, false);
  3786. var formatter = that.options.editable && column.editable ? column._formatter : that.header.formatters[j];
  3787. var formattedValue = Utils$1.calculateObjectValue(that.header, formatter, [fieldValue, data[i], i], fieldValue);
  3788. if (fieldValue === undefined || fieldValue === null) {
  3789. fieldValue = formattedValue;
  3790. column._forceFormatter = true;
  3791. }
  3792. if (column.filterDataCollector) {
  3793. formattedValue = Utils$1.calculateObjectValue(that.header, column.filterDataCollector, [fieldValue, data[i], formattedValue], formattedValue);
  3794. }
  3795. if (column.searchFormatter) {
  3796. fieldValue = formattedValue;
  3797. }
  3798. uniqueValues[formattedValue] = fieldValue;
  3799. if (_typeof(formattedValue) === 'object' && formattedValue !== null) {
  3800. formattedValue.forEach(function (value) {
  3801. addOptionToSelectControl(selectControl, value, value, column.filterDefault);
  3802. });
  3803. continue;
  3804. }
  3805. }
  3806. // eslint-disable-next-line guard-for-in
  3807. for (var key in uniqueValues) {
  3808. addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
  3809. }
  3810. if (that.options.sortSelectOptions) {
  3811. sortSelectControl(selectControl, 'asc', that.options);
  3812. }
  3813. }
  3814. });
  3815. }
  3816. function getFilterDataMethod(objFilterDataMethod, searchTerm) {
  3817. var keys = Object.keys(objFilterDataMethod);
  3818. for (var i = 0; i < keys.length; i++) {
  3819. if (keys[i] === searchTerm) {
  3820. return objFilterDataMethod[searchTerm];
  3821. }
  3822. }
  3823. return null;
  3824. }
  3825. function createControls(that, header) {
  3826. var addedFilterControl = false;
  3827. var html;
  3828. $__default["default"].each(that.columns, function (_, column) {
  3829. html = [];
  3830. if (!column.visible && !(that.options.filterControlContainer && $__default["default"](".bootstrap-table-filter-control-".concat(column.field)).length >= 1)) {
  3831. return;
  3832. }
  3833. if (!column.filterControl && !that.options.filterControlContainer) {
  3834. html.push('<div class="no-filter-control"></div>');
  3835. } else if (that.options.filterControlContainer) {
  3836. // Use a filter control container instead of th
  3837. var $filterControls = $__default["default"](".bootstrap-table-filter-control-".concat(column.field));
  3838. $__default["default"].each($filterControls, function (_, filterControl) {
  3839. var $filterControl = $__default["default"](filterControl);
  3840. if (!$filterControl.is('[type=radio]')) {
  3841. var placeholder = column.filterControlPlaceholder || '';
  3842. $filterControl.attr('placeholder', placeholder).val(column.filterDefault);
  3843. }
  3844. $filterControl.attr('data-field', column.field);
  3845. });
  3846. addedFilterControl = true;
  3847. } else {
  3848. // Create the control based on the html defined in the filterTemplate array.
  3849. var nameControl = column.filterControl.toLowerCase();
  3850. html.push('<div class="filter-control">');
  3851. addedFilterControl = true;
  3852. if (column.searchable && that.options.filterTemplate[nameControl]) {
  3853. html.push(that.options.filterTemplate[nameControl](that, column, column.filterControlPlaceholder ? column.filterControlPlaceholder : '', column.filterDefault));
  3854. }
  3855. }
  3856. // Filtering by default when it is set.
  3857. if (column.filterControl && '' !== column.filterDefault && 'undefined' !== typeof column.filterDefault) {
  3858. if ($__default["default"].isEmptyObject(that.filterColumnsPartial)) {
  3859. that.filterColumnsPartial = {};
  3860. }
  3861. if (!(column.field in that.filterColumnsPartial)) {
  3862. that.filterColumnsPartial[column.field] = column.filterDefault;
  3863. }
  3864. }
  3865. $__default["default"].each(header.find('th'), function (_, th) {
  3866. var $th = $__default["default"](th);
  3867. if ($th.data('field') === column.field) {
  3868. $th.find('.filter-control').remove();
  3869. $th.find('.fht-cell').html(html.join(''));
  3870. return false;
  3871. }
  3872. });
  3873. if (column.filterData && column.filterData.toLowerCase() !== 'column') {
  3874. var filterDataType = getFilterDataMethod(filterDataMethods, column.filterData.substring(0, column.filterData.indexOf(':')));
  3875. var filterDataSource;
  3876. var selectControl;
  3877. if (filterDataType) {
  3878. filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
  3879. selectControl = header.find(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3880. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault, true);
  3881. filterDataType(that, filterDataSource, selectControl, that.options.filterOrderBy, column.filterDefault);
  3882. } else {
  3883. throw new SyntaxError('Error. You should use any of these allowed filter data methods: var, obj, json, url, func.' + ' Use like this: var: {key: "value"}');
  3884. }
  3885. }
  3886. });
  3887. if (addedFilterControl) {
  3888. header.off('keyup', 'input').on('keyup', 'input', function (_ref4, obj) {
  3889. var currentTarget = _ref4.currentTarget,
  3890. keyCode = _ref4.keyCode;
  3891. keyCode = obj ? obj.keyCode : keyCode;
  3892. if (that.options.searchOnEnterKey && keyCode !== 13) {
  3893. return;
  3894. }
  3895. if (isKeyAllowed(keyCode)) {
  3896. return;
  3897. }
  3898. var $currentTarget = $__default["default"](currentTarget);
  3899. if ($currentTarget.is(':checkbox') || $currentTarget.is(':radio')) {
  3900. return;
  3901. }
  3902. clearTimeout(currentTarget.timeoutId || 0);
  3903. currentTarget.timeoutId = setTimeout(function () {
  3904. that.onColumnSearch({
  3905. currentTarget: currentTarget,
  3906. keyCode: keyCode
  3907. });
  3908. }, that.options.searchTimeOut);
  3909. });
  3910. header.off('change', 'select', '.fc-multipleselect').on('change', 'select', '.fc-multipleselect', function (_ref5) {
  3911. var currentTarget = _ref5.currentTarget,
  3912. keyCode = _ref5.keyCode;
  3913. var $selectControl = $__default["default"](currentTarget);
  3914. var value = $selectControl.val();
  3915. if (Array.isArray(value)) {
  3916. for (var i = 0; i < value.length; i++) {
  3917. if (value[i] && value[i].length > 0 && value[i].trim()) {
  3918. $selectControl.find("option[value=\"".concat(value[i], "\"]")).attr('selected', true);
  3919. }
  3920. }
  3921. } else if (value && value.length > 0 && value.trim()) {
  3922. $selectControl.find('option[selected]').removeAttr('selected');
  3923. $selectControl.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  3924. } else {
  3925. $selectControl.find('option[selected]').removeAttr('selected');
  3926. }
  3927. clearTimeout(currentTarget.timeoutId || 0);
  3928. currentTarget.timeoutId = setTimeout(function () {
  3929. that.onColumnSearch({
  3930. currentTarget: currentTarget,
  3931. keyCode: keyCode
  3932. });
  3933. }, that.options.searchTimeOut);
  3934. });
  3935. header.off('mouseup', 'input:not([type=radio])').on('mouseup', 'input:not([type=radio])', function (_ref6) {
  3936. var currentTarget = _ref6.currentTarget,
  3937. keyCode = _ref6.keyCode;
  3938. var $input = $__default["default"](currentTarget);
  3939. var oldValue = $input.val();
  3940. if (oldValue === '') {
  3941. return;
  3942. }
  3943. setTimeout(function () {
  3944. var newValue = $input.val();
  3945. if (newValue === '') {
  3946. clearTimeout(currentTarget.timeoutId || 0);
  3947. currentTarget.timeoutId = setTimeout(function () {
  3948. that.onColumnSearch({
  3949. currentTarget: currentTarget,
  3950. keyCode: keyCode
  3951. });
  3952. }, that.options.searchTimeOut);
  3953. }
  3954. }, 1);
  3955. });
  3956. header.off('change', 'input[type=radio]').on('change', 'input[type=radio]', function (_ref7) {
  3957. var currentTarget = _ref7.currentTarget,
  3958. keyCode = _ref7.keyCode;
  3959. clearTimeout(currentTarget.timeoutId || 0);
  3960. currentTarget.timeoutId = setTimeout(function () {
  3961. that.onColumnSearch({
  3962. currentTarget: currentTarget,
  3963. keyCode: keyCode
  3964. });
  3965. }, that.options.searchTimeOut);
  3966. });
  3967. // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  3968. if (header.find('.date-filter-control').length > 0) {
  3969. $__default["default"].each(that.columns, function (i, _ref8) {
  3970. var filterDefault = _ref8.filterDefault,
  3971. filterControl = _ref8.filterControl,
  3972. field = _ref8.field,
  3973. filterDatepickerOptions = _ref8.filterDatepickerOptions;
  3974. if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
  3975. var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(field));
  3976. if (filterDefault) {
  3977. $datepicker.value(filterDefault);
  3978. }
  3979. if (filterDatepickerOptions.min) {
  3980. $datepicker.attr('min', filterDatepickerOptions.min);
  3981. }
  3982. if (filterDatepickerOptions.max) {
  3983. $datepicker.attr('max', filterDatepickerOptions.max);
  3984. }
  3985. if (filterDatepickerOptions.step) {
  3986. $datepicker.attr('step', filterDatepickerOptions.step);
  3987. }
  3988. if (filterDatepickerOptions.pattern) {
  3989. $datepicker.attr('pattern', filterDatepickerOptions.pattern);
  3990. }
  3991. $datepicker.on('change', function (_ref9) {
  3992. var currentTarget = _ref9.currentTarget;
  3993. clearTimeout(currentTarget.timeoutId || 0);
  3994. currentTarget.timeoutId = setTimeout(function () {
  3995. that.onColumnSearch({
  3996. currentTarget: currentTarget
  3997. });
  3998. }, that.options.searchTimeOut);
  3999. });
  4000. }
  4001. });
  4002. }
  4003. if (that.options.sidePagination !== 'server') {
  4004. that.triggerSearch();
  4005. }
  4006. if (!that.options.filterControlVisible) {
  4007. header.find('.filter-control, .no-filter-control').hide();
  4008. }
  4009. } else {
  4010. header.find('.filter-control, .no-filter-control').hide();
  4011. }
  4012. that.trigger('created-controls');
  4013. }
  4014. function getDirectionOfSelectOptions(_alignment) {
  4015. var alignment = _alignment === undefined ? 'left' : _alignment.toLowerCase();
  4016. switch (alignment) {
  4017. case 'left':
  4018. return 'ltr';
  4019. case 'right':
  4020. return 'rtl';
  4021. case 'auto':
  4022. return 'auto';
  4023. default:
  4024. return 'ltr';
  4025. }
  4026. }
  4027. function syncHeaders(that) {
  4028. if (!that.options.height) {
  4029. return;
  4030. }
  4031. var fixedHeader = $__default["default"]('.fixed-table-header table thead');
  4032. if (fixedHeader.length === 0) {
  4033. return;
  4034. }
  4035. that.$header.children().find('th[data-field]').each(function (_, element) {
  4036. if (element.classList[0] !== 'bs-checkbox') {
  4037. var $element = $__default["default"](element);
  4038. var $field = $element.data('field');
  4039. var $fixedField = $__default["default"]("th[data-field='".concat($field, "']")).not($element);
  4040. var input = $element.find('input');
  4041. var fixedInput = $fixedField.find('input');
  4042. if (input.length > 0 && fixedInput.length > 0) {
  4043. if (input.val() !== fixedInput.val()) {
  4044. input.val(fixedInput.val());
  4045. }
  4046. }
  4047. }
  4048. });
  4049. }
  4050. var filterDataMethods = {
  4051. func: function func(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4052. var variableValues = window[filterDataSource].apply();
  4053. // eslint-disable-next-line guard-for-in
  4054. for (var key in variableValues) {
  4055. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4056. }
  4057. if (that.options.sortSelectOptions) {
  4058. sortSelectControl(selectControl, filterOrderBy, that.options);
  4059. }
  4060. setValues(that);
  4061. },
  4062. obj: function obj(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4063. var objectKeys = filterDataSource.split('.');
  4064. var variableName = objectKeys.shift();
  4065. var variableValues = window[variableName];
  4066. if (objectKeys.length > 0) {
  4067. objectKeys.forEach(function (key) {
  4068. variableValues = variableValues[key];
  4069. });
  4070. }
  4071. // eslint-disable-next-line guard-for-in
  4072. for (var key in variableValues) {
  4073. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4074. }
  4075. if (that.options.sortSelectOptions) {
  4076. sortSelectControl(selectControl, filterOrderBy, that.options);
  4077. }
  4078. setValues(that);
  4079. },
  4080. var: function _var(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4081. var variableValues = window[filterDataSource];
  4082. var isArray = Array.isArray(variableValues);
  4083. for (var key in variableValues) {
  4084. if (isArray) {
  4085. addOptionToSelectControl(selectControl, variableValues[key], variableValues[key], selected, true);
  4086. } else {
  4087. addOptionToSelectControl(selectControl, key, variableValues[key], selected, true);
  4088. }
  4089. }
  4090. if (that.options.sortSelectOptions) {
  4091. sortSelectControl(selectControl, filterOrderBy, that.options);
  4092. }
  4093. setValues(that);
  4094. },
  4095. url: function url(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4096. $__default["default"].ajax({
  4097. url: filterDataSource,
  4098. dataType: 'json',
  4099. success: function success(data) {
  4100. // eslint-disable-next-line guard-for-in
  4101. for (var key in data) {
  4102. addOptionToSelectControl(selectControl, key, data[key], selected);
  4103. }
  4104. if (that.options.sortSelectOptions) {
  4105. sortSelectControl(selectControl, filterOrderBy, that.options);
  4106. }
  4107. setValues(that);
  4108. }
  4109. });
  4110. },
  4111. json: function json(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4112. var variableValues = JSON.parse(filterDataSource);
  4113. // eslint-disable-next-line guard-for-in
  4114. for (var key in variableValues) {
  4115. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4116. }
  4117. if (that.options.sortSelectOptions) {
  4118. sortSelectControl(selectControl, filterOrderBy, that.options);
  4119. }
  4120. setValues(that);
  4121. }
  4122. };
  4123. var Utils = $__default["default"].fn.bootstrapTable.utils;
  4124. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  4125. filterControl: false,
  4126. filterControlVisible: true,
  4127. filterControlMultipleSearch: false,
  4128. filterControlMultipleSearchDelimiter: ',',
  4129. // eslint-disable-next-line no-unused-vars
  4130. onColumnSearch: function onColumnSearch(field, text) {
  4131. return false;
  4132. },
  4133. onCreatedControls: function onCreatedControls() {
  4134. return false;
  4135. },
  4136. alignmentSelectControlOptions: undefined,
  4137. filterTemplate: {
  4138. input: function input(that, column, placeholder, value) {
  4139. return Utils.sprintf('<input type="search" class="%s bootstrap-table-filter-control-%s search-input" style="width: 100%;" placeholder="%s" value="%s">', getInputClass(that), column.field, 'undefined' === typeof placeholder ? '' : placeholder, 'undefined' === typeof value ? '' : value);
  4140. },
  4141. select: function select(that, column) {
  4142. return Utils.sprintf('<select class="%s bootstrap-table-filter-control-%s %s" %s style="width: 100%;" dir="%s"></select>', getInputClass(that, true), column.field, '', '', getDirectionOfSelectOptions(that.options.alignmentSelectControlOptions));
  4143. },
  4144. datepicker: function datepicker(that, column, value) {
  4145. return Utils.sprintf('<input type="date" class="%s date-filter-control bootstrap-table-filter-control-%s" style="width: 100%;" value="%s">', getInputClass(that), column.field, 'undefined' === typeof value ? '' : value);
  4146. }
  4147. },
  4148. searchOnEnterKey: false,
  4149. showFilterControlSwitch: false,
  4150. sortSelectOptions: false,
  4151. // internal variables
  4152. _valuesFilterControl: [],
  4153. _initialized: false,
  4154. _isRendering: false,
  4155. _usingMultipleSelect: false
  4156. });
  4157. $__default["default"].extend($__default["default"].fn.bootstrapTable.columnDefaults, {
  4158. filterControl: undefined,
  4159. // input, select, datepicker
  4160. filterControlMultipleSelect: false,
  4161. filterControlMultipleSelectOptions: {},
  4162. filterDataCollector: undefined,
  4163. filterData: undefined,
  4164. filterDatepickerOptions: {},
  4165. filterStrictSearch: false,
  4166. filterStartsWithSearch: false,
  4167. filterControlPlaceholder: '',
  4168. filterDefault: '',
  4169. filterOrderBy: 'asc',
  4170. // asc || desc
  4171. filterCustomSearch: undefined
  4172. });
  4173. $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
  4174. 'column-search.bs.table': 'onColumnSearch',
  4175. 'created-controls.bs.table': 'onCreatedControls'
  4176. });
  4177. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  4178. filterControlSwitchHide: {
  4179. bootstrap3: 'glyphicon-zoom-out icon-zoom-out',
  4180. bootstrap5: 'bi-zoom-out',
  4181. materialize: 'zoom_out'
  4182. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-search-minus',
  4183. filterControlSwitchShow: {
  4184. bootstrap3: 'glyphicon-zoom-in icon-zoom-in',
  4185. bootstrap5: 'bi-zoom-in',
  4186. materialize: 'zoom_in'
  4187. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-search-plus'
  4188. });
  4189. $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
  4190. formatFilterControlSwitch: function formatFilterControlSwitch() {
  4191. return 'Hide/Show controls';
  4192. },
  4193. formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
  4194. return 'Hide controls';
  4195. },
  4196. formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
  4197. return 'Show controls';
  4198. }
  4199. });
  4200. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
  4201. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  4202. formatClearSearch: function formatClearSearch() {
  4203. return 'Clear filters';
  4204. }
  4205. });
  4206. $__default["default"].fn.bootstrapTable.methods.push('triggerSearch');
  4207. $__default["default"].fn.bootstrapTable.methods.push('clearFilterControl');
  4208. $__default["default"].fn.bootstrapTable.methods.push('toggleFilterControl');
  4209. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  4210. _inherits(_class, _$$BootstrapTable);
  4211. var _super = _createSuper(_class);
  4212. function _class() {
  4213. _classCallCheck(this, _class);
  4214. return _super.apply(this, arguments);
  4215. }
  4216. _createClass(_class, [{
  4217. key: "init",
  4218. value: function init() {
  4219. var _this = this;
  4220. // Make sure that the filterControl option is set
  4221. if (this.options.filterControl) {
  4222. // Make sure that the internal variables are set correctly
  4223. this._valuesFilterControl = [];
  4224. this._initialized = false;
  4225. this._usingMultipleSelect = false;
  4226. this._isRendering = false;
  4227. this.$el.on('reset-view.bs.table', Utils.debounce(function () {
  4228. initFilterSelectControls(_this);
  4229. setValues(_this);
  4230. }, 3)).on('toggle.bs.table', Utils.debounce(function (_, cardView) {
  4231. _this._initialized = false;
  4232. if (!cardView) {
  4233. initFilterSelectControls(_this);
  4234. setValues(_this);
  4235. _this._initialized = true;
  4236. }
  4237. }, 1)).on('post-header.bs.table', Utils.debounce(function () {
  4238. initFilterSelectControls(_this);
  4239. setValues(_this);
  4240. }, 3)).on('column-switch.bs.table', Utils.debounce(function () {
  4241. setValues(_this);
  4242. if (_this.options.height) {
  4243. _this.fitHeader();
  4244. }
  4245. }, 1)).on('post-body.bs.table', Utils.debounce(function () {
  4246. if (_this.options.height && !_this.options.filterControlContainer && _this.options.filterControlVisible) {
  4247. fixHeaderCSS(_this);
  4248. }
  4249. _this.$tableLoading.css('top', _this.$header.outerHeight() + 1);
  4250. }, 1)).on('all.bs.table', function () {
  4251. syncHeaders(_this);
  4252. });
  4253. }
  4254. _get(_getPrototypeOf(_class.prototype), "init", this).call(this);
  4255. }
  4256. }, {
  4257. key: "initBody",
  4258. value: function initBody() {
  4259. var _this2 = this;
  4260. _get(_getPrototypeOf(_class.prototype), "initBody", this).call(this);
  4261. if (!this.options.filterControl) {
  4262. return;
  4263. }
  4264. setTimeout(function () {
  4265. initFilterSelectControls(_this2);
  4266. setValues(_this2);
  4267. }, 3);
  4268. }
  4269. }, {
  4270. key: "load",
  4271. value: function load(data) {
  4272. _get(_getPrototypeOf(_class.prototype), "load", this).call(this, data);
  4273. if (!this.options.filterControl) {
  4274. return;
  4275. }
  4276. createControls(this, getControlContainer(this));
  4277. setValues(this);
  4278. }
  4279. }, {
  4280. key: "initHeader",
  4281. value: function initHeader() {
  4282. _get(_getPrototypeOf(_class.prototype), "initHeader", this).call(this);
  4283. if (!this.options.filterControl) {
  4284. return;
  4285. }
  4286. createControls(this, getControlContainer(this));
  4287. this._initialized = true;
  4288. }
  4289. }, {
  4290. key: "initSearch",
  4291. value: function initSearch() {
  4292. var _this3 = this;
  4293. var that = this;
  4294. var filterPartial = $__default["default"].isEmptyObject(that.filterColumnsPartial) ? null : that.filterColumnsPartial;
  4295. _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
  4296. if (this.options.sidePagination === 'server' || filterPartial === null) {
  4297. return;
  4298. }
  4299. // Check partial column filter
  4300. that.data = filterPartial ? that.data.filter(function (item, i) {
  4301. var itemIsExpected = [];
  4302. var keys1 = Object.keys(item);
  4303. var keys2 = Object.keys(filterPartial);
  4304. var keys = keys1.concat(keys2.filter(function (item) {
  4305. return !keys1.includes(item);
  4306. }));
  4307. keys.forEach(function (key) {
  4308. var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
  4309. var rawFilterValue = filterPartial[key] || '';
  4310. var filterValue = rawFilterValue.toLowerCase();
  4311. var value = Utils.unescapeHTML(Utils.getItemField(item, key, false));
  4312. var tmpItemIsExpected;
  4313. if (_this3.options.searchAccentNeutralise) {
  4314. filterValue = Utils.normalizeAccent(filterValue);
  4315. }
  4316. var filterValues = [filterValue];
  4317. if (_this3.options.filterControlMultipleSearch) {
  4318. filterValues = filterValue.split(_this3.options.filterControlMultipleSearchDelimiter);
  4319. }
  4320. filterValues.forEach(function (filterValue) {
  4321. if (tmpItemIsExpected === true) {
  4322. return;
  4323. }
  4324. filterValue = filterValue.trim();
  4325. if (filterValue === '') {
  4326. tmpItemIsExpected = true;
  4327. } else {
  4328. // Fix #142: search use formatted data
  4329. if (thisColumn) {
  4330. if (thisColumn.searchFormatter || thisColumn._forceFormatter) {
  4331. value = $__default["default"].fn.bootstrapTable.utils.calculateObjectValue(thisColumn, that.header.formatters[$__default["default"].inArray(key, that.header.fields)], [value, item, i], value);
  4332. }
  4333. }
  4334. if ($__default["default"].inArray(key, that.header.fields) !== -1) {
  4335. if (value === undefined || value === null) {
  4336. tmpItemIsExpected = false;
  4337. } else if (_typeof(value) === 'object' && thisColumn.filterCustomSearch) {
  4338. itemIsExpected.push(that.isValueExpected(rawFilterValue, value, thisColumn, key));
  4339. } else if (_typeof(value) === 'object' && Array.isArray(value)) {
  4340. value.forEach(function (objectValue) {
  4341. if (tmpItemIsExpected) {
  4342. return;
  4343. }
  4344. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4345. });
  4346. } else if (_typeof(value) === 'object' && !Array.isArray(value)) {
  4347. Object.values(value).forEach(function (objectValue) {
  4348. if (tmpItemIsExpected) {
  4349. return;
  4350. }
  4351. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4352. });
  4353. } else if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
  4354. tmpItemIsExpected = that.isValueExpected(filterValue, value, thisColumn, key);
  4355. }
  4356. }
  4357. }
  4358. });
  4359. itemIsExpected.push(tmpItemIsExpected);
  4360. });
  4361. return !itemIsExpected.includes(false);
  4362. }) : that.data;
  4363. that.unsortedData = _toConsumableArray(that.data);
  4364. }
  4365. }, {
  4366. key: "isValueExpected",
  4367. value: function isValueExpected(searchValue, value, column, key) {
  4368. var tmpItemIsExpected = false;
  4369. if (column.filterStrictSearch || column.filterControl === 'select' && column.passed.filterStrictSearch !== false) {
  4370. tmpItemIsExpected = value.toString().toLowerCase() === searchValue.toString().toLowerCase();
  4371. } else if (column.filterStartsWithSearch) {
  4372. tmpItemIsExpected = "".concat(value).toLowerCase().indexOf(searchValue) === 0;
  4373. } else if (column.filterControl === 'datepicker') {
  4374. tmpItemIsExpected = new Date(value).getTime() === new Date(searchValue).getTime();
  4375. } else if (this.options.regexSearch) {
  4376. tmpItemIsExpected = Utils.regexCompare(value, searchValue);
  4377. } else {
  4378. tmpItemIsExpected = "".concat(value).toLowerCase().includes(searchValue);
  4379. }
  4380. var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(\d+)?|(\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm;
  4381. var matches = largerSmallerEqualsRegex.exec(searchValue);
  4382. if (matches) {
  4383. var operator = matches[1] || "".concat(matches[5], "l");
  4384. var comparisonValue = matches[2] || matches[3];
  4385. var int = parseInt(value, 10);
  4386. var comparisonInt = parseInt(comparisonValue, 10);
  4387. switch (operator) {
  4388. case '>':
  4389. case '<l':
  4390. tmpItemIsExpected = int > comparisonInt;
  4391. break;
  4392. case '<':
  4393. case '>l':
  4394. tmpItemIsExpected = int < comparisonInt;
  4395. break;
  4396. case '<=':
  4397. case '=<':
  4398. case '>=l':
  4399. case '=>l':
  4400. tmpItemIsExpected = int <= comparisonInt;
  4401. break;
  4402. case '>=':
  4403. case '=>':
  4404. case '<=l':
  4405. case '=<l':
  4406. tmpItemIsExpected = int >= comparisonInt;
  4407. break;
  4408. }
  4409. }
  4410. if (column.filterCustomSearch) {
  4411. var customSearchResult = Utils.calculateObjectValue(column, column.filterCustomSearch, [searchValue, value, key, this.options.data], true);
  4412. if (customSearchResult !== null) {
  4413. tmpItemIsExpected = customSearchResult;
  4414. }
  4415. }
  4416. return tmpItemIsExpected;
  4417. }
  4418. }, {
  4419. key: "initColumnSearch",
  4420. value: function initColumnSearch(filterColumnsDefaults) {
  4421. cacheValues(this);
  4422. if (filterColumnsDefaults) {
  4423. this.filterColumnsPartial = filterColumnsDefaults;
  4424. this.updatePagination();
  4425. // eslint-disable-next-line guard-for-in
  4426. for (var filter in filterColumnsDefaults) {
  4427. this.trigger('column-search', filter, filterColumnsDefaults[filter]);
  4428. }
  4429. }
  4430. }
  4431. }, {
  4432. key: "initToolbar",
  4433. value: function initToolbar() {
  4434. this.showToolbar = this.showToolbar || this.options.showFilterControlSwitch;
  4435. this.showSearchClearButton = this.options.filterControl && this.options.showSearchClearButton;
  4436. if (this.options.showFilterControlSwitch) {
  4437. this.buttons = Object.assign(this.buttons, {
  4438. filterControlSwitch: {
  4439. text: this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
  4440. icon: this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
  4441. event: this.toggleFilterControl,
  4442. attributes: {
  4443. 'aria-label': this.options.formatFilterControlSwitch(),
  4444. title: this.options.formatFilterControlSwitch()
  4445. }
  4446. }
  4447. });
  4448. }
  4449. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  4450. }
  4451. }, {
  4452. key: "resetSearch",
  4453. value: function resetSearch(text) {
  4454. if (this.options.filterControl && this.options.showSearchClearButton) {
  4455. this.clearFilterControl();
  4456. }
  4457. _get(_getPrototypeOf(_class.prototype), "resetSearch", this).call(this, text);
  4458. }
  4459. }, {
  4460. key: "clearFilterControl",
  4461. value: function clearFilterControl() {
  4462. if (!this.options.filterControl) {
  4463. return;
  4464. }
  4465. var that = this;
  4466. var table = this.$el.closest('table');
  4467. var cookies = collectBootstrapTableFilterCookies();
  4468. var controls = getSearchControls(that);
  4469. // const search = Utils.getSearchInput(this)
  4470. var hasValues = false;
  4471. var timeoutId = 0;
  4472. // Clear cache values
  4473. $__default["default"].each(that._valuesFilterControl, function (i, item) {
  4474. hasValues = hasValues ? true : item.value !== '';
  4475. item.value = '';
  4476. });
  4477. // Clear controls in UI
  4478. $__default["default"].each(controls, function (i, item) {
  4479. item.value = '';
  4480. });
  4481. // Cache controls again
  4482. setValues(that);
  4483. // clear cookies once the filters are clean
  4484. clearTimeout(timeoutId);
  4485. timeoutId = setTimeout(function () {
  4486. if (cookies && cookies.length > 0) {
  4487. $__default["default"].each(cookies, function (i, item) {
  4488. if (that.deleteCookie !== undefined) {
  4489. that.deleteCookie(item);
  4490. }
  4491. });
  4492. }
  4493. }, that.options.searchTimeOut);
  4494. // If there is not any value in the controls exit this method
  4495. if (!hasValues) {
  4496. return;
  4497. }
  4498. // Clear each type of filter if it exists.
  4499. // Requires the body to reload each time a type of filter is found because we never know
  4500. // which ones are going to be present.
  4501. if (controls.length > 0) {
  4502. this.filterColumnsPartial = {};
  4503. controls.eq(0).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', {
  4504. keyCode: 13
  4505. });
  4506. /* controls.each(function () {
  4507. $(this).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', { keyCode: 13 })
  4508. })*/
  4509. } else {
  4510. return;
  4511. }
  4512. /* if (search.length > 0) {
  4513. that.resetSearch('fc')
  4514. }*/
  4515. // use the default sort order if it exists. do nothing if it does not
  4516. if (that.options.sortName !== table.data('sortName') || that.options.sortOrder !== table.data('sortOrder')) {
  4517. var sorter = this.$header.find(Utils.sprintf('[data-field="%s"]', $__default["default"](controls[0]).closest('table').data('sortName')));
  4518. if (sorter.length > 0) {
  4519. that.onSort({
  4520. type: 'keypress',
  4521. currentTarget: sorter
  4522. });
  4523. $__default["default"](sorter).find('.sortable').trigger('click');
  4524. }
  4525. }
  4526. }
  4527. // EVENTS
  4528. }, {
  4529. key: "onColumnSearch",
  4530. value: function onColumnSearch(_ref) {
  4531. var _this4 = this;
  4532. var currentTarget = _ref.currentTarget,
  4533. keyCode = _ref.keyCode;
  4534. if (isKeyAllowed(keyCode)) {
  4535. return;
  4536. }
  4537. cacheValues(this);
  4538. // Cookie extension support
  4539. if (!this.options.cookie) {
  4540. this.options.pageNumber = 1;
  4541. } else {
  4542. // Force call the initServer method in Cookie extension
  4543. this._filterControlValuesLoaded = true;
  4544. }
  4545. if ($__default["default"].isEmptyObject(this.filterColumnsPartial)) {
  4546. this.filterColumnsPartial = {};
  4547. }
  4548. // If searchOnEnterKey is set to true, then we need to iterate over all controls and grab their values.
  4549. var controls = this.options.searchOnEnterKey ? getSearchControls(this).toArray() : [currentTarget];
  4550. controls.forEach(function (element) {
  4551. var $element = $__default["default"](element);
  4552. var elementValue = $element.val();
  4553. var text = elementValue ? elementValue.trim() : '';
  4554. var $field = $element.closest('[data-field]').data('field');
  4555. _this4.trigger('column-search', $field, text);
  4556. if (text) {
  4557. _this4.filterColumnsPartial[$field] = text;
  4558. } else {
  4559. delete _this4.filterColumnsPartial[$field];
  4560. }
  4561. });
  4562. this.onSearch({
  4563. currentTarget: currentTarget
  4564. }, false);
  4565. }
  4566. }, {
  4567. key: "toggleFilterControl",
  4568. value: function toggleFilterControl() {
  4569. this.options.filterControlVisible = !this.options.filterControlVisible;
  4570. // Controls in original header or container.
  4571. var $filterControls = getControlContainer(this).find('.filter-control, .no-filter-control');
  4572. if (this.options.filterControlVisible) {
  4573. $filterControls.show();
  4574. } else {
  4575. $filterControls.hide();
  4576. this.clearFilterControl();
  4577. }
  4578. // Controls in fixed header
  4579. if (this.options.height) {
  4580. var $fixedControls = $__default["default"]('.fixed-table-header table thead').find('.filter-control, .no-filter-control');
  4581. $fixedControls.toggle(this.options.filterControlVisible);
  4582. fixHeaderCSS(this);
  4583. }
  4584. var icon = this.options.showButtonIcons ? this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow : '';
  4585. var text = this.options.showButtonText ? this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow() : '';
  4586. this.$toolbar.find('>.columns').find('.filter-control-switch').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
  4587. }
  4588. }, {
  4589. key: "triggerSearch",
  4590. value: function triggerSearch() {
  4591. var searchControls = getSearchControls(this);
  4592. searchControls.each(function () {
  4593. var $element = $__default["default"](this);
  4594. if ($element.is('select')) {
  4595. $element.trigger('change');
  4596. } else {
  4597. $element.trigger('keyup');
  4598. }
  4599. });
  4600. }
  4601. }, {
  4602. key: "_toggleColumn",
  4603. value: function _toggleColumn(index, checked, needUpdate) {
  4604. this._initialized = false;
  4605. _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this).call(this, index, checked, needUpdate);
  4606. syncHeaders(this);
  4607. }
  4608. }]);
  4609. return _class;
  4610. }($__default["default"].BootstrapTable);
  4611. }));