You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootstrap.js 158KB

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