bootstrap.js 133 KB

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