assets/js/dist/commons.min.js in jekyll-theme-chirpy-6.3.1 vs assets/js/dist/commons.min.js in jekyll-theme-chirpy-6.4.0

- old
+ new

@@ -1,4 +1,4 @@ /*! - * Chirpy v6.3.1 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/ + * Chirpy v6.4.0 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/ */ -!function(){"use strict";const e=$(".mode-toggle");function s(e,s,o){return(s=function(e){var s=function(e,s){if("object"!=typeof e||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var t=o.call(e,s||"default");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===s?String:Number)(e)}(e,"string");return"symbol"==typeof s?s:String(s)}(s))in e?Object.defineProperty(e,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[s]=o,e}const o=$("body"),t="sidebar-display";class r{static toggle(){!1===r.isExpanded?o.attr(t,""):o.removeAttr(t),r.isExpanded=!r.isExpanded}}s(r,"isExpanded",!1);const a=$("#sidebar-trigger"),l=$("#search-trigger"),i=$("#search-cancel"),n=$("#main-wrapper>.container>.row"),c=$("#topbar-title"),d=$("search"),f=$("#search-result-wrapper"),u=$("#search-results"),p=$("#search-input"),g=$("#search-hints"),m=$("html,body"),b="loaded",v="unloaded",C="input-focus",h="d-flex";class y{static on(){y.offset=window.scrollY,m.scrollTop(0)}static off(){m.scrollTop(y.offset)}}s(y,"offset",0),s(y,"resultVisible",!1);class w{static on(){a.addClass(v),c.addClass(v),l.addClass(v),d.addClass(h),i.addClass(b)}static off(){i.removeClass(b),d.removeClass(h),a.removeClass(v),c.removeClass(v),l.removeClass(v)}}class k{static on(){y.resultVisible||(y.on(),f.removeClass(v),n.addClass(v),y.resultVisible=!0)}static off(){y.resultVisible&&(u.empty(),g.hasClass(v)&&g.removeClass(v),f.addClass(v),n.removeClass(v),y.off(),p.val(""),y.resultVisible=!1)}}function T(){return i.hasClass(b)}!function(){const e=$(window),s=$("#back-to-top");e.on("scroll",(()=>{e.scrollTop()>50?s.fadeIn():s.fadeOut()})),s.on("click",(()=>{e.scrollTop(0)}))}(),[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map((e=>new bootstrap.Tooltip(e))),0!==e.length&&e.off().on("click",(e=>{const s=$(e.target);let o=s.prop("tagName")==="button".toUpperCase()?s:s.parent();modeToggle.flipMode(),o.trigger("blur")})),$("#sidebar-trigger").on("click",r.toggle),$("#mask").on("click",r.toggle),l.on("click",(function(){w.on(),k.on(),p.trigger("focus")})),i.on("click",(function(){w.off(),k.off()})),p.on("focus",(function(){d.addClass(C)})),p.on("focusout",(function(){d.removeClass(C)})),p.on("input",(()=>{""===p.val()?T()?g.removeClass(v):k.off():(k.on(),T()&&g.addClass(v))}))}(); +!function(){"use strict";const e=$(".mode-toggle");function s(e){var s=function(e,s){if("object"!=typeof e||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var t=o.call(e,s||"default");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===s?String:Number)(e)}(e,"string");return"symbol"==typeof s?s:String(s)}function o(e,o,t){return(o=s(o))in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}const t=$("body"),r="sidebar-display";class a{static toggle(){!1===a.isExpanded?t.attr(r,""):t.removeAttr(r),a.isExpanded=!a.isExpanded}}o(a,"isExpanded",!1);const l=$("#sidebar-trigger"),i=$("#search-trigger"),n=$("#search-cancel"),c=$("#main-wrapper>.container>.row"),d=$("#topbar-title"),f=$("search"),u=$("#search-result-wrapper"),p=$("#search-results"),g=$("#search-input"),m=$("#search-hints"),b=$("html,body"),v="loaded",C="unloaded",h="input-focus",y="d-flex";class w{static on(){w.offset=window.scrollY,b.scrollTop(0)}static off(){b.scrollTop(w.offset)}}o(w,"offset",0),o(w,"resultVisible",!1);class k{static on(){l.addClass(C),d.addClass(C),i.addClass(C),f.addClass(y),n.addClass(v)}static off(){n.removeClass(v),f.removeClass(y),l.removeClass(C),d.removeClass(C),i.removeClass(C)}}class T{static on(){w.resultVisible||(w.on(),u.removeClass(C),c.addClass(C),w.resultVisible=!0)}static off(){w.resultVisible&&(p.empty(),m.hasClass(C)&&m.removeClass(C),u.addClass(C),c.removeClass(C),w.off(),g.val(""),w.resultVisible=!1)}}function x(){return n.hasClass(v)}!function(){const e=$(window),s=$("#back-to-top");e.on("scroll",(()=>{e.scrollTop()>50?s.fadeIn():s.fadeOut()})),s.on("click",(()=>{e.scrollTop(0)}))}(),[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map((e=>new bootstrap.Tooltip(e))),0!==e.length&&e.off().on("click",(e=>{const s=$(e.target);let o=s.prop("tagName")==="button".toUpperCase()?s:s.parent();modeToggle.flipMode(),o.trigger("blur")})),$("#sidebar-trigger").on("click",a.toggle),$("#mask").on("click",a.toggle),i.on("click",(function(){k.on(),T.on(),g.trigger("focus")})),n.on("click",(function(){k.off(),T.off()})),g.on("focus",(function(){f.addClass(h)})),g.on("focusout",(function(){f.removeClass(h)})),g.on("input",(()=>{""===g.val()?x()?m.removeClass(C):T.off():(T.on(),x()&&m.addClass(C))}))}();