Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootstrap.js 109KB

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