-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.min.js
4 lines (4 loc) · 13.9 KB
/
app.min.js
1
2
3
4
/*!
* jekyll-theme-chirpy v7.2.3 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
*/
!function(){"use strict";const e=new Map;var t={set(t,n,r){e.has(t)||e.set(t,new Map);const o=e.get(t);o.has(n)||0===o.size?o.set(n,r):console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: ".concat(Array.from(o.keys())[0],"."))},get:(t,n)=>e.has(t)&&e.get(t).get(n)||null,remove(t,n){if(!e.has(t))return;const r=e.get(t);r.delete(n),0===r.size&&e.delete(t)}};const n="transitionend",r=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>"#".concat(CSS.escape(t))))),e),o=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),i=e=>o(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(r(e)):null,s=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),c=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,a=[],l=function(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;return"function"==typeof e?e(...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]):t},u=function(e,t){if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return void l(e);const r=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const r=Number.parseFloat(t),o=Number.parseFloat(n);return r||o?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let o=!1;const i=r=>{let{target:s}=r;s===t&&(o=!0,t.removeEventListener(n,i),l(e))};t.addEventListener(n,i),setTimeout((()=>{o||t.dispatchEvent(new Event(n))}),r)},f=/[^.]*(?=\..*)\.|.*/,d=/\..*/,h=/::\d+$/,g={};let m=1;const p={mouseenter:"mouseover",mouseleave:"mouseout"},b=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function v(e,t){return t&&"".concat(t,"::").concat(m++)||e.uidEvent||m++}function y(e){const t=v(e);return e.uidEvent=t,g[t]=g[t]||{},g[t]}function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function E(e,t,n){const r="string"==typeof t,o=r?n:t||n;let i=j(e);return b.has(i)||(i=e),[r,o,i]}function w(e,t,n,r,o){if("string"!=typeof t||!e)return;let[i,s,c]=E(t,n,r);if(t in p){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const a=y(e),l=a[c]||(a[c]={}),u=_(l,s,i?n:null);if(u)return void(u.oneOff=u.oneOff&&o);const d=v(s,t.replace(f,"")),h=i?function(e,t,n){return function r(o){const i=e.querySelectorAll(t);for(let{target:s}=o;s&&s!==this;s=s.parentNode)for(const c of i)if(c===s)return C(o,{delegateTarget:s}),r.oneOff&&A.off(e,o.type,t,n),n.apply(s,[o])}}(e,n,s):function(e,t){return function n(r){return C(r,{delegateTarget:e}),n.oneOff&&A.off(e,r.type,t),t.apply(e,[r])}}(e,s);h.delegationSelector=i?n:null,h.callable=s,h.oneOff=o,h.uidEvent=d,l[d]=h,e.addEventListener(c,h,i)}function O(e,t,n,r,o){const i=_(t[n],r,o);i&&(e.removeEventListener(n,i,Boolean(o)),delete t[n][i.uidEvent])}function S(e,t,n,r){const o=t[n]||{};for(const[i,s]of Object.entries(o))i.includes(r)&&O(e,t,n,s.callable,s.delegationSelector)}function j(e){return e=e.replace(d,""),p[e]||e}const A={on(e,t,n,r){w(e,t,n,r,!1)},one(e,t,n,r){w(e,t,n,r,!0)},off(e,t,n,r){if("string"!=typeof t||!e)return;const[o,i,s]=E(t,n,r),c=s!==t,a=y(e),l=a[s]||{},u=t.startsWith(".");if(void 0===i){if(u)for(const n of Object.keys(a))S(e,a,n,t.slice(1));for(const[n,r]of Object.entries(l)){const o=n.replace(h,"");c&&!t.includes(o)||O(e,a,s,r.callable,r.delegationSelector)}}else{if(!Object.keys(l).length)return;O(e,a,s,i,o?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const r=c();let o=null,i=!0,s=!0,a=!1;t!==j(t)&&r&&(o=r.Event(t,n),r(e).trigger(o),i=!o.isPropagationStopped(),s=!o.isImmediatePropagationStopped(),a=o.isDefaultPrevented());const l=C(new Event(t,{bubbles:i,cancelable:!0}),n);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&o&&o.preventDefault(),l}};function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(const[n,r]of Object.entries(t))try{e[n]=r}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>r})}return e}function T(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function L(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function I(e){return e.replace(/[A-Z]/g,(e=>"-".concat(e.toLowerCase())))}const k={setDataAttribute(e,t,n){e.setAttribute("data-bs-".concat(I(t)),n)},removeDataAttribute(e,t){e.removeAttribute("data-bs-".concat(I(t)))},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const r of n){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=L(e.dataset[r])}return t},getDataAttribute:(e,t)=>L(e.getAttribute("data-bs-".concat(I(t))))};class P{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=o(t)?k.getDataAttribute(t,"config"):{};return D(D(D(D({},this.constructor.Default),"object"==typeof n?n:{}),o(t)?k.getDataAttributes(t):{}),"object"==typeof e?e:{})}_typeCheckConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.constructor.DefaultType;for(const[r,i]of Object.entries(t)){const t=e[r],s=o(t)?"element":null==(n=t)?"".concat(n):Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(s))throw new TypeError("".concat(this.constructor.NAME.toUpperCase(),': Option "').concat(r,'" provided type "').concat(s,'" but expected type "').concat(i,'".'))}var n}}class M extends P{constructor(e,n){super(),(e=i(e))&&(this._element=e,this._config=this._getConfig(n),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),A.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t){u(e,t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return t.get(i(e),this.DATA_KEY)}static getOrCreateInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return"bs.".concat(this.NAME)}static get EVENT_KEY(){return".".concat(this.DATA_KEY)}static eventName(e){return"".concat(e).concat(this.EVENT_KEY)}}const K=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n="#".concat(n.split("#")[1])),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map((e=>r(e))).join(","):null},q={find(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(t,e)},children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let r=e.parentNode.closest(t);for(;r;)n.push(r),r=r.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>"".concat(e,':not([tabindex^="-"])'))).join(",");return this.find(t,e).filter((e=>!s(e)&&(e=>{if(!o(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t})(e)))},getSelectorFromElement(e){const t=K(e);return t&&q.findOne(t)?t:null},getElementFromSelector(e){const t=K(e);return t?q.findOne(t):null},getMultipleElementsFromSelector(e){const t=K(e);return t?q.find(t):[]}},x=".".concat("bs.toast"),W="mouseover".concat(x),Y="mouseout".concat(x),F="focusin".concat(x),R="focusout".concat(x),V="hide".concat(x),Q="hidden".concat(x),z="show".concat(x),B="shown".concat(x),H="hide",U="show",G="showing",J={animation:"boolean",autohide:"boolean",delay:"number"},Z={animation:!0,autohide:!0,delay:5e3};class $ extends M{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Z}static get DefaultType(){return J}static get NAME(){return"toast"}show(){if(A.trigger(this._element,z).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(H),this._element.offsetHeight,this._element.classList.add(U,G),this._queueCallback((()=>{this._element.classList.remove(G),A.trigger(this._element,B),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(A.trigger(this._element,V).defaultPrevented)return;this._element.classList.add(G),this._queueCallback((()=>{this._element.classList.add(H),this._element.classList.remove(G,U),A.trigger(this._element,Q)}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(U),super.dispose()}isShown(){return this._element.classList.contains(U)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){A.on(this._element,W,(e=>this._onInteraction(e,!0))),A.on(this._element,Y,(e=>this._onInteraction(e,!1))),A.on(this._element,F,(e=>this._onInteraction(e,!0))),A.on(this._element,R,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=$.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError('No method named "'.concat(e,'"'));t[e](this)}}))}}var X,ee;if(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hide";const n="click.dismiss".concat(e.EVENT_KEY),r=e.NAME;A.on(document,n,'[data-bs-dismiss="'.concat(r,'"]'),(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),s(this))return;const o=q.getElementFromSelector(this)||this.closest(".".concat(r));e.getOrCreateInstance(o)[t]()}))}($),X=$,ee=()=>{const e=c();if(e){const t=X.NAME,n=e.fn[t];e.fn[t]=X.jQueryInterface,e.fn[t].Constructor=X,e.fn[t].noConflict=()=>(e.fn[t]=n,X.jQueryInterface)}},"loading"===document.readyState?(a.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of a)e()})),a.push(ee)):ee(),"serviceWorker"in navigator){const e=new URL(document.currentScript.src),t=e.searchParams.get("register"),n=e.searchParams.get("baseurl");if(t){const e="".concat(n,"/sw.min.js"),t=document.getElementById("notification"),r=t.querySelector(".toast-body>button"),o=$.getOrCreateInstance(t);navigator.serviceWorker.register(e).then((e=>{e.waiting&&o.show(),e.addEventListener("updatefound",(()=>{e.installing.addEventListener("statechange",(()=>{e.waiting&&navigator.serviceWorker.controller&&o.show()}))})),r.addEventListener("click",(()=>{e.waiting&&e.waiting.postMessage("SKIP_WAITING"),o.hide()}))}));let i=!1;navigator.serviceWorker.addEventListener("controllerchange",(()=>{i||(window.location.reload(),i=!0)}))}else navigator.serviceWorker.getRegistrations().then((function(e){for(let t of e)t.unregister()}))}}();