티스토리 수익 글 보기

티스토리 수익 글 보기

“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[55526],{27646:(e,t,n)=>{n.d(t,{wr:()=>v,lI:()=>p,LU:()=>w});var i=n(50467),s=n(36186);let l=class DiffPosition{sideForCommenting(){return this.element&&this.element.classList.contains(“blob-num-context”)?”right”:({R:”right”,L:”left”})[this.side]}isContext(){return!!this.element&&this.element.classList.contains(“blob-num-context”)}anchor(){return`${this.diffId}${this.anchorSuffix()}`}anchorSuffix(){return`${this.side}${this.lineNumber}`}is(e){return this.diffId===e.diffId&&this.side===e.side&&this.lineNumber===e.lineNumber}constructor(e,t,n){(0,i._)(this,”diffId”,void 0),(0,i._)(this,”side”,void 0),(0,i._)(this,”lineNumber”,void 0),(0,i._)(this,”element”,void 0),this.diffId=e,this.side=t,this.lineNumber=n,this.element=(0,s.w$)(document,this.anchor())}};let DiffRange=class DiffRange{anchor(){let e=[];return e.push(this.start.anchor()),this.start.is(this.end)||e.push(this.end.anchorSuffix()),e.join(“-“)}parse(){if(!this.diffTable)return;let e=this.unify(this.diffTable.querySelectorAll(“.js-linkable-line-number”));e=this.filterInRange(e),this.lineCount=e.length,this.elements=this.expandRelatedElements(e),this._commentOutsideTheDiff=this.diffTable.classList.contains(“js-comment-outside-the-diff”),this.isParsed=!0}unify(e){if(!this.isSplit)return Array.from(e);let t=[],n=[],i=[];for(let s of e)s.classList.contains(“blob-num-addition”)?n.push(s):s.classList.contains(“blob-num-deletion”)?i.push(s):(t.push(…i,…n,s),n=[],i=[]);return t.push(…i,…n),t}filterInRange(e){if(!this.start.element||!this.end.element)return[];let t=e.indexOf(this.start.element),n=e.indexOf(this.end.element);if(t>n){[t,n]=[n,t];let[e,i]=[this.end,this.start];this.start=e,this.end=i}return e.slice(t,n+1)}isContextOnly(){return this.isParsed||this.parse(),this._isContextOnly}isAcrossHunks(){return this.isParsed||this.parse(),this._isAcrossHunks}includesExpandedLine(){return this.isParsed||this.parse(),this._includesExpandedLine}commentOutsideTheDiffEnabled(){return this.isParsed||this.parse(),this._commentOutsideTheDiff}rows(){return this.isParsed||this.parse(),this._rows}expandRelatedElements(e){let t=this.isSplit,n=e[0],i=e[e.length-1];if(n&&i){let e=n.closest(“[data-hunk]”),t=i.closest(“[data-hunk]”);e&&t&&e.getAttribute(“data-hunk”)!==t.getAttribute(“data-hunk”)&&(this._isAcrossHunks=!0)}let s=(e,n)=>{!this._includesExpandedLine&&n.closest(“.blob-expanded”)&&(this._includesExpandedLine=!0);let i=n.parentElement;i instanceof HTMLElement&&this._rows.add(i);let s=n.classList.contains(“blob-num-deletion”)||n.classList.contains(“blob-num-addition”);if(s&&(this._isContextOnly=!1),!i)return e;if(t&&s)return 2>Array.from(i.children).indexOf(n)?e.add(i.children[0]).add(i.children[1]):e.add(i.children[2]).add(i.children[3]);for(let t of Array.from(i.children))e.add(t);return e};return e.reduce(s,new Set)}constructor(e,t,n,s,r){(0,i._)(this,”elements”,void 0),(0,i._)(this,”isParsed”,void 0),(0,i._)(this,”isSplit”,void 0),(0,i._)(this,”diffId”,void 0),(0,i._)(this,”diffTable”,void 0),(0,i._)(this,”start”,void 0),(0,i._)(this,”end”,void 0),(0,i._)(this,”lineCount”,void 0),(0,i._)(this,”_rows”,void 0),(0,i._)(this,”_isAcrossHunks”,void 0),(0,i._)(this,”_isContextOnly”,void 0),(0,i._)(this,”_includesExpandedLine”,void 0),(0,i._)(this,”_commentOutsideTheDiff”,void 0),this.elements=new Set,this.isParsed=!1,this.isSplit=!1,this._rows=new Set,this._isAcrossHunks=!1,this._isContextOnly=!0,this._includesExpandedLine=!1,this._commentOutsideTheDiff=!1,this.diffId=e,this.diffTable=document.querySelector(`.js-diff-table[data-diff-anchor=”${e}”]`),this.diffTable&&(this.isSplit=this.diffTable.classList.contains(“js-file-diff-split”)),this.start=new l(e,t,n),this.end=new l(e,s,r),this.lineCount=0,this.parse()}};var r=n(31803),o=n(89022),a=n(21403),c=n(97797),d=n(52738),u=n(75941),f=n(53627);let h=null,m=null,g=!1,b=null;function p(){return h}function L(e){return!!e.closest(“.js-multi-line-comments-enabled”)}function w(e,t){if(!L(e))return!1;let{start:{lineNumber:n},end:{lineNumber:i}}=t;return!(n===i&&t.isContextOnly()||!t.commentOutsideTheDiffEnabled()&&(t.isAcrossHunks()||t.includesExpandedLine()))&&!0}function E(e){return e.closest(“.js-diff-table”).classList.contains(“is-selecting”)}function v(){(0,f.K3)(),x(),u.o.dispatch()}function j(e,t){let n=e.id;if(t){let t=(0,o.E)(n);if(!t)return;let l=t[1],r=t[2],a=t[3];if(h&&h.diffId===l){var i,s;let t;if(r===h.start.side&&Number.parseInt(a){document.addEventListener(“click”,_,{once:!0})},0)}function x(){if(h){for(let e of h.elements)e.classList.remove(“selected-line”,”selected-line-top”,”selected-line-bottom”,”selected-line-left”,”selected-line-right”);h=null}let e=(0,o.E)(window.location.hash);if(!e)return;let t=e[1],n=e[2],i=e[3],s=e[4]||n,l=e[5]||i,r=Array.from((h=new DiffRange(t,n,+i,s,+l)).elements)[0];r&&(r.closest(“.js-diff-table”).classList.contains(“file-diff-split”)?function(){if(!h)return;for(let e of h.elements)e.classList.add(“selected-line”);let e=[],t=[],n=[],i=[];for(let s of h.rows()){let[l,r,o,a]=s.children;e.push(l),t.push(r),n.push(o),i.push(a)}function s(e){for(let[t,n]of e.entries()){if(n.classList.contains(“empty-cell”))continue;let i=e[t-1];i&&i.classList.contains(“selected-line”)||n.classList.add(“selected-line-top”);let s=e[t+1];s&&s.classList.contains(“selected-line”)||n.classList.add(“selected-line-bottom”)}}for(let[l,r]of(s(e),s(t),s(n),s(i),t.entries()))i[l].classList.contains(“selected-line”)||r.classList.add(“selected-line-right”);for(let[e,i]of n.entries())t[e].classList.contains(“selected-line”)||i.classList.add(“selected-line-left”)}():function(){if(!h)return;for(let e of h.elements)e.classList.add(“selected-line”);let e=Array.from(h.rows());for(let t of e[0].children)t.classList.add(“selected-line-top”);for(let t of e[e.length-1].children)t.classList.add(“selected-line-bottom”)}())}(0,c.on)(“mousedown”,”.js-add-line-comment”,function(e){if(!(e instanceof MouseEvent)||0!==e.button)return;let t=e.target.parentElement;if(!t||!L(e.target))return;let n=S(t);if(!n)return;let i=e.target.closest(“.js-diff-table”);A(i),b=n,g=!0,e.target.addEventListener(“mouseup”,function(){k(i),b=null,g=!1},{once:!0}),h&&h.lineCount>1&&e.preventDefault()}),(0,c.on)(“mousedown”,”.js-linkable-line-number”,function(e){if(!(e instanceof MouseEvent)||0!==e.button)return;let t=e.target;if(!(t instanceof Element))return;let n=t.closest(“.js-diff-table”);n.classList.add(“is-selecting”),A(n),document.addEventListener(“mouseup”,function(){t.closest(“.js-diff-table”).classList.remove(“is-selecting”),k(n)},{once:!0}),j(t,e instanceof MouseEvent&&e.shiftKey),e.preventDefault()}),(0,r.A)(x),(0,a.lB)(“.blob-expanded”,x),(0,a.lB)(“.js-diff-progressive-loader”,function(e){e.addEventListener(“load”,x)}),(0,a.lB)(“.js-diff-entry-loader”,function(e){e.addEventListener(“load”,x)})},50502:(e,t,n)=>{var i=n(50467),s=n(73395),l=n(78134),r=n(31803),o=n(21403),a=n(97797),c=n(53419),d=n(3905);let u=!1;function f(e,t){return document.querySelector(`#${e}LC${t}`)}function h(){let e=(0,s.$c)(window.location.hash);!function({blobRange:e,anchorPrefix:t}){if(0!==document.querySelectorAll(“.js-file-line”).length&&(function(){for(let e of document.querySelectorAll(“.js-file-line.highlighted”))e.classList.remove(“highlighted”);for(let e of document.querySelectorAll(“.js-file-line .highlighted”)){let t=e.closest(“.js-file-line”);e.replaceWith(…e.childNodes),t.normalize()}}(),e)){if(null===e.start.column||null===e.end.column)for(let n=e.start.line;n<=e.end.line;n+=1){let e=f(t,n);e&&e.classList.add("highlighted")}else if(e.start.line===e.end.line&&null!=e.start.column&&null!=e.end.column){let n=(0,s.Py)(e,e=>f(t,e));if(n){let e=document.createElement(“span”);e.classList.add(“highlighted”),(0,d.t)(n,e)}}}}(e),function(){let e=document.querySelector(“.js-file-line-actions”);if(!e)return;let t=document.querySelectorAll(“.js-file-line.highlighted”),n=t[0];if(n){var i;let s,l=[];for(let e of t)l.push(e.textContent);let r=document.getElementById(“js-copy-lines”);if(r&&”CLIPBOARD-COPY”===r.tagName){r.textContent=`Copy ${1===t.length?”line”:”lines”}`,r.value=l.join(` `);let e=`Blob, copyLines, numLines:${t.length.toString()}`;r.setAttribute(“data-ga-click”,e)}i=t.length,(s=document.getElementById(“js-view-git-blame”))&&s.setAttribute(“data-ga-click”,`Blob, viewGitBlame, numLines:${i.toString()}`);let o=function(e){let t=document.querySelector(“.js-permalink-shortcut”);if(t instanceof HTMLAnchorElement){let n=`${t.href}${window.location.hash}`,i=document.getElementById(“js-copy-permalink”);if(i&&”CLIPBOARD-COPY”===i.tagName){i.value=n;let t=`Blob, copyPermalink, numLines:${e.toString()}`;i.setAttribute(“data-ga-click”,t)}return n}}(t.length);o&&function(e,t){let n=document.getElementById(“js-new-issue”);if(n instanceof HTMLAnchorElement){if(!n.href)return;let i=new URL(n.href,window.location.origin),s=new URLSearchParams(i.search);s.set(“permalink”,e),i.search=s.toString(),n.href=i.toString(),n.setAttribute(“data-ga-click”,`Blob, newIssue, numLines:${t.toString()}`)}}(o,t.length),o&&function(e,t){let n=document.getElementById(“js-new-discussion”);if(!(n instanceof HTMLAnchorElement)||!n?.href)return;let i=new URL(n.href,window.location.origin),s=new URLSearchParams(i.search);s.set(“permalink”,e),i.search=s.toString(),n.href=i.toString(),n.setAttribute(“data-ga-click”,`Blob, newDiscussion, numLines:${t.toString()}`)}(o,t.length),e.style.top=`${n.offsetTop-2}px`,e.classList.remove(“d-none”)}else e.classList.add(“d-none”)}();let{blobRange:t,anchorPrefix:n}=e,i=t&&f(n,t.start.line);!u&&i&&(i.scrollIntoView(),i.closest(“.blob-wrapper, .js-blob-wrapper”).scrollLeft=0),u=!1}(0,r.A)(function(){if(document.querySelector(“.js-file-line-container”)){setTimeout(h,0);let e=window.location.hash;for(let t of document.querySelectorAll(“.js-update-url-with-hash”))if(t instanceof HTMLAnchorElement)t.hash=e;else if(t instanceof HTMLFormElement){let n=new URL(t.action,window.location.origin);n.hash=e,t.action=n.toString()}}}),(0,a.on)(“click”,”.js-line-number”,function(e){let t,n=(0,s.$c)(e.currentTarget.id),{blobRange:i}=n,l=(0,s.eC)(window.location.hash);l&&e.shiftKey&&(n.blobRange={start:l.start,end:i.end}),t=window.scrollY,u=!0,(()=>{window.location.hash=(0,s.JB)(n)})(),window.scrollTo(0,t)}),(0,o.lB)(“.js-check-hidden-unicode”,function(e){let t=!1,n=performance.now();if(m.test(e.textContent||””)){let n=e.querySelectorAll(“.diff-table .blob-code-inner, .js-file-line-container .js-file-line, .js-suggested-changes-blob .blob-code-inner”),i=document.querySelector(“.js-line-alert-template”),s=document.querySelector(“.js-revealed-character-template”);for(let r of n)if(function e(t,n){if(t.nodeType===Node.TEXT_NODE)return function(e,t){let n=!1;if(e.nodeValue)for(let i=e.nodeValue.length-1;i>=0;i–){let s=e.nodeValue.charAt(i),r=”\uDB40″===s&&e.nodeValue.length>i+1;if(r&&(s=e.nodeValue.substring(i,i+2)),g[s]){if(n=!0,!t)break;let o=new l.i4(t,{revealedCharacter:g[s]}),a=new Range;a.setStart(e,i),a.setEnd(e,i+(r?2:1)),a.deleteContents(),a.insertNode(o)}}return n}(t,n);if(!t.childNodes||!t.childNodes.length)return!1;let i=!1;for(let s of t.childNodes)if(i||(i=e(s,n)),i&&!n)break;return i}(r,s)&&(t=!0,i)){let t=new l.i4(i,{});”before”===e.getAttribute(“data-line-alert”)?r.before(t):r.after(t)}}let i={durationMs:(performance.now()-n).toString(),result:t.toString()};if((0,c.BI)(“blob_js_check_hidden_unicode_character”,i),t){let t=document.querySelector(“.js-file-alert-template”);if(t){let n=new URL(window.location.href,window.location.origin);”1″===n.searchParams.get(“h”)?n.searchParams.delete(“h”):n.searchParams.set(“h”,”1″);let i=new l.i4(t,{revealButtonHref:n.href});e.prepend(i)}}e.classList.remove(“js-check-hidden-unicode”)});let m=/[\u202A-\u202E]|[\u2066-\u2069]|\u{E0001}|\u{E007F}/u,g={“\u202A”:”U+202A”,”\u202B”:”U+202B”,”\u202C”:”U+202C”,”\u202D”:”U+202D”,”\u202E”:”U+202E”,”\u2066″:”U+2066″,”\u2067″:”U+2067″,”\u2068″:”U+2068″,”\u2069″:”U+2069″,”\u{E0001}”:”U+E0001″,”\u{E007F}”:”U+E007F”},b=class CodeListingLine{range(e,t){e=isNaN(e)?0:e,t=isNaN(t)?0:t;let n=null,i=0,s=0;for(let[l,r]of this.lineElement.childNodes.entries()){let o=(r.textContent||””).length;if(o>e&&!n&&(n=r,i=l),o>=t){s=l;break}e-=o,t-=o}let l=document.createRange();if(i===s){for(;n&&”#text”!==n.nodeName;)n=n.childNodes[0];if(!n)return null;l.setStart(n,e),l.setEnd(n,t)}else l.setStart(this.lineElement,i),l.setEnd(this.lineElement,s+1);return l}constructor(e,t){(0,i._)(this,”lineElement”,void 0),(0,i._)(this,”numberElement”,void 0),this.lineElement=e,this.numberElement=t}},p=class CodeListing{findLine(e){if(!e)return null;let t=this.container.querySelector(`.js-blob-rnum[data-line-number=’${e}’]`);if(!t)return null;let n=t.nextElementSibling;return n&&n.classList.contains(“js-file-line”)?new b(n,t):null}constructor(e){(0,i._)(this,”container”,void 0),this.container=e}},L=new WeakMap;function w(e){if(!e)return;let t=e.closest(“.js-blob-code-container, .js-file-content”),n=e.querySelector(“.js-codeowners-error-tooltip-template”),i=e.querySelector(“.js-codeowners-error-line-alert-template”);if(!t||!n||!i)return;let s=t.querySelector(“deferred-diff-lines”);if(s?.isAwaitingHighlight())return;let r=e.querySelectorAll(“.js-codeowners-error”),o=new p(t);for(let e of r){if(L.get(e))continue;let t=e.getAttribute(“data-line”),s=e.getAttribute(“data-kind”),r=e.getAttribute(“data-suggestion”),a=parseInt(e.getAttribute(“data-start-offset”)||””,10),c=parseInt(e.getAttribute(“data-end-offset”)||””,10),d=o.findLine(t),u=d?.range(a,c);if(!d||!u)continue;let f=s;r&&(f+=`: ${r}`);let h=document.createElement(“SPAN”);h.className=”error-highlight”,u.surroundContents(h);let m=new l.i4(n,{message:f}).firstElementChild;u.surroundContents(m);let g=new l.i4(i,{});d.numberElement.appendChild(g),L.set(e,!0)}}(0,o.lB)(“.js-codeowners-errors”,w),(0,a.on)(“expander:expanded”,”.js-file”,function(e){e.target&&e.target instanceof HTMLElement&&w(e.target.querySelector(“.js-codeowners-errors”))}),(0,a.on)(“deferred-highlight:applied”,”deferred-diff-lines”,function(e){if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.target.closest(“.js-file”);w(t?.querySelector(“.js-codeowners-errors”))})},66914:(e,t,n)=>{var i=n(97797);(0,i.on)(“click”,”.js-rich-diff.collapsed .js-expandable”,function(e){e.target instanceof Element&&(e.preventDefault(),e.target.closest(“.js-rich-diff”).classList.remove(“collapsed”))}),(0,i.on)(“click”,”.js-show-rich-diff”,function(e){let t=e.currentTarget.closest(“.js-warn-no-visible-changes”);if(!t)return;t.classList.add(“d-none”);let n=t.parentElement.querySelector(“.js-no-rich-changes”);n&&n.classList.remove(“d-none”)})},75941:(e,t,n)=>{n.d(t,{o:()=>DiffSelectionEvent});var i=n(50467);let DiffSelectionEvent=class DiffSelectionEvent extends Event{static dispatch(){window.dispatchEvent(new DiffSelectionEvent)}constructor(){super(DiffSelectionEvent.NAME,{bubbles:!1,cancelable:!0})}};(0,i._)(DiffSelectionEvent,”NAME”,”diff-line-selection”)},89022:(e,t,n)=>{n.d(t,{E:()=>i});function i(e){let t=e.match(/^#?(diff-[a-f0-9]+)(L|R)(\d+)(?:-(L|R)(\d+))?$/i);if(null!=t&&6===t.length)return t;let n=e.match(/^#?(discussion-diff-[0-9]+)(L|R)(\d+)(?:-(L|R)(\d+))?$/i);return null!=n&&6===n.length?n:null}}}]); //# sourceMappingURL=55526-914683e68285.js.map