utils.js 119 KB

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