PageSourceSearch

https://noahkagan.com/wp-content/themes/okdork-theme-2023/assets/js/main.js?ver=1.1.16

js noahkagan.com collected 2026-09-26 02:09:23 UTC 19,263 bytes, 1 lines download raw bytes

vendor: 19,263 bytes, line 1
1(()=>{"use strict";const e=new Map,t={set(t,n,i){e.has(t)||e.set(t,new Map);const s=e.get(t);s.has(n)||0===s.size?s.set(n,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,n)=>e.has(t)&&e.get(t).get(n)||null,remove(t,n){if(!e.has(t))return;const i=e.get(t);i.delete(n),0===i.size&&e.delete(t)}},n="transitionend",i=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),s=e=>{e.dispatchEvent(new Event(n))},r=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),o=e=>r(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(i(e)):null,l=e=>{if(!r(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},a=e=>{e.offsetHeight},c=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,u=[],h=()=>"rtl"===document.documentElement.dir,d=e=>{var t;t=()=>{const t=c();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}},"loading"===document.readyState?(u.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of u)e()})),u.push(t)):t()},f=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,g=/[^.]*(?=\..*)\.|.*/,_=/\..*/,m=/::\d+$/,p={};let b=1;const v={mouseenter:"mouseover",mouseleave:"mouseout"},y=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 E(e,t){return t&&`${t}::${b++}`||e.uidEvent||b++}function C(e){const t=E(e);return e.uidEvent=t,p[t]=p[t]||{},p[t]}function A(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function w(e,t,n){const i="string"==typeof t,s=i?n:t||n;let r=O(e);return y.has(r)||(r=e),[i,s,r]}function T(e,t,n,i,s){if("string"!=typeof t||!e)return;let[r,o,l]=w(t,n,i);if(t in v){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};o=e(o)}const a=C(e),c=a[l]||(a[l]={}),u=A(c,o,r?n:null);if(u)return void(u.oneOff=u.oneOff&&s);const h=E(o,t.replace(g,"")),d=r?function(e,t,n){return function i(s){const r=e.querySelectorAll(t);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(const l of r)if(l===o)return L(s,{delegateTarget:o}),i.oneOff&&I.off(e,s.type,t,n),n.apply(o,[s])}}(e,n,o):function(e,t){return function n(i){return L(i,{delegateTarget:e}),n.oneOff&&I.off(e,i.type,t),t.apply(e,[i])}}(e,o);d.delegationSelector=r?n:null,d.callable=o,d.oneOff=s,d.uidEvent=h,c[h]=d,e.addEventListener(l,d,r)}function S(e,t,n,i,s){const r=A(t[n],i,s);r&&(e.removeEventListener(n,r,Boolean(s)),delete t[n][r.uidEvent])}function $(e,t,n,i){const s=t[n]||{};for(const[r,o]of Object.entries(s))r.includes(i)&&S(e,t,n,o.callable,o.delegationSelector)}function O(e){return e=e.replace(_,""),v[e]||e}const I={on(e,t,n,i){T(e,t,n,i,!1)},one(e,t,n,i){T(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[s,r,o]=w(t,n,i),l=o!==t,a=C(e),c=a[o]||{},u=t.startsWith(".");if(void 0===r){if(u)for(const n of Object.keys(a))$(e,a,n,t.slice(1));for(const[n,i]of Object.entries(c)){const s=n.replace(m,"");l&&!t.includes(s)||S(e,a,o,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;S(e,a,o,r,s?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=c();let s=null,r=!0,o=!0,l=!1;t!==O(t)&&i&&(s=i.Event(t,n),i(e).trigger(s),r=!s.isPropagationStopped(),o=!s.isImmediatePropagationStopped(),l=s.isDefaultPrevented());const a=L(new Event(t,{bubbles:r,cancelable:!0}),n);return l&&a.preventDefault(),o&&e.dispatchEvent(a),a.defaultPrevented&&s&&s.preventDefault(),a}};function L(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch{Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}const D=I;function k(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{return e}}function N(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const x={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${N(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${N(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=k(e.dataset[i])}return t},getDataAttribute:(e,t)=>k(e.getAttribute(`data-bs-${N(t)}`))},j=class{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=r(t)?x.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...r(t)?x.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[i,s]of Object.entries(t)){const t=e[i],o=r(t)?"element":null==(n=t)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${s}".`)}var n}},M=class extends j{constructor(e,n){super(),(e=o(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),D.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,i=!0){((e,t,i=!0)=>{if(!i)return void f(e);const r=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),s=Number.parseFloat(n);return i||s?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let o=!1;const l=({target:i})=>{i===t&&(o=!0,t.removeEventListener(n,l),f(e))};t.addEventListener(n,l),setTimeout((()=>{o||s(t)}),r)})(e,t,i)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return t.get(o(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.0"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}},P=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=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return i(t)},F={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.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=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!(e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")))(e)&&l(e)))},getSelectorFromElement(e){const t=P(e);return t&&F.findOne(t)?t:null},getElementFromSelector(e){const t=P(e);return t?F.findOne(t):null},getMultipleElementsFromSelector(e){const t=P(e);return t?F.find(t):[]}},X=F,q=".bs.swipe",Y=`touchstart${q}`,B=`touchmove${q}`,K=`touchend${q}`,W=`pointerdown${q}`,z=`pointerup${q}`,V={endCallback:null,leftCallback:null,rightCallback:null},Q={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class R extends j{constructor(e,t){super(),this._element=e,e&&R.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return V}static get DefaultType(){return Q}static get NAME(){return"swipe"}dispose(){D.off(this._element,q)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),f(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&f(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(D.on(this._element,W,(e=>this._start(e))),D.on(this._element,z,(e=>this._end(e))),this._element.classList.add("pointer-event")):(D.on(this._element,Y,(e=>this._start(e))),D.on(this._element,B,(e=>this._move(e))),D.on(this._element,K,(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const H=R,U=".bs.carousel",J=".data-api",Z="next",G="prev",ee="left",te="right",ne=`slide${U}`,ie=`slid${U}`,se=`keydown${U}`,re=`mouseenter${U}`,oe=`mouseleave${U}`,le=`dragstart${U}`,ae=`load${U}${J}`,ce=`click${U}${J}`,ue="carousel",he="active",de=".active",fe=".carousel-item",ge=de+fe,_e={ArrowLeft:te,ArrowRight:ee},me={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},pe={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class be extends M{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=X.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ue&&this.cycle()}static get Default(){return me}static get DefaultType(){return pe}static get NAME(){return"carousel"}next(){this._slide(Z)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(G)}pause(){this._isSliding&&s(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?D.one(this._element,ie,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void D.one(this._element,ie,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?Z:G;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&D.on(this._element,se,(e=>this._keydown(e))),"hover"===this._config.pause&&(D.on(this._element,re,(()=>this.pause())),D.on(this._element,oe,(()=>this._maybeEnableCycle()))),this._config.touch&&H.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of X.find(".carousel-item img",this._element))D.on(e,le,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(ee)),rightCallback:()=>this._slide(this._directionToOrder(te)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new H(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=_e[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=X.findOne(de,this._indicatorsElement);t.classList.remove(he),t.removeAttribute("aria-current");const n=X.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(he),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),i=e===Z,s=t||((e,t,n,i)=>{const s=e.length;let r=e.indexOf(t);return-1===r?!n&&i?e[s-1]:e[0]:(r+=n?1:-1,i&&(r=(r+s)%s),e[Math.max(0,Math.min(r,s-1))])})(this._getItems(),n,i,this._config.wrap);if(s===n)return;const r=this._getItemIndex(s),o=t=>D.trigger(this._element,t,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:r});if(o(ne).defaultPrevented)return;if(!n||!s)return;const l=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(r),this._activeElement=s;const c=i?"carousel-item-start":"carousel-item-end",u=i?"carousel-item-next":"carousel-item-prev";s.classList.add(u),a(s),n.classList.add(c),s.classList.add(c),this._queueCallback((()=>{s.classList.remove(c,u),s.classList.add(he),n.classList.remove(he,u,c),this._isSliding=!1,o(ie)}),n,this._isAnimated()),l&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return X.findOne(ge,this._element)}_getItems(){return X.find(fe,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return h()?e===ee?G:Z:e===ee?Z:G}_orderToDirection(e){return h()?e===G?ee:te:e===G?te:ee}static jQueryInterface(e){return this.each((function(){const t=be.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}D.on(document,ce,"[data-bs-slide], [data-bs-slide-to]",(function(e){const t=X.getElementFromSelector(this);if(!t||!t.classList.contains(ue))return;e.preventDefault();const n=be.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===x.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),D.on(window,ae,(()=>{const e=X.find('[data-bs-ride="carousel"]');for(const t of e)be.getOrCreateInstance(t)})),d(be);const ve=be,ye=".bs.collapse",Ee=`show${ye}`,Ce=`shown${ye}`,Ae=`hide${ye}`,we=`hidden${ye}`,Te=`click${ye}.data-api`,Se="show",$e="collapse",Oe="collapsing",Ie=`:scope .${$e} .${$e}`,Le='[data-bs-toggle="collapse"]',De={parent:null,toggle:!0},ke={parent:"(null|element)",toggle:"boolean"};class Ne extends M{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=X.find(Le);for(const e of n){const t=X.getSelectorFromElement(e),n=X.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return De}static get DefaultType(){return ke}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>Ne.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(D.trigger(this._element,Ee).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove($e),this._element.classList.add(Oe),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Oe),this._element.classList.add($e,Se),this._element.style[t]="",D.trigger(this._element,Ce)}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(D.trigger(this._element,Ae).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,a(this._element),this._element.classList.add(Oe),this._element.classList.remove($e,Se);for(const e of this._triggerArray){const t=X.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Oe),this._element.classList.add($e),D.trigger(this._element,we)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(Se)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=o(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Le);for(const t of e){const e=X.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=X.find(Ie,this._config.parent);return X.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=Ne.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}D.on(document,Te,Le,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of X.getMultipleElementsFromSelector(this))Ne.getOrCreateInstance(e,{toggle:!1}).toggle()})),d(Ne);const xe=document.getElementById("book-review-carousel");xe&&new ve(xe,{interval:4e3,ride:"carousel"})})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.