티스토리 수익 글 보기

티스토리 수익 글 보기

“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[57972],{13523:(e,t,n)=>{n.d(t,{$r:()=>s,M1:()=>o,li:()=>i,pS:()=>c,wE:()=>l});var r=n(71315);let i=”X-Fetch-Nonce”,a=new Set;function s(e){a.add(e)}function o(){return a.values().next().value||””}function l(e){let t={};return void 0!==e&&(t[“X-Fetch-Nonce-To-Validate”]=e),void 0===e?t[i]=o():a.has(e)?t[i]=e:t[i]=Array.from(a).join(“,”),t}function c(){let e=r.XC?.head?.querySelector(‘meta[name=”fetch-nonce”]’)?.content||””;e&&s(e)}},24117:(e,t,n)=>{var r=n(7123),i=n(28278),a=n(59014),s=n(94236),o=n(29e3),l=n(15220),c=n(38621),u=n(96379);let d=async e=>{try{let t=await (0,u.DI)(“/notifications/subscribe”,{method:”POST”,body:e});if(t.ok)return{ok:!0,errorMsg:””};{let e=await t.json(),n=e.error?e.error:”Failed to update”;return{ok:!1,errorMsg:n}}}catch(e){return{ok:!1,errorMsg:e instanceof Error?e.message:”Failed to update”}}};var h=n(5524);let p=”none”,f=”watching”,b=”ignoring”,m=”custom”,y={[p]:”Participating and @mentions”,[f]:”All Activity”,[b]:”Ignore”,[m]:”Custom”},g={…y,[p]:”Participating”},w={[p]:”Watch”,[f]:”Unwatch”,[b]:”Stop ignoring”,[m]:”Unwatch”},v=[{name:y[p],description:”Only receive notifications from this repository when participating or @mentioned.”,subscriptionType:p},{name:y[f],description:”Notified of all notifications on this repository.”,subscriptionType:f},{name:y[b],description:”Never be notified.”,subscriptionType:b},{name:y[m],description:”Select events you want to be notified of in addition to participating and @mentions.”,trailingIcon:(0,a.createElement)(c.ArrowRightIcon),subscriptionType:m}],x=e=>e in w?w[e]:””;function S(e){return(0,i.jsx)(h.l,{selectionVariant:”single”,children:v.map((t,n)=>(0,i.jsxs)(a.Fragment,{children:[(0,i.jsxs)(h.l.Item,{selected:t.subscriptionType===e.selected,onSelect:()=>e.onSelect(t.subscriptionType),children:[(0,i.jsx)(“span”,{className:”SubscriptionList-module__subscriptionTypeName–feJ4k”,children:t.name}),(0,i.jsx)(h.l.Description,{variant:”block”,children:t.description}),t.trailingIcon?(0,i.jsx)(h.l.TrailingVisual,{children:t.trailingIcon}):null]}),n!==v.length-1?(0,i.jsx)(h.l.Divider,{}):””]},n))})}try{S.displayName||(S.displayName=”SubscriptionList”)}catch{}var j=n(86877),_=n(46720),C=n(5839),N=n(21373);function T(e){let[t,n]=(0,a.useState)(!1),[r,s]=(0,a.useState)(“”),o=e.items.filter(e=>e?.text?.toLowerCase().startsWith(r.toLowerCase()));return(0,i.jsx)(C.X,{title:”Select labels”,renderAnchor:({children:t,…n})=>0===e.items.length?(0,i.jsx)(N.Q,{…n,trailingAction:c.TriangleDownIcon,”aria-haspopup”:”dialog”,children:”No labels available”}):(0,i.jsxs)(N.Q,{…n,trailingAction:c.TriangleDownIcon,”aria-haspopup”:”dialog”,children:[(0,i.jsx)(“span”,{className:”color-fg-muted”,children:”Labels: “}),(0,i.jsx)(“span”,{id:”select-labels”,children:e.labelsText})]}),placeholder:”Filter labels”,open:t,onCancel:e.resetLabels,onOpenChange:(t,r)=>{n(t),”click-outside”===r&&e.applyLabels()},items:o,selected:e.selectedLabels,onSelectedChange:e.onChangeLabels,onFilterChange:s,showItemDividers:!0,overlayProps:{width:”small”,height:”medium”,maxHeight:”medium”}})}try{T.displayName||(T.displayName=”FilterLabels”)}catch{}var L=n(69726);function k(e){let[t,n]=(0,a.useState)(!1),r=(0,a.useCallback)(()=>(e.nextFocusRef?.current?.focus(),!0),[e.nextFocusRef]),s=(0,a.useCallback)(()=>{n(!0)},[]),o=(0,a.useCallback)(()=>{e.onApply(),setTimeout(()=>{e?.checkStatus&&e.checkStatus(s)},600)},[e,s]);return(0,i.jsxs)(“div”,{className:”FooterActions-module__footerContainer–sNVyn”,children:[e.showError?(0,i.jsx)(“span”,{className:”FooterActions-module__errorMessageText–LtM5d”,children:”Error. Please try again.”}):null,(0,i.jsxs)(“div”,{className:”FooterActions-module__buttonsContainer–XOX1_”,style:e.overrideButtonStyles??{padding:”var(–base-size-16)”},children:[!e.showError&&t?(0,i.jsx)(L.A,{size:”small”,className:”FooterActions-module__FooterActionsSpinner–WjF07″}):null,(0,i.jsx)(N.Q,{size:”small”,onClick:()=>e.onCancel(),onBlur:t=>{e.disabled&&r(t)},children:”Cancel”}),(0,i.jsx)(N.Q,{disabled:e.disabled,variant:”primary”,size:”small”,onClick:()=>o(),onBlur:r,className:”FooterActions-module__applyButton–Q5SC4″,children:”Apply”})]})]})}try{k.displayName||(k.displayName=”FooterActions”)}catch{}let A=e=>{let t=P(e,2);if(e.length>=2){if(2===e.length)return I(e);let n=P(e,3);if(n.length>30)return`${t.slice(0,30)}… +${e.length-2} more`;{let t=e.length>3?` +${e.length-3} more`:””;return`${n}${t}`}}if(1!==e.length)return”All”;{let t=e[0]?.text||””;return t.length>30?`${t.slice(0,30)}…`:t}},I=e=>{let t=e[0]?.text||””,n=P(e,2);return n.length>30?t.length>25?`${t.slice(0,25)}… +1 more`:`${n.slice(0,30)}…`:n},P=(e,t)=>e.slice(0,t).map(e=>e.text).join(“, “),O=e=>{switch(e){case”PullRequest”:return”Pull requests”;case”SecurityAlert”:return”Security alerts”;default:return`${e}s`}};function F(e){let[t,n]=(0,a.useState)(e.appliedThreads),[r,s]=(0,a.useState)(e.appliedLabels),[o,l]=(0,a.useState)(e.appliedLabels),[c,u]=(0,a.useState)(()=>A(e.appliedLabels));(0,a.useEffect)(()=>{e.appliedLabels.length>0&&!t.includes(“Issue”)&&n([…t,”Issue”])},[]);let d=(0,a.useCallback)(e=>{t&&t.includes(e)?n(t.filter(t=>t!==e)):n([…t,e])},[t]),h=(0,a.useCallback)(e=>{l(e),u(A(e))},[]),p=(0,a.useCallback)(()=>{s(o)},[o]),f=(0,a.useCallback)(()=>{l(r),u(A(r))},[r]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(“div”,{className:”ThreadList-module__threadContent–x7fVL”,children:e.subscribableThreadTypes.map((n,r)=>(0,i.jsxs)(“div”,{className:”ThreadList-module__threadRow–LKENb”,style:r===e.subscribableThreadTypes.length-1?{}:{borderBottom:”1px solid var(–borderColor-default, var(–color-border-default))”},children:[(0,i.jsxs)(j.A,{children:[(0,i.jsx)(_.A,{checked:t.includes(n.name),onChange:()=>d(n.name)}),(0,i.jsx)(j.A.Label,{children:O(n.name)})]}),n.enabled?null:(0,i.jsxs)(“p”,{className:”ThreadList-module__threadDisabledMessage–kfUK2″,children:[O(n.name),” are not enabled for this repository”]}),(0,i.jsx)(“div”,{“aria-live”:”polite”,children:”Issue”===n.name&&e.showLabelSubscriptions&&t.includes(“Issue”)?(0,i.jsx)(“div”,{className:”ThreadList-module__filterContainer–R6lFt”,children:(0,i.jsx)(T,{items:e.repoLabels,labelsText:c,onChangeLabels:h,selectedLabels:o,applyLabels:p,resetLabels:f})}):null})]},r))}),(0,i.jsx)(k,{onCancel:e.cancelMenuCallback,onApply:()=>e.saveThreads(t,o),showError:e.showError,disabled:0===t.length||e.isSavingThreads})]})}try{F.displayName||(F.displayName=”ThreadList”)}catch{}function R({repositoryId:e,repositoryName:t,watchersCount:n,subscriptionType:r,subscribableThreadTypes:u,repositoryLabels:h,showLabelSubscriptions:y}){let w=(0,a.useMemo)(()=>h.map(e=>({id:e.id,text:e.name,selected:e.subscribed})),[h]),v=w.filter(e=>e.selected),j=(0,a.useMemo)(()=>u.map(e=>e.subscribed||”Issue”===e.name&&y&&v.length>0?e.name:null).filter(e=>null!==e),[u,y,v]),[_,C]=(0,a.useState)(!1),[N,T]=(0,a.useState)(!1),[L,k]=(0,a.useState)(!1),A=(0,a.useCallback)(()=>k(!1),[]),[I,P]=(0,a.useState)(j.length>0?m:r),[O,R]=(0,a.useState)(I),[E,M]=(0,a.useState)(j),[$,D]=(0,a.useState)(v),[B,U]=(0,a.useState)(!1),X=(0,a.useRef)(null),W=(0,a.useCallback)(()=>{T(!1),P(O)},[O]),G=(0,a.useCallback)(async(t,n)=>{U(!0),M(t),D(n),R(m);let r=new FormData;r.set(“do”,”custom”),r.set(“repository_id”,e),t.map(e=>{r.append(“thread_types[]”,e)}),n.map(e=>{e.id&&r.append(“labels[]”,e.id.toString())}),(await d(r)).ok?(T(!1),U(!1)):C(!0)},[e]),H=(0,a.useCallback)(async t=>{let n=new FormData;return t===b?n.set(“do”,”ignore”):t===f?n.set(“do”,”subscribed”):(t===p||t===m&&0===E.length)&&n.set(“do”,”included”),n.append(“thread_types[]”,””),n.set(“repository_id”,e),await d(n)},[e,E]),V=(0,a.useCallback)(async e=>{if(e===m)T(!0),P(m);else{let t=await H(e);t.ok?(P(e),R(e),M([])):”limit_exceeded”===t.errorMsg&&k(!0)}},[P]),Q=(0,a.useCallback)(e=>{M(e)},[M]),q=(0,a.useMemo)(()=>{let e,n;return e=x(I),n=g[I],I===b?`${e} in ${t}`:`${e}: ${n} in ${t}`},[I,t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(“div”,{className:”d-md-none”,children:(0,i.jsxs)(s.W,{children:[(0,i.jsx)(s.W.Button,{“data-testid”:”notifications-subscriptions-menu-button-desktop”,leadingVisual:I===b?c.BellSlashIcon:c.EyeIcon,trailingAction:null,className:”NotificationsSubscriptionsMenu-module__watchButton–ccU5u”,”aria-label”:q,children:(0,i.jsx)(i.Fragment,{})}),(0,i.jsx)(s.W.Overlay,{width:”medium”,children:(0,i.jsx)(S,{selected:I,onSelect:V})})]})}),(0,i.jsx)(“div”,{className:”d-none d-md-block”,children:(0,i.jsxs)(s.W,{children:[(0,i.jsxs)(s.W.Button,{“data-testid”:”notifications-subscriptions-menu-button-mobile”,size:”small”,leadingVisual:I===b?c.BellSlashIcon:c.EyeIcon,className:”NotificationsSubscriptionsMenu-module__ActionMenuButton–UgYy6″,”aria-label”:q,children:[x(I),(0,i.jsx)(“span”,{className:”ml-2 Counter rounded-3 NotificationsSubscriptionsMenu-module__watchCounter–vgIup”,children:n})]}),(0,i.jsx)(s.W.Overlay,{width:”medium”,children:(0,i.jsx)(S,{selected:I,onSelect:V})})]})}),(0,i.jsx)(o.A,{className:”NotificationsSubscriptionsMenu-module__subscriptionDialog–H1n3k”,returnFocusRef:X,isOpen:N,onDismiss:()=>W(),”aria-labelledby”:”header”,children:(0,i.jsxs)(“div”,{“data-testid”:”inner”,children:[(0,i.jsxs)(o.A.Header,{id:”header”,children:[“Subscribe to events for “,t]}),(0,i.jsx)(F,{subscribableThreadTypes:u,showLabelSubscriptions:y,cancelMenuCallback:W,appliedThreads:E,repoLabels:w,subscribedThreads:j,applyThreads:Q,appliedLabels:$,saveThreads:G,showError:_,isSavingThreads:B})]})}),L&&(0,i.jsx)(l.l,{title:”Cannot watch this repository”,onClose:A,children:(0,i.jsxs)(l.l.Body,{children:[“You have reached the limit of 10,000 watched repositories. Update your”,” “,(0,i.jsx)(“a”,{href:”/watching”,children:”watch settings”}),” to continue.”]})})]})}try{R.displayName||(R.displayName=”NotificationsSubscriptionsMenu”)}catch{}(0,r.k)(“notifications-subscriptions-menu”,{Component:R})},28600:(e,t,n)=>{n.d(t,{A:()=>o});let{getItem:r,setItem:i,removeItem:a}=(0,n(82075).A)(“localStorage”),s=”REACT_PROFILING_ENABLED”,o={enable:()=>i(s,”true”),disable:()=>a(s),isEnabled:()=>!!r(s)}},31635:(e,t,n)=>{n.d(t,{AQ:()=>s,Cg:()=>i,Me:()=>o,N3:()=>a,Tt:()=>r,xN:()=>l});function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&”function”==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function i(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o–)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}function a(e){return this instanceof a?(this.v=e,this):new a(e)}function s(e,t,n){if(!Symbol.asyncIterator)throw TypeError(“Symbol.asyncIterator is not defined.”);var r,i=n.apply(e,t||[]),s=[];return r=Object.create((“function”==typeof AsyncIterator?AsyncIterator:Object).prototype),o(“next”),o(“throw”),o(“return”,function(e){return function(t){return Promise.resolve(t).then(e,u)}}),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){s.push([e,t,n,r])>1||l(e,t)})},t&&(r[e]=t(r[e])))}function l(e,t){try{var n;(n=i[e](t)).value instanceof a?Promise.resolve(n.value.v).then(c,u):d(s[0][2],n)}catch(e){d(s[0][3],e)}}function c(e){l(“next”,e)}function u(e){l(“throw”,e)}function d(e,t){e(t),s.shift(),s.length&&l(s[0][0],s[0][1])}}function o(e){var t,n;return t={},r(“next”),r(“throw”,function(e){throw e}),r(“return”),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:a(e[r](t)),done:!1}:i?i(t):t}:i}}function l(e){if(!Symbol.asyncIterator)throw TypeError(“Symbol.asyncIterator is not defined.”);var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function(e){var t=”function”==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&”number”==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?”Object is not iterable.”:”Symbol.iterator is not defined.”)}(e),t={},r(“next”),r(“throw”),r(“return”),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var a,s,o;a=r,s=i,o=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){a({value:e,done:o})},s)})}}}”function”==typeof SuppressedError&&SuppressedError},37285:(e,t,n)=>{n.d(t,{Av:()=>o,BM:()=>r,HX:()=>d,M_:()=>h,RD:()=>u,rb:()=>i});let r=”GraphQLTraces”,i=”GraphQLTracingRefresh”,a=s()?decodeURIComponent(new URLSearchParams(window.location.search).get(“disable_clusters”)||””).split(“,”).filter(e=>””!==e):[];function s(){return”undefined”!=typeof window}function o(e){if(!s()||!l()||!e)return;let t=window;t&&!t[r]&&(t[r]=[]),t&&e.__trace&&(t[r].push(e.__trace),”function”==typeof t[i]&&t[i]())}function l(){if(!s())return!1;let e=window;return”true”===new URLSearchParams(window.location.search).get(“_tracing”)||e&&void 0!==e[r]}function c(){return a.length>0}function u(e){if(!s()||!l()&&!c())return e;let t=new URL(e,window.location.origin);return l()&&t.searchParams.set(“_tracing”,”true”),c()&&t.searchParams.set(“disable_clusters”,a.join(“,”)),t.pathname+t.search}function d(e){return a.indexOf(e)>-1}function h(e){if(!s())return;let t=a.indexOf(e);t>-1?a.splice(t,1):a.push(e);let n=new URLSearchParams(window.location.search);n.set(“disable_clusters”,a.join(“,”)),window.location.search=n.toString()}},50467:(e,t,n)=>{n.d(t,{_:()=>r});function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},51407:(e,t,n)=>{n.d(t,{Y:()=>r});function r(){let e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}},51987:(e,t,n)=>{n.d(t,{jC:()=>l,kt:()=>s,tV:()=>o});var r=n(87057),i=n(69599),a=n(13523);function s(e){let t={“X-Requested-With”:”XMLHttpRequest”,…(0,a.wE)(e)};return(0,i.G7)(“client_version_header”)&&(t={…t,[r.S]:(0,r.O)()}),t}function o(e,t){for(let[n,r]of Object.entries(s(t)))e.set(n,r)}function l(e){return{“X-GitHub-App-Type”:e}}},87057:(e,t,n)=>{n.d(t,{O:()=>s,S:()=>a});var r=n(71315);let i=r.cg?.document?.head?.querySelector(‘meta[name=”release”]’)?.content||””,a=”X-GitHub-Client-Version”;function s(){return i}},96379:(e,t,n)=>{n.d(t,{DI:()=>s,QJ:()=>l,Sr:()=>c,lS:()=>o});var r=n(51987),i=n(88057),a=n(37285);async function s(e,t={}){let n,o,l,c;var u,d=e;if(new URL(d,window.location.origin).origin!==window.location.origin)throw Error(“Can not make cross-origin requests from verifiedFetch”);let{tracingEnabled:h,fetchPath:p}=(n=new URL(u=e,window.location.href),(l=(o=new URL(window.location.href,window.location.origin)).searchParams.get(“_features”))&&!n.searchParams.has(“_features”)&&n.searchParams.set(“_features”,l),(c=o.searchParams.get(“_tracing”))&&!n.searchParams.has(“_tracing”)&&n.searchParams.set(“_tracing”,c),{tracingEnabled:!!c,fetchPath:u.startsWith(window.location.origin)?n.href:`${n.pathname}${n.search}`}),f={…t.headers,”GitHub-Verified-Fetch”:”true”,…(0,r.kt)()},b=await fetch(p,{…t,headers:f}),m=b?.headers?.get(“X-Github-Request-Id”);if(m&&(0,i.Ex)(m),h&&b){let e=b.clone();try{let t=await e.text(),n=t&&JSON.parse(t);(0,a.Av)(n)}catch{}}return b}function o(e,t){let n={…t?.headers??{},Accept:”application/json”,”Content-Type”:”application/json”},r=t?.body?JSON.stringify(t.body):void 0;return s(e,{…t,body:r,headers:n})}function l(e,t={}){let n={…t.headers,”GitHub-Is-React”:”true”};return s(e,{…t,headers:n})}function c(e,t){let n={…t?.headers??{},”GitHub-Is-React”:”true”};return o(e,{…t,headers:n})}}}]); //# sourceMappingURL=57972-d63880fa96e1.js.map