bootstrap-table-filter-control.js 189 KB

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