PageSourceSearch

https://assets.dev.to/assets/articlePage-7386c745667022e7147503d288454cfce459f2019ee90ce454e641a116844837.js

js dev.to collected 2026-10-01 07:09:19 UTC 33,879 bytes, 2 lines download raw bytes

1(()=>{function t(){return document.getElementsByClassName("js-fullscreen-code")[0]}function e(){var e;return!(null==(e=t())||!e.classList.contains("is-open"))}function n(){globalThis.scrollTo(0,tt)}function r(){tt=globalThis.scrollY}function o(t){"Escape"==t.key&&d(t)}function i(t){t?document.body.addEventListener("keyup",o):document.body.removeEventListener("keyup",o)}function a(){d()}function s(t){t?globalThis.addEventListener("popstate",a):globalThis.removeEventListener("popstate",a)}function l(t){document.body.style.overflow=t?"hidden":""}function c(t){if(t)for(let e of t)e.addEventListener("click",d)}function u(t){if(t)for(let e of t)e.removeEventListener("click",d)}function d(o){let a=t(),d=null!=o&&o.currentTarget.closest(".js-code-highlight")?o.currentTarget.closest(".js-code-highlight").cloneNode(!0):null,p=d?d.getElementsByClassName("js-fullscreen-code-action"):null;if(e())l(!1),n(),i(!1),s(!1),u(p),a.classList.remove("is-open"),a.replaceChildren();else{if(!d||!a)return l(!1),i(!1),void s(!1);l(!0),r(),i(!0),s(!0),d.classList.add("is-fullscreen"),a.appendChild(d),a.classList.add("is-open"),c(p)}}function p(t){return it.test(t||"")}function f(t){let e,n,r,o,i,a=t.getElementsByTagName("script");for(i=0;i<a.length;i++)if(e=a[i],e){n=document.createElement("script");for(let t=0;t<e.attributes.length;t++)n.setAttribute(e.attributes[t].name,e.attributes[t].value);n.textContent=e.textContent,r=e.parentNode,o=e.nextSibling,r.removeChild(e),r.insertBefore(n,o)}}function m(){let t=new IntersectionObserver((t=>{t.forEach((t=>{let e=t.target;if(t.isIntersecting&&t.intersectionRatio>=.25)e.dataset.isBillboardVisible="true",setTimeout((()=>{"true"===e.dataset.isBillboardVisible&&(h(e),y(e))}),200);else{e.dataset.isBillboardVisible="false";let t=e.dataset.pollingIntervalId;t&&(clearInterval(Number(t)),e.removeAttribute("data-polling-interval-id"))}}))}),{root:null,rootMargin:"0px",threshold:.25});document.querySelectorAll("[data-display-unit]").forEach((e=>{let n=window.location.pathname;t.observe(e),e.removeEventListener("click",b,!1),e.addEventListener("click",(()=>b(e,event,n)))}))}function h(t){let e=p(navigator.userAgent),n=t.dataset.impressionRecorded;if(e||n)return;let r=document.querySelector("meta[name='csrf-token']"),o=r&&r.getAttribute("content"),i={billboard_event:{billboard_id:t.dataset.id,context_type:t.dataset.contextType,category:t.dataset.categoryImpression,article_id:t.dataset.articleId}};window.fetch("/bb_tabulations",{method:"POST",headers:{"X-CSRF-Token":o,"Content-Type":"application/json"},body:JSON.stringify(i),credentials:"same-origin"}).then((t=>{if(t&&t.ok&&"function"==typeof t.json)return t.json()})).then((e=>{e&&e.id&&(t.dataset.eventId=e.id)})).catch((t=>console.error(t))),t.dataset.impressionRecorded=!0}function g(t){let e=t.dataset.eventId;if(!e)return;let n=document.querySelector("meta[name='csrf-token']"),r=n&&n.getAttribute("content");window.fetch(`/bb_tabulations/${e}`,{method:"PATCH",headers:{"X-CSRF-Token":r,"Content-Type":"application/json"},credentials:"same-origin"}).catch((t=>console.error(t)))}function y(t){if(t.dataset.pollingIntervalId)return;let e=setInterval((()=>{"visible"===document.visibilityState&&"true"===t.dataset.isBillboardVisible&&g(t)}),1e4);t.dataset.pollingIntervalId=e}function b(t,e,n){if(!e.target.closest("a"))return;let r={billboard_event:{billboard_id:t.dataset.id,context_type:t.dataset.contextType,category:t.dataset.categoryClick,article_id:t.dataset.articleId}};if(localStorage){let t=localStorage.getItem("last_interacted_billboard");if(t)try{let e=JSON.parse(t);if(e.billboard_event&&e.billboard_event.billboard_id===r.billboard_event.billboard_id&&e.path===n)return}catch{}r.path=n,r.time=new Date,localStorage.setItem("last_interacted_billboard",JSON.stringify(r))}let o=p(navigator.userAgent),i=t.dataset.clickRecorded;if(o||i)return;let a=document.querySelector("meta[name='csrf-token']"),s=a&&a.getAttribute("content");window.fetch("/bb_tabulations",{method:"POST",headers:{"X-CSRF-Token":s,"Content-Type":"application/json"},body:JSON.stringify(r),credentials:"same-origin"}),t.dataset.clickRecorded=!0}function v(){let t=document.querySelectorAll("button[id^=sponsorship-dropdown-trigger-]");t.length&&t.forEach((t=>{w(t);let e=t.getAttribute("aria-controls");t&&"true"!==t.dataset.initialized&&(ot({triggerElementId:t.id,dropdownContentId:e}),t.dataset.initialized="true");let n=t.closest(".popover-billboard");n&&t.getBoundingClientRect().top>window.innerHeight/2&&n.classList.add("popover-billboard--menuopenupwards")})),E();let e=document.querySelectorAll("button[id^=sponsorship-close-trigger-]");e.length&&e.forEach((t=>{t.addEventListener("click",(()=>{_(t)})),t.closest(".popover-billboard")&&document.addEventListener("click",(e=>{e.target.closest(".crayons-article__header")&&"none"!==document.querySelector(".popover-billboard").style.display&&e.preventDefault(),e.target.closest(".
1js-billboard")||_(t)}))}))}function w(t){t.closest(".js-billboard").clientHeight<220&&(t.closest(".js-billboard").style.overflowY="revert")}function T(){let t=document.getElementById("persistent-minimized-billboard-container");if(t)return t;t=document.createElement("div"),t.id="persistent-minimized-billboard-container",t.className="crayons-article-sticky grid gap-4 break-word hidden mt-4";let e=document.querySelector(".crayons-layout__sidebar-right");if(e){let n=e.querySelector(".sidebar-bb");n?n.insertAdjacentElement("afterend",t):e.appendChild(t)}else document.body.appendChild(t);return t}function _(t){let e=t.closest(".js-billboard");if(!e)return;let n=e.dataset.dismissalSku;if("persistent"===e.dataset.special){let t=e.querySelector(".js-minimized-template"),n=document.getElementById("persistent-minimized-billboard-container");n||(n=T()),t&&n&&(n.innerHTML=t.innerHTML,n.classList.remove("hidden"),f(n),m(),e.innerHTML="")}if(e.style.display="none",localStorage&&n&&n.length>0){let t=JSON.parse(localStorage.getItem("dismissal_skus_triggered"))||[];t.includes(n)||(t.push(n),localStorage.setItem("dismissal_skus_triggered",JSON.stringify(t)))}}function E(){let t=document.body.dataset.user;if(t)try{JSON.parse(t).admin&&document.querySelectorAll(".js-admin-billboard-link").forEach((t=>{t.classList.remove("hidden")}))}catch(t){console.warn("Error parsing user data for admin billboard links:",t)}}async function k(){if(W)return W;let{default:t}=await Promise.resolve().then((()=>Y(G())));return W=t}function S(t){let e=[];for(let n of t)1===n.nodeType&&(n.classList.contains("ltag_gist-liquid-tag")&&e.push(n),e.push(...n.querySelectorAll(".ltag_gist-liquid-tag")));return e}function x(t,e){for(let n of e){let e=n.firstElementChild;t(n,e.outerHTML,{beforeWrite:t=>n.childElementCount>3?"":t}),e.remove()}}function I(t,e){let n={attributes:!1,childList:!0,subtree:!0},r=new MutationObserver((function(t){for(let{type:n,addedNodes:r}of t)"childList"===n&&r.length>0&&x(e,S(r))}));r.observe(t,n),InstantClick.on("change",(()=>{r.disconnect()})),window.addEventListener("beforeunload",(()=>{r.disconnect()}))}async function A(t){let e=await k();x(e,document.querySelectorAll(".ltag_gist-liquid-tag")),I(t,e)}function C(){let t=document.createElement("div");t.id=lt,t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-label","Image preview");let e=document.createElement("button");e.className="image-lightbox__close",e.setAttribute("aria-label","Close image preview"),e.setAttribute("type","button"),e.innerHTML="&times;";let n=document.createElement("div");n.className="image-lightbox__img-wrapper",n.setAttribute("role","presentation");let r=document.createElement("img");return r.className="image-lightbox__img",r.setAttribute("alt",""),n.appendChild(r),t.appendChild(e),t.appendChild(n),{overlay:t,closeBtn:e,img:r}}function N(){let t=document.getElementById(lt);if(t)return{overlay:t,closeBtn:t.querySelector(".image-lightbox__close"),img:t.querySelector(".image-lightbox__img")};let e=C();return document.body.appendChild(e.overlay),e}function L(t){"Escape"===t.key&&B()}function O(t){let e=document.getElementById(lt),n=document.querySelector(".image-lightbox__close");(t.target===e||t.target===n)&&B()}function j(t,e){let{overlay:n,closeBtn:r,img:o}=N();n._timeout&&(clearTimeout(n._timeout),n._timeout=null),"function"==typeof n._cleanup&&n._cleanup(),n._triggerElement=document.activeElement,o.src=t,o.alt=e||"",n.classList.add("image-lightbox--visible"),document.documentElement.classList.add("image-lightbox-open"),requestAnimationFrame((()=>r.focus())),n.addEventListener("click",O),document.addEventListener("keydown",L),n._cleanup=()=>{n.removeEventListener("click",O),document.removeEventListener("keydown",L)}}function B(){let t=document.getElementById(lt);t&&(t.classList.remove("image-lightbox--visible"),document.documentElement.classList.remove("image-lightbox-open"),"function"==typeof t._cleanup&&(t._cleanup(),delete t._cleanup),t._triggerElement&&"function"==typeof t._triggerElement.focus&&(t._triggerElement.focus(),delete t._triggerElement),t._timeout=setTimeout((()=>{let e=t.querySelector(".image-lightbox__img");e&&(e.src=""),t._timeout=null}),350))}function M(t=document){let e=t===document?document.body:t;"true"!==e.dataset.imageLightboxInit&&(e.dataset.imageLightboxInit="true",e.addEventListener("click",(t=>{let e=t.target.closest("a.article-body-image-wrapper");if(!e)return;t.preventDefault(),t.stopPropagation();let n=e.querySelector("img"),r=e.getAttribute("href")||n&&n.src||"",o=n&&n.getAttribute("alt")||"";r&&j(r,o)})),window.InstantClick&&!B.isBound&&(B.isBound=!0,window.InstantClick.on("change",B)))}function q(){let t=document.querySelectorAll("a[href]"),e=window.location.hostname;t.forEach((t=>{let n=t.getAttribute("href");if(n&&(n.startsWith("http://")||n.startsWith("https://"))&&!n.includes(e)){t.setAttribute("target","_blank");let e=t.getAttribute("rel"),n=["noopener","noreferrer"];if(e){let r=e.split(" "),o=[...new Set([...r,...n])].join(" ");t.setAttribute("rel",o)}else t.setAttribute("rel",n.join(" "))}}))}function P(){document.getElementById("article-copy-link-announcer").hidden=!0}function F(){document.getElementById("article-copy-link-announcer").hidden=!1}function R(){if("#comments"===location.hash){let t=document.getElementById("text-area"),e=new FocusEvent("focus");t.dispatchEvent(e)}}function H(){let t=document.getElementById("aync-bottom-content"),e=document.getElementById("article-show-container"),n=document.getElementById("comments");if(!t)return;let r=new IntersectionObserver((o=>{o.forEach((o=>{o.isIntersecting&&(window.fetch(`/bottom_items?article_id=${e.dataset.articleId}`).then((e=>{e.text().then((e=>{t.innerHTML=e,"function"==typeof formatAllTimeElements&&formatAllTimeElements(t)}))})),r.unobserve(n))}))}));r.observe(n)}function D(){let t=document.getElementById("copy-post-url-button").getAttribute("data-postUrl");st(t).then((()=>{F()}))}var W,z=Object.create,$=Object.defineProperty,U=Object.getOwnPropertyDescriptor,Q=Object.getOwnPropertyNames,J=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty,K=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),X=(t,e,n,r)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let o of Q(e))!V.call(t,o)&&o!==n&&$(t,o,{get:()=>e[o],enumerable:!(r=U(e,o))||r.enumerable});return t},Y=(t,e,n)=>(n=null!=t?z(J(t)):{},X(!e&&t&&t.__esModule?n:$(n,"default",{value:t,enumerable:!0}),t)),Z=K(((t,e)=>{function n(t,e,n){function o(e){var n=h,r=g;return h=g=void 0,k=e,b=t.apply(r,n)}function i(t){return k=t,_=setTimeout(u,e),S?o(t):b}function l(t){var n=e-(t-E);return x?w(n,y-(t-k)):n}function c(t){var n=t-E;return void 0===E||n>=e||n<0||x&&t-k>=y}function u(){var t=T();if(c(t))return d(t);_=setTimeout(u,l(t))}function d(t){return _=void 0,I&&h?o(t):(h=g=void 0,b)}function p(){void 0!==_&&clearTimeout(_),k=0,h=E=g=_=void 0}function f(){return void 0===_?b:d(T())}function m(){var t=T(),n=c(t);if(h=arguments,g=this,E=t,n){if(void 0===_)return i(E);if(x)return _=setTimeout(u,e),o(E)}return void 0===_&&(_=setTimeout(u,e)),b}
1var h,g,y,b,_,E,k=0,S=!1,x=!1,I=!0;if("function"!=typeof t)throw new TypeError(s);return e=a(e)||0,r(n)&&(S=!!n.leading,y=(x="maxWait"in n)?v(a(n.maxWait)||0,e):y,I="trailing"in n?!!n.trailing:I),m.cancel=p,m.flush=f,m}function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function o(t){return!!t&&"object"==typeof t}function i(t){return"symbol"==typeof t||o(t)&&b.call(t)==c}function a(t){if("number"==typeof t)return t;if(i(t))return l;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(u,"");var n=p.test(t);return n||f.test(t)?m(t.slice(2),n?2:8):d.test(t)?l:+t}var s="Expected a function",l=NaN,c="[object Symbol]",u=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,f=/^0o[0-7]+$/i,m=parseInt,h="object"==typeof window&&window&&window.Object===Object&&window,g="object"==typeof self&&self&&self.Object===Object&&self,y=h||g||Function("return this")(),b=Object.prototype.toString,v=Math.max,w=Math.min,T=function(){return y.Date.now()};e.exports=n})),G=K(((t,e)=>{var n,r;n=t,r=function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=r(n(1));t.exports=o.default},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(){}function a(){var t=m.shift();if(t){var e=d.last(t);e.afterDequeue(),t.stream=s.apply(void 0,t),e.afterStreamStart()}}function s(t,e,n){function r(t){t=n.beforeWrite(t),h.write(t),n.afterWrite(t)}(h=new u.default(t,n)).id=f++,h.name=n.name||h.id,l.streams[h.name]=h;var o=t.ownerDocument,s={close:o.close,open:o.open,write:o.write,writeln:o.writeln};c(o,{close:i,open:i,write:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return r(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return r(e.join("")+"\n")}});var d=h.win.onerror||i;return h.win.onerror=function(t,e,r){n.error({msg:t+" - "+e+": "+r}),d.apply(h.win,[t,e,r])},h.write(e,(function(){c(o,s),h.win.onerror=d,n.done(),h=null,a()})),h}function l(t,e,n){if(d.isFunction(n))n={done:n};else if("clear"===n)return m=[],h=null,void(f=0);n=d.defaults(n,p);var r=[t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t,e,n];return t.postscribe={cancel:function(){r.stream?r.stream.abort():r[1]=i}},n.beforeEnqueue(r),m.push(r),h||a(),t.postscribe}e.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=l;var u=o(n(2)),d=r(n(4)),p={afterAsync:i,afterDequeue:i,afterStreamStart:i,afterWrite:i,autoFix:!0,beforeEnqueue:i,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:i,error:function(t){throw new Error(t.msg)},releaseAsync:!1},f=0,m=[],h=null;c(l,{streams:{},queue:m,WriteStream:u.default})},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){var n=p+e,r=t.getAttribute(n);return u.existy(r)?String(r):r}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=p+e;u.existy(n)&&""!==n?t.setAttribute(r,n):t.removeAttribute(r)}e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=o(n(3)),u=r(n(4)),d=!1,p="data-ps-",f="ps-style",m="ps-script",h=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.root=e,this.options=n,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new c.default("",{autoFix:n.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],s(this.proxyRoot,"proxyof",0)}return t.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();u.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},t.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},t.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,n=void 0,r=void 0,o=[];(e=this.parser.readToken())&&!(n=u.isScript(e))&&!(r=u.isStyle(e));)(e=this.options.beforeWriteToken(e))&&o.push(e);o.length>0&&this._writeStaticTokens(o),n&&this._handleScriptToken(e),r&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,d&&(e.proxyInnerHTML=this.proxyRoot.innerHTML),this._walkChunk(),d&&(e.actualInnerHTML=this.root.innerHTML),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,n=[],r=[],o=[],i=t.length,a=0;a<i;a++){var s=t[a],l=s.toString();if(n.push(l),s.attrs){if(!/^noscript$/i.test(s.tagName)){var c=e++;r.push(l.replace(/(\/?>)/," "+p+"id="+c+" $1")),s.attrs.id!==m&&s.attrs.id!==f&&o.push("atomicTag"===s.type?"":"<"+s.tagName+" "+p+"proxyof="+c+(s.unary?" />":">"))}}else r.push(l),o.push("endTag"===s.type?l:"")}return{tokens:t,raw:n.join(""),actual:r.join(""),proxy:o.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];u.existy(t=e.shift());){var n=1===t.nodeType;
1if(!n||!a(t,"proxyof")){n&&(this.actuals[a(t,"id")]=t,s(t,"id"));var r=t.parentNode&&a(t.parentNode,"proxyof");r&&this.actuals[r].appendChild(t)}e.unshift.apply(e,u.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,n=this.parser.clear();n&&this.writeQueue.unshift(n),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,(function(){e._onScriptDone(t)})))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",(t=this.options.beforeWriteToken(t))&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,f),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),u.eachKey(t.attrs,(function(t,n){e.setAttribute(t,n)})),e},t.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var n=this.doc.getElementById(e);n&&n.parentNode.replaceChild(t,n)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){t===this.scriptStack[0]?(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)):this.options.error({msg:"Bad script nesting or script finished twice"})},t.prototype._writeScriptToken=function(t,e){var n=this._buildScript(t),r=this._shouldRelease(n),o=this.options.afterAsync;t.src&&(n.src=t.src,this._scriptLoadHandler(n,r?o:function(){e(),o()}));try{this._insertCursor(n,m),(!n.src||r)&&e()}catch(t){this.options.error(t),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return u.eachKey(t.attrs,(function(t,n){e.setAttribute(t,n)})),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function n(){t=t.onload=t.onreadystatechange=t.onerror=null}function r(){n(),null!=e&&e(),e=null}function o(t){n(),a(t),null!=e&&e(),e=null}function i(t,e){var n=t["on"+e];null!=n&&(t["_on"+e]=n)}var a=this.options.error;i(t,"load"),i(t,"error"),l(t,{onload:function(){if(t._onload)try{t._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){o({msg:"onload handler failed "+e+" @ "+t.src})}r()},onerror:function(){if(t._onerror)try{t._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void o({msg:"onerror handler failed "+e+" @ "+t.src})}o({msg:"remote script failed "+t.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(t.readyState)&&r()}})},t.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e.default=h},function(t){var e;e=function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=r(n(1));t.exports=o.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var a=o(n(2)),s=o(n(3)),l=r(n(6)),c=n(5),u={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},d=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.stream=n;var o=!1,s={};for(var c in a)a.hasOwnProperty(c)&&(r.autoFix&&(s[c+"Fix"]=!0),o=o||s[c+"Fix"]);o?(this._readToken=(0,l.default)(this,s,(function(){return e._readTokenImpl()})),this._peekToken=(0,l.default)(this,s,(function(){return e._peekTokenImpl()}))):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return t.prototype.append=function(t){this.stream+=t},t.prototype.prepend=function(t){this.stream=t+this.stream},t.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},t.prototype._peekTokenImpl=function(){for(var t in u)if(u.hasOwnProperty(t)&&u[t].test(this.stream)){var e=s[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},t.prototype.peekToken=function(){return this._peekToken()},t.prototype.readToken=function(){return this._readToken()},t.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},t.prototype.clear=function(){var t=this.stream;return this.stream="",t},t.prototype.rest=function(){return this.stream},t}();for(var p in e.default=d,d.tokenToString=function(t){return t.toString()},d.escapeAttributes=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=(0,c.escapeQuotes)(t[n],null));return e},d.supports=a,a)a.hasOwnProperty(p)&&(d.browserHasFlaw=d.browserHasFlaw||!a[p]&&p)},function(t,e){"use strict";
1e.__esModule=!0;var n=!1,r=!1,o=window.document.createElement("div");try{var i="<P><I></P></I>";o.innerHTML=i,e.tagSoup=n=o.innerHTML!==i}catch{e.tagSoup=n=!1}try{o.innerHTML="<P><i><P></P></i></P>",e.selfClose=r=2===o.childNodes.length}catch{e.selfClose=r=!1}o=null,e.tagSoup=n,e.selfClose=r},function(t,e,n){"use strict";function r(t){var e=t.indexOf("-->");if(e>=0)return new c.CommentToken(t.substr(4,e-1),e+3)}function o(t){var e=t.indexOf("<");return new c.CharsToken(e>=0?e:t.length)}function i(t){var e,n,r;if(-1!==t.indexOf(">")){var o=t.match(u.startTag);if(o){var i=(e={},n={},r=o[2],o[2].replace(u.attr,(function(t,o){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(e[arguments[5]]="",n[arguments[5]]=!0):e[o]=arguments[2]||arguments[3]||arguments[4]||u.fillAttr.test(o)&&o||"":e[o]="",r=r.replace(t,"")})),{v:new c.StartTagToken(o[1],o[0].length,e,n,!!o[3],r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))});if("object"===(void 0===i?"undefined":l(i)))return i.v}}}function a(t){var e=i(t);if(e){var n=t.slice(e.length);if(n.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var r=n.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(r)return new c.AtomicTagToken(e.tagName,r[0].length+e.length,e.attrs,e.booleanAttrs,r[1])}}}function s(t){var e=t.match(u.endTag);if(e)return new c.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=r,e.chars=o,e.startTag=i,e.atomicTag=a,e.endTag=s;var c=n(4),u={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var o=n(5),i=(e.Token=function t(e,n){r(this,t),this.type=e,this.length=n,this.text=""},e.CommentToken=function(){function t(e,n){r(this,t),this.type="comment",this.length=n||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"<!--"+this.content},t}(),e.CharsToken=function(){function t(e){r(this,t),this.type="chars",this.length=e,this.text=""}return t.prototype.toString=function(){return this.text},t}(),e.TagToken=function(){function t(e,n,o,i,a){r(this,t),this.type=e,this.length=o,this.text="",this.tagName=n,this.attrs=i,this.booleanAttrs=a,this.unary=!1,this.html5Unary=!1}return t.formatTag=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="<"+t.tagName;for(var r in t.attrs)if(t.attrs.hasOwnProperty(r)){n+=" "+r;var i=t.attrs[r];(void 0===t.booleanAttrs||void 0===t.booleanAttrs[r])&&(n+='="'+(0,o.escapeQuotes)(i)+'"')}return t.rest&&(n+=" "+t.rest),t.unary&&!t.html5Unary?n+="/>":n+=">",null!=e&&(n+=e+"</"+t.tagName+">"),n},t}());e.StartTagToken=function(){function t(e,n,o,i,a,s){r(this,t),this.type="startTag",this.length=n,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=i,this.html5Unary=!1,this.unary=a,this.rest=s}return t.prototype.toString=function(){return i.formatTag(this)},t}(),e.AtomicTagToken=function(){function t(e,n,o,i,a){r(this,t),this.type="atomicTag",this.length=n,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=i,this.unary=!1,this.html5Unary=!1,this.content=a}return t.prototype.toString=function(){return i.formatTag(this,this.content)},t}(),e.EndTagToken=function(){function t(e,n){r(this,t),this.type="endTag",this.length=n,this.text="",this.tagName=e}return t.prototype.toString=function(){return"</"+this.tagName+">"},t}()},function(t,e){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,(function(t,e){return/\\/.test(e)?e+'"':e+'\\"'})):e}e.__esModule=!0,e.escapeQuotes=n},function(t,e){"use strict";function n(t){return t&&"startTag"===t.type&&(t.unary=s.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function r(t,e){var r=t.stream,o=n(e());return t.stream=r,o}function o(t,e){var n=e.pop();t.prepend("</"+n.tagName+">")}function i(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,n=0;e=this[n];n++)if(e.tagName===t)return!0;return!1},t}function a(t,e,a){function s(){var e=r(t,a);e&&u[e.type]&&u[e.type](e)}var c=i(),u={startTag:function(n){var r=n.tagName;
1"TR"===r.toUpperCase()&&c.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),s()):e.selfCloseFix&&l.test(r)&&c.containsTagName(r)?c.lastTagNameEq(r)?o(t,c):(t.prepend("</"+n.tagName+">"),s()):n.unary||c.push(n)},endTag:function(n){c.last()?e.tagSoupFix&&!c.lastTagNameEq(n.tagName)?o(t,c):c.pop():e.tagSoupFix&&(a(),s())}};return function(){return s(),n(a())}}e.__esModule=!0,e.default=a;var s=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,l=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])},t.exports=e()},function(t,e){"use strict";function n(t){return null!=t}function r(t){return"function"==typeof t}function o(t,e,n){var r=void 0,o=t&&t.length||0;for(r=0;r<o;r++)e.call(n,t[r],r)}function i(t,e,n){for(var r in t)t.hasOwnProperty(r)&&e.call(n,r,t[r])}function a(t,e){return t=t||{},i(e,(function(e,r){n(t[e])||(t[e]=r)})),t}function s(t){try{return Array.prototype.slice.call(t)}catch{var e=(n=[],o(t,(function(t){n.push(t)})),{v:n});if("object"===(void 0===e?"undefined":p(e)))return e.v}var n}function l(t){return t[t.length-1]}function c(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t)||!~t.tagName.toLowerCase().indexOf(e))}function u(t){return c(t,"script")}function d(t){return c(t,"style")}e.__esModule=!0;var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.existy=n,e.isFunction=r,e.each=o,e.eachKey=i,e.defaults=a,e.toArray=s,e.last=l,e.isTag=c,e.isScript=u,e.isStyle=d}])},"object"==typeof t&&"object"==typeof e?e.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof t?t.postscribe=r():n.postscribe=r()})),tt=0,et=(Y(Z()),'button, [href], input:not([type="hidden"]), select, textarea, [tabindex="0"]'),nt=({triggerElementId:t,dropdownContentId:e})=>{var n;let r=document.getElementById(e);document.getElementById(t).setAttribute("aria-expanded","true"),r.style.display="block",null==(n=r.querySelector(et))||n.focus()},rt=({triggerElementId:t,dropdownContentId:e,onClose:n})=>{var r;let o=document.getElementById(e);o&&(null==(r=document.getElementById(t))||r.setAttribute("aria-expanded","false"),o.style.removeProperty("display"),null==n||n())},ot=({triggerElementId:t,dropdownContentId:e,dropdownContentCloseButtonId:n,onClose:r,onOpen:o})=>{var i;let a=document.getElementById(t),s=document.getElementById(e);if(!a||!s||"true"===a.dataset.dropdownInitialized)return;a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",e),a.setAttribute("aria-haspopup","true"),a.setAttribute("data-dropdown-initialized","true");let l=({key:n})=>{"Escape"===n?"true"===a.getAttribute("aria-expanded")&&(rt({triggerElementId:t,dropdownContentId:e,onClose:u}),a.focus()):"Tab"===n&&(null!=s&&s.contains(document.activeElement)||rt({triggerElementId:t,dropdownContentId:e,onClose:u}))},c=({target:n})=>{let r=document.getElementById(t);r&&n!==r&&!s.contains(n)&&!r.contains(n)&&(rt({triggerElementId:t,dropdownContentId:e,onClose:u}),n.matches(et)||r.focus())},u=()=>{null==r||r(),document.removeEventListener("keyup",l),document.removeEventListener("click",c)};return a.addEventListener("click",(()=>{var n;"true"===(null==(n=document.getElementById(t))?void 0:n.getAttribute("aria-expanded"))?rt({triggerElementId:t,dropdownContentId:e,onClose:u}):(nt({triggerElementId:t,dropdownContentId:e}),null==o||o(),document.addEventListener("keyup",l),document.addEventListener("click",c))})),n&&(null==(i=document.getElementById(n))||i.addEventListener("click",(()=>{var n;rt({triggerElementId:t,dropdownContentId:e,onClose:u}),null==(n=document.getElementById(t))||n.focus()}))),{closeDropdown:()=>{rt({triggerElementId:t,dropdownContentId:e,onClose:u})}}},it=/bot|crawl|spider|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|chatgpt|anthropic|cohere-ai|facebookexternalhit/i,at=(t=null)=>{let e=/DEV-Native-android|ForemWebView/i.test(navigator.userAgent)&&"undefined"!=typeof AndroidBridge,n=!0;return e&&t&&(n=null!=AndroidBridge[t]),e&&n},st=t=>new Promise(((e,n)=>{
2at("copyToClipboard")?(AndroidBridge.copyToClipboard(t),e()):null!=navigator.clipboard?navigator.clipboard.writeText(t).then((()=>{e()})).catch((t=>{n(t)})):n("Unable to copy the text. Try reloading the page")})),lt="image-lightbox-overlay",ct=document.getElementsByClassName("js-fullscreen-code-action");ct&&c(ct);var ut=document.getElementById("reaction-drawer-trigger");ut&&"true"!==ut.dataset.initialized&&ot({triggerElementId:"reaction-drawer-trigger",dropdownContentId:"reaction-drawer"});var dt,pt=document.getElementById("article-show-more-button");if("true"!==pt.dataset.initialized){if(at("shareText"))pt.addEventListener("click",(()=>AndroidBridge.shareText(location.href)));else{let{closeDropdown:t}=ot({triggerElementId:"article-show-more-button",dropdownContentId:"article-show-more-dropdown",onClose:P});document.querySelectorAll("#article-show-more-dropdown [href]").forEach((e=>{e.addEventListener("click",(e=>{t(e)}))}))}pt.dataset.initialized="true"}null==(dt=document.getElementById("copy-post-url-button"))||dt.addEventListener("click",D);var ft=document.querySelector("#comments");ft&&A(ft),v(),R(),q(),H(),M(document)})();

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