bootstrap.js 134 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356
  1. /*!
  2. * Bootstrap v4.6.2 (https://getbootstrap.com/)
  3. * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  4. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  5. */
  6. (function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
  8. typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
  9. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
  10. })(this, (function (exports, $, Popper) { 'use strict';
  11. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  12. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  13. var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
  14. function _defineProperties(target, props) {
  15. for (var i = 0; i < props.length; i++) {
  16. var descriptor = props[i];
  17. descriptor.enumerable = descriptor.enumerable || false;
  18. descriptor.configurable = true;
  19. if ("value" in descriptor) descriptor.writable = true;
  20. Object.defineProperty(target, descriptor.key, descriptor);
  21. }
  22. }
  23. function _createClass(Constructor, protoProps, staticProps) {
  24. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  25. if (staticProps) _defineProperties(Constructor, staticProps);
  26. Object.defineProperty(Constructor, "prototype", {
  27. writable: false
  28. });
  29. return Constructor;
  30. }
  31. function _extends() {
  32. _extends = Object.assign ? Object.assign.bind() : function (target) {
  33. for (var i = 1; i < arguments.length; i++) {
  34. var source = arguments[i];
  35. for (var key in source) {
  36. if (Object.prototype.hasOwnProperty.call(source, key)) {
  37. target[key] = source[key];
  38. }
  39. }
  40. }
  41. return target;
  42. };
  43. return _extends.apply(this, arguments);
  44. }
  45. function _inheritsLoose(subClass, superClass) {
  46. subClass.prototype = Object.create(superClass.prototype);
  47. subClass.prototype.constructor = subClass;
  48. _setPrototypeOf(subClass, superClass);
  49. }
  50. function _setPrototypeOf(o, p) {
  51. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  52. o.__proto__ = p;
  53. return o;
  54. };
  55. return _setPrototypeOf(o, p);
  56. }
  57. /**
  58. * --------------------------------------------------------------------------
  59. * Bootstrap (v4.6.2): util.js
  60. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  61. * --------------------------------------------------------------------------
  62. */
  63. /**
  64. * Private TransitionEnd Helpers
  65. */
  66. var TRANSITION_END = 'transitionend';
  67. var MAX_UID = 1000000;
  68. var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
  69. function toType(obj) {
  70. if (obj === null || typeof obj === 'undefined') {
  71. return "" + obj;
  72. }
  73. return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
  74. }
  75. function getSpecialTransitionEndEvent() {
  76. return {
  77. bindType: TRANSITION_END,
  78. delegateType: TRANSITION_END,
  79. handle: function handle(event) {
  80. if ($__default["default"](event.target).is(this)) {
  81. return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
  82. }
  83. return undefined;
  84. }
  85. };
  86. }
  87. function transitionEndEmulator(duration) {
  88. var _this = this;
  89. var called = false;
  90. $__default["default"](this).one(Util.TRANSITION_END, function () {
  91. called = true;
  92. });
  93. setTimeout(function () {
  94. if (!called) {
  95. Util.triggerTransitionEnd(_this);
  96. }
  97. }, duration);
  98. return this;
  99. }
  100. function setTransitionEndSupport() {
  101. $__default["default"].fn.emulateTransitionEnd = transitionEndEmulator;
  102. $__default["default"].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
  103. }
  104. /**
  105. * Public Util API
  106. */
  107. var Util = {
  108. TRANSITION_END: 'bsTransitionEnd',
  109. getUID: function getUID(prefix) {
  110. do {
  111. // eslint-disable-next-line no-bitwise
  112. prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
  113. } while (document.getElementById(prefix));
  114. return prefix;
  115. },
  116. getSelectorFromElement: function getSelectorFromElement(element) {
  117. var selector = element.getAttribute('data-target');
  118. if (!selector || selector === '#') {
  119. var hrefAttr = element.getAttribute('href');
  120. selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
  121. }
  122. try {
  123. return document.querySelector(selector) ? selector : null;
  124. } catch (_) {
  125. return null;
  126. }
  127. },
  128. getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
  129. if (!element) {
  130. return 0;
  131. } // Get transition-duration of the element
  132. var transitionDuration = $__default["default"](element).css('transition-duration');
  133. var transitionDelay = $__default["default"](element).css('transition-delay');
  134. var floatTransitionDuration = parseFloat(transitionDuration);
  135. var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
  136. if (!floatTransitionDuration && !floatTransitionDelay) {
  137. return 0;
  138. } // If multiple durations are defined, take the first
  139. transitionDuration = transitionDuration.split(',')[0];
  140. transitionDelay = transitionDelay.split(',')[0];
  141. return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
  142. },
  143. reflow: function reflow(element) {
  144. return element.offsetHeight;
  145. },
  146. triggerTransitionEnd: function triggerTransitionEnd(element) {
  147. $__default["default"](element).trigger(TRANSITION_END);
  148. },
  149. supportsTransitionEnd: function supportsTransitionEnd() {
  150. return Boolean(TRANSITION_END);
  151. },
  152. isElement: function isElement(obj) {
  153. return (obj[0] || obj).nodeType;
  154. },
  155. typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
  156. for (var property in configTypes) {
  157. if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
  158. var expectedTypes = configTypes[property];
  159. var value = config[property];
  160. var valueType = value && Util.isElement(value) ? 'element' : toType(value);
  161. if (!new RegExp(expectedTypes).test(valueType)) {
  162. throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
  163. }
  164. }
  165. }
  166. },
  167. findShadowRoot: function findShadowRoot(element) {
  168. if (!document.documentElement.attachShadow) {
  169. return null;
  170. } // Can find the shadow root otherwise it'll return the document
  171. if (typeof element.getRootNode === 'function') {
  172. var root = element.getRootNode();
  173. return root instanceof ShadowRoot ? root : null;
  174. }
  175. if (element instanceof ShadowRoot) {
  176. return element;
  177. } // when we don't find a shadow root
  178. if (!element.parentNode) {
  179. return null;
  180. }
  181. return Util.findShadowRoot(element.parentNode);
  182. },
  183. jQueryDetection: function jQueryDetection() {
  184. if (typeof $__default["default"] === 'undefined') {
  185. throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
  186. }
  187. var version = $__default["default"].fn.jquery.split(' ')[0].split('.');
  188. var minMajor = 1;
  189. var ltMajor = 2;
  190. var minMinor = 9;
  191. var minPatch = 1;
  192. var maxMajor = 4;
  193. if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
  194. throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
  195. }
  196. }
  197. };
  198. Util.jQueryDetection();
  199. setTransitionEndSupport();
  200. /**
  201. * Constants
  202. */
  203. var NAME$a = 'alert';
  204. var VERSION$a = '4.6.2';
  205. var DATA_KEY$a = 'bs.alert';
  206. var EVENT_KEY$a = "." + DATA_KEY$a;
  207. var DATA_API_KEY$7 = '.data-api';
  208. var JQUERY_NO_CONFLICT$a = $__default["default"].fn[NAME$a];
  209. var CLASS_NAME_ALERT = 'alert';
  210. var CLASS_NAME_FADE$5 = 'fade';
  211. var CLASS_NAME_SHOW$7 = 'show';
  212. var EVENT_CLOSE = "close" + EVENT_KEY$a;
  213. var EVENT_CLOSED = "closed" + EVENT_KEY$a;
  214. var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$a + DATA_API_KEY$7;
  215. var SELECTOR_DISMISS = '[data-dismiss="alert"]';
  216. /**
  217. * Class definition
  218. */
  219. var Alert = /*#__PURE__*/function () {
  220. function Alert(element) {
  221. this._element = element;
  222. } // Getters
  223. var _proto = Alert.prototype;
  224. // Public
  225. _proto.close = function close(element) {
  226. var rootElement = this._element;
  227. if (element) {
  228. rootElement = this._getRootElement(element);
  229. }
  230. var customEvent = this._triggerCloseEvent(rootElement);
  231. if (customEvent.isDefaultPrevented()) {
  232. return;
  233. }
  234. this._removeElement(rootElement);
  235. };
  236. _proto.dispose = function dispose() {
  237. $__default["default"].removeData(this._element, DATA_KEY$a);
  238. this._element = null;
  239. } // Private
  240. ;
  241. _proto._getRootElement = function _getRootElement(element) {
  242. var selector = Util.getSelectorFromElement(element);
  243. var parent = false;
  244. if (selector) {
  245. parent = document.querySelector(selector);
  246. }
  247. if (!parent) {
  248. parent = $__default["default"](element).closest("." + CLASS_NAME_ALERT)[0];
  249. }
  250. return parent;
  251. };
  252. _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
  253. var closeEvent = $__default["default"].Event(EVENT_CLOSE);
  254. $__default["default"](element).trigger(closeEvent);
  255. return closeEvent;
  256. };
  257. _proto._removeElement = function _removeElement(element) {
  258. var _this = this;
  259. $__default["default"](element).removeClass(CLASS_NAME_SHOW$7);
  260. if (!$__default["default"](element).hasClass(CLASS_NAME_FADE$5)) {
  261. this._destroyElement(element);
  262. return;
  263. }
  264. var transitionDuration = Util.getTransitionDurationFromElement(element);
  265. $__default["default"](element).one(Util.TRANSITION_END, function (event) {
  266. return _this._destroyElement(element, event);
  267. }).emulateTransitionEnd(transitionDuration);
  268. };
  269. _proto._destroyElement = function _destroyElement(element) {
  270. $__default["default"](element).detach().trigger(EVENT_CLOSED).remove();
  271. } // Static
  272. ;
  273. Alert._jQueryInterface = function _jQueryInterface(config) {
  274. return this.each(function () {
  275. var $element = $__default["default"](this);
  276. var data = $element.data(DATA_KEY$a);
  277. if (!data) {
  278. data = new Alert(this);
  279. $element.data(DATA_KEY$a, data);
  280. }
  281. if (config === 'close') {
  282. data[config](this);
  283. }
  284. });
  285. };
  286. Alert._handleDismiss = function _handleDismiss(alertInstance) {
  287. return function (event) {
  288. if (event) {
  289. event.preventDefault();
  290. }
  291. alertInstance.close(this);
  292. };
  293. };
  294. _createClass(Alert, null, [{
  295. key: "VERSION",
  296. get: function get() {
  297. return VERSION$a;
  298. }
  299. }]);
  300. return Alert;
  301. }();
  302. /**
  303. * Data API implementation
  304. */
  305. $__default["default"](document).on(EVENT_CLICK_DATA_API$6, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
  306. /**
  307. * jQuery
  308. */
  309. $__default["default"].fn[NAME$a] = Alert._jQueryInterface;
  310. $__default["default"].fn[NAME$a].Constructor = Alert;
  311. $__default["default"].fn[NAME$a].noConflict = function () {
  312. $__default["default"].fn[NAME$a] = JQUERY_NO_CONFLICT$a;
  313. return Alert._jQueryInterface;
  314. };
  315. /**
  316. * Constants
  317. */
  318. var NAME$9 = 'button';
  319. var VERSION$9 = '4.6.2';
  320. var DATA_KEY$9 = 'bs.button';
  321. var EVENT_KEY$9 = "." + DATA_KEY$9;
  322. var DATA_API_KEY$6 = '.data-api';
  323. var JQUERY_NO_CONFLICT$9 = $__default["default"].fn[NAME$9];
  324. var CLASS_NAME_ACTIVE$3 = 'active';
  325. var CLASS_NAME_BUTTON = 'btn';
  326. var CLASS_NAME_FOCUS = 'focus';
  327. var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$9 + DATA_API_KEY$6;
  328. var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$9 + DATA_API_KEY$6 + " " + ("blur" + EVENT_KEY$9 + DATA_API_KEY$6);
  329. var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$9 + DATA_API_KEY$6;
  330. var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
  331. var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
  332. var SELECTOR_DATA_TOGGLE$4 = '[data-toggle="button"]';
  333. var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
  334. var SELECTOR_INPUT = 'input:not([type="hidden"])';
  335. var SELECTOR_ACTIVE$2 = '.active';
  336. var SELECTOR_BUTTON = '.btn';
  337. /**
  338. * Class definition
  339. */
  340. var Button = /*#__PURE__*/function () {
  341. function Button(element) {
  342. this._element = element;
  343. this.shouldAvoidTriggerChange = false;
  344. } // Getters
  345. var _proto = Button.prototype;
  346. // Public
  347. _proto.toggle = function toggle() {
  348. var triggerChangeEvent = true;
  349. var addAriaPressed = true;
  350. var rootElement = $__default["default"](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
  351. if (rootElement) {
  352. var input = this._element.querySelector(SELECTOR_INPUT);
  353. if (input) {
  354. if (input.type === 'radio') {
  355. if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE$3)) {
  356. triggerChangeEvent = false;
  357. } else {
  358. var activeElement = rootElement.querySelector(SELECTOR_ACTIVE$2);
  359. if (activeElement) {
  360. $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$3);
  361. }
  362. }
  363. }
  364. if (triggerChangeEvent) {
  365. // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
  366. if (input.type === 'checkbox' || input.type === 'radio') {
  367. input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE$3);
  368. }
  369. if (!this.shouldAvoidTriggerChange) {
  370. $__default["default"](input).trigger('change');
  371. }
  372. }
  373. input.focus();
  374. addAriaPressed = false;
  375. }
  376. }
  377. if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
  378. if (addAriaPressed) {
  379. this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE$3));
  380. }
  381. if (triggerChangeEvent) {
  382. $__default["default"](this._element).toggleClass(CLASS_NAME_ACTIVE$3);
  383. }
  384. }
  385. };
  386. _proto.dispose = function dispose() {
  387. $__default["default"].removeData(this._element, DATA_KEY$9);
  388. this._element = null;
  389. } // Static
  390. ;
  391. Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
  392. return this.each(function () {
  393. var $element = $__default["default"](this);
  394. var data = $element.data(DATA_KEY$9);
  395. if (!data) {
  396. data = new Button(this);
  397. $element.data(DATA_KEY$9, data);
  398. }
  399. data.shouldAvoidTriggerChange = avoidTriggerChange;
  400. if (config === 'toggle') {
  401. data[config]();
  402. }
  403. });
  404. };
  405. _createClass(Button, null, [{
  406. key: "VERSION",
  407. get: function get() {
  408. return VERSION$9;
  409. }
  410. }]);
  411. return Button;
  412. }();
  413. /**
  414. * Data API implementation
  415. */
  416. $__default["default"](document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
  417. var button = event.target;
  418. var initialButton = button;
  419. if (!$__default["default"](button).hasClass(CLASS_NAME_BUTTON)) {
  420. button = $__default["default"](button).closest(SELECTOR_BUTTON)[0];
  421. }
  422. if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
  423. event.preventDefault(); // work around Firefox bug #1540995
  424. } else {
  425. var inputBtn = button.querySelector(SELECTOR_INPUT);
  426. if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
  427. event.preventDefault(); // work around Firefox bug #1540995
  428. return;
  429. }
  430. if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
  431. Button._jQueryInterface.call($__default["default"](button), 'toggle', initialButton.tagName === 'INPUT');
  432. }
  433. }
  434. }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
  435. var button = $__default["default"](event.target).closest(SELECTOR_BUTTON)[0];
  436. $__default["default"](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
  437. });
  438. $__default["default"](window).on(EVENT_LOAD_DATA_API$2, function () {
  439. // ensure correct active class is set to match the controls' actual values/states
  440. // find all checkboxes/readio buttons inside data-toggle groups
  441. var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
  442. for (var i = 0, len = buttons.length; i < len; i++) {
  443. var button = buttons[i];
  444. var input = button.querySelector(SELECTOR_INPUT);
  445. if (input.checked || input.hasAttribute('checked')) {
  446. button.classList.add(CLASS_NAME_ACTIVE$3);
  447. } else {
  448. button.classList.remove(CLASS_NAME_ACTIVE$3);
  449. }
  450. } // find all button toggles
  451. buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$4));
  452. for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
  453. var _button = buttons[_i];
  454. if (_button.getAttribute('aria-pressed') === 'true') {
  455. _button.classList.add(CLASS_NAME_ACTIVE$3);
  456. } else {
  457. _button.classList.remove(CLASS_NAME_ACTIVE$3);
  458. }
  459. }
  460. });
  461. /**
  462. * jQuery
  463. */
  464. $__default["default"].fn[NAME$9] = Button._jQueryInterface;
  465. $__default["default"].fn[NAME$9].Constructor = Button;
  466. $__default["default"].fn[NAME$9].noConflict = function () {
  467. $__default["default"].fn[NAME$9] = JQUERY_NO_CONFLICT$9;
  468. return Button._jQueryInterface;
  469. };
  470. /**
  471. * Constants
  472. */
  473. var NAME$8 = 'carousel';
  474. var VERSION$8 = '4.6.2';
  475. var DATA_KEY$8 = 'bs.carousel';
  476. var EVENT_KEY$8 = "." + DATA_KEY$8;
  477. var DATA_API_KEY$5 = '.data-api';
  478. var JQUERY_NO_CONFLICT$8 = $__default["default"].fn[NAME$8];
  479. var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
  480. var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
  481. var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
  482. var SWIPE_THRESHOLD = 40;
  483. var CLASS_NAME_CAROUSEL = 'carousel';
  484. var CLASS_NAME_ACTIVE$2 = 'active';
  485. var CLASS_NAME_SLIDE = 'slide';
  486. var CLASS_NAME_RIGHT = 'carousel-item-right';
  487. var CLASS_NAME_LEFT = 'carousel-item-left';
  488. var CLASS_NAME_NEXT = 'carousel-item-next';
  489. var CLASS_NAME_PREV = 'carousel-item-prev';
  490. var CLASS_NAME_POINTER_EVENT = 'pointer-event';
  491. var DIRECTION_NEXT = 'next';
  492. var DIRECTION_PREV = 'prev';
  493. var DIRECTION_LEFT = 'left';
  494. var DIRECTION_RIGHT = 'right';
  495. var EVENT_SLIDE = "slide" + EVENT_KEY$8;
  496. var EVENT_SLID = "slid" + EVENT_KEY$8;
  497. var EVENT_KEYDOWN = "keydown" + EVENT_KEY$8;
  498. var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$8;
  499. var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$8;
  500. var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$8;
  501. var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$8;
  502. var EVENT_TOUCHEND = "touchend" + EVENT_KEY$8;
  503. var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$8;
  504. var EVENT_POINTERUP = "pointerup" + EVENT_KEY$8;
  505. var EVENT_DRAG_START = "dragstart" + EVENT_KEY$8;
  506. var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$8 + DATA_API_KEY$5;
  507. var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$8 + DATA_API_KEY$5;
  508. var SELECTOR_ACTIVE$1 = '.active';
  509. var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
  510. var SELECTOR_ITEM = '.carousel-item';
  511. var SELECTOR_ITEM_IMG = '.carousel-item img';
  512. var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
  513. var SELECTOR_INDICATORS = '.carousel-indicators';
  514. var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
  515. var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
  516. var Default$7 = {
  517. interval: 5000,
  518. keyboard: true,
  519. slide: false,
  520. pause: 'hover',
  521. wrap: true,
  522. touch: true
  523. };
  524. var DefaultType$7 = {
  525. interval: '(number|boolean)',
  526. keyboard: 'boolean',
  527. slide: '(boolean|string)',
  528. pause: '(string|boolean)',
  529. wrap: 'boolean',
  530. touch: 'boolean'
  531. };
  532. var PointerType = {
  533. TOUCH: 'touch',
  534. PEN: 'pen'
  535. };
  536. /**
  537. * Class definition
  538. */
  539. var Carousel = /*#__PURE__*/function () {
  540. function Carousel(element, config) {
  541. this._items = null;
  542. this._interval = null;
  543. this._activeElement = null;
  544. this._isPaused = false;
  545. this._isSliding = false;
  546. this.touchTimeout = null;
  547. this.touchStartX = 0;
  548. this.touchDeltaX = 0;
  549. this._config = this._getConfig(config);
  550. this._element = element;
  551. this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
  552. this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
  553. this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
  554. this._addEventListeners();
  555. } // Getters
  556. var _proto = Carousel.prototype;
  557. // Public
  558. _proto.next = function next() {
  559. if (!this._isSliding) {
  560. this._slide(DIRECTION_NEXT);
  561. }
  562. };
  563. _proto.nextWhenVisible = function nextWhenVisible() {
  564. var $element = $__default["default"](this._element); // Don't call next when the page isn't visible
  565. // or the carousel or its parent isn't visible
  566. if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
  567. this.next();
  568. }
  569. };
  570. _proto.prev = function prev() {
  571. if (!this._isSliding) {
  572. this._slide(DIRECTION_PREV);
  573. }
  574. };
  575. _proto.pause = function pause(event) {
  576. if (!event) {
  577. this._isPaused = true;
  578. }
  579. if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
  580. Util.triggerTransitionEnd(this._element);
  581. this.cycle(true);
  582. }
  583. clearInterval(this._interval);
  584. this._interval = null;
  585. };
  586. _proto.cycle = function cycle(event) {
  587. if (!event) {
  588. this._isPaused = false;
  589. }
  590. if (this._interval) {
  591. clearInterval(this._interval);
  592. this._interval = null;
  593. }
  594. if (this._config.interval && !this._isPaused) {
  595. this._updateInterval();
  596. this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
  597. }
  598. };
  599. _proto.to = function to(index) {
  600. var _this = this;
  601. this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  602. var activeIndex = this._getItemIndex(this._activeElement);
  603. if (index > this._items.length - 1 || index < 0) {
  604. return;
  605. }
  606. if (this._isSliding) {
  607. $__default["default"](this._element).one(EVENT_SLID, function () {
  608. return _this.to(index);
  609. });
  610. return;
  611. }
  612. if (activeIndex === index) {
  613. this.pause();
  614. this.cycle();
  615. return;
  616. }
  617. var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
  618. this._slide(direction, this._items[index]);
  619. };
  620. _proto.dispose = function dispose() {
  621. $__default["default"](this._element).off(EVENT_KEY$8);
  622. $__default["default"].removeData(this._element, DATA_KEY$8);
  623. this._items = null;
  624. this._config = null;
  625. this._element = null;
  626. this._interval = null;
  627. this._isPaused = null;
  628. this._isSliding = null;
  629. this._activeElement = null;
  630. this._indicatorsElement = null;
  631. } // Private
  632. ;
  633. _proto._getConfig = function _getConfig(config) {
  634. config = _extends({}, Default$7, config);
  635. Util.typeCheckConfig(NAME$8, config, DefaultType$7);
  636. return config;
  637. };
  638. _proto._handleSwipe = function _handleSwipe() {
  639. var absDeltax = Math.abs(this.touchDeltaX);
  640. if (absDeltax <= SWIPE_THRESHOLD) {
  641. return;
  642. }
  643. var direction = absDeltax / this.touchDeltaX;
  644. this.touchDeltaX = 0; // swipe left
  645. if (direction > 0) {
  646. this.prev();
  647. } // swipe right
  648. if (direction < 0) {
  649. this.next();
  650. }
  651. };
  652. _proto._addEventListeners = function _addEventListeners() {
  653. var _this2 = this;
  654. if (this._config.keyboard) {
  655. $__default["default"](this._element).on(EVENT_KEYDOWN, function (event) {
  656. return _this2._keydown(event);
  657. });
  658. }
  659. if (this._config.pause === 'hover') {
  660. $__default["default"](this._element).on(EVENT_MOUSEENTER, function (event) {
  661. return _this2.pause(event);
  662. }).on(EVENT_MOUSELEAVE, function (event) {
  663. return _this2.cycle(event);
  664. });
  665. }
  666. if (this._config.touch) {
  667. this._addTouchEventListeners();
  668. }
  669. };
  670. _proto._addTouchEventListeners = function _addTouchEventListeners() {
  671. var _this3 = this;
  672. if (!this._touchSupported) {
  673. return;
  674. }
  675. var start = function start(event) {
  676. if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
  677. _this3.touchStartX = event.originalEvent.clientX;
  678. } else if (!_this3._pointerEvent) {
  679. _this3.touchStartX = event.originalEvent.touches[0].clientX;
  680. }
  681. };
  682. var move = function move(event) {
  683. // ensure swiping with one touch and not pinching
  684. _this3.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ? 0 : event.originalEvent.touches[0].clientX - _this3.touchStartX;
  685. };
  686. var end = function end(event) {
  687. if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
  688. _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
  689. }
  690. _this3._handleSwipe();
  691. if (_this3._config.pause === 'hover') {
  692. // If it's a touch-enabled device, mouseenter/leave are fired as
  693. // part of the mouse compatibility events on first tap - the carousel
  694. // would stop cycling until user tapped out of it;
  695. // here, we listen for touchend, explicitly pause the carousel
  696. // (as if it's the second time we tap on it, mouseenter compat event
  697. // is NOT fired) and after a timeout (to allow for mouse compatibility
  698. // events to fire) we explicitly restart cycling
  699. _this3.pause();
  700. if (_this3.touchTimeout) {
  701. clearTimeout(_this3.touchTimeout);
  702. }
  703. _this3.touchTimeout = setTimeout(function (event) {
  704. return _this3.cycle(event);
  705. }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
  706. }
  707. };
  708. $__default["default"](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
  709. return e.preventDefault();
  710. });
  711. if (this._pointerEvent) {
  712. $__default["default"](this._element).on(EVENT_POINTERDOWN, function (event) {
  713. return start(event);
  714. });
  715. $__default["default"](this._element).on(EVENT_POINTERUP, function (event) {
  716. return end(event);
  717. });
  718. this._element.classList.add(CLASS_NAME_POINTER_EVENT);
  719. } else {
  720. $__default["default"](this._element).on(EVENT_TOUCHSTART, function (event) {
  721. return start(event);
  722. });
  723. $__default["default"](this._element).on(EVENT_TOUCHMOVE, function (event) {
  724. return move(event);
  725. });
  726. $__default["default"](this._element).on(EVENT_TOUCHEND, function (event) {
  727. return end(event);
  728. });
  729. }
  730. };
  731. _proto._keydown = function _keydown(event) {
  732. if (/input|textarea/i.test(event.target.tagName)) {
  733. return;
  734. }
  735. switch (event.which) {
  736. case ARROW_LEFT_KEYCODE:
  737. event.preventDefault();
  738. this.prev();
  739. break;
  740. case ARROW_RIGHT_KEYCODE:
  741. event.preventDefault();
  742. this.next();
  743. break;
  744. }
  745. };
  746. _proto._getItemIndex = function _getItemIndex(element) {
  747. this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
  748. return this._items.indexOf(element);
  749. };
  750. _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
  751. var isNextDirection = direction === DIRECTION_NEXT;
  752. var isPrevDirection = direction === DIRECTION_PREV;
  753. var activeIndex = this._getItemIndex(activeElement);
  754. var lastItemIndex = this._items.length - 1;
  755. var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
  756. if (isGoingToWrap && !this._config.wrap) {
  757. return activeElement;
  758. }
  759. var delta = direction === DIRECTION_PREV ? -1 : 1;
  760. var itemIndex = (activeIndex + delta) % this._items.length;
  761. return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
  762. };
  763. _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
  764. var targetIndex = this._getItemIndex(relatedTarget);
  765. var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
  766. var slideEvent = $__default["default"].Event(EVENT_SLIDE, {
  767. relatedTarget: relatedTarget,
  768. direction: eventDirectionName,
  769. from: fromIndex,
  770. to: targetIndex
  771. });
  772. $__default["default"](this._element).trigger(slideEvent);
  773. return slideEvent;
  774. };
  775. _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
  776. if (this._indicatorsElement) {
  777. var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE$1));
  778. $__default["default"](indicators).removeClass(CLASS_NAME_ACTIVE$2);
  779. var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
  780. if (nextIndicator) {
  781. $__default["default"](nextIndicator).addClass(CLASS_NAME_ACTIVE$2);
  782. }
  783. }
  784. };
  785. _proto._updateInterval = function _updateInterval() {
  786. var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  787. if (!element) {
  788. return;
  789. }
  790. var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
  791. if (elementInterval) {
  792. this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
  793. this._config.interval = elementInterval;
  794. } else {
  795. this._config.interval = this._config.defaultInterval || this._config.interval;
  796. }
  797. };
  798. _proto._slide = function _slide(direction, element) {
  799. var _this4 = this;
  800. var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  801. var activeElementIndex = this._getItemIndex(activeElement);
  802. var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
  803. var nextElementIndex = this._getItemIndex(nextElement);
  804. var isCycling = Boolean(this._interval);
  805. var directionalClassName;
  806. var orderClassName;
  807. var eventDirectionName;
  808. if (direction === DIRECTION_NEXT) {
  809. directionalClassName = CLASS_NAME_LEFT;
  810. orderClassName = CLASS_NAME_NEXT;
  811. eventDirectionName = DIRECTION_LEFT;
  812. } else {
  813. directionalClassName = CLASS_NAME_RIGHT;
  814. orderClassName = CLASS_NAME_PREV;
  815. eventDirectionName = DIRECTION_RIGHT;
  816. }
  817. if (nextElement && $__default["default"](nextElement).hasClass(CLASS_NAME_ACTIVE$2)) {
  818. this._isSliding = false;
  819. return;
  820. }
  821. var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
  822. if (slideEvent.isDefaultPrevented()) {
  823. return;
  824. }
  825. if (!activeElement || !nextElement) {
  826. // Some weirdness is happening, so we bail
  827. return;
  828. }
  829. this._isSliding = true;
  830. if (isCycling) {
  831. this.pause();
  832. }
  833. this._setActiveIndicatorElement(nextElement);
  834. this._activeElement = nextElement;
  835. var slidEvent = $__default["default"].Event(EVENT_SLID, {
  836. relatedTarget: nextElement,
  837. direction: eventDirectionName,
  838. from: activeElementIndex,
  839. to: nextElementIndex
  840. });
  841. if ($__default["default"](this._element).hasClass(CLASS_NAME_SLIDE)) {
  842. $__default["default"](nextElement).addClass(orderClassName);
  843. Util.reflow(nextElement);
  844. $__default["default"](activeElement).addClass(directionalClassName);
  845. $__default["default"](nextElement).addClass(directionalClassName);
  846. var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
  847. $__default["default"](activeElement).one(Util.TRANSITION_END, function () {
  848. $__default["default"](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$2);
  849. $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2 + " " + orderClassName + " " + directionalClassName);
  850. _this4._isSliding = false;
  851. setTimeout(function () {
  852. return $__default["default"](_this4._element).trigger(slidEvent);
  853. }, 0);
  854. }).emulateTransitionEnd(transitionDuration);
  855. } else {
  856. $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2);
  857. $__default["default"](nextElement).addClass(CLASS_NAME_ACTIVE$2);
  858. this._isSliding = false;
  859. $__default["default"](this._element).trigger(slidEvent);
  860. }
  861. if (isCycling) {
  862. this.cycle();
  863. }
  864. } // Static
  865. ;
  866. Carousel._jQueryInterface = function _jQueryInterface(config) {
  867. return this.each(function () {
  868. var data = $__default["default"](this).data(DATA_KEY$8);
  869. var _config = _extends({}, Default$7, $__default["default"](this).data());
  870. if (typeof config === 'object') {
  871. _config = _extends({}, _config, config);
  872. }
  873. var action = typeof config === 'string' ? config : _config.slide;
  874. if (!data) {
  875. data = new Carousel(this, _config);
  876. $__default["default"](this).data(DATA_KEY$8, data);
  877. }
  878. if (typeof config === 'number') {
  879. data.to(config);
  880. } else if (typeof action === 'string') {
  881. if (typeof data[action] === 'undefined') {
  882. throw new TypeError("No method named \"" + action + "\"");
  883. }
  884. data[action]();
  885. } else if (_config.interval && _config.ride) {
  886. data.pause();
  887. data.cycle();
  888. }
  889. });
  890. };
  891. Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
  892. var selector = Util.getSelectorFromElement(this);
  893. if (!selector) {
  894. return;
  895. }
  896. var target = $__default["default"](selector)[0];
  897. if (!target || !$__default["default"](target).hasClass(CLASS_NAME_CAROUSEL)) {
  898. return;
  899. }
  900. var config = _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
  901. var slideIndex = this.getAttribute('data-slide-to');
  902. if (slideIndex) {
  903. config.interval = false;
  904. }
  905. Carousel._jQueryInterface.call($__default["default"](target), config);
  906. if (slideIndex) {
  907. $__default["default"](target).data(DATA_KEY$8).to(slideIndex);
  908. }
  909. event.preventDefault();
  910. };
  911. _createClass(Carousel, null, [{
  912. key: "VERSION",
  913. get: function get() {
  914. return VERSION$8;
  915. }
  916. }, {
  917. key: "Default",
  918. get: function get() {
  919. return Default$7;
  920. }
  921. }]);
  922. return Carousel;
  923. }();
  924. /**
  925. * Data API implementation
  926. */
  927. $__default["default"](document).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
  928. $__default["default"](window).on(EVENT_LOAD_DATA_API$1, function () {
  929. var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
  930. for (var i = 0, len = carousels.length; i < len; i++) {
  931. var $carousel = $__default["default"](carousels[i]);
  932. Carousel._jQueryInterface.call($carousel, $carousel.data());
  933. }
  934. });
  935. /**
  936. * jQuery
  937. */
  938. $__default["default"].fn[NAME$8] = Carousel._jQueryInterface;
  939. $__default["default"].fn[NAME$8].Constructor = Carousel;
  940. $__default["default"].fn[NAME$8].noConflict = function () {
  941. $__default["default"].fn[NAME$8] = JQUERY_NO_CONFLICT$8;
  942. return Carousel._jQueryInterface;
  943. };
  944. /**
  945. * Constants
  946. */
  947. var NAME$7 = 'collapse';
  948. var VERSION$7 = '4.6.2';
  949. var DATA_KEY$7 = 'bs.collapse';
  950. var EVENT_KEY$7 = "." + DATA_KEY$7;
  951. var DATA_API_KEY$4 = '.data-api';
  952. var JQUERY_NO_CONFLICT$7 = $__default["default"].fn[NAME$7];
  953. var CLASS_NAME_SHOW$6 = 'show';
  954. var CLASS_NAME_COLLAPSE = 'collapse';
  955. var CLASS_NAME_COLLAPSING = 'collapsing';
  956. var CLASS_NAME_COLLAPSED = 'collapsed';
  957. var DIMENSION_WIDTH = 'width';
  958. var DIMENSION_HEIGHT = 'height';
  959. var EVENT_SHOW$4 = "show" + EVENT_KEY$7;
  960. var EVENT_SHOWN$4 = "shown" + EVENT_KEY$7;
  961. var EVENT_HIDE$4 = "hide" + EVENT_KEY$7;
  962. var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$7;
  963. var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$7 + DATA_API_KEY$4;
  964. var SELECTOR_ACTIVES = '.show, .collapsing';
  965. var SELECTOR_DATA_TOGGLE$3 = '[data-toggle="collapse"]';
  966. var Default$6 = {
  967. toggle: true,
  968. parent: ''
  969. };
  970. var DefaultType$6 = {
  971. toggle: 'boolean',
  972. parent: '(string|element)'
  973. };
  974. /**
  975. * Class definition
  976. */
  977. var Collapse = /*#__PURE__*/function () {
  978. function Collapse(element, config) {
  979. this._isTransitioning = false;
  980. this._element = element;
  981. this._config = this._getConfig(config);
  982. this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
  983. var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$3));
  984. for (var i = 0, len = toggleList.length; i < len; i++) {
  985. var elem = toggleList[i];
  986. var selector = Util.getSelectorFromElement(elem);
  987. var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
  988. return foundElem === element;
  989. });
  990. if (selector !== null && filterElement.length > 0) {
  991. this._selector = selector;
  992. this._triggerArray.push(elem);
  993. }
  994. }
  995. this._parent = this._config.parent ? this._getParent() : null;
  996. if (!this._config.parent) {
  997. this._addAriaAndCollapsedClass(this._element, this._triggerArray);
  998. }
  999. if (this._config.toggle) {
  1000. this.toggle();
  1001. }
  1002. } // Getters
  1003. var _proto = Collapse.prototype;
  1004. // Public
  1005. _proto.toggle = function toggle() {
  1006. if ($__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
  1007. this.hide();
  1008. } else {
  1009. this.show();
  1010. }
  1011. };
  1012. _proto.show = function show() {
  1013. var _this = this;
  1014. if (this._isTransitioning || $__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
  1015. return;
  1016. }
  1017. var actives;
  1018. var activesData;
  1019. if (this._parent) {
  1020. actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
  1021. if (typeof _this._config.parent === 'string') {
  1022. return elem.getAttribute('data-parent') === _this._config.parent;
  1023. }
  1024. return elem.classList.contains(CLASS_NAME_COLLAPSE);
  1025. });
  1026. if (actives.length === 0) {
  1027. actives = null;
  1028. }
  1029. }
  1030. if (actives) {
  1031. activesData = $__default["default"](actives).not(this._selector).data(DATA_KEY$7);
  1032. if (activesData && activesData._isTransitioning) {
  1033. return;
  1034. }
  1035. }
  1036. var startEvent = $__default["default"].Event(EVENT_SHOW$4);
  1037. $__default["default"](this._element).trigger(startEvent);
  1038. if (startEvent.isDefaultPrevented()) {
  1039. return;
  1040. }
  1041. if (actives) {
  1042. Collapse._jQueryInterface.call($__default["default"](actives).not(this._selector), 'hide');
  1043. if (!activesData) {
  1044. $__default["default"](actives).data(DATA_KEY$7, null);
  1045. }
  1046. }
  1047. var dimension = this._getDimension();
  1048. $__default["default"](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
  1049. this._element.style[dimension] = 0;
  1050. if (this._triggerArray.length) {
  1051. $__default["default"](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
  1052. }
  1053. this.setTransitioning(true);
  1054. var complete = function complete() {
  1055. $__default["default"](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6);
  1056. _this._element.style[dimension] = '';
  1057. _this.setTransitioning(false);
  1058. $__default["default"](_this._element).trigger(EVENT_SHOWN$4);
  1059. };
  1060. var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
  1061. var scrollSize = "scroll" + capitalizedDimension;
  1062. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  1063. $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  1064. this._element.style[dimension] = this._element[scrollSize] + "px";
  1065. };
  1066. _proto.hide = function hide() {
  1067. var _this2 = this;
  1068. if (this._isTransitioning || !$__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
  1069. return;
  1070. }
  1071. var startEvent = $__default["default"].Event(EVENT_HIDE$4);
  1072. $__default["default"](this._element).trigger(startEvent);
  1073. if (startEvent.isDefaultPrevented()) {
  1074. return;
  1075. }
  1076. var dimension = this._getDimension();
  1077. this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
  1078. Util.reflow(this._element);
  1079. $__default["default"](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6);
  1080. var triggerArrayLength = this._triggerArray.length;
  1081. if (triggerArrayLength > 0) {
  1082. for (var i = 0; i < triggerArrayLength; i++) {
  1083. var trigger = this._triggerArray[i];
  1084. var selector = Util.getSelectorFromElement(trigger);
  1085. if (selector !== null) {
  1086. var $elem = $__default["default"]([].slice.call(document.querySelectorAll(selector)));
  1087. if (!$elem.hasClass(CLASS_NAME_SHOW$6)) {
  1088. $__default["default"](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
  1089. }
  1090. }
  1091. }
  1092. }
  1093. this.setTransitioning(true);
  1094. var complete = function complete() {
  1095. _this2.setTransitioning(false);
  1096. $__default["default"](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN$4);
  1097. };
  1098. this._element.style[dimension] = '';
  1099. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  1100. $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  1101. };
  1102. _proto.setTransitioning = function setTransitioning(isTransitioning) {
  1103. this._isTransitioning = isTransitioning;
  1104. };
  1105. _proto.dispose = function dispose() {
  1106. $__default["default"].removeData(this._element, DATA_KEY$7);
  1107. this._config = null;
  1108. this._parent = null;
  1109. this._element = null;
  1110. this._triggerArray = null;
  1111. this._isTransitioning = null;
  1112. } // Private
  1113. ;
  1114. _proto._getConfig = function _getConfig(config) {
  1115. config = _extends({}, Default$6, config);
  1116. config.toggle = Boolean(config.toggle); // Coerce string values
  1117. Util.typeCheckConfig(NAME$7, config, DefaultType$6);
  1118. return config;
  1119. };
  1120. _proto._getDimension = function _getDimension() {
  1121. var hasWidth = $__default["default"](this._element).hasClass(DIMENSION_WIDTH);
  1122. return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
  1123. };
  1124. _proto._getParent = function _getParent() {
  1125. var _this3 = this;
  1126. var parent;
  1127. if (Util.isElement(this._config.parent)) {
  1128. parent = this._config.parent; // It's a jQuery object
  1129. if (typeof this._config.parent.jquery !== 'undefined') {
  1130. parent = this._config.parent[0];
  1131. }
  1132. } else {
  1133. parent = document.querySelector(this._config.parent);
  1134. }
  1135. var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
  1136. var children = [].slice.call(parent.querySelectorAll(selector));
  1137. $__default["default"](children).each(function (i, element) {
  1138. _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
  1139. });
  1140. return parent;
  1141. };
  1142. _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
  1143. var isOpen = $__default["default"](element).hasClass(CLASS_NAME_SHOW$6);
  1144. if (triggerArray.length) {
  1145. $__default["default"](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
  1146. }
  1147. } // Static
  1148. ;
  1149. Collapse._getTargetFromElement = function _getTargetFromElement(element) {
  1150. var selector = Util.getSelectorFromElement(element);
  1151. return selector ? document.querySelector(selector) : null;
  1152. };
  1153. Collapse._jQueryInterface = function _jQueryInterface(config) {
  1154. return this.each(function () {
  1155. var $element = $__default["default"](this);
  1156. var data = $element.data(DATA_KEY$7);
  1157. var _config = _extends({}, Default$6, $element.data(), typeof config === 'object' && config ? config : {});
  1158. if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
  1159. _config.toggle = false;
  1160. }
  1161. if (!data) {
  1162. data = new Collapse(this, _config);
  1163. $element.data(DATA_KEY$7, data);
  1164. }
  1165. if (typeof config === 'string') {
  1166. if (typeof data[config] === 'undefined') {
  1167. throw new TypeError("No method named \"" + config + "\"");
  1168. }
  1169. data[config]();
  1170. }
  1171. });
  1172. };
  1173. _createClass(Collapse, null, [{
  1174. key: "VERSION",
  1175. get: function get() {
  1176. return VERSION$7;
  1177. }
  1178. }, {
  1179. key: "Default",
  1180. get: function get() {
  1181. return Default$6;
  1182. }
  1183. }]);
  1184. return Collapse;
  1185. }();
  1186. /**
  1187. * Data API implementation
  1188. */
  1189. $__default["default"](document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
  1190. // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
  1191. if (event.currentTarget.tagName === 'A') {
  1192. event.preventDefault();
  1193. }
  1194. var $trigger = $__default["default"](this);
  1195. var selector = Util.getSelectorFromElement(this);
  1196. var selectors = [].slice.call(document.querySelectorAll(selector));
  1197. $__default["default"](selectors).each(function () {
  1198. var $target = $__default["default"](this);
  1199. var data = $target.data(DATA_KEY$7);
  1200. var config = data ? 'toggle' : $trigger.data();
  1201. Collapse._jQueryInterface.call($target, config);
  1202. });
  1203. });
  1204. /**
  1205. * jQuery
  1206. */
  1207. $__default["default"].fn[NAME$7] = Collapse._jQueryInterface;
  1208. $__default["default"].fn[NAME$7].Constructor = Collapse;
  1209. $__default["default"].fn[NAME$7].noConflict = function () {
  1210. $__default["default"].fn[NAME$7] = JQUERY_NO_CONFLICT$7;
  1211. return Collapse._jQueryInterface;
  1212. };
  1213. /**
  1214. * Constants
  1215. */
  1216. var NAME$6 = 'dropdown';
  1217. var VERSION$6 = '4.6.2';
  1218. var DATA_KEY$6 = 'bs.dropdown';
  1219. var EVENT_KEY$6 = "." + DATA_KEY$6;
  1220. var DATA_API_KEY$3 = '.data-api';
  1221. var JQUERY_NO_CONFLICT$6 = $__default["default"].fn[NAME$6];
  1222. var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
  1223. var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
  1224. var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
  1225. var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
  1226. var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
  1227. var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
  1228. var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE$1);
  1229. var CLASS_NAME_DISABLED$1 = 'disabled';
  1230. var CLASS_NAME_SHOW$5 = 'show';
  1231. var CLASS_NAME_DROPUP = 'dropup';
  1232. var CLASS_NAME_DROPRIGHT = 'dropright';
  1233. var CLASS_NAME_DROPLEFT = 'dropleft';
  1234. var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
  1235. var CLASS_NAME_POSITION_STATIC = 'position-static';
  1236. var EVENT_HIDE$3 = "hide" + EVENT_KEY$6;
  1237. var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$6;
  1238. var EVENT_SHOW$3 = "show" + EVENT_KEY$6;
  1239. var EVENT_SHOWN$3 = "shown" + EVENT_KEY$6;
  1240. var EVENT_CLICK = "click" + EVENT_KEY$6;
  1241. var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$6 + DATA_API_KEY$3;
  1242. var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$6 + DATA_API_KEY$3;
  1243. var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$6 + DATA_API_KEY$3;
  1244. var SELECTOR_DATA_TOGGLE$2 = '[data-toggle="dropdown"]';
  1245. var SELECTOR_FORM_CHILD = '.dropdown form';
  1246. var SELECTOR_MENU = '.dropdown-menu';
  1247. var SELECTOR_NAVBAR_NAV = '.navbar-nav';
  1248. var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
  1249. var PLACEMENT_TOP = 'top-start';
  1250. var PLACEMENT_TOPEND = 'top-end';
  1251. var PLACEMENT_BOTTOM = 'bottom-start';
  1252. var PLACEMENT_BOTTOMEND = 'bottom-end';
  1253. var PLACEMENT_RIGHT = 'right-start';
  1254. var PLACEMENT_LEFT = 'left-start';
  1255. var Default$5 = {
  1256. offset: 0,
  1257. flip: true,
  1258. boundary: 'scrollParent',
  1259. reference: 'toggle',
  1260. display: 'dynamic',
  1261. popperConfig: null
  1262. };
  1263. var DefaultType$5 = {
  1264. offset: '(number|string|function)',
  1265. flip: 'boolean',
  1266. boundary: '(string|element)',
  1267. reference: '(string|element)',
  1268. display: 'string',
  1269. popperConfig: '(null|object)'
  1270. };
  1271. /**
  1272. * Class definition
  1273. */
  1274. var Dropdown = /*#__PURE__*/function () {
  1275. function Dropdown(element, config) {
  1276. this._element = element;
  1277. this._popper = null;
  1278. this._config = this._getConfig(config);
  1279. this._menu = this._getMenuElement();
  1280. this._inNavbar = this._detectNavbar();
  1281. this._addEventListeners();
  1282. } // Getters
  1283. var _proto = Dropdown.prototype;
  1284. // Public
  1285. _proto.toggle = function toggle() {
  1286. if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1)) {
  1287. return;
  1288. }
  1289. var isActive = $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5);
  1290. Dropdown._clearMenus();
  1291. if (isActive) {
  1292. return;
  1293. }
  1294. this.show(true);
  1295. };
  1296. _proto.show = function show(usePopper) {
  1297. if (usePopper === void 0) {
  1298. usePopper = false;
  1299. }
  1300. if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) {
  1301. return;
  1302. }
  1303. var relatedTarget = {
  1304. relatedTarget: this._element
  1305. };
  1306. var showEvent = $__default["default"].Event(EVENT_SHOW$3, relatedTarget);
  1307. var parent = Dropdown._getParentFromElement(this._element);
  1308. $__default["default"](parent).trigger(showEvent);
  1309. if (showEvent.isDefaultPrevented()) {
  1310. return;
  1311. } // Totally disable Popper for Dropdowns in Navbar
  1312. if (!this._inNavbar && usePopper) {
  1313. // Check for Popper dependency
  1314. if (typeof Popper__default["default"] === 'undefined') {
  1315. throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
  1316. }
  1317. var referenceElement = this._element;
  1318. if (this._config.reference === 'parent') {
  1319. referenceElement = parent;
  1320. } else if (Util.isElement(this._config.reference)) {
  1321. referenceElement = this._config.reference; // Check if it's jQuery element
  1322. if (typeof this._config.reference.jquery !== 'undefined') {
  1323. referenceElement = this._config.reference[0];
  1324. }
  1325. } // If boundary is not `scrollParent`, then set position to `static`
  1326. // to allow the menu to "escape" the scroll parent's boundaries
  1327. // https://github.com/twbs/bootstrap/issues/24251
  1328. if (this._config.boundary !== 'scrollParent') {
  1329. $__default["default"](parent).addClass(CLASS_NAME_POSITION_STATIC);
  1330. }
  1331. this._popper = new Popper__default["default"](referenceElement, this._menu, this._getPopperConfig());
  1332. } // If this is a touch-enabled device we add extra
  1333. // empty mouseover listeners to the body's immediate children;
  1334. // only needed because of broken event delegation on iOS
  1335. // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
  1336. if ('ontouchstart' in document.documentElement && $__default["default"](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
  1337. $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
  1338. }
  1339. this._element.focus();
  1340. this._element.setAttribute('aria-expanded', true);
  1341. $__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5);
  1342. $__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_SHOWN$3, relatedTarget));
  1343. };
  1344. _proto.hide = function hide() {
  1345. if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || !$__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) {
  1346. return;
  1347. }
  1348. var relatedTarget = {
  1349. relatedTarget: this._element
  1350. };
  1351. var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget);
  1352. var parent = Dropdown._getParentFromElement(this._element);
  1353. $__default["default"](parent).trigger(hideEvent);
  1354. if (hideEvent.isDefaultPrevented()) {
  1355. return;
  1356. }
  1357. if (this._popper) {
  1358. this._popper.destroy();
  1359. }
  1360. $__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5);
  1361. $__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget));
  1362. };
  1363. _proto.dispose = function dispose() {
  1364. $__default["default"].removeData(this._element, DATA_KEY$6);
  1365. $__default["default"](this._element).off(EVENT_KEY$6);
  1366. this._element = null;
  1367. this._menu = null;
  1368. if (this._popper !== null) {
  1369. this._popper.destroy();
  1370. this._popper = null;
  1371. }
  1372. };
  1373. _proto.update = function update() {
  1374. this._inNavbar = this._detectNavbar();
  1375. if (this._popper !== null) {
  1376. this._popper.scheduleUpdate();
  1377. }
  1378. } // Private
  1379. ;
  1380. _proto._addEventListeners = function _addEventListeners() {
  1381. var _this = this;
  1382. $__default["default"](this._element).on(EVENT_CLICK, function (event) {
  1383. event.preventDefault();
  1384. event.stopPropagation();
  1385. _this.toggle();
  1386. });
  1387. };
  1388. _proto._getConfig = function _getConfig(config) {
  1389. config = _extends({}, this.constructor.Default, $__default["default"](this._element).data(), config);
  1390. Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
  1391. return config;
  1392. };
  1393. _proto._getMenuElement = function _getMenuElement() {
  1394. if (!this._menu) {
  1395. var parent = Dropdown._getParentFromElement(this._element);
  1396. if (parent) {
  1397. this._menu = parent.querySelector(SELECTOR_MENU);
  1398. }
  1399. }
  1400. return this._menu;
  1401. };
  1402. _proto._getPlacement = function _getPlacement() {
  1403. var $parentDropdown = $__default["default"](this._element.parentNode);
  1404. var placement = PLACEMENT_BOTTOM; // Handle dropup
  1405. if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
  1406. placement = $__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
  1407. } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
  1408. placement = PLACEMENT_RIGHT;
  1409. } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
  1410. placement = PLACEMENT_LEFT;
  1411. } else if ($__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
  1412. placement = PLACEMENT_BOTTOMEND;
  1413. }
  1414. return placement;
  1415. };
  1416. _proto._detectNavbar = function _detectNavbar() {
  1417. return $__default["default"](this._element).closest('.navbar').length > 0;
  1418. };
  1419. _proto._getOffset = function _getOffset() {
  1420. var _this2 = this;
  1421. var offset = {};
  1422. if (typeof this._config.offset === 'function') {
  1423. offset.fn = function (data) {
  1424. data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element));
  1425. return data;
  1426. };
  1427. } else {
  1428. offset.offset = this._config.offset;
  1429. }
  1430. return offset;
  1431. };
  1432. _proto._getPopperConfig = function _getPopperConfig() {
  1433. var popperConfig = {
  1434. placement: this._getPlacement(),
  1435. modifiers: {
  1436. offset: this._getOffset(),
  1437. flip: {
  1438. enabled: this._config.flip
  1439. },
  1440. preventOverflow: {
  1441. boundariesElement: this._config.boundary
  1442. }
  1443. }
  1444. }; // Disable Popper if we have a static display
  1445. if (this._config.display === 'static') {
  1446. popperConfig.modifiers.applyStyle = {
  1447. enabled: false
  1448. };
  1449. }
  1450. return _extends({}, popperConfig, this._config.popperConfig);
  1451. } // Static
  1452. ;
  1453. Dropdown._jQueryInterface = function _jQueryInterface(config) {
  1454. return this.each(function () {
  1455. var data = $__default["default"](this).data(DATA_KEY$6);
  1456. var _config = typeof config === 'object' ? config : null;
  1457. if (!data) {
  1458. data = new Dropdown(this, _config);
  1459. $__default["default"](this).data(DATA_KEY$6, data);
  1460. }
  1461. if (typeof config === 'string') {
  1462. if (typeof data[config] === 'undefined') {
  1463. throw new TypeError("No method named \"" + config + "\"");
  1464. }
  1465. data[config]();
  1466. }
  1467. });
  1468. };
  1469. Dropdown._clearMenus = function _clearMenus(event) {
  1470. if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
  1471. return;
  1472. }
  1473. var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$2));
  1474. for (var i = 0, len = toggles.length; i < len; i++) {
  1475. var parent = Dropdown._getParentFromElement(toggles[i]);
  1476. var context = $__default["default"](toggles[i]).data(DATA_KEY$6);
  1477. var relatedTarget = {
  1478. relatedTarget: toggles[i]
  1479. };
  1480. if (event && event.type === 'click') {
  1481. relatedTarget.clickEvent = event;
  1482. }
  1483. if (!context) {
  1484. continue;
  1485. }
  1486. var dropdownMenu = context._menu;
  1487. if (!$__default["default"](parent).hasClass(CLASS_NAME_SHOW$5)) {
  1488. continue;
  1489. }
  1490. if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default["default"].contains(parent, event.target)) {
  1491. continue;
  1492. }
  1493. var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget);
  1494. $__default["default"](parent).trigger(hideEvent);
  1495. if (hideEvent.isDefaultPrevented()) {
  1496. continue;
  1497. } // If this is a touch-enabled device we remove the extra
  1498. // empty mouseover listeners we added for iOS support
  1499. if ('ontouchstart' in document.documentElement) {
  1500. $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
  1501. }
  1502. toggles[i].setAttribute('aria-expanded', 'false');
  1503. if (context._popper) {
  1504. context._popper.destroy();
  1505. }
  1506. $__default["default"](dropdownMenu).removeClass(CLASS_NAME_SHOW$5);
  1507. $__default["default"](parent).removeClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget));
  1508. }
  1509. };
  1510. Dropdown._getParentFromElement = function _getParentFromElement(element) {
  1511. var parent;
  1512. var selector = Util.getSelectorFromElement(element);
  1513. if (selector) {
  1514. parent = document.querySelector(selector);
  1515. }
  1516. return parent || element.parentNode;
  1517. } // eslint-disable-next-line complexity
  1518. ;
  1519. Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
  1520. // If not input/textarea:
  1521. // - And not a key in REGEXP_KEYDOWN => not a dropdown command
  1522. // If input/textarea:
  1523. // - If space key => not a dropdown command
  1524. // - If key is other than escape
  1525. // - If key is not up or down => not a dropdown command
  1526. // - If trigger inside the menu => not a dropdown command
  1527. if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE$1 && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default["default"](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
  1528. return;
  1529. }
  1530. if (this.disabled || $__default["default"](this).hasClass(CLASS_NAME_DISABLED$1)) {
  1531. return;
  1532. }
  1533. var parent = Dropdown._getParentFromElement(this);
  1534. var isActive = $__default["default"](parent).hasClass(CLASS_NAME_SHOW$5);
  1535. if (!isActive && event.which === ESCAPE_KEYCODE$1) {
  1536. return;
  1537. }
  1538. event.preventDefault();
  1539. event.stopPropagation();
  1540. if (!isActive || event.which === ESCAPE_KEYCODE$1 || event.which === SPACE_KEYCODE) {
  1541. if (event.which === ESCAPE_KEYCODE$1) {
  1542. $__default["default"](parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus');
  1543. }
  1544. $__default["default"](this).trigger('click');
  1545. return;
  1546. }
  1547. var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
  1548. return $__default["default"](item).is(':visible');
  1549. });
  1550. if (items.length === 0) {
  1551. return;
  1552. }
  1553. var index = items.indexOf(event.target);
  1554. if (event.which === ARROW_UP_KEYCODE && index > 0) {
  1555. // Up
  1556. index--;
  1557. }
  1558. if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
  1559. // Down
  1560. index++;
  1561. }
  1562. if (index < 0) {
  1563. index = 0;
  1564. }
  1565. items[index].focus();
  1566. };
  1567. _createClass(Dropdown, null, [{
  1568. key: "VERSION",
  1569. get: function get() {
  1570. return VERSION$6;
  1571. }
  1572. }, {
  1573. key: "Default",
  1574. get: function get() {
  1575. return Default$5;
  1576. }
  1577. }, {
  1578. key: "DefaultType",
  1579. get: function get() {
  1580. return DefaultType$5;
  1581. }
  1582. }]);
  1583. return Dropdown;
  1584. }();
  1585. /**
  1586. * Data API implementation
  1587. */
  1588. $__default["default"](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$2 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
  1589. event.preventDefault();
  1590. event.stopPropagation();
  1591. Dropdown._jQueryInterface.call($__default["default"](this), 'toggle');
  1592. }).on(EVENT_CLICK_DATA_API$2, SELECTOR_FORM_CHILD, function (e) {
  1593. e.stopPropagation();
  1594. });
  1595. /**
  1596. * jQuery
  1597. */
  1598. $__default["default"].fn[NAME$6] = Dropdown._jQueryInterface;
  1599. $__default["default"].fn[NAME$6].Constructor = Dropdown;
  1600. $__default["default"].fn[NAME$6].noConflict = function () {
  1601. $__default["default"].fn[NAME$6] = JQUERY_NO_CONFLICT$6;
  1602. return Dropdown._jQueryInterface;
  1603. };
  1604. /**
  1605. * Constants
  1606. */
  1607. var NAME$5 = 'modal';
  1608. var VERSION$5 = '4.6.2';
  1609. var DATA_KEY$5 = 'bs.modal';
  1610. var EVENT_KEY$5 = "." + DATA_KEY$5;
  1611. var DATA_API_KEY$2 = '.data-api';
  1612. var JQUERY_NO_CONFLICT$5 = $__default["default"].fn[NAME$5];
  1613. var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
  1614. var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
  1615. var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
  1616. var CLASS_NAME_BACKDROP = 'modal-backdrop';
  1617. var CLASS_NAME_OPEN = 'modal-open';
  1618. var CLASS_NAME_FADE$4 = 'fade';
  1619. var CLASS_NAME_SHOW$4 = 'show';
  1620. var CLASS_NAME_STATIC = 'modal-static';
  1621. var EVENT_HIDE$2 = "hide" + EVENT_KEY$5;
  1622. var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5;
  1623. var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5;
  1624. var EVENT_SHOW$2 = "show" + EVENT_KEY$5;
  1625. var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5;
  1626. var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5;
  1627. var EVENT_RESIZE = "resize" + EVENT_KEY$5;
  1628. var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$5;
  1629. var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5;
  1630. var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
  1631. var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
  1632. var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$5 + DATA_API_KEY$2;
  1633. var SELECTOR_DIALOG = '.modal-dialog';
  1634. var SELECTOR_MODAL_BODY = '.modal-body';
  1635. var SELECTOR_DATA_TOGGLE$1 = '[data-toggle="modal"]';
  1636. var SELECTOR_DATA_DISMISS$1 = '[data-dismiss="modal"]';
  1637. var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
  1638. var SELECTOR_STICKY_CONTENT = '.sticky-top';
  1639. var Default$4 = {
  1640. backdrop: true,
  1641. keyboard: true,
  1642. focus: true,
  1643. show: true
  1644. };
  1645. var DefaultType$4 = {
  1646. backdrop: '(boolean|string)',
  1647. keyboard: 'boolean',
  1648. focus: 'boolean',
  1649. show: 'boolean'
  1650. };
  1651. /**
  1652. * Class definition
  1653. */
  1654. var Modal = /*#__PURE__*/function () {
  1655. function Modal(element, config) {
  1656. this._config = this._getConfig(config);
  1657. this._element = element;
  1658. this._dialog = element.querySelector(SELECTOR_DIALOG);
  1659. this._backdrop = null;
  1660. this._isShown = false;
  1661. this._isBodyOverflowing = false;
  1662. this._ignoreBackdropClick = false;
  1663. this._isTransitioning = false;
  1664. this._scrollbarWidth = 0;
  1665. } // Getters
  1666. var _proto = Modal.prototype;
  1667. // Public
  1668. _proto.toggle = function toggle(relatedTarget) {
  1669. return this._isShown ? this.hide() : this.show(relatedTarget);
  1670. };
  1671. _proto.show = function show(relatedTarget) {
  1672. var _this = this;
  1673. if (this._isShown || this._isTransitioning) {
  1674. return;
  1675. }
  1676. var showEvent = $__default["default"].Event(EVENT_SHOW$2, {
  1677. relatedTarget: relatedTarget
  1678. });
  1679. $__default["default"](this._element).trigger(showEvent);
  1680. if (showEvent.isDefaultPrevented()) {
  1681. return;
  1682. }
  1683. this._isShown = true;
  1684. if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) {
  1685. this._isTransitioning = true;
  1686. }
  1687. this._checkScrollbar();
  1688. this._setScrollbar();
  1689. this._adjustDialog();
  1690. this._setEscapeEvent();
  1691. this._setResizeEvent();
  1692. $__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function (event) {
  1693. return _this.hide(event);
  1694. });
  1695. $__default["default"](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
  1696. $__default["default"](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
  1697. if ($__default["default"](event.target).is(_this._element)) {
  1698. _this._ignoreBackdropClick = true;
  1699. }
  1700. });
  1701. });
  1702. this._showBackdrop(function () {
  1703. return _this._showElement(relatedTarget);
  1704. });
  1705. };
  1706. _proto.hide = function hide(event) {
  1707. var _this2 = this;
  1708. if (event) {
  1709. event.preventDefault();
  1710. }
  1711. if (!this._isShown || this._isTransitioning) {
  1712. return;
  1713. }
  1714. var hideEvent = $__default["default"].Event(EVENT_HIDE$2);
  1715. $__default["default"](this._element).trigger(hideEvent);
  1716. if (!this._isShown || hideEvent.isDefaultPrevented()) {
  1717. return;
  1718. }
  1719. this._isShown = false;
  1720. var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4);
  1721. if (transition) {
  1722. this._isTransitioning = true;
  1723. }
  1724. this._setEscapeEvent();
  1725. this._setResizeEvent();
  1726. $__default["default"](document).off(EVENT_FOCUSIN);
  1727. $__default["default"](this._element).removeClass(CLASS_NAME_SHOW$4);
  1728. $__default["default"](this._element).off(EVENT_CLICK_DISMISS$1);
  1729. $__default["default"](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
  1730. if (transition) {
  1731. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  1732. $__default["default"](this._element).one(Util.TRANSITION_END, function (event) {
  1733. return _this2._hideModal(event);
  1734. }).emulateTransitionEnd(transitionDuration);
  1735. } else {
  1736. this._hideModal();
  1737. }
  1738. };
  1739. _proto.dispose = function dispose() {
  1740. [window, this._element, this._dialog].forEach(function (htmlElement) {
  1741. return $__default["default"](htmlElement).off(EVENT_KEY$5);
  1742. });
  1743. /**
  1744. * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
  1745. * Do not move `document` in `htmlElements` array
  1746. * It will remove `EVENT_CLICK_DATA_API` event that should remain
  1747. */
  1748. $__default["default"](document).off(EVENT_FOCUSIN);
  1749. $__default["default"].removeData(this._element, DATA_KEY$5);
  1750. this._config = null;
  1751. this._element = null;
  1752. this._dialog = null;
  1753. this._backdrop = null;
  1754. this._isShown = null;
  1755. this._isBodyOverflowing = null;
  1756. this._ignoreBackdropClick = null;
  1757. this._isTransitioning = null;
  1758. this._scrollbarWidth = null;
  1759. };
  1760. _proto.handleUpdate = function handleUpdate() {
  1761. this._adjustDialog();
  1762. } // Private
  1763. ;
  1764. _proto._getConfig = function _getConfig(config) {
  1765. config = _extends({}, Default$4, config);
  1766. Util.typeCheckConfig(NAME$5, config, DefaultType$4);
  1767. return config;
  1768. };
  1769. _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
  1770. var _this3 = this;
  1771. var hideEventPrevented = $__default["default"].Event(EVENT_HIDE_PREVENTED);
  1772. $__default["default"](this._element).trigger(hideEventPrevented);
  1773. if (hideEventPrevented.isDefaultPrevented()) {
  1774. return;
  1775. }
  1776. var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
  1777. if (!isModalOverflowing) {
  1778. this._element.style.overflowY = 'hidden';
  1779. }
  1780. this._element.classList.add(CLASS_NAME_STATIC);
  1781. var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog);
  1782. $__default["default"](this._element).off(Util.TRANSITION_END);
  1783. $__default["default"](this._element).one(Util.TRANSITION_END, function () {
  1784. _this3._element.classList.remove(CLASS_NAME_STATIC);
  1785. if (!isModalOverflowing) {
  1786. $__default["default"](_this3._element).one(Util.TRANSITION_END, function () {
  1787. _this3._element.style.overflowY = '';
  1788. }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
  1789. }
  1790. }).emulateTransitionEnd(modalTransitionDuration);
  1791. this._element.focus();
  1792. };
  1793. _proto._showElement = function _showElement(relatedTarget) {
  1794. var _this4 = this;
  1795. var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4);
  1796. var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
  1797. if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
  1798. // Don't move modal's DOM position
  1799. document.body.appendChild(this._element);
  1800. }
  1801. this._element.style.display = 'block';
  1802. this._element.removeAttribute('aria-hidden');
  1803. this._element.setAttribute('aria-modal', true);
  1804. this._element.setAttribute('role', 'dialog');
  1805. if ($__default["default"](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
  1806. modalBody.scrollTop = 0;
  1807. } else {
  1808. this._element.scrollTop = 0;
  1809. }
  1810. if (transition) {
  1811. Util.reflow(this._element);
  1812. }
  1813. $__default["default"](this._element).addClass(CLASS_NAME_SHOW$4);
  1814. if (this._config.focus) {
  1815. this._enforceFocus();
  1816. }
  1817. var shownEvent = $__default["default"].Event(EVENT_SHOWN$2, {
  1818. relatedTarget: relatedTarget
  1819. });
  1820. var transitionComplete = function transitionComplete() {
  1821. if (_this4._config.focus) {
  1822. _this4._element.focus();
  1823. }
  1824. _this4._isTransitioning = false;
  1825. $__default["default"](_this4._element).trigger(shownEvent);
  1826. };
  1827. if (transition) {
  1828. var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
  1829. $__default["default"](this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
  1830. } else {
  1831. transitionComplete();
  1832. }
  1833. };
  1834. _proto._enforceFocus = function _enforceFocus() {
  1835. var _this5 = this;
  1836. $__default["default"](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
  1837. .on(EVENT_FOCUSIN, function (event) {
  1838. if (document !== event.target && _this5._element !== event.target && $__default["default"](_this5._element).has(event.target).length === 0) {
  1839. _this5._element.focus();
  1840. }
  1841. });
  1842. };
  1843. _proto._setEscapeEvent = function _setEscapeEvent() {
  1844. var _this6 = this;
  1845. if (this._isShown) {
  1846. $__default["default"](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
  1847. if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
  1848. event.preventDefault();
  1849. _this6.hide();
  1850. } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
  1851. _this6._triggerBackdropTransition();
  1852. }
  1853. });
  1854. } else if (!this._isShown) {
  1855. $__default["default"](this._element).off(EVENT_KEYDOWN_DISMISS);
  1856. }
  1857. };
  1858. _proto._setResizeEvent = function _setResizeEvent() {
  1859. var _this7 = this;
  1860. if (this._isShown) {
  1861. $__default["default"](window).on(EVENT_RESIZE, function (event) {
  1862. return _this7.handleUpdate(event);
  1863. });
  1864. } else {
  1865. $__default["default"](window).off(EVENT_RESIZE);
  1866. }
  1867. };
  1868. _proto._hideModal = function _hideModal() {
  1869. var _this8 = this;
  1870. this._element.style.display = 'none';
  1871. this._element.setAttribute('aria-hidden', true);
  1872. this._element.removeAttribute('aria-modal');
  1873. this._element.removeAttribute('role');
  1874. this._isTransitioning = false;
  1875. this._showBackdrop(function () {
  1876. $__default["default"](document.body).removeClass(CLASS_NAME_OPEN);
  1877. _this8._resetAdjustments();
  1878. _this8._resetScrollbar();
  1879. $__default["default"](_this8._element).trigger(EVENT_HIDDEN$2);
  1880. });
  1881. };
  1882. _proto._removeBackdrop = function _removeBackdrop() {
  1883. if (this._backdrop) {
  1884. $__default["default"](this._backdrop).remove();
  1885. this._backdrop = null;
  1886. }
  1887. };
  1888. _proto._showBackdrop = function _showBackdrop(callback) {
  1889. var _this9 = this;
  1890. var animate = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4) ? CLASS_NAME_FADE$4 : '';
  1891. if (this._isShown && this._config.backdrop) {
  1892. this._backdrop = document.createElement('div');
  1893. this._backdrop.className = CLASS_NAME_BACKDROP;
  1894. if (animate) {
  1895. this._backdrop.classList.add(animate);
  1896. }
  1897. $__default["default"](this._backdrop).appendTo(document.body);
  1898. $__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, function (event) {
  1899. if (_this9._ignoreBackdropClick) {
  1900. _this9._ignoreBackdropClick = false;
  1901. return;
  1902. }
  1903. if (event.target !== event.currentTarget) {
  1904. return;
  1905. }
  1906. if (_this9._config.backdrop === 'static') {
  1907. _this9._triggerBackdropTransition();
  1908. } else {
  1909. _this9.hide();
  1910. }
  1911. });
  1912. if (animate) {
  1913. Util.reflow(this._backdrop);
  1914. }
  1915. $__default["default"](this._backdrop).addClass(CLASS_NAME_SHOW$4);
  1916. if (!callback) {
  1917. return;
  1918. }
  1919. if (!animate) {
  1920. callback();
  1921. return;
  1922. }
  1923. var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
  1924. $__default["default"](this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
  1925. } else if (!this._isShown && this._backdrop) {
  1926. $__default["default"](this._backdrop).removeClass(CLASS_NAME_SHOW$4);
  1927. var callbackRemove = function callbackRemove() {
  1928. _this9._removeBackdrop();
  1929. if (callback) {
  1930. callback();
  1931. }
  1932. };
  1933. if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) {
  1934. var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
  1935. $__default["default"](this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
  1936. } else {
  1937. callbackRemove();
  1938. }
  1939. } else if (callback) {
  1940. callback();
  1941. }
  1942. } // ----------------------------------------------------------------------
  1943. // the following methods are used to handle overflowing modals
  1944. // todo (fat): these should probably be refactored out of modal.js
  1945. // ----------------------------------------------------------------------
  1946. ;
  1947. _proto._adjustDialog = function _adjustDialog() {
  1948. var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
  1949. if (!this._isBodyOverflowing && isModalOverflowing) {
  1950. this._element.style.paddingLeft = this._scrollbarWidth + "px";
  1951. }
  1952. if (this._isBodyOverflowing && !isModalOverflowing) {
  1953. this._element.style.paddingRight = this._scrollbarWidth + "px";
  1954. }
  1955. };
  1956. _proto._resetAdjustments = function _resetAdjustments() {
  1957. this._element.style.paddingLeft = '';
  1958. this._element.style.paddingRight = '';
  1959. };
  1960. _proto._checkScrollbar = function _checkScrollbar() {
  1961. var rect = document.body.getBoundingClientRect();
  1962. this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
  1963. this._scrollbarWidth = this._getScrollbarWidth();
  1964. };
  1965. _proto._setScrollbar = function _setScrollbar() {
  1966. var _this10 = this;
  1967. if (this._isBodyOverflowing) {
  1968. // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
  1969. // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
  1970. var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
  1971. var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
  1972. $__default["default"](fixedContent).each(function (index, element) {
  1973. var actualPadding = element.style.paddingRight;
  1974. var calculatedPadding = $__default["default"](element).css('padding-right');
  1975. $__default["default"](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
  1976. }); // Adjust sticky content margin
  1977. $__default["default"](stickyContent).each(function (index, element) {
  1978. var actualMargin = element.style.marginRight;
  1979. var calculatedMargin = $__default["default"](element).css('margin-right');
  1980. $__default["default"](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
  1981. }); // Adjust body padding
  1982. var actualPadding = document.body.style.paddingRight;
  1983. var calculatedPadding = $__default["default"](document.body).css('padding-right');
  1984. $__default["default"](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
  1985. }
  1986. $__default["default"](document.body).addClass(CLASS_NAME_OPEN);
  1987. };
  1988. _proto._resetScrollbar = function _resetScrollbar() {
  1989. // Restore fixed content padding
  1990. var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
  1991. $__default["default"](fixedContent).each(function (index, element) {
  1992. var padding = $__default["default"](element).data('padding-right');
  1993. $__default["default"](element).removeData('padding-right');
  1994. element.style.paddingRight = padding ? padding : '';
  1995. }); // Restore sticky content
  1996. var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
  1997. $__default["default"](elements).each(function (index, element) {
  1998. var margin = $__default["default"](element).data('margin-right');
  1999. if (typeof margin !== 'undefined') {
  2000. $__default["default"](element).css('margin-right', margin).removeData('margin-right');
  2001. }
  2002. }); // Restore body padding
  2003. var padding = $__default["default"](document.body).data('padding-right');
  2004. $__default["default"](document.body).removeData('padding-right');
  2005. document.body.style.paddingRight = padding ? padding : '';
  2006. };
  2007. _proto._getScrollbarWidth = function _getScrollbarWidth() {
  2008. // thx d.walsh
  2009. var scrollDiv = document.createElement('div');
  2010. scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
  2011. document.body.appendChild(scrollDiv);
  2012. var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
  2013. document.body.removeChild(scrollDiv);
  2014. return scrollbarWidth;
  2015. } // Static
  2016. ;
  2017. Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
  2018. return this.each(function () {
  2019. var data = $__default["default"](this).data(DATA_KEY$5);
  2020. var _config = _extends({}, Default$4, $__default["default"](this).data(), typeof config === 'object' && config ? config : {});
  2021. if (!data) {
  2022. data = new Modal(this, _config);
  2023. $__default["default"](this).data(DATA_KEY$5, data);
  2024. }
  2025. if (typeof config === 'string') {
  2026. if (typeof data[config] === 'undefined') {
  2027. throw new TypeError("No method named \"" + config + "\"");
  2028. }
  2029. data[config](relatedTarget);
  2030. } else if (_config.show) {
  2031. data.show(relatedTarget);
  2032. }
  2033. });
  2034. };
  2035. _createClass(Modal, null, [{
  2036. key: "VERSION",
  2037. get: function get() {
  2038. return VERSION$5;
  2039. }
  2040. }, {
  2041. key: "Default",
  2042. get: function get() {
  2043. return Default$4;
  2044. }
  2045. }]);
  2046. return Modal;
  2047. }();
  2048. /**
  2049. * Data API implementation
  2050. */
  2051. $__default["default"](document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
  2052. var _this11 = this;
  2053. var target;
  2054. var selector = Util.getSelectorFromElement(this);
  2055. if (selector) {
  2056. target = document.querySelector(selector);
  2057. }
  2058. var config = $__default["default"](target).data(DATA_KEY$5) ? 'toggle' : _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
  2059. if (this.tagName === 'A' || this.tagName === 'AREA') {
  2060. event.preventDefault();
  2061. }
  2062. var $target = $__default["default"](target).one(EVENT_SHOW$2, function (showEvent) {
  2063. if (showEvent.isDefaultPrevented()) {
  2064. // Only register focus restorer if modal will actually get shown
  2065. return;
  2066. }
  2067. $target.one(EVENT_HIDDEN$2, function () {
  2068. if ($__default["default"](_this11).is(':visible')) {
  2069. _this11.focus();
  2070. }
  2071. });
  2072. });
  2073. Modal._jQueryInterface.call($__default["default"](target), config, this);
  2074. });
  2075. /**
  2076. * jQuery
  2077. */
  2078. $__default["default"].fn[NAME$5] = Modal._jQueryInterface;
  2079. $__default["default"].fn[NAME$5].Constructor = Modal;
  2080. $__default["default"].fn[NAME$5].noConflict = function () {
  2081. $__default["default"].fn[NAME$5] = JQUERY_NO_CONFLICT$5;
  2082. return Modal._jQueryInterface;
  2083. };
  2084. /**
  2085. * --------------------------------------------------------------------------
  2086. * Bootstrap (v4.6.2): tools/sanitizer.js
  2087. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  2088. * --------------------------------------------------------------------------
  2089. */
  2090. var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
  2091. var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
  2092. var DefaultWhitelist = {
  2093. // Global attributes allowed on any supplied element below.
  2094. '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
  2095. a: ['target', 'href', 'title', 'rel'],
  2096. area: [],
  2097. b: [],
  2098. br: [],
  2099. col: [],
  2100. code: [],
  2101. div: [],
  2102. em: [],
  2103. hr: [],
  2104. h1: [],
  2105. h2: [],
  2106. h3: [],
  2107. h4: [],
  2108. h5: [],
  2109. h6: [],
  2110. i: [],
  2111. img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
  2112. li: [],
  2113. ol: [],
  2114. p: [],
  2115. pre: [],
  2116. s: [],
  2117. small: [],
  2118. span: [],
  2119. sub: [],
  2120. sup: [],
  2121. strong: [],
  2122. u: [],
  2123. ul: []
  2124. };
  2125. /**
  2126. * A pattern that recognizes a commonly useful subset of URLs that are safe.
  2127. *
  2128. * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
  2129. */
  2130. var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
  2131. /**
  2132. * A pattern that matches safe data URLs. Only matches image, video and audio types.
  2133. *
  2134. * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
  2135. */
  2136. var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
  2137. function allowedAttribute(attr, allowedAttributeList) {
  2138. var attrName = attr.nodeName.toLowerCase();
  2139. if (allowedAttributeList.indexOf(attrName) !== -1) {
  2140. if (uriAttrs.indexOf(attrName) !== -1) {
  2141. return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
  2142. }
  2143. return true;
  2144. }
  2145. var regExp = allowedAttributeList.filter(function (attrRegex) {
  2146. return attrRegex instanceof RegExp;
  2147. }); // Check if a regular expression validates the attribute.
  2148. for (var i = 0, len = regExp.length; i < len; i++) {
  2149. if (regExp[i].test(attrName)) {
  2150. return true;
  2151. }
  2152. }
  2153. return false;
  2154. }
  2155. function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
  2156. if (unsafeHtml.length === 0) {
  2157. return unsafeHtml;
  2158. }
  2159. if (sanitizeFn && typeof sanitizeFn === 'function') {
  2160. return sanitizeFn(unsafeHtml);
  2161. }
  2162. var domParser = new window.DOMParser();
  2163. var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
  2164. var whitelistKeys = Object.keys(whiteList);
  2165. var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
  2166. var _loop = function _loop(i, len) {
  2167. var el = elements[i];
  2168. var elName = el.nodeName.toLowerCase();
  2169. if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
  2170. el.parentNode.removeChild(el);
  2171. return "continue";
  2172. }
  2173. var attributeList = [].slice.call(el.attributes); // eslint-disable-next-line unicorn/prefer-spread
  2174. var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
  2175. attributeList.forEach(function (attr) {
  2176. if (!allowedAttribute(attr, whitelistedAttributes)) {
  2177. el.removeAttribute(attr.nodeName);
  2178. }
  2179. });
  2180. };
  2181. for (var i = 0, len = elements.length; i < len; i++) {
  2182. var _ret = _loop(i);
  2183. if (_ret === "continue") continue;
  2184. }
  2185. return createdDocument.body.innerHTML;
  2186. }
  2187. /**
  2188. * Constants
  2189. */
  2190. var NAME$4 = 'tooltip';
  2191. var VERSION$4 = '4.6.2';
  2192. var DATA_KEY$4 = 'bs.tooltip';
  2193. var EVENT_KEY$4 = "." + DATA_KEY$4;
  2194. var JQUERY_NO_CONFLICT$4 = $__default["default"].fn[NAME$4];
  2195. var CLASS_PREFIX$1 = 'bs-tooltip';
  2196. var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
  2197. var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
  2198. var CLASS_NAME_FADE$3 = 'fade';
  2199. var CLASS_NAME_SHOW$3 = 'show';
  2200. var HOVER_STATE_SHOW = 'show';
  2201. var HOVER_STATE_OUT = 'out';
  2202. var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
  2203. var SELECTOR_ARROW = '.arrow';
  2204. var TRIGGER_HOVER = 'hover';
  2205. var TRIGGER_FOCUS = 'focus';
  2206. var TRIGGER_CLICK = 'click';
  2207. var TRIGGER_MANUAL = 'manual';
  2208. var AttachmentMap = {
  2209. AUTO: 'auto',
  2210. TOP: 'top',
  2211. RIGHT: 'right',
  2212. BOTTOM: 'bottom',
  2213. LEFT: 'left'
  2214. };
  2215. var Default$3 = {
  2216. animation: true,
  2217. template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
  2218. trigger: 'hover focus',
  2219. title: '',
  2220. delay: 0,
  2221. html: false,
  2222. selector: false,
  2223. placement: 'top',
  2224. offset: 0,
  2225. container: false,
  2226. fallbackPlacement: 'flip',
  2227. boundary: 'scrollParent',
  2228. customClass: '',
  2229. sanitize: true,
  2230. sanitizeFn: null,
  2231. whiteList: DefaultWhitelist,
  2232. popperConfig: null
  2233. };
  2234. var DefaultType$3 = {
  2235. animation: 'boolean',
  2236. template: 'string',
  2237. title: '(string|element|function)',
  2238. trigger: 'string',
  2239. delay: '(number|object)',
  2240. html: 'boolean',
  2241. selector: '(string|boolean)',
  2242. placement: '(string|function)',
  2243. offset: '(number|string|function)',
  2244. container: '(string|element|boolean)',
  2245. fallbackPlacement: '(string|array)',
  2246. boundary: '(string|element)',
  2247. customClass: '(string|function)',
  2248. sanitize: 'boolean',
  2249. sanitizeFn: '(null|function)',
  2250. whiteList: 'object',
  2251. popperConfig: '(null|object)'
  2252. };
  2253. var Event$1 = {
  2254. HIDE: "hide" + EVENT_KEY$4,
  2255. HIDDEN: "hidden" + EVENT_KEY$4,
  2256. SHOW: "show" + EVENT_KEY$4,
  2257. SHOWN: "shown" + EVENT_KEY$4,
  2258. INSERTED: "inserted" + EVENT_KEY$4,
  2259. CLICK: "click" + EVENT_KEY$4,
  2260. FOCUSIN: "focusin" + EVENT_KEY$4,
  2261. FOCUSOUT: "focusout" + EVENT_KEY$4,
  2262. MOUSEENTER: "mouseenter" + EVENT_KEY$4,
  2263. MOUSELEAVE: "mouseleave" + EVENT_KEY$4
  2264. };
  2265. /**
  2266. * Class definition
  2267. */
  2268. var Tooltip = /*#__PURE__*/function () {
  2269. function Tooltip(element, config) {
  2270. if (typeof Popper__default["default"] === 'undefined') {
  2271. throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
  2272. } // Private
  2273. this._isEnabled = true;
  2274. this._timeout = 0;
  2275. this._hoverState = '';
  2276. this._activeTrigger = {};
  2277. this._popper = null; // Protected
  2278. this.element = element;
  2279. this.config = this._getConfig(config);
  2280. this.tip = null;
  2281. this._setListeners();
  2282. } // Getters
  2283. var _proto = Tooltip.prototype;
  2284. // Public
  2285. _proto.enable = function enable() {
  2286. this._isEnabled = true;
  2287. };
  2288. _proto.disable = function disable() {
  2289. this._isEnabled = false;
  2290. };
  2291. _proto.toggleEnabled = function toggleEnabled() {
  2292. this._isEnabled = !this._isEnabled;
  2293. };
  2294. _proto.toggle = function toggle(event) {
  2295. if (!this._isEnabled) {
  2296. return;
  2297. }
  2298. if (event) {
  2299. var dataKey = this.constructor.DATA_KEY;
  2300. var context = $__default["default"](event.currentTarget).data(dataKey);
  2301. if (!context) {
  2302. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  2303. $__default["default"](event.currentTarget).data(dataKey, context);
  2304. }
  2305. context._activeTrigger.click = !context._activeTrigger.click;
  2306. if (context._isWithActiveTrigger()) {
  2307. context._enter(null, context);
  2308. } else {
  2309. context._leave(null, context);
  2310. }
  2311. } else {
  2312. if ($__default["default"](this.getTipElement()).hasClass(CLASS_NAME_SHOW$3)) {
  2313. this._leave(null, this);
  2314. return;
  2315. }
  2316. this._enter(null, this);
  2317. }
  2318. };
  2319. _proto.dispose = function dispose() {
  2320. clearTimeout(this._timeout);
  2321. $__default["default"].removeData(this.element, this.constructor.DATA_KEY);
  2322. $__default["default"](this.element).off(this.constructor.EVENT_KEY);
  2323. $__default["default"](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
  2324. if (this.tip) {
  2325. $__default["default"](this.tip).remove();
  2326. }
  2327. this._isEnabled = null;
  2328. this._timeout = null;
  2329. this._hoverState = null;
  2330. this._activeTrigger = null;
  2331. if (this._popper) {
  2332. this._popper.destroy();
  2333. }
  2334. this._popper = null;
  2335. this.element = null;
  2336. this.config = null;
  2337. this.tip = null;
  2338. };
  2339. _proto.show = function show() {
  2340. var _this = this;
  2341. if ($__default["default"](this.element).css('display') === 'none') {
  2342. throw new Error('Please use show on visible elements');
  2343. }
  2344. var showEvent = $__default["default"].Event(this.constructor.Event.SHOW);
  2345. if (this.isWithContent() && this._isEnabled) {
  2346. $__default["default"](this.element).trigger(showEvent);
  2347. var shadowRoot = Util.findShadowRoot(this.element);
  2348. var isInTheDom = $__default["default"].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
  2349. if (showEvent.isDefaultPrevented() || !isInTheDom) {
  2350. return;
  2351. }
  2352. var tip = this.getTipElement();
  2353. var tipId = Util.getUID(this.constructor.NAME);
  2354. tip.setAttribute('id', tipId);
  2355. this.element.setAttribute('aria-describedby', tipId);
  2356. this.setContent();
  2357. if (this.config.animation) {
  2358. $__default["default"](tip).addClass(CLASS_NAME_FADE$3);
  2359. }
  2360. var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
  2361. var attachment = this._getAttachment(placement);
  2362. this.addAttachmentClass(attachment);
  2363. var container = this._getContainer();
  2364. $__default["default"](tip).data(this.constructor.DATA_KEY, this);
  2365. if (!$__default["default"].contains(this.element.ownerDocument.documentElement, this.tip)) {
  2366. $__default["default"](tip).appendTo(container);
  2367. }
  2368. $__default["default"](this.element).trigger(this.constructor.Event.INSERTED);
  2369. this._popper = new Popper__default["default"](this.element, tip, this._getPopperConfig(attachment));
  2370. $__default["default"](tip).addClass(CLASS_NAME_SHOW$3);
  2371. $__default["default"](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
  2372. // empty mouseover listeners to the body's immediate children;
  2373. // only needed because of broken event delegation on iOS
  2374. // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
  2375. if ('ontouchstart' in document.documentElement) {
  2376. $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
  2377. }
  2378. var complete = function complete() {
  2379. if (_this.config.animation) {
  2380. _this._fixTransition();
  2381. }
  2382. var prevHoverState = _this._hoverState;
  2383. _this._hoverState = null;
  2384. $__default["default"](_this.element).trigger(_this.constructor.Event.SHOWN);
  2385. if (prevHoverState === HOVER_STATE_OUT) {
  2386. _this._leave(null, _this);
  2387. }
  2388. };
  2389. if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) {
  2390. var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
  2391. $__default["default"](this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  2392. } else {
  2393. complete();
  2394. }
  2395. }
  2396. };
  2397. _proto.hide = function hide(callback) {
  2398. var _this2 = this;
  2399. var tip = this.getTipElement();
  2400. var hideEvent = $__default["default"].Event(this.constructor.Event.HIDE);
  2401. var complete = function complete() {
  2402. if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
  2403. tip.parentNode.removeChild(tip);
  2404. }
  2405. _this2._cleanTipClass();
  2406. _this2.element.removeAttribute('aria-describedby');
  2407. $__default["default"](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
  2408. if (_this2._popper !== null) {
  2409. _this2._popper.destroy();
  2410. }
  2411. if (callback) {
  2412. callback();
  2413. }
  2414. };
  2415. $__default["default"](this.element).trigger(hideEvent);
  2416. if (hideEvent.isDefaultPrevented()) {
  2417. return;
  2418. }
  2419. $__default["default"](tip).removeClass(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra
  2420. // empty mouseover listeners we added for iOS support
  2421. if ('ontouchstart' in document.documentElement) {
  2422. $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
  2423. }
  2424. this._activeTrigger[TRIGGER_CLICK] = false;
  2425. this._activeTrigger[TRIGGER_FOCUS] = false;
  2426. this._activeTrigger[TRIGGER_HOVER] = false;
  2427. if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) {
  2428. var transitionDuration = Util.getTransitionDurationFromElement(tip);
  2429. $__default["default"](tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  2430. } else {
  2431. complete();
  2432. }
  2433. this._hoverState = '';
  2434. };
  2435. _proto.update = function update() {
  2436. if (this._popper !== null) {
  2437. this._popper.scheduleUpdate();
  2438. }
  2439. } // Protected
  2440. ;
  2441. _proto.isWithContent = function isWithContent() {
  2442. return Boolean(this.getTitle());
  2443. };
  2444. _proto.addAttachmentClass = function addAttachmentClass(attachment) {
  2445. $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
  2446. };
  2447. _proto.getTipElement = function getTipElement() {
  2448. this.tip = this.tip || $__default["default"](this.config.template)[0];
  2449. return this.tip;
  2450. };
  2451. _proto.setContent = function setContent() {
  2452. var tip = this.getTipElement();
  2453. this.setElementContent($__default["default"](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
  2454. $__default["default"](tip).removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$3);
  2455. };
  2456. _proto.setElementContent = function setElementContent($element, content) {
  2457. if (typeof content === 'object' && (content.nodeType || content.jquery)) {
  2458. // Content is a DOM node or a jQuery
  2459. if (this.config.html) {
  2460. if (!$__default["default"](content).parent().is($element)) {
  2461. $element.empty().append(content);
  2462. }
  2463. } else {
  2464. $element.text($__default["default"](content).text());
  2465. }
  2466. return;
  2467. }
  2468. if (this.config.html) {
  2469. if (this.config.sanitize) {
  2470. content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
  2471. }
  2472. $element.html(content);
  2473. } else {
  2474. $element.text(content);
  2475. }
  2476. };
  2477. _proto.getTitle = function getTitle() {
  2478. var title = this.element.getAttribute('data-original-title');
  2479. if (!title) {
  2480. title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
  2481. }
  2482. return title;
  2483. } // Private
  2484. ;
  2485. _proto._getPopperConfig = function _getPopperConfig(attachment) {
  2486. var _this3 = this;
  2487. var defaultBsConfig = {
  2488. placement: attachment,
  2489. modifiers: {
  2490. offset: this._getOffset(),
  2491. flip: {
  2492. behavior: this.config.fallbackPlacement
  2493. },
  2494. arrow: {
  2495. element: SELECTOR_ARROW
  2496. },
  2497. preventOverflow: {
  2498. boundariesElement: this.config.boundary
  2499. }
  2500. },
  2501. onCreate: function onCreate(data) {
  2502. if (data.originalPlacement !== data.placement) {
  2503. _this3._handlePopperPlacementChange(data);
  2504. }
  2505. },
  2506. onUpdate: function onUpdate(data) {
  2507. return _this3._handlePopperPlacementChange(data);
  2508. }
  2509. };
  2510. return _extends({}, defaultBsConfig, this.config.popperConfig);
  2511. };
  2512. _proto._getOffset = function _getOffset() {
  2513. var _this4 = this;
  2514. var offset = {};
  2515. if (typeof this.config.offset === 'function') {
  2516. offset.fn = function (data) {
  2517. data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element));
  2518. return data;
  2519. };
  2520. } else {
  2521. offset.offset = this.config.offset;
  2522. }
  2523. return offset;
  2524. };
  2525. _proto._getContainer = function _getContainer() {
  2526. if (this.config.container === false) {
  2527. return document.body;
  2528. }
  2529. if (Util.isElement(this.config.container)) {
  2530. return $__default["default"](this.config.container);
  2531. }
  2532. return $__default["default"](document).find(this.config.container);
  2533. };
  2534. _proto._getAttachment = function _getAttachment(placement) {
  2535. return AttachmentMap[placement.toUpperCase()];
  2536. };
  2537. _proto._setListeners = function _setListeners() {
  2538. var _this5 = this;
  2539. var triggers = this.config.trigger.split(' ');
  2540. triggers.forEach(function (trigger) {
  2541. if (trigger === 'click') {
  2542. $__default["default"](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
  2543. return _this5.toggle(event);
  2544. });
  2545. } else if (trigger !== TRIGGER_MANUAL) {
  2546. var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
  2547. var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
  2548. $__default["default"](_this5.element).on(eventIn, _this5.config.selector, function (event) {
  2549. return _this5._enter(event);
  2550. }).on(eventOut, _this5.config.selector, function (event) {
  2551. return _this5._leave(event);
  2552. });
  2553. }
  2554. });
  2555. this._hideModalHandler = function () {
  2556. if (_this5.element) {
  2557. _this5.hide();
  2558. }
  2559. };
  2560. $__default["default"](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
  2561. if (this.config.selector) {
  2562. this.config = _extends({}, this.config, {
  2563. trigger: 'manual',
  2564. selector: ''
  2565. });
  2566. } else {
  2567. this._fixTitle();
  2568. }
  2569. };
  2570. _proto._fixTitle = function _fixTitle() {
  2571. var titleType = typeof this.element.getAttribute('data-original-title');
  2572. if (this.element.getAttribute('title') || titleType !== 'string') {
  2573. this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
  2574. this.element.setAttribute('title', '');
  2575. }
  2576. };
  2577. _proto._enter = function _enter(event, context) {
  2578. var dataKey = this.constructor.DATA_KEY;
  2579. context = context || $__default["default"](event.currentTarget).data(dataKey);
  2580. if (!context) {
  2581. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  2582. $__default["default"](event.currentTarget).data(dataKey, context);
  2583. }
  2584. if (event) {
  2585. context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
  2586. }
  2587. if ($__default["default"](context.getTipElement()).hasClass(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
  2588. context._hoverState = HOVER_STATE_SHOW;
  2589. return;
  2590. }
  2591. clearTimeout(context._timeout);
  2592. context._hoverState = HOVER_STATE_SHOW;
  2593. if (!context.config.delay || !context.config.delay.show) {
  2594. context.show();
  2595. return;
  2596. }
  2597. context._timeout = setTimeout(function () {
  2598. if (context._hoverState === HOVER_STATE_SHOW) {
  2599. context.show();
  2600. }
  2601. }, context.config.delay.show);
  2602. };
  2603. _proto._leave = function _leave(event, context) {
  2604. var dataKey = this.constructor.DATA_KEY;
  2605. context = context || $__default["default"](event.currentTarget).data(dataKey);
  2606. if (!context) {
  2607. context = new this.constructor(event.currentTarget, this._getDelegateConfig());
  2608. $__default["default"](event.currentTarget).data(dataKey, context);
  2609. }
  2610. if (event) {
  2611. context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
  2612. }
  2613. if (context._isWithActiveTrigger()) {
  2614. return;
  2615. }
  2616. clearTimeout(context._timeout);
  2617. context._hoverState = HOVER_STATE_OUT;
  2618. if (!context.config.delay || !context.config.delay.hide) {
  2619. context.hide();
  2620. return;
  2621. }
  2622. context._timeout = setTimeout(function () {
  2623. if (context._hoverState === HOVER_STATE_OUT) {
  2624. context.hide();
  2625. }
  2626. }, context.config.delay.hide);
  2627. };
  2628. _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
  2629. for (var trigger in this._activeTrigger) {
  2630. if (this._activeTrigger[trigger]) {
  2631. return true;
  2632. }
  2633. }
  2634. return false;
  2635. };
  2636. _proto._getConfig = function _getConfig(config) {
  2637. var dataAttributes = $__default["default"](this.element).data();
  2638. Object.keys(dataAttributes).forEach(function (dataAttr) {
  2639. if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
  2640. delete dataAttributes[dataAttr];
  2641. }
  2642. });
  2643. config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
  2644. if (typeof config.delay === 'number') {
  2645. config.delay = {
  2646. show: config.delay,
  2647. hide: config.delay
  2648. };
  2649. }
  2650. if (typeof config.title === 'number') {
  2651. config.title = config.title.toString();
  2652. }
  2653. if (typeof config.content === 'number') {
  2654. config.content = config.content.toString();
  2655. }
  2656. Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
  2657. if (config.sanitize) {
  2658. config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
  2659. }
  2660. return config;
  2661. };
  2662. _proto._getDelegateConfig = function _getDelegateConfig() {
  2663. var config = {};
  2664. if (this.config) {
  2665. for (var key in this.config) {
  2666. if (this.constructor.Default[key] !== this.config[key]) {
  2667. config[key] = this.config[key];
  2668. }
  2669. }
  2670. }
  2671. return config;
  2672. };
  2673. _proto._cleanTipClass = function _cleanTipClass() {
  2674. var $tip = $__default["default"](this.getTipElement());
  2675. var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
  2676. if (tabClass !== null && tabClass.length) {
  2677. $tip.removeClass(tabClass.join(''));
  2678. }
  2679. };
  2680. _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
  2681. this.tip = popperData.instance.popper;
  2682. this._cleanTipClass();
  2683. this.addAttachmentClass(this._getAttachment(popperData.placement));
  2684. };
  2685. _proto._fixTransition = function _fixTransition() {
  2686. var tip = this.getTipElement();
  2687. var initConfigAnimation = this.config.animation;
  2688. if (tip.getAttribute('x-placement') !== null) {
  2689. return;
  2690. }
  2691. $__default["default"](tip).removeClass(CLASS_NAME_FADE$3);
  2692. this.config.animation = false;
  2693. this.hide();
  2694. this.show();
  2695. this.config.animation = initConfigAnimation;
  2696. } // Static
  2697. ;
  2698. Tooltip._jQueryInterface = function _jQueryInterface(config) {
  2699. return this.each(function () {
  2700. var $element = $__default["default"](this);
  2701. var data = $element.data(DATA_KEY$4);
  2702. var _config = typeof config === 'object' && config;
  2703. if (!data && /dispose|hide/.test(config)) {
  2704. return;
  2705. }
  2706. if (!data) {
  2707. data = new Tooltip(this, _config);
  2708. $element.data(DATA_KEY$4, data);
  2709. }
  2710. if (typeof config === 'string') {
  2711. if (typeof data[config] === 'undefined') {
  2712. throw new TypeError("No method named \"" + config + "\"");
  2713. }
  2714. data[config]();
  2715. }
  2716. });
  2717. };
  2718. _createClass(Tooltip, null, [{
  2719. key: "VERSION",
  2720. get: function get() {
  2721. return VERSION$4;
  2722. }
  2723. }, {
  2724. key: "Default",
  2725. get: function get() {
  2726. return Default$3;
  2727. }
  2728. }, {
  2729. key: "NAME",
  2730. get: function get() {
  2731. return NAME$4;
  2732. }
  2733. }, {
  2734. key: "DATA_KEY",
  2735. get: function get() {
  2736. return DATA_KEY$4;
  2737. }
  2738. }, {
  2739. key: "Event",
  2740. get: function get() {
  2741. return Event$1;
  2742. }
  2743. }, {
  2744. key: "EVENT_KEY",
  2745. get: function get() {
  2746. return EVENT_KEY$4;
  2747. }
  2748. }, {
  2749. key: "DefaultType",
  2750. get: function get() {
  2751. return DefaultType$3;
  2752. }
  2753. }]);
  2754. return Tooltip;
  2755. }();
  2756. /**
  2757. * jQuery
  2758. */
  2759. $__default["default"].fn[NAME$4] = Tooltip._jQueryInterface;
  2760. $__default["default"].fn[NAME$4].Constructor = Tooltip;
  2761. $__default["default"].fn[NAME$4].noConflict = function () {
  2762. $__default["default"].fn[NAME$4] = JQUERY_NO_CONFLICT$4;
  2763. return Tooltip._jQueryInterface;
  2764. };
  2765. /**
  2766. * Constants
  2767. */
  2768. var NAME$3 = 'popover';
  2769. var VERSION$3 = '4.6.2';
  2770. var DATA_KEY$3 = 'bs.popover';
  2771. var EVENT_KEY$3 = "." + DATA_KEY$3;
  2772. var JQUERY_NO_CONFLICT$3 = $__default["default"].fn[NAME$3];
  2773. var CLASS_PREFIX = 'bs-popover';
  2774. var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
  2775. var CLASS_NAME_FADE$2 = 'fade';
  2776. var CLASS_NAME_SHOW$2 = 'show';
  2777. var SELECTOR_TITLE = '.popover-header';
  2778. var SELECTOR_CONTENT = '.popover-body';
  2779. var Default$2 = _extends({}, Tooltip.Default, {
  2780. placement: 'right',
  2781. trigger: 'click',
  2782. content: '',
  2783. template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
  2784. });
  2785. var DefaultType$2 = _extends({}, Tooltip.DefaultType, {
  2786. content: '(string|element|function)'
  2787. });
  2788. var Event = {
  2789. HIDE: "hide" + EVENT_KEY$3,
  2790. HIDDEN: "hidden" + EVENT_KEY$3,
  2791. SHOW: "show" + EVENT_KEY$3,
  2792. SHOWN: "shown" + EVENT_KEY$3,
  2793. INSERTED: "inserted" + EVENT_KEY$3,
  2794. CLICK: "click" + EVENT_KEY$3,
  2795. FOCUSIN: "focusin" + EVENT_KEY$3,
  2796. FOCUSOUT: "focusout" + EVENT_KEY$3,
  2797. MOUSEENTER: "mouseenter" + EVENT_KEY$3,
  2798. MOUSELEAVE: "mouseleave" + EVENT_KEY$3
  2799. };
  2800. /**
  2801. * Class definition
  2802. */
  2803. var Popover = /*#__PURE__*/function (_Tooltip) {
  2804. _inheritsLoose(Popover, _Tooltip);
  2805. function Popover() {
  2806. return _Tooltip.apply(this, arguments) || this;
  2807. }
  2808. var _proto = Popover.prototype;
  2809. // Overrides
  2810. _proto.isWithContent = function isWithContent() {
  2811. return this.getTitle() || this._getContent();
  2812. };
  2813. _proto.addAttachmentClass = function addAttachmentClass(attachment) {
  2814. $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
  2815. };
  2816. _proto.getTipElement = function getTipElement() {
  2817. this.tip = this.tip || $__default["default"](this.config.template)[0];
  2818. return this.tip;
  2819. };
  2820. _proto.setContent = function setContent() {
  2821. var $tip = $__default["default"](this.getTipElement()); // We use append for html objects to maintain js events
  2822. this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
  2823. var content = this._getContent();
  2824. if (typeof content === 'function') {
  2825. content = content.call(this.element);
  2826. }
  2827. this.setElementContent($tip.find(SELECTOR_CONTENT), content);
  2828. $tip.removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$2);
  2829. } // Private
  2830. ;
  2831. _proto._getContent = function _getContent() {
  2832. return this.element.getAttribute('data-content') || this.config.content;
  2833. };
  2834. _proto._cleanTipClass = function _cleanTipClass() {
  2835. var $tip = $__default["default"](this.getTipElement());
  2836. var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
  2837. if (tabClass !== null && tabClass.length > 0) {
  2838. $tip.removeClass(tabClass.join(''));
  2839. }
  2840. } // Static
  2841. ;
  2842. Popover._jQueryInterface = function _jQueryInterface(config) {
  2843. return this.each(function () {
  2844. var data = $__default["default"](this).data(DATA_KEY$3);
  2845. var _config = typeof config === 'object' ? config : null;
  2846. if (!data && /dispose|hide/.test(config)) {
  2847. return;
  2848. }
  2849. if (!data) {
  2850. data = new Popover(this, _config);
  2851. $__default["default"](this).data(DATA_KEY$3, data);
  2852. }
  2853. if (typeof config === 'string') {
  2854. if (typeof data[config] === 'undefined') {
  2855. throw new TypeError("No method named \"" + config + "\"");
  2856. }
  2857. data[config]();
  2858. }
  2859. });
  2860. };
  2861. _createClass(Popover, null, [{
  2862. key: "VERSION",
  2863. get: // Getters
  2864. function get() {
  2865. return VERSION$3;
  2866. }
  2867. }, {
  2868. key: "Default",
  2869. get: function get() {
  2870. return Default$2;
  2871. }
  2872. }, {
  2873. key: "NAME",
  2874. get: function get() {
  2875. return NAME$3;
  2876. }
  2877. }, {
  2878. key: "DATA_KEY",
  2879. get: function get() {
  2880. return DATA_KEY$3;
  2881. }
  2882. }, {
  2883. key: "Event",
  2884. get: function get() {
  2885. return Event;
  2886. }
  2887. }, {
  2888. key: "EVENT_KEY",
  2889. get: function get() {
  2890. return EVENT_KEY$3;
  2891. }
  2892. }, {
  2893. key: "DefaultType",
  2894. get: function get() {
  2895. return DefaultType$2;
  2896. }
  2897. }]);
  2898. return Popover;
  2899. }(Tooltip);
  2900. /**
  2901. * jQuery
  2902. */
  2903. $__default["default"].fn[NAME$3] = Popover._jQueryInterface;
  2904. $__default["default"].fn[NAME$3].Constructor = Popover;
  2905. $__default["default"].fn[NAME$3].noConflict = function () {
  2906. $__default["default"].fn[NAME$3] = JQUERY_NO_CONFLICT$3;
  2907. return Popover._jQueryInterface;
  2908. };
  2909. /**
  2910. * Constants
  2911. */
  2912. var NAME$2 = 'scrollspy';
  2913. var VERSION$2 = '4.6.2';
  2914. var DATA_KEY$2 = 'bs.scrollspy';
  2915. var EVENT_KEY$2 = "." + DATA_KEY$2;
  2916. var DATA_API_KEY$1 = '.data-api';
  2917. var JQUERY_NO_CONFLICT$2 = $__default["default"].fn[NAME$2];
  2918. var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
  2919. var CLASS_NAME_ACTIVE$1 = 'active';
  2920. var EVENT_ACTIVATE = "activate" + EVENT_KEY$2;
  2921. var EVENT_SCROLL = "scroll" + EVENT_KEY$2;
  2922. var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$1;
  2923. var METHOD_OFFSET = 'offset';
  2924. var METHOD_POSITION = 'position';
  2925. var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
  2926. var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
  2927. var SELECTOR_NAV_LINKS = '.nav-link';
  2928. var SELECTOR_NAV_ITEMS = '.nav-item';
  2929. var SELECTOR_LIST_ITEMS = '.list-group-item';
  2930. var SELECTOR_DROPDOWN$1 = '.dropdown';
  2931. var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
  2932. var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
  2933. var Default$1 = {
  2934. offset: 10,
  2935. method: 'auto',
  2936. target: ''
  2937. };
  2938. var DefaultType$1 = {
  2939. offset: 'number',
  2940. method: 'string',
  2941. target: '(string|element)'
  2942. };
  2943. /**
  2944. * Class definition
  2945. */
  2946. var ScrollSpy = /*#__PURE__*/function () {
  2947. function ScrollSpy(element, config) {
  2948. var _this = this;
  2949. this._element = element;
  2950. this._scrollElement = element.tagName === 'BODY' ? window : element;
  2951. this._config = this._getConfig(config);
  2952. this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
  2953. this._offsets = [];
  2954. this._targets = [];
  2955. this._activeTarget = null;
  2956. this._scrollHeight = 0;
  2957. $__default["default"](this._scrollElement).on(EVENT_SCROLL, function (event) {
  2958. return _this._process(event);
  2959. });
  2960. this.refresh();
  2961. this._process();
  2962. } // Getters
  2963. var _proto = ScrollSpy.prototype;
  2964. // Public
  2965. _proto.refresh = function refresh() {
  2966. var _this2 = this;
  2967. var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
  2968. var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
  2969. var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
  2970. this._offsets = [];
  2971. this._targets = [];
  2972. this._scrollHeight = this._getScrollHeight();
  2973. var targets = [].slice.call(document.querySelectorAll(this._selector));
  2974. targets.map(function (element) {
  2975. var target;
  2976. var targetSelector = Util.getSelectorFromElement(element);
  2977. if (targetSelector) {
  2978. target = document.querySelector(targetSelector);
  2979. }
  2980. if (target) {
  2981. var targetBCR = target.getBoundingClientRect();
  2982. if (targetBCR.width || targetBCR.height) {
  2983. // TODO (fat): remove sketch reliance on jQuery position/offset
  2984. return [$__default["default"](target)[offsetMethod]().top + offsetBase, targetSelector];
  2985. }
  2986. }
  2987. return null;
  2988. }).filter(Boolean).sort(function (a, b) {
  2989. return a[0] - b[0];
  2990. }).forEach(function (item) {
  2991. _this2._offsets.push(item[0]);
  2992. _this2._targets.push(item[1]);
  2993. });
  2994. };
  2995. _proto.dispose = function dispose() {
  2996. $__default["default"].removeData(this._element, DATA_KEY$2);
  2997. $__default["default"](this._scrollElement).off(EVENT_KEY$2);
  2998. this._element = null;
  2999. this._scrollElement = null;
  3000. this._config = null;
  3001. this._selector = null;
  3002. this._offsets = null;
  3003. this._targets = null;
  3004. this._activeTarget = null;
  3005. this._scrollHeight = null;
  3006. } // Private
  3007. ;
  3008. _proto._getConfig = function _getConfig(config) {
  3009. config = _extends({}, Default$1, typeof config === 'object' && config ? config : {});
  3010. if (typeof config.target !== 'string' && Util.isElement(config.target)) {
  3011. var id = $__default["default"](config.target).attr('id');
  3012. if (!id) {
  3013. id = Util.getUID(NAME$2);
  3014. $__default["default"](config.target).attr('id', id);
  3015. }
  3016. config.target = "#" + id;
  3017. }
  3018. Util.typeCheckConfig(NAME$2, config, DefaultType$1);
  3019. return config;
  3020. };
  3021. _proto._getScrollTop = function _getScrollTop() {
  3022. return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
  3023. };
  3024. _proto._getScrollHeight = function _getScrollHeight() {
  3025. return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
  3026. };
  3027. _proto._getOffsetHeight = function _getOffsetHeight() {
  3028. return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
  3029. };
  3030. _proto._process = function _process() {
  3031. var scrollTop = this._getScrollTop() + this._config.offset;
  3032. var scrollHeight = this._getScrollHeight();
  3033. var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
  3034. if (this._scrollHeight !== scrollHeight) {
  3035. this.refresh();
  3036. }
  3037. if (scrollTop >= maxScroll) {
  3038. var target = this._targets[this._targets.length - 1];
  3039. if (this._activeTarget !== target) {
  3040. this._activate(target);
  3041. }
  3042. return;
  3043. }
  3044. if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
  3045. this._activeTarget = null;
  3046. this._clear();
  3047. return;
  3048. }
  3049. for (var i = this._offsets.length; i--;) {
  3050. var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
  3051. if (isActiveTarget) {
  3052. this._activate(this._targets[i]);
  3053. }
  3054. }
  3055. };
  3056. _proto._activate = function _activate(target) {
  3057. this._activeTarget = target;
  3058. this._clear();
  3059. var queries = this._selector.split(',').map(function (selector) {
  3060. return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
  3061. });
  3062. var $link = $__default["default"]([].slice.call(document.querySelectorAll(queries.join(','))));
  3063. if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
  3064. $link.closest(SELECTOR_DROPDOWN$1).find(SELECTOR_DROPDOWN_TOGGLE$1).addClass(CLASS_NAME_ACTIVE$1);
  3065. $link.addClass(CLASS_NAME_ACTIVE$1);
  3066. } else {
  3067. // Set triggered link as active
  3068. $link.addClass(CLASS_NAME_ACTIVE$1); // Set triggered links parents as active
  3069. // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
  3070. $link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE$1); // Handle special case when .nav-link is inside .nav-item
  3071. $link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE$1);
  3072. }
  3073. $__default["default"](this._scrollElement).trigger(EVENT_ACTIVATE, {
  3074. relatedTarget: target
  3075. });
  3076. };
  3077. _proto._clear = function _clear() {
  3078. [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
  3079. return node.classList.contains(CLASS_NAME_ACTIVE$1);
  3080. }).forEach(function (node) {
  3081. return node.classList.remove(CLASS_NAME_ACTIVE$1);
  3082. });
  3083. } // Static
  3084. ;
  3085. ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
  3086. return this.each(function () {
  3087. var data = $__default["default"](this).data(DATA_KEY$2);
  3088. var _config = typeof config === 'object' && config;
  3089. if (!data) {
  3090. data = new ScrollSpy(this, _config);
  3091. $__default["default"](this).data(DATA_KEY$2, data);
  3092. }
  3093. if (typeof config === 'string') {
  3094. if (typeof data[config] === 'undefined') {
  3095. throw new TypeError("No method named \"" + config + "\"");
  3096. }
  3097. data[config]();
  3098. }
  3099. });
  3100. };
  3101. _createClass(ScrollSpy, null, [{
  3102. key: "VERSION",
  3103. get: function get() {
  3104. return VERSION$2;
  3105. }
  3106. }, {
  3107. key: "Default",
  3108. get: function get() {
  3109. return Default$1;
  3110. }
  3111. }]);
  3112. return ScrollSpy;
  3113. }();
  3114. /**
  3115. * Data API implementation
  3116. */
  3117. $__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
  3118. var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
  3119. var scrollSpysLength = scrollSpys.length;
  3120. for (var i = scrollSpysLength; i--;) {
  3121. var $spy = $__default["default"](scrollSpys[i]);
  3122. ScrollSpy._jQueryInterface.call($spy, $spy.data());
  3123. }
  3124. });
  3125. /**
  3126. * jQuery
  3127. */
  3128. $__default["default"].fn[NAME$2] = ScrollSpy._jQueryInterface;
  3129. $__default["default"].fn[NAME$2].Constructor = ScrollSpy;
  3130. $__default["default"].fn[NAME$2].noConflict = function () {
  3131. $__default["default"].fn[NAME$2] = JQUERY_NO_CONFLICT$2;
  3132. return ScrollSpy._jQueryInterface;
  3133. };
  3134. /**
  3135. * Constants
  3136. */
  3137. var NAME$1 = 'tab';
  3138. var VERSION$1 = '4.6.2';
  3139. var DATA_KEY$1 = 'bs.tab';
  3140. var EVENT_KEY$1 = "." + DATA_KEY$1;
  3141. var DATA_API_KEY = '.data-api';
  3142. var JQUERY_NO_CONFLICT$1 = $__default["default"].fn[NAME$1];
  3143. var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
  3144. var CLASS_NAME_ACTIVE = 'active';
  3145. var CLASS_NAME_DISABLED = 'disabled';
  3146. var CLASS_NAME_FADE$1 = 'fade';
  3147. var CLASS_NAME_SHOW$1 = 'show';
  3148. var EVENT_HIDE$1 = "hide" + EVENT_KEY$1;
  3149. var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$1;
  3150. var EVENT_SHOW$1 = "show" + EVENT_KEY$1;
  3151. var EVENT_SHOWN$1 = "shown" + EVENT_KEY$1;
  3152. var EVENT_CLICK_DATA_API = "click" + EVENT_KEY$1 + DATA_API_KEY;
  3153. var SELECTOR_DROPDOWN = '.dropdown';
  3154. var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
  3155. var SELECTOR_ACTIVE = '.active';
  3156. var SELECTOR_ACTIVE_UL = '> li > .active';
  3157. var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
  3158. var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
  3159. var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
  3160. /**
  3161. * Class definition
  3162. */
  3163. var Tab = /*#__PURE__*/function () {
  3164. function Tab(element) {
  3165. this._element = element;
  3166. } // Getters
  3167. var _proto = Tab.prototype;
  3168. // Public
  3169. _proto.show = function show() {
  3170. var _this = this;
  3171. if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || this._element.hasAttribute('disabled')) {
  3172. return;
  3173. }
  3174. var target;
  3175. var previous;
  3176. var listElement = $__default["default"](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
  3177. var selector = Util.getSelectorFromElement(this._element);
  3178. if (listElement) {
  3179. var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
  3180. previous = $__default["default"].makeArray($__default["default"](listElement).find(itemSelector));
  3181. previous = previous[previous.length - 1];
  3182. }
  3183. var hideEvent = $__default["default"].Event(EVENT_HIDE$1, {
  3184. relatedTarget: this._element
  3185. });
  3186. var showEvent = $__default["default"].Event(EVENT_SHOW$1, {
  3187. relatedTarget: previous
  3188. });
  3189. if (previous) {
  3190. $__default["default"](previous).trigger(hideEvent);
  3191. }
  3192. $__default["default"](this._element).trigger(showEvent);
  3193. if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
  3194. return;
  3195. }
  3196. if (selector) {
  3197. target = document.querySelector(selector);
  3198. }
  3199. this._activate(this._element, listElement);
  3200. var complete = function complete() {
  3201. var hiddenEvent = $__default["default"].Event(EVENT_HIDDEN$1, {
  3202. relatedTarget: _this._element
  3203. });
  3204. var shownEvent = $__default["default"].Event(EVENT_SHOWN$1, {
  3205. relatedTarget: previous
  3206. });
  3207. $__default["default"](previous).trigger(hiddenEvent);
  3208. $__default["default"](_this._element).trigger(shownEvent);
  3209. };
  3210. if (target) {
  3211. this._activate(target, target.parentNode, complete);
  3212. } else {
  3213. complete();
  3214. }
  3215. };
  3216. _proto.dispose = function dispose() {
  3217. $__default["default"].removeData(this._element, DATA_KEY$1);
  3218. this._element = null;
  3219. } // Private
  3220. ;
  3221. _proto._activate = function _activate(element, container, callback) {
  3222. var _this2 = this;
  3223. var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default["default"](container).find(SELECTOR_ACTIVE_UL) : $__default["default"](container).children(SELECTOR_ACTIVE);
  3224. var active = activeElements[0];
  3225. var isTransitioning = callback && active && $__default["default"](active).hasClass(CLASS_NAME_FADE$1);
  3226. var complete = function complete() {
  3227. return _this2._transitionComplete(element, active, callback);
  3228. };
  3229. if (active && isTransitioning) {
  3230. var transitionDuration = Util.getTransitionDurationFromElement(active);
  3231. $__default["default"](active).removeClass(CLASS_NAME_SHOW$1).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  3232. } else {
  3233. complete();
  3234. }
  3235. };
  3236. _proto._transitionComplete = function _transitionComplete(element, active, callback) {
  3237. if (active) {
  3238. $__default["default"](active).removeClass(CLASS_NAME_ACTIVE);
  3239. var dropdownChild = $__default["default"](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
  3240. if (dropdownChild) {
  3241. $__default["default"](dropdownChild).removeClass(CLASS_NAME_ACTIVE);
  3242. }
  3243. if (active.getAttribute('role') === 'tab') {
  3244. active.setAttribute('aria-selected', false);
  3245. }
  3246. }
  3247. $__default["default"](element).addClass(CLASS_NAME_ACTIVE);
  3248. if (element.getAttribute('role') === 'tab') {
  3249. element.setAttribute('aria-selected', true);
  3250. }
  3251. Util.reflow(element);
  3252. if (element.classList.contains(CLASS_NAME_FADE$1)) {
  3253. element.classList.add(CLASS_NAME_SHOW$1);
  3254. }
  3255. var parent = element.parentNode;
  3256. if (parent && parent.nodeName === 'LI') {
  3257. parent = parent.parentNode;
  3258. }
  3259. if (parent && $__default["default"](parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
  3260. var dropdownElement = $__default["default"](element).closest(SELECTOR_DROPDOWN)[0];
  3261. if (dropdownElement) {
  3262. var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
  3263. $__default["default"](dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
  3264. }
  3265. element.setAttribute('aria-expanded', true);
  3266. }
  3267. if (callback) {
  3268. callback();
  3269. }
  3270. } // Static
  3271. ;
  3272. Tab._jQueryInterface = function _jQueryInterface(config) {
  3273. return this.each(function () {
  3274. var $this = $__default["default"](this);
  3275. var data = $this.data(DATA_KEY$1);
  3276. if (!data) {
  3277. data = new Tab(this);
  3278. $this.data(DATA_KEY$1, data);
  3279. }
  3280. if (typeof config === 'string') {
  3281. if (typeof data[config] === 'undefined') {
  3282. throw new TypeError("No method named \"" + config + "\"");
  3283. }
  3284. data[config]();
  3285. }
  3286. });
  3287. };
  3288. _createClass(Tab, null, [{
  3289. key: "VERSION",
  3290. get: function get() {
  3291. return VERSION$1;
  3292. }
  3293. }]);
  3294. return Tab;
  3295. }();
  3296. /**
  3297. * Data API implementation
  3298. */
  3299. $__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
  3300. event.preventDefault();
  3301. Tab._jQueryInterface.call($__default["default"](this), 'show');
  3302. });
  3303. /**
  3304. * jQuery
  3305. */
  3306. $__default["default"].fn[NAME$1] = Tab._jQueryInterface;
  3307. $__default["default"].fn[NAME$1].Constructor = Tab;
  3308. $__default["default"].fn[NAME$1].noConflict = function () {
  3309. $__default["default"].fn[NAME$1] = JQUERY_NO_CONFLICT$1;
  3310. return Tab._jQueryInterface;
  3311. };
  3312. /**
  3313. * Constants
  3314. */
  3315. var NAME = 'toast';
  3316. var VERSION = '4.6.2';
  3317. var DATA_KEY = 'bs.toast';
  3318. var EVENT_KEY = "." + DATA_KEY;
  3319. var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
  3320. var CLASS_NAME_FADE = 'fade';
  3321. var CLASS_NAME_HIDE = 'hide';
  3322. var CLASS_NAME_SHOW = 'show';
  3323. var CLASS_NAME_SHOWING = 'showing';
  3324. var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
  3325. var EVENT_HIDE = "hide" + EVENT_KEY;
  3326. var EVENT_HIDDEN = "hidden" + EVENT_KEY;
  3327. var EVENT_SHOW = "show" + EVENT_KEY;
  3328. var EVENT_SHOWN = "shown" + EVENT_KEY;
  3329. var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
  3330. var Default = {
  3331. animation: true,
  3332. autohide: true,
  3333. delay: 500
  3334. };
  3335. var DefaultType = {
  3336. animation: 'boolean',
  3337. autohide: 'boolean',
  3338. delay: 'number'
  3339. };
  3340. /**
  3341. * Class definition
  3342. */
  3343. var Toast = /*#__PURE__*/function () {
  3344. function Toast(element, config) {
  3345. this._element = element;
  3346. this._config = this._getConfig(config);
  3347. this._timeout = null;
  3348. this._setListeners();
  3349. } // Getters
  3350. var _proto = Toast.prototype;
  3351. // Public
  3352. _proto.show = function show() {
  3353. var _this = this;
  3354. var showEvent = $__default["default"].Event(EVENT_SHOW);
  3355. $__default["default"](this._element).trigger(showEvent);
  3356. if (showEvent.isDefaultPrevented()) {
  3357. return;
  3358. }
  3359. this._clearTimeout();
  3360. if (this._config.animation) {
  3361. this._element.classList.add(CLASS_NAME_FADE);
  3362. }
  3363. var complete = function complete() {
  3364. _this._element.classList.remove(CLASS_NAME_SHOWING);
  3365. _this._element.classList.add(CLASS_NAME_SHOW);
  3366. $__default["default"](_this._element).trigger(EVENT_SHOWN);
  3367. if (_this._config.autohide) {
  3368. _this._timeout = setTimeout(function () {
  3369. _this.hide();
  3370. }, _this._config.delay);
  3371. }
  3372. };
  3373. this._element.classList.remove(CLASS_NAME_HIDE);
  3374. Util.reflow(this._element);
  3375. this._element.classList.add(CLASS_NAME_SHOWING);
  3376. if (this._config.animation) {
  3377. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  3378. $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  3379. } else {
  3380. complete();
  3381. }
  3382. };
  3383. _proto.hide = function hide() {
  3384. if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
  3385. return;
  3386. }
  3387. var hideEvent = $__default["default"].Event(EVENT_HIDE);
  3388. $__default["default"](this._element).trigger(hideEvent);
  3389. if (hideEvent.isDefaultPrevented()) {
  3390. return;
  3391. }
  3392. this._close();
  3393. };
  3394. _proto.dispose = function dispose() {
  3395. this._clearTimeout();
  3396. if (this._element.classList.contains(CLASS_NAME_SHOW)) {
  3397. this._element.classList.remove(CLASS_NAME_SHOW);
  3398. }
  3399. $__default["default"](this._element).off(EVENT_CLICK_DISMISS);
  3400. $__default["default"].removeData(this._element, DATA_KEY);
  3401. this._element = null;
  3402. this._config = null;
  3403. } // Private
  3404. ;
  3405. _proto._getConfig = function _getConfig(config) {
  3406. config = _extends({}, Default, $__default["default"](this._element).data(), typeof config === 'object' && config ? config : {});
  3407. Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
  3408. return config;
  3409. };
  3410. _proto._setListeners = function _setListeners() {
  3411. var _this2 = this;
  3412. $__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
  3413. return _this2.hide();
  3414. });
  3415. };
  3416. _proto._close = function _close() {
  3417. var _this3 = this;
  3418. var complete = function complete() {
  3419. _this3._element.classList.add(CLASS_NAME_HIDE);
  3420. $__default["default"](_this3._element).trigger(EVENT_HIDDEN);
  3421. };
  3422. this._element.classList.remove(CLASS_NAME_SHOW);
  3423. if (this._config.animation) {
  3424. var transitionDuration = Util.getTransitionDurationFromElement(this._element);
  3425. $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
  3426. } else {
  3427. complete();
  3428. }
  3429. };
  3430. _proto._clearTimeout = function _clearTimeout() {
  3431. clearTimeout(this._timeout);
  3432. this._timeout = null;
  3433. } // Static
  3434. ;
  3435. Toast._jQueryInterface = function _jQueryInterface(config) {
  3436. return this.each(function () {
  3437. var $element = $__default["default"](this);
  3438. var data = $element.data(DATA_KEY);
  3439. var _config = typeof config === 'object' && config;
  3440. if (!data) {
  3441. data = new Toast(this, _config);
  3442. $element.data(DATA_KEY, data);
  3443. }
  3444. if (typeof config === 'string') {
  3445. if (typeof data[config] === 'undefined') {
  3446. throw new TypeError("No method named \"" + config + "\"");
  3447. }
  3448. data[config](this);
  3449. }
  3450. });
  3451. };
  3452. _createClass(Toast, null, [{
  3453. key: "VERSION",
  3454. get: function get() {
  3455. return VERSION;
  3456. }
  3457. }, {
  3458. key: "DefaultType",
  3459. get: function get() {
  3460. return DefaultType;
  3461. }
  3462. }, {
  3463. key: "Default",
  3464. get: function get() {
  3465. return Default;
  3466. }
  3467. }]);
  3468. return Toast;
  3469. }();
  3470. /**
  3471. * jQuery
  3472. */
  3473. $__default["default"].fn[NAME] = Toast._jQueryInterface;
  3474. $__default["default"].fn[NAME].Constructor = Toast;
  3475. $__default["default"].fn[NAME].noConflict = function () {
  3476. $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
  3477. return Toast._jQueryInterface;
  3478. };
  3479. exports.Alert = Alert;
  3480. exports.Button = Button;
  3481. exports.Carousel = Carousel;
  3482. exports.Collapse = Collapse;
  3483. exports.Dropdown = Dropdown;
  3484. exports.Modal = Modal;
  3485. exports.Popover = Popover;
  3486. exports.Scrollspy = ScrollSpy;
  3487. exports.Tab = Tab;
  3488. exports.Toast = Toast;
  3489. exports.Tooltip = Tooltip;
  3490. exports.Util = Util;
  3491. Object.defineProperty(exports, '__esModule', { value: true });
  3492. }));
  3493. //# sourceMappingURL=bootstrap.js.map