Repositorio del curso CCOM4030 el semestre B91 del proyecto kilometro0

bootstrap.js 129KB

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