assets/js/dist/home.min.js in jekyll-theme-chirpy-6.3.1 vs assets/js/dist/home.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 t=$(".mode-toggle");function e(t,e,a){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var s=a.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const a=$("body"),s="sidebar-display";class o{static toggle(){!1===o.isExpanded?a.attr(s,""):a.removeAttr(s),o.isExpanded=!o.isExpanded}}e(o,"isExpanded",!1);const r=$("#sidebar-trigger"),i=$("#search-trigger"),l=$("#search-cancel"),n=$("#main-wrapper>.container>.row"),c=$("#topbar-title"),d=$("search"),u=$("#search-result-wrapper"),m=$("#search-results"),f=$("#search-input"),p=$("#search-hints"),g=$("html,body"),h="loaded",b="unloaded",v="input-focus",C="d-flex";class y{static on(){y.offset=window.scrollY,g.scrollTop(0)}static off(){g.scrollTop(y.offset)}}e(y,"offset",0),e(y,"resultVisible",!1);class w{static on(){r.addClass(b),c.addClass(b),i.addClass(b),d.addClass(C),l.addClass(h)}static off(){l.removeClass(h),d.removeClass(C),r.removeClass(b),c.removeClass(b),i.removeClass(b)}}class T{static on(){y.resultVisible||(y.on(),u.removeClass(b),n.addClass(b),y.resultVisible=!0)}static off(){y.resultVisible&&(m.empty(),p.hasClass(b)&&p.removeClass(b),u.addClass(b),n.removeClass(b),y.off(),f.val(""),y.resultVisible=!1)}}function k(){return l.hasClass(h)}$(".collapse");$(".code-header>button").children().attr("class");const x="data-src",E="data-lqip",j={SHIMMER:"shimmer",BLUR:"blur"};function M(t){$(this).parent().removeClass(t)}function S(){this.complete&&(this.hasAttribute(E)?M.call(this,j.BLUR):M.call(this,j.SHIMMER))}function A(){const t=$(this),e=t.attr(x);t.attr("src",encodeURI(e)),t.removeAttr(x)}class F{static get attrTimestamp(){return"data-ts"}static get attrDateFormat(){return"data-df"}static get locale(){return $("html").attr("lang").substring(0,2)}static getTimestamp(t){return Number(t.attr(F.attrTimestamp))}static getDateFormat(t){return t.attr(F.attrDateFormat)}}!function(){const t=$(window),e=$("#back-to-top");t.on("scroll",(()=>{t.scrollTop()>50?e.fadeIn():e.fadeOut()})),e.on("click",(()=>{t.scrollTop(0)}))}(),[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map((t=>new bootstrap.Tooltip(t))),0!==t.length&&t.off().on("click",(t=>{const e=$(t.target);let a=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),a.trigger("blur")})),$("#sidebar-trigger").on("click",o.toggle),$("#mask").on("click",o.toggle),i.on("click",(function(){w.on(),T.on(),f.trigger("focus")})),l.on("click",(function(){w.off(),T.off()})),f.on("focus",(function(){d.addClass(v)})),f.on("focusout",(function(){d.removeClass(v)})),f.on("input",(()=>{""===f.val()?k()?p.removeClass(b):T.off():(T.on(),k()&&p.addClass(b))})),dayjs.locale(F.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(F.attrTimestamp,"]")).each((function(){const t=dayjs.unix(F.getTimestamp($(this))),e=t.format(F.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(F.attrTimestamp),$(this).removeAttr(F.attrDateFormat);const a=$(this).attr("data-bs-toggle");if(void 0===a||"tooltip"!==a)return;const s=t.format("llll");$(this).attr("data-bs-title",s),new bootstrap.Tooltip($(this))})),function(){const t=$("article img");t.length&&t.on("load",S),$('article img[loading="lazy"]').each((function(){this.complete&&M.call(this,j.SHIMMER)}));const e=$("article img[".concat(E,'="true"]'));e.length&&e.each(A)}()}(); +!function(){"use strict";const t=$(".mode-toggle");function e(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var s=a.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function a(t,a,s){return(a=e(a))in t?Object.defineProperty(t,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[a]=s,t}const s=$("body"),o="sidebar-display";class r{static toggle(){!1===r.isExpanded?s.attr(o,""):s.removeAttr(o),r.isExpanded=!r.isExpanded}}a(r,"isExpanded",!1);const i=$("#sidebar-trigger"),l=$("#search-trigger"),n=$("#search-cancel"),c=$("#main-wrapper>.container>.row"),d=$("#topbar-title"),u=$("search"),m=$("#search-result-wrapper"),f=$("#search-results"),p=$("#search-input"),g=$("#search-hints"),h=$("html,body"),b="loaded",v="unloaded",C="input-focus",y="d-flex";class w{static on(){w.offset=window.scrollY,h.scrollTop(0)}static off(){h.scrollTop(w.offset)}}a(w,"offset",0),a(w,"resultVisible",!1);class T{static on(){i.addClass(v),d.addClass(v),l.addClass(v),u.addClass(y),n.addClass(b)}static off(){n.removeClass(b),u.removeClass(y),i.removeClass(v),d.removeClass(v),l.removeClass(v)}}class k{static on(){w.resultVisible||(w.on(),m.removeClass(v),c.addClass(v),w.resultVisible=!0)}static off(){w.resultVisible&&(f.empty(),g.hasClass(v)&&g.removeClass(v),m.addClass(v),c.removeClass(v),w.off(),p.val(""),w.resultVisible=!1)}}function x(){return n.hasClass(b)}$(".collapse");$(".code-header>button").children().attr("class");const E="data-src",j="data-lqip",M={SHIMMER:"shimmer",BLUR:"blur"};function S(t){$(this).parent().removeClass(t)}function A(){this.complete&&(this.hasAttribute(j)?S.call(this,M.BLUR):S.call(this,M.SHIMMER))}function F(){const t=$(this),e=t.attr(E);t.attr("src",encodeURI(e)),t.removeAttr(E)}class R{static get attrTimestamp(){return"data-ts"}static get attrDateFormat(){return"data-df"}static get locale(){return $("html").attr("lang").substring(0,2)}static getTimestamp(t){return Number(t.attr(R.attrTimestamp))}static getDateFormat(t){return t.attr(R.attrDateFormat)}}!function(){const t=$(window),e=$("#back-to-top");t.on("scroll",(()=>{t.scrollTop()>50?e.fadeIn():e.fadeOut()})),e.on("click",(()=>{t.scrollTop(0)}))}(),[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map((t=>new bootstrap.Tooltip(t))),0!==t.length&&t.off().on("click",(t=>{const e=$(t.target);let a=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),a.trigger("blur")})),$("#sidebar-trigger").on("click",r.toggle),$("#mask").on("click",r.toggle),l.on("click",(function(){T.on(),k.on(),p.trigger("focus")})),n.on("click",(function(){T.off(),k.off()})),p.on("focus",(function(){u.addClass(C)})),p.on("focusout",(function(){u.removeClass(C)})),p.on("input",(()=>{""===p.val()?x()?g.removeClass(v):k.off():(k.on(),x()&&g.addClass(v))})),dayjs.locale(R.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(R.attrTimestamp,"]")).each((function(){const t=dayjs.unix(R.getTimestamp($(this))),e=t.format(R.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(R.attrTimestamp),$(this).removeAttr(R.attrDateFormat);const a=$(this).attr("data-bs-toggle");if(void 0===a||"tooltip"!==a)return;const s=t.format("llll");$(this).attr("data-bs-title",s),new bootstrap.Tooltip($(this))})),function(){const t=$("article img");t.length&&t.on("load",A),$('article img[loading="lazy"]').each((function(){this.complete&&S.call(this,M.SHIMMER)}));const e=$("article img[".concat(j,'="true"]'));e.length&&e.each(F)}()}();