bootstrap-table-filter-control.js 185 KB

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