Last active
July 18, 2025 00:03
-
-
Save nicoandmee/023e9ca99eeb3e071bdb14a068cf0b68 to your computer and use it in GitHub Desktop.
Surfingkeys config 7/17/2025, 5:03:06 PM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(()=>{var e={135:e=>{!function(){"use strict";var t=document,n=window,o=t.documentElement,a=t.createElement.bind(t),i=a("div"),r=a("table"),s=a("tbody"),c=a("tr"),l=Array.isArray,p=Array.prototype,d=p.concat,u=p.filter,m=p.indexOf,h=p.map,g=p.push,f=p.slice,b=p.some,w=p.splice,y=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,v=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,k=/<.+>/,x=/^\w+$/;function S(e,t){var n,o=!!(n=t)&&11===n.nodeType;return e&&(o||L(t)||E(t))?!o&&v.test(e)?t.getElementsByClassName(e.slice(1).replace(/\\/g,"")):!o&&x.test(e)?t.getElementsByTagName(e):t.querySelectorAll(e):[]}var _=function(){function e(e,o){if(e){if(C(e))return e;var a=e;if(N(e)){var i=o||t;if(!(a=y.test(e)&&L(i)?i.getElementById(e.slice(1).replace(/\\/g,"")):k.test(e)?Z(e):C(i)?i.find(e):N(i)?$(i).find(e):S(e,i)))return}else if(A(e))return this.ready(e);(a.nodeType||a===n)&&(a=[a]),this.length=a.length;for(var r=0,s=this.length;r<s;r++)this[r]=a[r]}}return e.prototype.init=function(t,n){return new e(t,n)},e}(),T=_.prototype,$=T.init;function C(e){return e instanceof _}function R(e){return!!e&&e===e.window}function L(e){return!!e&&9===e.nodeType}function E(e){return!!e&&1===e.nodeType}function A(e){return"function"==typeof e}function N(e){return"string"==typeof e}function O(e){return void 0===e}function I(e){return null===e}function q(e){return!isNaN(parseFloat(e))&&isFinite(e)}function P(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function j(e,t,n){if(n){for(var o=e.length;o--;)if(!1===t.call(e[o],o,e[o]))return e}else if(P(e))for(var a=Object.keys(e),i=(o=0,a.length);o<i;o++){var r=a[o];if(!1===t.call(e[r],r,e[r]))return e}else for(o=0,i=e.length;o<i;o++)if(!1===t.call(e[o],o,e[o]))return e;return e}function D(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="boolean"==typeof e[0]&&e.shift(),o=e.shift(),a=e.length;if(!o)return{};if(!a)return D(n,$,o);for(var i=0;i<a;i++){var r=e[i];for(var s in r)n&&(l(r[s])||P(r[s]))?(o[s]&&o[s].constructor===r[s].constructor||(o[s]=new r[s].constructor),D(n,o[s],r[s])):o[s]=r[s]}return o}$.fn=$.prototype=T,T.length=0,T.splice=w,"function"==typeof Symbol&&(T[Symbol.iterator]=p[Symbol.iterator]),$.isWindow=R,$.isFunction=A,$.isArray=l,$.isNumeric=q,$.isPlainObject=P,$.each=j,T.each=function(e){return j(this,e)},T.empty=function(){return this.each((function(e,t){for(;t.firstChild;)t.removeChild(t.firstChild)}))},$.extend=D,T.extend=function(e){return D(T,e)};var U=/\S+/g;function M(e){return N(e)&&e.match(U)||[]}function H(e,t,o){if(E(e)){var a=n.getComputedStyle(e,null);return o?a.getPropertyValue(t)||void 0:a[t]||e.style[t]}}function F(e,t){return parseInt(H(e,t),10)||0}function z(e,t){return F(e,"border".concat(t?"Left":"Top","Width"))+F(e,"padding".concat(t?"Left":"Top"))+F(e,"padding".concat(t?"Right":"Bottom"))+F(e,"border".concat(t?"Right":"Bottom","Width"))}T.toggleClass=function(e,t){var n=M(e),o=!O(t);return this.each((function(e,a){E(a)&&j(n,(function(e,n){o?t?a.classList.add(n):a.classList.remove(n):a.classList.toggle(n)}))}))},T.addClass=function(e){return this.toggleClass(e,!0)},T.removeAttr=function(e){var t=M(e);return this.each((function(e,n){E(n)&&j(t,(function(e,t){n.removeAttribute(t)}))}))},T.attr=function(e,t){if(e){if(N(e)){if(arguments.length<2){if(!this[0]||!E(this[0]))return;var n=this[0].getAttribute(e);return I(n)?void 0:n}return O(t)?this:I(t)?this.removeAttr(e):this.each((function(n,o){E(o)&&o.setAttribute(e,t)}))}for(var o in e)this.attr(o,e[o]);return this}},T.removeClass=function(e){return arguments.length?this.toggleClass(e,!1):this.attr("class","")},T.hasClass=function(e){return!!e&&b.call(this,(function(t){return E(t)&&t.classList.contains(e)}))},T.get=function(e){return O(e)?f.call(this):this[(e=Number(e))<0?e+this.length:e]},T.eq=function(e){return $(this.get(e))},T.first=function(){return this.eq(0)},T.last=function(){return this.eq(-1)},T.text=function(e){return O(e)?this.get().map((function(e){return E(e)||(t=e)&&3===t.nodeType?e.textContent:"";var t})).join(""):this.each((function(t,n){E(n)&&(n.textContent=e)}))};var B={};function V(e){return"none"===H(e,"display")}function G(e,t){var n=e&&(e.matches||e.webkitMatchesSelector||e.msMatchesSelector);return!!n&&!!t&&n.call(e,t)}function W(e){return N(e)?function(t,n){return G(n,e)}:A(e)?e:C(e)?function(t,n){return e.is(n)}:e?function(t,n){return n===e}:function(){return!1}}function J(e,t){return t?e.filter(t):e}T.filter=function(e){var t=W(e);return $(u.call(this,(function(e,n){return t.call(e,n,e)})))},T.detach=function(e){return J(this,e).each((function(e,t){t.parentNode&&t.parentNode.removeChild(t)})),this};var Y=/^\s*<(\w+)[^>]*>/,K=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,X={"*":i,tr:s,td:c,th:c,thead:r,tbody:r,tfoot:r};function Z(e){if(!N(e))return[];if(K.test(e))return[a(RegExp.$1)];var t=Y.test(e)&&RegExp.$1,n=X[t]||X["*"];return n.innerHTML=e,$(n.childNodes).detach().get()}function Q(e,t,n,o){for(var a=[],i=A(t),r=o&&W(o),s=0,c=e.length;s<c;s++)if(i){var l=t(e[s]);l.length&&g.apply(a,l)}else for(var p=e[s][t];!(null==p||o&&r(-1,p));)a.push(p),p=n?p[t]:null;return a}function ee(e){return e.multiple&&e.options?Q(u.call(e.options,(function(e){return e.selected&&!e.disabled&&!e.parentNode.disabled})),"value"):e.value||""}function te(e){return e.length>1?u.call(e,(function(e,t,n){return m.call(n,e)===t})):e}$.parseHTML=Z,T.has=function(e){var t=N(e)?function(t,n){return S(e,n).length}:function(t,n){return n.contains(e)};return this.filter(t)},T.not=function(e){var t=W(e);return this.filter((function(n,o){return(!N(e)||E(o))&&!t.call(o,n,o)}))},T.val=function(e){return arguments.length?this.each((function(t,n){var o=n.multiple&&n.options;if(o||Ie.test(n.type)){var a=l(e)?h.call(e,String):I(e)?[]:[String(e)];o?j(n.options,(function(e,t){t.selected=a.indexOf(t.value)>=0}),!0):n.checked=a.indexOf(n.value)>=0}else n.value=O(e)||I(e)?"":e})):this[0]&&ee(this[0])},T.is=function(e){var t=W(e);return b.call(this,(function(e,n){return t.call(e,n,e)}))},$.guid=1,$.unique=te,T.add=function(e,t){return $(te(this.get().concat($(e,t).get())))},T.children=function(e){return J($(te(Q(this,(function(e){return e.children})))),e)},T.parent=function(e){return J($(te(Q(this,"parentNode"))),e)},T.index=function(e){var t=e?$(e)[0]:this[0],n=e?this:$(t).parent().children();return m.call(n,t)},T.closest=function(e){var t=this.filter(e);if(t.length)return t;var n=this.parent();return n.length?n.closest(e):t},T.siblings=function(e){return J($(te(Q(this,(function(e){return $(e).parent().children().not(e)})))),e)},T.find=function(e){return $(te(Q(this,(function(t){return S(e,t)}))))};var ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,oe=/^$|^module$|\/(java|ecma)script/i,ae=["type","src","nonce","noModule"];function ie(e,t,n,i,r){i?e.insertBefore(t,n?e.firstChild:null):"HTML"===e.nodeName?e.parentNode.replaceChild(t,e):e.parentNode.insertBefore(t,n?e:e.nextSibling),r&&function(e,t){var n=$(e);n.filter("script").add(n.find("script")).each((function(e,n){if(oe.test(n.type)&&o.contains(n)){var i=a("script");i.text=n.textContent.replace(ne,""),j(ae,(function(e,t){n[t]&&(i[t]=n[t])})),t.head.insertBefore(i,null),t.head.removeChild(i)}}))}(t,e.ownerDocument)}function re(e,t,n,o,a,i,r,s){return j(e,(function(e,i){j($(i),(function(e,i){j($(t),(function(t,r){var s=n?r:i,c=n?e:t;ie(n?i:r,c?s.cloneNode(!0):s,o,a,!c)}),s)}),r)}),i),t}T.after=function(){return re(arguments,this,!1,!1,!1,!0,!0)},T.append=function(){return re(arguments,this,!1,!1,!0)},T.html=function(e){if(!arguments.length)return this[0]&&this[0].innerHTML;if(O(e))return this;var t=/<script[\s>]/.test(e);return this.each((function(n,o){E(o)&&(t?$(o).empty().append(e):o.innerHTML=e)}))},T.appendTo=function(e){return re(arguments,this,!0,!1,!0)},T.wrapInner=function(e){return this.each((function(t,n){var o=$(n),a=o.contents();a.length?a.wrapAll(e):o.append(e)}))},T.before=function(){return re(arguments,this,!1,!0)},T.wrapAll=function(e){for(var t=$(e),n=t[0];n.children.length;)n=n.firstElementChild;return this.first().before(t),this.appendTo(n)},T.wrap=function(e){return this.each((function(t,n){var o=$(e)[0];$(n).wrapAll(t?o.cloneNode(!0):o)}))},T.insertAfter=function(e){return re(arguments,this,!0,!1,!1,!1,!1,!0)},T.insertBefore=function(e){return re(arguments,this,!0,!0)},T.prepend=function(){return re(arguments,this,!1,!0,!0,!0,!0)},T.prependTo=function(e){return re(arguments,this,!0,!0,!0,!1,!1,!0)},T.contents=function(){return $(te(Q(this,(function(e){return"IFRAME"===e.tagName?[e.contentDocument]:"TEMPLATE"===e.tagName?e.content.childNodes:e.childNodes}))))},T.next=function(e,t,n){return J($(te(Q(this,"nextElementSibling",t,n))),e)},T.nextAll=function(e){return this.next(e,!0)},T.nextUntil=function(e,t){return this.next(t,!0,e)},T.parents=function(e,t){return J($(te(Q(this,"parentElement",!0,t))),e)},T.parentsUntil=function(e,t){return this.parents(t,e)},T.prev=function(e,t,n){return J($(te(Q(this,"previousElementSibling",t,n))),e)},T.prevAll=function(e){return this.prev(e,!0)},T.prevUntil=function(e,t){return this.prev(t,!0,e)},T.map=function(e){return $(d.apply([],h.call(this,(function(t,n){return e.call(t,n,t)}))))},T.clone=function(){return this.map((function(e,t){return t.cloneNode(!0)}))},T.offsetParent=function(){return this.map((function(e,t){for(var n=t.offsetParent;n&&"static"===H(n,"position");)n=n.offsetParent;return n||o}))},T.slice=function(e,t){return $(f.call(this,e,t))};var se=/-([a-z])/g;function ce(e){return e.replace(se,(function(e,t){return t.toUpperCase()}))}T.ready=function(e){var n=function(){return setTimeout(e,0,$)};return"loading"!==t.readyState?n():t.addEventListener("DOMContentLoaded",n),this},T.unwrap=function(){return this.parent().each((function(e,t){if("BODY"!==t.tagName){var n=$(t);n.replaceWith(n.children())}})),this},T.offset=function(){var e=this[0];if(e){var t=e.getBoundingClientRect();return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}}},T.position=function(){var e=this[0];if(e){var t="fixed"===H(e,"position"),n=t?e.getBoundingClientRect():this.offset();if(!t){for(var o=e.ownerDocument,a=e.offsetParent||o.documentElement;(a===o.body||a===o.documentElement)&&"static"===H(a,"position");)a=a.parentNode;if(a!==e&&E(a)){var i=$(a).offset();n.top-=i.top+F(a,"borderTopWidth"),n.left-=i.left+F(a,"borderLeftWidth")}}return{top:n.top-F(e,"marginTop"),left:n.left-F(e,"marginLeft")}}};var le={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};T.prop=function(e,t){if(e){if(N(e))return e=le[e]||e,arguments.length<2?this[0]&&this[0][e]:this.each((function(n,o){o[e]=t}));for(var n in e)this.prop(n,e[n]);return this}},T.removeProp=function(e){return this.each((function(t,n){delete n[le[e]||e]}))};var pe=/^--/;function de(e){return pe.test(e)}var ue={},me=i.style,he=["webkit","moz","ms"];var ge={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function fe(e,t,n){return void 0===n&&(n=de(e)),n||ge[e]||!q(t)?t:"".concat(t,"px")}function be(e,t){try{return e(t)}catch(e){return t}}T.css=function(e,t){if(N(e)){var n=de(e);return e=function(e,t){if(void 0===t&&(t=de(e)),t)return e;if(!ue[e]){var n=ce(e),o="".concat(n[0].toUpperCase()).concat(n.slice(1));j("".concat(n," ").concat(he.join("".concat(o," "))).concat(o).split(" "),(function(t,n){if(n in me)return ue[e]=n,!1}))}return ue[e]}(e,n),arguments.length<2?this[0]&&H(this[0],e,n):e?(t=fe(e,t,n),this.each((function(o,a){E(a)&&(n?a.style.setProperty(e,t):a.style[e]=t)}))):this}for(var o in e)this.css(o,e[o]);return this};var we=/^\s+|\s+$/;function ye(e,t){var n=e.dataset[t]||e.dataset[ce(t)];return we.test(n)?n:be(JSON.parse,n)}function ve(e,t){var n=e.documentElement;return Math.max(e.body["scroll".concat(t)],n["scroll".concat(t)],e.body["offset".concat(t)],n["offset".concat(t)],n["client".concat(t)])}T.data=function(e,t){if(!e){if(!this[0])return;var n={};for(var o in this[0].dataset)n[o]=ye(this[0],o);return n}if(N(e))return arguments.length<2?this[0]&&ye(this[0],e):O(t)?this:this.each((function(n,o){!function(e,t,n){n=be(JSON.stringify,n),e.dataset[ce(t)]=n}(o,e,t)}));for(var o in e)this.data(o,e[o]);return this},j([!0,!1],(function(e,t){j(["Width","Height"],(function(e,n){var o="".concat(t?"outer":"inner").concat(n);T[o]=function(o){if(this[0])return R(this[0])?t?this[0]["inner".concat(n)]:this[0].document.documentElement["client".concat(n)]:L(this[0])?ve(this[0],n):this[0]["".concat(t?"offset":"client").concat(n)]+(o&&t?F(this[0],"margin".concat(e?"Top":"Left"))+F(this[0],"margin".concat(e?"Bottom":"Right")):0)}}))})),j(["Width","Height"],(function(e,t){var n=t.toLowerCase();T[n]=function(o){if(!this[0])return O(o)?void 0:this;if(!arguments.length)return R(this[0])?this[0].document.documentElement["client".concat(t)]:L(this[0])?ve(this[0],t):this[0].getBoundingClientRect()[n]-z(this[0],!e);var a=parseInt(o,10);return this.each((function(t,o){if(E(o)){var i=H(o,"boxSizing");o.style[n]=fe(n,a+("border-box"===i?z(o,!e):0))}}))}}));var ke="___cd";T.toggle=function(e){return this.each((function(n,o){if(E(o)){var i=V(o);(O(e)?i:e)?(o.style.display=o[ke]||"",V(o)&&(o.style.display=function(e){if(B[e])return B[e];var n=a(e);t.body.insertBefore(n,null);var o=H(n,"display");return t.body.removeChild(n),B[e]="none"!==o?o:"block"}(o.tagName))):i||(o[ke]=H(o,"display"),o.style.display="none")}}))},T.hide=function(){return this.toggle(!1)},T.show=function(){return this.toggle(!0)};var xe="___ce",Se=".",_e={focus:"focusin",blur:"focusout"},Te={mouseenter:"mouseover",mouseleave:"mouseout"},$e=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Ce(e){return Te[e]||_e[e]||e}function Re(e){var t=e.split(Se);return[t[0],t.slice(1).sort()]}function Le(e){return e[xe]=e[xe]||{}}function Ee(e,t){return!t||!b.call(t,(function(t){return e.indexOf(t)<0}))}function Ae(e,t,n,o,a){var i=Le(e);if(t)i[t]&&(i[t]=i[t].filter((function(i){var r=i[0],s=i[1],c=i[2];if(a&&c.guid!==a.guid||!Ee(r,n)||o&&o!==s)return!0;e.removeEventListener(t,c)})));else for(t in i)Ae(e,t,n,o,a)}T.trigger=function(e,n){if(N(e)){var o=Re(e),a=o[0],i=o[1],r=Ce(a);if(!r)return this;var s=$e.test(r)?"MouseEvents":"HTMLEvents";(e=t.createEvent(s)).initEvent(r,!0,!0),e.namespace=i.join(Se),e.___ot=a}e.___td=n;var c=e.___ot in _e;return this.each((function(t,n){c&&A(n[e.___ot])&&(n["___i".concat(e.type)]=!0,n[e.___ot](),n["___i".concat(e.type)]=!1),n.dispatchEvent(e)}))},T.off=function(e,t,n){var o=this;if(O(e))this.each((function(e,t){(E(t)||L(t)||R(t))&&Ae(t)}));else if(N(e))A(t)&&(n=t,t=""),j(M(e),(function(e,a){var i=Re(a),r=i[0],s=i[1],c=Ce(r);o.each((function(e,o){(E(o)||L(o)||R(o))&&Ae(o,c,s,t,n)}))}));else for(var a in e)this.off(a,e[a]);return this},T.remove=function(e){return J(this,e).detach().off(),this},T.replaceWith=function(e){return this.before(e).remove()},T.replaceAll=function(e){return $(e).replaceWith(this),this},T.on=function(e,t,n,o,a){var i=this;if(!N(e)){for(var r in e)this.on(r,t,n,e[r],a);return this}return N(t)||(O(t)||I(t)?t="":O(n)?(n=t,t=""):(o=n,n=t,t="")),A(o)||(o=n,n=void 0),o?(j(M(e),(function(e,r){var s=Re(r),c=s[0],l=s[1],p=Ce(c),d=c in Te,u=c in _e;p&&i.each((function(e,i){if(E(i)||L(i)||R(i)){var r=function(e){if(e.target["___i".concat(e.type)])return e.stopImmediatePropagation();if((!e.namespace||Ee(l,e.namespace.split(Se)))&&(t||!(u&&(e.target!==i||e.___ot===p)||d&&e.relatedTarget&&i.contains(e.relatedTarget)))){var s=i;if(t){for(var c=e.target;!G(c,t);){if(c===i)return;if(!(c=c.parentNode))return}s=c}Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return s}}),Object.defineProperty(e,"delegateTarget",{configurable:!0,get:function(){return i}}),Object.defineProperty(e,"data",{configurable:!0,get:function(){return n}});var m=o.call(s,e,e.___td);a&&Ae(i,p,l,t,r),!1===m&&(e.preventDefault(),e.stopPropagation())}};r.guid=o.guid=o.guid||$.guid++,function(e,t,n,o,a){var i=Le(e);i[t]=i[t]||[],i[t].push([n,o,a]),e.addEventListener(t,a)}(i,p,l,t,r)}}))})),this):this},T.one=function(e,t,n,o){return this.on(e,t,n,o,!0)};var Ne=/\r?\n/g;var Oe=/file|reset|submit|button|image/i,Ie=/radio|checkbox/i;T.serialize=function(){var e="";return this.each((function(t,n){j(n.elements||[n],(function(t,n){if(!(n.disabled||!n.name||"FIELDSET"===n.tagName||Oe.test(n.type)||Ie.test(n.type)&&!n.checked)){var o=ee(n);if(!O(o))j(l(o)?o:[o],(function(t,o){e+=function(e,t){return"&".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t.replace(Ne,"\r\n")))}(n.name,o)}))}}))})),e.slice(1)},e.exports=$}()},326:(e,t,n)=>{"use strict";const o=n(438),a=n(982);t.all=o,t.check=e=>(e=(e||"").toString().toLowerCase(),o.includes(e)),t.oddballs=e=>e&&e in a?a[e]:Object.keys(a).sort()},438:e=>{"use strict";e.exports=JSON.parse('["300","302","400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","419","420","421","422","423","424","425","426","427","428","429","430","431","500","501","502","503","504","505","506","507","508","509","510","511","693","694","695","900","about","account","admin","advisories","anonymous","any","api","apps","attributes","auth","billing","blob","blog","bounty","branches","business","businesses","c","cache","careers","case-studies","categories","central","certification","changelog","chat","cla","cloud","codereview","collection","collections","comments","commit","commits","companies","compare","contact","contributing","cookbook","copilot","coupons","customer","customer-stories","customers","dashboard","dashboard-feed","dashboards","design","develop","developer","diff","discover","discussions","downloads","downtime","editor","editors","edu","education","enterprise","events","explore","featured","features","files","fixtures","forked","garage","ghost","gist","gists","graphs","groups","guide","guides","help","help-wanted","home","hooks","hosting","hovercards","identity","images","inbox","individual","info","integration","interfaces","introduction","invalid-email-address","investors","issues","jobs","join","journal","journals","lab","labs","languages","launch","layouts","learn","legal","library","linux","listings","lists","login","logos","logout","mac","maintenance","malware","man","marketplace","mention","mentioned","mentioning","mentions","migrating","milestones","mine","mirrors","mobile","navigation","network","new","news","none","nonprofit","nonprofits","notices","notifications","oauth","offer","open-source","organisations","organizations","orgs","pages","partners","payments","personal","plans","plugins","popular","popularity","posts","press","preview","pricing","professional","projects","pulls","raw","readme","recommendations","redeem","releases","render","reply","repositories","resources","restore","revert","save-net-neutrality","saved","scraping","search","security","services","sessions","settings","shareholders","shop","showcases","signin","signup","site","socials","spam","sponsors","ssh","staff","starred","stars","static","status","statuses","storage","store","stories","styleguide","subscriptions","suggest","suggestion","suggestions","support","suspended","talks","teach","teacher","teachers","teaching","team","teams","ten","terms","timeline","topic","topics","tos","tour","train","training","translations","tree","trending","undefined","updates","username","users","visualization","w","watching","wiki","wikis","windows","works-with","www0","www1","www2","www3","www4","www5","www6","www7","www8","www9"]')},982:e=>{"use strict";e.exports=JSON.parse('{"avatars":{"reserved":true,"taken":true,"typical":true,"included":false},"assets":{"reserved":true,"taken":true,"typical":true,"included":false},"bookmarks":{"reserved":true,"taken":true,"typical":true,"included":false},"checks":{"reserved":true,"taken":true,"typical":true,"included":false},"conversations":{"reserved":true,"taken":true,"typical":true,"included":false},"labels":{"reserved":true,"taken":true,"typical":true,"included":false},"media":{"reserved":true,"taken":true,"typical":true,"included":false},"nodes":{"reserved":true,"taken":true,"typical":true,"included":false},"owners":{"reserved":true,"taken":true,"typical":true,"included":false},"page":{"reserved":true,"taken":true,"typical":true,"included":false},"registry":{"reserved":true,"taken":true,"typical":true,"included":false},"seats":{"reserved":true,"taken":true,"typical":true,"included":false},"shared":{"reserved":true,"taken":true,"typical":true,"included":false},"tasks":{"reserved":true,"taken":true,"typical":true,"included":false},"uploads":{"reserved":true,"taken":true,"typical":true,"included":false},"account":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/settings/profile","included":true},"apps":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/marketplace","included":true},"blog":{"reserved":true,"taken":false,"typical":false,"redirect":"https://blog.github.com","included":true},"c":{"reserved":true,"taken":false,"typical":false,"redirect":"https://support.github.com/","included":true},"contact":{"reserved":true,"taken":false,"typical":false,"redirect":"https://support.github.com/","included":true},"contributing":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/about/careers","included":true},"customer":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/business/customers","included":true},"customers":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/business/customers","included":true},"developer":{"reserved":true,"taken":false,"typical":false,"redirect":"https://developer.github.com","included":true},"edu":{"reserved":true,"taken":false,"typical":false,"redirect":"https://education.github.com","included":true},"guides":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com","included":true},"help":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com","included":true},"launch":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/search","included":true},"mac":{"reserved":true,"taken":false,"typical":false,"redirect":"https://desktop.github.com","included":true},"mirrors":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com/articles/about-github-mirrors/","included":true},"pages":{"reserved":true,"taken":false,"typical":false,"redirect":"https://pages.github.com","included":true},"plans":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/pricing","included":true},"press":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/about/press","included":true},"readme":{"reserved":true,"taken":false,"typical":false,"included":true},"repositories":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/trending","included":true},"resources":{"reserved":true,"taken":false,"typical":false,"redirect":"https://resources.github.com","included":true},"security":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com/articles/github-security/","included":true},"settings":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/settings/profile","included":true},"signup":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/join","included":true},"terms":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com/articles/github-terms-of-service/","included":true},"topic":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/topics","included":true},"tos":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com/articles/github-terms-of-service/","included":true},"training":{"reserved":true,"taken":false,"typical":false,"redirect":"https://services.github.com","included":true},"users":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com","included":true},"wiki":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com","included":true},"windows":{"reserved":true,"taken":false,"typical":false,"redirect":"https://desktop.github.com","included":true},"advisories":{"reserved":true,"taken":true,"typical":false,"included":true,"notes":"GitHub Advisory Database"},"collections":{"reserved":true,"taken":false,"typical":false,"included":true,"notes":"Curated lists of GitHub repos"},"dashboard-feed":{"reserved":true,"taken":true,"typical":false,"included":true,"notes":"GitHub dashboard feed"},"hovercards":{"reserved":true,"taken":false,"typical":false,"included":true,"notes":"HTTP ERROR 406"},"inbox":{"reserved":true,"taken":true,"typical":false,"redirect":"https://github.com/410","included":true,"notes":"410 ERROR"},"invalid-email-address":{"reserved":true,"taken":true,"typical":false,"included":true,"notes":"HTTP ERROR 404"},"suggestions":{"reserved":true,"taken":false,"typical":false,"included":true},"suspended":{"reserved":true,"taken":true,"typical":false,"redirect":"https://github.com","included":true,"notes":"Page behaviour depends on whether you\'re logged in or if your account is actually suspended"},"case-studies":{"reserved":false,"taken":true,"typical":false,"included":true},"watching":{"reserved":false,"taken":true,"typical":false,"included":true},"save-net-neutrality":{"reserved":false,"taken":true,"typical":false,"included":true},"ghost":{"reserved":false,"taken":true,"typical":true,"included":true},"status":{"reserved":true,"taken":false,"typical":false,"included":true}}')}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";const e=()=>{if(-1!==window.navigator.userAgent.indexOf("Chrome"))return"Chrome";if(0===window.navigator.vendor.indexOf("Apple Computer, Inc.")){return/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1?"Safari-iOS":"Safari"}return-1!==window.navigator.userAgent.indexOf("Firefox")?"Firefox":"Chrome"},t="undefined"==typeof window?{}:"undefined"!=typeof api?{v1:!0,...api}:{v1:!1,getBrowserName:e,RUNTIME,Clipboard,Normal,Hints,Visual,Front,insertJS:Normal.insertJS,addSearchAlias:addSearchAliasX,aceVimMap,addVimMapKey,cmap,imap,imapkey,getClickableElements,getFormData,map,unmap,unmapAllExcept,iunmap,vunmap,mapkey,readText,removeSearchAlias,searchSelectedWith,tabOpenLink,vmap,vmapkey};var o=n(326);const a={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},i={silent:{level:-1},fatal:{level:a.fatal},error:{level:a.error},warn:{level:a.warn},log:{level:a.log},info:{level:a.info},success:{level:a.success},fail:{level:a.fail},ready:{level:a.info},start:{level:a.info},box:{level:a.info},debug:{level:a.debug},trace:{level:a.trace},verbose:{level:a.verbose}};function r(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&(!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e)))}function s(e,t,n=".",o){if(!r(t))return s(e,{},n,o);const a=Object.assign({},t);for(const t in e){if("__proto__"===t||"constructor"===t)continue;const i=e[t];null!=i&&(o&&o(a,t,i,n)||(Array.isArray(i)&&Array.isArray(a[t])?a[t]=[...i,...a[t]]:r(i)&&r(a[t])?a[t]=s(i,a[t],(n?`${n}.`:"")+t.toString(),o):a[t]=i))}return a}const c=(...e)=>e.reduce(((e,t)=>s(e,t,"",l)),{});var l;function p(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let d=!1;const u=[];class m{options;_lastLog;_mockFn;constructor(e={}){const t=e.types||i;this.options=c({...e,defaults:{...e.defaults},level:h(e.level,t),reporters:[...e.reporters||[]]},{types:i,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const e in t){const n={type:e,...this.options.defaults,...t[e]};this[e]=this._wrapLogFn(n),this[e].raw=this._wrapLogFn(n,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=h(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,t)}create(e){const t=new m({...this.options,...e});return this._mockFn&&t.mockTypes(this._mockFn),t}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){const t=this.options.reporters.indexOf(e);if(-1!==t)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this.options.types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this.options.types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){d=!0}resumeLogs(){d=!1;const e=u.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){const t=e||this.options.mockFn;if(this._mockFn=t,"function"==typeof t)for(const e in this.options.types)this[e]=t(e,this.options.types[e])||this[e],this[e].raw=this[e]}_wrapLogFn(e,t){return(...n)=>{if(!d)return this._logFn(e,n,t);u.push([this,e,n,t])}}_logFn(e,t,n){if((e.level||0)>this.level)return!1;const o={date:new Date,args:[],...e,level:h(e.level,this.options.types)};!n&&1===t.length&&p(t[0])?Object.assign(o,t[0]):o.args=[...t],o.message&&(o.args.unshift(o.message),delete o.message),o.additional&&(Array.isArray(o.additional)||(o.additional=o.additional.split("\n")),o.args.push("\n"+o.additional.join("\n")),delete o.additional),o.type="string"==typeof o.type?o.type.toLowerCase():"log",o.tag="string"==typeof o.tag?o.tag:"";const a=(e=!1)=>{const t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){const e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=o,this._log(o))};clearTimeout(this._lastLog.timeout);const i=this._lastLog.time&&o.date?o.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=o.date,i<this.options.throttle)try{const e=JSON.stringify([o.type,o.tag,o.args]),t=this._lastLog.serialized===e;if(this._lastLog.serialized=e,t&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin))return void(this._lastLog.timeout=setTimeout(a,this.options.throttle))}catch{}a(!0)}_log(e){for(const t of this.options.reporters)t.log(e,{options:this.options})}}function h(e,t={},n=3){return void 0===e?n:"number"==typeof e?e:t[e]&&void 0!==t[e].level?t[e].level:n}m.prototype.add=m.prototype.addReporter,m.prototype.remove=m.prototype.removeReporter,m.prototype.clear=m.prototype.removeReporter,m.prototype.withScope=m.prototype.withTag,m.prototype.mock=m.prototype.mockTypes,m.prototype.pause=m.prototype.pauseLogs,m.prototype.resume=m.prototype.resumeLogs;class g{options;defaultColor;levelColorMap;typeColorMap;constructor(e){this.options={...e},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(e){return e<1?console.__error||console.error:1===e?console.__warn||console.warn:console.__log||console.log}log(e){const t=this._getLogFn(e.level),n="log"===e.type?"":e.type,o=e.tag||"",a=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,i=`%c${[o,n].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${i}%c ${e.args[0]}`,a,"",...e.args.slice(1)):t(i,a,...e.args)}}const f=function(e={}){return function(e={}){return new m(e)}({reporters:e.reporters||[new g({})],prompt:(e,t={})=>"confirm"===t.type?Promise.resolve(confirm(e)):Promise.resolve(prompt(e)),...e})}(),b={html2markdown:"html2md_WpHoiu1hKtt_Bt5TG7WCpUsompYSWxtVtFs4UhsnNsNqeK5WTipKhbb9_7eT7WtfD4sP2N3vk9FJfq9pJzfeRK7kae7xo6inAFgh3",kagiSession:"https://kagi.com/search?token=TQFAAlcn1QY.kJFJhpSaRe3xz_IuoWKrF1l5lRhZ3gi6Le1t08zH3to",crunchbase:"",google_cs:"AIzaSyDSc6lADAURez0Dl9BKcwlrYV6zb5QojJs",google_yt:"AIzaSyCIRN6kHTGFABfdDzwA2M7BdpOz5BiUuus",wolframalpha:"",domainr:"18cffef341msh21358904326422ep10bd31jsnda2649a3cbe4",alternativeTo:"",google_cx_ex:"65f6a233959ec4562",google_cx_af:"72db069dbcfb14ad6",google_cx_al:"65aec8d98a5394c9f",google_cx_no:"60d886841b821401e",google_cx_cs:"5631bd769b1024c83",google_cx_jq:"04ab5af0010924f0e",google_cx_gg:"d4d7e03d7d5ca4117"},w=e=>`https://doi.org/${e}`,{entries:y,setPrototypeOf:v,isFrozen:k,getPrototypeOf:x,getOwnPropertyDescriptor:S}=Object;let{freeze:_,seal:T,create:C}=Object,{apply:R,construct:L}="undefined"!=typeof Reflect&&Reflect;_||(_=function(e){return e}),T||(T=function(e){return e}),R||(R=function(e,t,n){return e.apply(t,n)}),L||(L=function(e,t){return new e(...t)});const E=V(Array.prototype.forEach),A=V(Array.prototype.lastIndexOf),N=V(Array.prototype.pop),O=V(Array.prototype.push),I=V(Array.prototype.splice),q=V(String.prototype.toLowerCase),P=V(String.prototype.toString),j=V(String.prototype.match),D=V(String.prototype.replace),U=V(String.prototype.indexOf),M=V(String.prototype.trim),H=V(Object.prototype.hasOwnProperty),F=V(RegExp.prototype.test),z=(B=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return L(B,t)});var B;function V(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return R(e,t,o)}}function G(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:q;v&&v(e,null);let o=t.length;for(;o--;){let a=t[o];if("string"==typeof a){const e=n(a);e!==a&&(k(t)||(t[o]=e),a=e)}e[a]=!0}return e}function W(e){for(let t=0;t<e.length;t++){H(e,t)||(e[t]=null)}return e}function J(e){const t=C(null);for(const[n,o]of y(e)){H(e,n)&&(Array.isArray(o)?t[n]=W(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=J(o):t[n]=o)}return t}function Y(e,t){for(;null!==e;){const n=S(e,t);if(n){if(n.get)return V(n.get);if("function"==typeof n.value)return V(n.value)}e=x(e)}return function(){return null}}const K=_(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),X=_(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Z=_(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Q=_(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ee=_(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),te=_(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ne=_(["#text"]),oe=_(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ae=_(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ie=_(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),re=_(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),se=T(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ce=T(/<%[\w\W]*|[\w\W]*%>/gm),le=T(/\$\{[\w\W]*/gm),pe=T(/^data-[\-\w.\u00B7-\uFFFF]+$/),de=T(/^aria-[\-\w]+$/),ue=T(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),me=T(/^(?:\w+script|data):/i),he=T(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ge=T(/^html$/i),fe=T(/^[a-z][.\w]*(-[.\w]+)+$/i);var be=Object.freeze({__proto__:null,ARIA_ATTR:de,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:fe,DATA_ATTR:pe,DOCTYPE_NAME:ge,ERB_EXPR:ce,IS_ALLOWED_URI:ue,IS_SCRIPT_OR_DATA:me,MUSTACHE_EXPR:se,TMPLIT_EXPR:le});const we=1,ye=3,ve=7,ke=8,xe=9,Se=function(){return"undefined"==typeof window?null:window};var _e=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Se();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==xe||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const a=o,i=a.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:c,Element:l,NodeFilter:p,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:m,trustedTypes:h}=t,g=l.prototype,f=Y(g,"cloneNode"),b=Y(g,"remove"),w=Y(g,"nextSibling"),v=Y(g,"childNodes"),k=Y(g,"parentNode");if("function"==typeof s){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let x,S="";const{implementation:T,createNodeIterator:$,createDocumentFragment:R,getElementsByTagName:L}=o,{importNode:B}=a;let V={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof y&&"function"==typeof k&&T&&void 0!==T.createHTMLDocument;const{MUSTACHE_EXPR:W,ERB_EXPR:se,TMPLIT_EXPR:ce,DATA_ATTR:le,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:he}=be;let{IS_ALLOWED_URI:fe}=be,_e=null;const Te=G({},[...K,...X,...Z,...ee,...ne]);let $e=null;const Ce=G({},[...oe,...ae,...ie,...re]);let Re=Object.seal(C(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,Ee=null,Ae=!0,Ne=!0,Oe=!1,Ie=!0,qe=!1,Pe=!0,je=!1,De=!1,Ue=!1,Me=!1,He=!1,Fe=!1,ze=!0,Be=!1,Ve=!0,Ge=!1,We={},Je=null;const Ye=G({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Xe=G({},["audio","video","img","source","image","track"]);let Ze=null;const Qe=G({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,at=!1,it=null;const rt=G({},[et,tt,nt],P);let st=G({},["mi","mo","mn","ms","mtext"]),ct=G({},["annotation-xml"]);const lt=G({},["title","style","font","a","script"]);let pt=null;const dt=["application/xhtml+xml","text/html"];let ut=null,mt=null;const ht=o.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=J(e),pt=-1===dt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===pt?P:q,_e=H(e,"ALLOWED_TAGS")?G({},e.ALLOWED_TAGS,ut):Te,$e=H(e,"ALLOWED_ATTR")?G({},e.ALLOWED_ATTR,ut):Ce,it=H(e,"ALLOWED_NAMESPACES")?G({},e.ALLOWED_NAMESPACES,P):rt,Ze=H(e,"ADD_URI_SAFE_ATTR")?G(J(Qe),e.ADD_URI_SAFE_ATTR,ut):Qe,Ke=H(e,"ADD_DATA_URI_TAGS")?G(J(Xe),e.ADD_DATA_URI_TAGS,ut):Xe,Je=H(e,"FORBID_CONTENTS")?G({},e.FORBID_CONTENTS,ut):Ye,Le=H(e,"FORBID_TAGS")?G({},e.FORBID_TAGS,ut):J({}),Ee=H(e,"FORBID_ATTR")?G({},e.FORBID_ATTR,ut):J({}),We=!!H(e,"USE_PROFILES")&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,qe=e.SAFE_FOR_TEMPLATES||!1,Pe=!1!==e.SAFE_FOR_XML,je=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,Ue=e.FORCE_BODY||!1,ze=!1!==e.SANITIZE_DOM,Be=e.SANITIZE_NAMED_PROPS||!1,Ve=!1!==e.KEEP_CONTENT,Ge=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||ue,ot=e.NAMESPACE||nt,st=e.MATHML_TEXT_INTEGRATION_POINTS||st,ct=e.HTML_INTEGRATION_POINTS||ct,Re=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Re.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Re.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Re.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qe&&(Ne=!1),He&&(Me=!0),We&&(_e=G({},ne),$e=[],!0===We.html&&(G(_e,K),G($e,oe)),!0===We.svg&&(G(_e,X),G($e,ae),G($e,re)),!0===We.svgFilters&&(G(_e,Z),G($e,ae),G($e,re)),!0===We.mathMl&&(G(_e,ee),G($e,ie),G($e,re))),e.ADD_TAGS&&(_e===Te&&(_e=J(_e)),G(_e,e.ADD_TAGS,ut)),e.ADD_ATTR&&($e===Ce&&($e=J($e)),G($e,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&G(Ze,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Je===Ye&&(Je=J(Je)),G(Je,e.FORBID_CONTENTS,ut)),Ve&&(_e["#text"]=!0),je&&G(_e,["html","head","body"]),_e.table&&(G(_e,["tbody"]),delete Le.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,S=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(h,i)),null!==x&&"string"==typeof S&&(S=x.createHTML(""));_&&_(e),mt=e}},bt=G({},[...X,...Z,...Q]),wt=G({},[...ee,...te]),yt=function(e){O(n.removed,{element:e});try{k(e).removeChild(e)}catch(t){b(e)}},vt=function(e,t){try{O(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){O(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Me||He)try{yt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},kt=function(e){let t=null,n=null;if(Ue)e="<remove></remove>"+e;else{const t=j(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===pt&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=x?x.createHTML(e):e;if(ot===nt)try{t=(new m).parseFromString(a,pt)}catch(e){}if(!t||!t.documentElement){t=T.createDocument(ot,"template",null);try{t.documentElement.innerHTML=at?S:a}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),ot===nt?L.call(t,je?"html":"body")[0]:je?t.documentElement:i},xt=function(e){return $.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},St=function(e){return e instanceof u&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function(e){return"function"==typeof c&&e instanceof c};function Tt(e,t,o){E(e,(e=>{e.call(n,t,o,mt)}))}const $t=function(e){let t=null;if(Tt(V.beforeSanitizeElements,e,null),St(e))return yt(e),!0;const o=ut(e.nodeName);if(Tt(V.uponSanitizeElement,e,{tagName:o,allowedTags:_e}),Pe&&e.hasChildNodes()&&!_t(e.firstElementChild)&&F(/<[/\w!]/g,e.innerHTML)&&F(/<[/\w!]/g,e.textContent))return yt(e),!0;if(e.nodeType===ve)return yt(e),!0;if(Pe&&e.nodeType===ke&&F(/<[/\w]/g,e.data))return yt(e),!0;if(!_e[o]||Le[o]){if(!Le[o]&&Rt(o)){if(Re.tagNameCheck instanceof RegExp&&F(Re.tagNameCheck,o))return!1;if(Re.tagNameCheck instanceof Function&&Re.tagNameCheck(o))return!1}if(Ve&&!Je[o]){const t=k(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const a=f(n[o],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,w(e))}}}return yt(e),!0}return e instanceof l&&!function(e){let t=k(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=q(e.tagName),o=q(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||st[o]):Boolean(bt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(wt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!st[o])&&!wt[n]&&(lt[n]||!bt[n]):!("application/xhtml+xml"!==pt||!it[e.namespaceURI]))}(e)?(yt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!F(/<\/no(script|embed|frames)/i,e.innerHTML)?(qe&&e.nodeType===ye&&(t=e.textContent,E([W,se,ce],(e=>{t=D(t,e," ")})),e.textContent!==t&&(O(n.removed,{element:e.cloneNode()}),e.textContent=t)),Tt(V.afterSanitizeElements,e,null),!1):(yt(e),!0)},Ct=function(e,t,n){if(ze&&("id"===t||"name"===t)&&(n in o||n in ht))return!1;if(Ne&&!Ee[t]&&F(le,t));else if(Ae&&F(pe,t));else if(!$e[t]||Ee[t]){if(!(Rt(e)&&(Re.tagNameCheck instanceof RegExp&&F(Re.tagNameCheck,e)||Re.tagNameCheck instanceof Function&&Re.tagNameCheck(e))&&(Re.attributeNameCheck instanceof RegExp&&F(Re.attributeNameCheck,t)||Re.attributeNameCheck instanceof Function&&Re.attributeNameCheck(t))||"is"===t&&Re.allowCustomizedBuiltInElements&&(Re.tagNameCheck instanceof RegExp&&F(Re.tagNameCheck,n)||Re.tagNameCheck instanceof Function&&Re.tagNameCheck(n))))return!1}else if(Ze[t]);else if(F(fe,D(n,me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==U(n,"data:")||!Ke[e]){if(Oe&&!F(de,D(n,me,"")));else if(n)return!1}else;return!0},Rt=function(e){return"annotation-xml"!==e&&j(e,he)},Lt=function(e){Tt(V.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||St(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$e,forceKeepAttr:void 0};let a=t.length;for(;a--;){const i=t[a],{name:r,namespaceURI:s,value:c}=i,l=ut(r),p=c;let d="value"===r?p:M(p);if(o.attrName=l,o.attrValue=d,o.keepAttr=!0,o.forceKeepAttr=void 0,Tt(V.uponSanitizeAttribute,e,o),d=o.attrValue,!Be||"id"!==l&&"name"!==l||(vt(r,e),d="user-content-"+d),Pe&&F(/((--!?|])>)|<\/(style|title)/i,d)){vt(r,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){vt(r,e);continue}if(!Ie&&F(/\/>/i,d)){vt(r,e);continue}qe&&E([W,se,ce],(e=>{d=D(d,e," ")}));const u=ut(e.nodeName);if(Ct(u,l,d)){if(x&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(s);else switch(h.getAttributeType(u,l)){case"TrustedHTML":d=x.createHTML(d);break;case"TrustedScriptURL":d=x.createScriptURL(d)}if(d!==p)try{s?e.setAttributeNS(s,r,d):e.setAttribute(r,d),St(e)?yt(e):N(n.removed)}catch(t){vt(r,e)}}else vt(r,e)}Tt(V.afterSanitizeAttributes,e,null)},Et=function e(t){let n=null;const o=xt(t);for(Tt(V.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Tt(V.uponSanitizeShadowNode,n,null),$t(n),Lt(n),n.content instanceof r&&e(n.content);Tt(V.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,i=null,s=null,l=null;if(at=!e,at&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw z("toString is not a function");if("string"!=typeof(e=e.toString()))throw z("dirty is not a string, aborting")}if(!n.isSupported)return e;if(De||ft(t),n.removed=[],"string"==typeof e&&(Ge=!1),Ge){if(e.nodeName){const t=ut(e.nodeName);if(!_e[t]||Le[t])throw z("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)o=kt("\x3c!----\x3e"),i=o.ownerDocument.importNode(e,!0),i.nodeType===we&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!Me&&!qe&&!je&&-1===e.indexOf("<"))return x&&Fe?x.createHTML(e):e;if(o=kt(e),!o)return Me?null:Fe?S:""}o&&Ue&&yt(o.firstChild);const p=xt(Ge?e:o);for(;s=p.nextNode();)$t(s),Lt(s),s.content instanceof r&&Et(s.content);if(Ge)return e;if(Me){if(He)for(l=R.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return($e.shadowroot||$e.shadowrootmode)&&(l=B.call(a,l,!0)),l}let d=je?o.outerHTML:o.innerHTML;return je&&_e["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&F(ge,o.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+d),qe&&E([W,se,ce],(e=>{d=D(d,e," ")})),x&&Fe?x.createHTML(d):d},n.setConfig=function(){ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),De=!0},n.clearConfig=function(){mt=null,De=!1},n.isValidAttribute=function(e,t,n){mt||ft({});const o=ut(e),a=ut(t);return Ct(o,a,n)},n.addHook=function(e,t){"function"==typeof t&&O(V[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=A(V[e],t);return-1===n?void 0:I(V[e],n,1)[0]}return N(V[e])},n.removeHooks=function(e){V[e]=[]},n.removeAllHooks=function(){V={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const{isArray:Te}=Array,{getPrototypeOf:$e,getOwnPropertyDescriptor:Ce}=Object,Re=[],Le=()=>document.createRange(),Ee=(e,t,n)=>(e.set(t,n),n),Ae=(e,t)=>t.reduceRight(Ne,e),Ne=(e,t)=>e.childNodes[t],{setPrototypeOf:Oe}=Object;let Ie;const qe=(e,t,n)=>(Ie||(Ie=Le()),n?Ie.setStartAfter(e):Ie.setStartBefore(e),Ie.setEndAfter(t),Ie.deleteContents(),e),Pe=({firstChild:e,lastChild:t},n)=>qe(e,t,n);let je=!1;const De=(e,t)=>je&&11===e.nodeType?1/t<0?t?Pe(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,Ue=e=>document.createComment(e);class Me extends((e=>{function t(e){return Oe(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=Ue("<>");#t=Ue("</>");#n=Re;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),je=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){Pe(this,!1)}replaceWith(e){Pe(this,!0).replaceWith(e)}valueOf(){const{parentNode:e}=this;if(e===this)this.#n===Re&&(this.#n=[...this.childNodes]);else{if(e){let{firstChild:e,lastChild:t}=this;for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling)}this.replaceChildren(...this.#n)}return this}}const He=(e,t,n)=>e.setAttribute(t,n),Fe=(e,t)=>e.removeAttribute(t);let ze;const Be=(e,t,n)=>{n=n.slice(1),ze||(ze=new WeakMap);const o=ze.get(e)||Ee(ze,e,{});let a=o[n];return a&&a[0]&&e.removeEventListener(n,...a),a=Te(t)?t:[t,!1],o[n]=a,a[0]&&e.addEventListener(n,...a),t},Ve=(new WeakMap,(e,t)=>{const{t:n,n:o}=e;let a=!1;switch(typeof t){case"object":if(null!==t){(o||n).replaceWith(e.n=t.valueOf());break}case"undefined":a=!0;default:n.data=a?"":t,o&&(e.n=null,o.replaceWith(n))}return t}),Ge=(e,t,n)=>e[n]=t,We=(e,t,n)=>Ge(e,t,n.slice(1)),Je=(e,t,n)=>null==t?(Fe(e,n),t):Ge(e,t,n),Ye=(e,t)=>("function"==typeof t?t(e):t.current=e,t),Ke=(e,t,n)=>(null==t?Fe(e,n):He(e,n,t),t),Xe=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),Ze=(e,t,n)=>{const{length:o}=t;if(e.data=`[${o}]`,o)return((e,t,n,o,a)=>{const i=n.length;let r=t.length,s=i,c=0,l=0,p=null;for(;c<r||l<s;)if(r===c){const t=s<i?l?o(n[l-1],-0).nextSibling:o(n[s],0):a;for(;l<s;)e.insertBefore(o(n[l++],1),t)}else if(s===l)for(;c<r;)p&&p.has(t[c])||e.removeChild(o(t[c],-1)),c++;else if(t[c]===n[l])c++,l++;else if(t[r-1]===n[s-1])r--,s--;else if(t[c]===n[s-1]&&n[l]===t[r-1]){const a=o(t[--r],-0).nextSibling;e.insertBefore(o(n[l++],1),o(t[c++],-0).nextSibling),e.insertBefore(o(n[--s],1),a),t[r]=n[s]}else{if(!p){p=new Map;let e=l;for(;e<s;)p.set(n[e],e++)}if(p.has(t[c])){const a=p.get(t[c]);if(l<a&&a<s){let i=c,d=1;for(;++i<r&&i<s&&p.get(t[i])===a+d;)d++;if(d>a-l){const i=o(t[c],0);for(;l<a;)e.insertBefore(o(n[l++],1),i)}else e.replaceChild(o(n[l++],1),o(t[c++],-1))}else c++}else e.removeChild(o(t[c++],-1))}return n})(e.parentNode,n,t,De,e);switch(n.length){case 1:n[0].remove();case 0:break;default:qe(De(n[0],0),De(n.at(-1),-0),!1)}return Re},Qe=new Map([["aria",(e,t)=>{for(const n in t){const o=t[n],a="role"===n?n:`aria-${n}`;null==o?Fe(e,a):He(e,a,o)}return t}],["class",(e,t)=>Je(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",Ye],["style",(e,t)=>null==t?Je(e,t,"style"):Ge(e.style,t,"cssText")]]),et=(e,t,n)=>{switch(t[0]){case".":return We;case"?":return Xe;case"@":return Be;default:return n||"ownerSVGElement"in e?"ref"===t?Ye:Ke:Qe.get(t)||(t in e?t.startsWith("on")?Ge:((e,t)=>{let n;do{n=Ce(e,t)}while(!n&&(e=$e(e)));return n})(e,t)?.set?Je:Ke:Ke)}},tt=(e,t)=>(e.textContent=null==t?"":t,t),nt=(e,t,n)=>({a:e,b:t,c:n}),ot=()=>nt(null,null,Re),at=e=>(t,n)=>{const{a:o,b:a,c:i}=e(t,n),r=document.importNode(o,!0);let s=Re;if(a!==Re){s=[];for(let e,t,n=0;n<a.length;n++){const{a:o,b:i,c:u}=a[n],m=o===t?e:e=Ae(r,t=o);s[n]=(c=i,l=m,p=u,d=i===Ze?[]:i===Ve?ot():null,{v:Re,u:c,t:l,n:p,c:d})}}var c,l,p,d;return((e,t)=>({b:e,c:t}))(i?r.firstChild:new Me(r),s)},it=/^(?:plaintext|script|style|textarea|title|xmp)$/i,rt=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,st=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,ct=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,lt=/[\x01\x02]/g;let pt,dt,ut=document.createElement("template");const mt=(e,t)=>{if(t)return pt||(pt=document.createElementNS("http://www.w3.org/2000/svg","svg"),dt=Le(),dt.selectNodeContents(pt)),dt.createContextualFragment(e);ut.innerHTML=e;const{content:n}=ut;return ut=ut.cloneNode(!1),n},ht=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},gt=()=>document.createTextNode(""),ft=(e,t,n)=>{const o=mt(((e,t,n)=>{let o=0;return e.join("").trim().replace(st,((e,t,o,a)=>`<${t}${o.replace(ct,"=$2$1").trimEnd()}${a?n||rt.test(t)?" /":`></${t}`:""}>`)).replace(lt,(e=>""===e?`\x3c!--${t+o++}--\x3e`:t+o++))})(e,wt,n),n),{length:a}=e;let i=Re;if(a>1){const e=[],r=document.createTreeWalker(o,129);let s=0,c=`${wt}${s++}`;for(i=[];s<a;){const o=r.nextNode();if(8===o.nodeType){if(o.data===c){const n=Te(t[s-1])?Ze:Ve;n===Ve&&e.push(o),i.push(nt(ht(o),n,null)),c=`${wt}${s++}`}}else{let e;for(;o.hasAttribute(c);){e||(e=ht(o));const t=o.getAttribute(c);i.push(nt(e,et(o,t,n),t)),Fe(o,c),c=`${wt}${s++}`}!n&&it.test(o.localName)&&o.textContent.trim()===`\x3c!--${c}--\x3e`&&(i.push(nt(e||ht(o),tt,null)),c=`${wt}${s++}`)}}for(s=0;s<e.length;s++)e[s].replaceWith(gt())}const{childNodes:r}=o;let{length:s}=r;return s<1?(s=1,o.appendChild(gt())):1===s&&1!==a&&1!==r[0].nodeType&&(s=0),Ee(bt,e,nt(o,i,1===s))},bt=new WeakMap,wt="isµ",yt=e=>(t,n)=>bt.get(t)||ft(t,n,e),vt=at(yt(!1)),kt=at(yt(!0)),xt=(e,{s:t,t:n,v:o})=>{if(e.a!==n){const{b:a,c:i}=(t?kt:vt)(n,o);e.a=n,e.b=a,e.c=i}for(let{c:t}=e,n=0;n<t.length;n++){const e=o[n],a=t[n];switch(a.u){case Ze:a.v=Ze(a.t,St(a.c,e),a.v);break;case Ve:const t=e instanceof _t?xt(a.c||(a.c=ot()),e):(a.c=null,e);t!==a.v&&(a.v=Ve(a,t));break;default:e!==a.v&&(a.v=a.u(a.t,e,a.n,a.v))}}return e.b},St=(e,t)=>{let n=0,{length:o}=t;for(o<e.length&&e.splice(o);n<o;n++){const o=t[n];o instanceof _t?t[n]=xt(e[n]||(e[n]=ot()),o):e[n]=null}return t};class _t{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=ot()){return xt(e,this)}}new WeakMap;const Tt=e=>(t,...n)=>new _t(e,t,n),$t=Tt(!1);Tt(!0);n(135);const{Hints:Ct,RUNTIME:Rt}=t,Lt={},Et=e=>(...t)=>new Promise(((n,o)=>{try{e(...t,n)}catch(e){o(e)}}));Lt.promisify=Et;const At=Et(Rt);Lt.runtime=At,Lt.orgCapture=()=>{let e=location.href="org-protocol://capture?"+new URLSearchParams({template:"x",url:window.location.href,title:document.title,body:window.getSelection()});f.debug(e),t.Front.showBanner("Org Captured!")},Lt.document2markdown=async()=>{try{for(!async function(){var e=document.createElement("script");e.type="module",e.src="data:text/javascript;base64,"+btoa("\n import ky from 'https://unpkg.com/ky/distribution/index.js';\n window.ky = ky;\n console.log('Ky has been loaded.');\n "),document.head.appendChild(e)}();!window.ky;)await new Promise((e=>setTimeout(e,100)));const e=document.documentElement.outerHTML;f.info(e);let t=window.ky.post("https://api.html-to-markdown.com/v1/convert",{headers:{"X-API-Key":"html2md_WpHoiu1hKtt_Bt5TG7WCpUsompYSWxtVtFs4UhsnNsNqeK5WTipKhbb9_7eT7WtfD4sP2N3vk9FJfq9pJzfeRK7kae7xo6inAFgh3","Content-Type":"application/json"},json:{html:e}});const n=await t.json();f.info(n);return n.markdown}catch(e){return f.error(e),""}},Lt.runtimeHttpRequest=async(e,t)=>(await At("request",{...t,url:e})).text,Lt.getURLPath=({count:e=0,domain:t=!1}={})=>{let n=window.location.pathname.slice(1);return e&&(n=n.split("/").slice(0,e).join("/")),t&&(n=`${window.location.hostname}/${n}`),n},Lt.getMap=(e,t)=>t.split("").reduce(((e,t)=>e[t]||e),e.mappings).meta||null,Lt.escapeHTML=e=>{const t=document.createElement("span");return t.textContent=e,t.innerHTML};const Nt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};Lt.escapeForAlias=e=>String(e).replace(/[&<>"'`=/]/g,(e=>Nt[e])),Lt.escapeRegExp=e=>e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),Lt.until=(e,t=(e=>e),n=50,o=50)=>new Promise(((a,i)=>{const r=(s=0)=>{const c=e();t(c)?a(c):s>n?i(new Error("until: timeout")):setTimeout((()=>r(s+1)),o)};r()}));const[Ot,It]=(()=>{if("undefined"!=typeof browser)return[browser.storage.local.get,browser.storage.local.set];if("undefined"!=typeof chrome)return[chrome.storage.local.get,chrome.storage.local.set].map((e=>Lt.promisify(e.bind(chrome.storage.local))));const e=()=>new Error("local storage unavailable: unsupported environment");return[e,e]})();Lt.localStorage={},Lt.localStorage.fullkey=e=>`surfingkeys-conf.${e}`,Lt.localStorage.get=async e=>{const t=Lt.localStorage.fullkey(e);return(await Ot(t))[t]},Lt.localStorage.set=async(e,t)=>{const n=Lt.localStorage.fullkey(e);return It({[n]:t})},Lt.getElement=e=>t.getClickableElements(e)[0],Lt.dispatchMouseClicks=(e=[])=>new Set(e.map((e=>e.href))).forEach((e=>t.RUNTIME("openLink",{tab:{tabbed:!0,active:!1},url:e}))),Lt.darkReaderEnabled=()=>document.querySelector("style.darkreader")||document.querySelector("style#dark-reader-style"),Lt.htmlUnsafe=e=>$t.node([e]),Lt.htmlPurify=(e,t={USE_PROFILES:{html:!0}})=>Lt.htmlUnsafe(_e.sanitize(e,t)),Lt.htmlNode=(e,...t)=>$t.node(e,...t),Lt.htmlForEach=e=>e.map((e=>$t.for(e)`${e}`)),Lt.html=(e,...t)=>Lt.htmlNode(e,...t).outerHTML,Lt.suggestionItem=(e={})=>(t,...n)=>({html:Lt.html(t,...n),props:e}),Lt.createSuggestionItem=(e,t={})=>{const n=document.createElement("li");return n.innerHTML=e,{html:n.outerHTML,props:t}},Lt.urlItem=(e,t,{desc:n=null,query:o=null}={})=>{const a=n&&n.length>0?(Array.isArray(n)?n:[n]).map((e=>Lt.htmlNode`<div>${e}</div>`)):[];return Lt.suggestionItem({url:t,query:o??e})` | |
<div> | |
<div style="font-weight: bold">${e}</div> | |
${Lt.htmlForEach(a)} | |
<div style="opacity: 0.7; line-height: 1.3em">${t}</div> | |
</div> | |
`},Lt.elementExists=e=>null!==document.querySelector(e),Lt.defaultSelector="a[href]:not([href^=javascript])",Lt.querySelectorFiltered=(e=Lt.defaultSelector,t=(()=>!0))=>[...document.querySelectorAll(e)].filter(t),Lt.createHints=(e=Lt.defaultSelector,t=Ct.dispatchMouseClick,n={})=>new Promise((o=>{Ct.create(e,((...e)=>{o(...e),"function"==typeof t&&t(...e)}),n)})),Lt.createHintsFiltered=(e,t,...n)=>{Lt.createHints(Lt.querySelectorFiltered(t,e),...n)},Lt.isRectVisibleInViewport=e=>e.height>0&&e.width>0&&e.bottom>=0&&e.right>=0&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth),Lt.isElementInViewport=e=>e.offsetHeight>0&&e.offsetWidth>0&&!e.getAttribute("disabled")&&Lt.isRectVisibleInViewport(e.getBoundingClientRect()),Lt.getDuckduckgoFaviconUrl=e=>{const t=e instanceof URL?e:new URL(e);return new URL(`https://icons.duckduckgo.com/ip3/${t.hostname}.ico`).href},Lt.calculateAngle=(e,t,n,o)=>{const a=n-e,i=o-t,r=Math.acos(a/Math.sqrt(a*a+i*i));return i<0?-r:r},Lt.prettyDate=e=>{const t=((new Date).getTime()-e.getTime())/1e3,n=Math.floor(t/86400);if(Number.isNaN(n)||n<0)return"";const[o,a]=0===n&&(t<60&&[null,"just now"]||t<3600&&[Math.floor(t/60),"minute"]||t<86400&&[Math.floor(t/3600),"hour"])||1===n&&[null,"yesterday"]||n<7&&[n,"day"]||n<30&&[Math.round(n/7),"week"]||n<365&&[Math.round(n/30),"month"]||[Math.round(n/365),"year"];return`${o??""}${o?" ":""}${a}${(o??0)>1?"s":""}${o?" ago":""}`};Lt.cleanupUrl=()=>{let e=document.title;const t=location.href,n=location.hostname,o=location.pathname;let a="";if(n.includes("www.alfredforum.com")&&(e=e.replace("- Discussion & Help - Alfred App Community Forum","")),"github.com"===n){const t=/pull\/\d+$/;if(/issues\/\d+$/.test(o)){const t=/\/(.*)\/issues\/(\d+)$/.exec(o),[,n,a]=t;e=`${n}#${a}`}else if(t.test(o)){const t=/\/(.*)\/pull\/(\d+)$/.exec(o),[,n,a]=t;e=`${n} PR #${a}`}else{const e=document.querySelector("#repo-stars-counter-star"),t=e&&e.innerText.trim()||"0";a=t.endsWith("k")||parseInt(t)>99?`${t}★ `:""}}return`${a}[${e}](${((e,t=!0)=>/http[^#\?]*/.exec(e)[0])(t,doCleanup)})`},Lt.oudentParentTab=()=>{browser.runtime.sendMessage(tstId,{type:"outdent",tab:"current"})},Lt.sendKey=(e,t,n,o=10)=>{const a={...{key:e,code:t,bubbles:!0,cancelable:!0,composed:!0,view:window},keyCode:n,which:n},i=new KeyboardEvent("keydown",a);document.body.dispatchEvent(i),setTimeout((()=>{const e=new KeyboardEvent("keyup",a);document.body.dispatchEvent(e)}),o)},Lt.html=(e,...t)=>String.raw({raw:e},...t),Lt.css=(e,...t)=>String.raw({raw:e},...t),Lt.searchResult=e=>{const t="imgHtml"in e?e.imgHtml:e.img?$t`<img class="thumb" alt="thumbnail" src="${e.img}" />`:"",n=e.description?$t`<div>${e.description}</div>`:"",o=e.timestamp?$t`<div class="url"> | |
<div>${e.url}</div> | |
<span class="omnibar_timestamp"># ${e.timestamp}</div> | |
</div>`:$t`<div class="url">${e.url}</div>`;return $t` <div class="result"> | |
${t} | |
<div> | |
<div class="title">${e.title}</div> | |
<div>${n} ${o}</div> | |
</div> | |
</div>`},Lt.githubCommitInPullRequestTitle=()=>{const e=document.getElementsByClassName("commit-title")?.[0]?.innerText;if("string"==typeof e&&document.location.pathname.split("/").includes("pull")&&!document.title.includes(e))return`${e} · ${document.title}`},Lt.getVisibleElements=e=>{let t=Array.from(document.documentElement.getElementsByTagName("*"));const n=[];for(let a=0;a<t.length;a++){const i=t[a];if(i.shadowRoot){const e=i.shadowRoot.querySelectorAll("*");for(let n=0;n<e.length;n++)t.push(e[n])}var o=i.getBoundingClientRect();o.top<=window.innerHeight&&o.bottom>=0&&o.left<=window.innerWidth&&o.right>=0&&o.height>0&&e(i,n)}return n},Lt.isEditable=e=>e&&!e.disabled&&("textarea"===e.localName||"select"===e.localName||e.isContentEditable||"input"===e.localName&&/^(?!button|checkbox|file|hidden|image|radio|reset|submit)/i.test(e.type)),Lt.tabActivateOrCreate=(e,n=void 0)=>{t.RUNTIME("getTabs",{queryInfo:{url:e,currentWindow:!0}},(({tabs:o})=>{if(!Array.isArray(o))throw new Error(`tabs is not Array: ${JSON.stringify(o)}`);const a=o?.[0]?.id;null!=a?t.RUNTIME("focusTab",{tabId:a}):t.RUNTIME("openLink",{url:n??e})}))},Lt.getTwitterEmbed=async e=>{if("twitter.com"!==e.hostname&&"mobile.twitter.com"!==e.hostname&&"x.com"!==e.hostname||!/^\/\w+\/status\/\d+/.exec(e.pathname))return;const t=new URL("https://publish.twitter.com/oembed");t.searchParams.set("url",e.href),t.searchParams.set("omit_script","t"),t.searchParams.set("lang",navigator.language||"en");const n=await fetch(t.href);if(!n.ok)throw new Error(`${t.href}: response is not ok ${JSON.stringify(n.statusText)}`);return(await n.json()).html},Lt.getCssSelectorsOfEditableText=()=>[`input:not(${["button","checkbox","color","date","datetime-local","file","image","radio","range","reset","submit"].map((e=>`input[type=${e}]`)).join(", ")})`,"textarea","*[contenteditable=true]","*[role=textbox]","select","div.ace_cursor"].join(", "),Lt.scrollToSmooth=e=>{window.scrollTo({top:e,left:0,behavior:"smooth"})},Lt.scrollBySmooth=(e,t=1)=>{window.scrollTo({top:window.scrollY+t*e,left:0,behavior:"smooth"})};const qt=Lt,{tabOpenLink:Pt,open:jt,Front:Dt,Hints:Ut,Normal:Mt,RUNTIME:Ht,Clipboard:Ft,mapkey:zt}=t,Bt={openFireship:()=>Pt("https://fireship.io/courses"),openCodeCrafters:()=>Pt("https://app.codecrafters.io/catalog"),openDuolingo:()=>Pt("https://www.duolingo.com/"),openLeetCode:()=>Pt("https://leetcode.com/problemset/all/'"),openIFTTT:()=>Pt("https://ifttt.com/explore"),openTwitter:()=>qt.tabActivateOrCreate("https://x.com"),openGrok:()=>Pt("https://x.com/i/grok"),openFastGPT:()=>Pt("https://kagi.com/fastgpt"),openPipedream:()=>Pt("https://pipedream.com/@nicoandmemes/projects"),openHackerNews:()=>Pt("https://insin.github.io/react-hn/#/news"),openSnippetGenerator:()=>Pt("https://vscodesnippetgenerator.azurewebsites.net/"),openSourcegraph:()=>Pt("https://sourcegraph.com/search"),openCodyChat:()=>Pt("https://cody.sourcegraph.com/chat"),openSavedSearch:()=>Pt("https://sourcegraph.com/saved-searches"),openUserStyles:()=>Pt("https://userstyles.world/"),openReadwiseReader:()=>Pt("https://read.readwise.io/new"),openRaycastStore:()=>Pt("https://raycast.com/store"),openRaindrop:()=>Pt("https://app.raindrop.io/my/-1"),openStylus:()=>{"Chrome"===t.getBrowserName()?Pt("https://chromewebstore.google.com/detail/stylus-beta/apmmpaebfobifelkijhaljbmpcgbjbdo"):"Firefox"===t.getBrowserName()&&Pt("moz-extension://f82cebdf-ac3a-4fb1-b48b-b5df266cfb6c/manage.html#stylus-options")},openAFineStart:()=>{"Chrome"===t.getBrowserName()?Pt("chrome-extension://kcgjmjiklcchbhljelchjdpoooccmhcn/bookmarks/index.html"):"Firefox"===t.getBrowserName()&&Pt("moz-extension://26276c35-3a6b-4cf5-84bf-24e3152003c1/bookmarks/index.html")},openTobyMini:()=>{"Chrome"===t.getBrowserName()?Pt("chrome-extension://gfdcgfhkelkdmglklfbndgopaihmoeci/toby.html"):"Firefox"===t.getBrowserName()&&Pt("moz-extension://59b912fc-f318-419e-99a7-76469dc200ce/toby.html")},openOneTab:()=>{"Chrome"===t.getBrowserName()?Pt("chrome-extension://chphlpgkkbolifaimnlloiipkdnihall/onetab.html"):Pt("moz-extension://59b912fc-f318-419e-99a7-76469dc200ce/onetab.html")},openProxySwitchOmega:()=>{"Chrome"===t.getBrowserName()?Pt("chrome-extension://padekgcemlokbadohgkifijomclgjgif/options.html"):Pt("moz-extension://f1f9076e-23c8-496e-a9c3-205956daadbc/options.html")},toggleActiveEnv:()=>{const e=window.location.href,t=e.startsWith("https://lobste.rs/")?"http://localhost:3000/":"https://lobste.rs/";window.location.href=t+e.split("/").slice(3).join("/")},openChromeShortcuts:()=>Pt("chrome://extensions/shortcuts/"),openChromeFlags:()=>Pt("chrome://flags/"),openChromeSettings:()=>Pt("chrome://settings/"),openChromeHistory:()=>Pt("chrome://history/"),closeDownloadsShelf:()=>t.RUNTIME("closeDownloadsShelf",{clearHistory:!0}),openMozillaAddons:()=>Pt("https://addons.mozilla.org/en-US/firefox/"),openMozillaSettings:()=>Pt("about:preferences"),openWorkEmail:()=>Pt("https://mail.google.com/mail/u/1/#inbox"),openPersonalEmail:()=>Pt("https://mail.google.com/mail/u/0/#inbox"),openLegacyEmail:()=>Pt("https://mail.google.com/mail/u/3/#inbox"),openStoryAndComments:({story:e,link:t,comments:n}={})=>{Ut.create(e,(e=>{qt.dispatchMouseClicks([qt.getElement(`*[id="${e.id}"] ${t}`),qt.getElement(`*[id="${e.id}"] ${n}`)])}))},moveTabNextToTab:(e,t,n=!1)=>browser.tabs.move(e,{windowId:t.windowId,index:t.index-(n?1:0)}),dispatchEvents:(e,t,...n)=>n.forEach((n=>{const o=document.createEvent(e);o.initEvent(n,!0,!0),t.dispatchEvent(o)}))};Bt.dispatchMouseEvents=Bt.dispatchEvents.bind(void 0,["MouseEvents"]),Bt.scrollToHash=(e=null)=>{const t=(e||document.location.hash).replace("#",""),n=document.getElementById(t)||document.querySelector(`[name="${t}"]`);n&&n.scrollIntoView({behavior:"smooth"})},Bt.displayPasswords=()=>{[...document.querySelectorAll("input[type=password]")].forEach((e=>{e.setAttribute("type","text")}))},Bt.openLocalHost=()=>{const e=[9222,9706].map((e=>({title:`localhost:${e}`,url:`http://localhost:${e}`})));Dt.openOmnibar({type:"UserURLs",extra:e})},Bt.showSquirt=()=>{const e=document.createElement("script");e.innerHTML='(() => {\n const sq = window.sq || {}\n window.sq = sq\n if (sq.script) {\n sq.again()\n } else if (sq.context !== "inner") {\n sq.bookmarkletVersion = "0.3.0"\n sq.iframeQueryParams = { host: "//squirt.io" }\n sq.script = document.createElement("script")\n sq.script.src = `${sq.iframeQueryParams.host}/bookmarklet/frame.outer.js`\n document.body.appendChild(sq.script)\n }\n })()',document.body.appendChild(e)},Bt.injectUtilLibs=()=>{Bt.injectConsola(),Bt.injectKy(),console.dir(window.ky,{depth:null}),Bt.injectTldts(),console.dir(window.tldts,{depth:null}),Bt.injectDateFns(),console.dir(window.dateFns,{depth:null}),Bt.injectRamda(),console.dir(window.R,{depth:null}),Bt.injectLodash(),console.dir(window._,{depth:null}),Bt.injectNanoid(),console.dir(window.nanoid,{depth:null}),t.Front.showBanner("Utility libraries injected ✔️")},Bt.injectNanoid=()=>{!async function(){var e=document.createElement("script");e.type="module",e.src="data:text/javascript;base64,"+btoa("\n import { nanoid } from 'https://cdn.jsdelivr.net/npm/nanoid@4/nanoid.min.js'\n window.nanoid = nanoid\n console.log('Nanoid has been loaded.');\n "),document.head.appendChild(e)}(),t.Front.showBanner("Nanoid has been loaded ✔️")},Bt.injectDateFns=()=>{!async function(){var e=document.createElement("script");e.type="module",e.src="data:text/javascript;base64,"+btoa("\n import * as dateFns from 'https://cdn.jsdelivr.net/npm/date-fns@2/esm/index.js'\n window.dateFns = dateFns\n console.log('date-fns has been loaded.');\n "),document.head.appendChild(e)}()},Bt.injectRamda=()=>{!async function(){var e=document.createElement("script");e.type="module",e.src="data:text/javascript;base64,"+btoa("\n import R from 'https://cdn.jsdelivr.net/ramda/latest/ramda.min.js';\n window.R = R;\n console.log('Ramda has been loaded.');\n "),document.head.appendChild(e)}()},Bt.injectClipboard=()=>{var e;(e=document.createElement("script")).src="https://unpkg.com/clipboard@2/dist/clipboard.min.js",document.head.appendChild(e),f.info("Clipboard has been loaded ✔️")},Bt.injectConsola=()=>{!async function(){var e=document.createElement("script");e.type="module",e.src="data:text/javascript;base64,"+btoa("\n import consola from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'\n window.consola = consola\n console.log('consola has been loaded.');\n "),document.head.appendChild(e)}()},Bt.injectDebug=()=>{!async function(){var e=document.createElement("script");e.type="module",e.src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cjs/rx-error.min.js",document.head.appendChild(e)}()},Bt.injectTldts=()=>{!async function(){var e=document.createElement("script");e.type="module",e.src="data:text/javascript;base64,"+btoa("\n import tldts from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'\n consola.debug(tldts)\n\n window.tldts = tldts\n console.log('tldts has been loaded.');\n "),document.head.appendChild(e)}()},Bt.injectSuperagent=()=>{!async function(){var e=document.createElement("script");e.src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=WeakRef,BigInt",document.head.appendChild(e);var t=document.createElement("script");t.src="https://cdn.jsdelivr.net/npm/superagent",document.head.appendChild(t),window.superagent=superagent,superagent.post("https://eo5jfywxitfdre.m.pipedream.net").send({ts:Date.now()}).set("accept","json").end((function(e,t){f.error(e,t)}))}()},Bt.injectCryptoJS=()=>{!async function(){var e=document.createElement("script");e.src="",document.head.appendChild(e)}()},Bt.injectLodash=()=>{!async function(){var e=document.createElement("script");e.type="module",e.src="data:text/javascript;base64,"+btoa("\n import lodash from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'\n window._ = lodash\n console.log('lodash has been loaded.');\n "),document.head.appendChild(e)}()},Bt.injectKy=()=>{!async function(){var e=document.createElement("script");e.type="module",e.src="data:text/javascript;base64,"+btoa("\n import ky from 'https://unpkg.com/ky/distribution/index.js';\n window.ky = ky;\n console.log('Ky has been loaded.');\n "),document.head.appendChild(e)}()},Bt.tabActivateOrCreate=e=>{Ht("getTabs",{queryInfo:{url:e,currentWindow:!0}},(({tabs:t})=>{if(!Array.isArray(t))throw new Error(`tabs is not Array: ${JSON.stringify(t)}`);const n=t?.[0]?.id;null!=n?Ht("focusTab",{tabId:n}):Pt(e)}))},Bt.saveSessionAndQuit=()=>{Ht("createSession",{name:"LAST"}),Ht("quit")},Bt.restoreLastSession=()=>{Ht("openSession",{name:"LAST"})},Bt.restoreSession=e=>{Ht("openSession",{name:e})},Bt.createSession=e=>{Ht("createSession",{name:e})},Bt.getOrgLink=()=>`[[${window.location.href}][${document.title}]]`;const Vt={a:"https://aws.amazon.com/console",b:"https://bard.google.com",M:"https://mail.google.com",g:"https://www.goodreads.com",t:"https://twitter.com/search-home",p:"http://127.0.0.1:8000/playground",s:"http://stackoverflow.com"},Gt=function(e,t){const n="'"!==e,o=function(e,t){return function(){Ht("openLink",{tab:{tabbed:t},url:e})}};for(var a in t)f.info("qmark: "+t[a]),zt(e+a,"qmark: "+t[a],o(t[a],n))};Gt('"',Vt),Gt("'",Vt),Bt.jumpToVimMark=e=>{let n=Vt[e];if(void 0!==n)for(var o of("string"==typeof n&&(n=[n]),n)){var a={url:o,scrollLeft:0,scrollTop:0,tab:{tabbed:!1,active:!1}};t.RUNTIME("openLink",a)}else Mt.jumpVIMark(e,!0)},Bt.downloadImage=()=>{t.Hints.create("img",(function(e){chrome.downloads.download({url:e.src,saveAs:!0}),console.log(e)}))},Bt.getMarkdownLink=({title:e=document.title,href:t=window.location.href}={})=>`[${e}](${t})`,Bt.getPageTitle=()=>document.title.replace(/[\r\n]/g,"").trim(),Bt.editCurrentURLNeovimCurrentTab=()=>{Dt.showEditor(window.location.href,(function(e){window.location.href=e}),"url")};const Wt="http://centralops.net/co/DomainDossier.aspx";function Jt(e=!0){if(!window.location.href.includes("sourcegraph.com"))return;document.querySelector(".NewSearchContent-module__new-filters")&&document.querySelector(".NewSearchContent-module__new-filters").remove();const t=[...document.querySelectorAll("button, [type=button]")].filter((e=>["Hide preview","Preview"].includes(e.innerText.trim())));(()=>{const n=t.findIndex((e=>"Hide preview"===e.innerText.trim())),o=n+1,a=n-1;if(e&&o<t.length){t.at(o).click()}else if(!e&&a>=0){t.at(a).click()}})(),document.querySelector('div[aria-label="File sidebar"]').style.width="100%"}Bt.shodanUrl=({hostname:e=window.location.hostname}={})=>`https://www.shodan.io/host/${e}`,Bt.getWhoisUrl=({hostname:e=window.location.hostname}={})=>`${Wt}?dom_whois=true&addr=${e}`,Bt.getDnsInfoUrl=({hostname:e=window.location.hostname,all:t=!1}={})=>`${Wt}?dom_dns=true&addr=${e}${t?"?dom_whois=true&dom_dns=true&traceroute=true&net_whois=true&svc_scan=true":""}`,Bt.getGoogleCacheUrl=({href:e=window.location.href}={})=>`https://webcache.googleusercontent.com/search?q=cache:${e}`,Bt.get12ftUrl=({href:e=window.location.href}={})=>`https://12ft.io/${e}`,Bt.getWaybackUrl=({href:e=window.location.href}={})=>`https://web.archive.org/web/*/${e}`,Bt.getSummaryUrl=({href:e=window.location.href}={})=>`https://kagi.com/summarizer/index.html?${new URLSearchParams({url:e})}`,Bt.goToEditTextBox=()=>{Ut.setCharacters(hintsCharactersAll),Ut.create(qt.getCssSelectorsOfEditableText(),Ut.dispatchMouseClick)},Bt.instantHTMLPreview=()=>{try{navigator.clipboard.readText().then((function(e){if(e){var t=window.open("","_blank","width=800,height=600");t.document.open(),t.document.write(e),t.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")})).catch((function(e){console.error("Failed to read clipboard contents: ",e),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")}))}catch(e){console.error("An error occurred:",e),alert("An error occurred while trying to open the new window with the clipboard content.")}},Bt.openAnchor=({newTab:e=!1,active:t=!0,prop:n="href"}={})=>o=>Bt.openLink(o[n],{newTab:e,active:t}),Bt.openLink=(e,{newTab:t=!1,active:n=!0}={})=>{t?Ht("openLink",{tab:{tabbed:!0,active:n},url:e instanceof URL?e.href:e}):window.location.assign(e)},Bt.copyLastElementInURL=()=>{const e=window.location.href.split("/"),n=e[e.length-1].split("#")[0].split("?")[0];n?(t.Clipboard.write(n),t.Front.showBanner(`Copied ${n} to the clipboard.`)):t.Front.showBanner("No last element was found.")},Bt.editSettings=()=>Pt(chrome.extension.getURL("/pages/options.html")),Bt.openNeovim=()=>Pt(chrome.extension.getURL("/pages/neovim.html")),Bt.login=()=>{const e=t.getClickableElements("a, button",conf.loginLinkRegex);return e=qt.filterOverlapElements(e),!!e.length&&(t.clickOn(e),!0)},Bt.displayDateTime=()=>{const e=e=>String(e).padStart(2,"0"),n=new Date,o=`${e(n.getMonth()+1)}月${e(n.getDate())}日(${["Mon","Tue","Wed","Thu","Fri","Sat","Sun"][n.getDay()]}) ${e(n.getHours())}:${e(n.getMinutes())}`;t.Front.showPopup(o)},Bt.followInoreader=()=>{},Bt.toThings=({href:e=window.location.href}={})=>{const n=document.title,o=`Link:${e}`;window.open(`things:///add?title=${n}¬es=${o}&list=Backlog&heading=Someday&show-quick-entry=true&reveal=true&tags=${["web"].join(",")}`,"_blank"),t.Front.showBanner("Sent to Things: "+o)},Bt.addLinkToThings=e=>{const{selectionText:n,linkUrl:o}=e;window.open(`things:///add?title=${n}&show-quick-entry=true¬es=Link:${o}`,"_blank"),t.Front.showBanner("Sent to Things: "+n)},Bt.addToAnyBox=({href:e=window.location.href}={})=>{window.open(`anybox://download?url=${encodeURIComponent(e)}`,"_blank"),t.Front.showBanner("Saved tab to AnyBox: "+e)},Bt.addToRaindrop=({href:e=window.location.href}={})=>{const t=parseInt(screen.width/2-225),n=parseInt(screen.height/2-300);window.open("https://app.raindrop.io/add?link="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title),"raindrop-save","width=450,height=600,resizable=yes,scrollbars=yes,status=false,location=false,toolbar=false,left="+t+",top="+n)},Bt.addToReadwise=({href:e=window.location.href}={})=>{const n=document.title.trim();window.open(`https://readwise.io/save?title=${encodeURIComponent(n)}&url=${encodeURIComponent(e)}`,"_blank"),t.Front.showBanner("Saved page to Readwise: "+n+" "+e)},Bt.copyCurrentURLToObsidian=()=>{const e=new URL(window.location.href);const n=`[${window.document.title.replace(/(<|>)/g,"\\$1")}](${e.href})`,o="obsidian://advanced-uri?vault=content&daily=true&mode=append&data="+n;window.open(o,"_blank"),t.Front.showBanner("Sent to Obsidian: "+n)},Bt.togglePdfViewer=()=>chrome.storage.local.get("noPdfViewer",(e=>{e.noPdfViewer?chrome.storage.local.remove("noPdfViewer",(()=>{Dt.showBanner("PDF viewer enabled.")})):chrome.storage.local.set({noPdfViewer:1},(()=>{Dt.showBanner("PDF viewer disabled.")}))})),Bt.previewLink=()=>{qt.createHints("a[href]",(e=>Dt.showEditor(e.href,(e=>Bt.openLink(e)),"url")))},Bt.scrollElement=(e,t)=>{Bt.dispatchMouseEvents(e,"mousedown"),Mt.scroll(t)},Bt.copyExtensionId=()=>{if(!window.location.hostname.includes("marketplace.visualstudio.com"))return;const e=new URL(window.location.href).searchParams.get("itemName");e&&(t.Clipboard.write(e),t.Front.showBanner(`Copied extension id [${e}] to the clipboard.`))},Bt.goToProjectRepository=()=>{const e=document.querySelector("a.githubLinks.repo-link");e&&Bt.openLink(e.href,{newTab:!0})},Bt.goToProjectIssues=()=>{const e=document.querySelector("div#overviewTab div.resources-async-div > div > ul > li:nth-child(1) > a");e&&e.innerText.trim().toLowerCase().includes("issues")&&Bt.openLink(e.href,{newTab:!0})},Bt.nixos={},Bt.nixos.prevPackage=()=>{let e=[...document.querySelectorAll("li.package")];if(0===e.length)return;const t=e.at(e.findIndex((e=>e.className.includes("opened")))-1);t&&(f.debug("prevEl",t,e),t.click())},Bt.nixos.nextPackage=()=>{let e=[...document.querySelectorAll("li.package")];if(0===e.length)return;const t=e.at(e.findIndex((e=>e.className.includes("opened")))+1);t&&(f.debug("nextEl",t,e),t.click())},Bt.nixos.copyFlakeInstallSnippet=()=>{const e=document.querySelector("pre.code-block.shell-command");if(3!==e.length)return;const n=e.map((e=>e.innerText)).at(1).split("\n").at(3);f.debug(`copyNixFlakeSnippet: ${n}`),n&&(t.Clipboard.write(n),t.Front.showBanner(`Copied ${n} to the clipboard.`))},Bt.poe={},Bt.poe.openBotPicker=()=>{const e=document.querySelector('textarea[placeholder="Start a new chat"]');e&&e.focus()},Bt.poe.openPromptPicker=()=>{},Bt.poe.copyLastResponse=()=>{const e=[...document.querySelectorAll("button")].filter((e=>e.innerText.includes("Copy")));0!==e.length&&e.at(-1).click()},Bt.anki={},Bt.anki.copyAddonId=()=>{const e=window.location.pathname.split("/").at(-1);t.Clipboard.write(e),t.Front.showBanner(`Copied addon id [${e}] to the clipboard.`)},Bt.copyImdbId=()=>{if(!window.location.hostname.includes("imdb.com"))return;const e=/imdb\.com\/title\/(tt\d+)/.exec(window.location.href);if(null===e||2!==e.length)return;const n=`imdb:${e[1]}`;t.Clipboard.write(n),t.Front.showBanner(`Copied title id [${n}] to the clipboard.`)},Bt.paginateIMDB=()=>{const e=document.querySelector("span.ipc-see-more__text");e&&(e.click(),setTimeout((()=>{Bt.paginateIMDB()}),1e3))},Bt.pypi={},Bt.pypi.goToHomepage=()=>{const e=document.querySelector(".vertical-tabs__tabs > .sidebar-section > .vertical-tabs__list .vertical-tabs__tab");e&&Bt.openLink(e.href,{newTab:!0})},Bt.pypi.copyInstallSnippet=()=>{const e=document.querySelector("span#pip-command");if(e){let n=e.innerText.trim();f.info(n),t.Clipboard.write(n),t.Front.showBanner(`Copied ${n} to the clipboard.`)}},Bt.copyTVDBId=()=>{if(!window.location.hostname.includes("thetvdb.com"))return;if(document.querySelector("div#series_basic_info li:nth-child(1) > span")){let e=document.querySelector("div#series_basic_info li:nth-child(1) > span").innerText;e=`tvdb:${e}`,t.Clipboard.write(e),t.Front.showBanner(`Copied series id [${e}] to the clipboard.`)}},Bt.npm={},Bt.npm.goToRepository=()=>{const e=document.querySelector('a[aria-labelledby="repository repository-link"]');e&&Bt.openLink(e.href,{newTab:!0})},Bt.npm.copyPackageName=()=>{const e=document.querySelector("h1.package-name-redundant")?.innerText.trim();e&&(t.Clipboard.write(e),t.Front.showBanner(`Copied package name [${e.innerText.trim()}] to the clipboard.`))},Bt.az={},Bt.az.viewProduct=()=>{const e=/^([-\w]+[.])*amazon.\w+$/,t=/^(?:.*\/)*(?:dp|gp\/product)(?:\/(\w{10})).*/,n={};document.querySelectorAll("a[href]").forEach((o=>{const a=new URL(o.href);if(0===a.hash.length&&e.test(a.hostname)){const e=t.exec(a.pathname);if(null===e||2!==e.length)return;if(!qt.isElementInViewport(o))return;const i=e[1];if(void 0!==n[i]&&!(0===n[i].text.trim().length&&o.text.trim().length>0))return;n[i]=o}})),Ut.create(Object.values(n),Ut.dispatchMouseClick)},Bt.aur={},Bt.aur.viewPkgbuild=()=>{const e=document.querySelector(".small > li:nth-child(1) > a:nth-child(1)");e&&Bt.openLink(e.href,{newTab:!0})},Bt.goToUpstream=()=>{const e=document.querySelector("tr:nth-child(4) a");console.debug(e),e&&Bt.openLink(e.href,{newTab:!0})},Bt.viewGodoc=()=>Bt.openLink(`https://godoc.org/${qt.getURLPath({count:2,domain:!0})}`,{newTab:!0}),Bt.sg={},Bt.sg.openSourcegraphFromExt=()=>{if("github.com"!==window.location.hostname&&"sourcegraph.com"!==window.location.hostname)return void alert(`This bookmarklet may only be used on GitHub.com or Sourcegraph.com, not ${window.location.hostname}.`);const e=[["^/([^/]+)/([^/]+)/tree/([^/]+)$","/github.com/$1/$2@$3","^/github.com/([^/]+)/([^/@]+)@([^/]+)$","/$1/$2/tree/$3"],["^/([^/]+)/([^/]+)/tree/([^/]+)/(.+)$","/github.com/$1/$2@$3/-/tree/$4","^/github.com/([^/]+)/([^/@]+)@([^/]+)/-/tree/(.+)$","/$1/$2/tree/$3/$4"],["^/([^/]+)/([^/]+)/blob/([^/]+)/(.+)$","/github.com/$1/$2@$3/-/blob/$4","",""],["^/([^/]+)/([^/]+)$","/github.com/$1/$2","^/github.com/([^/]+)/([^/]+)$","/$1/$2"],["^/([^/]+)$","/$1","^/([^/]+)$","/$1"]];let{pathname:t}=window.location;"sourcegraph.com"===window.location.hostname&&(0===t.indexOf("/sourcegraph.com/")?t=t.replace("/sourcegraph.com/","/github.com/"):0===t.indexOf("/sourcegraph/")&&(t=`/github.com${t}`));for(let a=0;a<e.length;a++){const i=e[a];if("github.com"===window.location.hostname){if(""===i[0])continue;var n=new RegExp(i[0]);if(t.match(n)){var o=t.replace(n,i[1]);return void(window.location=`https://sourcegraph.com${o}`)}}else{if(""===i[2])continue;n=new RegExp(i[2]);if(t.match(n)){o=t.replace(n,i[3]);return void(window.location=`https://github.com${o}`)}}}},Bt.sg.openGitHub=({newTab:e=!1}={})=>{const t=document.querySelector('a[aria-label="View on GitHub"]');t&&Bt.openLink(t.href,{newTab:e})},Bt.sg.copyRepoName=()=>{const e=document.querySelector('span[data-testid="repo-header"]');e&&(t.Clipboard.write(e.innerText.trim()),t.Front.showBanner(`Copied repo name [${e.innerText.trim()}] to the clipboard.`))},Bt.sg.saveSearchQuery=()=>{const e=(e=>{const t=new URL(e),n=t.searchParams.get("q");t.pathname.split("/").slice(1).join("/");return`https://sourcegraph.com/saved-searches/new?query=${n}&patternType=keyword&sm=0`})(window.location.href);Bt.actions.openLink(e,{newTab:!0,active:!1})},Bt.sg.getRawFile=()=>{let e=document.querySelector('a[aria-label="View on GitHub"]').href;e=e.replace("sourcegraph.com","github.com");const t=document.querySelector('a[data-value="Raw"]')?.href||e+"/raw/master/";console.debug(t),t&&Bt.openLink(t,{newTab:!0})},Bt.sg.viewOnGithub=()=>{const e=document.querySelector('a[aria-label="View on GitHub"]');e&&Bt.openLink(e.href,{newTab:!0})},Bt.sg.toggleHistoryView=()=>{const e=document.querySelector('button[aria-label="Open search history"]');e&&e.click()},Bt.sg.toggleSidebar=()=>{const e=document.querySelector('button[aria-label="Show sidebar"],button[aria-label="Hide sidebar"]');e&&e.click()},Bt.sg.prevNext=()=>{Jt(!0)},Bt.sg.prevPrev=()=>{Jt(!1)},Bt.sg.openPreviewed=()=>{let e=document.querySelector(".NewSearchContent-module__preview .AnchorLink-module__anchor-link");e&&Bt.openLink(e.href,{newTab:!0,active:!1})},Bt.sg.openCodeOnHost=()=>{let e=document.querySelector("a[id='go-to-code-host']");e&&Bt.openLink(e.href,{newTab:!1})},Bt.sg.openCommitsView=()=>{let e=document.querySelector('a[name="Commits"]');e&&Bt.openLink(e.href,{newTab:!1})},Bt.sg.toggleHistoryView=()=>{let e=document.querySelector('a[aria-label="Hide history (Alt+H/Opt+H)"],a[aria-label="Show history (Alt+H/Opt+H)"]');e&&e.click()},Bt.sg.openBranchesView=()=>{let e=[...document.querySelectorAll(".Button-module__btn-group a")].find((e=>e.textContent.trim().toLowerCase().includes("branches")));e&&Bt.openLink(e.href,{newTab:!1})},Bt.sg.openTagsView=()=>{let e=[...document.querySelectorAll(".Button-module__btn-group a")].find((e=>e.textContent.trim().toLowerCase().includes("tags")));e&&Bt.openLink(e.href,{newTab:!1})},Bt.sg.copyBlobContent=()=>{let e=document.querySelector('div[aria-label="File blob"]');if(e){let n=e.innerText.trim().split("\n"),o=document.querySelector(".cm-lineNumbers").innerText.trim().split("\n");n=n.slice().splice(0,o.length),console.debug(n);let a=n.join("\n");t.Clipboard.write(a),t.Front.showBanner(`Copied ${n.length} lines to the clipboard.`)}},Bt.sg.viewFileHistory=()=>{[...document.querySelectorAll("a.RepoHeaderActions-module__action")].find((e=>e.innerText.trim().includes("History")))},Bt.sg.downloadRaw=()=>{document.querySelector("mdi-icon Icon-module__icon-inline LoadingSpinner-module__loading-spinner,div[aria-label='Loading']"),[...document.querySelectorAll("button[data-reach-menu-button]")].filter((e=>"…"===e.innerText.trim()))},Bt.sg.copyAllRepos=()=>{Object.entries(window.localStorage).forEach((([e,t])=>{e.startsWith("user-history:")&&!e.includes("anonymous")&&(console.log(e),console.log(JSON.parse(t)))}))},Bt.go={},Bt.go.parseLocation=()=>{const e=new URL(window.location.href),t=e.searchParams.get("q"),n=e.pathname.split("/"),o={type:"unknown",url:e,query:t};if("www.google.com"===e.hostname)if(n.length<=1)o.type="home";else if("search"===n[1])switch(e.searchParams.get("tbm")){case"vid":o.type="videos";break;case"isch":o.type="images";break;case"nws":o.type="news";break;default:o.type="web"}else"maps"===n[1]&&(o.type="maps","search"===n[2]&&void 0!==n[3]?o.query=n[3]:void 0!==n[2]&&(o.query=n[2]));return o},Bt.kagi={},Bt.kagi.openKagiInGoogle=()=>{location.href.startsWith("https://kagi.com/search?")&&(location.href=`https://www.google.com/search?q=${new URL(location.href).searchParams.get("q")}`)},Bt.gh={},Bt.gh.changeSearchSorting=(e="best")=>{if(!window.location.href.includes("/search"))return;const t=new URL(window.location.href);t.searchParams.set("s",e),window.location.href=t.toString()},Bt.gh.addRepositoryToList=()=>{let e=document.querySelector('summary[aria-label="Add this repository to a list"]');e&&e.click()},Bt.gh.viewTopicOnSourceGraph=()=>{if(!window.location.pathname.includes("/topics/"))return;const e=window.location.pathname.split("/").pop();console.debug(e);const t=`https://sourcegraph.com/search?q=topic:${e}`;f.debug(t),Bt.openLink(t,{newTab:!0,active:!1})},Bt.gh.viewDependencyGraph=()=>{const e=Bt.gh.parseRepo();if(null===e)return;Bt.openLink(`https://github.com/${e.repoBase}/network/dependents`,{newTab:!0,active:!1});const n=[...document.querySelectorAll("div.Box-row")].map((e=>e.innerText.trim())).map((e=>e.split("\n")[0])).map((e=>e.replaceAll(/\s/g,"")));f.info("viewDependencyGraph",n),t.Clipboard.write(n.join("\n")),t.Front.showBanner(`Copied ${n.length} dependents to the clipboard.`)},Bt.gh.viewGoDoc=()=>Pt(`https://godoc.org/${getURLPath(2,!0)}`),Bt.gh.downloadGistFiles=()=>{[...document.querySelectorAll(".Button--secondary")].filter((e=>e.innerText.trim().includes("Raw"))).map((e=>e.href)).forEach((e=>{t.Clipboard.write(e),Bt.openLink(e,{newTab:!0,active:!1})}))},Bt.gh.star=({toggle:e=!1}={})=>async()=>{const t=e=>"none"===window.getComputedStyle(e).display||!!e.parentElement&&t(e.parentElement),n=Array.from(document.querySelectorAll("div.starring-container")).filter((e=>!t(e)));let o;switch(n.length){case 0:return;case 1:[o]=n;break;default:try{o=await qt.createHints(n,{action:null})}catch(e){return}}const a=o.parentElement.parentElement?.matches("ul.pagehead-actions")?window.location.pathname:new URL(o.parentElement.querySelector("form").action).pathname,i=o.classList.contains("on"),r=a.slice(1).split("/").slice(0,2).join("/");let s="★",c="starred",l="is";(i&&e||!i&&!e)&&(c=`un${c}`,s="☆"),e&&(l="has been",o.querySelector(i?".starred button, button.starred":".unstarred button, button.unstarred").click()),Dt.showBanner(`${s} Repository ${r} ${l} ${c}!`)},Bt.gh.parseRepo=(e=window.location.href,t=!1)=>{let n;try{n=e instanceof URL?e:new URL(e)}catch(t){n=new URL(`https://github.com/${e}`)}const[a,i,...r]=n.pathname.split("/").filter((e=>""!==e)),s=0===r.length;return["github.com","gist.github.com","raw.githubusercontent.com"].includes(n.hostname)&&"string"==typeof a&&a.length>0&&"string"==typeof i&&i.length>0&&(s||!1===t)&&/^([a-zA-Z0-9]+-?)+$/.test(a)&&!o.check(a)?{type:"repo",user:a,repo:i,owner:a,name:i,href:e,url:n,repoBase:`${a}/${i}`,repoRoot:s,repoPath:r}:null},Bt.gh.parseUser=(e=window.location.href,t=!1)=>{const n=e instanceof URL?e:new URL(e),[a,...i]=n.pathname.split("/").filter((e=>""!==e)),r=0===i.length;return n.origin===window.location.origin&&"string"==typeof a&&a.length>0&&(!1===t||0===i.length)&&/^([a-zA-Z0-9]+-?)+$/.test(a)&&!o.check(a)?{type:"user",name:a,user:a,href:e,url:n,userRoot:r,userPath:i}:null},Bt.gh.parseFile=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,a,i,r,...s]=t.pathname.split("/").filter((e=>""!==e));if(!(t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof a&&a.length>0&&"string"==typeof i&&("blob"===i||"tree"===i)&&"string"==typeof r&&r.length>0&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!o.check(n)))return null;const c={type:"file",user:n,repo:a,pathType:i,commitHash:r,isDirectory:"tree"===i,href:e,url:t,filePath:s,repoBase:`/${n}/${a}`};return c.rawUrl=c.isDirectory?null:`https://raw.githubusercontent.com/${c.user}/${c.repo}/${c.commitHash}/${c.filePath.join("/")}`,c},Bt.gh.parseCommit=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,a,i,r]=t.pathname.split("/").filter((e=>""!==e));return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof a&&a.length>0&&"string"==typeof i&&"commit"===i&&"string"==typeof r&&r.length>0&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!o.check(n)?{type:"commit",user:n,repo:a,commitHash:r,href:e,url:t}:null},Bt.gh.parseIssue=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,a,i,...r]=t.pathname.split("/").filter((e=>""!==e)),s=0===r.length;return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof a&&a.length>0&&"issues"===i&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!o.check(n)?{href:e,url:t,...s?{type:"issues",issuePath:r}:{type:"issue",number:r[0],issuePath:r}}:null},Bt.gh.parsePull=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,a,i,...r]=t.pathname.split("/").filter((e=>""!==e)),s=0===r.length;return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof a&&a.length>0&&/^pulls?$/.test(i)&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!o.check(n)?{href:e,url:t,...s?{type:"pulls",pullPath:r}:{type:"pull",number:r[0],pullPath:r}}:null},Bt.gh.isUser=(e=window.location.href,t=!0)=>null!==Bt.gh.parseUser(e,t),Bt.gh.isRepo=(e=window.location.href,t=!0)=>null!==Bt.gh.parseRepo(e,t),Bt.gh.isFile=(e=window.location.href)=>null!==Bt.gh.parseFile(e),Bt.gh.isCommit=(e=window.location.href)=>null!==Bt.gh.parseCommit(e),Bt.gh.isIssue=(e=window.location.href)=>null!==Bt.gh.parseIssue(e),Bt.gh.isPull=(e=window.location.href)=>null!==Bt.gh.parsePull(e),Bt.gh.openRepo=()=>qt.createHintsFiltered((e=>Bt.gh.isRepo(e.href))),Bt.gh.openUser=()=>qt.createHintsFiltered((e=>Bt.gh.isUser(e.href))),Bt.gh.openFile=()=>qt.createHintsFiltered((e=>Bt.gh.isFile(e.href))),Bt.gh.openCommit=()=>qt.createHintsFiltered((e=>Bt.gh.isCommit(e.href))),Bt.gh.openIssue=()=>qt.createHintsFiltered((e=>Bt.gh.isIssue(e.href))),Bt.gh.openPull=()=>qt.createHintsFiltered((e=>Bt.gh.isPull(e.href))),Bt.gh.openPage=e=>Bt.openLink(`https://github.com/${e}`),Bt.gh.openRepoPage=e=>{const t=Bt.gh.parseRepo();null!==t&&Bt.gh.openPage(`${t.repoBase}${e}`)},Bt.gh.openRepoOwner=()=>{const e=Bt.gh.parseRepo();null!==e&&Bt.gh.openPage(`${e.owner}`)},Bt.gh.openGithubPagesRepo=()=>{const e=window.location.hostname.split(".")[0],t=window.location.pathname.split("/")[1]??"";Bt.gh.openPage(`${e}/${t}`)},Bt.gh.fetchStars=(e="nicoandmee")=>get(`https://api.github.com/users/${e}/starred`).then((e=>{if(void 0!==e){console.log({raw:e});const t=e.map((e=>({origin_user:e.owner.login,origin_id:e.id,origin_url:e.html_url,origin_created_at:e.created_at,content:e.description,title:e.name,tags:e.topics.concat(e.language),meta:{isFork:e.fork,git_url:e.git_url,ssh_url:e.ssh_url,repo_name:e.name,repo_full_name:e.full_name}})));console.log({starred:t})}})),Bt.gh.openSourceFile=()=>{const e=window.location.pathname.split("/");Bt.gh.openPage(`${[...e.slice(1,3),"tree",...e.slice(3)].join("/")}`)},Bt.gh.openProfile=()=>Bt.gh.openPage(`${document.querySelector("meta[name='user-login']").content}`),Bt.gh.toggleLangStats=()=>document.querySelector(".repository-lang-stats-graph").click(),Bt.gh.expandAllInFeed=()=>{let e=document.querySelectorAll("svg[aria-label=Expand]");Array.from(e).map((e=>e.parentElement.parentElement)).forEach((e=>e.click()))},Bt.gh.goParent=()=>{const e=window.location.pathname.split("/").filter((e=>""!==e)),t=(()=>{const[t,n,o]=e;switch(e.length){case 0:return!1;case 4:switch(o){case"blob":case"tree":return[t,n];case"pull":return[t,n,"pulls"]}break;case 5:if("blob"===o)return[t,n]}return e.slice(0,e.length-1)})();if(!1!==t){const e=`${window.location.origin}/${t.join("/")}`;Bt.openLink(e)}},Bt.gh.viewSourceGraphInSameTab=()=>Bt.gh.viewSourceGraph(!1),Bt.gh.viewSourceGraph=(e=void 0)=>{if(qt.elementExists('a[title="View repository on Sourcegraph"]'))return void document.querySelector('a[title="View repository on Sourcegraph"]').click();const t=new URL("https://sourcegraph.com/github.com");let n=null;if(null!==(n=Bt.gh.parseFile(window.location.href))){const e=n.filePath.join("/");if(t.pathname+=`/${n.user}/${n.repo}@${n.commitHash}/-/${n.pathType}/${e}`,""!==window.location.hash)t.hash=window.location.hash;else if(!qt.isElementInViewport(document.querySelector("#L1")))for(const e of document.querySelectorAll(".js-line-number"))if(qt.isElementInViewport(e)){t.hash=e.id;break}}else null!==(n=Bt.gh.parseCommit(window.location.href))?t.pathname+=`/${n.user}/${n.repo}@${n.commitHash}`:null!==(n=Bt.gh.parseRepo(window.location.href))?t.pathname+=`/${n.user}/${n.repo}`:t.pathname="";let o=!1;e||(o=!0),Bt.openLink(t.href,{newTab:o})},Bt.gh.openInDev=({newTab:e=!1}={})=>{const t=new URL(window.location.href);t.hostname="github.dev",Bt.openLink(t.href,{newTab:e})},Bt.gh.selectFile=async({files:e=!0,directories:t=!0}={})=>{if(!e&&!t)throw new Error("At least one of 'files' or 'directories' must be true");const n=n=>n&&!(!t&&n.isDirectory||!e&&!n.isDirectory);let o=Bt.gh.parseFile();if(n(o))return o;if(null===Bt.gh.parseRepo())throw new Error("Not a repository");const a=qt.createHintsFiltered((e=>{const t=Bt.gh.parseFile(e.href);return t&&!1===t.isDirectory}),null);if(o=Bt.gh.parseFile(a.href),!n(o))throw new Error("Not a file");return o},Bt.gh.openFileFromClipboard=async({newTab:e=!0}={})=>{const t=await navigator.clipboard.readText();if("string"!=typeof t||0===t.length)return;const n=window.location.href,o={user:null,repo:null,commitHash:"master"},a=Bt.gh.parseFile(n);if(null!==a)o.user=a.user,o.repo=a.repo,o.commitHash=a.commitHash;else{const e=Bt.gh.parseCommit(n);if(null!==e)o.user=e.user,o.repo=e.repo,o.commitHash=e.commitHash;else{const e=Bt.gh.parseRepo(n);if(null!==e)return;o.user=e.user,o.repo=e.repo}}Bt.openLink(`https://github.com/${o.user}/${o.repo}/tree/${o.commitHash}/${t}`,{newTab:e})},Bt.gl={},Bt.gl.star=()=>{const e=window.location.pathname.slice(1).split("/").slice(0,2).join("/"),t=document.querySelector(".btn.star-btn > span");t.click();const n=`${t.textContent.toLowerCase()}red`;let o="☆";"starred"===n&&(o="★"),Dt.showBanner(`${o} Repository ${e} ${n}`)},Bt.tw={},Bt.tw.openUser=()=>qt.createHints([].concat([...document.querySelectorAll("a[role='link'] img[src^='https://pbs.twimg.com/profile_images']")].map((e=>e.closest("a"))),[...document.querySelectorAll("a[role='link']")].filter((e=>e.text.match(/^@/))))),Bt.by={},Bt.by.copyDID=()=>{qt.createHints("img[src*='/did:plc:']",(e=>{const[t,n]=e.src.match("/(did:.*)/");n&&Ft.write(n)}))},Bt.by.copyPostID=()=>{qt.createHints('a[href*="/post/"]',(e=>{const[t,n]=e.pathname.match(/^\/profile\/[^/]+\/post\/(\w+)/);n&&Ft.write(n)}))},Bt.re={},Bt.re.collapseNextComment=()=>{const e=Array.from(document.querySelectorAll(".noncollapsed.comment")).filter((e=>qt.isElementInViewport(e)));e.length>0&&e[0].querySelector(".expand").click()},Bt.hn={},Bt.hn.goParent=()=>{const e=document.querySelector(".navs>a[href^='item']");e&&Bt.openLink(e.href)},Bt.hn.collapseNextComment=()=>{const e=Array.from(document.querySelectorAll("a.togg")).filter((e=>"[–]"===e.innerText&&qt.isElementInViewport(e)));e.length>0&&e[0].click()},Bt.hn.goPage=(e=1)=>{let t;try{t=new URL(window.location.href)}catch(e){return}let n=t.searchParams.get("p");null!==n&&""!==n||(n="1");const o=parseInt(n,10);if(Number.isNaN(o))return;const a=o+e;a<1||(t.searchParams.set("p",a),Bt.openLink(t.href))},Bt.hn.openLinkAndComments=e=>{const t=e.querySelector(".titleline>a").href,n=e.nextElementSibling.querySelector("a[href^='item']:not(.titlelink)").href;Bt.openLink(n,{newTab:!0}),Bt.openLink(t,{newTab:!0})},Bt.feedbin={},Bt.feedbin.subscribe=()=>{Pt("https://feedbin.com/?subscribe="+encodeURIComponent(window.location.href))},Bt.ph={},Bt.ph.openExternal=()=>{Ut.create("ul[class^='postsList_'] > li > div[class^='item_']",(e=>Bt.openLink(e.querySelector("div[class^='meta_'] > div[class^='actions_'] > div[class^='minorActions_'] > a:nth-child(1)").href,{newTab:!0})))},Bt.wp={},Bt.wp.toggleSimple=()=>{const e=new URL(window.location.href);e.hostname=e.hostname.split(".").map(((e,t)=>0===t?"simple"===e?"":"simple":e)).filter((e=>""!==e)).join("."),Bt.openLink(e.href)},Bt.wp.viewWikiRank=()=>{const e=document.location.hostname.split("."),t=e.length>2&&"www"!==e[0]?e[0]:"en",n=document.location.pathname.split("/");if(n.length<3||"wiki"!==n[1])return;const o=n.slice(2).join("/");Bt.openLink(`https://wikirank.net/${t}/${o}`,{newTab:!0})},Bt.wp.markdownSummary=()=>`> ${[e=>[...e.querySelectorAll("sup")].map((e=>e.remove())),e=>[...e.querySelectorAll("b")].forEach((e=>{e.innerText=`**${e.innerText}**`})),e=>[...e.querySelectorAll("i")].forEach((e=>{e.innerText=`_${e.innerText}_`}))].reduce(((e,t)=>(t(e),e)),document.querySelector("#mw-content-text p:not([class]):not([id])").cloneNode(!0)).innerText.trim()}\n\n— ${Bt.getMarkdownLink()}`,Bt.re={},Bt.re.focusSearch=()=>Bt.dispatchMouseEvents(document.getElementById("docsearch"),"mousedown","click"),Bt.re.scrollSidebar=e=>Bt.scrollElement(document.getElementById("sidebar-content"),e),Bt.re.scrollContent=e=>Bt.scrollElement(document.body,e),Bt.dv={},Bt.dv.scrollSidebar=e=>Bt.scrollElement(document.querySelector("._list"),e),Bt.dv.scrollContent=e=>Bt.scrollElement(document.querySelector("._content"),e),Bt.yt={},Bt.yt.getCurrentTimestamp=()=>{const[e,t,n=0]=document.querySelector("#ytd-player .ytp-time-current")?.innerText?.split(":")?.reverse()?.map(Number)??[0,0,0];return[e,t,n]},Bt.yt.getCurrentTimestampSeconds=()=>{const[e,t,n]=Bt.yt.getCurrentTimestamp();return 60*n*60+60*t+e},Bt.yt.getCurrentTimestampHuman=()=>{const[e,t,n]=Bt.yt.getCurrentTimestamp(),o=e=>`${e}`.padStart(2,"0");return n>0?`${n}:${o(t)}:${o(e)}`:`${t}:${o(e)}`},Bt.yt.getShortLink=()=>`https://youtu.be/${new URLSearchParams(window.location.search).get("v")}`,Bt.yt.getCurrentTimestampLink=()=>`${Bt.yt.getShortLink()}?t=${Bt.yt.getCurrentTimestampSeconds()}`,Bt.yt.getCurrentTimestampMarkdownLink=()=>Bt.getMarkdownLink({title:`${document.querySelector("#ytd-player .ytp-title").innerText} @ ${Bt.yt.getCurrentTimestampHuman()} - YouTube`,href:Bt.yt.getCurrentTimestampLink()}),Bt.doi={},Bt.doi.providers={},Bt.doi.providers.meta_citation_doi=()=>document.querySelector("meta[name=citation_doi]")?.content,Bt.doi.providers.meta_dcIdentifier_doi=()=>document.querySelector("meta[name='dc.Identifier'][scheme=doi]")?.content,Bt.doi.getLink=e=>{if(!w)return void Dt.showBanner("DOI Handler not confingured (see conf.priv.example.js)");const t=e();if(t)return w(t);Dt.showBanner("DOI not found")},Bt.cg={},Bt.cg.getNewChatLink=()=>[...document.querySelectorAll("a")].find((e=>"New chat"===e.innerText)),Bt.cg.newChat=async()=>{const e=Bt.cg.getNewChatLink();if(e){(await(async e=>(e.click(),await qt.until((()=>[...document.querySelectorAll('li[class*="group/toggle"]')].find((e=>"GPT-4"===e.innerText))))))(e)).querySelector("button>div").click()}else location.assign("https://chat.openai.com/?model=gpt-4")},Bt.cg.getChatLinks=()=>Bt.cg.getNewChatLink().parentElement.nextSibling.nextSibling.querySelectorAll("a");const Yt=Bt,Kt={categories:{help:0,mouseClick:1,scroll:2,tabs:3,pageNav:4,sessions:5,searchSelectedWith:6,clipboard:7,omnibar:8,visualMode:9,vimMarks:10,settings:11,chromeURLs:12,proxy:13,misc:14,insertMode:15}},{categories:Xt}=Kt,{Clipboard:Zt,Front:Qt,tabOpenLink:en,Normal:tn}=t,nn={mappings:["gk","gn","sb","sw","ob","oe","ow","oy","cp",";cp",";ap","spa","spb","spd","sps","spc","spi","sfr","zQ","zz","zR","od","ab","Q","q","ag","af","yj",";s","yp","p","<Ctrl-j>","<Ctrl-h>"]},on={};on.global=[{alias:"p",category:Xt.mouseClick,description:"Go to editable text",callback:Yt.goToEditTextBox},{alias:"F",map:"gf",category:Xt.mouseClick,description:"Open a link in non-active new tab"},{alias:"zf",category:Xt.mouseClick,description:"Open link URL in vim editor",callback:Yt.previewLink},{alias:"ZZ",category:Xt.sessions,description:"Save current session and quit",callback:Yt.saveSessionAndQuit},{alias:"ZR",category:Xt.sessions,description:"Restore last session",callback:Yt.restoreLastSession},{alias:"Zl",category:Xt.sessions,description:"List saved sessions",callback:()=>{runtime.command({action:"getSessions"},(e=>{Omnibar.listResults(Object.keys(e.sessions),(e=>$("<li></li>").html(e)))}))}},{alias:"Zo",category:Xt.misc,description:"Capture URL to Things",callback:Yt.toThings},{alias:"w",map:"k",category:Xt.scroll,description:"Scroll up"},{alias:"s",map:"j",category:Xt.scroll,description:"Scroll down"},{alias:"K",map:"e",category:Xt.scroll,description:"Scroll half page up"},{alias:"J",map:"d",category:Xt.scroll,description:"Scroll half page down"},{alias:"gh",category:Xt.scroll,description:"Scroll to element targeted by URL hash",callback:Yt.scrollToHash},{alias:"gI",category:Xt.pageNav,description:"View image in new tab",callback:()=>qt.createHints("img",(e=>Yt.openLink(e.src)))},{alias:"g.",category:Xt.pageNav,description:"Go to parent domain",callback:()=>{const e=window.location.host.split("."),t=(e.length>2?e.slice(1):e).join(".");Yt.openLink(`${window.location.protocol}//${t}`)}},{alias:"gn",category:Xt.misc,description:"Jump to vim-like mark in new tab",callback:Yt.jumpToVimMark},{alias:"yp",category:Xt.clipboard,description:"Copy URL path of current page",callback:()=>Zt.write(window.location.href)},{alias:"yO",category:Xt.misc,description:"Copy current page's link to obsidian",callback:()=>Yt.copyCurrentURLToObsidian()},{alias:"yI",category:Xt.clipboard,description:"Copy Image URL",callback:()=>qt.createHints("img",(e=>Zt.write(e.src)))},{alias:"yA",category:Xt.clipboard,description:"Copy link as Markdown",callback:()=>qt.createHints("a[href]",(e=>Zt.write(`[${e.innerText}](${e.href})`)))},{alias:"yM",category:Xt.clipboard,description:"Copy page URL/Title as Markdown link",callback:()=>Zt.write(Yt.getMarkdownLink())},{alias:"yh",category:Xt.clipboard,description:"Copy page title",callback:()=>Zt.write(Yt.getPageTitle())},{alias:"yT",category:Xt.tabs,description:"Duplicate current tab (non-active new tab)",callback:()=>Yt.openLink(window.location.href,{newTab:!0,active:!1})},{alias:";q",category:Xt.misc,description:"Insert jquery library on current page",callback:()=>tn.insertJS("//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.min.js")},{alias:"yl",category:Xt.tabs,description:"Copy last element in URL",callback:Yt.copyLastElementInURL},{alias:";se",category:Xt.settings,description:"Edit SK Settings",callback:Yt.editSettings},{alias:"gs",category:Xt.chromeURLs,description:"Open Chrome Shortcuts",callback:Yt.openChromeShortcuts},{alias:"gh",category:Xt.chromeURLs,description:"Open Chrome History",callback:Yt.openChromeHistory},{alias:"gz",category:Xt.misc,description:"Open Proxy SwitchyOmega",callback:Yt.openProxySwitchOmega},{alias:"gA",category:Xt.misc,description:"Open AFineStart",callback:Yt.openAFineStart},{alias:"gk",category:Xt.misc,description:"Open Toby",callback:Yt.openTobyMini},{alias:";s",category:Xt.misc,description:"Show Squirt",callback:Yt.showSquirt},{alias:";1",category:Xt.misc,description:"Inject Utility Libraries",callback:Yt.injectUtilLibs},{alias:";4",category:Xt.misc,description:"Convert HTML to Markdown",callback:()=>qt.document2markdown().then((e=>Zt.write(e))).catch(console.error)},{alias:"gO",category:Xt.misc,description:"Open OneTab",callback:Yt.openOneTab},{alias:"=W",category:Xt.misc,description:"Lookup whois information for domain",callback:()=>Yt.openLink(Yt.getWhoisUrl(),{newTab:!0})},{alias:"=d",category:Xt.misc,description:"Lookup dns information for domain",callback:()=>Yt.openLink(Yt.getDnsInfoUrl(),{newTab:!0})},{alias:"=D",category:Xt.misc,description:"Lookup all information for domain",callback:()=>Yt.openLink(Yt.getDnsInfoUrl({all:!0}),{newTab:!0})},{alias:"=c",category:Xt.misc,description:"Show Google's cached version of page",callback:()=>Yt.openLink(Yt.getGoogleCacheUrl(),{newTab:!0})},{alias:"=p",category:Xt.misc,description:"Remove popups, banners, and ads from any website.",callback:()=>Yt.openLink(Yt.get12ftUrl(),{newTab:!1})},{alias:"=a",category:Xt.misc,description:"Show Archive.org Wayback Machine for page",callback:()=>Yt.openLink(Yt.getWaybackUrl(),{newTab:!0})},{alias:"=S",category:Xt.misc,description:"View summary for page",callback:()=>Yt.openLink(Yt.getSummaryUrl(),{newTab:!0})},{alias:"=t",category:Xt.misc,description:"Add to Things",callback:Yt.toThings},{alias:"=A",category:Xt.misc,description:"Add to Anybox",callback:Yt.addToAnyBox},{alias:"=R",category:Xt.misc,description:"Add to Raindrop",callback:Yt.addToRaindrop},{alias:"=I",category:Xt.misc,description:"Add to Readwise",callback:Yt.addToReadwise},{alias:";pd",category:Xt.misc,description:"Toggle PDF viewer from SurfingKeys",callback:Yt.togglePdfViewer},{alias:";dI",category:Xt.misc,description:"Download image to",callback:()=>{t.Hints.create("img",(e=>{t.RUNTIME("download",{url:e.src,saveAs:!0})}))}},{alias:"gxE",map:"gxt",category:Xt.tabs,description:"Close tab to left"},{alias:"gxR",map:"gxT",category:Xt.tabs,description:"Close tab to right"},{alias:"F",map:"gf",category:Xt.mouseClick,description:"Open a link in non-active new tab"},{alias:"ol",category:Xt.omnibar,description:"Open localhost",callback:Yt.openLocalHost},{alias:"oh",category:Xt.omnibar,description:"Open URL from history",callback:()=>Qt.openOmnibar({type:"History"})},{alias:"o,",category:Xt.omnibar,description:"Open RecentlyClosed",callback:()=>Qt.openOmnibar({type:"RecentlyClosed"})},{alias:"oc",category:Xt.omnibar,description:"Search grep.app",callback:()=>Qt.openOmnibar({type:"SearchEngine",extra:"gr"})}],on["marketplace.visualstudio.com"]=[{alias:"yc",description:"Copy extension id",callback:Yt.copyExtensionId},{alias:"gr",description:"Go to project repository",callback:Yt.goToProjectRepository},{alias:"gi",description:"Go to project issues",callback:Yt.goToProjectIssues}],on["imdb.com"]=[{alias:"yt",description:"Copy IMDB title identifier",callback:Yt.copyImdbId}],on["thetvdb.com"]=[{alias:"yt",description:"Copy TVDB title identifier",callback:Yt.copyTVDBId}],on["amazon.com"]=[{alias:"a",description:"View product",callback:Yt.az.viewProduct},{alias:"c",description:"Add to Cart",callback:()=>qt.createHints("#add-to-cart-button")},{alias:"R",description:"View Product Reviews",callback:()=>Yt.openLink("#customerReviews")},{alias:"Q",description:"View Product Q&A",callback:()=>Yt.openLink("#Ask")},{alias:"A",description:"Open Account page",callback:()=>Yt.openLink("/gp/css/homepage.html")},{alias:"C",description:"Open Cart page",callback:()=>Yt.openLink("/gp/cart/view.html")},{alias:"O",description:"Open Orders page",callback:()=>Yt.openLink("/gp/css/order-history")}],on["imgur.com"]=[{alias:"!rRight",decsription:"Imgur Next Item",callback:()=>document?.querySelector("a.Navigation-next")?.click()}];const an=["a h3","h3 a","a[href^='/search']:not(.fl):not(#pnnext,#pnprev):not([role]):not(.hide-focus-ring)","g-scrolling-carousel a",".rc > div:nth-child(2) a",".kno-rdesc a",".kno-fv a",".isv-r > a:first-child",".dbsr > a:first-child",".X5OiLe",".WlydOe",".fl"].join(",");on["www.google.com"]=[{alias:"a",description:"Open search result",callback:()=>qt.createHints(an)},{alias:"A",description:"Open search result (new tab)",callback:()=>qt.createHints(an,Yt.openAnchor({newTab:!0,active:!1}))}],on["algolia.com"]=[{alias:"a",description:"Open search result",callback:()=>qt.createHints(".item-main h2>a:first-child")}],on["youtube.com"]=[{leader:"",alias:"A",description:"Open video",callback:()=>qt.createHints("*[id='video-title']",Yt.openAnchor({newTab:!0}))},{leader:"",alias:"C",description:"Open channel",callback:()=>qt.createHints("*[id='byline']")},{leader:"",alias:"gH",description:"Goto homepage",callback:()=>Yt.openLink("https://www.youtube.com/feed/subscriptions?flow=2")},{leader:"",alias:"F",description:"Toggle fullscreen",callback:()=>Yt.dispatchMouseEvents(document.querySelector("#movie_player.ytp-fullscreen-button"),"mousedown","click")},{leader:"",alias:"Yt",description:"Copy YouTube video link for current time",callback:()=>Zt.write(Yt.yt.getCurrentTimestampLink())},{leader:"",alias:"Ym",description:"Copy YouTube video markdown link for current time",callback:()=>Zt.write(Yt.yt.getCurrentTimestampMarkdownLink())}],on["pypi.org"]=[{alias:"b",description:"Go to project homepage",callback:Yt.pypi.goToHomepage},{alias:"y",description:"Copy install snippet",callback:Yt.pypi.copyInstallSnippet}],on["ankiweb.net"]=[{alias:"y",description:"Copy addon id",callback:Yt.anki.copyAddonId}],on["npmjs.com"]=[{alias:"y",description:"Copy package name",callback:Yt.npm.copyPackageName},{alias:"r",description:"Go to repository",callback:Yt.npm.goToRepository},{alias:"p",description:"Sort by popularity",callback:()=>Yt.npm.changeSorting("popularity")}],on["poe.com"]=[{alias:"y",description:"Copy last response",callback:Yt.poe.copyLastResponse},{alias:"p",description:"Open bot picker",callback:Yt.poe.openBotPicker}],on["sourcegraph.com"]=[{alias:"]",description:"Preview next search result",callback:Yt.sg.prevNext},{alias:"[",description:"Preview previous search result",callback:Yt.sg.prevPrev},{alias:"O",description:"Open currently previewed search result",callback:Yt.sg.openPreviewed},{alias:"S",description:"Save search query",callback:Yt.sg.saveSearchQuery},{alias:"1",description:"Toggle sidebar",callback:Yt.sg.toggleSidebar},{alias:"c",description:"Open Commits View",callback:Yt.sg.openCommitsView},{alias:"b",description:"Open Branches View",callback:Yt.sg.openBranchesView},{alias:"h",description:"Toggle history view",callback:Yt.sg.toggleHistoryView},{alias:"g",description:"View on GitHub (new tab)",callback:()=>Yt.sg.openGitHub({newTab:!0})},{alias:"y",description:"Copy repo name",callback:Yt.sg.copyRepoName}],on["nixos.org"]=[{alias:"j",description:"Next package",callback:()=>Yt.nixos.nextPackage},{alias:"k",description:"Previous package",callback:()=>Yt.nixos.prevPackage}],on["github.com"]=[{alias:";rs",description:"Sort by most recently updated",callback:()=>Yt.gh.changeSearchSorting("updated")},{alias:";rs",description:"Sort by most stars",callback:()=>Yt.gh.changeSearchSorting("stars")},{alias:";rr",description:"Download associated gist files (raw)",callback:Yt.gh.downloadGistFiles},{alias:".l",description:"Add repository to list(s) (beta)",callback:Yt.gh.addRepositoryToList},{alias:"gT",description:"View topic on SourceGraph",callback:Yt.gh.viewTopicOnSourceGraph},{alias:"A",description:"Open repository Actions page",callback:()=>Yt.gh.openRepoPage("/actions")},{alias:"C",description:"Open repository Commits page",callback:()=>Yt.gh.openRepoPage("/commits")},{alias:"I",description:"Open repository Issues page",callback:()=>Yt.gh.openRepoPage("/issues")},{alias:"N",description:"Open notifications page",callback:()=>Yt.gh.openPage("/notifications")},{alias:"P",description:"Open repository Pull Requests page",callback:()=>Yt.gh.openRepoPage("/pulls")},{alias:"R",description:"Open Repository page",callback:()=>Yt.gh.openRepoPage("/")},{alias:"S",description:"Open repository Settings page",callback:()=>Yt.gh.openRepoPage("/settings")},{alias:"W",description:"Open repository Wiki page",callback:()=>Yt.gh.openRepoPage("/wiki")},{alias:"X",description:"Open repository Security page",callback:()=>Yt.gh.openRepoPage("/security")},{alias:"O",description:"Open repository Owner's profile page",callback:Yt.gh.openRepoOwner},{alias:"M",description:"Open your profile page ('Me')",callback:Yt.gh.openProfile},{alias:"a",description:"View Repository",callback:Yt.gh.openRepo},{alias:"u",description:"View User",callback:Yt.gh.openUser},{alias:"f",description:"View File",callback:Yt.gh.openFile},{alias:"c",description:"View Commit",callback:Yt.gh.openCommit},{alias:"i",description:"View Issue",callback:Yt.gh.openIssue},{alias:"p",description:"View Pull Request",callback:Yt.gh.openPull},{alias:"e",description:"View external link",callback:()=>qt.createHints("a[rel=nofollow]")},{leader:"",alias:"gu",description:"Go up one path in the URL (GitHub)",callback:Yt.gh.goParent},{alias:"s",description:"Toggle Star",callback:Yt.gh.star({toggle:!0})},{alias:"yy",description:"Copy repository name (owner/repo)",callback:async()=>Zt.write(qt.getURLPath({count:2}))},{alias:"l",description:"Expand all in gh feed",callback:Yt.gh.expandAllInFeed},{alias:"D",description:"Open in github.dev (new tab)",callback:()=>Yt.gh.openInDev({newTab:!0})},{alias:"gD",description:"Open go.dev documentation for the project",callback:Yt.gh.viewGoDoc},{alias:"G",description:"View on SourceGraph",callback:Yt.gh.viewSourceGraph},{alias:"g",description:"View on SourceGraph (Preserve Tab)",callback:Yt.gh.viewSourceGraphInSameTab},{alias:"r",description:"View live raw version of file",callback:()=>Yt.gh.selectFile({directories:!1}).then((e=>Yt.openLink(e.rawUrl,{newTab:!0})))},{alias:"yr",description:"Copy raw link to file",callback:()=>Yt.gh.selectFile({directories:!1}).then((e=>Zt.write(e.rawUrl)))},{alias:"yf",description:"Copy link to file",callback:()=>Yt.gh.selectFile().then((e=>Zt.write(e.url)))},{alias:"gcp",description:"Open clipboard string as file path in repo",callback:Yt.gh.openFileFromClipboard}],on["raw.githubusercontent.com"]=[{alias:"R",description:"Open Repository page",callback:()=>Yt.gh.openRepoPage("/")},{alias:"F",description:"Open Source File",callback:Yt.gh.openSourceFile}],on["github.io"]=[{alias:"R",description:"Open Repository page",callback:()=>Yt.gh.openGithubPagesRepo()}],on["gitlab.com"]=[{alias:"s",description:"Toggle Star",callback:Yt.gl.star},{alias:"y",description:"Copy Project Path",callback:()=>Zt.write(qt.getURLPath({count:2}))},{alias:"Y",description:"Copy Project Path (including domain)",callback:()=>Zt.write(qt.getURLPath({count:2,domain:!0}))},{alias:"D",description:"View GoDoc for Project",callback:Yt.viewGodoc}],on["lobste.rs"]=[{alias:"f",description:"Open Link and Comments [Lobsters]",path:/^(page.*)?$/,callback:()=>Yt.openStoryAndComments({story:"li.story",link:"a.u-url",comments:".comments_label a"})}],on["x.com"]=[{alias:"ye",description:"Get Twitter embed script",callback:()=>async()=>Zt.write(await qt.getTwitterEmbed(new URL(window.location.href)))},{alias:"f",description:"Follow user",callback:()=>qt.createHints("div[role='button'][data-testid$='follow']")},{alias:"s",description:"Like tweet",callback:()=>qt.createHints("div[role='button'][data-testid$='like']")},{alias:"R",description:"Retweet",callback:()=>qt.createHints("div[role='button'][data-testid$='retweet']")},{alias:"c",description:"Comment/Reply",callback:()=>qt.createHints("div[role='button'][data-testid='reply']")},{alias:"T",description:"New tweet",callback:()=>document.querySelector("a[role='button'][data-testid='SideNav_NewTweet_Button']").click()},{alias:"u",description:"Goto user",callback:Yt.tw.openUser},{alias:"t",description:"Goto tweet",callback:()=>qt.createHints("article, article div[data-focusable='true'][role='link'][tabindex='0']")}],on["bsky.app"]=[{alias:"d",description:"Copy user DID",callback:Yt.by.copyDID},{alias:"p",description:"Copy user post ID",callback:Yt.by.copyPostID}],on["reddit.com"]=[{alias:"x",description:"Collapse comment",callback:()=>qt.createHints(".expand")},{alias:"X",description:"Collapse next comment",callback:Yt.re.collapseNextComment},{alias:"s",description:"Upvote",callback:()=>qt.createHints(".arrow.up")},{alias:"S",description:"Downvote",callback:()=>qt.createHints(".arrow.down")},{alias:"e",description:"Expand expando",callback:()=>qt.createHints(".expando-button")},{alias:"a",description:"View post (link)",callback:()=>qt.createHints(".title")},{alias:"A",description:"View post (link) (non-active new tab)",callback:()=>qt.createHints(".title",Yt.openAnchor({newTab:!0,active:!1}))},{alias:"c",description:"View post (comments)",callback:()=>qt.createHints(".comments")},{alias:"C",description:"View post (comments) (non-active new tab)",callback:()=>qt.createHints(".comments",Yt.openAnchor({newTab:!0,active:!1}))}],on["news.ycombinator.com"]=[{alias:"x",description:"Collapse comment",callback:()=>qt.createHints(".togg")},{alias:"X",description:"Collapse next comment",callback:Yt.hn.collapseNextComment},{alias:"s",description:"Upvote",callback:()=>qt.createHints(".votearrow[title='upvote']")},{alias:"S",description:"Downvote",callback:()=>qt.createHints(".votearrow[title='downvote']")},{alias:"a",description:"View post (link)",callback:()=>qt.createHints(".titleline>a")},{alias:"A",description:"View post (link and comments)",callback:()=>qt.createHints(".athing",Yt.hn.openLinkAndComments)},{alias:"c",description:"View post (comments)",callback:()=>qt.createHints(".subline>a[href^='item']")},{alias:"C",description:"View post (comments) (non-active new tab)",callback:()=>qt.createHints(".subline>a[href^='item']",Yt.openAnchor({newTab:!0,active:!1}))},{alias:"e",description:"View external link",callback:()=>qt.createHints("a[rel=nofollow]")},{leader:"",alias:"gp",description:"Go to parent",callback:Yt.hn.goParent},{leader:"",alias:"]]",description:"Next page",callback:()=>Yt.hn.goPage(1)},{leader:"",alias:"[[",description:"Prev page",callback:()=>Yt.hn.goPage(-1)}],on["producthunt.com"]=[{alias:"a",description:"View product (external)",callback:Yt.ph.openExternal},{alias:"v",description:"View product",callback:()=>qt.createHints("ul[class^='postsList_'] > li > div[class^='item_'] > a")},{alias:"s",description:"Upvote product",callback:()=>qt.createHints("button[data-test='vote-button']")}],on["claude.ai"]=[{alias:"i",leader:"",description:"Focus input",callback:()=>setTimeout((()=>t.Hints.dispatchMouseClick(document.querySelector(".ProseMirror[contenteditable=true]"))),0)}],on["wikipedia.org"]=[{alias:"s",description:"Toggle simple version of current article",callback:Yt.wp.toggleSimple},{alias:"a",description:"View page",callback:()=>qt.createHints("#bodyContent :not(sup):not(.mw-editsection) > a:not([rel=nofollow])")},{alias:"e",description:"View external link",callback:()=>qt.createHints("a[rel=nofollow]")},{alias:"ys",description:"Copy article summary as Markdown",callback:()=>Zt.write(Yt.wp.markdownSummary())},{alias:"R",description:"View WikiRank for current article",callback:Yt.wp.viewWikiRank}],on["craigslist.org"]=[{alias:"a",description:"View listing",callback:()=>qt.createHints("a.result-title")}],on["stackoverflow.com"]=[{alias:"a",description:"View question",callback:()=>qt.createHints("a.question-hyperlink")}],on["aur.archlinux.org"]=[{alias:"b",description:"View pkgbuild",callback:()=>Yt.aur.viewPkgbuild()},{alias:"a",description:"View package",callback:()=>qt.createHints("a[href^='/packages/'][href$='/']")}];const rn="/docs(/.*)?";on["rescript-lang.org"]=[{leader:"",alias:"i",description:"Focus search field",path:`(${rn})?$`,callback:Yt.re.focusSearch},{alias:"a",description:"Open docs link",path:rn,callback:()=>qt.createHints("a[href^='/docs/']")},{alias:"L",description:"Open language manual",callback:()=>Yt.openLink("/docs/manual/latest/introduction")},{alias:"R",description:"Open ReScript + React docs",callback:()=>Yt.openLink("/docs/react/latest/introduction")},{alias:"G",description:"Open GenType docs",callback:()=>Yt.openLink("/docs/gentype/latest/introduction")},{alias:"P",description:"Open package index",callback:()=>Yt.openLink("/packages")},{alias:"Y",description:"Open playground",callback:()=>Yt.openLink("/try")},{alias:"S",description:"Open syntax lookup",callback:()=>Yt.openLink("/syntax-lookup")},{alias:"F",description:"Open community forum",callback:()=>Yt.openLink("https://forum.rescript-lang.org/")},{alias:"A",description:"Open API docs",callback:()=>Yt.openLink("/docs/manual/latest/api")},{alias:"J",description:"Open JS API docs",callback:()=>Yt.openLink("/docs/manual/latest/api/js")},{alias:"B",description:"Open Belt API docs",callback:()=>Yt.openLink("/docs/manual/latest/api/belt")},{alias:"D",description:"Open DOM API docs",callback:()=>Yt.openLink("/docs/manual/latest/api/dom")},{leader:"",alias:"w",description:"Scroll sidebar up",path:rn,callback:()=>Yt.re.scrollSidebar("up")},{leader:"",alias:"s",description:"Scroll sidebar down",path:rn,callback:()=>Yt.re.scrollSidebar("down")},{leader:"",alias:"e",description:"Scroll sidebar page up",path:rn,callback:()=>Yt.re.scrollSidebar("pageUp")},{leader:"",alias:"d",description:"Scroll sidebar page down",path:rn,callback:()=>Yt.re.scrollSidebar("pageDown")},{leader:"",alias:"k",description:"Scroll body up",path:rn,callback:()=>Yt.re.scrollContent("up")},{leader:"",alias:"j",description:"Scroll body down",path:rn,callback:()=>Yt.re.scrollContent("down")},{leader:"",alias:"K",description:"Scroll body page up",path:rn,callback:()=>Yt.re.scrollContent("pageUp")},{leader:"",alias:"J",description:"Scroll body page down",path:rn,callback:()=>Yt.re.scrollContent("pageDown")}],on["devdocs.io"]=[{leader:"",alias:"w",description:"Scroll sidebar up",callback:()=>Yt.dv.scrollSidebar("up")},{leader:"",alias:"s",description:"Scroll sidebar down",callback:()=>Yt.dv.scrollSidebar("down")},{leader:"",alias:"e",description:"Scroll sidebar page up",callback:()=>Yt.dv.scrollSidebar("pageUp")},{leader:"",alias:"d",description:"Scroll sidebar page down",callback:()=>Yt.dv.scrollSidebar("pageDown")},{leader:"",alias:"k",description:"Scroll body up",callback:()=>Yt.dv.scrollContent("up")},{leader:"",alias:"j",description:"Scroll body down",callback:()=>Yt.dv.scrollContent("down")},{leader:"",alias:"K",description:"Scroll body page up",callback:()=>Yt.dv.scrollContent("pageUp")},{leader:"",alias:"J",description:"Scroll body page down",callback:()=>Yt.dv.scrollContent("pageDown")}],on["ebay.com"]=[{alias:"fs",description:"Fakespot",callback:Yt.fakeSpot}],on["kagi.com"]=[{alias:"gg",description:"Kagi to Google",callback:Yt.kagi.openKagiInGoogle}],on["chat.openai.com"]=[{alias:"n",description:"New chat",callback:()=>Yt.cg.newChat()},{alias:"a",description:"Open chat",callback:()=>qt.createHints([...Yt.cg.getChatLinks()])}];const sn=(e,t=Yt.doi.providers.meta_citation_doi)=>{on[e]||(on[e]=[]),on[e].push({alias:"O",description:"Open DOI",callback:()=>{const e=Yt.doi.getLink(t);e&&Yt.openLink(e,{newTab:!0})},hide:!0})};w&&(sn("aaai.org"),sn("academic.oup.com"),sn("aeaweb.org"),sn("aging-us.com"),sn("ahajournals.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("ajnr.org"),sn("annualreviews.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("apa.org",(()=>document.querySelector(".citation a")?.innerText?.replace(/^https:\/\/doi\.org\//,""))),sn("ashpublications.org"),sn("asnjournals.org"),sn("biomedcentral.com"),sn("bmj.com"),sn("brill.com"),sn("cambridge.org"),sn("cell.com"),sn("cmaj.ca"),sn("cochranelibrary.com"),sn("diabetesjournals.org"),sn("direct.mit.edu"),sn("dl.acm.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("elifesciences.org",(()=>document.querySelector("meta[name='dc.identifier']")?.content?.replace(/^doi:/,""))),sn("embopress.org"),sn("emerald.com",Yt.doi.providers.meta_dcIdentifier_doi),sn("episciences.org"),sn("epubs.siam.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("ersjournals.com"),sn("europepmc.org"),sn("frontiersin.org"),sn("future-science.com",Yt.doi.providers.meta_dcIdentifier_doi),sn("go.gale.com"),sn("ieee.org",(()=>document.querySelector(".stats-document-abstract-doi a")?.innerText)),sn("ingentaconnect.com",(()=>document.querySelector("meta[name='DC.identifier']")?.content?.replace(/^info:doi\//,""))),sn("jacc.or",Yt.doi.providers.meta_dcIdentifier_doi),sn("jamanetwork.com"),sn("jci.org"),sn("jfdc.cnic.cn"),sn("jlr.org"),sn("jneurosci.org"),sn("journals.lww.com"),sn("journals.physiology.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("journals.plos.org"),sn("journals.sagepub.com",Yt.doi.providers.meta_dcIdentifier_doi),sn("journals.uchicago.edu",Yt.doi.providers.meta_dcIdentifier_doi),sn("jst.go.jp"),sn("karger.com"),sn("koreascience.kr"),sn("koreascience.or.kr"),sn("liebertpub.com",Yt.doi.providers.meta_dcIdentifier_doi),sn("mdpi.com"),sn("msp.org",(()=>document.querySelector(".paper-doi a")?.innerText)),sn("nature.com"),sn("nejm.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("nowpublishers.com"),sn("nsf.gov"),sn("ocl-journal.org"),sn("onlinelibrary.wiley.com"),sn("pnas.org"),sn("ncbi.nlm.nih.gov"),sn("pubs.acs.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("pubs.geoscienceworld.org"),sn("pubs.rsna.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("research.manchester.ac.uk"),sn("royalsocietypublishing.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("rupress.org"),sn("science.org",Yt.doi.providers.meta_dcIdentifier_doi),sn("sciencedirect.com"),sn("scitation.org"),sn("spandidos-publications.com"),sn("spiedigitallibrary.org"),sn("springer.com"),sn("synapse.koreamed.org"),sn("tandfonline.com",Yt.doi.providers.meta_dcIdentifier_doi),sn("thelancet.com"),sn("worldscientific.com",Yt.doi.providers.meta_dcIdentifier_doi));const cn={"wikipedia.org":["wiktionary.org","wikiquote.org","wikisource.org","wikimedia.org","mediawiki.org","wikivoyage.org","wikibooks.org","wikinews.org","wikiversity.org","wikidata.org","wiki.archlinux.org"],"stackoverflow.com":["stackexchange.com","serverfault.com","superuser.com","askubuntu.com","stackapps.com","mathoverflow.net"]};console.dir({unmaps:nn,maps:on,aliases:cn},{depth:null});const ln={unmaps:nn,maps:on,aliases:cn},{htmlPurify:pn,htmlNode:dn,htmlForEach:un,suggestionItem:mn,urlItem:hn,prettyDate:gn,getDuckduckgoFaviconUrl:fn,localStorage:bn,runtimeHttpRequest:wn,escapeForAlias:yn,createSuggestionItem:vn}=qt,kn="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2056%2056%22%20enable-background%3D%22new%200%200%2056%2056%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23eee%22%20d%3D%22M0%200h56v56h-56z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23999%22%20d%3D%22M36.4%2013.5h-18.6v24.9c0%201.4.9%202.3%202.3%202.3h18.7v-25c.1-1.4-1-2.2-2.4-2.2zm-6.2%203.5h5.1v6.4h-5.1v-6.4zm-8.8%200h6v1.8h-6v-1.8zm0%204.6h6v1.8h-6v-1.8zm0%2015.5v-1.8h13.8v1.8h-13.8zm13.8-4.5h-13.8v-1.8h13.8v1.8zm0-4.7h-13.8v-1.8h13.8v1.8z%22%2F%3E%0A%3C%2Fsvg%3E%0A",xn="undefined"!=typeof navigator?navigator.language:"",Sn={},_n=e=>({favicon:"https://google.com/favicon.ico",compl:`https://www.googleapis.com/customsearch/v1?key=${b.google_cs}&cx=${b[`google_cx_${e.alias}`]}&q=`});Sn.td={alias:"td",name:"thefreedictionary",search:"https://www.thefreedictionary.com/search.php?q="},Sn.nx={alias:"nx",name:"nixpkg",search:"https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=%s"},Sn.nx.callback=e=>JSON.parse(e.text).hits.hits.map((e=>{f.info(e);const t=e._source,n=t.package_attr_name||t.package_pname,o=t.package_pversion,a=t.package_description||t.package_longDescription||"",i=t.package_homepage?t.package_homepage[0]:"",r=t.package_license_set?t.package_license_set.join(", "):"unknown",s=t.package_maintainers_set?t.package_maintainers_set.join(", "):"unknown",c=`https://search.nixos.org/packages?channel=unstable&show=${encodeURIComponent(n)}`;return mn({url:c})` | |
<div> | |
<div class="title"><strong>${n}</strong> ${o}</div> | |
<div>${a}</div> | |
<div><em>Homepage:</em> ${i}</div> | |
<div><em>License:</em> ${r}</div> | |
<div><em>Maintainers:</em> ${s}</div> | |
</div> | |
`})),Sn.trakt={alias:"trkt",name:"Trakt.tv",domain:"trakt.tv",search:"https://trakt.tv/search?query="},Sn.trakt.callback=e=>JSON.parse(e.text).results.filter((e=>e.html&&e.klass)).map((e=>{const t=(new DOMParser).parseFromString(e.html,"text/html"),n=t.querySelector(".search-result"),o=`https://trakt.tv${n?n.getAttribute("data-url"):""}`,a=t.querySelector(".info .title"),i=a?a.textContent.trim():"Unknown Title",r=t.querySelector(".info .tags .tag.year"),s=r?r.textContent.trim():"",c=t.querySelector(".info .tags .tag.type"),l=c?c.textContent.trim():"",p=t.querySelector(".info .genres"),d=p?p.textContent.trim():"",u=t.querySelector(".poster img.real"),m=u?u.getAttribute("data-original"):"";return mn({url:o})` | |
<div style="display: flex; align-items: center;"> | |
<img src="${m}" alt="${i}" style="width: 50px; margin-right: 10px;"> | |
<div> | |
<div class="title"><strong>${i}</strong> (${s})</div> | |
<div>${l}</div> | |
<div>${d}</div> | |
</div> | |
</div> | |
`})),Sn.dd={alias:"du",name:"duckduckgo",search:"https://duckduckgo.com/?q=",compl:"https://duckduckgo.com/ac/?q="},Sn.dd.callback=e=>JSON.parse(e.text).map((e=>e.phrase)),Sn.D={alias:"D",name:"duckduckgo-lucky",search:"https://duckduckgo.com/?q=\\",compl:"https://duckduckgo.com/ac/?q=\\",callback:Sn.dd.callback},Sn.di={alias:"di",name:"duckduckgo-images",search:"https://duckduckgo.com/?ia=images&iax=images&q=",compl:"https://duckduckgo.com/ac/?ia=images&iax=images&q=",callback:Sn.dd.callback},Sn.tv={alias:"mv",domain:"imdb.com",name:"IMDB",search:"https://www.imdb.com/find?s=all&q="},Sn.al=_n({alias:"al",name:"archlinux",search:"https://www.archlinux.org/packages/?arch=x86_64&q="}),Sn.au={alias:"au",name:"AUR",search:"https://aur.archlinux.org/packages/?O=0&SeB=nd&outdated=&SB=v&SO=d&PP=100&do_Search=Go&K=",compl:"https://aur.archlinux.org/rpc?v=5&type=suggest&arg="},Sn.au.callback=e=>JSON.parse(e.text).map((e=>hn(e,`https://aur.archlinux.org/packages/${e}`))),Sn.aw={alias:"aw",name:"archwiki",search:"https://wiki.archlinux.org/index.php?go=go&search=",compl:"https://wiki.archlinux.org/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=10&suggest=true&search="},Sn.aw.callback=e=>JSON.parse(e.text)[1],Sn.af=_n({alias:"af",name:"archforums",domain:"bbs.archlinux.org"}),Sn.mk={alias:"mk",name:"mankier",search:"https://www.mankier.com/?q=",compl:"https://www.mankier.com/api/v2/suggest/?exclude_sections=&q=",callback:e=>JSON.parse(e.text).results.map((e=>mn({url:e.url})` | |
<div style="padding: 5px; display: grid; grid-template-columns: 32px 1fr; grid-gap: 15px"> | |
<div> | |
<div class="title"><strong>${e.text}</strong></div> | |
<div class="title">${e.description??""}</div> | |
</div> | |
</div> | |
`))},Sn.lg={alias:"lg",name:"libgen",search:"https://libgen.is/search.php?req="},Sn.cs=_n({alias:"cs",name:"chromestore",search:"https://chrome.google.com/webstore/search/"});const Tn=e=>JSON.parse(e.text).results.map((e=>{let{name:t}=e;"object"==typeof t&&(void 0!==t[navigator.language]?t=t[navigator.language]:[t]=Object.values(t));let n="";switch(e.type){case"extension":n+="🧩 ";break;case"statictheme":n+="🖌 "}return mn({url:e.url})` | |
<div style="padding:5px;display:grid;grid-template-columns:2em 1fr;grid-gap:15px"> | |
<img style="width:2em" src="${e.icon_url}"> | |
<div> | |
<div class="title"><strong>${n}${t}</strong></div> | |
</div> | |
</div> | |
`}));Sn.fa={alias:"fa",name:"firefox-addons",search:`https://addons.mozilla.org/${xn}/firefox/search/?q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?q=",callback:e=>JSON.parse(e.text).results.map((e=>{let{name:t}=e;"object"==typeof t&&(void 0!==t[navigator.language]?t=t[navigator.language]:[t]=Object.values(t));let n="";switch(e.type){case"extension":n+="🧩 ";break;case"statictheme":n+="🖌 "}return mn({url:e.url})` | |
<div style="padding:5px;display:grid;grid-template-columns:2em 1fr;grid-gap:15px"> | |
<img style="width:2em" src="${e.icon_url}"> | |
<div> | |
<div class="title"><strong>${n}${t}</strong></div> | |
</div> | |
</div> | |
`}))},Sn.ft={alias:"ft",name:"firefox-themes",search:`https://addons.mozilla.org/${xn}/firefox/search/?type=statictheme&q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?type=statictheme&q=",callback:Tn},Sn.fe={alias:"fe",name:"firefox-extensions",search:`https://addons.mozilla.org/${xn}/firefox/search/?type=extension&q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?type=extension&q=",callback:Tn},Sn.so={alias:"so",name:"stackoverflow",search:"https://stackoverflow.com/search?q=",compl:"https://api.stackexchange.com/2.2/search/advanced?pagesize=10&order=desc&sort=relevance&site=stackoverflow&q="},Sn.so.callback=e=>JSON.parse(e.text).items.map((e=>hn(`[${e.score}] ${e.title}`,e.link,{query:!1}))),Sn.se={alias:"se",name:"stackexchange",search:"https://stackexchange.com/search?q=",compl:"https://duckduckgo.com/ac/?q=!stackexchange%20"},Sn.se.callback=e=>JSON.parse(e.text).map((e=>e.phrase.replace(/^!stackexchange /,""))),Sn.sg={alias:"sg",name:"Sourcegraph",search:"https://sourcegraph.com/search?q=",compl:"https://sourcegraph.com/.api/graphql?SuggestionsRepo"},Sn.dh={alias:"dh",name:"dockerhub",search:"https://hub.docker.com/search/?page=1&q=",compl:"https://hub.docker.com/v2/search/repositories/?page_size=20&query="},Sn.dh.callback=e=>JSON.parse(e.text).results.map((e=>{let t="",n=e.repo_name;return t+=`[★${e.star_count}] `,t+=`[↓${e.pull_count}] `,-1===n.indexOf("/")&&(n=`_/${n}`),mn({url:`https://hub.docker.com/r/${n}`})` | |
<div> | |
<div class="title"><strong>${n}</strong></div> | |
<div>${t}</div> | |
<div>${e.short_description}</div> | |
</div> | |
`})),Sn.gh={alias:"gh",name:"github",search:"https://github.com/search?q=",compl:"https://api.github.com/search/repositories?sort=stars&order=desc&q="},Sn.gh.callback=e=>JSON.parse(e.text).items.map((e=>{let t="";return e.stargazers_count&&(t+=`[★${Number.parseInt(e.stargazers_count,10)}] `),hn(t+e.full_name,e.html_url,{query:e.full_name,desc:e.description})})),Sn.gst={alias:"gst",name:"Gist [JS]",search:"https://gist.github.com/search?o=desc&s=stars&q=%22%3D%3DUserScript%3D%3D%22+",compl:"https://api.github.com/gists/public?&l=JavaScript&q=per_page=20&q=",favicon:fn("https://gist.github.com"),callback:e=>JSON.parse(e.text).map((e=>{const t=e.description?e.description:"No description";return mn({url:e.html_url})` | |
<div> | |
<div class="title"><strong>${e.owner.login}/${e.files[Object.keys(e.files)[0]].filename}</strong></div> | |
<div>${t}</div> | |
</div> | |
`}))},Sn.vw={alias:"vw",name:"vimwiki",search:"https://vim.fandom.com/wiki/Special:Search?query=",compl:"https://vim.fandom.com/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=10&suggest=true&search="},Sn.vw.callback=e=>JSON.parse(e.text)[1].map((e=>hn(e,`https://vim.fandom.com/wiki/${encodeURIComponent(e)}`,{query:!1}))),Sn.az={alias:"az",name:"amazon",search:"https://smile.amazon.com/s/?field-keywords=",compl:"https://completion.amazon.com/search/complete?method=completion&mkt=1&search-alias=aps&q="},Sn.az.callback=e=>JSON.parse(e.text)[1],Sn.cr={alias:"cr",name:"crates",search:"https://crates.io/search?q=",compl:"https://crates.io/api/v1/crates?q=",callback:e=>JSON.parse(e.text).crates.map((e=>{const t=`[${e.num_downloads} downloads]`;return mn({url:e.documentation})` | |
<div> | |
<div class="title"><strong>${e.name}</strong></div> | |
<div>${e.description}</div> | |
<div>${t}</div> | |
</div> | |
`}))},Sn.cl={alias:"cl",name:"craigslist",search:"https://www.craigslist.org/search/sss?query=",compl:"https://www.craigslist.org/suggest?v=12&type=search&cat=sss&area=1&term="},Sn.cl.callback=e=>JSON.parse(e.text),Sn.eb={alias:"eb",name:"ebay",search:"https://www.ebay.com/sch/i.html?_nkw=",compl:"https://autosug.ebay.com/autosug?callback=0&sId=0&kwd="},Sn.eb.callback=e=>JSON.parse(e.text).res.sug,Sn.un={alias:"un",name:"unicode",search:"https://unicode-table.com/en/search/?q=",compl:"http://localhost:9919/s/unicode?q=",local:!0},Sn.ri={alias:"ri",name:"reddit",search:"https://old.reddit.com/r/"},Sn.usw={alias:"usw",name:"userstyles.world",search:"https://userstyles.world/search?q="},Sn.un.callback=e=>{const t=JSON.parse(e.text).slice(0,20),n="font-family: monospace; background-color: rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.4); border-radius: 5px; padding: 2px 4px; opacity: 70%";return t.map((({symbol:e,name:t,value:o})=>{return mn({url:`https://unicode-table.com/en/${o}`,copy:e})` | |
<div> | |
<span style="font-size: 2em; font-weight: bold; min-width: 1em; margin-left: 0.5em; display: inline-block">${e}</span> | |
<span style="${n}">U+${o}</span> | |
<span style="${n}">&#${Number.parseInt(o,16)};</span> | |
<span>${a=t.toLowerCase(),a.split(" ").map((e=>`${e[0]?.toUpperCase()??""}${e.length>1?e.slice(1):""}`)).join(" ")}</span> | |
</div> | |
`;var a}))},Sn.gr={alias:"gr",name:"grep",search:"https://grep.app/search?q=",compl:"https://grep.app/search?q=",callback:e=>JSON.parse(e.text).map((e=>e.phrase))};const $n=(e,t={})=>{const n={maxDefs:-1,ellipsis:!1,...t};return e.map((e=>{const t=[];let o="";if((n.maxDefs<=-1||n.maxDefs>0)&&e.defs&&e.defs.length>0){for(const o of e.defs.slice(0,n.maxDefs<=-1?void 0:n.maxDefs)){const e=o.split("\t"),n=`(${e[0]})`,a=e[1];t.push(`<span><em>${n}</em> ${a}</span>`)}n.ellipsis&&e.defs.length>n.maxDefs&&t.push("<span><em>…</em></span>"),o=`<div>${t.join("<br />")}</div>`}return mn({url:`${n.wordBaseURL}${e.word}`})` | |
<div> | |
<div class="title"><strong>${e.word}</strong></div> | |
${pn(o)} | |
</div> | |
`}))};Sn.de={alias:"de",name:"define",search:"http://onelook.com/?w=",compl:"https://api.datamuse.com/words?md=d&sp=%s*",opts:{maxDefs:16,ellipsis:!0,wordBaseURL:"http://onelook.com/?w="}},Sn.de.callback=e=>{const t=JSON.parse(e.text);return $n(t,Sn.de.opts)},Sn.cb={alias:"cb",name:"crunchbase",search:"https://www.crunchbase.com/textsearch?q=",compl:`https://api.crunchbase.com/v/3/odm_organizations?user_key=${b.crunchbase}&query=%s`,priv:!0},Sn.th={alias:"th",name:"thesaurus",search:"https://www.onelook.com/thesaurus/?s=",compl:"https://api.datamuse.com/words?md=d&ml=%s",opts:{maxDefs:3,ellipsis:!0,wordBaseURL:"http://onelook.com/thesaurus/?s="}},Sn.th.callback=e=>{const t=JSON.parse(e.text);return $n(t,Sn.th.opts)},Sn.wp={alias:"wp",name:"wikipedia",search:"https://en.wikipedia.org/w/index.php?search=",compl:"https://en.wikipedia.org/w/api.php?action=query&format=json&generator=prefixsearch&prop=info|pageprops%7Cpageimages%7Cdescription&redirects=&ppprop=displaytitle&piprop=thumbnail&pithumbsize=100&pilimit=6&inprop=url&gpssearch="},Sn.wp.callback=e=>Object.values(JSON.parse(e.text).query.pages).map((e=>{const t=e.thumbnail?e.thumbnail.source:kn;return mn({url:e.fullurl})` | |
<div style="padding:5px;display:grid;grid-template-columns:60px 1fr;grid-gap:15px"> | |
<img style="width:60px" src="${t}"> | |
<div> | |
<div class="title"><strong>${e.title}</strong></div> | |
<div class="title">${e.description??""}</div> | |
</div> | |
</div> | |
`})),Sn.wa={alias:"wa",name:"wolframalpha",search:"http://www.wolframalpha.com/input/?i=",compl:`http://api.wolframalpha.com/v2/query?appid=${b.wolframalpha}&format=plaintext,image&output=json&reinterpret=true&input=%s`,priv:!0},Sn.wa.callback=(e,{query:t})=>{const n=JSON.parse(e.text).queryresult;if(n.error)return[mn({url:"https://www.wolframalpha.com/"})` | |
<div> | |
<div class="title"><strong>Error</strong> (Code ${n.error.code})</div> | |
<div class="title">${n.error.msg}</div> | |
</div> | |
`];if(!n.success)return n.tips?[mn({url:"https://www.wolframalpha.com/"})` | |
<div> | |
<div class="title"><strong>No Results</strong></div> | |
<div class="title">${n.tips.text}</div> | |
</div> | |
`]:n.didyoumeans?n.didyoumeans.map((e=>mn({url:"https://www.wolframalpha.com/"})` | |
<div> | |
<div class="title"><strong>Did you mean...?</strong></div> | |
<div class="title">${e.val}</div> | |
</div> | |
`)):[mn({url:"https://www.wolframalpha.com/"})` | |
<div> | |
<div class="title"><strong>Error</strong></div> | |
<div class="title">An unknown error occurred.</div> | |
</div> | |
`];const o=[];return n.pods.forEach((e=>{const n={title:e.title,values:[],url:`http://www.wolframalpha.com/input/?i=${encodeURIComponent(t)}`};e.numsubpods>0&&(e.subpods[0].plaintext&&(n.url=encodeURIComponent(e.subpods[0].plaintext),n.copy=e.subpods[0].plaintext),e.subpods.forEach((e=>{let t="";e.title&&(t=dn`<strong>${e.title}</strong>: `),e.img?t=dn` | |
<div>${t}</div> | |
<div> | |
<img | |
src="${e.img.src}" | |
width="${e.img.width}" | |
height="${e.img.height}" | |
style="margin-top: 6px; padding: 12px; border-radius: 12px; background: white" | |
> | |
</div> | |
`:e.plaintext&&(t=`${t}${e.plaintext}`),t&&(t=dn`<div class="title">${t}</div>`),n.values.push(t)}))),n.values.length>0&&o.push(n)})),o.map((e=>mn({url:e.url,copy:e.copy,query:e.query})` | |
<div> | |
<div class="title"><strong>${e.title}</strong></div> | |
${un(e.values)} | |
</div>`))},Sn.xm={alias:"xm",name:"X my",search:"https://x.com/search?q=from:nicoandmee%20{0}&f=live"},Sn.xp={alias:"xp",name:"X (all)",search:"https://x.com/search?q="},Sn.xu={alias:"oxu",name:"X (from user)",search:"https://x.com/search?q=from:{0}&f=live"},Sn.go={alias:"go",name:"google",search:"https://www.google.com/search?q=",compl:"https://www.google.com/complete/search?client=chrome-omni&gs_ri=chrome-ext&oit=1&cp=1&pgcl=7&q="},Sn.go.callback=e=>JSON.parse(e.text)[1],Sn.gi={alias:"gi",name:"google-images",search:"https://www.google.com/search?tbm=isch&q=",compl:"https://www.google.com/complete/search?client=chrome-omni&gs_ri=chrome-ext&oit=1&cp=1&pgcl=7&ds=i&q=",callback:Sn.go.callback},Sn.gI={alias:"gI",name:"google-reverse-image",search:"https://www.google.com/searchbyimage?image_url="},Sn.gs={alias:"gs",name:"google-scholar",search:"https://scholar.google.com/scholar?q=",compl:"https://scholar.google.com/scholar_complete?q="},Sn.gs.callback=e=>JSON.parse(e.text).l,Sn.ka={alias:"ka",name:"kagi",search:"https://kagi.com/search?q=",compl:"https://kagi.com/autosuggest?q=",callback:e=>JSON.parse(e.text).map((e=>{const t=new URL("https://kagi.com/search");return t.searchParams.append("q",e.t),e.goto&&(t.href=e.goto),mn({url:t.href})` | |
<div style="padding: 5px; display: grid; grid-template-columns: 32px 1fr; grid-gap: 15px"> | |
<img style="width: 32px" src="${e.img?new URL(e.img,"https://kagi.com"):kn}" /> | |
<div> | |
<div class="title"><strong>${e.t}</strong></div> | |
<div class="title">${e.txt??""}</div> | |
</div> | |
</div> | |
`}))},Sn.ba={alias:"ba",name:"brave",search:"https://search.brave.com/search?q=",compl:"https://search.brave.com/api/suggest?rich=false&q=",callback:e=>JSON.parse(e.text).at(1),favicon:fn("https://search.brave.com")},Sn.gd={alias:"gd",name:"Google Drive",search:"https://drive.google.com/drive/u/0/search?q="},Sn.rs={alias:"rs",name:"docs.rs",search:"https://docs.rs/releases/search?query="},Sn.hx={alias:"hx",name:"hex",search:"https://hex.pm/packages?sort=downloads&search=",compl:"https://hex.pm/api/packages?sort=downloads&hx&search="},Sn.hx.callback=e=>JSON.parse(e.text).map((e=>mn({url:e.html_url})` | |
<div> | |
<div class="title">${e.repository}/<strong>${e.name}</strong></div> | |
<div>${e.downloads?.all?`[↓${e.downloads.all}]`:""}</div> | |
<div>${e.meta?.description??""}</div> | |
</div> | |
`)),Sn.hd={alias:"hd",name:"hexdocs",search:"https://hex.pm/packages?sort=downloads&search=",compl:"https://hex.pm/api/packages?sort=downloads&hd&search="},Sn.hd.callback=e=>JSON.parse(e.text).map((e=>mn({url:`https://hexdocs.pm/${encodeURIComponent(e.name)}`})` | |
<div> | |
<div class="title">${e.repository}/<strong>${e.name}</strong></div> | |
<div>${e.downloads?.all?`[↓${e.downloads.all}]`:""}</div> | |
<div>${e.meta?.description??""}</div> | |
</div> | |
`)),Sn.gg=_n({alias:"gg",name:"golang",domain:"golang.org"}),Sn.gp={alias:"gp",name:"gopkg",search:"https://pkg.go.dev/search?q=htmlq&m=package",compl:"https://pkg.go.dev/search?q=",callback:e=>JSON.parse(e.text).Results.map((e=>{const t=new URL("https://pkg.go.dev");return t.searchParams.append("q",e.Name),mn({url:t.href})` | |
<div> | |
<div class="title"><strong>${e.Name}</strong></div> | |
<div>${e.Synopsis}</div> | |
</div> | |
`}))},Sn.tw={alias:"tw",name:"twitter",search:"https://twitter.com/search?q=",compl:"https://twitter.com/i/search/typeahead.json?count=10&filters=true&q="},Sn.tw.callback=e=>JSON.parse(e.text).topics.map((e=>vn(e.topic,{url:`https://twitter.com/search?q=${encodeURIComponent(e.topic)}`}))),Sn.no=_n({alias:"no",name:"node",domain:"nodejs.org"}),Sn.md={alias:"md",name:"mdn",search:"https://developer.mozilla.org/en-US/search?q=",compl:"https://developer.mozilla.org/api/v1/search?q=",callback:e=>JSON.parse(e.text).documents.map((e=>vn(`\n <div>\n <div class="title"><strong>${e.title}</strong></div>\n <div style="font-size:0.8em"><em>${e.slug}</em></div>\n <div>${e.summary}</div>\n </div>\n `,{url:`https://developer.mozilla.org/${e.locale}/docs/${e.slug}`})))},Sn.np={alias:"np",name:"npm",search:"https://www.npmjs.com/search?q=",compl:"https://api.npms.io/v2/search/suggestions?size=20&q=",favicon:fn("https://www.npmjs.com")},Sn.np.callback=e=>JSON.parse(e.text).map((e=>{let t="",n="",o="",a="";return e.package.description&&(n=yn(e.package.description)),e.score?.final&&(a=Math.round(5*Number(e.score.final)),o="⭐".repeat(a)+"☆".repeat(5-a)),e.flags&&Object.keys(e.flags).forEach((e=>{t+=`[<span style='color:#ff4d00'>⚑</span> ${yn(e)}] `})),vn(`\n <div>\n <style>.title>em { font-weight: bold; }</style>\n <div class="title">${e.highlight}</div>\n <div>\n <span style="font-size:1.5em;line-height:1em">${o}</span>\n <span>${t}</span>\n </div>\n <div>${n}</div>\n </div>\n `,{url:e.package.links.npm})})),Sn.pr={alias:"pr",name:"pkg.pr.new",search:"https://pkg.pr.new/",favicon:fn("https://pkg.pr.new")},Sn.ts={alias:"ts",name:"typescript",domain:"www.typescriptlang.org",search:"https://duckduckgo.com/?q=site%3Awww.typescriptlang.org+",compl:"https://bgcdyoiyz5-dsn.algolia.net/1/indexes/typescriptlang?x-algolia-application-id=BGCDYOIYZ5&x-algolia-api-key=37ee06fa68db6aef451a490df6df7c60&query=",favicon:"https://www.typescriptlang.org/favicon-32x32.png"},Sn.ts.callback=async e=>{const t=JSON.parse(e.text);return Object.entries(t.hits.reduce(((e,t)=>{const n=t.hierarchy.lvl0;return e[n]||(e[n]=[]),e[n].push(t),e}),{})).sort((([e],[t])=>e.localeCompare(t))).flatMap((([e,t])=>t.map((e=>{console.log(e);const t=e.type,n=Object.entries(e.hierarchy).reduce(((t,[n,o])=>o&&n!==e.type?`${t?`${t} > `:""}${o}`:t),""),o=e.hierarchy[t],a=e.content;return mn({url:e.url})` | |
<div> | |
<div style="font-weight: bold"> | |
<span style="opacity: 0.6">${pn(n)}${o?" > ":""}</span> | |
<span style="">${pn(o)}</span> | |
</div> | |
<div>${pn(a)}</div> | |
<div style="opacity: 0.6; line-height: 1.3em">${pn(e.url)}</div> | |
</div> | |
`}))))},Sn.lb={alias:"lb",name:"lobsters",domain:"lobste.rs",search:"https://lobste.rs/search?what=comments&order=newest&q="},Sn.dt={alias:"dto",name:"DEV",domain:"dev.to",search:"https://dev.to/search&sort_by=published_at&sort_direction=desc&q="},Sn.rd={alias:"rd",name:"raindrop",domain:"app.raindrop.io",search:"https://api.raindrop.io/v1/raindrops/0?sort=-created&perpage=10&search=",callback:e=>JSON.parse(e.text).items.map((e=>{const t=e.title,n=e.link,o=new URL(n).hostname;return mn({url:n})` | |
<div> | |
<div class="title"><strong>${t}</strong></div> | |
<div>${o}</div> | |
</div> | |
`}))},Sn.br={alias:"br",name:"brew",domain:"formulae.brew.sh",search:"https://formulae.brew.sh/search/",compl:"https://formulae.brew.sh/api/formula.json",favicon:"https://formulae.brew.sh/assets/img/homebrew-256x256.png",callback:e=>JSON.parse(e.text).map((e=>{const t=e.name,n=e.desc;return mn({url:`https://formulae.brew.sh/formula/${e.name}`})` | |
<div> | |
<div class="title"><strong>${t}</strong></div> | |
<div>${n}</div> | |
</div> | |
`}))},Sn.hn={alias:"hn",name:"hackernews",domain:"news.ycombinator.com",search:"https://hn.algolia.com/?query=",compl:"https://hn.algolia.com/api/v1/search?tags=(story,comment)&query=",callback:e=>JSON.parse(e.text).hits.map((e=>{let t="",n="";switch(e.points&&(n+=`[↑${e.points}] `),e.num_comments&&(n+=`[↲${e.num_comments}] `),e._tags[0]){case"story":t=e.title;break;case"comment":t=e.comment_text;break;default:t=e.objectID}const o=`https://news.ycombinator.com/item?id=${encodeURIComponent(e.objectID)}`;return mn({url:o})` | |
<div> | |
<div class="title">${n}${t}</div> | |
<div class="url">${o}</div> | |
</div> | |
`}))},Sn.lr={alias:"lr",name:"luarocks",domain:"luarocks.org",search:"https://luarocks.org/search?q="},Sn.re={alias:"re",name:"reddit",search:"https://www.reddit.com/search?sort=relevance&t=all&q=",compl:"https://api.reddit.com/search?syntax=plain&sort=relevance&limit=20&q="},Sn.re.thumbs={default:"https://i.imgur.com/VCm94xa.png",image:"https://i.imgur.com/OaAUUaQ.png",nsfw:"https://i.imgur.com/lnmJrXP.png",self:"https://i.imgur.com/KQ8uYZz.png",spoiler:"https://i.imgur.com/gx2tGsv.png"},Sn.re.callback=async(e,{query:t})=>{const[n,o,a,i=""]=t.match(/^\s*\/?(r\/[a-zA-Z0-9_]+)(\s+(.*))?/)??[null,null,null,t];if(o&&i)e={text:await wn(`https://api.reddit.com/${encodeURIComponent(o)}/search?syntax=plain&sort=relevance&restrict_sr=on&limit=20&q=${encodeURIComponent(i)}`)};else if(o){const e=await wn(`https://www.reddit.com/api/search_reddit_names.json?typeahead=true&exact=false&query=${encodeURIComponent(o)}`);return JSON.parse(e).names.map((e=>hn(`r/${e}`,`https://reddit.com/r/${encodeURIComponent(e)}`,{query:`r/${e}`})))}return JSON.parse(e.text).data.children.map((({data:e})=>{const t=e.thumbnail?.match(/^https?:\/\//)?e.thumbnail:Sn.re.thumbs[e.thumbnail]??Sn.re.thumbs.default,n=gn(new Date(1e3*Number.parseInt(e.created,10)));return mn({url:encodeURI(`https://reddit.com${e.permalink}`)})` | |
<div style="display: flex; flex-direction: row"> | |
<img style="width: 70px; height: 50px; margin-right: 0.8em" alt="thumbnail" src="${t}"> | |
<div> | |
<div> | |
<strong><span style="font-size: 1.2em; margin-right: 0.2em">↑</span>${e.score}</strong> ${e.title} <span style="font-size: 0.8em; opacity: 60%">(${e.domain})</span> | |
</div> | |
<div> | |
<span style="font-size: 0.8em"><span style="color: opacity: 70%">r/${e.subreddit}</span> • <span style="color: opacity: 70%">${e.num_comments??"unknown"}</span> <span style="opacity: 60%">comments</span> • <span style="opacity: 60%">submitted ${n} by</span> <span style="color: opacity: 70%">${e.author}</span></span> | |
</div> | |
</div> | |
</div> | |
`}))},Sn.ol={alias:"ol",name:"OpenLibrary",domain:"openlibrary.org",search:"https://openlibrary.org/search?q=",compl:"https://openlibrary.org/search.json?q=",callback:e=>JSON.parse(e.text).docs.map((e=>{const t=e.author_name?.[0]??"unknown",n=e.title,o=e.first_publish_year??"unknown";return mn({url:`https://openlibrary.org${e.key}`})` | |
<div> | |
<div class="title"><strong>${n}</strong></div> | |
<div class="title">${t} • ${o}</div> | |
</div> | |
`}))},Sn.devv={alias:"dvai",name:"devv.ai",domain:"devv.ai",search:"https://devv.ai/search/",favicon:"https://devv.ai/favicon.ico"},Sn.yt={alias:"yt",name:"youtube",search:"https://www.youtube.com/search?q=",compl:`https://www.googleapis.com/youtube/v3/search?maxResults=20&part=snippet&type=video,channel&key=${b.google_yt}&safeSearch=none&q=`,priv:!0},Sn.yt.callback=e=>JSON.parse(e.text).items.map((e=>{const t=e.snippet.thumbnails.default;switch(e.id.kind){case"youtube#channel":return mn({url:`https://youtube.com/channel/${e.id.channelId}`})` | |
<div style="display: flex; flex-direction: row"> | |
<img style="${`width: ${t.width??120}px; height: ${t.height??90}px; margin-right: 0.8em`}" alt="thumbnail" src="${t.url}"> | |
<div> | |
<div> | |
<strong>${e.snippet.channelTitle}</strong> | |
</div> | |
<div> | |
<span>${e.snippet.description}</span> | |
</div> | |
<div> | |
<span style="font-size: 0.8em"><span style="opacity: 70%">channel</span></span> | |
</div> | |
</div> | |
</div> | |
`;case"youtube#video":{const n=gn(new Date(e.snippet.publishTime));return mn({url:`https://youtu.be/${encodeURIComponent(e.id.videoId)}`})` | |
<div style="display: flex; flex-direction: row"> | |
<img style="${`width: ${t.width??120}px; height: ${t.height??90}px; margin-right: 0.8em`}" alt="thumbnail" src="${t.url}"> | |
<div> | |
<div> | |
<strong>${pn(e.snippet.title)}</strong> | |
</div> | |
<div> | |
<span>${pn(e.snippet.description)}</span> | |
</div> | |
<div> | |
<span style="font-size: 0.8em"><span style="opacity: 70%">video</span> <span style="opacity: 60%">by</span> <span style="opacity: 70%">${e.snippet.channelTitle}</span> • <span style="opacity: 70%">${n}</span></span> | |
</div> | |
</div> | |
</div> | |
`}default:return null}})).filter((e=>!!e));const Cn=Sn,Rn={rosewater:"#f5e0dc",flamingo:"#f2cdcd",pink:"#f5c2e7",mauve:"#cba6f7",red:"#f38ba8",maroon:"#eba0ac",peach:"#fab387",yellow:"#f9e2af",green:"#a6e3a1",teal:"#94e2d5",sky:"#89dceb",sapphire:"#74c7ec",blue:"#87b0f9",lavender:"#b4befe",text:"#c6d0f5",subtext1:"#b3bcdf",subtext0:"#a1a8c9",overlay3:"#9ca3c0",overlay2:"#8e95b3",overlay1:"#7b819d",overlay0:"#696d86",surface2:"#565970",surface1:"#43465a",surface0:"#313244",base:"#1e1e2e",mantle:"#181825",crust:"#11111b"};const Ln=`font-size: 14pt; font-family: "Iosevka Nerd Font"; border: 0px; color: ${Rn.text} !important; background: ${Rn.base}; background-color: ${Rn.base}`;api.Hints.style(Ln),api.Hints.style(Ln,"text"),api.Visual.style("marks",`background-color: ${Rn.green};`),api.Visual.style("cursor",`background-color: ${Rn.sapphire};`);const En=`\n background: ${Rn.teal} none;\n border: solid 1px ${Rn.blue};\n color: ${Rn.crust};\n font-size: 14px;\n font-weight: 200;\n font-family: "Iosevka Nerd Font";\n padding: 2px;\n text-transform: lowercase;\n`;api.Hints.style(En),api.Hints.style(`div { ${En} }\n div.begin { color: ${Rn.crust}; }`,"text"),api.Hints.charactersUpper=!1;const An=`\n${function(e){return`:root {\n ${Object.entries(e).map((([e,t])=>`\t--ctp-${e.toLowerCase()}: ${t};`)).join("\n")}\n}`}(Rn)}\n :root {\n --font: 'Iosevka Nerd Font', Menlo, sans;\n --font-size: 18;\n --font-weight: bold;\n\n --tridactyl-hintspan-fg: var(--base0A);\n --tridactyl-hintspan-bg: var(--base08);\n --tridactyl-hintspan-border-color: var(--base00);\n --tridactyl-hintspan-border-width: 2px;\n --tridactyl-hintspan-border-radius: 30px;\n --tridactyl-hintspan-margin: 3px;\n --tridactyl-hintspan-border-style: solid;\n\n --tridactyl-fg: var(--base05);\n --tridactyl-bg: var(--base00);\n --tridactyl-url-fg: var(--base08);\n --tridactyl-url-bg: var(--base00);\n --tridactyl-highlight-box-bg: var(--base0B);\n --tridactyl-highlight-box-fg: var(--base00);\n }\n\n\n .sk_theme {\n background: var(--ctp-base);\n color: var(--ctp-text);\n }\n .sk_theme input {\n color: var(--ctp-text);\n }\n .sk_theme .url {\n color: var(--ctp-lavender);\n }\n .sk_theme .annotation {\n color: var(--ctp-rosewater);\n }\n .sk_theme kbd {\n background: var(--ctp-overlay0);\n color: var(--ctp-text);\n }\n .sk_theme .frame {\n background: var(--ctp-surface1);\n }\n .sk_theme .omnibar_highlight {\n color: var(--ctp-overlay1);\n }\n .sk_theme .omnibar_folder {\n color: var(--ctp-text);\n }\n .sk_theme .omnibar_timestamp {\n color: var(--ctp-blue);\n }\n .sk_theme .omnibar_visitcount {\n color: var(--ctp-maroon);\n }\n .sk_theme .prompt, .sk_theme .resultPage {\n color: var(--ctp-text);\n }\n .sk_theme .feature_name {\n color: var(--ctp-text);\n }\n .sk_theme .separator {\n color: var(--ctp-overlay1);\n }\n body {\n margin: 0;\n font-family: "Iosevka Nerd Font", "Cascadia Code", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 16px;\n }\n #sk_omnibar {\n overflow: hidden;\n position: fixed;\n width: 80%;\n max-height: 80%;\n left: 10%;\n text-align: left;\n box-shadow: 0px 2px 10px var(--ctp-overlay0);\n z-index: 2147483000;\n }\n .sk_omnibar_middle {\n top: 10%;\n border-radius: 4px;\n }\n .sk_omnibar_bottom {\n bottom: 0;\n border-radius: 4px 4px 0px 0px;\n }\n #sk_omnibar span.omnibar_highlight {\n text-shadow: 0 0 0.01em;\n }\n #sk_omnibarSearchArea .prompt, #sk_omnibarSearchArea .resultPage {\n display: inline-block;\n font-size: 20px;\n width: auto;\n }\n #sk_omnibarSearchArea>input {\n display: inline-block;\n width: 100%;\n flex: 1;\n font-size: 20px;\n margin-bottom: 0;\n padding: 0px 0px 0px 0.5rem;\n background: transparent;\n border-style: none;\n outline: none;\n }\n #sk_omnibarSearchArea {\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--ctp-overlay1);\n }\n .sk_omnibar_middle #sk_omnibarSearchArea {\n margin: 0.5rem 1rem;\n }\n .sk_omnibar_bottom #sk_omnibarSearchArea {\n margin: 0.2rem 1rem;\n }\n .sk_omnibar_middle #sk_omnibarSearchResult>ul {\n margin-top: 0;\n }\n .sk_omnibar_bottom #sk_omnibarSearchResult>ul {\n margin-bottom: 0;\n }\n #sk_omnibarSearchResult {\n max-height: 60vh;\n overflow: hidden;\n margin: 0rem 0.6rem;\n }\n #sk_omnibarSearchResult:empty {\n display: none;\n }\n #sk_omnibarSearchResult>ul {\n padding: 0;\n }\n #sk_omnibarSearchResult>ul>li {\n padding: 0.2rem 0rem;\n display: block;\n max-height: 600px;\n overflow-x: hidden;\n overflow-y: auto;\n }\n .sk_theme #sk_omnibarSearchResult>ul>li:nth-child(odd) {\n background: var(--ctp-surface1);\n }\n .sk_theme #sk_omnibarSearchResult>ul>li.focused {\n background: var(--ctp-overlay0);\n }\n .sk_theme #sk_omnibarSearchResult>ul>li.window {\n border: 2px solid var(--ctp-overlay1);\n border-radius: 8px;\n margin: 4px 0px;\n }\n .sk_theme #sk_omnibarSearchResult>ul>li.window.focused {\n border: 2px solid var(--ctp-lavender);\n }\n .sk_theme div.table {\n display: table;\n }\n .sk_theme div.table>* {\n vertical-align: middle;\n display: table-cell;\n }\n #sk_omnibarSearchResult li div.title {\n text-align: left;\n }\n #sk_omnibarSearchResult li div.url {\n font-weight: bold;\n white-space: nowrap;\n }\n #sk_omnibarSearchResult li.focused div.url {\n white-space: normal;\n }\n #sk_omnibarSearchResult li span.annotation {\n float: right;\n }\n #sk_omnibarSearchResult .tab_in_window {\n display: inline-block;\n padding: 5px;\n margin: 5px;\n box-shadow: 0px 2px 10px var(--ctp-overlay0);\n }\n #sk_status {w\n position: fixed;\n bottom: 0;\n right: 20%;\n z-index: 2147483000;\n padding: 4px 8px 0 8px;\n border-radius: 4px 4px 0px 0px;\n border: 1px solid var(--ctp-overlay1);\n font-size: 12px;\n }\n #sk_status>span {\n line-height: 16px;\n }\n .expandRichHints span.annotation {\n padding-left: 4px;\n color: var(--ctp-rosewater);\n }\n .expandRichHints .kbd-span {\n min-width: 30px;\n text-align: right;\n display: inline-block;\n }\n .expandRichHints kbd>.candidates {\n color: var(--ctp-text);\n font-weight: bold;\n }\n .expandRichHints kbd {\n padding: 1px 2px;\n }\n #sk_find {\n border-style: none;\n outline: none;\n }\n #sk_keystroke {\n padding: 6px;\n position: fixed;\n float: right;\n bottom: 0px;\n z-index: 2147483000;\n right: 0px;\n background: var(--ctp-base);\n color: var(--ctp-text);\n }\n #sk_usage, #sk_popup, #sk_editor {\n overflow: auto;\n position: fixed;\n width: 80%;\n max-height: 80%;\n top: 10%;\n left: 10%;\n text-align: left;\n box-shadow: var(--ctp-overlay0);\n z-index: 2147483298;\n padding: 1rem;\n }\n #sk_nvim {\n position: fixed;\n top: 10%;\n left: 10%;\n width: 80%;\n height: 30%;\n }\n #sk_popup img {\n width: 100%;\n }\n #sk_usage>div {\n display: inline-block;\n vertical-align: top;\n }\n #sk_usage .kbd-span {\n width: 80px;\n text-align: right;\n display: inline-block;\n }\n #sk_usage .feature_name {\n text-align: center;\n padding-bottom: 4px;\n }\n #sk_usage .feature_name>span {\n border-bottom: 2px solid $highlightHigh;\n }\n #sk_usage span.annotation {\n padding-left: 32px;\n line-height: 22px;\n }\n #sk_usage * {\n font-size: 10pt;\n }\n kbd {\n white-space: nowrap;\n display: inline-block;\n padding: 3px 5px;\n font: 11px "Iosevka Nerd Font", "Cascadia Code", "Helvetica Neue", Helvetica, Arial, sans-serif;\n line-height: 10px;\n vertical-align: middle;\n border: solid 1px var(--ctp-overlay3);\n border-bottom-lolor: var(--ctp-overlay3);\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 var(--ctp-overlay0);\n }\n #sk_banner {\n padding: 0.5rem;\n position: fixed;\n left: 10%;\n top: -3rem;\n z-index: 2147483000;\n width: 80%;\n border-radius: 0px 0px 4px 4px;\n border: 1px solid var(--ctp-overlay1);\n border-top-style: none;\n text-align: center;\n background: var(--ctp-base);\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n #sk_tabs {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n overflow: auto;\n z-index: 2147483000;\n }\n div.sk_tab {\n display: inline-flex;\n height: 28px;\n width: 202px;\n justify-content: space-between;\n align-items: center;\n flex-direction: row-reverse;\n border-radius: 3px;\n padding: 10px 20px;\n margin: 5px;\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,var(--ctp-base)), color-stop(100%,var(--ctp-base)));\n box-shadow: 0px 3px 7px 0px var(--ctp-overlay0);\n }\n div.sk_tab_wrap {\n display: inline-block;\n flex: 1;\n }\n div.sk_tab_icon {\n display: inline-block;\n vertical-align: middle;\n }\n div.sk_tab_icon>img {\n width: 18px;\n }\n div.sk_tab_title {\n width: 150px;\n display: inline-block;\n vertical-align: middle;\n font-size: 10pt;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-left: 5px;\n color: var(--ctp-text);\n }\n div.sk_tab_url {\n font-size: 10pt;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: var(--ctp-lavender);\n }\n div.sk_tab_hint {\n display: inline-block;\n float:right;\n font-size: 10pt;\n font-weight: bold;\n padding: 0px 2px 0px 2px;\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,var(--ctp-base)), color-stop(100%,var(--ctp-base)));\n color: var(--ctp-text);\n border: solid 1px var(--ctp-overlay1);\n border-radius: 3px;\n box-shadow: var(--ctp-overlay0);\n }\n #sk_tabs.vertical div.sk_tab_hint {\n position: initial;\n margin-inline: 0;\n }\n div.tab_rocket {\n display: none;\n }\n #sk_bubble {\n position: absolute;\n padding: 9px;\n border: 1px solid var(--ctp-overlay1);\n border-radius: 4px;\n box-shadow: 0 0 20px var(--ctp-overlay0);\n color: var(--ctp-text);\n background-color: var(--ctp-base);\n z-index: 2147483000;\n font-size: 14px;\n }\n #sk_bubble .sk_bubble_content {\n overflow-y: scroll;\n background-size: 3px 100%;\n background-position: 100%;\n background-repeat: no-repeat;\n }\n .sk_scroller_indicator_top {\n background-image: linear-gradient(var(--ctp-base), transparent);\n }\n .sk_scroller_indicator_middle {\n background-image: linear-gradient(transparent, var(--ctp-base), transparent);\n }\n .sk_scroller_indicator_bottom {\n background-image: linear-gradient(transparent, var(--ctp-base), transparent);\n }\n #sk_bubble * {\n color: var(--ctp-text) !important;\n }\n div.sk_arrow>div:nth-of-type(1) {\n left: 0;\n position: absolute;\n width: 0;\n border-left: 12px solid transparent;\n border-right: 12px solid transparent;\n background: transparent;\n }\n div.sk_arrow[dir=down]>div:nth-of-type(1) {\n border-top: 12px solid var(--ctp-overlay1);\n }\n div.sk_arrow[dir=up]>div:nth-of-type(1) {\n border-bottom: 12px solid var(--ctp-overlay1);\n }\n div.sk_arrow>div:nth-of-type(2) {\n left: 2px;\n position: absolute;\n width: 0;\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n background: transparent;\n }\n div.sk_arrow[dir=down]>div:nth-of-type(2) {\n border-top: 10px solid var(--ctp-text);\n }\n div.sk_arrow[dir=up]>div:nth-of-type(2) {\n top: 2px;\n border-bottom: 10px solid var(--ctp-text);\n }\n .ace_editor.ace_autocomplete {\n z-index: 2147483300 !important;\n width: 80% !important;\n }\n @media only screen and (max-width: 767px) {\n #sk_omnibar {\n width: 100%;\n left: 0;\n }\n #sk_omnibarSearchResult {\n max-height: 50vh;\n overflow: scroll;\n }\n .sk_omnibar_bottom #sk_omnibarSearchArea {\n margin: 0;\n padding: 0.2rem;\n }\n }\n`;const Nn={settings:{hintAlign:"left",hintCharacters:"fdsajklghvcxzmbnuioprewqty",hintsCharactersAll:"crhtnsueoabmwvzkjq;",hintsCharactersLeft:"iueoakjq;",hintsCharactersRight:"dhtnsbmwvzcr",omnibarSuggestionTimeout:500,omnibarMaxResults:40,richHintsForKeystroke:1,stealFocusOnLoad:!1,defaultSearchEngine:"g",enableAutoFocus:!0,modeAfterYank:"Normal",noPdfViewer:!0,smoothScroll:!0,tabsMRUOrder:!0,scrollStepSize:140,omnibarHistoryCacheSize:1e3,tabsThreshold:0,theme:An,nextLinkRegex:/(>>|\bnext(ous)?\b|后页|下一頁|后一頁|下頁|后頁)/i,prevLinkRegex:/(<<|\bprev(ious)?\b|上一页|前一页|上页|前页|上一頁|前一頁|上頁|前頁)/i,optionalRegex:/(\b(confirm|okay|ok|understand|g(e|o)t\sit|accept|dismiss|close|continue|cancel|yes|no)\b)/i,loginLinkRegex:/(\blog\b|\bsign\b|\bjoin\b|登录|注册|加入|登錄|註冊|加入)/i,lurkingPattern:function(){const e=["\bgithub.com\b","\bperplexity.ai\b","\bsourcegraph.com\b","\bcl.localhost\b","\bchatlands.com\b","\bkermit.dog\b"].join("|");return new RegExp(`.*${e}.*`,"i")}(),blocklistPattern:new RegExp(["youtube.com/watch","console.aws.amazon.com","colab.research.google.com","www.notion.so","docs.google.com","mail.google.com","calendar.google.com","readwise.io","udemy.com","overleaf.com","duolingo.com"].join("|"),"i")},keys:ln,searchEngines:Cn,siteleader:"<Space>",searchleader:"a",logLevels:["log","warn","error"]},{categories:On}=Kt,{mapkey:In,map:qn,unmap:Pn,Clipboard:jn,Front:Dn,removeSearchAlias:Un,addSearchAlias:Mn,Hints:Hn,Visual:Fn}=t,zn=(e,t,n)=>{const o=Object.entries(t).flatMap((([t,n])=>n.flatMap((n=>({[n]:e[t]}))))),a=Object.assign({},e,...o);Object.entries(a).forEach((([e,t])=>t.forEach((t=>((e,t,n)=>{const{alias:o,callback:a,leader:i=("global"===e?"":n),category:r=On.misc,description:s="",path:c="(/.*)?"}=t,l={},p=`${i}${o}`;if("global"!==e){const t=e.replace(".","\\.");l.domain=new RegExp(`^http(s)?://(([a-zA-Z0-9-_]+\\.)*)(${t})${c}`)}const d=`#${r} ${s}`;void 0!==t.map?qn(o,t.map):In(p,d,a,l)})(e,t,n)))))},Bn=async()=>{if(window.surfingKeys=t,Nn.settings&&Object.assign(settings,"function"==typeof Nn.settings?Nn.settings():Nn.settings),Nn.logLevels)try{await chrome.storage.local.set({logLevels:Nn.logLevels})}catch(e){console.error(e)}if(Nn.keys&&Nn.keys.unmaps){const{unmaps:e}=Nn.keys;e.mappings&&e.mappings.forEach((e=>Pn(e))),e.searchAliases&&Object.entries(e.searchAliases).forEach((([e,t])=>{t.forEach((t=>Un(t,e)))}))}var e,n;if(Nn.searchEngines&&(e=Nn.searchEngines,n=Nn.searchleader??"o",Object.values(e).forEach((e=>{const t={favicon_url:e.favicon,skipMaps:!0};Mn(e.alias,e.name,e.search,"",e.compl,e.callback,void 0,t),In(`${n}${e.alias}`,`#8Search ${e.name}`,(()=>Dn.openOmnibar({type:"SearchEngine",extra:e.alias}))),In(`c${n}${e.alias}`,`#8Search ${e.name} with clipboard contents`,(()=>{jn.read((t=>{Dn.openOmnibar({type:"SearchEngine",pref:t.data,extra:e.alias})}))}))}))),Nn.keys&&Nn.keys.maps){const{keys:e}=Nn,{maps:t,aliases:n={}}=e;zn(t,n,Nn.siteleader)}Hn.characters="qwertyuiopasdfghjklzxcvbnm"};"undefined"!=typeof window&&Bn()})()})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment