PageSourceSearch

https://optionb.org/ui/_dist/search.js.12f1c9303fee71eb0bad.js

js optionb.org collected 2026-10-02 02:47:50 UTC 11,509 bytes, 1 lines download raw bytes

1(()=>{"use strict";function $(t,i){var n={};return Object.keys(i.dataset).forEach(function(e){if(e.match(new RegExp("^"+t))&&e!==t){var o=e.replace(t,""),r=!1;o.match(/^Global/)&&(o=o.replace("Global",""),r=!0),o=""+o[0].toLowerCase()+o.slice(1),r?n[o]=window[i.dataset[e]]:n[o]=i.dataset[e],(typeof n[o]=="undefined"||n[o]==="")&&(n[o]=!0)}}),n}const C=$;var y=function(){var t=[].slice.call(arguments);return t.unshift(!1),_.apply(null,t)};function _(){var t=[].slice.call(arguments),i=t[0],n={};return t.slice(1,t.length).forEach(function(e){Object.keys(e).forEach(function(o){if(!i||t[1][o]!==void 0){var r=e[o];n[o]=Array.isArray(r)||typeof r!="object"||typeof n[o]!="object"?r:(i?y.defaults:y)(n[o],r)}})}),n}y.defaults=function(){var t=[].slice.call(arguments);return t.unshift(!0),_.apply(null,t)};const z=y;function L(t){return t!=null&&t===t.window}function s(t,i){if(i===void 0&&(i=null),t instanceof HTMLElement||t instanceof Node||L(t))return[t];if(t instanceof NodeList)return[].slice.call(t);if(typeof t=="string"){var n=i?s(i)[0]:document;return[].slice.call(n.querySelectorAll(t))}return[]}function c(t,i){if(Array.isArray(t))return t.forEach(function(o){return c(o,i)});var n=s(t);if(n.length){var e=[].concat(i);return n.forEach(function(o){e.forEach(function(r){o.classList.add(r)})}),n}}function a(t,i,n,e){if(Array.isArray(t)){t.forEach(function(u){return a(u,i,n,e)});return}var o={};typeof e=="boolean"?o.capture=e:typeof e=="object"&&(o=Object.assign({},e));var r={cb:n,options:o};window._domassistevents||(window._domassistevents={}),window._domassistevents["_"+i]=r;var f=s(t);f.length&&f.forEach(function(u){u.addEventListener(i,n,o)})}function D(t,i){var n=Element.prototype,e=!1,o=["matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"];if(o.forEach(function(r){n.hasOwnProperty(r)&&(e=n[r])}),e)return t?e.call(t,i):null}function N(t,i){do{if(D(t,i))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function B(t,i,n,e,o){o===void 0&&(o=!1),a(t,i,function(r){if(r.target&&N(r.target,n))return e(r)},o)}function m(t,i){var n=s(t,i);return n.length?n[0]:null}function J(){try{var t=new CustomEvent("t",{detail:{a:"b"}});return t.type==="t"&&t.detail.a==="b"}catch(i){return!1}}var Q=function(i,n){var e=document.createEvent("CustomEvent");return n?e.initCustomEvent(i,n.bubbles,n.cancelable,n.detail):e.initCustomEvent(i,!1,!1,void 0),e},p=!1;function S(t,i,n){if(n===void 0&&(n={}),Array.isArray(t))return t.forEach(function(o){return S(o,i,n)});p||(p=J()?CustomEvent:Q);var e=s(t);if(e.length)return n.bubbles!==!1&&(n.bubbles=!0),e.forEach(function(o){var r=new p(i,n);o.dispatchEvent(r)}),e}function W(t,i){var n=m(t);return n?n.classList.contains(i):!1}function T(t){Array.isArray(t)&&t.forEach(function(n){return T(n)});var i=s(t);i.length&&i.forEach(function(n){var e=window.getComputedStyle(n).getPropertyValue("display");e!=="none"&&(n.dataset._currentDisplay=e,n.style.display="none")})}function G(t,i,n){a(t,"mouseenter",i),a(t,"mouseleave",n)}function w(t,i){Array.isArray(t)&&t.forEach(function(o){return w(o,i)}),window._domassistevents||(window._domassistevents={});var n=window._domassistevents["_"+i];if(n){var e=s(t);e.length&&e.forEach(function(o){o.removeEventListener(i,n.cb,n.options)})}}function V(t,i,n,e){e===void 0&&(e=!1),a(t,i,function(o){w(t,i),n(o)},e)}var h=null;function F(){if(h)return h;var t=document.createElement("div");if(t.style.transform===null){for(var i=["Webkit","webkit","Moz","ms"],n=null,e=0,o=i.length;e<o&&!n;e++){var r=i[e]+"Transform";typeof t.style[r]!="undefined"&&(n=r)}h=n}else h="transform";return h}function d(t,i){if(Array.isArray(t))return t.forEach(function(o){return d(o,i)});var n=s(t);if(n.length){var e=[].concat(i);return n.forEach(function(o){e.forEach(function(r){o.classList.remove(r)})}),n}}var E;function K(){if(E)return E;var t=window.document.documentElement,i;return t.scrollTop=1,t.scrollTop===1?(t.scrollTop=0,i=t):i=document.body,E=i,i}function R(t){Array.isArray(t)&&t.forEach(function(n){return R(n)});var i=s(t);
1i.length&&i.forEach(function(n){n.style.display=n.dataset._currentDisplay||"block"})}function I(t,i){if(Array.isArray(t))return t.forEach(function(o){return I(o,i)});var n=s(t);if(n.length){var e=[].concat(i);return n.forEach(function(o){e.forEach(function(r){o.classList.toggle(r)})}),n}}var X=function(i){return function(n){i.push(n);function e(){for(;i.length;){var r=i.shift();typeof r=="function"&&r()}}function o(){document.removeEventListener("DOMContentLoaded",o),e()}setTimeout(function(){if(document.readyState!=="loading")return e()},0),document.addEventListener("DOMContentLoaded",o)}},Y=X([]);function A(t,i){Array.isArray(t)&&t.forEach(function(e){return A(e,i)});var n=s(t);n.length&&n.forEach(function(e){Object.keys(i).forEach(function(o){e.style[o]=i[o]})})}function j(t,i){if(Array.isArray(t))return t.forEach(function(e){return j(e,i)});var n=s(t);return n.length&&n.forEach(function(e){Object.keys(i).forEach(function(o){o in e?e[o]=i[o]:e.dataset[o]=i[o]})}),n}function b(t,i){Array.isArray(t)&&t.forEach(function(r){return b(r,i)});var n=s(t);if(n.length)for(var e=n.length,o=0;o<e;o+=1)n[o].innerHTML=i}function Z(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}
1function tt(t,i){Object.keys(i).forEach(function(n){a(t,n,i[n])})}function M(t,i){Array.isArray(t)&&t.forEach(function(o){return M(o,i)});var n={addClass:c,removeClass:d,html:b,events:a,styles:A},e=s(t);e.length&&e.forEach(function(o){Object.keys(i).forEach(function(r,f){r in n&&(r==="events"&&tt(o,i[r]),n[r](o,i[r]))})})}function U(t,i){if(Array.isArray(t))return t.forEach(function(e){return U(e,i)});var n=s(t);n.length&&n.forEach(function(e){typeof i=="string"?e.insertAdjacentHTML("beforeend",i):e.appendChild(i)})}function et(t){return t?Array.isArray(t)?t:t instanceof Node?[t]:[].slice.call(t):[]}function k(t,i){if(Array.isArray(t))return t.forEach(function(e){return k(e,i)});var n=s(t,i);n.length&&n.forEach(function(e){e.prototype&&e.prototype.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)})}var ot={addClass:c,delegate:B,find:s,findOne:m,fire:S,hasClass:W,hide:T,hover:G,isWindow:L,off:w,on:a,once:V,prefixedTransform:F,removeClass:d,scrollableContainer:K,show:R,matches:D,toggleClass:I,closest:N,ready:Y,styles:A,addAttrs:j,html:b,isTouch:Z,modify:M,append:U,toArray:et,remove:k};const rt=null;function q(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function nt(t,i,n){return i&&q(t.prototype,i),n&&q(t,n),t}function x(t){if(t.parentNode){var i=JSON.parse(JSON.stringify(t.parentNode.dataset));return i.module?t.parentNode:x(t.parentNode)}return t}var H="[data-action]",l={find:s,findOne:m,on:a},v=function(){function t(n){return this.log("begin setup"),this.el=n,this.els={},this.options=z({},this.defaults,C("module",this.el)),this.moduleName=this.el.dataset.module,this.setUps={actions:[],named:[],options:[]},this.boundActionRouter=this.actionRouter.bind(this),this.preInit(),this.storeRef(),this.setupActions(),this.setupNamed(),this.verifyRequired(),this.postInit(),this.log("initalized"),t.debug&&(this.el.module=this),this}var i=t.prototype;return i.preInit=function(){},i.postInit=function(){},i.verifyRequired=function(){var e=this;return this.required==={}?this:(typeof this.required.options!="undefined"&&(this.setUps.options=Object.keys(this.options)),Object.keys(this.required).forEach(function(o){e.required[o].forEach(function(r){if(e.setUps[o].indexOf(r)<0)throw new Error(r+" is required as "+o+" for "+e.moduleName+", but is missing!")})}),this)},i.setupActions=function(){var e=this;this.setupAction(this.el),this.find(H).forEach(function(o){var r=x(o);r===e.el&&e.setupAction(o)})},i.setupAction=function(e){if(e.dataset.domoduleActionProcessed!=="true"){var o=t.parseAction(e),r=o.name,f=o.type;if(r){if(typeof this[r]!="function"){this.log(r+" was registered, but there is no function set up");return}}else return;this.log(r+" bound"),this.storeSetUp(r,"actions"),l.on(e,f,this.boundActionRouter),e.dataset.domoduleActionProcessed="true"}},i.actionRouter=function(e){var o=e.currentTarget,r=t.parseAction(o),f=r.name,u=C("action",o);this[f].call(this,o,e,u)},i.setupNamed=function(){var e=this;this.find("[data-name]").forEach(function(o){var r=x(o);r===e.el&&(o.dataset.domoduleNameProcessed||(e.els[o.dataset.name]=o,e.storeSetUp(o.dataset.name,"named"),o.dataset.domoduleNameProcessed="true",o.dataset.domoduleOwner=e.id))})},i.storeRef=function(){if(typeof window.domorefs=="undefined"&&(window.domorefs={}),typeof window.domorefs[this.el.dataset.moduleUid]!="undefined")return!1;this.id=this.uuid,this.el.dataset.moduleUid=this.id,window.domorefs[this.el.dataset.moduleUid]=this},i.find=function(e){return l.find(e,this.el)},i.findOne=function(e){return l.findOne(e,this.el)},i.findByName=function(e){return this.els[e]},i.getOption=function(e){return this.options[e]},i.storeSetUp=function(e,o){this.setUps[o].indexOf(e)<0&&this.setUps[o].push(e)},i.destroy=function(){var e=this;l.find(H,this.el.parentNode).forEach(function(o){if(o.dataset.domoduleActionProcessed==="true"){var r=t.parseAction(o),f=r.type;o.removeEventListener(f,e.boundActionRouter),o.dataset.domoduleActionProcessed="false"}})},t.parseAction=function(e){var o=e.dataset,r=o.action,f=o.actionType,u=f===void 0?"click":f;return{name:r,type:u}},t.getInstance=function(e){if(e instanceof Node)return window.domorefs[e.dataset.moduleUid];throw new Error("getInstance expects a dom node")},t.register=function(e,o){typeof e=="function"&&(o=e,e=o.prototype.constructor.name),window.domodules||(window.domodules={}),t.log("Registering "+e),window.domodules[e]=o},t.discover=function(e){if(e===void 0&&(e="body"),t.log("Discovering modules..."),!window.domodules){t.log("No modules found");return}var o;
1e instanceof Node?o=[e]:Array.isArray(e)?o=e:o=l.find(e);var r=[];return o.forEach(function(f){var u=l.find("[data-module]",f);u.forEach(function(O){var g=O.dataset.module;if(g&&typeof window.domodules[g]=="function"){if(typeof window.domorefs=="object"&&typeof window.domorefs[O.dataset.moduleUid]!="undefined")return;t.log(g+" found"),r.push(new window.domodules[g](O))}})}),r},i.log=function(e){t.log(this.constructor.name+": "+e)},t.log=function(e){t.debug&&console.log("[DOMODULE] "+e)},nt(t,[{key:"required",get:function(){return{}}},{key:"defaults",get:function(){return{}}},{key:"uuid",get:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var o=Math.random()*16|0,r=e==="x"?o:o&3|8;return r.toString(16)})}}]),t}();v.debug=typeof window.localStorage=="object"&&window.localStorage.getItem("DomoduleDebug"),v.autoDiscover=!0,window.addEventListener("DOMContentLoaded",function(){v.autoDiscover&&v.discover()});const P=v;class it extends P{postInit(){if(this.defaultHeight=48,this.els.content){const i=m("p",this.els.content);this.elHeight=i.offsetHeight,this.elHeight>this.defaultHeight&&d(this.els.more,"hide")}}more(){c(this.els.content,"expanded"),d(this.els.less,"hide"),c(this.els.more,"hide")}less(){d(this.els.content,"expanded"),d(this.els.more,"hide"),c(this.els.less,"hide")}}if(P.register("SearchItem",it),window.searchQuery){let t=window.searchQuery.toLowerCase();window.location.search.indexOf("fromtag=1")&&(t=`Tag ${t}`),gaTrack.sendEvent("search",t,window.searchCategory)}})();

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.