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

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