diff --git a/inc/class-wp-bootstrap-navwalker.php b/inc/class-wp-bootstrap-navwalker.php index 93e2e73..2b2f202 100644 --- a/inc/class-wp-bootstrap-navwalker.php +++ b/inc/class-wp-bootstrap-navwalker.php @@ -255,7 +255,6 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 $atts['class'][] = 'dropdown-toggle'; if ( ! $this->hover ) { $atts['data-toggle'] = 'dropdown'; - $atts['href'] = '#'; } } else { $collpse_as_button = apply_filters( 'cpschool_nav_collapse_as_button', false, $item, $args, $depth ); @@ -264,7 +263,7 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 if ( ! $collpse_as_button ) { $atts['class'][] = 'collapse-toggle'; $atts['data-toggle'] = 'collapse'; - $atts['href'] = '#' . $data_target; + $atts['data-target'] = '#' . $data_target; } } else { if ( ! $collpse_as_button ) { diff --git a/js/theme.js b/js/theme.js index ccffd53..f0c927c 100644 --- a/js/theme.js +++ b/js/theme.js @@ -7468,8 +7468,20 @@ var cpSchoolThemeHelpers = function ($) { } } }); - } // This will make vars in css work in IE11. + } + + $('a.collapse-toggle').on('touchend', function (e) { + var isExpanded = $(this).attr('aria-expanded'); + + if (isExpanded === 'true') { + e.preventDefault(); + var link = $(this).attr('href'); + if (!link.startsWith('#')) { + window.location = link; + } + } + }); // This will make vars in css work in IE11. if (typeof cssVars === "function") { cssVars({ diff --git a/js/theme.min.js b/js/theme.min.js index 72fc736..e96fe2d 100644 --- a/js/theme.min.js +++ b/js/theme.min.js @@ -1 +1 @@ -"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap={},e.jQuery)}(void 0,function(e,t){function P(e){return e&&"object"===_typeof(e)&&"default"in e?e:{default:e}}var f=P(t);function F(e,t){for(var n=0;nthis._items.length-1||e<0))if(this._isSliding)f.default(this._element).one(ee,function(){return t.to(e)});else{if(n===e)return this.pause(),void this.cycle();this._slide(n=n.clientWidth&&e>=n.clientHeight}),t=(0l[e]&&!i.escapeWithReference&&(n=Math.min(u[t],l[e]-("right"===e?u.width:u.height))),b({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=y({},u,f[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=(n=e.offsets).popper,n=n.reference,i=e.placement.split("-")[0],o=Math.floor,r=(i=-1!==["top","bottom"].indexOf(i))?"right":"bottom",a=i?"left":"top",i=i?"width":"height";return t[r]o(n[r])&&(e.offsets.popper[a]=o(n[r])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!Ke(e.instance.modifiers,"arrow","keepTogether"))return e;if("string"==typeof(t=t.element)){if(!(t=e.instance.popper.querySelector(t)))return e}else if(!e.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var n=e.placement.split("-")[0],i=(o=e.offsets).popper,o=o.reference,r=(n=-1!==["left","right"].indexOf(n))?"height":"width",a=(f=n?"Top":"Left").toLowerCase(),s=n?"left":"top",n=n?"bottom":"right",l=Le(t)[r],n=(o[n]-li[n]&&(e.offsets.popper[a]+=o[a]+l-i[n]),e.offsets.popper=w(e.offsets.popper),o[a]+o[r]/2-l/2),o=m(e.instance.popper),u=parseFloat(o["margin"+f]),o=parseFloat(o["border"+f+"Width"]),f=n-e.offsets.popper[a]-u-o,f=Math.max(Math.min(i[r]-l,f),0);return e.arrowElement=t,e.offsets.arrow=(b(n={},a,Math.round(f)),b(n,s,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,f){if(Be(u.instance.modifiers,"inner"))return u;if(u.flipped&&u.placement===u.originalPlacement)return u;var d=xe(u.instance.popper,u.instance.reference,f.padding,f.boundariesElement,u.positionFixed),c=u.placement.split("-")[0],h=He(c),p=u.placement.split("-")[1]||"",m=[];switch(f.behavior){case $e:m=[c,h];break;case Ze:m=Je(c);break;case et:m=Je(c,!0);break;default:m=f.behavior}return m.forEach(function(e,t){if(c!==e||m.length===t+1)return u;c=u.placement.split("-")[0],h=He(c);var e=u.offsets.popper,n=u.offsets.reference,i=Math.floor,n="left"===c&&i(e.right)>i(n.left)||"right"===c&&i(e.left)i(n.top)||"bottom"===c&&i(e.top)i(d.right),a=i(e.top)i(d.bottom),i="left"===c&&o||"right"===c&&r||"top"===c&&a||"bottom"===c&&e,s=-1!==["top","bottom"].indexOf(c),l=!!f.flipVariations&&(s&&"start"===p&&o||s&&"end"===p&&r||!s&&"start"===p&&a||!s&&"end"===p&&e),r=!!f.flipVariationsByContent&&(s&&"start"===p&&r||s&&"end"===p&&o||!s&&"start"===p&&e||!s&&"end"===p&&a),o=l||r;(n||i||o)&&(u.flipped=!0,(n||i)&&(c=m[t+1]),o&&(p="end"===(e=p)?"start":"start"===e?"end":e),u.placement=c+(p?"-"+p:""),u.offsets.popper=y({},u.offsets.popper,Pe(u.instance.popper,u.offsets.reference,u.placement)),u=Re(u.instance.modifiers,u,"flip"))}),u},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=(o=e.offsets).popper,o=o.reference,r=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[r?"left":"top"]=o[n]-(a?i[r?"width":"height"]:0),e.placement=He(t),e.offsets.popper=w(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Ke(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Fe(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.rightdocument.documentElement.clientHeight)||(this._element.style.overflowY="hidden"),this._element.classList.add(yt),t=d.getTransitionDurationFromElement(this._dialog),f.default(this._element).off(d.TRANSITION_END),f.default(this._element).one(d.TRANSITION_END,function(){n._element.classList.remove(yt),e||f.default(n._element).one(d.TRANSITION_END,function(){n._element.style.overflowY=""}).emulateTransitionEnd(n._element,t)}).emulateTransitionEnd(t),this._element.focus())},e._showElement=function(e){function t(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,f.default(n._element).trigger(r)}var n=this,i=f.default(this._element).hasClass(N),o=this._dialog?this._dialog.querySelector(".modal-body"):null,r=(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),f.default(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&d.reflow(this._element),f.default(this._element).addClass(bt),this._config.focus&&this._enforceFocus(),f.default.Event("shown.bs.modal",{relatedTarget:e}));i?(o=d.getTransitionDurationFromElement(this._dialog),f.default(this._dialog).one(d.TRANSITION_END,t).emulateTransitionEnd(o)):t()},e._enforceFocus=function(){var t=this;f.default(document).off(Tt).on(Tt,function(e){document!==e.target&&t._element!==e.target&&0===f.default(t._element).has(e.target).length&&t._element.focus()})},e._setEscapeEvent=function(){var t=this;this._isShown?f.default(this._element).on(Dt,function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()}):this._isShown||f.default(this._element).off(Dt)},e._setResizeEvent=function(){var t=this;this._isShown?f.default(window).on(Ct,function(e){return t.handleUpdate(e)}):f.default(window).off(Ct)},e._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop(function(){f.default(document.body).removeClass(vt),e._resetAdjustments(),e._resetScrollbar(),f.default(e._element).trigger(wt)})},e._removeBackdrop=function(){this._backdrop&&(f.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(e){var t,n=this,i=f.default(this._element).hasClass(N)?N:"";this._isShown&&this._config.backdrop?(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),f.default(this._backdrop).appendTo(document.body),f.default(this._element).on(St,function(e){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"===n._config.backdrop?n._triggerBackdropTransition():n.hide())}),i&&d.reflow(this._backdrop),f.default(this._backdrop).addClass(bt),e&&(i?(i=d.getTransitionDurationFromElement(this._backdrop),f.default(this._backdrop).one(d.TRANSITION_END,e).emulateTransitionEnd(i)):e())):!this._isShown&&this._backdrop?(f.default(this._backdrop).removeClass(bt),i=function(){n._removeBackdrop(),e&&e()},f.default(this._element).hasClass(N)?(t=d.getTransitionDurationFromElement(this._backdrop),f.default(this._backdrop).one(d.TRANSITION_END,i).emulateTransitionEnd(t)):i()):e&&e()},e._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:Xe,popperConfig:null},Xt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Gt={HIDE:"hide"+A,HIDDEN:"hidden"+A,SHOW:"show"+A,SHOWN:"shown"+A,INSERTED:"inserted"+A,CLICK:"click"+A,FOCUSIN:"focusin"+A,FOCUSOUT:"focusout"+A,MOUSEENTER:"mouseenter"+A,MOUSELEAVE:"mouseleave"+A},I=function(){function o(e,t){if(void 0===it)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var e=o.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(e){var t,n;this._isEnabled&&(e?(t=this.constructor.DATA_KEY,(n=f.default(e.currentTarget).data(t))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),f.default(e.currentTarget).data(t,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)):f.default(this.getTipElement()).hasClass(Ut)?this._leave(null,this):this._enter(null,this))},e.dispose=function(){clearTimeout(this._timeout),f.default.removeData(this.element,this.constructor.DATA_KEY),f.default(this.element).off(this.constructor.EVENT_KEY),f.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&f.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===f.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e,n,i=f.default.Event(this.constructor.Event.SHOW);this.isWithContent()&&this._isEnabled&&(f.default(this.element).trigger(i),n=d.findShadowRoot(this.element),n=f.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element),!i.isDefaultPrevented()&&n&&(i=this.getTipElement(),n=d.getUID(this.constructor.NAME),i.setAttribute("id",n),this.element.setAttribute("aria-describedby",n),this.setContent(),this.config.animation&&f.default(i).addClass(Qt),n="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,n=this._getAttachment(n),this.addAttachmentClass(n),e=this._getContainer(),f.default(i).data(this.constructor.DATA_KEY,this),f.default.contains(this.element.ownerDocument.documentElement,this.tip)||f.default(i).appendTo(e),f.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new it(this.element,i,this._getPopperConfig(n)),f.default(i).addClass(Ut),f.default(i).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&f.default(document.body).children().on("mouseover",null,f.default.noop),e=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,f.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)},f.default(this.tip).hasClass(Qt)?(n=d.getTransitionDurationFromElement(this.tip),f.default(this.tip).one(d.TRANSITION_END,e).emulateTransitionEnd(n)):e()))},e.hide=function(e){function t(){n._hoverState!==Wt&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),f.default(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()}var n=this,i=this.getTipElement(),o=f.default.Event(this.constructor.Event.HIDE);f.default(this.element).trigger(o),o.isDefaultPrevented()||(f.default(i).removeClass(Ut),"ontouchstart"in document.documentElement&&f.default(document.body).children().off("mouseover",null,f.default.noop),this._activeTrigger.click=!1,this._activeTrigger[Yt]=!1,this._activeTrigger[Vt]=!1,f.default(this.tip).hasClass(Qt)?(o=d.getTransitionDurationFromElement(i),f.default(i).one(d.TRANSITION_END,t).emulateTransitionEnd(o)):t(),this._hoverState="")},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(e){f.default(this.getTipElement()).addClass(Bt+"-"+e)},e.getTipElement=function(){return this.tip=this.tip||f.default(this.config.template)[0],this.tip},e.setContent=function(){var e=this.getTipElement();this.setElementContent(f.default(e.querySelectorAll(".tooltip-inner")),this.getTitle()),f.default(e).removeClass(Qt+" "+Ut)},e.setElementContent=function(e,t){"object"===_typeof(t)&&(t.nodeType||t.jquery)?this.config.html?f.default(t).parent().is(e)||e.empty().append(t):e.text(f.default(t).text()):this.config.html?(this.config.sanitize&&(t=Pt(t,this.config.whiteList,this.config.sanitizeFn)),e.html(t)):e.text(t)},e.getTitle=function(){return this.element.getAttribute("data-original-title")||("function"==typeof this.config.title?this.config.title.call(this.element):this.config.title)},e._getPopperConfig=function(e){var t=this;return s({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:d.isElement(this.config.container)?f.default(this.config.container):f.default(document).find(this.config.container)},e._getAttachment=function(e){return zt[e.toUpperCase()]},e._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(e){var t;"click"===e?f.default(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(e){return n.toggle(e)}):"manual"!==e&&(t=e===Vt?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,e=e===Vt?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT,f.default(n.element).on(t,n.config.selector,function(e){return n._enter(e)}).on(e,n.config.selector,function(e){return n._leave(e)}))}),this._hideModalHandler=function(){n.element&&n.hide()},f.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var e=_typeof(this.element.getAttribute("data-original-title"));!this.element.getAttribute("title")&&"string"===e||(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(e,t){var n=this.constructor.DATA_KEY;(t=t||f.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),f.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusin"===e.type?Yt:Vt]=!0),f.default(t.getTipElement()).hasClass(Ut)||t._hoverState===Wt?t._hoverState=Wt:(clearTimeout(t._timeout),t._hoverState=Wt,t.config.delay&&t.config.delay.show?t._timeout=setTimeout(function(){t._hoverState===Wt&&t.show()},t.config.delay.show):t.show())},e._leave=function(e,t){var n=this.constructor.DATA_KEY;(t=t||f.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),f.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusout"===e.type?Yt:Vt]=!1),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState="out",t.config.delay&&t.config.delay.hide?t._timeout=setTimeout(function(){"out"===t._hoverState&&t.hide()},t.config.delay.hide):t.hide())},e._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},e._getConfig=function(e){var t=f.default(this.element).data();return Object.keys(t).forEach(function(e){-1!==qt.indexOf(e)&&delete t[e]}),"number"==typeof(e=s({},this.constructor.Default,t,"object"===_typeof(e)&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),d.typeCheckConfig(k,e,this.constructor.DefaultType),e.sanitize&&(e.template=Pt(e.template,e.whiteList,e.sanitizeFn)),e},e._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},e._cleanTipClass=function(){var e=f.default(this.getTipElement()),t=e.attr("class").match(Mt);null!==t&&t.length&&e.removeClass(t.join(""))},e._handlePopperPlacementChange=function(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},e._fixTransition=function(){var e=this.getTipElement(),t=this.config.animation;null===e.getAttribute("x-placement")&&(f.default(e).removeClass(Qt),this.config.animation=!1,this.hide(),this.show(),this.config.animation=t)},o._jQueryInterface=function(i){return this.each(function(){var e=f.default(this),t=e.data(Ft),n="object"===_typeof(i)&&i;if((t||!/dispose|hide/.test(i))&&(t||(t=new o(this,n),e.data(Ft,t)),"string"==typeof i)){if(void 0===t[i])throw new TypeError('No method named "'+i+'"');t[i]()}})},a(o,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Kt}},{key:"NAME",get:function(){return k}},{key:"DATA_KEY",get:function(){return Ft}},{key:"Event",get:function(){return Gt}},{key:"EVENT_KEY",get:function(){return A}},{key:"DefaultType",get:function(){return Xt}}]),o}(),x=(f.default.fn[k]=I._jQueryInterface,f.default.fn[k].Constructor=I,f.default.fn[k].noConflict=function(){return f.default.fn[k]=Rt,I._jQueryInterface},"popover"),Jt="bs.popover",O="."+Jt,$t=f.default.fn[x],Zt="bs-popover",en=new RegExp("(^|\\s)"+Zt+"\\S+","g"),tn=s({},I.Default,{placement:"right",trigger:"click",content:"",template:''}),nn=s({},I.DefaultType,{content:"(string|element|function)"}),on={HIDE:"hide"+O,HIDDEN:"hidden"+O,SHOW:"show"+O,SHOWN:"shown"+O,INSERTED:"inserted"+O,CLICK:"click"+O,FOCUSIN:"focusin"+O,FOCUSOUT:"focusout"+O,MOUSEENTER:"mouseenter"+O,MOUSELEAVE:"mouseleave"+O},rn=function(e){var t;function i(){return e.apply(this,arguments)||this}t=e,(n=i).prototype=Object.create(t.prototype),R(n.prototype.constructor=n,t);var n=i.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.addAttachmentClass=function(e){f.default(this.getTipElement()).addClass(Zt+"-"+e)},n.getTipElement=function(){return this.tip=this.tip||f.default(this.config.template)[0],this.tip},n.setContent=function(){var e=f.default(this.getTipElement()),t=(this.setElementContent(e.find(".popover-header"),this.getTitle()),this._getContent());"function"==typeof t&&(t=t.call(this.element)),this.setElementContent(e.find(".popover-body"),t),e.removeClass("fade show")},n._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},n._cleanTipClass=function(){var e=f.default(this.getTipElement()),t=e.attr("class").match(en);null!==t&&0=this._offsets[i]&&(void 0===this._offsets[i+1]||e li > .active",wn=function(){function i(e){this._element=e}var e=i.prototype;return e.show=function(){var e,t,n,i,o,r,a=this;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&f.default(this._element).hasClass(vn)||f.default(this._element).hasClass("disabled")||(t=f.default(this._element).closest(".nav, .list-group")[0],n=d.getSelectorFromElement(this._element),t&&(o="UL"===t.nodeName||"OL"===t.nodeName?yn:bn,i=(i=f.default.makeArray(f.default(t).find(o)))[i.length-1]),o=f.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=f.default.Event("show.bs.tab",{relatedTarget:i}),i&&f.default(i).trigger(o),f.default(this._element).trigger(r),r.isDefaultPrevented()||o.isDefaultPrevented()||(n&&(e=document.querySelector(n)),this._activate(this._element,t),r=function(){var e=f.default.Event("hidden.bs.tab",{relatedTarget:a._element}),t=f.default.Event("shown.bs.tab",{relatedTarget:i});f.default(i).trigger(e),f.default(a._element).trigger(t)},e?this._activate(e,e.parentNode,r):r()))},e.dispose=function(){f.default.removeData(this._element,gn),this._element=null},e._activate=function(e,t,n){function i(){return o._transitionComplete(e,r,n)}var o=this,r=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?f.default(t).children(bn):f.default(t).find(yn))[0],t=n&&r&&f.default(r).hasClass("fade");r&&t?(t=d.getTransitionDurationFromElement(r),f.default(r).removeClass("show").one(d.TRANSITION_END,i).emulateTransitionEnd(t)):i()},e._transitionComplete=function(e,t,n){t&&(f.default(t).removeClass(vn),(i=f.default(t.parentNode).find("> .dropdown-menu .active")[0])&&f.default(i).removeClass(vn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)),f.default(e).addClass(vn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),d.reflow(e),e.classList.contains("fade")&&e.classList.add("show");var i=e.parentNode;(i=i&&"LI"===i.nodeName?i.parentNode:i)&&f.default(i).hasClass("dropdown-menu")&&((t=f.default(e).closest(".dropdown")[0])&&(i=[].slice.call(t.querySelectorAll(".dropdown-toggle")),f.default(i).addClass(vn)),e.setAttribute("aria-expanded",!0)),n&&n()},i._jQueryInterface=function(n){return this.each(function(){var e=f.default(this),t=e.data(gn);if(t||(t=new i(this),e.data(gn,t)),"string"==typeof n){if(void 0===t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},a(i,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),i}(),H=(f.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(e){e.preventDefault(),wn._jQueryInterface.call(f.default(this),"show")}),f.default.fn.tab=wn._jQueryInterface,f.default.fn.tab.Constructor=wn,f.default.fn.tab.noConflict=function(){return f.default.fn.tab=_n,wn._jQueryInterface},"toast"),En="bs.toast",t="."+En,Tn=f.default.fn[H],Cn="show",Sn="showing",Dn="click.dismiss"+t,Nn={animation:!0,autohide:!0,delay:500},kn={animation:"boolean",autohide:"boolean",delay:"number"},An=function(){function o(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var e=o.prototype;return e.show=function(){var e,t=this,n=f.default.Event("show.bs.toast");f.default(this._element).trigger(n),n.isDefaultPrevented()||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),n=function(){t._element.classList.remove(Sn),t._element.classList.add(Cn),f.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout(function(){t.hide()},t._config.delay))},this._element.classList.remove("hide"),d.reflow(this._element),this._element.classList.add(Sn),this._config.animation?(e=d.getTransitionDurationFromElement(this._element),f.default(this._element).one(d.TRANSITION_END,n).emulateTransitionEnd(e)):n())},e.hide=function(){var e;this._element.classList.contains(Cn)&&(e=f.default.Event("hide.bs.toast"),f.default(this._element).trigger(e),e.isDefaultPrevented()||this._close())},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(Cn)&&this._element.classList.remove(Cn),f.default(this._element).off(Dn),f.default.removeData(this._element,En),this._element=null,this._config=null},e._getConfig=function(e){return e=s({},Nn,f.default(this._element).data(),"object"===_typeof(e)&&e?e:{}),d.typeCheckConfig(H,e,this.constructor.DefaultType),e},e._setListeners=function(){var e=this;f.default(this._element).on(Dn,'[data-dismiss="toast"]',function(){return e.hide()})},e._close=function(){function e(){n._element.classList.add("hide"),f.default(n._element).trigger("hidden.bs.toast")}var t,n=this;this._element.classList.remove(Cn),this._config.animation?(t=d.getTransitionDurationFromElement(this._element),f.default(this._element).one(d.TRANSITION_END,e).emulateTransitionEnd(t)):e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},o._jQueryInterface=function(i){return this.each(function(){var e=f.default(this),t=e.data(En),n="object"===_typeof(i)&&i;if(t||(t=new o(this,n),e.data(En,t)),"string"==typeof i){if(void 0===t[i])throw new TypeError('No method named "'+i+'"');t[i](this)}})},a(o,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"DefaultType",get:function(){return kn}},{key:"Default",get:function(){return Nn}}]),o}();f.default.fn[H]=An._jQueryInterface,f.default.fn[H].Constructor=An,f.default.fn[H].noConflict=function(){return f.default.fn[H]=Tn,An._jQueryInterface},e.Alert=n,e.Button=K,e.Carousel=o,e.Collapse=ce,e.Dropdown=C,e.Modal=Ot,e.Popover=rn,e.Scrollspy=mn,e.Tab=wn,e.Toast=An,e.Tooltip=I,e.Util=d,Object.defineProperty(e,"__esModule",{value:!0})});var cpSchoolThemeHelpers=function(i){var o={setCSSVar:function(e,t){getComputedStyle(document.documentElement).getPropertyValue(e)!=t&&document.documentElement.style.setProperty(e,t)},getNavbarHeight:function(){var e=i("#navbar-main");return e.length?e.outerHeight():0},getNavbarBrandHolderHeight:function(){var e=i("#navbar-main .navbar-brand-holder");return e.length?e.outerHeight():0},getHeaderDropboxGap:function(e){var t=o.getNavbarHeight(),n=i("#wrapper-navbar-main.navbar-style-dropbox .navbar-brand");if(t&&n.length){n=n.outerHeight()-t;if(e){if(0i(this).outerHeight()+parseInt(i(this).css("top"))?i(this).addClass("sidebar-sticky"):i(this).removeClass("sidebar-sticky")})},enableDropdownAnimation:function(){i(".dropdown").on("shown.bs.dropdown",function(e){var t=i(this);setTimeout(function(){t.addClass("shown")},10)}),i(".dropdown-menu").on("transitionend",function(e){!i(e.target).hasClass("dropdown-menu")||i(this).hasClass("show")||i(this).parent().removeClass("shown")})},enableAlertDismissal:function(e){var t;e.length&&(t=e.data("ver"),e.find('[data-dismiss="alert"]').click(function(e){Cookies.set("site_alert_bar_dismiss_ver",t,{expires:365})}))},enableHoverMenu:function(){i(".navbar-nav").on("touchend mouseenter focusin",".dropdown",function(e){var t=this,n=i(t).children('.dropdown-toggle[aria-expanded="false"]');n.length&&("touchend"==e.type&&(e.preventDefault(),i(".navbar-nav").off("mouseenter focusin",".dropdown")),setTimeout(function(){"mouseover"===e.type&&!i(t).is(":hover")||(n.dropdown("show"),n.off("click"),"mouseenter"!==e.type&&"mouseover"!==e.type||n.trigger("blur"))},"mouseenter"===e.type?150:0))}),i(".navbar-nav").on("mouseleave focusout",".dropdown",function(t){var n=this;setTimeout(function(){var e;i(n).is(":hover")||"focusout"===t.type&&n.contains(t.relatedTarget)||(e=i(n).children('.dropdown-toggle[aria-expanded="true"]')).length&&(e.dropdown("hide"),e.attr("aria-expanded",!1))},"mouseleave"===t.type?300:0)}),i(".nav:not(.navbar-nav)").on("touchend mouseenter focusin",".dropdown",function(e){var t=this,n=i(t).children('.dropdown-toggle[aria-expanded="false"]');n.length&&("touchend"==e.type&&(e.preventDefault(),i(".nav:not(.navbar-nav)").off("mouseenter focusin",".dropdown-toggle")),setTimeout(function(){"mouseover"===e.type&&!i(t).is(":hover")||(i(n.data("target")).collapse("show"),n.attr("aria-expanded","true"))},"mouseenter"===e.type?150:0))}),i(".nav:not(.navbar-nav)").on("mouseleave focusout",".dropdown",function(e){i(this).is(":hover")||"focusout"===e.type&&this.contains(e.relatedTarget)||(e=i(this).children('.dropdown-toggle[aria-expanded="true"]')).length&&(i(e.data("target")).collapse("hide"),e.attr("aria-expanded","false"))}),i(".nav:not(.navbar-nav)").on("click",'.dropdown-toggle[href="#"]',function(e){e.preventDefault()})}};return o}(jQuery);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){var t,n,i;"function"==typeof define&&define.amd&&(define(e),t=!0),"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&(module.exports=e(),t=!0),t||(n=window.Cookies,(i=window.Cookies=e()).noConflict=function(){return window.Cookies=n,i})}(function(){function s(){for(var e=0,t={};e .alignfull, .entry-content > .alignwide, .entry-content > .aligncenter").attr("data-aos","fade-up"),t(".entry-content > .alignleft").attr("data-aos","fade-right"),t(".entry-content > .alignright").attr("data-aos","fade-left"),AOS.init({offset:150,delay:50,duration:800,once:!0,disable:function(){return window.document.documentMode<=11}})),"function"==typeof cssVars&&cssVars({preserveStatic:!1})}(jQuery); \ No newline at end of file +"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap={},e.jQuery)}(void 0,function(e,t){function P(e){return e&&"object"===_typeof(e)&&"default"in e?e:{default:e}}var d=P(t);function F(e,t){for(var n=0;nthis._items.length-1||e<0))if(this._isSliding)d.default(this._element).one(ee,function(){return t.to(e)});else{if(n===e)return this.pause(),void this.cycle();this._slide(n=n.clientWidth&&e>=n.clientHeight}),t=(0l[e]&&!i.escapeWithReference&&(n=Math.min(u[t],l[e]-("right"===e?u.width:u.height))),b({},t,n)}};return t.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=y({},u,d[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=(n=e.offsets).popper,n=n.reference,i=e.placement.split("-")[0],o=Math.floor,r=(i=-1!==["top","bottom"].indexOf(i))?"right":"bottom",a=i?"left":"top",i=i?"width":"height";return t[r]o(n[r])&&(e.offsets.popper[a]=o(n[r])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!Ke(e.instance.modifiers,"arrow","keepTogether"))return e;if("string"==typeof(t=t.element)){if(!(t=e.instance.popper.querySelector(t)))return e}else if(!e.instance.popper.contains(t))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var n=e.placement.split("-")[0],i=(o=e.offsets).popper,o=o.reference,r=(n=-1!==["left","right"].indexOf(n))?"height":"width",a=(d=n?"Top":"Left").toLowerCase(),s=n?"left":"top",n=n?"bottom":"right",l=Le(t)[r],n=(o[n]-li[n]&&(e.offsets.popper[a]+=o[a]+l-i[n]),e.offsets.popper=w(e.offsets.popper),o[a]+o[r]/2-l/2),o=m(e.instance.popper),u=parseFloat(o["margin"+d]),o=parseFloat(o["border"+d+"Width"]),d=n-e.offsets.popper[a]-u-o,d=Math.max(Math.min(i[r]-l,d),0);return e.arrowElement=t,e.offsets.arrow=(b(n={},a,Math.round(d)),b(n,s,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,d){if(Be(u.instance.modifiers,"inner"))return u;if(u.flipped&&u.placement===u.originalPlacement)return u;var f=xe(u.instance.popper,u.instance.reference,d.padding,d.boundariesElement,u.positionFixed),c=u.placement.split("-")[0],h=He(c),p=u.placement.split("-")[1]||"",m=[];switch(d.behavior){case $e:m=[c,h];break;case Ze:m=Je(c);break;case et:m=Je(c,!0);break;default:m=d.behavior}return m.forEach(function(e,t){if(c!==e||m.length===t+1)return u;c=u.placement.split("-")[0],h=He(c);var e=u.offsets.popper,n=u.offsets.reference,i=Math.floor,n="left"===c&&i(e.right)>i(n.left)||"right"===c&&i(e.left)i(n.top)||"bottom"===c&&i(e.top)i(f.right),a=i(e.top)i(f.bottom),i="left"===c&&o||"right"===c&&r||"top"===c&&a||"bottom"===c&&e,s=-1!==["top","bottom"].indexOf(c),l=!!d.flipVariations&&(s&&"start"===p&&o||s&&"end"===p&&r||!s&&"start"===p&&a||!s&&"end"===p&&e),r=!!d.flipVariationsByContent&&(s&&"start"===p&&r||s&&"end"===p&&o||!s&&"start"===p&&e||!s&&"end"===p&&a),o=l||r;(n||i||o)&&(u.flipped=!0,(n||i)&&(c=m[t+1]),o&&(p="end"===(e=p)?"start":"start"===e?"end":e),u.placement=c+(p?"-"+p:""),u.offsets.popper=y({},u.offsets.popper,Pe(u.instance.popper,u.offsets.reference,u.placement)),u=Re(u.instance.modifiers,u,"flip"))}),u},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=(o=e.offsets).popper,o=o.reference,r=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[r?"left":"top"]=o[n]-(a?i[r?"width":"height"]:0),e.placement=He(t),e.offsets.popper=w(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Ke(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Fe(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.rightdocument.documentElement.clientHeight)||(this._element.style.overflowY="hidden"),this._element.classList.add(yt),t=f.getTransitionDurationFromElement(this._dialog),d.default(this._element).off(f.TRANSITION_END),d.default(this._element).one(f.TRANSITION_END,function(){n._element.classList.remove(yt),e||d.default(n._element).one(f.TRANSITION_END,function(){n._element.style.overflowY=""}).emulateTransitionEnd(n._element,t)}).emulateTransitionEnd(t),this._element.focus())},e._showElement=function(e){function t(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,d.default(n._element).trigger(r)}var n=this,i=d.default(this._element).hasClass(N),o=this._dialog?this._dialog.querySelector(".modal-body"):null,r=(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),d.default(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&f.reflow(this._element),d.default(this._element).addClass(bt),this._config.focus&&this._enforceFocus(),d.default.Event("shown.bs.modal",{relatedTarget:e}));i?(o=f.getTransitionDurationFromElement(this._dialog),d.default(this._dialog).one(f.TRANSITION_END,t).emulateTransitionEnd(o)):t()},e._enforceFocus=function(){var t=this;d.default(document).off(Tt).on(Tt,function(e){document!==e.target&&t._element!==e.target&&0===d.default(t._element).has(e.target).length&&t._element.focus()})},e._setEscapeEvent=function(){var t=this;this._isShown?d.default(this._element).on(Dt,function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()}):this._isShown||d.default(this._element).off(Dt)},e._setResizeEvent=function(){var t=this;this._isShown?d.default(window).on(Ct,function(e){return t.handleUpdate(e)}):d.default(window).off(Ct)},e._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop(function(){d.default(document.body).removeClass(vt),e._resetAdjustments(),e._resetScrollbar(),d.default(e._element).trigger(wt)})},e._removeBackdrop=function(){this._backdrop&&(d.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(e){var t,n=this,i=d.default(this._element).hasClass(N)?N:"";this._isShown&&this._config.backdrop?(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),d.default(this._backdrop).appendTo(document.body),d.default(this._element).on(St,function(e){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"===n._config.backdrop?n._triggerBackdropTransition():n.hide())}),i&&f.reflow(this._backdrop),d.default(this._backdrop).addClass(bt),e&&(i?(i=f.getTransitionDurationFromElement(this._backdrop),d.default(this._backdrop).one(f.TRANSITION_END,e).emulateTransitionEnd(i)):e())):!this._isShown&&this._backdrop?(d.default(this._backdrop).removeClass(bt),i=function(){n._removeBackdrop(),e&&e()},d.default(this._element).hasClass(N)?(t=f.getTransitionDurationFromElement(this._backdrop),d.default(this._backdrop).one(f.TRANSITION_END,i).emulateTransitionEnd(t)):i()):e&&e()},e._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:Xe,popperConfig:null},Xt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Gt={HIDE:"hide"+A,HIDDEN:"hidden"+A,SHOW:"show"+A,SHOWN:"shown"+A,INSERTED:"inserted"+A,CLICK:"click"+A,FOCUSIN:"focusin"+A,FOCUSOUT:"focusout"+A,MOUSEENTER:"mouseenter"+A,MOUSELEAVE:"mouseleave"+A},I=function(){function o(e,t){if(void 0===it)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var e=o.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(e){var t,n;this._isEnabled&&(e?(t=this.constructor.DATA_KEY,(n=d.default(e.currentTarget).data(t))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),d.default(e.currentTarget).data(t,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)):d.default(this.getTipElement()).hasClass(Qt)?this._leave(null,this):this._enter(null,this))},e.dispose=function(){clearTimeout(this._timeout),d.default.removeData(this.element,this.constructor.DATA_KEY),d.default(this.element).off(this.constructor.EVENT_KEY),d.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&d.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===d.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e,n,i=d.default.Event(this.constructor.Event.SHOW);this.isWithContent()&&this._isEnabled&&(d.default(this.element).trigger(i),n=f.findShadowRoot(this.element),n=d.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element),!i.isDefaultPrevented()&&n&&(i=this.getTipElement(),n=f.getUID(this.constructor.NAME),i.setAttribute("id",n),this.element.setAttribute("aria-describedby",n),this.setContent(),this.config.animation&&d.default(i).addClass(Wt),n="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,n=this._getAttachment(n),this.addAttachmentClass(n),e=this._getContainer(),d.default(i).data(this.constructor.DATA_KEY,this),d.default.contains(this.element.ownerDocument.documentElement,this.tip)||d.default(i).appendTo(e),d.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new it(this.element,i,this._getPopperConfig(n)),d.default(i).addClass(Qt),d.default(i).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&d.default(document.body).children().on("mouseover",null,d.default.noop),e=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,d.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)},d.default(this.tip).hasClass(Wt)?(n=f.getTransitionDurationFromElement(this.tip),d.default(this.tip).one(f.TRANSITION_END,e).emulateTransitionEnd(n)):e()))},e.hide=function(e){function t(){n._hoverState!==Ut&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),d.default(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()}var n=this,i=this.getTipElement(),o=d.default.Event(this.constructor.Event.HIDE);d.default(this.element).trigger(o),o.isDefaultPrevented()||(d.default(i).removeClass(Qt),"ontouchstart"in document.documentElement&&d.default(document.body).children().off("mouseover",null,d.default.noop),this._activeTrigger.click=!1,this._activeTrigger[Yt]=!1,this._activeTrigger[Vt]=!1,d.default(this.tip).hasClass(Wt)?(o=f.getTransitionDurationFromElement(i),d.default(i).one(f.TRANSITION_END,t).emulateTransitionEnd(o)):t(),this._hoverState="")},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(e){d.default(this.getTipElement()).addClass(Bt+"-"+e)},e.getTipElement=function(){return this.tip=this.tip||d.default(this.config.template)[0],this.tip},e.setContent=function(){var e=this.getTipElement();this.setElementContent(d.default(e.querySelectorAll(".tooltip-inner")),this.getTitle()),d.default(e).removeClass(Wt+" "+Qt)},e.setElementContent=function(e,t){"object"===_typeof(t)&&(t.nodeType||t.jquery)?this.config.html?d.default(t).parent().is(e)||e.empty().append(t):e.text(d.default(t).text()):this.config.html?(this.config.sanitize&&(t=Pt(t,this.config.whiteList,this.config.sanitizeFn)),e.html(t)):e.text(t)},e.getTitle=function(){return this.element.getAttribute("data-original-title")||("function"==typeof this.config.title?this.config.title.call(this.element):this.config.title)},e._getPopperConfig=function(e){var t=this;return s({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:f.isElement(this.config.container)?d.default(this.config.container):d.default(document).find(this.config.container)},e._getAttachment=function(e){return zt[e.toUpperCase()]},e._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(e){var t;"click"===e?d.default(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(e){return n.toggle(e)}):"manual"!==e&&(t=e===Vt?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,e=e===Vt?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT,d.default(n.element).on(t,n.config.selector,function(e){return n._enter(e)}).on(e,n.config.selector,function(e){return n._leave(e)}))}),this._hideModalHandler=function(){n.element&&n.hide()},d.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var e=_typeof(this.element.getAttribute("data-original-title"));!this.element.getAttribute("title")&&"string"===e||(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(e,t){var n=this.constructor.DATA_KEY;(t=t||d.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),d.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusin"===e.type?Yt:Vt]=!0),d.default(t.getTipElement()).hasClass(Qt)||t._hoverState===Ut?t._hoverState=Ut:(clearTimeout(t._timeout),t._hoverState=Ut,t.config.delay&&t.config.delay.show?t._timeout=setTimeout(function(){t._hoverState===Ut&&t.show()},t.config.delay.show):t.show())},e._leave=function(e,t){var n=this.constructor.DATA_KEY;(t=t||d.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),d.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusout"===e.type?Yt:Vt]=!1),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState="out",t.config.delay&&t.config.delay.hide?t._timeout=setTimeout(function(){"out"===t._hoverState&&t.hide()},t.config.delay.hide):t.hide())},e._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},e._getConfig=function(e){var t=d.default(this.element).data();return Object.keys(t).forEach(function(e){-1!==qt.indexOf(e)&&delete t[e]}),"number"==typeof(e=s({},this.constructor.Default,t,"object"===_typeof(e)&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),f.typeCheckConfig(k,e,this.constructor.DefaultType),e.sanitize&&(e.template=Pt(e.template,e.whiteList,e.sanitizeFn)),e},e._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},e._cleanTipClass=function(){var e=d.default(this.getTipElement()),t=e.attr("class").match(Mt);null!==t&&t.length&&e.removeClass(t.join(""))},e._handlePopperPlacementChange=function(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},e._fixTransition=function(){var e=this.getTipElement(),t=this.config.animation;null===e.getAttribute("x-placement")&&(d.default(e).removeClass(Wt),this.config.animation=!1,this.hide(),this.show(),this.config.animation=t)},o._jQueryInterface=function(i){return this.each(function(){var e=d.default(this),t=e.data(Ft),n="object"===_typeof(i)&&i;if((t||!/dispose|hide/.test(i))&&(t||(t=new o(this,n),e.data(Ft,t)),"string"==typeof i)){if(void 0===t[i])throw new TypeError('No method named "'+i+'"');t[i]()}})},a(o,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Kt}},{key:"NAME",get:function(){return k}},{key:"DATA_KEY",get:function(){return Ft}},{key:"Event",get:function(){return Gt}},{key:"EVENT_KEY",get:function(){return A}},{key:"DefaultType",get:function(){return Xt}}]),o}(),x=(d.default.fn[k]=I._jQueryInterface,d.default.fn[k].Constructor=I,d.default.fn[k].noConflict=function(){return d.default.fn[k]=Rt,I._jQueryInterface},"popover"),Jt="bs.popover",O="."+Jt,$t=d.default.fn[x],Zt="bs-popover",en=new RegExp("(^|\\s)"+Zt+"\\S+","g"),tn=s({},I.Default,{placement:"right",trigger:"click",content:"",template:''}),nn=s({},I.DefaultType,{content:"(string|element|function)"}),on={HIDE:"hide"+O,HIDDEN:"hidden"+O,SHOW:"show"+O,SHOWN:"shown"+O,INSERTED:"inserted"+O,CLICK:"click"+O,FOCUSIN:"focusin"+O,FOCUSOUT:"focusout"+O,MOUSEENTER:"mouseenter"+O,MOUSELEAVE:"mouseleave"+O},rn=function(e){var t;function i(){return e.apply(this,arguments)||this}t=e,(n=i).prototype=Object.create(t.prototype),R(n.prototype.constructor=n,t);var n=i.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.addAttachmentClass=function(e){d.default(this.getTipElement()).addClass(Zt+"-"+e)},n.getTipElement=function(){return this.tip=this.tip||d.default(this.config.template)[0],this.tip},n.setContent=function(){var e=d.default(this.getTipElement()),t=(this.setElementContent(e.find(".popover-header"),this.getTitle()),this._getContent());"function"==typeof t&&(t=t.call(this.element)),this.setElementContent(e.find(".popover-body"),t),e.removeClass("fade show")},n._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},n._cleanTipClass=function(){var e=d.default(this.getTipElement()),t=e.attr("class").match(en);null!==t&&0=this._offsets[i]&&(void 0===this._offsets[i+1]||e li > .active",wn=function(){function i(e){this._element=e}var e=i.prototype;return e.show=function(){var e,t,n,i,o,r,a=this;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&d.default(this._element).hasClass(vn)||d.default(this._element).hasClass("disabled")||(t=d.default(this._element).closest(".nav, .list-group")[0],n=f.getSelectorFromElement(this._element),t&&(o="UL"===t.nodeName||"OL"===t.nodeName?yn:bn,i=(i=d.default.makeArray(d.default(t).find(o)))[i.length-1]),o=d.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=d.default.Event("show.bs.tab",{relatedTarget:i}),i&&d.default(i).trigger(o),d.default(this._element).trigger(r),r.isDefaultPrevented()||o.isDefaultPrevented()||(n&&(e=document.querySelector(n)),this._activate(this._element,t),r=function(){var e=d.default.Event("hidden.bs.tab",{relatedTarget:a._element}),t=d.default.Event("shown.bs.tab",{relatedTarget:i});d.default(i).trigger(e),d.default(a._element).trigger(t)},e?this._activate(e,e.parentNode,r):r()))},e.dispose=function(){d.default.removeData(this._element,gn),this._element=null},e._activate=function(e,t,n){function i(){return o._transitionComplete(e,r,n)}var o=this,r=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?d.default(t).children(bn):d.default(t).find(yn))[0],t=n&&r&&d.default(r).hasClass("fade");r&&t?(t=f.getTransitionDurationFromElement(r),d.default(r).removeClass("show").one(f.TRANSITION_END,i).emulateTransitionEnd(t)):i()},e._transitionComplete=function(e,t,n){t&&(d.default(t).removeClass(vn),(i=d.default(t.parentNode).find("> .dropdown-menu .active")[0])&&d.default(i).removeClass(vn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)),d.default(e).addClass(vn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),f.reflow(e),e.classList.contains("fade")&&e.classList.add("show");var i=e.parentNode;(i=i&&"LI"===i.nodeName?i.parentNode:i)&&d.default(i).hasClass("dropdown-menu")&&((t=d.default(e).closest(".dropdown")[0])&&(i=[].slice.call(t.querySelectorAll(".dropdown-toggle")),d.default(i).addClass(vn)),e.setAttribute("aria-expanded",!0)),n&&n()},i._jQueryInterface=function(n){return this.each(function(){var e=d.default(this),t=e.data(gn);if(t||(t=new i(this),e.data(gn,t)),"string"==typeof n){if(void 0===t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},a(i,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),i}(),H=(d.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(e){e.preventDefault(),wn._jQueryInterface.call(d.default(this),"show")}),d.default.fn.tab=wn._jQueryInterface,d.default.fn.tab.Constructor=wn,d.default.fn.tab.noConflict=function(){return d.default.fn.tab=_n,wn._jQueryInterface},"toast"),En="bs.toast",t="."+En,Tn=d.default.fn[H],Cn="show",Sn="showing",Dn="click.dismiss"+t,Nn={animation:!0,autohide:!0,delay:500},kn={animation:"boolean",autohide:"boolean",delay:"number"},An=function(){function o(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var e=o.prototype;return e.show=function(){var e,t=this,n=d.default.Event("show.bs.toast");d.default(this._element).trigger(n),n.isDefaultPrevented()||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),n=function(){t._element.classList.remove(Sn),t._element.classList.add(Cn),d.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout(function(){t.hide()},t._config.delay))},this._element.classList.remove("hide"),f.reflow(this._element),this._element.classList.add(Sn),this._config.animation?(e=f.getTransitionDurationFromElement(this._element),d.default(this._element).one(f.TRANSITION_END,n).emulateTransitionEnd(e)):n())},e.hide=function(){var e;this._element.classList.contains(Cn)&&(e=d.default.Event("hide.bs.toast"),d.default(this._element).trigger(e),e.isDefaultPrevented()||this._close())},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(Cn)&&this._element.classList.remove(Cn),d.default(this._element).off(Dn),d.default.removeData(this._element,En),this._element=null,this._config=null},e._getConfig=function(e){return e=s({},Nn,d.default(this._element).data(),"object"===_typeof(e)&&e?e:{}),f.typeCheckConfig(H,e,this.constructor.DefaultType),e},e._setListeners=function(){var e=this;d.default(this._element).on(Dn,'[data-dismiss="toast"]',function(){return e.hide()})},e._close=function(){function e(){n._element.classList.add("hide"),d.default(n._element).trigger("hidden.bs.toast")}var t,n=this;this._element.classList.remove(Cn),this._config.animation?(t=f.getTransitionDurationFromElement(this._element),d.default(this._element).one(f.TRANSITION_END,e).emulateTransitionEnd(t)):e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},o._jQueryInterface=function(i){return this.each(function(){var e=d.default(this),t=e.data(En),n="object"===_typeof(i)&&i;if(t||(t=new o(this,n),e.data(En,t)),"string"==typeof i){if(void 0===t[i])throw new TypeError('No method named "'+i+'"');t[i](this)}})},a(o,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"DefaultType",get:function(){return kn}},{key:"Default",get:function(){return Nn}}]),o}();d.default.fn[H]=An._jQueryInterface,d.default.fn[H].Constructor=An,d.default.fn[H].noConflict=function(){return d.default.fn[H]=Tn,An._jQueryInterface},e.Alert=n,e.Button=K,e.Carousel=o,e.Collapse=ce,e.Dropdown=C,e.Modal=Ot,e.Popover=rn,e.Scrollspy=mn,e.Tab=wn,e.Toast=An,e.Tooltip=I,e.Util=f,Object.defineProperty(e,"__esModule",{value:!0})});var cpSchoolThemeHelpers=function(i){var o={setCSSVar:function(e,t){getComputedStyle(document.documentElement).getPropertyValue(e)!=t&&document.documentElement.style.setProperty(e,t)},getNavbarHeight:function(){var e=i("#navbar-main");return e.length?e.outerHeight():0},getNavbarBrandHolderHeight:function(){var e=i("#navbar-main .navbar-brand-holder");return e.length?e.outerHeight():0},getHeaderDropboxGap:function(e){var t=o.getNavbarHeight(),n=i("#wrapper-navbar-main.navbar-style-dropbox .navbar-brand");if(t&&n.length){n=n.outerHeight()-t;if(e){if(0i(this).outerHeight()+parseInt(i(this).css("top"))?i(this).addClass("sidebar-sticky"):i(this).removeClass("sidebar-sticky")})},enableDropdownAnimation:function(){i(".dropdown").on("shown.bs.dropdown",function(e){var t=i(this);setTimeout(function(){t.addClass("shown")},10)}),i(".dropdown-menu").on("transitionend",function(e){!i(e.target).hasClass("dropdown-menu")||i(this).hasClass("show")||i(this).parent().removeClass("shown")})},enableAlertDismissal:function(e){var t;e.length&&(t=e.data("ver"),e.find('[data-dismiss="alert"]').click(function(e){Cookies.set("site_alert_bar_dismiss_ver",t,{expires:365})}))},enableHoverMenu:function(){i(".navbar-nav").on("touchend mouseenter focusin",".dropdown",function(e){var t=this,n=i(t).children('.dropdown-toggle[aria-expanded="false"]');n.length&&("touchend"==e.type&&(e.preventDefault(),i(".navbar-nav").off("mouseenter focusin",".dropdown")),setTimeout(function(){"mouseover"===e.type&&!i(t).is(":hover")||(n.dropdown("show"),n.off("click"),"mouseenter"!==e.type&&"mouseover"!==e.type||n.trigger("blur"))},"mouseenter"===e.type?150:0))}),i(".navbar-nav").on("mouseleave focusout",".dropdown",function(t){var n=this;setTimeout(function(){var e;i(n).is(":hover")||"focusout"===t.type&&n.contains(t.relatedTarget)||(e=i(n).children('.dropdown-toggle[aria-expanded="true"]')).length&&(e.dropdown("hide"),e.attr("aria-expanded",!1))},"mouseleave"===t.type?300:0)}),i(".nav:not(.navbar-nav)").on("touchend mouseenter focusin",".dropdown",function(e){var t=this,n=i(t).children('.dropdown-toggle[aria-expanded="false"]');n.length&&("touchend"==e.type&&(e.preventDefault(),i(".nav:not(.navbar-nav)").off("mouseenter focusin",".dropdown-toggle")),setTimeout(function(){"mouseover"===e.type&&!i(t).is(":hover")||(i(n.data("target")).collapse("show"),n.attr("aria-expanded","true"))},"mouseenter"===e.type?150:0))}),i(".nav:not(.navbar-nav)").on("mouseleave focusout",".dropdown",function(e){i(this).is(":hover")||"focusout"===e.type&&this.contains(e.relatedTarget)||(e=i(this).children('.dropdown-toggle[aria-expanded="true"]')).length&&(i(e.data("target")).collapse("hide"),e.attr("aria-expanded","false"))}),i(".nav:not(.navbar-nav)").on("click",'.dropdown-toggle[href="#"]',function(e){e.preventDefault()})}};return o}(jQuery);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){var t,n,i;"function"==typeof define&&define.amd&&(define(e),t=!0),"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&(module.exports=e(),t=!0),t||(n=window.Cookies,(i=window.Cookies=e()).noConflict=function(){return window.Cookies=n,i})}(function(){function s(){for(var e=0,t={};e .alignfull, .entry-content > .alignwide, .entry-content > .aligncenter").attr("data-aos","fade-up"),t(".entry-content > .alignleft").attr("data-aos","fade-right"),t(".entry-content > .alignright").attr("data-aos","fade-left"),AOS.init({offset:150,delay:50,duration:800,once:!0,disable:function(){return window.document.documentMode<=11}})),t("a.collapse-toggle").on("touchend",function(e){"true"===t(this).attr("aria-expanded")&&(e.preventDefault(),(e=t(this).attr("href")).startsWith("#")||(window.location=e))}),"function"==typeof cssVars&&cssVars({preserveStatic:!1})}(jQuery); \ No newline at end of file diff --git a/src/js/custom-javascript.js b/src/js/custom-javascript.js index df7449c..36c0831 100644 --- a/src/js/custom-javascript.js +++ b/src/js/custom-javascript.js @@ -95,10 +95,21 @@ }); } + $('nav.menu-mobile a.collapse-toggle').on('touchend', function(e) { + var isExpanded = $(this).attr('aria-expanded'); + if(isExpanded === 'true') { + e.preventDefault(); + var link = $(this).attr('href'); + if (!link.startsWith('#')) { + window.location = link; + } + } + }) + // This will make vars in css work in IE11. if (typeof cssVars === "function") { cssVars({ preserveStatic: false }); } -})(jQuery); \ No newline at end of file +})(jQuery);