|
|
|
@@ -1,52 +1,52 @@
|
|
|
|
|
"use strict";(()=>{var el=Object.defineProperty;var tl=e=>{throw TypeError(e)};var Zp=(e,t,o)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var xp=(e,t)=>{for(var o in t)el(e,o,{get:t[o],enumerable:!0})};var xe=(e,t,o)=>Zp(e,typeof t!="symbol"?t+"":t,o),mr=(e,t,o)=>t.has(e)||tl("Cannot "+o);var re=(e,t,o)=>(mr(e,t,"read from private field"),o?o.call(e):t.get(e)),_e=(e,t,o)=>t.has(e)?tl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),Le=(e,t,o,i)=>(mr(e,t,"write to private field"),i?i.call(e,o):t.set(e,o),o),Ve=(e,t,o)=>(mr(e,t,"access private method"),o);var nl=(e,t,o,i)=>({set _(s){Le(e,t,s,o)},get _(){return re(e,t,i)}});var ve=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ye={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function ol(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let o=new URLSearchParams(t);if([...o.keys()].length!==3||[...o.keys()].some(d=>!["clientId","intentId","token"].includes(d)))return null;let i=o.get("clientId"),s=o.get("intentId"),r=o.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(s||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:s,token:r}}function sl(e,t){let{http:o,promises:i,window:s}=t,r=t.takeReviewHandoff(),d=r?{clientId:r.clientId,intentId:r.intentId}:null,c,u,y,h,b,g=!0,k,R=i.defer(),S=()=>[...s.crypto.getRandomValues(new Uint8Array(16))].map(_=>_.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let N=()=>g&&e.user?.username===b;function m(){g=!1,r=c=u=void 0,R.resolve(),s.clearTimeout(k)}e.on("dispose",m),e.on("routeLeave",m),e.watch(()=>e.user?.username,_=>{!b&&_?b=_:b&&_!==b&&(m(),e.preview=null,e.repositoryId="",e.busy=!1,e.saved=!1,e.handoffEnabled=!1,e.error="Your account changed. Open a new artifact link from your submission.")});let E=()=>({timeout:R.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":u}}),M=_=>_?.status===404?"Artifact linking is not available on this server.":_?.status===401?"Sign in, then open a new artifact link from your submission.":_?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!g||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;b=e.user.username;let _=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(_)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,c=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,s.clearTimeout(k),h||(h=S());try{let V=(await o.get("/api/review-consent/csrf",{timeout:R.promise})).data;if(!N())return;if(u=V.csrf,e.handoffEnabled=V.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(u||""))throw new Error("invalid_csrf");let G=(await o.post("/api/review-consent/preview",{repositoryId:_,intent:{...r,requestId:h}},E())).data;if(!N())return;if(!G||typeof G.ticket!="string"||!G.ticket||G.ticket.length>8192||typeof G.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
|
|
|
|
|
`))),e[hn]=Lo(s);let r=i||s.props&&s.props.type==="number";_n(e,t?"change":"input",d=>{d.target.composing||e[hn](ta(e.value,o,r))}),(o||r)&&_n(e,"change",()=>{e.value=ta(e.value,o,r)}),t||(_n(e,"compositionstart",om),_n(e,"compositionend",jd),_n(e,"change",jd))},mounted(e,{value:t,modifiers:{trim:o,number:i}}){let s=t??"",r=e[_i];delete e[_i],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[hn](ta(e.value,o,i)):e.value=s},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:i,trim:s,number:r}},d){if(e[hn]=Lo(d),e.composing)return;let c=(r||e.type==="number")&&!/^0\d/.test(e.value)?Oo(e.value):e.value,u=t??"";if(c===u)return;let y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(i&&t===o||s&&e.value.trim()===u)||(e.value=u)}},oa={deep:!0,created(e,t,o){e[hn]=Lo(o),_n(e,"change",()=>{let i=e._modelValue,s=Ms(e),r=e.checked,d=e[hn];if(Ne(i)){let c=li(i,s),u=c!==-1;if(r&&!u)d(i.concat(s));else if(!r&&u){let y=[...i];y.splice(c,1),d(y)}}else if(Yt(i)){let c=new Set(i);r?c.add(s):c.delete(s),d(c)}else d(Qd(e,r))})},mounted:Gd,beforeUpdate(e,t,o){e[hn]=Lo(o),Gd(e,t,o)}};function Gd(e,{value:t,oldValue:o},i){e._modelValue=t;let s;if(Ne(t))s=li(t,i.props.value)>-1;else if(Yt(t))s=t.has(i.props.value);else{if(t===o)return;s=Xt(t,Qd(e,!0))}e.checked!==s&&(e.checked=s)}var mn={deep:!0,created(e,{value:t,modifiers:{number:o}},i){e._modelValue=t,_n(e,"change",()=>{let s=Array.prototype.filter.call(e.options,u=>u.selected).map(u=>o?Oo(Ms(u)):Ms(u)),r=e.multiple,d=r?Yt(e._modelValue)?new Set(s):s:s[0],c=e._pendingValue=[r,r?Ne(d)?s.slice():s:d];try{e[hn](d)}finally{tt(()=>{e._pendingValue===c&&(e._pendingValue=void 0)})}}),e[hn]=Lo(i)},mounted(e,{value:t}){Wd(e,t)},beforeUpdate(e,{value:t},o){e._modelValue=t,e[hn]=Lo(o)},updated(e,{value:t}){let o=e._pendingValue;e._pendingValue=void 0,(!o||o[0]!==e.multiple||!sm(t,o[1],o[0]))&&Wd(e,t)}};function sm(e,t,o){if(!o)return Xt(e,t);if(Ne(e))return Xt(e,t);if(Yt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Wd(e,t){let o=e.multiple,i=Ne(t);if(!(o&&!i&&!Yt(t))){for(let s=0,r=e.options.length;s<r;s++){let d=e.options[s],c=Ms(d);if(o)if(i){let u=typeof c;u==="string"||u==="number"?d.selected=t.some(y=>String(y)===String(c)):d.selected=li(t,c)>-1}else d.selected=t.has(c);else if(Xt(Ms(d),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ms(e){return"_value"in e?e._value:e.value}function Qd(e,t){let o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}var im=["ctrl","shift","alt","meta"],rm={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>im.some(o=>e[`${o}Key`]&&!t.includes(o))},le=(e,t)=>{if(!e)return e;let o=e._withMods||(e._withMods={}),i=t.join(".");return o[i]||(o[i]=((s,...r)=>{for(let d=0;d<t.length;d++){let c=rm[t[d]];if(c&&c(s,t))return}return e(s,...r)}))},am={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},kt=(e,t)=>{let o=e._withKeys||(e._withKeys={}),i=t.join(".");return o[i]||(o[i]=(s=>{if(!("key"in s))return;let r=on(s.key);if(t.some(d=>d===r||am[d]===r))return e(s)}))},lm=ct({patchProp:em},Lh),Kd;function dm(){return Kd||(Kd=Rd(lm))}var Jd=((...e)=>{let t=dm().createApp(...e),{mount:o}=t;return t.mount=i=>{let s=cm(i);if(!s)return;let r=t._component;!Te(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let d=o(s,!1,um(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),d},t});function um(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function cm(e){return it(e)?document.querySelector(e):e}var ao=typeof document<"u";function xd(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function pm(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xd(e.default)}var Qe=Object.assign;function qi(e,t){let o={};for(let i in t){let s=t[i];o[i]=Wt(s)?s.map(e):e(s)}return o}var Uo=()=>{},Wt=Array.isArray;function ra(e,t){let o={};for(let i in e)o[i]=i in t?t[i]:e[i];return o}var eu=/#/g,fm=/&/g,hm=/\//g,mm=/=/g,gm=/\?/g,tu=/\+/g,vm=/%5B/g,ym=/%5D/g,nu=/%5E/g,bm=/%60/g,ou=/%7B/g,wm=/%7C/g,su=/%7D/g,km=/%20/g;function aa(e){return e==null?"":encodeURI(""+e).replace(wm,"|").replace(vm,"[").replace(ym,"]")}function iu(e){return aa(e).replace(ou,"{").replace(su,"}").replace(nu,"^")}function sa(e){return aa(e).replace(tu,"%2B").replace(km,"+").replace(eu,"%23").replace(fm,"%26").replace(bm,"`").replace(ou,"{").replace(su,"}").replace(nu,"^")}function Cm(e){return sa(e).replace(mm,"%3D")}function Em(e){return aLine truncated
|
|
|
|
|
"use strict";(()=>{var el=Object.defineProperty;var tl=e=>{throw TypeError(e)};var nf=(e,t,s)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var sf=(e,t)=>{for(var s in t)el(e,s,{get:t[s],enumerable:!0})};var xe=(e,t,s)=>nf(e,typeof t!="symbol"?t+"":t,s),mr=(e,t,s)=>t.has(e)||tl("Cannot "+s);var re=(e,t,s)=>(mr(e,t,"read from private field"),s?s.call(e):t.get(e)),qe=(e,t,s)=>t.has(e)?tl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Le=(e,t,s,i)=>(mr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),_e=(e,t,s)=>(mr(e,t,"access private method"),s);var nl=(e,t,s,i)=>({set _(o){Le(e,t,o,s)},get _(){return re(e,t,i)}});var ge=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var ve={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",editor:"/script/editor.4f142d3adc.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};function sl(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let s=new URLSearchParams(t);if([...s.keys()].length!==3||[...s.keys()].some(d=>!["clientId","intentId","token"].includes(d)))return null;let i=s.get("clientId"),o=s.get("intentId"),r=s.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(o||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:o,token:r}}function ol(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),d=r?{clientId:r.clientId,intentId:r.intentId}:null,p,u,y,m,b,h=!0,w,R=i.defer(),S=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(V=>V.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let N=()=>h&&e.user?.username===b;function v(){h=!1,r=p=u=void 0,R.resolve(),o.clearTimeout(w)}e.on("dispose",v),e.on("routeLeave",v),e.watch(()=>e.user?.username,V=>{!b&&V?b=V:b&&V!==b&&(v(),e.preview=null,e.repositoryId="",e.busy=!1,e.saved=!1,e.handoffEnabled=!1,e.error="Your account changed. Open a new artifact link from your submission.")});let E=()=>({timeout:R.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":u}}),M=V=>V?.status===404?"Artifact linking is not available on this server.":V?.status===401?"Sign in, then open a new artifact link from your submission.":V?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!h||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;b=e.user.username;let V=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(V)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,p=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,o.clearTimeout(w),m||(m=S());try{let _=(await s.get("/api/review-consent/csrf",{timeout:R.promise})).data;if(!N())return;if(u=_.csrf,e.handoffEnabled=_.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(u||""))throw new Error("invalid_csrf");let G=(await s.post("/api/review-consent/preview",{repositoryId:V,intent:{...r,requestId:m}},E())).data;if(!N())return;if(!G||typeof G.ticket!="string"||!G.ticket||G.ticket.length>8192||typeof G.repositoryName!="string"||!["restricted-review","anonymous-link"].iLine truncated
|
|
|
|
|
`))),e[hn]=$s(o);let r=i||o.props&&o.props.type==="number";Vn(e,t?"change":"input",d=>{d.target.composing||e[hn](ta(e.value,s,r))}),(s||r)&&Vn(e,"change",()=>{e.value=ta(e.value,s,r)}),t||(Vn(e,"compositionstart",am),Vn(e,"compositionend",jd),Vn(e,"change",jd))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[Vi];delete e[Vi],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[hn](ta(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},d){if(e[hn]=$s(d),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?Ts(e.value):e.value,u=t??"";if(p===u)return;let y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===u)||(e.value=u)}},sa={deep:!0,created(e,t,s){e[hn]=$s(s),Vn(e,"change",()=>{let i=e._modelValue,o=Mo(e),r=e.checked,d=e[hn];if(Ne(i)){let p=li(i,o),u=p!==-1;if(r&&!u)d(i.concat(o));else if(!r&&u){let y=[...i];y.splice(p,1),d(y)}}else if(Yt(i)){let p=new Set(i);r?p.add(o):p.delete(o),d(p)}else d(Jd(e,r))})},mounted:Gd,beforeUpdate(e,t,s){e[hn]=$s(s),Gd(e,t,s)}};function Gd(e,{value:t,oldValue:s},i){e._modelValue=t;let o;if(Ne(t))o=li(t,i.props.value)>-1;else if(Yt(t))o=t.has(i.props.value);else{if(t===s)return;o=Xt(t,Jd(e,!0))}e.checked!==o&&(e.checked=o)}var mn={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,Vn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,u=>u.selected).map(u=>s?Ts(Mo(u)):Mo(u)),r=e.multiple,d=r?Yt(e._modelValue)?new Set(o):o:o[0],p=e._pendingValue=[r,r?Ne(d)?o.slice():o:d];try{e[hn](d)}finally{tt(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[hn]=$s(i)},mounted(e,{value:t}){Wd(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[hn]=$s(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!lm(t,s[1],s[0]))&&Wd(e,t)}};function lm(e,t,s){if(!s)return Xt(e,t);if(Ne(e))return Xt(e,t);if(Yt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function Wd(e,t){let s=e.multiple,i=Ne(t);if(!(s&&!i&&!Yt(t))){for(let o=0,r=e.options.length;o<r;o++){let d=e.options[o],p=Mo(d);if(s)if(i){let u=typeof p;u==="string"||u==="number"?d.selected=t.some(y=>String(y)===String(p)):d.selected=li(t,p)>-1}else d.selected=t.has(p);else if(Xt(Mo(d),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Mo(e){return"_value"in e?e._value:e.value}function Jd(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var dm=["ctrl","shift","alt","meta"],um={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dm.some(s=>e[`${s}Key`]&&!t.includes(s))},ae=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let d=0;d<t.length;d++){let p=um[t[d]];if(p&&p(o,t))return}return e(o,...r)}))},cm={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},kt=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=sn(o.key);if(t.some(d=>d===r||cm[d]===r))return e(o)}))},pm=ct({patchProp:om},zh),Kd;function fm(){return Kd||(Kd=Rd(pm))}var Qd=((...e)=>{let t=fm().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=mm(i);if(!o)return;let r=t._component;!Te(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let d=s(o,!1,hm(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),d},t});function hm(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mm(e){return it(e)?document.querySelector(e):e}var ls=typeof document<"u";function xd(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function gm(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xd(e.default)}var Je=Object.assign;function _i(e,t){let s={};for(let i in t){let o=t[i];s[i]=Wt(o)?o.map(e):e(o)}return s}var Fs=()=>{},Wt=Array.isArray;function ra(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var eu=/#/g,vm=/&/g,ym=/\//g,bm=/=/g,wm=/\?/g,tu=/\+/g,km=/%5B/g,Cm=/%5D/g,nu=/%5E/g,Em=/%60/g,su=/%7B/g,Sm=/%7C/g,ou=/%7D/g,Nm=/%20/g;function aa(e){return e==null?"":encodeURI(""+e).replace(Sm,"|").replace(km,"[").replace(Cm,"]")}function iu(e){return aa(e).replace(su,"{").replace(ou,"}").replace(nu,"^")}function oa(e){return aa(e).replace(tu,"%2B").replace(Nm,"+").replace(eu,"%23").replace(vm,"%26").replace(Em,"`").replace(su,"{").replace(ou,"}").replace(nu,"^")}function Rm(e){return oa(e).replace(bm,"%3D")}function Pm(e){return aLine truncated
|
|
|
|
|
${JSON.stringify(e)}${t?`
|
|
|
|
|
while being at
|
|
|
|
|
`+JSON.stringify(t):""}`},[ut.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Im(t)}" via a navigation guard.`},[ut.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ut.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ut.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ro(e,t){return Qe(new Error,{type:e,[hu]:!0},t)}function gn(e,t){return e instanceof Error&&hu in e&&(t==null||!!(e.type&t))}var Om=["params","query","hash"];function Im(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of Om)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function mu(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<o.length;++i){let s=o[i].replace(tu," "),r=s.indexOf("="),d=Fo(r<0?s:s.slice(0,r)),c=r<0?null:Fo(s.slice(r+1));if(d in t){let u=t[d];Wt(u)||(u=t[d]=[u]),u.push(c)}else t[d]=c}return t}function pa(e){let t="";for(let o in e){let i=e[o];if(o=Cm(o),i==null){i!==void 0&&(t+=(t.length?"&":"")+o);continue}(Wt(i)?i.map(s=>s&&sa(s)):[i&&sa(i)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+o,s!=null&&(t+="="+s))})}return t}function gu(e){let t={};for(let o in e){let i=e[o];i!==void 0&&(t[o]=Wt(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return t}var vu=Symbol(""),fa=Symbol(""),Ui=Symbol(""),Bi=Symbol(""),zi=Symbol("");function Bo(){let e=[];function t(i){return e.push(i),()=>{let s=e.indexOf(i);s>-1&&e.splice(s,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Nn(e,t,o,i,s,r=d=>d()){let d=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((c,u)=>{let y=g=>{g===!1?u(ro(ut.NAVIGATION_ABORTED,{from:o,to:t})):g instanceof Error?u(g):Tm(g)?u(ro(ut.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(d&&i.enterCallbacks[s]===d&&typeof g=="function"&&d.push(g),c())},h=r(()=>e.call(i&&i.instances[s],t,o,y)),b=Promise.resolve(h);e.length<3&&(b=b.then(y)),b.catch(g=>u(g))})}function Hi(e,t,o,i,s=r=>r()){let r=[];for(let d of e)for(let c in d.components){let u=d.components[c];if(!(t!=="beforeRouteEnter"&&!d.instances[c]))if(xd(u)){let y=(u.__vccOpts||u)[t];y&&r.push(Nn(y,o,i,d,c,s))}else{let y=u();r.push(()=>y.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${c}" at "${d.path}"`);let b=pm(h)?h.default:h;d.mods[c]=h,d.components[c]=b;let g=(b.__vccOpts||b)[t];return g&&Nn(g,o,i,d,c,s)()}))}}return r}function yu(e,t){let o=[],i=[],s=[],r=Math.max(t.matched.length,e.matched.length);for(let d=0;d<r;d++){let c=t.matched[d];c&&(e.matched.find(y=>io(y,c))?i.push(c):o.push(c));let u=e.matched[d];u&&(t.matched.find(y=>io(y,u))||s.push(u))}return[o,i,s]}var Mm=()=>location.protocol+"//"+location.host;function Au(e,t){let{pathname:o,search:i,hash:s}=t,r=e.indexOf("#");if(r>-1){let d=s.includes(e.slice(r))?e.slice(r).length:1,c=s.slice(d);return c[0]!=="/"&&(c="/"+c),la(c,"")}return la(o,e)+i+s}function _m(e,t,o,i){let s=[],r=[],d=null,c=({state:g})=>{let k=Au(e,location),R=o.value,S=t.value,N=0;if(g){if(o.value=k,t.value=g,d&&d===R){d=null;return}N=S?g.position-S.position:0}else i(k);s.forEach(m=>{m(o.value,R,{delta:N,type:Li.pop,direction:N?N>0?Fi.forward:Fi.back:Fi.unknown})})};function u(){d=o.value}function y(g){s.push(g);let k=()=>{let R=s.indexOf(g);R>-1&&s.splice(R,1)};return r.push(k),k}function h(){if(document.visibilityState==="hidden"){let{history:g}=window;if(!g.state)return;g.replaceState(Qe({},g.state,{scroll:_s()}),"")}}function b(){for(let g of r)g();r=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:u,listen:y,destroy:b}}function bu(e,t,o,i=!1,s=!1){return{back:e,current:t,forward:o,replaced:i,position:window.history.length,scroll:s?_s():null}}function Vm(e){let{history:t,location:o}=window,i={value:Au(e,o)},s={value:t.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,y,h){let b=e.indexOf("#"),g=b>-1?(o.host&&document.querySelector("base")?e:e.slice(b))+u:Mm()+e+u;try{t[h?"replaceState":"pushState"](y,"",g),s.value=y}catch(k){console.error(k),o[h?"replace":"assign"](g)}}function d(u,y){r(u,Qe({},t.state,bu(s.value.back,u,s.value.forward,!0),y,{position:s.value.position}),!0),i.value=u}function c(u,y){let h=Qe({},s.value,t.state,{forward:u,scroll:_s()});r(h.current,h,!0),r(u,Qe({},bu(i.value,u,null),{position:h.position+1},y),!1),i.value=u}return{location:i,state:s,push:c,replace:d}}function Tu(e){e=du(e);let t=Vm(e),o=_m(e,t.state,t.location,t.replace);function i(r,d=!0){d||o.pauseListeners(),history.go(r)}let s=Qe({locatLine truncated
|
|
|
|
|
`).forEach((U,C)=>{for(let[q,z]of k){let K=q.exec(U);if(K&&!/^(if|for|while|switch|return|catch)$/.test(K[1])){O.push({name:K[1],kind:z,line:C+1});break}}}),R={content:e.content,list:O.slice(0,300)},R.list},e.goToSymbol=function(O){e.symbolsOpen=!1;let U=e.codeEditor;U&&(U.scrollToLine(O-1,!0,!0,()=>{}),U.gotoLine(O,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+O),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){e.codeEditor&&(e.moreOpen=!1,e.gotoError="",e.gotoValue=String(e.codeEditor.getCursorPosition().row+1),e.gotoOpen=!0,setTimeout(()=>{let O=window.document.getElementById("goto-input");O&&(O.focus(),O.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let O=e.codeEditor;if(!O)return;let U=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),C=O.session.getLength();if(!U||+U[1]<1||+U[1]>C){e.gotoError="Enter a line from 1 to "+C;return}O.gotoLine(+U[1],U[2]?Math.max(0,+U[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",O.focus()},e.rootEntries=function(){return[...e.files||[]].sort((O,U)=>{let C=O.size==null,q=U.size==null;return C!==q?C?-1:1:O.name.localeCompare(U.name)})},e.formatSize=function(O){if(O==null)return"";if(O<1024)return O+" B";let U=O/1024,C=q=>q.toFixed(1).replace(/\.0$/,"");return U<1024?C(U)+" KB":U<1024*1024?C(U/1024)+" MB":C(U/1024/1024)+" GB"},e.fileSize=function(O){if(!O)return null;let U=O.replace(/^\/+/,""),C=(e.files||[]).find(q=>(q.path?q.path+"/":"")+q.name===U);return C&&C.size!=null?C.size:null},e.revealFolder=function(O){e.sidebarHidden=!1,e.sidebarCollapsed=!1,tt(()=>{let U=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(O):O)+'"]');U&&(U.closest("li")?.classList.contains("open")||U.click(),U.scrollIntoView({block:"nearest"}),U.focus())})};let S={content:null,n:0},N=O=>{if(S.content===O)return S.n;let U=O;if(typeof U=="string")try{U=JSON.parse(U)}catch{U=null}let C=[],q=K=>{Array.isArray(K)?C.push(K.join("")):typeof K=="string"&&C.push(K)};(U&&(U.cells||(U.worksheets||[]).flatMap(K=>K.cells||[]))||[]).forEach(K=>{q(K?.source??K?.input),(K?.outputs||[]).forEach(ie=>{q(ie?.text),ie?.data&&(q(ie.data["text/plain"]),q(ie.data["text/markdown"]),q(ie.data["text/html"])),q(ie?.traceback)})});let z=C.reduce((K,ie)=>K+(ie.match(o)||[]).length,0);return S={content:O,n:z},z};e.redactionCount=function(){return e.type==="IPython"?N(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(o)||[]).length},e.renderRedacted=qs;let m=O=>O.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(O){let U=e.renderRedacted(O);if(!U||typeof window.DOMParser!="function")return U;let C=new window.DOMParser().parseFromString("<div>"+U+"</div>","text/html"),q={};return C.querySelectorAll("h1, h2, h3").forEach(z=>{let K=z.id||m(z.textContent);q[K]?K+="-"+ ++q[K]:q[K]=1,z.id=K}),C.body.firstChild.innerHTML};let E={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(E.content===e.content)return E.list;let U=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(C=>({id:C.id,text:C.textContent.trim(),level:C.tagName==="H3"?3:2})).slice(0,40);return E={content:e.content,list:U},U},e.activeHeading=null,s(window,"scroll",()=>{let O=e.readmeToc?e.readmeToc():[];if(!O.length)return;let U=150,C="",q="";for(let z of O){let K=window.document.getElementById(z.id);if(!K)continue;let ie=K.getBoundingClientRect().top;ie<U?C=z.id:!q&&ie<window.innerHeight-80&&(q=z.id)}q&&(C=q),e.activeHeading!==C&&(e.activeHeading=C)},{capture:!0,passive:!0}),e.scrollToHeading=function(O){if(!O){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let U=window.document.getElementById(O);U&&U.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=O},e.csvView="table";let M={content:null,rows:[]},_=(O,U)=>{let C=[],q=[],z="",K=!1;for(let ie=0;ie<O.length;ie++){let ne=O[ie];K?ne==='"'?O[ie+1]==='"'?(z+='"',ie++):K=!1:z+=ne:ne==='"'&&z===""?K=!0:ne===U?(q.push(z),z=""):ne===`
|
|
|
|
|
`||ne==="\r"?(ne==="\r"&&O[ie+1]===`
|
|
|
|
|
`&&ie++,q.push(z),C.push(q),q=[],z=""):z+=ne}return(z!==""||q.length)&&(q.push(z),C.push(q)),C.filter(ie=>ie.length>1||ie[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(M.content!==e.content){let O=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:_(e.content,O)}}return M.rows},e.csvNumCol=O=>{let U=e.csvRows().slice(1).map(C=>C[O]).filter(C=>C!=null&&String(C).trim()!=="");return U.length>0&&U.every(C=>e.csvNumeric(C))},e.csvNumeric=O=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(O)&&/\d/.test(O),e.redactParts=function(O){let U=[],C=0,q,z=/\bXXXX-(\d+)\b/g;for(O=String(O||"");q=z.exec(O);)q.index>C&&U.push({t:O.slice(C,q.index)}),U.push({n:q[1]}),C=q.index+q[0].length;return C<O.length&&U.push({t:O.slice(C)}),U},e.pathCopied=!1,e.copyPath=async function(){window.navigator.clipboard?.writeText&&(await window.navigator.clipboard.writeText(e.filePath||""),e.pathCopied=!0,setTimeout(()=>{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let O=e.content;if(e.type==="html"&&e.url)if(e.preview)O=e.sourceContent;else try{O=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(O),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function V(O){return r[O]?r[O]:O}function G(O){return O=="pdf"?"pdf":O=="html"||O=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(O)?"md":O=="org"?"org":O=="ipynb"?"IPython":d.indexOf(O)>-1?"text":c.indexOf(O)>-1?"image":y.indexOf(O)>-1?"media":u.indexOf(O)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(O){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=O,e.paths=O.split("/").filter(Boolean);let U=e.filePath.toLowerCase(),C=U.lastIndexOf(".");C>-1&&(U=U.substring(C+1));let q={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},z=V(U);e.languageName=q[z]??(z?z.charAt(0).toUpperCase()+z.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:V(U),onLoad:function(K){e.codeEditor=dn(K);{let Re=K.session,Fe=Re.getTokens.bind(Re),W=/\bXXXX-\d+\b/g;if(Re.getTokens=function(fe){let de=Fe(fe);if(!de.some(me=>me.value.indexOf("XXXX-")!==-1))return de;let ce=[];for(let me of de){if(me.value.indexOf("XXXX-")===-1){ce.push(me);continue}let Ie=0;W.lastIndex=0;let D;for(;D=W.exec(me.value);)D.index>Ie&&ce.push({type:me.type,value:me.value.slice(Ie,D.index)}),ce.push({type:"redacted.n"+D[0].slice(5),value:D[0]}),Ie=D.index+D[0].length;Ie<me.value.length&&ce.push({type:me.type,value:me.value.slice(Ie)})}return ce},!window.document.getElementById("redact-index-rules")){let fe=window.document.createElement("style");fe.id="redact-index-rules",fe.textContent=Array.from({length:99},(de,ce)=>`.ace_redacted.ace_n${ce+1}::after{content:"${ce+1}"}`).join(""),window.document.head.appendChild(fe)}K.renderer.updateFull(!0)}K.session.setUseWrapMode(e.wrapLines!==!1);let ie=K.container.closest?.(".file-card"),ne=()=>{if(!ie)return;let Re=K.renderer,Fe=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);ie.classList.toggle("at-right-edge",Fe<=2||Re.getScrollLeft()>=Fe-2)};K.session.on("changeScrollLeft",ne),K.renderer.on("afterRender",ne),window.matchMedia?.("(max-width: 767px)").matches&&K.setOption("hScrollBarAlwaysVisible",!0);let Y=ace.require("ace/range").Range,he=null;function Ee(Re,Fe){he!==null&&(K.session.removeMarker(he),he=null),Re!=null&&(he=K.session.addMarker(new Y(Re,0,Fe,1),"highlighted-line","fullLine"))}function Ue(Re){let Fe=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Fe){Ee(null);return}let W=parseInt(Fe[1])-1,fe=Fe[2]?parseInt(Fe[2])-1:W;Ee(W,fe),Re&&i.timeout(()=>{K.scrollToLine(W,!0,!0,function(){})},100)}Ue(!0);let Be=null;K.on("guttermousedown",function(Re){let Fe=Re.getDocumentPosition().row,W=Re.domEvent&&Re.domEvent.shiftKey,fe=Fe,de=Fe;W&&Be!==null?(fe=Math.min(Be,Fe),de=Math.max(Be,Fe)):Be=Fe;let ce=fe===de?`#L${fe+1}`:`#L${fe+1}-L${de+1}`,me=window.location.pathname+window.location.search+ce;e.preview||window.history.replaceState(null,"",me),Ee(fe,de),Re.stop()});let Je=s(window,"h
Line truncated
|
|
|
|
|
`);for(let b=0;b<h.length;b++){let g=h[b];if(g.startsWith("diff --git")){y(),u();continue}if(g.startsWith("--- ")){r&&r.lines.length&&y(),u().oldPath=g.replace(/^--- (a\/)?/,"").trim();continue}if(g.startsWith("+++ ")){u().newPath=g.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(g.startsWith("index ")||g.startsWith("similarity index")||g.startsWith("rename ")||g.startsWith("new file mode")||g.startsWith("deleted file mode")||g.startsWith("Binary files"))){if(g.startsWith("@@")){let k=g.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);k&&(d=parseInt(k[1],10),c=parseInt(k[2],10)),u().lines.push({kind:"hunk",oldNo:"",newNo:"",text:g});continue}r&&(g.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:c,text:g.slice(1)}),c++):g.startsWith("-")?(r.lines.push({kind:"remove",oldNo:d,newNo:"",text:g.slice(1)}),d++):(r.lines.push({kind:"ctx",oldNo:d,newNo:c,text:g.startsWith(" ")?g.slice(1):g}),d++,c++))}}return o(s,r),s.join("")}})({trustAsHtml:e=>e});function ag(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function lg(e,t="EUR"){let o=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:o%1?2:0,maximumFractionDigits:2}).format(o)}function dg(e){return String(e??"").toUpperCase()}function ug(e,t,o=0){return(e||[]).slice(o,o+t)}function cg(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function pg(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((i,s)=>{for(let r of o){let d=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let c=r.split(".").reduce((y,h)=>y?.[h],i),u=r.split(".").reduce((y,h)=>y?.[h],s);if(typeof c=="string"&&(c=c.toLowerCase()),typeof u=="string"&&(u=u.toLowerCase()),c!==u)return(c==null?-1:u==null?1:c<u?-1:1)*d}return 0})}function fg(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,s=>i[s])}function hg(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function ya(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),o=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(o))return"";let i=o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),s=new Date;s.setHours(0,0,0,0);let r=Math.round((o-s)/864e5),d;if(r===0)d="today";else if(r===1)d="tomorrow";else if(r===-1)d="yesterday";else{let c=Math.abs(r),u=Math.round(c/30.44),y=c<14?[c,"day"]:c<60?[Math.round(c/7),"week"]:u<18?[u,"month"]:[Math.round(c/365.25),"year"],h=y[0]+" "+y[1]+(y[0]===1?"":"s");d=r>0?"in "+h:h+" ago"}return i+" \xB7 "+d}function uo(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let o=e/1e3;if(o<60)return+(o<10?o.toFixed(2):o.toFixed(1))+t+"s";let i=r=>String(r).padStart(2,"0"),s=Math.round(o);return s<3600?Math.floor(s/60)+"m "+i(s%60)+"s":Math.floor(s/3600)+"h "+i(Math.floor(s%3600/60))+"m"}function ba(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let o={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(o.year="numeric"),t.toLocaleDateString(void 0,o)}var Xi=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function Qi(e,{flags:t,keys:o,count:i,onChange:s=()=>{}}){if(e.segView=()=>{let r=t()||{};if(o.every(c=>!!r[c]))return"all";let d=o.filter(c=>!!r[c]);return d.length===1?d[0]:"custom"},e.setSegView=r=>{let d=t();if(d){for(let c of o)d[c]=r==="all"?!0:c===r;s()}},e.segCount=r=>r==="all"?o.reduce((d,c)=>d+i(c),0):i(r),t()&&e.segView()==="custom")for(let r of o)t()[r]=!0}var qu=function(e,t,o){let i=Rt(),s=Ut();Hu(i,s),e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let d=()=>{let S=[];e.query.owner&&S.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&S.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=S};e.showSta
Line truncated
|
|
|
|
|
`+JSON.stringify(t):""}`},[ut.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${_m(t)}" via a navigation guard.`},[ut.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ut.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ut.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function as(e,t){return Je(new Error,{type:e,[hu]:!0},t)}function gn(e,t){return e instanceof Error&&hu in e&&(t==null||!!(e.type&t))}var qm=["params","query","hash"];function _m(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of qm)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function mu(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<s.length;++i){let o=s[i].replace(tu," "),r=o.indexOf("="),d=Ls(r<0?o:o.slice(0,r)),p=r<0?null:Ls(o.slice(r+1));if(d in t){let u=t[d];Wt(u)||(u=t[d]=[u]),u.push(p)}else t[d]=p}return t}function pa(e){let t="";for(let s in e){let i=e[s];if(s=Rm(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(Wt(i)?i.map(o=>o&&oa(o)):[i&&oa(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function gu(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=Wt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var vu=Symbol(""),fa=Symbol(""),Ui=Symbol(""),Bi=Symbol(""),zi=Symbol("");function Us(){let e=[];function t(i){return e.push(i),()=>{let o=e.indexOf(i);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Nn(e,t,s,i,o,r=d=>d()){let d=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((p,u)=>{let y=h=>{h===!1?u(as(ut.NAVIGATION_ABORTED,{from:s,to:t})):h instanceof Error?u(h):Vm(h)?u(as(ut.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(d&&i.enterCallbacks[o]===d&&typeof h=="function"&&d.push(h),p())},m=r(()=>e.call(i&&i.instances[o],t,s,y)),b=Promise.resolve(m);e.length<3&&(b=b.then(y)),b.catch(h=>u(h))})}function Hi(e,t,s,i,o=r=>r()){let r=[];for(let d of e)for(let p in d.components){let u=d.components[p];if(!(t!=="beforeRouteEnter"&&!d.instances[p]))if(xd(u)){let y=(u.__vccOpts||u)[t];y&&r.push(Nn(y,s,i,d,p,o))}else{let y=u();r.push(()=>y.then(m=>{if(!m)throw new Error(`Couldn't resolve component "${p}" at "${d.path}"`);let b=gm(m)?m.default:m;d.mods[p]=m,d.components[p]=b;let h=(b.__vccOpts||b)[t];return h&&Nn(h,s,i,d,p,o)()}))}}return r}function yu(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let d=0;d<r;d++){let p=t.matched[d];p&&(e.matched.find(y=>rs(y,p))?i.push(p):s.push(p));let u=e.matched[d];u&&(t.matched.find(y=>rs(y,u))||o.push(u))}return[s,i,o]}var $m=()=>location.protocol+"//"+location.host;function Du(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let d=o.includes(e.slice(r))?e.slice(r).length:1,p=o.slice(d);return p[0]!=="/"&&(p="/"+p),la(p,"")}return la(s,e)+i+o}function Lm(e,t,s,i){let o=[],r=[],d=null,p=({state:h})=>{let w=Du(e,location),R=s.value,S=t.value,N=0;if(h){if(s.value=w,t.value=h,d&&d===R){d=null;return}N=S?h.position-S.position:0}else i(w);o.forEach(v=>{v(s.value,R,{delta:N,type:Li.pop,direction:N?N>0?Fi.forward:Fi.back:Fi.unknown})})};function u(){d=s.value}function y(h){o.push(h);let w=()=>{let R=o.indexOf(h);R>-1&&o.splice(R,1)};return r.push(w),w}function m(){if(document.visibilityState==="hidden"){let{history:h}=window;if(!h.state)return;h.replaceState(Je({},h.state,{scroll:Vo()}),"")}}function b(){for(let h of r)h();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",m),document.removeEventListener("visibilitychange",m)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",m),document.addEventListener("visibilitychange",m),{pauseListeners:u,listen:y,destroy:b}}function bu(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?Vo():null}}function Fm(e){let{history:t,location:s}=window,i={value:Du(e,s)},o={value:t.state};o.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,y,m){let b=e.indexOf("#"),h=b>-1?(s.host&&document.querySelector("base")?e:e.slice(b))+u:$m()+e+u;try{t[m?"replaceState":"pushState"](y,"",h),o.value=y}catch(w){console.error(w),s[m?"replace":"assign"](h)}}function d(u,y){r(u,Je({},t.state,bu(o.value.back,u,o.value.forward,!0),y,{position:o.value.position}),!0),i.value=u}function p(u,y){let m=Je({},o.value,t.state,{forward:u,scroll:Vo()});r(m.current,m,!0),r(u,Je({},bu(i.value,u,null),{position:m.position+1},y),!1),i.value=u}return{location:i,state:o,push:p,replace:d}}function Tu(e){e=du(e);let t=Fm(e),s=Lm(e,t.state,t.location,t.replace);function i(r,d=!0){d||s.pauseListeners(),history.go(r)}let o=Je({locatLine truncated
|
|
|
|
|
`).forEach((U,C)=>{for(let[L,z]of w){let K=L.exec(U);if(K&&!/^(if|for|while|switch|return|catch)$/.test(K[1])){O.push({name:K[1],kind:z,line:C+1});break}}}),R={content:e.content,list:O.slice(0,300)},R.list},e.goToSymbol=function(O){e.symbolsOpen=!1;let U=e.codeEditor;U&&(U.scrollToLine(O-1,!0,!0,()=>{}),U.gotoLine(O,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+O),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){e.codeEditor&&(e.moreOpen=!1,e.gotoError="",e.gotoValue=String(e.codeEditor.getCursorPosition().row+1),e.gotoOpen=!0,setTimeout(()=>{let O=window.document.getElementById("goto-input");O&&(O.focus(),O.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let O=e.codeEditor;if(!O)return;let U=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),C=O.session.getLength();if(!U||+U[1]<1||+U[1]>C){e.gotoError="Enter a line from 1 to "+C;return}O.gotoLine(+U[1],U[2]?Math.max(0,+U[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",O.focus()},e.rootEntries=function(){return[...e.files||[]].sort((O,U)=>{let C=O.size==null,L=U.size==null;return C!==L?C?-1:1:O.name.localeCompare(U.name)})},e.formatSize=function(O){if(O==null)return"";if(O<1024)return O+" B";let U=O/1024,C=L=>L.toFixed(1).replace(/\.0$/,"");return U<1024?C(U)+" KB":U<1024*1024?C(U/1024)+" MB":C(U/1024/1024)+" GB"},e.fileSize=function(O){if(!O)return null;let U=O.replace(/^\/+/,""),C=(e.files||[]).find(L=>(L.path?L.path+"/":"")+L.name===U);return C&&C.size!=null?C.size:null},e.revealFolder=function(O){e.sidebarHidden=!1,e.sidebarCollapsed=!1,tt(()=>{let U=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(O):O)+'"]');U&&(U.closest("li")?.classList.contains("open")||U.click(),U.scrollIntoView({block:"nearest"}),U.focus())})};let S={content:null,n:0},N=O=>{if(S.content===O)return S.n;let U=O;if(typeof U=="string")try{U=JSON.parse(U)}catch{U=null}let C=[],L=K=>{Array.isArray(K)?C.push(K.join("")):typeof K=="string"&&C.push(K)};(U&&(U.cells||(U.worksheets||[]).flatMap(K=>K.cells||[]))||[]).forEach(K=>{L(K?.source??K?.input),(K?.outputs||[]).forEach(ie=>{L(ie?.text),ie?.data&&(L(ie.data["text/plain"]),L(ie.data["text/markdown"]),L(ie.data["text/html"])),L(ie?.traceback)})});let z=C.reduce((K,ie)=>K+(ie.match(s)||[]).length,0);return S={content:O,n:z},z};e.redactionCount=function(){return e.type==="IPython"?N(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(s)||[]).length},e.renderRedacted=_o;let v=O=>O.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(O){let U=e.renderRedacted(O);if(!U||typeof window.DOMParser!="function")return U;let C=new window.DOMParser().parseFromString("<div>"+U+"</div>","text/html"),L={};return C.querySelectorAll("h1, h2, h3").forEach(z=>{let K=z.id||v(z.textContent);L[K]?K+="-"+ ++L[K]:L[K]=1,z.id=K}),C.body.firstChild.innerHTML};let E={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(E.content===e.content)return E.list;let U=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(C=>({id:C.id,text:C.textContent.trim(),level:C.tagName==="H3"?3:2})).slice(0,40);return E={content:e.content,list:U},U},e.activeHeading=null,o(window,"scroll",()=>{let O=e.readmeToc?e.readmeToc():[];if(!O.length)return;let U=150,C="",L="";for(let z of O){let K=window.document.getElementById(z.id);if(!K)continue;let ie=K.getBoundingClientRect().top;ie<U?C=z.id:!L&&ie<window.innerHeight-80&&(L=z.id)}L&&(C=L),e.activeHeading!==C&&(e.activeHeading=C)},{capture:!0,passive:!0}),e.scrollToHeading=function(O){if(!O){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let U=window.document.getElementById(O);U&&U.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=O},e.csvView="table";let M={content:null,rows:[]},V=(O,U)=>{let C=[],L=[],z="",K=!1;for(let ie=0;ie<O.length;ie++){let se=O[ie];K?se==='"'?O[ie+1]==='"'?(z+='"',ie++):K=!1:z+=se:se==='"'&&z===""?K=!0:se===U?(L.push(z),z=""):se===`
|
|
|
|
|
`||se==="\r"?(se==="\r"&&O[ie+1]===`
|
|
|
|
|
`&&ie++,L.push(z),C.push(L),L=[],z=""):z+=se}return(z!==""||L.length)&&(L.push(z),C.push(L)),C.filter(ie=>ie.length>1||ie[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(M.content!==e.content){let O=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:V(e.content,O)}}return M.rows},e.csvNumCol=O=>{let U=e.csvRows().slice(1).map(C=>C[O]).filter(C=>C!=null&&String(C).trim()!=="");return U.length>0&&U.every(C=>e.csvNumeric(C))},e.csvNumeric=O=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(O)&&/\d/.test(O),e.redactParts=function(O){let U=[],C=0,L,z=/\bXXXX-(\d+)\b/g;for(O=String(O||"");L=z.exec(O);)L.index>C&&U.push({t:O.slice(C,L.index)}),U.push({n:L[1]}),C=L.index+L[0].length;return C<O.length&&U.push({t:O.slice(C)}),U},e.pathCopied=!1,e.copyPath=async function(){window.navigator.clipboard?.writeText&&(await window.navigator.clipboard.writeText(e.filePath||""),e.pathCopied=!0,setTimeout(()=>{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let O=e.content;if(e.type==="html"&&e.url)if(e.preview)O=e.sourceContent;else try{O=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(O),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function _(O){return r[O]?r[O]:O}function G(O){return O=="pdf"?"pdf":O=="html"||O=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(O)?"md":O=="org"?"org":O=="ipynb"?"IPython":d.indexOf(O)>-1?"text":p.indexOf(O)>-1?"image":y.indexOf(O)>-1?"media":u.indexOf(O)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(O){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=O,e.paths=O.split("/").filter(Boolean);let U=e.filePath.toLowerCase(),C=U.lastIndexOf(".");C>-1&&(U=U.substring(C+1));let L={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},z=_(U);e.languageName=L[z]??(z?z.charAt(0).toUpperCase()+z.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:_(U),onLoad:function(K){e.codeEditor=dn(K);{let Re=K.session,Fe=Re.getTokens.bind(Re),W=/\bXXXX-\d+\b/g;if(Re.getTokens=function(fe){let de=Fe(fe);if(!de.some(me=>me.value.indexOf("XXXX-")!==-1))return de;let ce=[];for(let me of de){if(me.value.indexOf("XXXX-")===-1){ce.push(me);continue}let Me=0;W.lastIndex=0;let A;for(;A=W.exec(me.value);)A.index>Me&&ce.push({type:me.type,value:me.value.slice(Me,A.index)}),ce.push({type:"redacted.n"+A[0].slice(5),value:A[0]}),Me=A.index+A[0].length;Me<me.value.length&&ce.push({type:me.type,value:me.value.slice(Me)})}return ce},!window.document.getElementById("redact-index-rules")){let fe=window.document.createElement("style");fe.id="redact-index-rules",fe.textContent=Array.from({length:99},(de,ce)=>`.ace_redacted.ace_n${ce+1}::after{content:"${ce+1}"}`).join(""),window.document.head.appendChild(fe)}K.renderer.updateFull(!0)}K.session.setUseWrapMode(e.wrapLines!==!1);let ie=K.container.closest?.(".file-card"),se=()=>{if(!ie)return;let Re=K.renderer,Fe=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);ie.classList.toggle("at-right-edge",Fe<=2||Re.getScrollLeft()>=Fe-2)};K.session.on("changeScrollLeft",se),K.renderer.on("afterRender",se),window.matchMedia?.("(max-width: 767px)").matches&&K.setOption("hScrollBarAlwaysVisible",!0);let Y=ace.require("ace/range").Range,he=null;function Se(Re,Fe){he!==null&&(K.session.removeMarker(he),he=null),Re!=null&&(he=K.session.addMarker(new Y(Re,0,Fe,1),"highlighted-line","fullLine"))}function Ue(Re){let Fe=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Fe){Se(null);return}let W=parseInt(Fe[1])-1,fe=Fe[2]?parseInt(Fe[2])-1:W;Se(W,fe),Re&&i.timeout(()=>{K.scrollToLine(W,!0,!0,function(){})},100)}Ue(!0);let Be=null;K.on("guttermousedown",function(Re){let Fe=Re.getDocumentPosition().row,W=Re.domEvent&&Re.domEvent.shiftKey,fe=Fe,de=Fe;W&&Be!==null?(fe=Math.min(Be,Fe),de=Math.max(Be,Fe)):Be=Fe;let ce=fe===de?`#L${fe+1}`:`#L${fe+1}-L${de+1}`,me=window.location.pathname+window.location.search+ce;e.preview||window.history.replaceState(null,"",me),Se(fe,de),Re.stop()});let Qe=o(window,"h
Line truncated
|
|
|
|
|
`);for(let b=0;b<m.length;b++){let h=m[b];if(h.startsWith("diff --git")){y(),u();continue}if(h.startsWith("--- ")){r&&r.lines.length&&y(),u().oldPath=h.replace(/^--- (a\/)?/,"").trim();continue}if(h.startsWith("+++ ")){u().newPath=h.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(h.startsWith("index ")||h.startsWith("similarity index")||h.startsWith("rename ")||h.startsWith("new file mode")||h.startsWith("deleted file mode")||h.startsWith("Binary files"))){if(h.startsWith("@@")){let w=h.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);w&&(d=parseInt(w[1],10),p=parseInt(w[2],10)),u().lines.push({kind:"hunk",oldNo:"",newNo:"",text:h});continue}r&&(h.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:p,text:h.slice(1)}),p++):h.startsWith("-")?(r.lines.push({kind:"remove",oldNo:d,newNo:"",text:h.slice(1)}),d++):(r.lines.push({kind:"ctx",oldNo:d,newNo:p,text:h.startsWith(" ")?h.slice(1):h}),d++,p++))}}return s(o,r),o.join("")}})({trustAsHtml:e=>e});function cg(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function pg(e,t="EUR"){let s=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:s%1?2:0,maximumFractionDigits:2}).format(s)}function fg(e){return String(e??"").toUpperCase()}function hg(e,t,s=0){return(e||[]).slice(s,s+t)}function mg(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function gg(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let d=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let p=r.split(".").reduce((y,m)=>y?.[m],i),u=r.split(".").reduce((y,m)=>y?.[m],o);if(typeof p=="string"&&(p=p.toLowerCase()),typeof u=="string"&&(u=u.toLowerCase()),p!==u)return(p==null?-1:u==null?1:p<u?-1:1)*d}return 0})}function vg(e,t){if(!e)return"";let s=new Date(e);if(isNaN(s))return String(e);if(!t||t==="mediumDate")return s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:s.getFullYear(),MMM:s.toLocaleDateString(void 0,{month:"short"}),MM:String(s.getMonth()+1).padStart(2,"0"),dd:String(s.getDate()).padStart(2,"0"),d:s.getDate(),HH:String(s.getHours()).padStart(2,"0"),mm:String(s.getMinutes()).padStart(2,"0"),ss:String(s.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,o=>i[o])}function yg(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function ya(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),s=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(s))return"";let i=s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),o=new Date;o.setHours(0,0,0,0);let r=Math.round((s-o)/864e5),d;if(r===0)d="today";else if(r===1)d="tomorrow";else if(r===-1)d="yesterday";else{let p=Math.abs(r),u=Math.round(p/30.44),y=p<14?[p,"day"]:p<60?[Math.round(p/7),"week"]:u<18?[u,"month"]:[Math.round(p/365.25),"year"],m=y[0]+" "+y[1]+(y[0]===1?"":"s");d=r>0?"in "+m:m+" ago"}return i+" \xB7 "+d}function qn(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let s=e/1e3;if(s<60)return+(s<10?s.toFixed(2):s.toFixed(1))+t+"s";let i=r=>String(r).padStart(2,"0"),o=Math.round(s);return o<3600?Math.floor(o/60)+"m "+i(o%60)+"s":Math.floor(o/3600)+"h "+i(Math.floor(o%3600/60))+"m"}function ba(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let s={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(s.year="numeric"),t.toLocaleDateString(void 0,s)}var Xi=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function Ji(e,{flags:t,keys:s,count:i,onChange:o=()=>{}}){if(e.segView=()=>{let r=t()||{};if(s.every(p=>!!r[p]))return"all";let d=s.filter(p=>!!r[p]);return d.length===1?d[0]:"custom"},e.setSegView=r=>{let d=t();if(d){for(let p of s)d[p]=r==="all"?!0:p===r;o()}},e.segCount=r=>r==="all"?s.reduce((d,p)=>d+i(p),0):i(r),t()&&e.segView()==="custom")for(let r of s)t()[r]=!0}var Lu=function(e,t,s){let i=Ct(),o=Ut();Gu(i,o),e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let d=()=>{let S=[];e.query.owner&&S.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&S.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=S};e.showSta
Line truncated
|
|
|
|
|
`+S.join(`
|
|
|
|
|
`)],{type:"text/csv"}),m=document.createElement("a");m.href=URL.createObjectURL(N),m.download=i.username+"-repositories.csv",m.click()},e.showStatusMessage=g=>{let k=g.statusMessage||"(no message)";window.prompt(`Status message for ${g.repoId} (${g.status}):`,k)},e.fetchGithubInfo=g=>{let k=window.open("","_blank");k&&k.document.write("<pre>Loading GitHub info for "+g.repoId+"...</pre>"),t.get("/api/admin/repos/"+g.repoId+"/github").then(R=>{k&&(k.document.open(),k.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(R.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+"</pre>"),k.document.close())},R=>{let S=R&&R.data?JSON.stringify(R.data,null,2):String(R);k&&(k.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+S+"</pre>")})};function u(g){t.get("/api/admin/users/"+g+"/repos",{}).then(k=>{e.repositories=k.data},k=>{console.error(k)})}function y(g){t.get("/api/admin/users/"+g,{}).then(k=>{e.userInfo=k.data},k=>{console.error(k)})}y(i.username),u(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>y(i.username),g=>console.error(g))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>y(i.username),g=>console.error(g))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>y(i.username),g=>console.error(g))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>y(i.username),g=>console.error(g))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(g=>{e.tokens=g.data||[]},g=>{g.status!==401&&g.status!==403&&console.error(g)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(g=>{e.tokenForm.plaintext=g.data.token,e.tokenForm.name="",h()},g=>console.error(g))},e.revokeToken=g=>{confirm(`Revoke token "${g.name}"?`)&&t.delete("/api/admin/tokens/"+g.id).then(()=>h(),k=>console.error(k))},e.removeCache=g=>{confirm("Remove cached files for "+g.repoId+"?")&&t.delete("/api/admin/repos/"+g.repoId).then(()=>u(i.username),k=>console.error(k))},e.removeRepository=g=>{confirm("Remove repository "+g.repoId+"?")&&t.delete("/api/repo/"+g.repoId+"/").then(()=>u(i.username),k=>console.error(k))},e.updateRepository=g=>{let k=ot({title:`Refreshing ${g.repoId}...`,date:new Date,body:`The repository ${g.repoId} is going to be refreshed.`});e.toasts.push(k),t.post(`/api/repo/${g.repoId}/refresh`).then(R=>{R.data.status=="ready"?k.title=`${g.repoId} is refreshed.`:k.title=`Refreshing of ${g.repoId}.`},R=>{k.title=`Error during the refresh of ${g.repoId}.`,k.body=R.body})},e.getGitHubRepositories=g=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(k=>{e.userInfo.repositories=k.data})};let b=null;e.watch("query",()=>{s.timeout.cancel(b),b=s.timeout(()=>{u(i.username)},500)},!0)},Fu=function(e,t,o){let i=Rt(),s=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=R=>{if(R.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){R.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=R=>{R==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[R]="",e.query.page=1},e.chips=[];let d=()=>{let R=[];(e.query.dateFrom||e.query.dateTo)&&R.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=R};e.statusCountFor=R=>{let S=(e.statusCounts||[]).find(N=>N._id===R);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=R=>{e.query.sort===R?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=R,e.query.direction="desc"),e.query.page=1},e.sortIcon=R=>e.query.sort===R?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let c="admin.conferences.filterPrefs",u={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(c)||{};e.query=Object.assign({},u,y,{page:1,search:""});let h=o.search();h.search&&(e.query.search=h.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let R=window.prompt("Preset name:");if(!R)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==R),e.presets.push({name:R,query:S}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=R=>{Object.assign(e.query,R.query,{page:1})},e.deletePreset=R=>{e.presets=(e.presets||[]).filter(S=>S.name!==R.name),localStorage.setItem(b,JS
Line truncated
|
|
|
|
|
`).map((ne,Y)=>Y===0?ne:ie+ne).join(`
|
|
|
|
|
`)}else typeof O=="number"||typeof O=="boolean"?K=String(O):K=JSON.stringify(O);ee.push(`${q}${K}${z}`)}),ee.push("}"),ee.join(`
|
|
|
|
|
`)}function y(m){let E=[],M="",_=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,V=0,G;for(;G=_.exec(m);)M+=m.slice(V,G.index),V=_.lastIndex,E.push({key:G[1],op:G[2]||"=",val:G[3]});return M+=m.slice(V),{filters:E,free:M.trim().toLowerCase()}}function h(m,E){for(let M of E.filters){let _=(G,ee,X)=>{let O=parseFloat(G),U=parseFloat(ee);return X==="="?String(G)===String(ee):X==="!="?String(G)!==String(ee):X===">="?O>=U:X==="<="?O<=U:X===">"?O>U:X==="<"?O<U:!0},V;if(M.key==="code")V=m.displayMessage;else if(M.key==="module")V=m.module;else if(M.key==="status")V=m._status;else if(M.key==="url")V=m._url;else if(M.key==="repo")V=m._repoId;else if(M.key==="level")V=m.level;else continue;if(V==null||!_(V,M.val,M.op))return!1}return!(E.free&&((m.displayMessage||"")+" "+(m.module||"")+" "+(m._url||"")+" "+JSON.stringify(m.raw||[])).toLowerCase().indexOf(E.free)===-1)}function b(){let m=y(e.query.search||"");e.parsedFilterCount=m.filters.length;let E=e.query.bucket,M=e.entries.filter(X=>E&&X._bucket!==E?!1:h(X,m)),_=e.query.group;if(_){let X=C=>_==="module"?C.module:C.displayMessage||C.message||"_",O=new Map;for(let C of M){let q=X(C);if(O.has(q)){let z=O.get(q);z.count++,z._related.push(C),new Date(C.ts)>new Date(z.ts)&&(z.ts=C.ts,z._url=C._url,z._status=C._status),new Date(C.ts)<new Date(z._firstSeen)&&(z._firstSeen=C.ts)}else{let z=Object.assign({},C);z._key=`${_}:${q}`,z._related=[C],z._firstSeen=C.ts,z._lastHourCount=0,z.count=1,O.set(q,z)}}let U=Date.now()-3600*1e3;for(let C of O.values())C._lastHourCount=C._related.filter(q=>new Date(q.ts).getTime()>=U).length;M=Array.from(O.values())}else M=M.map((X,O)=>(X._key="row:"+O+":"+X.ts,X._related=[X],X._firstSeen=X.ts,X._lastHourCount=0,X.count=1,X));let V=X=>({error:0,warn:1,info:2})[X._bucket]??1;e.query.sort==="count"?M.sort((X,O)=>V(X)-V(O)||O.count-X.count||new Date(O.ts)-new Date(X.ts)):M.sort((X,O)=>V(X)-V(O)||new Date(O.ts)-new Date(X.ts)),e.visible=M;let G=!!(e.query.bucket||(e.query.search||"").trim()),ee=!G&&(e.stats?.severity?.error||0)>0&&!M.some(X=>X._bucket==="error")&&e.entries.length<1500;(G&&!M.length||ee)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,g(!0))}function g(m){let E=m?e.entries.length:0,M=m?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:E,limit:M}}).then(_=>{let V=(_.data.entries||[]).map(c);e.entries=m?e.entries.concat(V):V,e.available=!!_.data.available,e.cap=_.data.max||e.cap,e.total=_.data.total||e.entries.length,e._autoLoading=!1,b()},_=>{e._autoLoading=!1,console.error(_)})}e.loadMore=()=>g(!0),e.canLoadMore=()=>e.entries.length<e.total;function k(){t.get("/api/admin/errors/stats").then(m=>{let E=m.data||{},M=E.prev24h?Math.round((E.last24h-E.prev24h)/E.prev24h*100):0;e.stats={last24h:E.last24h||0,prev24h:E.prev24h||0,delta:M,severity:E.severity||{error:0,warn:0,info:0},unique:E.unique||{error:0,warn:0,info:0},buckets:E.buckets||[],dropped:E.dropped||0},b()},m=>console.error(m))}function R(){g(),k()}e.barPx=(m,E)=>{let M=e.stats.buckets||[],_=0,V=0;for(let O of M)_=Math.max(_,(O.error||0)+(O.warn||0)),V=Math.max(V,O.info||0);let G=m[E]||0;if(!G)return 0;if(E==="info")return V?Math.max(2,Math.round(G/V*(_?16:60))):0;let ee=(m.error||0)+(m.warn||0),X=Math.round(ee/_*44);return Math.max(4,Math.round(G/ee*X))},e.bucketTitle=m=>`${new Date(m.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${m.error||0} err \xB7 ${m.warn||0} warn \xB7 ${m.info||0} info`,e.toggle=m=>{e.expanded[m._key]=!e.expanded[m._key]},e.setBucket=m=>{e.query.bucket=m},e.refreshNow=R,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(R,m=>console.error(m))},e.exportCsv=()=>{let m=["ts","level","module","displayMessage","_status","_url","_repoId"],E=[m.join(",")];for(let G of e.visible)E.push(m.map(ee=>{let X=G[ee]==null?"":String(G[ee]);return/[",\n]/.test(X)?`"${X.replace(/"/g,'""')}"`:X}).join(","));let M=new Blob([E.join(`
|
|
|
|
|
`)],{type:"text/csv;charset=utf-8"}),_=URL.createObjectURL(M),V=document.createElement("a");V.href=_,V.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(V),V.click(),document.body.removeChild(V),URL.revokeObjectURL(_)};function S(m){e.copyHint=`${m} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=m=>{navigator.clipboard.writeText(m._detailJson).then(()=>S("JSON"))},e.copyCurl=m=>{if(!m._url)return;let M=`curl -X ${m._method||"GET"} '${window.location.origin}${m._url}'`;navigator.clipboard.writeText(M).then(()=>S("curl"))},R();let N=i(()=>{e.query.autoRefresh&&R()},15e3);e.on("dispose",()=>i.cancel(N)),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},zu=function(e,t,o,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(m){e.ovView=m;try{window.history.replaceState(null,"",m==="summary"?window.location.pathname:"#"+m)}catch{}};var s=!1;e.loadCache=function(){if(!s){s=!0;var m=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:m}}).then(function(E){m===e.cacheMinutes&&(e.cacheReport=E.data,e.cacheError=E.data.available?null:E.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){s=!1,m!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(m){return e.cacheTraffic==="all"||m.traffic===e.cacheTraffic})},e.cacheRate=function(m,E){var M=e.cacheRows(),_=function(ee){return M.filter(function(X){return X.name===ee}).reduce(function(X,O){return X+O[E]},0)},V=_(m+"_hit"),G=_(m+"_miss");return V+G?(100*V/(V+G)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(m){return m.replaceAll("_"," ")},e.cacheP95=function(m){var E=0,M=e.cacheReport?.latencyBucketsMs||[];if(!m.count)return"No samples";if(!m.ms)return"Not timed";for(var _=0;_<=M.length;_++)if(E+=m["b"+_]||0,E>=Math.ceil(m.count*.95))return _<M.length?"\u2264 "+uo(M[_]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let m=e.data&&e.data.system||{},E=[["Memory",m.memPercent],["Disk",m.diskPercent]].filter(([,_])=>_>90);return E.length?E.map(([_,V])=>_+" is at "+V+"%").join(" and ")+". New anonymizations may fail until "+(E.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(m){return m==null?"":uo(m)},e.latencyBound=function(m,E){return m.count?m[E]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(m[E]):"No samples"},e.firstByteBound=function(m){return e.latencyBound({count:m.firstByteCount,p95UpperMs:m.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(m){return Math.max(0,Math.round((Date.now()-m.sampledAt)/1e3))},e.peakRss=function(m){return(e.performance.runtimeSeries||[]).filter(function(E){return E.instance===m.instance}).reduce(function(E,M){return Math.max(E,M.rss)},m.memory.rss)},e.performanceWarning=function(m){return e.sampleAge(m)>45||m.droppedBatches||m.droppedMetrics||m.sockets?.closeWait>0||m.eventLoop?.p95Ms>100||m.memoryLimitBytes&&m.memory.rss>m.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var m=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==m&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:m}}).then(function(E){m===e.performanceMinutes&&(e.performance=E.data,e.performanceError=E.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){m===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,m!==e.performanceMinutes&&e.loadPerformance()}))};function d(m){if(m==null)return"\u2014";for(var E=["B","KB","MB","GB","TB"],M=0,_=m;_>=1024&&M<E.length-1;)_/=1024,M++;return _.toFixed(M>0?1:0).replace(/\.0$/,"")+" "+E[M]}e.humanBytes=d;function c(m){if(!m)return"\u2014";var E=Math.floor(m/86400),M=Math.floor(m%86400/3600),_=Math.floor(m%3600/60);return E>0?E+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(_<10?"0":"")+_+"m":_+"m"}e.humanDuration=c;function u(m){return m==null?"\u2014":m>=1e6?(m/1e6).toFixed(1)+"M":m>=1e3?(m/1e3).toFixed(1)+"K":String(m)}e.humanNum=u,e.queueTotal=function(m){return m?(m.waiting||0)+(m.active||0)+(m.delayed||0)+(m.failed||0):0},e.statusCount=function(m){if(!e.data||!e.data.repos)return 0;for(var E=e.data.repos.statusBreakdown||[],M=0;M<E.length;M++)if(E[M]._id===m)return E[M].count;return 0},e.barPct=function(m){var E=e.data&&e.data.repos?e.data.repos.total:0;if(!E)return 0;var M=[m];m==="expired"&&M.push("expiring"),m==="removed"&&M.push("remo
Line truncated
|
|
|
|
|
`)},Pa=class{constructor(t){xe(this,"gen");xe(this,"threads",[]);xe(this,"match",!1);xe(this,"runs",[]);xe(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},sc=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((o,i)=>o!==t.ids[i])?!1:e.runs.every(o=>t.runs.some(i=>i.neg===o.neg&&sc(i.state,o.state))),Ju=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),po,Un,Aa,Ta,Us=class{constructor(t,o,i){_e(this,Un);xe(this,"dots");xe(this,"dotStart");_e(this,po);this.dots=t,this.dotStart=o,Le(this,po,i)}state(){return new Pa(++re(this,po).gen)}done(t){return t.ids=t.threads.map(o=>o.id).sort((o,i)=>o-i),t.match&&t.ids.unshift(Da.id),t}restricted(t,o){return o&&(this.dots||this.dotStart&&t===0)}add(t,o,i,s){switch(o.t){case"split":if(!Ve(this,Un,Aa).call(this,t,o))return;for(let d of o.out)this.add(t,d,i,s);return;case"neg":if(!Ve(this,Un,Aa).call(this,t,o))return;let r=this.state();return this.add(r,o.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:o,state:r},i,s);case"star":if(this.restricted(i,s))return;Ve(this,Un,Ta).call(this,t,o)&&this.add(t,o.next,i,s);return;case"match":t.match=!0;return;default:Ve(this,Un,Ta).call(this,t,o)}}addRun(t,o,i,s){for(let r of t.runs)if(r.neg===o.neg&&sc(r.state,o.state))return;t.runs.push(o),o.state.match||this.add(t,o.neg.next,i,s)}step(t,o,i,s){let r=this.state();for(let d of t.threads)switch(d.t){case"lit":Ma(d,o)&&this.add(r,d.next,i+1,s);break;case"any":this.restricted(i,s)||this.add(r,d.next,i+1,s);break;case"class":!this.restricted(i,s)&&d.re.test(o)&&this.add(r,d.next,i+1,s);break;case"star":this.restricted(i,s)||this.add(r,d,i+1,s)}if(!this.restricted(i,s))for(let d of t.runs){if(d.state.dead){this.addRun(r,d,i+1,s);continue}let c=this.step(d.state,o,i,!1);this.addRun(r,{t:"run",neg:d.neg,state:c},i+1,s)}return this.done(r)}};po=new WeakMap,Un=new WeakSet,Aa=function(t,o){let{seen:i}=re(this,po);return i[o.id]===t.gen?!1:(i[o.id]=t.gen,!0)},Ta=function(t,o){let{has:i}=re(this,po);return i[o.id]===t.gen?!1:(i[o.id]=t.gen,t.threads.push(o),!0)};var ic=e=>{let t=e.ids.join();if(!e.runs.length)return t;let o=e.runs.map(i=>`${i.neg.id}(${ic(i.state)})`);return`${t}|${o.sort().join("|")}`},Kg=1<<18,zo,Ho,Vn,fo,qn,$n,Ln,nn,Ia,xi,rc,Oa=class{constructor(t,o){_e(this,nn);_e(this,zo);_e(this,Ho,new Map);_e(this,Vn,0);_e(this,fo);_e(this,qn);_e(this,$n);_e(this,Ln);Le(this,zo,t),Le(this,$n,new Us(!1,!1,o)),Le(this,Ln,new Us(!1,!0,o))}start(t){if(t){if(re(this,qn))return re(this,qn);let i=re(this,Ln).state();return re(this,Ln).add(i,re(this,zo),0,!0),Le(this,qn,Ve(this,nn,Ia).call(this,re(this,Ln).done(i)))}if(re(this,fo))return re(this,fo);let o=re(this,$n).state();return re(this,$n).add(o,re(this,zo),0,!0),Le(this,fo,Ve(this,nn,xi).call(this,re(this,$n).done(o)))}next(t,o){let i=o.charCodeAt(0),s=i<128?void 0:t.next.get(o);if(s)return s;let r=t===re(this,qn)?Ve(this,nn,xi).call(this,re(this,Ln).step(t.state,o,0,!0)):Ve(this,nn,xi).call(this,re(this,$n).step(t.state,o,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Le(this,Vn,re(this,Vn)+128)),t.ascii[i]=r):t.next.set(o,r),nl(this,Vn)._++,r}};zo=new WeakMap,Ho=new WeakMap,Vn=new WeakMap,fo=new WeakMap,qn=new WeakMap,$n=new WeakMap,Ln=new WeakMap,nn=new WeakSet,Ia=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},xi=function(t){let o=ic(t),i=re(this,Ho).get(o);if(i)return i;re(this,Vn)>Kg&&Ve(this,nn,rc).call(this);let s=Ve(this,nn,Ia).call(this,t);return re(this,Ho).set(o,s),Le(this,Vn,re(this,Vn)+(o.length+1)),s},rc=function(){re(this,Ho).clear(),Le(this,Vn,0),Le(this,fo,void 0),Le(this,qn,void 0)};var Yg=e=>{let t=[];for(let o=e;o.t!=="match";o=o.next){if(o.t==="split"||o.t==="neg")return;t.push(o)}return t},Xg=(e,t,o,i)=>{let s=0,r=o,d=-1,c=0;for(;r<i;){let u=e[s];if(u?.t==="star"){d=s++,c=r;continue}let y=t[r];if(u&&(u.t==="any"||u.t==="lit"&&Ma(u,y)||u.t==="class"&&u.re.test(y))){s++,r++;continue}if(d===-1)return!1;s=d+1,r=++c}for(;e[s]?.t==="star";)s++;return s===e.length},ac=e=>{let t=0,o=0;for(let i of e){let[s,r]=Qg(i);t+=s,o+=r}return[t,o]},Qg=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(ac),o=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),s=i===0?0:1/0;return e.type==="@"?[o,i]:e.type==="?"?[0,i]:e.type==="*"?[0,s]:[o,s]},Zu=(e,t,o)=>{for(let i=0;i<e.length;i++)if(!Ma(e[i],t[o+i]))return!1;return!0},Jg=/[/\ud800-\udfff]/,Zg=/[\ud800-\udfff]/,Zi=e=>Zg.test(e)?[...e]:e,xu=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Fn,jo,ho,er,mo,zs,tr,go,Hs,js,Gs,Dn,vn,Go,Wo,Ws,nr,tn,vo,Fs,Bs=class{constructor(t,o={}){_e(this,vo);xe(this,"pattern");xe(this,"options");_e(this,Fn);_e(this,jo);_e(this,ho);_e(this,er);_e(this,mo);_e(this,zs,!1);_e(this,tr);_e(this,go);_e(this,Hs,!1);_e(this,js,0);_e(this,Gs,1/0);_e(this,Dn,[]);_e(this,vn,[]);_e(this,Go);_e(this,Wo);_e(this,Ws,!1);_e(this,nr);_e(this,tn);if(t.includes
Line truncated
|
|
|
|
|
`).forEach((o,i)=>{let{term:s}=Ga(o.trim());if(!s)return;let r=[];for(let d=0;d<s.length;d++){if(s[d]==="\\"){d++;continue}Sc.has(s[d])&&!r.includes(s[d])&&r.push(s[d])}r.length&&t.push({line:i,term:s,symbols:r})}),t}function Rc(e,t){let o=String(e||"").split(`
|
|
|
|
|
`),i=o[t];if(i===void 0)return e;let{term:s}=Ga(i.trim());if(!s)return e;let r="";for(let c=0;c<s.length;c++){if(s[c]==="\\"){r+=s.slice(c,c+2),c++;continue}r+=Sc.has(s[c])||s[c]==="."?"\\"+s[c]:s[c]}let d=i.indexOf(s);return o[t]=i.slice(0,d)+r+i.slice(d+s.length),o.join(`
|
|
|
|
|
`)}var Wn={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t
Line truncated
|
|
|
|
|
`)),e.options=Object.assign({},e.options,b.options),c.restore()})}u();let y=null;e.saveDefault=h=>{if(h&&h.preventDefault&&h.preventDefault(),e.saving)return;let b=c.checkpoint(),g={terms:e.terms.split(`
|
|
|
|
|
`).map(k=>k.trim()).filter(k=>k.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",g).then(()=>{c.accept(b),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",y&&i.cancel(y),y=i(()=>{e.message=null},2500)},k=>{e.saving=!1;let R=k&&k.data&&k.data.error,S="Unable to save your defaults. Please try again.";Promise.all([o("ERRORS."+R),o("ERRORS.unknown_error")]).then(([N,m])=>{e.error=R&&N!==m?N:S},()=>{e.error=S})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Mc=function(e,t,o){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{o.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},_c=function(e,t,o,i,s){e.user&&!e.user.status&&o.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&o.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(c){e.feature=c},e.featureHref=function(c){return c.needsUser&&!e.user?"/signin":c.href},e.featureTarget=function(c){return c.needsUser&&!e.user?"_self":c.target||void 0},e.featureKeydown=function(c,u){let y={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[c.key];if(y===void 0)return;c.preventDefault();let h=e.features.length,b=y==="first"?0:y==="last"?h-1:(u+y+h)%h;e.feature=e.features[b].key,s(()=>{let g=i.document.getElementById("feature-tab-"+e.feature);g&&g.focus()})},e.demoText=`# DeepLearnUtils
|
|
|
|
|
`)],{type:"text/csv"}),v=document.createElement("a");v.href=URL.createObjectURL(N),v.download=i.username+"-repositories.csv",v.click()},e.showStatusMessage=h=>{let w=h.statusMessage||"(no message)";window.prompt(`Status message for ${h.repoId} (${h.status}):`,w)},e.fetchGithubInfo=h=>{let w=window.open("","_blank");w&&w.document.write("<pre>Loading GitHub info for "+h.repoId+"...</pre>"),t.get("/api/admin/repos/"+h.repoId+"/github").then(R=>{w&&(w.document.open(),w.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(R.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+"</pre>"),w.document.close())},R=>{let S=R&&R.data?JSON.stringify(R.data,null,2):String(R);w&&(w.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+S+"</pre>")})};function u(h){t.get("/api/admin/users/"+h+"/repos",{}).then(w=>{e.repositories=w.data},w=>{console.error(w)})}function y(h){t.get("/api/admin/users/"+h,{}).then(w=>{e.userInfo=w.data},w=>{console.error(w)})}y(i.username),u(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>y(i.username),h=>console.error(h))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>y(i.username),h=>console.error(h))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>y(i.username),h=>console.error(h))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>y(i.username),h=>console.error(h))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function m(){t.get("/api/admin/tokens").then(h=>{e.tokens=h.data||[]},h=>{h.status!==401&&h.status!==403&&console.error(h)})}m(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(h=>{e.tokenForm.plaintext=h.data.token,e.tokenForm.name="",m()},h=>console.error(h))},e.revokeToken=h=>{confirm(`Revoke token "${h.name}"?`)&&t.delete("/api/admin/tokens/"+h.id).then(()=>m(),w=>console.error(w))},e.removeCache=h=>{confirm("Remove cached files for "+h.repoId+"?")&&t.delete("/api/admin/repos/"+h.repoId).then(()=>u(i.username),w=>console.error(w))},e.removeRepository=h=>{confirm("Remove repository "+h.repoId+"?")&&t.delete("/api/repo/"+h.repoId+"/").then(()=>u(i.username),w=>console.error(w))},e.updateRepository=h=>{let w=st({title:`Refreshing ${h.repoId}...`,date:new Date,body:`The repository ${h.repoId} is going to be refreshed.`});e.toasts.push(w),t.post(`/api/repo/${h.repoId}/refresh`).then(R=>{R.data.status=="ready"?w.title=`${h.repoId} is refreshed.`:w.title=`Refreshing of ${h.repoId}.`},R=>{w.title=`Error during the refresh of ${h.repoId}.`,w.body=R.body})},e.getGitHubRepositories=h=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(w=>{e.userInfo.repositories=w.data})};let b=null;e.watch("query",()=>{o.timeout.cancel(b),b=o.timeout(()=>{u(i.username)},500)},!0)},Bu=function(e,t,s){let i=Ct(),o=Ut();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=R=>{if(R.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){R.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=R=>{R==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[R]="",e.query.page=1},e.chips=[];let d=()=>{let R=[];(e.query.dateFrom||e.query.dateTo)&&R.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=R};e.statusCountFor=R=>{let S=(e.statusCounts||[]).find(N=>N._id===R);return S?S.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=R=>{e.query.sort===R?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=R,e.query.direction="desc"),e.query.page=1},e.sortIcon=R=>e.query.sort===R?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",u={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},y=loadFilterPrefs(p)||{};e.query=Object.assign({},u,y,{page:1,search:""});let m=s.search();m.search&&(e.query.search=m.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let R=window.prompt("Preset name:");if(!R)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==R),e.presets.push({name:R,query:S}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=R=>{Object.assign(e.query,R.query,{page:1})},e.deletePreset=R=>{e.presets=(e.presets||[]).filter(S=>S.name!==R.name),localStorage.setItem(b,JS
Line truncated
|
|
|
|
|
`).map((se,Y)=>Y===0?se:ie+se).join(`
|
|
|
|
|
`)}else typeof O=="number"||typeof O=="boolean"?K=String(O):K=JSON.stringify(O);te.push(`${L}${K}${z}`)}),te.push("}"),te.join(`
|
|
|
|
|
`)}function y(v){let E=[],M="",V=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,_=0,G;for(;G=V.exec(v);)M+=v.slice(_,G.index),_=V.lastIndex,E.push({key:G[1],op:G[2]||"=",val:G[3]});return M+=v.slice(_),{filters:E,free:M.trim().toLowerCase()}}function m(v,E){for(let M of E.filters){let V=(G,te,X)=>{let O=parseFloat(G),U=parseFloat(te);return X==="="?String(G)===String(te):X==="!="?String(G)!==String(te):X===">="?O>=U:X==="<="?O<=U:X===">"?O>U:X==="<"?O<U:!0},_;if(M.key==="code")_=v.displayMessage;else if(M.key==="module")_=v.module;else if(M.key==="status")_=v._status;else if(M.key==="url")_=v._url;else if(M.key==="repo")_=v._repoId;else if(M.key==="level")_=v.level;else continue;if(_==null||!V(_,M.val,M.op))return!1}return!(E.free&&((v.displayMessage||"")+" "+(v.module||"")+" "+(v._url||"")+" "+JSON.stringify(v.raw||[])).toLowerCase().indexOf(E.free)===-1)}function b(){let v=y(e.query.search||"");e.parsedFilterCount=v.filters.length;let E=e.query.bucket,M=e.entries.filter(X=>E&&X._bucket!==E?!1:m(X,v)),V=e.query.group;if(V){let X=C=>V==="module"?C.module:C.displayMessage||C.message||"_",O=new Map;for(let C of M){let L=X(C);if(O.has(L)){let z=O.get(L);z.count++,z._related.push(C),new Date(C.ts)>new Date(z.ts)&&(z.ts=C.ts,z._url=C._url,z._status=C._status),new Date(C.ts)<new Date(z._firstSeen)&&(z._firstSeen=C.ts)}else{let z=Object.assign({},C);z._key=`${V}:${L}`,z._related=[C],z._firstSeen=C.ts,z._lastHourCount=0,z.count=1,O.set(L,z)}}let U=Date.now()-3600*1e3;for(let C of O.values())C._lastHourCount=C._related.filter(L=>new Date(L.ts).getTime()>=U).length;M=Array.from(O.values())}else M=M.map((X,O)=>(X._key="row:"+O+":"+X.ts,X._related=[X],X._firstSeen=X.ts,X._lastHourCount=0,X.count=1,X));let _=X=>({error:0,warn:1,info:2})[X._bucket]??1;e.query.sort==="count"?M.sort((X,O)=>_(X)-_(O)||O.count-X.count||new Date(O.ts)-new Date(X.ts)):M.sort((X,O)=>_(X)-_(O)||new Date(O.ts)-new Date(X.ts)),e.visible=M;let G=!!(e.query.bucket||(e.query.search||"").trim()),te=!G&&(e.stats?.severity?.error||0)>0&&!M.some(X=>X._bucket==="error")&&e.entries.length<1500;(G&&!M.length||te)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,h(!0))}function h(v){let E=v?e.entries.length:0,M=v?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:E,limit:M}}).then(V=>{let _=(V.data.entries||[]).map(p);e.entries=v?e.entries.concat(_):_,e.available=!!V.data.available,e.cap=V.data.max||e.cap,e.total=V.data.total||e.entries.length,e._autoLoading=!1,b()},V=>{e._autoLoading=!1,console.error(V)})}e.loadMore=()=>h(!0),e.canLoadMore=()=>e.entries.length<e.total;function w(){t.get("/api/admin/errors/stats").then(v=>{let E=v.data||{},M=E.prev24h?Math.round((E.last24h-E.prev24h)/E.prev24h*100):0;e.stats={last24h:E.last24h||0,prev24h:E.prev24h||0,delta:M,severity:E.severity||{error:0,warn:0,info:0},unique:E.unique||{error:0,warn:0,info:0},buckets:E.buckets||[],dropped:E.dropped||0},b()},v=>console.error(v))}function R(){h(),w()}e.barPx=(v,E)=>{let M=e.stats.buckets||[],V=0,_=0;for(let O of M)V=Math.max(V,(O.error||0)+(O.warn||0)),_=Math.max(_,O.info||0);let G=v[E]||0;if(!G)return 0;if(E==="info")return _?Math.max(2,Math.round(G/_*(V?16:60))):0;let te=(v.error||0)+(v.warn||0),X=Math.round(te/V*44);return Math.max(4,Math.round(G/te*X))},e.bucketTitle=v=>`${new Date(v.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${v.error||0} err \xB7 ${v.warn||0} warn \xB7 ${v.info||0} info`,e.toggle=v=>{e.expanded[v._key]=!e.expanded[v._key]},e.setBucket=v=>{e.query.bucket=v},e.refreshNow=R,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(R,v=>console.error(v))},e.exportCsv=()=>{let v=["ts","level","module","displayMessage","_status","_url","_repoId"],E=[v.join(",")];for(let G of e.visible)E.push(v.map(te=>{let X=G[te]==null?"":String(G[te]);return/[",\n]/.test(X)?`"${X.replace(/"/g,'""')}"`:X}).join(","));let M=new Blob([E.join(`
|
|
|
|
|
`)],{type:"text/csv;charset=utf-8"}),V=URL.createObjectURL(M),_=document.createElement("a");_.href=V,_.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(_),_.click(),document.body.removeChild(_),URL.revokeObjectURL(V)};function S(v){e.copyHint=`${v} copied`,o.timeout(()=>{e.copyHint=""},1500)}e.copyJson=v=>{navigator.clipboard.writeText(v._detailJson).then(()=>S("JSON"))},e.copyCurl=v=>{if(!v._url)return;let M=`curl -X ${v._method||"GET"} '${window.location.origin}${v._url}'`;navigator.clipboard.writeText(M).then(()=>S("curl"))},R();let N=i(()=>{e.query.autoRefresh&&R()},15e3);e.on("dispose",()=>i.cancel(N)),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},ju=function(e,t,s,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null){s.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(v){e.ovView=v;try{window.history.replaceState(null,"",v==="summary"?window.location.pathname:"#"+v)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var v=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:v}}).then(function(E){v===e.cacheMinutes&&(e.cacheReport=E.data,e.cacheError=E.data.available?null:E.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,v!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(v){return e.cacheTraffic==="all"||v.traffic===e.cacheTraffic})},e.cacheRate=function(v,E){var M=e.cacheRows(),V=function(te){return M.filter(function(X){return X.name===te}).reduce(function(X,O){return X+O[E]},0)},_=V(v+"_hit"),G=V(v+"_miss");return _+G?(100*_/(_+G)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(v){return v.replaceAll("_"," ")},e.cacheP95=function(v){var E=0,M=e.cacheReport?.latencyBucketsMs||[];if(!v.count)return"No samples";if(!v.ms)return"Not timed";for(var V=0;V<=M.length;V++)if(E+=v["b"+V]||0,E>=Math.ceil(v.count*.95))return V<M.length?"\u2264 "+qn(M[V]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let v=e.data&&e.data.system||{},E=[["Memory",v.memPercent],["Disk",v.diskPercent]].filter(([,V])=>V>90);return E.length?E.map(([V,_])=>V+" is at "+_+"%").join(" and ")+". New anonymizations may fail until "+(E.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(v){return v==null?"":qn(v)},e.latencyBound=function(v,E){return v.count?v[E]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(v[E]):"No samples"},e.firstByteBound=function(v){return e.latencyBound({count:v.firstByteCount,p95UpperMs:v.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(v){return Math.max(0,Math.round((Date.now()-v.sampledAt)/1e3))},e.peakRss=function(v){return(e.performance.runtimeSeries||[]).filter(function(E){return E.instance===v.instance}).reduce(function(E,M){return Math.max(E,M.rss)},v.memory.rss)},e.performanceWarning=function(v){return e.sampleAge(v)>45||v.droppedBatches||v.droppedMetrics||v.sockets?.closeWait>0||v.eventLoop?.p95Ms>100||v.memoryLimitBytes&&v.memory.rss>v.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var v=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==v&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:v}}).then(function(E){v===e.performanceMinutes&&(e.performance=E.data,e.performanceError=E.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){v===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,v!==e.performanceMinutes&&e.loadPerformance()}))};function d(v){if(v==null)return"\u2014";for(var E=["B","KB","MB","GB","TB"],M=0,V=v;V>=1024&&M<E.length-1;)V/=1024,M++;return V.toFixed(M>0?1:0).replace(/\.0$/,"")+" "+E[M]}e.humanBytes=d;function p(v){if(!v)return"\u2014";var E=Math.floor(v/86400),M=Math.floor(v%86400/3600),V=Math.floor(v%3600/60);return E>0?E+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(V<10?"0":"")+V+"m":V+"m"}e.humanDuration=p;function u(v){return v==null?"\u2014":v>=1e6?(v/1e6).toFixed(1)+"M":v>=1e3?(v/1e3).toFixed(1)+"K":String(v)}e.humanNum=u,e.queueTotal=function(v){return v?(v.waiting||0)+(v.active||0)+(v.delayed||0)+(v.failed||0):0},e.statusCount=function(v){if(!e.data||!e.data.repos)return 0;for(var E=e.data.repos.statusBreakdown||[],M=0;M<E.length;M++)if(E[M]._id===v)return E[M].count;return 0},e.barPct=function(v){var E=e.data&&e.data.repos?e.data.repos.total:0;if(!E)return 0;var M=[v];v==="expired"&&M.push("expiring"),v==="removed"&&M.push("remo
Line truncated
|
|
|
|
|
`)},Aa=class{constructor(t){xe(this,"gen");xe(this,"threads",[]);xe(this,"match",!1);xe(this,"runs",[]);xe(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},ac=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((s,i)=>s!==t.ids[i])?!1:e.runs.every(s=>t.runs.some(i=>i.neg===s.neg&&ac(i.state,s.state))),ec=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),cs,Bn,Da,Ta,Uo=class{constructor(t,s,i){qe(this,Bn);xe(this,"dots");xe(this,"dotStart");qe(this,cs);this.dots=t,this.dotStart=s,Le(this,cs,i)}state(){return new Aa(++re(this,cs).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(Pa.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!_e(this,Bn,Da).call(this,t,s))return;for(let d of s.out)this.add(t,d,i,o);return;case"neg":if(!_e(this,Bn,Da).call(this,t,s))return;let r=this.state();return this.add(r,s.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:s,state:r},i,o);case"star":if(this.restricted(i,o))return;_e(this,Bn,Ta).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:_e(this,Bn,Ta).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&ac(r.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,o)}step(t,s,i,o){let r=this.state();for(let d of t.threads)switch(d.t){case"lit":Ma(d,s)&&this.add(r,d.next,i+1,o);break;case"any":this.restricted(i,o)||this.add(r,d.next,i+1,o);break;case"class":!this.restricted(i,o)&&d.re.test(s)&&this.add(r,d.next,i+1,o);break;case"star":this.restricted(i,o)||this.add(r,d,i+1,o)}if(!this.restricted(i,o))for(let d of t.runs){if(d.state.dead){this.addRun(r,d,i+1,o);continue}let p=this.step(d.state,s,i,!1);this.addRun(r,{t:"run",neg:d.neg,state:p},i+1,o)}return this.done(r)}};cs=new WeakMap,Bn=new WeakSet,Da=function(t,s){let{seen:i}=re(this,cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Ta=function(t,s){let{has:i}=re(this,cs);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var lc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${lc(i.state)})`);return`${t}|${s.sort().join("|")}`},xg=1<<18,Bs,zs,_n,ps,$n,Ln,Fn,nn,Ia,xi,dc,Oa=class{constructor(t,s){qe(this,nn);qe(this,Bs);qe(this,zs,new Map);qe(this,_n,0);qe(this,ps);qe(this,$n);qe(this,Ln);qe(this,Fn);Le(this,Bs,t),Le(this,Ln,new Uo(!1,!1,s)),Le(this,Fn,new Uo(!1,!0,s))}start(t){if(t){if(re(this,$n))return re(this,$n);let i=re(this,Fn).state();return re(this,Fn).add(i,re(this,Bs),0,!0),Le(this,$n,_e(this,nn,Ia).call(this,re(this,Fn).done(i)))}if(re(this,ps))return re(this,ps);let s=re(this,Ln).state();return re(this,Ln).add(s,re(this,Bs),0,!0),Le(this,ps,_e(this,nn,xi).call(this,re(this,Ln).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===re(this,$n)?_e(this,nn,xi).call(this,re(this,Fn).step(t.state,s,0,!0)):_e(this,nn,xi).call(this,re(this,Ln).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Le(this,_n,re(this,_n)+128)),t.ascii[i]=r):t.next.set(s,r),nl(this,_n)._++,r}};Bs=new WeakMap,zs=new WeakMap,_n=new WeakMap,ps=new WeakMap,$n=new WeakMap,Ln=new WeakMap,Fn=new WeakMap,nn=new WeakSet,Ia=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},xi=function(t){let s=lc(t),i=re(this,zs).get(s);if(i)return i;re(this,_n)>xg&&_e(this,nn,dc).call(this);let o=_e(this,nn,Ia).call(this,t);return re(this,zs).set(s,o),Le(this,_n,re(this,_n)+(s.length+1)),o},dc=function(){re(this,zs).clear(),Le(this,_n,0),Le(this,ps,void 0),Le(this,$n,void 0)};var ev=e=>{let t=[];for(let s=e;s.t!=="match";s=s.next){if(s.t==="split"||s.t==="neg")return;t.push(s)}return t},tv=(e,t,s,i)=>{let o=0,r=s,d=-1,p=0;for(;r<i;){let u=e[o];if(u?.t==="star"){d=o++,p=r;continue}let y=t[r];if(u&&(u.t==="any"||u.t==="lit"&&Ma(u,y)||u.t==="class"&&u.re.test(y))){o++,r++;continue}if(d===-1)return!1;o=d+1,r=++p}for(;e[o]?.t==="star";)o++;return o===e.length},uc=e=>{let t=0,s=0;for(let i of e){let[o,r]=nv(i);t+=o,s+=r}return[t,s]},nv=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(uc),s=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),o=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,o]:[s,o]},tc=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!Ma(e[i],t[s+i]))return!1;return!0},sv=/[/\ud800-\udfff]/,ov=/[\ud800-\udfff]/,Zi=e=>ov.test(e)?[...e]:e,nc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Un,Hs,fs,er,hs,zo,tr,ms,Ho,jo,Go,Pn,vn,js,Gs,Wo,nr,tn,gs,Fo,Bo=class{constructor(t,s={}){qe(this,gs);xe(this,"pattern");xe(this,"options");qe(this,Un);qe(this,Hs);qe(this,fs);qe(this,er);qe(this,hs);qe(this,zo,!1);qe(this,tr);qe(this,ms);qe(this,Ho,!1);qe(this,jo,0);qe(this,Go,1/0);qe(this,Pn,[]);qe(this,vn,[]);qe(this,js);qe(this,Gs);qe(this,Wo,!1);qe(this,nr);qe(this,tn);if(t.includes
Line truncated
|
|
|
|
|
`).forEach((s,i)=>{let{term:o}=Ga(s.trim());if(!o)return;let r=[];for(let d=0;d<o.length;d++){if(o[d]==="\\"){d++;continue}Pc.has(o[d])&&!r.includes(o[d])&&r.push(o[d])}r.length&&t.push({line:i,term:o,symbols:r})}),t}function Dc(e,t){let s=String(e||"").split(`
|
|
|
|
|
`),i=s[t];if(i===void 0)return e;let{term:o}=Ga(i.trim());if(!o)return e;let r="";for(let p=0;p<o.length;p++){if(o[p]==="\\"){r+=o.slice(p,p+2),p++;continue}r+=Pc.has(o[p])||o[p]==="."?"\\"+o[p]:o[p]}let d=i.indexOf(o);return s[t]=i.slice(0,d)+r+i.slice(d+o.length),s.join(`
|
|
|
|
|
`)}var Kn={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t
Line truncated
|
|
|
|
|
`)),e.options=Object.assign({},e.options,b.options),p.restore()})}u();let y=null;e.saveDefault=m=>{if(m&&m.preventDefault&&m.preventDefault(),e.saving)return;let b=p.checkpoint(),h={terms:e.terms.split(`
|
|
|
|
|
`).map(w=>w.trim()).filter(w=>w.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",h).then(()=>{p.accept(b),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",y&&i.cancel(y),y=i(()=>{e.message=null},2500)},w=>{e.saving=!1;let R=w&&w.data&&w.data.error,S="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+R),s("ERRORS.unknown_error")]).then(([N,v])=>{e.error=R&&N!==v?N:S},()=>{e.error=S})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},_c=function(e,t,s){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{s.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},$c=function(e,t,s,i,o){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,u){let y={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(y===void 0)return;p.preventDefault();let m=e.features.length,b=y==="first"?0:y==="last"?m-1:(u+y+m)%m;e.feature=e.features[b].key,o(()=>{let h=i.document.getElementById("feature-tab-"+e.feature);h&&h.focus()})},e.demoText=`# DeepLearnUtils
|
|
|
|
|
Developed by Jane Smith at MIT CSAIL.
|
|
|
|
|
See Smith et al., "Attention That Works," 2026.
|
|
|
|
|
Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let c=(e.demoTerms||"").split(/[,\n]/).map(g=>g.trim()).filter(Boolean).sort((g,k)=>k.length-g.length),u=g=>g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!c.length)return[{text:e.demoText}];let y=new RegExp("("+c.map(u).join("|")+")","gi"),h={},b=0;return(e.demoText||"").split(y).filter(g=>g!=="").map(g=>{let k=c.find(R=>R.toLowerCase()===g.toLowerCase());return k?(h[k.toLowerCase()]||(h[k.toLowerCase()]=++b),{text:String(h[k.toLowerCase()]),redacted:!0,original:g}):{text:g}})},e.demoCount=()=>e.demoParts().filter(c=>c.redacted).length,e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(c=>!c.total);function r(){t.get("/api/stat/").then(c=>{e.stat=c.data,e.cards[0].total=c.data.nbRepositories,e.cards[1].total=c.data.nbUsers,e.cards[2].total=c.data.nbPageViews,e.cards[3].total=c.data.nbPullRequests}).catch(()=>{})}r();function d(c){let u={series:c,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!c||c.length<2)return u;let y=new Array(c.length-1);for(let S=1;S<c.length;S++)y[S-1]=c[S]-c[S-1];let h=y.length,b=Math.max.apply(null,y),g=Math.min.apply(null,y),k=Math.min(0,g),R=b-k||1;u.viewW=h*2,u.bars=new Array(h);for(let S=0;S<h;S++){let N=(y[S]-k)/R,m=Math.max(1.5,N*34);u.bars[S]={x:(S*2+.25).toFixed(2),y:(36-m).toFixed(2),w:"1.5",h:m.toFixed(2)}}if(u.deltaToday=y[h-1],h>=2){let S=y[h-2];S&&(u.pctChange=(u.deltaToday-S)/S*100)}return u.pctAbs=Math.round(Math.abs(u.pctChange)),u.isUp=u.pctChange>=0,u}e.history={repositories:d([]),users:d([]),pageViews:d([]),pullRequests:d([])},t.get("/api/stat/history?days=60").then(c=>{let u=c.data||[];e.history={repositories:d(u.map(y=>y.nbRepositories||0)),users:d(u.map(y=>y.nbUsers||0)),pageViews:d(u.map(y=>y.nbPageViews||0)),pullRequests:d(u.map(y=>y.nbPullRequests||0))}}).catch(()=>{})},Vc=function(e,t,o,i,s,r){let d=Rt();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),d.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,tt(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Ut()(document,"click",C=>{e.quotaExpanded&&!C.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=C=>C.status==="error"||C._broken||u(C.status)==="progress"&&C._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=C=>{e.projectView=C,C==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=C=>{let q=va(C?.anonymizeDate||C?.lastView)||"";return/ ago$/.test(q)?"No activity for "+q.replace(/ ago$/,""):"No activity since "+q.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=C=>"project-details-"+encodeURIComponent(C._type+":"+(C._id||C._source||"unknown")),e.showProjectDetails=async C=>{e.selectedProject=C,e.projectName=C.projectName||"",e.nameError="",e.nameMessage="",await tt();let q=document.getElementById(e.projectDetailsId(C));q?.focus(),q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=C=>{e.selectedProject=null,tt(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(C._type+":"+C._id)}"]`)?.focus())},e.saveProjectName=async C=>{if(e.nameSaving||!C._id)return;let q=e.projectName.trim();if(q.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let z=await t.post("/api/user/project-name",{type:C._type,id:C._id,name:q});C.projectName=z.data.name,C._label=C.projectName||C._fallbackLabel,e.selectedProject===C&&(e.nameMessage=q?"Project name saved.":"Default project name restored."),E||(e.dashboardCursor=null,await _(),e.selectedProject===C&&(e.selectedProject=e.items.find(K=>K._type===C._type&&K._id===C._id)||null))}catch{e.selectedProject===C&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async C=>{if(!C._viewUrl||e.copyingId)return;let q=new URL(C._viewUrl,s.location.origin).href;e.copyingId=C._type+":"+C._id;try{await Wa(q),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:q})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let c=["queue","download","downloaded","preparing","anonymizing"];function
Line truncated
|
|
|
|
|
`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):ee(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),w&&w()})}function Y(w,I,B){e.anonymize&&e.anonymize[w]&&e.anonymize[w].setValidity(I,B)}function he(w){try{let I=parseGithubUrl(w);if(I&&I.owner&&I.repo)return I.owner+"/"+I.repo}catch{}return null}e.accessRepairAllowed=!1,e.repairingGitHubAccess=!1,e.accessRepairMessage="",e.repairGitHubAccess=async()=>{if(!e.accessRepairAllowed||e.repairingGitHubAccess||!e.githubConnections?.appEnabled||!i.repoId||e.role!=="owner"||e.githubConnection!=="github-app"||he(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let w=g();try{let I=await t.get("/github/connections");if(e.githubConnections=I.data,!I.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":I.data.csrf}});if(!b(w))return;e.error=null,B.data.fullName&&(e._originalFullName=B.data.fullName,e.source.fullName=B.data.fullName,e.sourceUrl="https://github.com/"+B.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{b(w)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,k(w)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await Je()}catch{}}};function Ee(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:he(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Ue(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function Be(){let w=new URLSearchParams(window.location.search).get("billingDraft");if(w){N.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(w))).data;if(B.path!==s.path())throw new Error("Wrong task");m=B.values.conference||null;for(let j of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,j)&&(e[j]=B.values[j]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),E=B.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Ue(),s.replace?.(s.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let I;try{I=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!I||I.path!==s.path()||Date.now()-I.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await Ue(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(I.draft,B)&&(e[B]=I.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Ue(),sessionStorage.removeItem("github-access-draft"),!0}ne(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&d(Be,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async w=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(w.data.status),e.githubConnection=w.data.connection||"oauth",e.sourceUrl="https://github.com/"+w.data.source.fullName,e._originalFullName=w.data.source.fullName,e.terms=w.data.options.terms.filter(I=>I).join(`
|
|
|
|
|
`),e.source=w.data.source,e.role=w.data.role||"owner",e._existingNever=w.data.options.expirationMode==="never",e._savedExpirationDate=w.data.options.expirationDate?new Date(w.data.options.expirationDate):null,e.coauthors=w.data.coauthors||[],e._originalBranch=w.data.source.branch,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,e.repositoryID=w.data.source.repositoryID,e._originalRepositoryID=w.data.source.repositoryID,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be()&&(await Promise.all([Je(),He()]),ko())},()=>{s.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async w=>{if(e.githubConnection=w.data.connection||"oauth",e.sourceUrl="https://github.com/"+w.data.source.repositoryFullName+"/pull/"+w.data.source.pullRequestId,e.terms=w.data.options.terms.filter(I=>I).join(`
|
|
|
|
|
`),e.source=w.data.source,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be())try{await Ja()}catch{}},()=>{s.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async w=>{e.sourceUrl="https://gist.github.com/"+w.data.source.gistId,e.terms=w.data.options.terms.filter(I=>I).join(`
|
|
|
|
|
`),e.source=w.data.source,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be()&&await Za()},()=>{s.url("/404")}))}),t.get("/github/connections").then(w=>{e.githubConnections=w.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&w.data.appEnabled&&w.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&Ue())}).catch(()=>{}),e.urlSelected=async(w=!1)=>{let I=++u;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Kt.cancel(),Tn.cancel(),On.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Y("sourceUrl","github",!1);return}let j=S(B),ue=w||R===j;R=j,e.sourceUrlError="",Y("sourceUrl","github",!0);let ge=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Ke=window.document.getElementById("sourceUrl");if(Ke){try{Ke.setSelectionRange(0,0)}catch{}Ke.scrollLeft=0}},50),ge&&d(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!ue&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],ue||(e.source={type:"GitHubStream",branch:"",commit:""}),Kt.cancel(),Tn.cancel(),On.cancel(),Co.clear(),Eo.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",lt(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=ue;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await Za()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await Ja()):(e.detectedType="repo",q(),await Promise.all([Je(),He()]),ko())}catch{}finally{I===u&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let w=e.branches.filter(B=>B.name==e.source.branch)[0];if(!w)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=w.commit),e.readme=w.readme,await He(),ko()}),e.getBranches=async w=>{let I=parseGithubUrl(e.sourceUrl),B=g();try{let j=await t.get(`/api/repo/${I.owner}/${I.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:w===!0||e.reconnectingSource?"1":"0",repositoryID:Ee()}});if(!b(B))return;e.branches=j.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let ue=e.branches.filter(ge=>ge.name==e.source.branch);ue.length>0&&(!(!e.reconnectingSource&&!w&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=ue[0].commit),e.readme=ue[0].readme,await He(w))}catch(j){if(!b(B))return;e.branches=[],e.sourceUnreachable=j&&(j.status===404||j.data&&j.data.error==="repo_not_found");let ue=j&&j.data&&j.data.error||(j&&j.status===404?"repo_not_found":"unknown_error");r("ERRORS."+ue).then(ge=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:ge}),e.error=ge},console.error),typeof Y=="function"&&Y("sourceUrl","missing",!1)}finally{k(B)}};async function Je(){let w=parseGithubUrl(e.sourceUrl),I=g();try{So();let B=await t.get(`/api/repo/${w.owner}/${w.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Ee(),force:"1"}});if(!b(I))return;e.details=B.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(B){if(!b(I))return;throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),No(B.data.error)),Y("sourceUrl","missing",!1),B}finally{k(I)}}async function He(w){if(e.readme&&!w)return e.readme;let I=parseGithubUrl(e.sourceUrl),B=g();try{let j=await t.get(`/api/repo/${I.owner}/${I.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:w===!0?"1":"0",branch:e.source.branch,repositoryID:Ee()}});b(B,!0)&&(e.readme=j.data)}catch{b(B,!0)&&(e.readme="")}finally{k(B)}}let et={magicalBraces:!0},Re=w=>w.startsWith("/")&&!w.endsWith("/")&&Bn(yo(w.slice(1),et),et)===w.slice(1),Fe=()=>Object.keys(e.preserve.picked).filter(w=>e.preserve.pick
Line truncated
|
|
|
|
|
`).map(w=>w.trim()).filter(Boolean),ce=null,me=null,Ie=new Set,D=0,A=null,L=()=>!1;function Q(){let w=D+"\0"+e.preserve.patterns;if(w!==A){A=w;try{L=ja(Ha([...Fe(),...de()]))}catch{L=()=>!1}}return L}function H(w){let I=new Map([["",{dirs:[],files:[]}]]);for(let B of w){let j=B.split("/"),ue="";for(let ge=0;ge<j.length-1;ge++){let Ke=j.slice(0,ge+1).join("/");I.has(Ke)||(I.set(Ke,{dirs:[],files:[]}),I.get(ue).dirs.push(Ke)),ue=Ke}I.get(ue).files.push(B)}for(let B of I.values())B.dirs.sort();return{files:w,dirs:I,descendants:new Map}}function J(w){return ce.descendants.has(w)||ce.descendants.set(w,ce.files.filter(I=>I.startsWith(w+"/"))),ce.descendants.get(w)}let ae=w=>Q()(w);function te(w){let I=J(w),B=0;for(let j of I)ae(j)&&B++;return B===0?"none":B===I.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let w=(e.options?.preserveFiles||[]).map(I=>String(I).trim()).filter(Boolean).map(I=>Re(I)?yo(I.slice(1),et):I);return w.length?w.slice(0,2).join(", ")+(w.length>2?` and ${w.length-2} more`:""):"None. Every file is redacted."};async function oe(){let w=e.source?.commit;if(!(ce&&e.preserve.commit===w)){e.preserve.loading=!0,e.preserve.error="",ce=null,me=null;try{let I=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${I.owner}/${I.repo}/tree`,{params:{commit:w,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()}});if(e.source?.commit!==w)return;let j=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];ce=dn(H(B.data.files||[])),me=j.length?dn(H([...B.data.files||[],...j])):ce,Ie=dn(new Set(j)),e.preserve.commit=w,e.preserve.truncated=!!B.data.truncated,e.previewFile||Kt()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",w=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&w&&e.sourceUrl&&oe().catch(()=>{})}),e.openPreserveFiles=()=>{let w={},I=[];for(let j of e.options?.preserveFiles||[]){let ue=String(j).trim();ue&&(!I.length&&Re(ue)?w[yo(ue.slice(1),et)]=!0:I.push(ue))}let B={};for(let j of Object.keys(w)){let ue=j.split("/");for(let ge=1;ge<ue.length;ge++)B[ue.slice(0,ge).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:w,expanded:B,patterns:I.join(`
|
|
|
|
|
`),patternsOpen:I.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),D++,d(()=>{let j=document.getElementById("preserve-files-dialog");j?.showModal&&!j.open&&j.showModal(),document.getElementById("preserve-files-search")?.focus()},0),oe()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ha([...Fe(),...de()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!ce)return[];let w=Q(),I=(ge,Ke,Vt)=>{let bt=!!e.preserve.picked[ge],Yn=w(ge);return{kind:"file",path:ge,label:Vt,depth:Ke,state:Yn?"all":"none",locked:!bt&&Yn,note:!bt&&Yn?"matched by a pattern":bt&&!Yn?"excluded by a pattern":""}},B=String(e.preserve.search||"").trim().toLowerCase();if(B)return ce.files.filter(ge=>ge.toLowerCase().includes(B)).slice(0,300).map(ge=>I(ge,0,ge));let j=[],ue=(ge,Ke)=>{let Vt=ce.dirs.get(ge);for(let bt of Vt.dirs){let Yn=!!e.preserve.expanded[bt],xa=de().includes(W(bt));j.push({kind:"dir",path:bt,label:bt.slice(ge?ge.length+1:0)+"/",depth:Ke,open:Yn,state:te(bt),locked:!1,note:xa?"whole folder":""}),Yn&&ue(bt,Ke+1)}for(let bt of Vt.files)j.push(I(bt,Ke,bt.slice(ge?ge.length+1:0)))};return ue("",0),j},e.preserveCount=()=>ce?ce.files.filter(ae).length:0,e.togglePreserveDir=w=>{e.preserve.expanded[w]=!e.preserve.expanded[w]},e.togglePreserveFile=w=>{e.preserve.picked[w]=!e.preserve.picked[w],D++},e.togglePreserveFolder=w=>{let I=W(w),B=fe(w),j=de().filter(ge=>ge!==I&&ge!==B),ue=te(w)==="all"||de().includes(I);for(let ge of J(w))e.preserve.picked[ge]=!1;D++,e.preserve.patterns=(ue?j:[...j,I]).join(`
|
|
|
|
|
`),ue&&J(w).some(ae)&&(e.preserve.patterns=[...j,B].join(`
|
|
|
|
|
`))};let x=/^readme(\.[^/]*)?$/i,ke=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],pe=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Ce=w=>{let I=K(w),B=I.indexOf("."),j=ke.indexOf(B===-1?"":I.slice(B).toLowerCase());return j===-1?ke.length:j},De=()=>!!ce&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!De())return"";for(let w of[".github","","docs"]){let I=(ce.dirs.get(w)?.files||[]).filter(B=>x.test(K(B)));if(I.length)return I.sort((B,j)=>Ce(B)-Ce(j)||z(B,j))[0]}return""},e.readmeName=()=>K(e.readmePath())||"README.md";let Me={key:null,fn:()=>!1},Ge=()=>{let w=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),I=w.join(`
|
|
|
|
|
`);if(I!==Me.key){let B=()=>!1;try{w.length&&(B=ja(w))}catch{}Me={key:I,fn:B}}return Me.fn};e.pathPreserved=w=>!!w&&Ge()(w),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let w=Ge();if(De()){let I=e.readmePath();return!!I&&w(I)}return pe.some(I=>w(I))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function ze(){let w={terms:e.terms?e.terms.split(`
|
|
|
|
|
`):[],filePath:e.previewOpenPath()||"README.md",preserveFiles:e.options.preserveFiles||[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(w.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);w.repoName=`${I.owner}/${I.repo}`}catch{}return w}function we(w,I,B){let j=null,ue=0,ge=()=>{if(e.detectedType!==w)return;j&&d.cancel(j);let Ke=++ue;e.previewStatus="loading",j=d(()=>{j=null;let Vt=I();if(!Vt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Vt).then(bt=>{Ke===ue&&(B(bt.data,Vt),e.previewStatus="ready")}).catch(()=>{Ke===ue&&(e.previewStatus="error")})},200)};return ge.cancel=()=>{ue++,j&&d.cancel(j),j=null},e.on("dispose",ge.cancel),ge}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof at!="string"?ft(e.previewFile):Kt()),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()};let be=dn(Vs(e));Object.defineProperty(e,"previewViewer",{get:()=>be}),ma(be,e),Object.assign(be,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),be.preview=!0,be.fileSize=w=>w===be.filePath&&typeof at=="string"?new Blob([at]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,be.openPreserveFiles=()=>e.openPreserveFiles(),be.previewPreserved=()=>e.previewPreserved(),be.retryContent=()=>e.retryPreview();let st=w=>Ie.has(w)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(w),rt=(w="")=>({path:w,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=rt();let yt=0,at=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=w=>{if(w=w||"",w&&w===e.readmePath()&&(w=""),yt++,at=null,Kn(),Kt.cancel(),e.previewFile=w,e.previewDoc=rt(w),be.sidebarCollapsed=!0,be.content=null,!w){e.readme?Kt():e.previewStatus="idle";return}if(st(w)){cr("binary"),e.previewStatus="ready";return}ft(w)};function lt(){yt++,at=null,e.previewFile="",e.previewDoc=rt(),be.sidebarCollapsed=!0,be.content=null}function ft(w){let I=++yt;at=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let B;try{B=parseGithubUrl(e.sourceUrl)}catch{B=null}if(!B||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${B.owner}/${B.repo}/file`,{params:{commit:e.source.commit,path:w,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Ee()},transformResponse:j=>j}).then(j=>{if(I!==yt)return;e.previewDoc.loading=!1;let ue=typeof j.headers=="function"&&j.headers("content-type")||"";if(/json/i.test(ue)){let ge=null;try{ge=JSON.parse(j.data)}catch{}if(ge&&ge.binary===!0){cr("binary"),e.previewStatus="ready";return}}at=typeof j.data=="string"?j.data:"",Kt()},j=>{if(I!==yt)return;e.previewDoc.loading=!1;let ue=ar(j);if(ue==="file_too_big"){cr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Wn.ERRORS[ue]||"GitHub did not return this file.",e.previewStatus="error"})}let _t;function Kn(){_t&&window.URL.revokeObjectURL(_t),_t=void 0,be.url=void 0}e.on("dispose",Kn);function cr(w){Kn(),e.previewDoc.note=w,be.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),be.type=w==="too_big"?"error":"binary",be.content=w==="too_big"?"file_too_big":"binary"}function Kp(w){try{let I=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",j=w&&w.includes("/")?w.slice(0,w.lastIndexOf("/")+1):"";return`https://github.com/${I.owner}/${I.repo}/raw/${B}/${j}`}catch{return""}}let Qa=we("repo",()=>e.previewFile?typeof at!="string"?null:{content:at,options:ze()}:e.readme?{content:e.readme,options:ze()}:null,w=>{if(typeof w?.content!="string")throw Error("Invalid preview response");Kn(),window.URL?.createObjectURL&&(be.url=_t=window.URL.createObjectURL(new Blob([w.content],{type:"text/plain"})));let I=e.previewOpenPath()||e.readmeName();be.prepareFile(e.previewPathName(I)),be.fileBaseUrl=Kp(I),be.renderFileContent(w.content,be.type,be.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=w.content)}),Kt=()=>{e.previewFile&&typeof at!="string"||Qa()};Kt.cancel=Qa.cancel;let wo=ot(new Map),pr=new Set,fr=new Set,xo="",es=null,xs=()=>String(e.terms||"").split(`
|
|
|
|
|
`).filter(w=>w.trim());function Yp(){es=null;let w=xs(),I=w.join(`
|
|
|
|
|
`);I!==xo&&(wo.clear(),fr.clear(),xo=I);let B=[...pr].filter(j=>!wo.has(j));if(pr.clear(),!(!B.length||!w.length))for(let j=0;j<B.length;j+=400){let ue=B.slice(j,j+400);t.post("/api/anonymize-preview",{contents:ue,options:{terms:w,image:!0,link:!0}}).then(ge=>{if(xo!==I||xs().join(`
|
|
|
|
|
`)!==I)return;let Ke=ge.data?.contents;if(!Array.isArray(Ke)||Ke.length!==ue.length)throw Error("Invalid preview response");ue.forEach((Vt,bt)=>wo.set(Vt,typeof Ke[bt]=="string"?Ke[bt]:Vt))}).catch(()=>{xo===I&&ue.forEach(ge=>fr.add(ge))})}}e.previewName=w=>{if(!w||!xs().length)return w;if(xo===xs().join(`
|
|
|
|
|
`)){if(wo.has(w))return wo.get(w);if(fr.has(w))return w}return pr.add(w),es||(es=d(Yp,120)),w},e.previewPathName=w=>{w=String(w||"");let I=w.lastIndexOf("/");return I<0?e.previewName(w):e.previewName(w.slice(0,I))+"/"+e.previewName(w.slice(I+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{be.repoId=e.repoId||"repository",be.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),be.paths=be.filePath.split("/"),be.files=e.previewTreeFiles(),be.loadedFolders=Object.fromEntries([...me?.dirs.keys()||[]].map(w=>[e.previewName(w),!0]))},!0),e.on("dispose",()=>{es&&d.cancel(es)});function ko(){!e.anonymize||!e.anonymize.terms||Kt()}async function Ja(){let w=parseGithubUrl(e.sourceUrl),I=g();try{So();let B=await t.get(`/api/pr/${w.owner}/${w.repo}/${w.pullRequestId}`,{params:{connection:e.githubConnection}});if(!b(I))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=w.repo+"-PR"+w.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!b(I))return;throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),No(B.data.error)),Y("sourceUrl","missing",!1),B}finally{k(I)}}let Co=ot(new Map);function Xp(){let w=new Set,I=e.details&&e.details.pullRequest;if(!I)return w;typeof I.title=="string"&&w.add(I.title),typeof I.body=="string"&&w.add(I.body),typeof I.diff=="string"&&w.add(I.diff);let B=I.comments||[];for(let j of B)typeof j.author=="string"&&w.add(j.author),typeof j.body=="string"&&w.add(j.body);return w}let Tn=we("pr",()=>{let w=Xp(),I=Array.from(w);return I.length===0?null:{contents:I,options:ze()}},(w,I)=>{if(!Array.isArray(w?.contents)||w.contents.length!==I.contents.length||w.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=I.contents,j=new Map;for(let ue=0;ue<B.length&&ue<w.contents.length;ue++)j.set(B[ue],w.contents[ue]);Co.clear(),j.forEach((ue,ge)=>Co.set(ge,ue))});e.anonymizePrContent=function(w){return w&&(Co.has(w)?Co.get(w):"")};async function Za(){let w=parseGithubUrl(e.sourceUrl),I=g();try{So(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${w.gistId}`);if(!b(I))return;e.details=B.data,e.gistId||(e.gistId="gist-"+w.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!b(I))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Y("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Y("sourceUrl","missing",!1);return}throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),No(B.data.error)),Y("sourceUrl","missing",!1),B}finally{k(I)}}let Eo=ot(new Map);function Qp(){let w=new Set,I=e.details&&e.details.gist;if(!I)return w;typeof I.description=="string"&&w.add(I.description),typeof I.ownerLogin=="string"&&w.add(I.ownerLogin);let B=I.files||[];for(let ue of B)typeof ue.filename=="string"&&w.add(ue.filename),typeof ue.content=="string"&&w.add(ue.content);let j=I.comments||[];for(let ue of j)typeof ue.author=="string"&&w.add(ue.author),typeof ue.body=="string"&&w.add(ue.body);return w}let On=we("gist",()=>{let w=Qp(),I=Array.from(w);return I.length===0?null:{contents:I,options:ze()}},(w,I)=>{if(!Array.isArray(w?.contents)||w.contents.length!==I.contents.length||w.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=I.contents,j=new Map;for(let ue=0;ue<B.length&&ue<w.contents.length;ue++)j.set(B[ue],w.contents[ue]);Eo.clear(),j.forEach((ue,ge)=>Eo.set(ge,ue)),hr()});e.anonymizeGistContent=function(w){return w&&(Eo.has(w)?Eo.get(w):"")},e.previewGistFiles=[];function hr(){let w=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=w.map(I=>({filename:e.anonymizeGistContent(I.filename),content:e.anonymizeGistContent(I.content),language:I.language}))}e.watch("details.gist.files",hr,!0),e.watch("terms",hr);function Jp(){let w=e.conference;if(e.conference_data=null,!w)return;let I=w===m||e.isUpdate&&w===e._originalConference;w!==m&&(m=null),t.get("/api/conferences/"+w).then(B=>{e.conference===w&&(e.conference_data=B.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===w&&(e.conference_data=null)})}function So(){Y("repoId","used",!0),Y("repoId","format",!0),Y("pullRequestId","used",!0),Y("pullRequestId","format",!0),Y("gistId","used",!0),Y("gistId","format",!0),Y("sourceUrl","used",!0),Y("sourceUrl","missing",!0),Y("sourceUrl","access",!0),Y("sourceUrl","github",!0),Y("commit","exi
Line truncated
|
|
|
|
|
`).filter(ge=>ge),connection:e.githubConnection,fullName:`${B.owner}/${B.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(j.options.pageSource=e.details.pageSource),So();let ue=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},ge=>{if(ge.data){let Ke=["quota_exceeded","subscription_required_for_never_expiration"].includes(ge.data.error);Ke||r("ERRORS."+ge.data.error).then(Vt=>{e.error=Vt},console.error),No(ge.data.error),Ke&&(ge.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,tt(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{I.disabled=!1})},e.anonymizeGist=w=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ei())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=w.currentTarget||w.target.closest?.("button")||w.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={gistId:e.gistId,terms:e.terms.trim().split(`
|
|
|
|
|
`).filter(ge=>ge),source:{gistId:B.gistId},options:e.options,conference:e.conference};So();let ue=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},ge=>{ge.data&&(r("ERRORS."+ge.data.error).then(Ke=>{e.error=Ke},console.error),No(ge.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizePullRequest=w=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ei())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=w.currentTarget||w.target.closest?.("button")||w.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
|
|
|
|
`).filter(ge=>ge),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};So();let ue=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ge=>{ge.data&&(r("ERRORS."+ge.data.error).then(Ke=>{e.error=Ke},console.error),No(ge.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{Jp()}),e.termHints=[],e.matchTermAsWritten=w=>{e.terms=Rc(e.terms,w)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Kt()}),e.watch("terms",()=>{e.termHints=Nc(e.terms),e.detectedType==="repo"&&ko(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ko(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ko(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("details",()=>{e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()},!0)},Ka=function(e,t,o,i,s,r){ma(e);let d=Rt();Pc();let c=Ut(),u=0,y=null,h=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function b(){y&&(y.resolve(),y=null),h&&(d.timeout.cancel(h),h=null)}let g=!1;e.on("dispose",()=>{g=!0,u++,b(),k&&k.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,c(document,"click",O=>{e.symbolsOpen&&!O.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!O.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!O.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&O.target.isConnected&&!O.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!O.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!O.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),c(document,"keydown",O=>{O.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(O.ctrlKey||O.metaKey)&&!O.altKey&&O.key&&O.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(O.preventDefault(),e.toggleMdFind(!0))}),c(document,"keydown",function(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var U=document.querySelector(".tree-search-input");U&&(U.focus(),U.select())}});var k=null;e.onFileSearchChange=function(){k&&(k.resolve(),k=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let U=r.defer();k=U,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:U.promise}).then(function(C){if(!(g||k!==U)){k=null,e.fileSearchLoading=!1;var q={};e.files.forEach(function(Fe){q[(Fe.path||"")+"/"+Fe.name]=!0});for(var z=[],K={},ie=0;ie<C.data.length;ie++){var ne=C.data[ie];if(ne.path)for(var Y=ne.path.split("/"),he="",Ee=0;Ee<Y.length;Ee++){var Ue=he;he=he?he+"/"+Y[Ee]:Y[Ee];var Be=Ue+"/"+Y[Ee];!q[Be]&&!K[Be]&&(K[Be]=!0,z.push({name:Y[Ee],path:Ue}))}}z.sort(function(Fe,W){return(Fe.path||"").split("/").length-(W.path||"").split("/").length}),z.length>0&&e.files.push.apply(e.files,z);for(var Je=[],He=0;He<C.data.length;He++){var et=C.data[He],Re=(et.path||"")+"/"+et.name;!q[Re]&&et.size!=null&&(Je.push(et),q[Re]=!0)}Je.length>0&&e.files.push.apply(e.files,Je),e.fileSearchResults=C.data}},function(){!g&&k===U&&(k=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(O,U){if(e.repoId!=i.repoId)return X();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(C=>C&&C.trim().length>0),ee();for(let C=0;C<e.paths.length-1;C++){let q=C>0?e.paths.slice(0,C).join("/"):"";e.files.some(K=>K.path===q)||e.getFiles(q)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],U={};for(let q of e.files)q.name.toLowerCase().indexOf("readme")>-1&&(U[q.name.toLowerCase()]=q.name);let C=null;for(let q of O)if(U[q]){C=q;break}if(!C&&Object.keys(U).length>0&&(C=Object.keys(U)[0]),C){let q=o.url();q[q.length-1]!="/"&&(q+="/"),o.url(q+encodePathForUrl(U[C]))}}e.fileCounts=null;let S=0,N=new Set,m=!1;e.getFiles=function(O,U=!1){let C=e.repoId,q=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(z){if(g||C!==e.repoId||q!==S)return[];let K=O||"";return e.files=e.files.filter(ie=>ie.path!==K),e.files.push(...z.data),e.loadedFolders={...e.loadedFolders,[K]:!0},E(K,q),z.data},function(z){if(g||C!==e.repoId||q!==S)return[];U||(e.type="error",e.content=ar(z),e.files=[])})};function E(O,U){if(m||N.has(O))return;N.add(O);let C=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(O)}`).then(function(q){g||C!==e.repoId||U!==S||(e.fileCounts={...e.fileCounts,...q.data})},function()
Line truncated
|
|
|
|
|
Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let p=(e.demoTerms||"").split(/[,\n]/).map(h=>h.trim()).filter(Boolean).sort((h,w)=>w.length-h.length),u=h=>h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let y=new RegExp("("+p.map(u).join("|")+")","gi"),m={},b=0;return(e.demoText||"").split(y).filter(h=>h!=="").map(h=>{let w=p.find(R=>R.toLowerCase()===h.toLowerCase());return w?(m[w.toLowerCase()]||(m[w.toLowerCase()]=++b),{text:String(m[w.toLowerCase()]),redacted:!0,original:h}):{text:h}})},e.demoCount=()=>e.demoParts().filter(p=>p.redacted).length,e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(p=>!p.total);function r(){t.get("/api/stat/").then(p=>{e.stat=p.data,e.cards[0].total=p.data.nbRepositories,e.cards[1].total=p.data.nbUsers,e.cards[2].total=p.data.nbPageViews,e.cards[3].total=p.data.nbPullRequests}).catch(()=>{})}r();function d(p){let u={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return u;let y=new Array(p.length-1);for(let S=1;S<p.length;S++)y[S-1]=p[S]-p[S-1];let m=y.length,b=Math.max.apply(null,y),h=Math.min.apply(null,y),w=Math.min(0,h),R=b-w||1;u.viewW=m*2,u.bars=new Array(m);for(let S=0;S<m;S++){let N=(y[S]-w)/R,v=Math.max(1.5,N*34);u.bars[S]={x:(S*2+.25).toFixed(2),y:(36-v).toFixed(2),w:"1.5",h:v.toFixed(2)}}if(u.deltaToday=y[m-1],m>=2){let S=y[m-2];S&&(u.pctChange=(u.deltaToday-S)/S*100)}return u.pctAbs=Math.round(Math.abs(u.pctChange)),u.isUp=u.pctChange>=0,u}e.history={repositories:d([]),users:d([]),pageViews:d([]),pullRequests:d([])},t.get("/api/stat/history?days=60").then(p=>{let u=p.data||[];e.history={repositories:d(u.map(y=>y.nbRepositories||0)),users:d(u.map(y=>y.nbUsers||0)),pageViews:d(u.map(y=>y.nbPageViews||0)),pullRequests:d(u.map(y=>y.nbPullRequests||0))}}).catch(()=>{})},Lc=function(e,t,s,i,o,r){let d=Ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),d.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,tt(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Ut()(document,"click",C=>{e.quotaExpanded&&!C.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=C=>C.status==="error"||C._broken||u(C.status)==="progress"&&C._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=C=>{e.projectView=C,C==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=C=>{let L=va(C?.anonymizeDate||C?.lastView)||"";return/ ago$/.test(L)?"No activity for "+L.replace(/ ago$/,""):"No activity since "+L.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=C=>"project-details-"+encodeURIComponent(C._type+":"+(C._id||C._source||"unknown")),e.showProjectDetails=async C=>{e.selectedProject=C,e.projectName=C.projectName||"",e.nameError="",e.nameMessage="",await tt();let L=document.getElementById(e.projectDetailsId(C));L?.focus(),L?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=C=>{e.selectedProject=null,tt(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(C._type+":"+C._id)}"]`)?.focus())},e.saveProjectName=async C=>{if(e.nameSaving||!C._id)return;let L=e.projectName.trim();if(L.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let z=await t.post("/api/user/project-name",{type:C._type,id:C._id,name:L});C.projectName=z.data.name,C._label=C.projectName||C._fallbackLabel,e.selectedProject===C&&(e.nameMessage=L?"Project name saved.":"Default project name restored."),E||(e.dashboardCursor=null,await V(),e.selectedProject===C&&(e.selectedProject=e.items.find(K=>K._type===C._type&&K._id===C._id)||null))}catch{e.selectedProject===C&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async C=>{if(!C._viewUrl||e.copyingId)return;let L=new URL(C._viewUrl,o.location.origin).href;e.copyingId=C._type+":"+C._id;try{await Wa(L),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:L})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let p=["queue","download","downloaded","preparing","anonymizing"];function
Line truncated
|
|
|
|
|
`)),e.options=Object.assign({},e.options,B.options),e.options.expirationDate=B.options&&B.options.expirationDate?new Date(B.options.expirationDate):te(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),k&&k()})}function Y(k,I,B){e.anonymize&&e.anonymize[k]&&e.anonymize[k].setValidity(I,B)}function he(k){try{let I=parseGithubUrl(k);if(I&&I.owner&&I.repo)return I.owner+"/"+I.repo}catch{}return null}e.accessRepairAllowed=!1,e.repairingGitHubAccess=!1,e.accessRepairMessage="",e.repairGitHubAccess=async()=>{if(!e.accessRepairAllowed||e.repairingGitHubAccess||!e.githubConnections?.appEnabled||!i.repoId||e.role!=="owner"||e.githubConnection!=="github-app"||he(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let k=h();try{let I=await t.get("/github/connections");if(e.githubConnections=I.data,!I.data.appEnabled)return;let B=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":I.data.csrf}});if(!b(k))return;e.error=null,B.data.fullName&&(e._originalFullName=B.data.fullName,e.source.fullName=B.data.fullName,e.sourceUrl="https://github.com/"+B.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{b(k)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,w(k)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await Qe()}catch{}}};function Se(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:he(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Ue(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function Be(){let k=new URLSearchParams(window.location.search).get("billingDraft");if(k){N.restore();try{let B=(await t.get("/api/billing/draft/"+encodeURIComponent(k))).data;if(B.path!==o.path())throw new Error("Wrong task");v=B.values.conference||null;for(let j of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(B.values,j)&&(e[j]=B.values[j]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),E=B.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Ue(),o.replace?.(o.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let I;try{I=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!I||I.path!==o.path()||Date.now()-I.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await Ue(),!0):!1;N.restore();for(let B of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(I.draft,B)&&(e[B]=I.draft[B]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Ue(),sessionStorage.removeItem("github-access-draft"),!0}se(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&d(Be,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async k=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(k.data.status),e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.fullName,e._originalFullName=k.data.source.fullName,e.terms=k.data.options.terms.filter(I=>I).join(`
|
|
|
|
|
`),e.source=k.data.source,e.role=k.data.role||"owner",e._existingNever=k.data.options.expirationMode==="never",e._savedExpirationDate=k.data.options.expirationDate?new Date(k.data.options.expirationDate):null,e.coauthors=k.data.coauthors||[],e._originalBranch=k.data.source.branch,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,e.repositoryID=k.data.source.repositoryID,e._originalRepositoryID=k.data.source.repositoryID,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be()&&(await Promise.all([Qe(),He()]),ws())},()=>{o.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async k=>{if(e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.repositoryFullName+"/pull/"+k.data.source.pullRequestId,e.terms=k.data.options.terms.filter(I=>I).join(`
|
|
|
|
|
`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be())try{await Qa()}catch{}},()=>{o.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async k=>{e.sourceUrl="https://gist.github.com/"+k.data.source.gistId,e.terms=k.data.options.terms.filter(I=>I).join(`
|
|
|
|
|
`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),R=S(parseGithubUrl(e.sourceUrl)),!await Be()&&await Za()},()=>{o.url("/404")}))}),t.get("/github/connections").then(k=>{e.githubConnections=k.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&k.data.appEnabled&&k.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&Ue())}).catch(()=>{}),e.urlSelected=async(k=!1)=>{let I=++u;e.previousConfigurations=[],e.previousConfigurationId="";let B;try{B=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Kt.cancel(),Tn.cancel(),On.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Y("sourceUrl","github",!1);return}let j=S(B),ue=k||R===j;R=j,e.sourceUrlError="",Y("sourceUrl","github",!0);let ye=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let Ke=window.document.getElementById("sourceUrl");if(Ke){try{Ke.setSelectionRange(0,0)}catch{}Ke.scrollLeft=0}},50),ye&&d(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!ue&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],ue||(e.source={type:"GitHubStream",branch:"",commit:""}),Kt.cancel(),Tn.cancel(),On.cancel(),ks.clear(),Cs.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",lt(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=ue;try{B.gistId&&!B.repo?(e.detectedType="gist",e.source={gistId:B.gistId},await Za()):B.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:B.owner+"/"+B.repo,pullRequestId:B.pullRequestId},await Qa()):(e.detectedType="repo",L(),await Promise.all([Qe(),He()]),ws())}catch{}finally{I===u&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let k=e.branches.filter(B=>B.name==e.source.branch)[0];if(!k)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=k.commit),e.readme=k.readme,await He(),ws()}),e.getBranches=async k=>{let I=parseGithubUrl(e.sourceUrl),B=h();try{let j=await t.get(`/api/repo/${I.owner}/${I.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0||e.reconnectingSource?"1":"0",repositoryID:Se()}});if(!b(B))return;e.branches=j.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let ue=e.branches.filter(ye=>ye.name==e.source.branch);ue.length>0&&(!(!e.reconnectingSource&&!k&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=ue[0].commit),e.readme=ue[0].readme,await He(k))}catch(j){if(!b(B))return;e.branches=[],e.sourceUnreachable=j&&(j.status===404||j.data&&j.data.error==="repo_not_found");let ue=j&&j.data&&j.data.error||(j&&j.status===404?"repo_not_found":"unknown_error");r("ERRORS."+ue).then(ye=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:ye}),e.error=ye},console.error),typeof Y=="function"&&Y("sourceUrl","missing",!1)}finally{w(B)}};async function Qe(){let k=parseGithubUrl(e.sourceUrl),I=h();try{Es();let B=await t.get(`/api/repo/${k.owner}/${k.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Se(),force:"1"}});if(!b(I))return;e.details=B.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(B){if(!b(I))return;throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),Ss(B.data.error)),Y("sourceUrl","missing",!1),B}finally{w(I)}}async function He(k){if(e.readme&&!k)return e.readme;let I=parseGithubUrl(e.sourceUrl),B=h();try{let j=await t.get(`/api/repo/${I.owner}/${I.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0?"1":"0",branch:e.source.branch,repositoryID:Se()}});b(B,!0)&&(e.readme=j.data)}catch{b(B,!0)&&(e.readme="")}finally{w(B)}}let et={magicalBraces:!0},Re=k=>k.startsWith("/")&&!k.endsWith("/")&&zn(vs(k.slice(1),et),et)===k.slice(1),Fe=()=>Object.keys(e.preserve.picked).filter(k=>e.preserve.pick
Line truncated
|
|
|
|
|
`).map(k=>k.trim()).filter(Boolean),ce=null,me=null,Me=new Set,A=0,T=null,F=()=>!1;function J(){let k=A+"\0"+e.preserve.patterns;if(k!==T){T=k;try{F=ja(Ha([...Fe(),...de()]))}catch{F=()=>!1}}return F}function H(k){let I=new Map([["",{dirs:[],files:[]}]]);for(let B of k){let j=B.split("/"),ue="";for(let ye=0;ye<j.length-1;ye++){let Ke=j.slice(0,ye+1).join("/");I.has(Ke)||(I.set(Ke,{dirs:[],files:[]}),I.get(ue).dirs.push(Ke)),ue=Ke}I.get(ue).files.push(B)}for(let B of I.values())B.dirs.sort();return{files:k,dirs:I,descendants:new Map}}function Z(k){return ce.descendants.has(k)||ce.descendants.set(k,ce.files.filter(I=>I.startsWith(k+"/"))),ce.descendants.get(k)}let le=k=>J()(k);function ne(k){let I=Z(k),B=0;for(let j of I)le(j)&&B++;return B===0?"none":B===I.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let k=(e.options?.preserveFiles||[]).map(I=>String(I).trim()).filter(Boolean).map(I=>Re(I)?vs(I.slice(1),et):I);return k.length?k.slice(0,2).join(", ")+(k.length>2?` and ${k.length-2} more`:""):"None. Every file is redacted."};async function oe(){let k=e.source?.commit;if(!(ce&&e.preserve.commit===k)){e.preserve.loading=!0,e.preserve.error="",ce=null,me=null;try{let I=parseGithubUrl(e.sourceUrl),B=await t.get(`/api/repo/${I.owner}/${I.repo}/tree`,{params:{commit:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Se()}});if(e.source?.commit!==k)return;let j=Array.isArray(B.data.binaryFiles)?B.data.binaryFiles:[];ce=dn(H(B.data.files||[])),me=j.length?dn(H([...B.data.files||[],...j])):ce,Me=dn(new Set(j)),e.preserve.commit=k,e.preserve.truncated=!!B.data.truncated,e.previewFile||Kt()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",k=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&k&&e.sourceUrl&&oe().catch(()=>{})}),e.openPreserveFiles=()=>{let k={},I=[];for(let j of e.options?.preserveFiles||[]){let ue=String(j).trim();ue&&(!I.length&&Re(ue)?k[vs(ue.slice(1),et)]=!0:I.push(ue))}let B={};for(let j of Object.keys(k)){let ue=j.split("/");for(let ye=1;ye<ue.length;ye++)B[ue.slice(0,ye).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:k,expanded:B,patterns:I.join(`
|
|
|
|
|
`),patternsOpen:I.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),A++,d(()=>{let j=document.getElementById("preserve-files-dialog");j?.showModal&&!j.open&&j.showModal(),document.getElementById("preserve-files-search")?.focus()},0),oe()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=Ha([...Fe(),...de()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!ce)return[];let k=J(),I=(ye,Ke,qt)=>{let bt=!!e.preserve.picked[ye],Xn=k(ye);return{kind:"file",path:ye,label:qt,depth:Ke,state:Xn?"all":"none",locked:!bt&&Xn,note:!bt&&Xn?"matched by a pattern":bt&&!Xn?"excluded by a pattern":""}},B=String(e.preserve.search||"").trim().toLowerCase();if(B)return ce.files.filter(ye=>ye.toLowerCase().includes(B)).slice(0,300).map(ye=>I(ye,0,ye));let j=[],ue=(ye,Ke)=>{let qt=ce.dirs.get(ye);for(let bt of qt.dirs){let Xn=!!e.preserve.expanded[bt],xa=de().includes(W(bt));j.push({kind:"dir",path:bt,label:bt.slice(ye?ye.length+1:0)+"/",depth:Ke,open:Xn,state:ne(bt),locked:!1,note:xa?"whole folder":""}),Xn&&ue(bt,Ke+1)}for(let bt of qt.files)j.push(I(bt,Ke,bt.slice(ye?ye.length+1:0)))};return ue("",0),j},e.preserveCount=()=>ce?ce.files.filter(le).length:0,e.togglePreserveDir=k=>{e.preserve.expanded[k]=!e.preserve.expanded[k]},e.togglePreserveFile=k=>{e.preserve.picked[k]=!e.preserve.picked[k],A++},e.togglePreserveFolder=k=>{let I=W(k),B=fe(k),j=de().filter(ye=>ye!==I&&ye!==B),ue=ne(k)==="all"||de().includes(I);for(let ye of Z(k))e.preserve.picked[ye]=!1;A++,e.preserve.patterns=(ue?j:[...j,I]).join(`
|
|
|
|
|
`),ue&&Z(k).some(le)&&(e.preserve.patterns=[...j,B].join(`
|
|
|
|
|
`))};let ee=/^readme(\.[^/]*)?$/i,ke=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],pe=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Ce=k=>{let I=K(k),B=I.indexOf("."),j=ke.indexOf(B===-1?"":I.slice(B).toLowerCase());return j===-1?ke.length:j},Pe=()=>!!ce&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!Pe())return"";for(let k of[".github","","docs"]){let I=(ce.dirs.get(k)?.files||[]).filter(B=>ee.test(K(B)));if(I.length)return I.sort((B,j)=>Ce(B)-Ce(j)||z(B,j))[0]}return""},e.readmeName=()=>K(e.readmePath())||"README.md";let Ve={key:null,fn:()=>!1},Ge=()=>{let k=(e.options?.preserveFiles||[]).map(B=>String(B).trim()).filter(Boolean),I=k.join(`
|
|
|
|
|
`);if(I!==Ve.key){let B=()=>!1;try{k.length&&(B=ja(k))}catch{}Ve={key:I,fn:B}}return Ve.fn};e.pathPreserved=k=>!!k&&Ge()(k),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let k=Ge();if(Pe()){let I=e.readmePath();return!!I&&k(I)}return pe.some(I=>k(I))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function ze(){let k={terms:e.terms?e.terms.split(`
|
|
|
|
|
`):[],filePath:e.previewOpenPath()||"README.md",preserveFiles:e.options.preserveFiles||[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(k.branchName=e.source.branch);try{let I=parseGithubUrl(e.sourceUrl);k.repoName=`${I.owner}/${I.repo}`}catch{}return k}function we(k,I,B){let j=null,ue=0,ye=()=>{if(e.detectedType!==k)return;j&&d.cancel(j);let Ke=++ue;e.previewStatus="loading",j=d(()=>{j=null;let qt=I();if(!qt){e.previewStatus="idle";return}t.post("/api/anonymize-preview",qt).then(bt=>{Ke===ue&&(B(bt.data,qt),e.previewStatus="ready")}).catch(()=>{Ke===ue&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{ue++,j&&d.cancel(j),j=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof at!="string"?ft(e.previewFile):Kt()),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()};let be=dn(qo(e));Object.defineProperty(e,"previewViewer",{get:()=>be}),ma(be,e),Object.assign(be,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),be.preview=!0,be.fileSize=k=>k===be.filePath&&typeof at=="string"?new Blob([at]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,be.openPreserveFiles=()=>e.openPreserveFiles(),be.previewPreserved=()=>e.previewPreserved(),be.retryContent=()=>e.retryPreview();let ot=k=>Me.has(k)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(k),rt=(k="")=>({path:k,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=rt();let yt=0,at=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=k=>{if(k=k||"",k&&k===e.readmePath()&&(k=""),yt++,at=null,Yn(),Kt.cancel(),e.previewFile=k,e.previewDoc=rt(k),be.sidebarCollapsed=!0,be.content=null,!k){e.readme?Kt():e.previewStatus="idle";return}if(ot(k)){cr("binary"),e.previewStatus="ready";return}ft(k)};function lt(){yt++,at=null,e.previewFile="",e.previewDoc=rt(),be.sidebarCollapsed=!0,be.content=null}function ft(k){let I=++yt;at=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let B;try{B=parseGithubUrl(e.sourceUrl)}catch{B=null}if(!B||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${B.owner}/${B.repo}/file`,{params:{commit:e.source.commit,path:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&he(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:Se()},transformResponse:j=>j}).then(j=>{if(I!==yt)return;e.previewDoc.loading=!1;let ue=typeof j.headers=="function"&&j.headers("content-type")||"";if(/json/i.test(ue)){let ye=null;try{ye=JSON.parse(j.data)}catch{}if(ye&&ye.binary===!0){cr("binary"),e.previewStatus="ready";return}}at=typeof j.data=="string"?j.data:"",Kt()},j=>{if(I!==yt)return;e.previewDoc.loading=!1;let ue=ar(j);if(ue==="file_too_big"){cr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Kn.ERRORS[ue]||"GitHub did not return this file.",e.previewStatus="error"})}let Vt;function Yn(){Vt&&window.URL.revokeObjectURL(Vt),Vt=void 0,be.url=void 0}e.on("dispose",Yn);function cr(k){Yn(),e.previewDoc.note=k,be.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),be.type=k==="too_big"?"error":"binary",be.content=k==="too_big"?"file_too_big":"binary"}function Qp(k){try{let I=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main",j=k&&k.includes("/")?k.slice(0,k.lastIndexOf("/")+1):"";return`https://github.com/${I.owner}/${I.repo}/raw/${B}/${j}`}catch{return""}}let Ja=we("repo",()=>e.previewFile?typeof at!="string"?null:{content:at,options:ze()}:e.readme?{content:e.readme,options:ze()}:null,k=>{if(typeof k?.content!="string")throw Error("Invalid preview response");Yn(),window.URL?.createObjectURL&&(be.url=Vt=window.URL.createObjectURL(new Blob([k.content],{type:"text/plain"})));let I=e.previewOpenPath()||e.readmeName();be.prepareFile(e.previewPathName(I)),be.fileBaseUrl=Qp(I),be.renderFileContent(k.content,be.type,be.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=k.content)}),Kt=()=>{e.previewFile&&typeof at!="string"||Ja()};Kt.cancel=Ja.cancel;let bs=st(new Map),pr=new Set,fr=new Set,Zs="",xs=null,xo=()=>String(e.terms||"").split(`
|
|
|
|
|
`).filter(k=>k.trim());function Zp(){xs=null;let k=xo(),I=k.join(`
|
|
|
|
|
`);I!==Zs&&(bs.clear(),fr.clear(),Zs=I);let B=[...pr].filter(j=>!bs.has(j));if(pr.clear(),!(!B.length||!k.length))for(let j=0;j<B.length;j+=400){let ue=B.slice(j,j+400);t.post("/api/anonymize-preview",{contents:ue,options:{terms:k,image:!0,link:!0}}).then(ye=>{if(Zs!==I||xo().join(`
|
|
|
|
|
`)!==I)return;let Ke=ye.data?.contents;if(!Array.isArray(Ke)||Ke.length!==ue.length)throw Error("Invalid preview response");ue.forEach((qt,bt)=>bs.set(qt,typeof Ke[bt]=="string"?Ke[bt]:qt))}).catch(()=>{Zs===I&&ue.forEach(ye=>fr.add(ye))})}}e.previewName=k=>{if(!k||!xo().length)return k;if(Zs===xo().join(`
|
|
|
|
|
`)){if(bs.has(k))return bs.get(k);if(fr.has(k))return k}return pr.add(k),xs||(xs=d(Zp,120)),k},e.previewPathName=k=>{k=String(k||"");let I=k.lastIndexOf("/");return I<0?e.previewName(k):e.previewName(k.slice(0,I))+"/"+e.previewName(k.slice(I+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{be.repoId=e.repoId||"repository",be.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),be.paths=be.filePath.split("/"),be.files=e.previewTreeFiles(),be.loadedFolders=Object.fromEntries([...me?.dirs.keys()||[]].map(k=>[e.previewName(k),!0]))},!0),e.on("dispose",()=>{xs&&d.cancel(xs)});function ws(){!e.anonymize||!e.anonymize.terms||Kt()}async function Qa(){let k=parseGithubUrl(e.sourceUrl),I=h();try{Es();let B=await t.get(`/api/pr/${k.owner}/${k.repo}/${k.pullRequestId}`,{params:{connection:e.githubConnection}});if(!b(I))return;e.details=B.data,e.pullRequestId||(e.pullRequestId=k.repo+"-PR"+k.pullRequestId+"-"+generateRandomId(4))}catch(B){if(!b(I))return;throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),Ss(B.data.error)),Y("sourceUrl","missing",!1),B}finally{w(I)}}let ks=st(new Map);function xp(){let k=new Set,I=e.details&&e.details.pullRequest;if(!I)return k;typeof I.title=="string"&&k.add(I.title),typeof I.body=="string"&&k.add(I.body),typeof I.diff=="string"&&k.add(I.diff);let B=I.comments||[];for(let j of B)typeof j.author=="string"&&k.add(j.author),typeof j.body=="string"&&k.add(j.body);return k}let Tn=we("pr",()=>{let k=xp(),I=Array.from(k);return I.length===0?null:{contents:I,options:ze()}},(k,I)=>{if(!Array.isArray(k?.contents)||k.contents.length!==I.contents.length||k.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=I.contents,j=new Map;for(let ue=0;ue<B.length&&ue<k.contents.length;ue++)j.set(B[ue],k.contents[ue]);ks.clear(),j.forEach((ue,ye)=>ks.set(ye,ue))});e.anonymizePrContent=function(k){return k&&(ks.has(k)?ks.get(k):"")};async function Za(){let k=parseGithubUrl(e.sourceUrl),I=h();try{Es(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let B=await t.get(`/api/gist/source/${k.gistId}`);if(!b(I))return;e.details=B.data,e.gistId||(e.gistId="gist-"+k.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(B){if(!b(I))return;if(B.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Y("sourceUrl","missing",!1);return}if(B.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Y("sourceUrl","missing",!1);return}throw B.data&&(r("ERRORS."+B.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),Ss(B.data.error)),Y("sourceUrl","missing",!1),B}finally{w(I)}}let Cs=st(new Map);function ef(){let k=new Set,I=e.details&&e.details.gist;if(!I)return k;typeof I.description=="string"&&k.add(I.description),typeof I.ownerLogin=="string"&&k.add(I.ownerLogin);let B=I.files||[];for(let ue of B)typeof ue.filename=="string"&&k.add(ue.filename),typeof ue.content=="string"&&k.add(ue.content);let j=I.comments||[];for(let ue of j)typeof ue.author=="string"&&k.add(ue.author),typeof ue.body=="string"&&k.add(ue.body);return k}let On=we("gist",()=>{let k=ef(),I=Array.from(k);return I.length===0?null:{contents:I,options:ze()}},(k,I)=>{if(!Array.isArray(k?.contents)||k.contents.length!==I.contents.length||k.contents.some(ue=>typeof ue!="string"))throw Error("Invalid preview response");let B=I.contents,j=new Map;for(let ue=0;ue<B.length&&ue<k.contents.length;ue++)j.set(B[ue],k.contents[ue]);Cs.clear(),j.forEach((ue,ye)=>Cs.set(ye,ue)),hr()});e.anonymizeGistContent=function(k){return k&&(Cs.has(k)?Cs.get(k):"")},e.previewGistFiles=[];function hr(){let k=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=k.map(I=>({filename:e.anonymizeGistContent(I.filename),content:e.anonymizeGistContent(I.content),language:I.language}))}e.watch("details.gist.files",hr,!0),e.watch("terms",hr);function tf(){let k=e.conference;if(e.conference_data=null,!k)return;let I=k===v||e.isUpdate&&k===e._originalConference;k!==v&&(v=null),t.get("/api/conferences/"+k).then(B=>{e.conference===k&&(e.conference_data=B.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!I&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===k&&(e.conference_data=null)})}function Es(){Y("repoId","used",!0),Y("repoId","format",!0),Y("pullRequestId","used",!0),Y("pullRequestId","format",!0),Y("gistId","used",!0),Y("gistId","format",!0),Y("sourceUrl","used",!0),Y("sourceUrl","missing",!0),Y("sourceUrl","access",!0),Y("sourceUrl","github",!0),Y("commit","exi
Line truncated
|
|
|
|
|
`).filter(ye=>ye),connection:e.githubConnection,fullName:`${B.owner}/${B.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(j.options.pageSource=e.details.pageSource),Es();let ue=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},ye=>{if(ye.data){let Ke=["quota_exceeded","subscription_required_for_never_expiration"].includes(ye.data.error);Ke||r("ERRORS."+ye.data.error).then(qt=>{e.error=qt},console.error),Ss(ye.data.error),Ke&&(ye.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,tt(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{I.disabled=!1})},e.anonymizeGist=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ei())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=k.currentTarget||k.target.closest?.("button")||k.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={gistId:e.gistId,terms:e.terms.trim().split(`
|
|
|
|
|
`).filter(ye=>ye),source:{gistId:B.gistId},options:e.options,conference:e.conference};Es();let ue=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(Ke=>{e.error=Ke},console.error),Ss(ye.data.error))}).finally(()=>{I.disabled=!1})},e.anonymizePullRequest=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ei())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let I=k.currentTarget||k.target.closest?.("button")||k.target;I.disabled=!0;let B=parseGithubUrl(e.sourceUrl),j={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
|
|
|
|
`).filter(ye=>ye),source:{repositoryFullName:`${B.owner}/${B.repo}`,pullRequestId:B.pullRequestId},options:e.options,conference:e.conference};Es();let ue=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(ue,j,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(Ke=>{e.error=Ke},console.error),Ss(ye.data.error))}).finally(()=>{I.disabled=!1})},e.watch("conference",()=>{tf()}),e.termHints=[],e.matchTermAsWritten=k=>{e.terms=Dc(e.terms,k)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Kt()}),e.watch("terms",()=>{e.termHints=Ac(e.terms),e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("options.image",()=>{e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("options.link",()=>{e.detectedType==="repo"&&ws(),e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()}),e.watch("details",()=>{e.detectedType==="pr"&&Tn(),e.detectedType==="gist"&&On()},!0)},Ka=function(e,t,s,i,o,r){ma(e);let d=Ct();Oc();let p=Ut(),u=0,y=null,m=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function b(){y&&(y.resolve(),y=null),m&&(d.timeout.cancel(m),m=null)}let h=!1;e.on("dispose",()=>{h=!0,u++,b(),w&&w.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,p(document,"click",O=>{e.symbolsOpen&&!O.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!O.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!O.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&O.target.isConnected&&!O.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!O.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!O.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",O=>{O.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(O.ctrlKey||O.metaKey)&&!O.altKey&&O.key&&O.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(O.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var U=document.querySelector(".tree-search-input");U&&(U.focus(),U.select())}});var w=null;e.onFileSearchChange=function(){w&&(w.resolve(),w=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let U=r.defer();w=U,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:U.promise}).then(function(C){if(!(h||w!==U)){w=null,e.fileSearchLoading=!1;var L={};e.files.forEach(function(Fe){L[(Fe.path||"")+"/"+Fe.name]=!0});for(var z=[],K={},ie=0;ie<C.data.length;ie++){var se=C.data[ie];if(se.path)for(var Y=se.path.split("/"),he="",Se=0;Se<Y.length;Se++){var Ue=he;he=he?he+"/"+Y[Se]:Y[Se];var Be=Ue+"/"+Y[Se];!L[Be]&&!K[Be]&&(K[Be]=!0,z.push({name:Y[Se],path:Ue}))}}z.sort(function(Fe,W){return(Fe.path||"").split("/").length-(W.path||"").split("/").length}),z.length>0&&e.files.push.apply(e.files,z);for(var Qe=[],He=0;He<C.data.length;He++){var et=C.data[He],Re=(et.path||"")+"/"+et.name;!L[Re]&&et.size!=null&&(Qe.push(et),L[Re]=!0)}Qe.length>0&&e.files.push.apply(e.files,Qe),e.fileSearchResults=C.data}},function(){!h&&w===U&&(w=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(O,U){if(e.repoId!=i.repoId)return X();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(C=>C&&C.trim().length>0),te();for(let C=0;C<e.paths.length-1;C++){let L=C>0?e.paths.slice(0,C).join("/"):"";e.files.some(K=>K.path===L)||e.getFiles(L)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],U={};for(let L of e.files)L.name.toLowerCase().indexOf("readme")>-1&&(U[L.name.toLowerCase()]=L.name);let C=null;for(let L of O)if(U[L]){C=L;break}if(!C&&Object.keys(U).length>0&&(C=Object.keys(U)[0]),C){let L=s.url();L[L.length-1]!="/"&&(L+="/"),s.url(L+encodePathForUrl(U[C]))}}e.fileCounts=null;let S=0,N=new Set,v=!1;e.getFiles=function(O,U=!1){let C=e.repoId,L=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(z){if(h||C!==e.repoId||L!==S)return[];let K=O||"";return e.files=e.files.filter(ie=>ie.path!==K),e.files.push(...z.data),e.loadedFolders={...e.loadedFolders,[K]:!0},E(K,L),z.data},function(z){if(h||C!==e.repoId||L!==S)return[];U||(e.type="error",e.content=ar(z),e.files=[])})};function E(O,U){if(v||N.has(O))return;N.add(O);let C=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(O)}`).then(function(L){h||C!==e.repoId||U!==S||(e.fileCounts={...e.fileCounts,...L.data})},function()
Line truncated
|
|
|
|
|
`).length+1)),placeholder:`Jane Smith
|
|
|
|
|
MIT CSAIL
|
|
|
|
|
jane.smith@example.org`},null,10,hT),[[d,{state:e.viewState,set:u=>{e.terms=u},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[126]||(t[126]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",mT,[t[121]||(t[121]=n("summary",null,"Regex & replacement syntax",-1)),t[122]||(t[122]=v()),n("small",gT,[t[115]||(t[115]=v("Regex is supported. Replaced by ",-1)),n("code",null,p(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[116]||(t[116]=v(", or use ",-1)),t[117]||(t[117]=n("code",null,"term=>replacement",-1)),t[118]||(t[118]=v(" to pick your own (e.g. ",-1)),t[119]||(t[119]=n("code",null,"Anonymous=>ABC",-1)),t[120]||(t[120]=v(").",-1))])]),(a(!0),l(F,null,se((e.termHints||[]).slice(0,3),u=>(a(),l("div",{class:"term-hint",key:u.line},[n("span",null,[t[123]||(t[123]=v("In ",-1)),n("code",null,p(u.term),1),t[124]||(t[124]=v(", ",-1)),n("code",null,p(u.symbols.join(" ")),1),v(" "+p(u.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:y=>e.matchTermAsWritten(u.line)},"Match as written",8,vT)]))),128)),(e.termHints||[]).length>3?(a(),l("div",yT,p(e.termHints.length-3)+" more "+p(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),T(n("div",bT,"Terms are in an invalid format.",512),[[Z,e.anonymize?.terms?.errors?.format]])]),T(n("div",wT,[n("div",kT,[t[127]||(t[127]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",CT,p(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[22]||(t[22]=u=>e.openPreserveFiles())},p((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,ET)],512),[[Z,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[27]||(t[27]=le(u=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[26]||(t[26]=le(u=>e.savePreserveFiles(),["prevent"]))},[t[131]||(t[131]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[132]||(t[132]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),T(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[23]||(t[23]=u=>e.preserve.search=u)},null,512),[[pt,e.preserve.search]]),n("div",ST,[e.preserve.loading?(a(),l("p",NT,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",RT,p(e.preserve.error),1)):(a(),l(F,{key:2},[(a(!0),l(F,null,se(e.preserveRows(),(u,y)=>(a(),l("div",{class:"preserve-item",key:u.kind+":"+u.path,style:$e({paddingLeft:u.depth*18+6+"px"})},[u.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":u.open?"true":"false","aria-label":(u.open?"Collapse ":"Expand ")+u.label,onClick:h=>e.togglePreserveDir(u.path)},p(u.open?"\u25BE":"\u25B8"),9,DT)):(a(),l("span",PT)),n("input",{type:"checkbox",id:"pf-"+y,"aria-label":u.kind==="dir"?"Leave folder "+u.path+" unredacted":null,checked:u.state==="all",".indeterminate":u.state==="some",disabled:u.locked,onChange:h=>u.kind==="dir"?e.togglePreserveFolder(u.path):e.togglePreserveFile(u.path)},null,40,AT),n("label",{for:u.kind==="file"?"pf-"+y:null,class:"preserve-name",onClick:h=>u.kind==="dir"&&e.togglePreserveDir(u.path)},p(u.label),9,TT),u.note?(a(),l("span",OT,p(u.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",IT,p(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):f("v-if",!0)],64))]),e.preserve.truncated?(a(),l("p",MT,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[128]||(t[128]=n("summary",null,"Patterns",-1)),T(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
|
|
|
|
|
paper/appendix/**`,"onUpdate:modelValue":t[24]||(t[24]=u=>e.preserve.patterns=u)},null,512),[[pt,e.preserve.patterns]]),t[129]||(t[129]=n("small",{class:"form-text text-muted"},[v("One per line, as in .gitignore: "),n("code",null,"*.bib"),v(" matches in any folder; "),n("code",null,"/refs.bib"),v(" and "),n("code",null,"paper/refs.bib"),v(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),v(" covers everything inside it; "),n("code",null,"!private.bib"),v(" excludes again.")],-1))],8,_T),n("div",VT,[n("span",qT,p(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",$T,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=u=>e.closePreserveFiles())},"Cancel"),t[130]||(t[130]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[Z,e.detectedType]]),T(n("section",LT,[t[153]||(t[153]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),T(n("div",null,[n("div",FT,[T(n("input",UT,null,512),[[d,{state:e.viewState,set:u=>{e.options.link=u},value:e.options?.link,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",BT,[T(n("input",zT,null,512),[[d,{state:e.viewState,set:u=>{e.options.image=u},value:e.options?.image,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",HT,[T(n("input",jT,null,512),[[d,{state:e.viewState,set:u=>{e.options.pdf=u},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",GT,[T(n("input",WT,null,512),[[d,{state:e.viewState,set:u=>{e.options.notebook=u},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",KT,[T(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,YT),[[d,{state:e.viewState,set:u=>{e.options.page=u},value:e.options?.page,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",XT,p(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(a(),l("small",QT,p(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[Z,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",JT,[...t[139]||(t[139]=[v("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),T(n("div",null,[n("div",ZT,[T(n("input",xT,null,512),[[d,{state:e.viewState,set:u=>{e.options.title=u},value:e.options?.title,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",e3,[T(n("input",t3,null,512),[[d,{state:e.viewState,set:u=>{e.options.content=u},value:e.options?.content,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",n3,[T(n("input",o3,null,512),[[d,{state:e.viewState,set:u=>{e.options.comments=u},value:e.options?.comments,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",s3,[T(n("input",i3,null,512),[[d,{state:e.viewState,set:u=>{e.options.username=u},value:e.options?.username,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",r3,[T(n("input",a3,null,512),[[d,{state:e.viewState,set:u=>{e.options.date=u},value:e.options?.date,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",l3,[T(n("input",d3,null,512),[[d,{state:e.viewState,set:u=>{e.options.origin=u},value:e.options?.origin,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Z,e.detectedType==="gist"]]),T(n("div",null,[n("div",u3,[T(n("input",c3,null,512),[[d,{state:e.viewState,set:u=>{e.options.title=u},value:e.options?.title,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",p3,[T(n("input",f3,null,512),[[d,{state:e.viewState,set:u=>{e.options.body=u},value:e.options?.body,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",h3,[T(n("in
Line truncated
|
|
|
|
|
anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),v("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),f(" Privacy and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),v("Privacy and security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. This makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[v("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),n("a",{href:"/connections"},"GitHub connections"),v(" page.")]),n("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),f(" Self-hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),v("Self"),n("span",{class:"serif-hy"},"-"),v("hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{cla
Line truncated
|
|
|
|
|
jane.smith@example.org`},null,10,wT),[[d,{state:e.viewState,set:u=>{e.terms=u},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[126]||(t[126]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",kT,[t[121]||(t[121]=n("summary",null,"Regex & replacement syntax",-1)),t[122]||(t[122]=g()),n("small",CT,[t[115]||(t[115]=g("Regex is supported. Replaced by ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[116]||(t[116]=g(", or use ",-1)),t[117]||(t[117]=n("code",null,"term=>replacement",-1)),t[118]||(t[118]=g(" to pick your own (e.g. ",-1)),t[119]||(t[119]=n("code",null,"Anonymous=>ABC",-1)),t[120]||(t[120]=g(").",-1))])]),(a(!0),l(q,null,x((e.termHints||[]).slice(0,3),u=>(a(),l("div",{class:"term-hint",key:u.line},[n("span",null,[t[123]||(t[123]=g("In ",-1)),n("code",null,c(u.term),1),t[124]||(t[124]=g(", ",-1)),n("code",null,c(u.symbols.join(" ")),1),g(" "+c(u.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:y=>e.matchTermAsWritten(u.line)},"Match as written",8,ET)]))),128)),(e.termHints||[]).length>3?(a(),l("div",ST,c(e.termHints.length-3)+" more "+c(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):f("v-if",!0),D(n("div",NT,"Terms are in an invalid format.",512),[[Q,e.anonymize?.terms?.errors?.format]])]),D(n("div",RT,[n("div",PT,[t[127]||(t[127]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",AT,c(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[22]||(t[22]=u=>e.openPreserveFiles())},c((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,DT)],512),[[Q,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[27]||(t[27]=ae(u=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[26]||(t[26]=ae(u=>e.savePreserveFiles(),["prevent"]))},[t[131]||(t[131]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[132]||(t[132]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),D(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[23]||(t[23]=u=>e.preserve.search=u)},null,512),[[pt,e.preserve.search]]),n("div",TT,[e.preserve.loading?(a(),l("p",OT,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",IT,c(e.preserve.error),1)):(a(),l(q,{key:2},[(a(!0),l(q,null,x(e.preserveRows(),(u,y)=>(a(),l("div",{class:"preserve-item",key:u.kind+":"+u.path,style:Ie({paddingLeft:u.depth*18+6+"px"})},[u.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":u.open?"true":"false","aria-label":(u.open?"Collapse ":"Expand ")+u.label,onClick:m=>e.togglePreserveDir(u.path)},c(u.open?"\u25BE":"\u25B8"),9,MT)):(a(),l("span",VT)),n("input",{type:"checkbox",id:"pf-"+y,"aria-label":u.kind==="dir"?"Leave folder "+u.path+" unredacted":null,checked:u.state==="all",".indeterminate":u.state==="some",disabled:u.locked,onChange:m=>u.kind==="dir"?e.togglePreserveFolder(u.path):e.togglePreserveFile(u.path)},null,40,qT),n("label",{for:u.kind==="file"?"pf-"+y:null,class:"preserve-name",onClick:m=>u.kind==="dir"&&e.togglePreserveDir(u.path)},c(u.label),9,_T),u.note?(a(),l("span",$T,c(u.note),1)):f("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",LT,c(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):f("v-if",!0)],64))]),e.preserve.truncated?(a(),l("p",FT,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):f("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[128]||(t[128]=n("summary",null,"Patterns",-1)),D(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
|
|
|
|
|
paper/appendix/**`,"onUpdate:modelValue":t[24]||(t[24]=u=>e.preserve.patterns=u)},null,512),[[pt,e.preserve.patterns]]),t[129]||(t[129]=n("small",{class:"form-text text-muted"},[g("One per line, as in .gitignore: "),n("code",null,"*.bib"),g(" matches in any folder; "),n("code",null,"/refs.bib"),g(" and "),n("code",null,"paper/refs.bib"),g(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),g(" covers everything inside it; "),n("code",null,"!private.bib"),g(" excludes again.")],-1))],8,UT),n("div",BT,[n("span",zT,c(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",HT,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[25]||(t[25]=u=>e.closePreserveFiles())},"Cancel"),t[130]||(t[130]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):f("v-if",!0)],512),[[Q,e.detectedType]]),D(n("section",jT,[t[153]||(t[153]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),D(n("div",null,[n("div",GT,[D(n("input",WT,null,512),[[d,{state:e.viewState,set:u=>{e.options.link=u},value:e.options?.link,form:"anonymize",options:{}}]]),t[134]||(t[134]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",KT,[D(n("input",YT,null,512),[[d,{state:e.viewState,set:u=>{e.options.image=u},value:e.options?.image,form:"anonymize",options:{}}]]),t[135]||(t[135]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",XT,[D(n("input",JT,null,512),[[d,{state:e.viewState,set:u=>{e.options.pdf=u},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[136]||(t[136]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",QT,[D(n("input",ZT,null,512),[[d,{state:e.viewState,set:u=>{e.options.notebook=u},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",xT,[D(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,e3),[[d,{state:e.viewState,set:u=>{e.options.page=u},value:e.options?.page,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?f("v-if",!0):(a(),l("small",t3,c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(a(),l("small",n3,c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):f("v-if",!0)])],512),[[Q,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",s3,[...t[139]||(t[139]=[g("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):f("v-if",!0),D(n("div",null,[n("div",o3,[D(n("input",i3,null,512),[[d,{state:e.viewState,set:u=>{e.options.title=u},value:e.options?.title,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",r3,[D(n("input",a3,null,512),[[d,{state:e.viewState,set:u=>{e.options.content=u},value:e.options?.content,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",l3,[D(n("input",d3,null,512),[[d,{state:e.viewState,set:u=>{e.options.comments=u},value:e.options?.comments,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",u3,[D(n("input",c3,null,512),[[d,{state:e.viewState,set:u=>{e.options.username=u},value:e.options?.username,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",p3,[D(n("input",f3,null,512),[[d,{state:e.viewState,set:u=>{e.options.date=u},value:e.options?.date,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",h3,[D(n("input",m3,null,512),[[d,{state:e.viewState,set:u=>{e.options.origin=u},value:e.options?.origin,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Q,e.detectedType==="gist"]]),D(n("div",null,[n("div",g3,[D(n("input",v3,null,512),[[d,{state:e.viewState,set:u=>{e.options.title=u},value:e.options?.title,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",y3,[D(n("input",b3,null,512),[[d,{state:e.viewState,set:u=>{e.options.body=u},value:e.options?.body,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",w3,[D(n("in
Line truncated
|
|
|
|
|
anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),g("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),f(" Privacy and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),g("Privacy and security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. This makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[g("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),n("a",{href:"/connections"},"GitHub connections"),g(" page.")]),n("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),f(" Self-hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),g("Self"),n("span",{class:"serif-hy"},"-"),g("hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{cla
Line truncated
|
|
|
|
|
anonymized repository often think it is about the paper, so the
|
|
|
|
|
label names the service and the tooltip says who to contact. `),n("li",{class:P(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),v("Report a bug ")],-1)])],2),n("li",{class:P(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),v("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",DF,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=o=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",PF,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=o=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",AF,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),v(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",TF,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=le(o=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",OF,[n("a",IF,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,MF)):f("v-if",!0),n("span",_F,p(e.user?.username),1)]),n("div",VF,[n("h6",qF,"Signed in as @"+p(e.user?.username),1),t[25]||(t[25]=Se('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item um-extra" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a>',6)),e.headerShowSupport?(a(),l("a",$F,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,LF)):f("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=le(o=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=le(o=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),T(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=o=>e.emailPromptAddress=o),disabled:e.emailPromptBusy},null,8,FF),[[pt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p
Line truncated
|
|
|
|
|
python experiments/run.py`),n("p",null,[v("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:P(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",JF,[e.statsEmpty()?f("v-if",!0):(a(),l("div",ZF,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),v(),n("span",null,[v("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(a(),l("div",xF,[(a(!0),l(F,null,se(e.cards,(i,s)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:P(["paper-stat-value",{"is-pending":!e.stat}])},p(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",eU,p(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",tU," +"+p(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[v("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",nU,[n("div",oU,[t[13]||(t[13]=n("label",{for:"demo-terms"},[v("Terms to redact "),n("span",null,[v("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),T(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=kt(le(()=>{},["prevent"]),["enter"]))},null,544),[[pt,e.demoTerms]])]),n("div",sU,[n("div",iU,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[v("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",rU,[n("div",aU,[(a(!0),l(F,null,se(e.demoParts(),(i,s)=>(a(),l(F,{key:s},[i.redacted?(a(),l("mark",lU,p(i.original),1)):(a(),l(F,{key:1},[v(p(i.text),1)],64))],64))),128)),t[14]||(t[14]=v("\u200B",-1))]),T(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[pt,e.demoText]])])]),n("div",dU,[n("div",uU,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",cU,[n("span",pU,p(e.demoCount())+" redacted",1)])]),n("div",fU,[(a(!0),l(F,null,se(e.demoParts(),(i,s)=>(a(),l(F,{key:s},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},p(i.text),9,hU)):(a(),l(F,{key:1},[v(p(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",mU,[n("div",gU,[(a(!0),l(F,null,se(e.features,(i,s)=>(a(),l("div",{class:P(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,s),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",yU,[n("span",bU,p(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",wU,p(i?.eyebrow),1)]),n("span",kU,[v(p(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",CU,"-")):f("v-if",!0),v(p(i?.title.split("-").slice(1).join("-"))+" "+p(i?.accent),1)])],40,vU),n("div",EU,[n("span",SU,[v(p(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",NU,"-")):f("v-if",!0),v(p(i?.title.split("-").slice(1).join("-"))+" "+p(i?.accent),1)]),n("p",null,p(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},p(i?.cta)+" \u2192",9,RU)])],2))),128))]),n("div",DU,[(a(!0),l(F,null,se(e.features,(i,s)=>T((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",AU,[n("div",TU,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",OU,p(i?.url),1)]),n("div",{class:P(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",MU,[...t[19]||(t[19]=[Se('<div class="fm-label">GitHub re
Line truncated
|
|
|
|
|
label names the service and the tooltip says who to contact. `),n("li",{class:P(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug ")],-1)])],2),n("li",{class:P(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),g("Support ")],-1)])],2),e.isDarkMode?f("v-if",!0):(a(),l("li",MF,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=s=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",VF,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=s=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",qF,[...t[23]||(t[23]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),g(" Sign in ")],-1)])])):f("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(a(),l("li",_F,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=ae(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(a(),l("li",$F,[n("a",LF,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,FF)):f("v-if",!0),n("span",UF,c(e.user?.username),1)]),n("div",BF,[n("h6",zF,"Signed in as @"+c(e.user?.username),1),t[25]||(t[25]=Ee('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item um-extra" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a>',6)),e.headerShowSupport?(a(),l("a",HF,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):f("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):f("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,jF)):f("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=ae(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=ae(s=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),D(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailPromptAddress=s),disabled:e.emailPromptBusy},null,8,GF),[[pt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p
Line truncated
|
|
|
|
|
python experiments/run.py`),n("p",null,[g("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),f(" Live stats "),n("section",{class:P(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",sU,[e.statsEmpty()?f("v-if",!0):(a(),l("div",oU,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),g(),n("span",null,[g("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?f("v-if",!0):(a(),l("div",iU,[(a(!0),l(q,null,x(e.cards,(i,o)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:P(["paper-stat-value",{"is-pending":!e.stat}])},c(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",rU,c(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",aU," +"+c(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):f("v-if",!0)]))),128))]))],2),f(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[g("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",lU,[n("div",dU,[t[13]||(t[13]=n("label",{for:"demo-terms"},[g("Terms to redact "),n("span",null,[g("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),D(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=kt(ae(()=>{},["prevent"]),["enter"]))},null,544),[[pt,e.demoTerms]])]),n("div",uU,[n("div",cU,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[g("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",pU,[n("div",fU,[(a(!0),l(q,null,x(e.demoParts(),(i,o)=>(a(),l(q,{key:o},[i.redacted?(a(),l("mark",hU,c(i.original),1)):(a(),l(q,{key:1},[g(c(i.text),1)],64))],64))),128)),t[14]||(t[14]=g("\u200B",-1))]),D(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[pt,e.demoText]])])]),n("div",mU,[n("div",gU,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",vU,[n("span",yU,c(e.demoCount())+" redacted",1)])]),n("div",bU,[(a(!0),l(q,null,x(e.demoParts(),(i,o)=>(a(),l(q,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},c(i.text),9,wU)):(a(),l(q,{key:1},[g(c(i.text),1)],64))],64))),128))])])])]),f(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",kU,[n("div",CU,[(a(!0),l(q,null,x(e.features,(i,o)=>(a(),l("div",{class:P(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,o),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",SU,[n("span",NU,c(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",RU,c(i?.eyebrow),1)]),n("span",PU,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",AU,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)])],40,EU),n("div",DU,[n("span",TU,[g(c(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",OU,"-")):f("v-if",!0),g(c(i?.title.split("-").slice(1).join("-"))+" "+c(i?.accent),1)]),n("p",null,c(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},c(i?.cta)+" \u2192",9,IU)])],2))),128))]),n("div",MU,[(a(!0),l(q,null,x(e.features,(i,o)=>D((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",qU,[n("div",_U,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",$U,c(i?.url),1)]),n("div",{class:P(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",FU,[...t[19]||(t[19]=[Ee('<div class="fm-label">GitHub reposit
Line truncated
|
|
|
|
|
<span class="ln">2</span><span class="c"># Author: <span class="redact">XXXX-1</span>, <span class="redact">XXXX-2</span></span>
|
|
|
|
|
<span class="ln">3</span><span class="k">import</span> torch
|
|
|
|
|
<span class="ln">4</span><span class="k">from</span> utils <span class="k">import</span> load_config
|
|
|
|
@@ -55,18 +55,18 @@ python experiments/run.py`),n("p",null,[v("Contact: "),n("span",{class:"redact",
|
|
|
|
|
<span class="ln">7</span> model = build_model(config)
|
|
|
|
|
<span class="ln">8</span> <span class="k">for</span> epoch <span class="k">in</span> range(config.epochs):
|
|
|
|
|
<span class="ln">9</span> loss = step(model)
|
|
|
|
|
<span class="ln">10</span> log(<span class="s">"epoch %d: %.3f"</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",VU,[...t[21]||(t[21]=[Se('<div class="fm-dash-head"><span>Project</span><span>Status</span><span>Views</span><span>Expires</span></div><div class="fm-dash-row"><span><b>DeepLearnUtils</b><i>paper-7f2a \xB7 ICSE 2027</i></span><span class="st is-ready">Ready</span><span>41</span><span>Mar 31, 2027</span></div><div class="fm-dash-row"><span><b>vision-bench#212</b><i>pull request \xB7 FSE 2027</i></span><span class="st is-ready">Ready</span><span>12</span><span>Never</span></div><div class="fm-dash-row"><span><b>graph-repair</b><i>gr-91ab</i></span><span class="st is-progress">Updating</span><span>5</span><span>Jan 5, 2027</span></div><div class="fm-dash-row is-muted"><span><b>JarSift</b><i>OOPSLA 2025</i></span><span class="st is-expired">Expired</span><span>72</span><span>Sep 28, 2026</span></div>',5)])]))],10,IU)])],8,PU)),[[Z,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Se('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),Oe(o,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var qU={class:"paper-empty"},$U={class:"paper-empty-inner"},LU={key:0,class:"paper-eyebrow"},FU={key:1,class:"paper-eyebrow"},UU={key:2,class:"paper-empty-title"},BU=["textContent"];function fp(e,t){return a(),l("div",qU,[n("div",$U,[e.error?f("v-if",!0):(a(),l("div",LU,"Working")),e.error?(a(),l("div",FU,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",UU,[...t[0]||(t[0]=[v(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:p(e.fmt.translate(e.error))},null,8,BU)):f("v-if",!0)])])}var zU={class:"container paper-page paper-settings"},HU={class:"paper-crumbs"},jU={class:"here"},GU={class:"paper-page-title"},WU={class:"paper-settings-body"},KU={class:"paper-settings-toc"},YU={href:"#conf-billing"},XU={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},QU={id:"conf-basics",class:"paper-settings-section"},JU={class:"form-group"},ZU={class:"invalid-feedback"},xU={class:"invalid-feedback"},e7={class:"form-group"},t7={class:"invalid-feedback"},n7={class:"form-group"},o7={class:"invalid-feedback"},s7={class:"invalid-feedback"},i7={id:"conf-window",class:"paper-settings-section"},r7={class:"form-grid-2"},a7={class:"form-group"},l7={class:"invalid-feedback"},d7={class:"invalid-feedback"},u7={class:"form-group"},c7={class:"invalid-feedback"},p7={class:"invalid-feedback"},f7={id:"conf-rendering",class:"paper-settings-section"},h7={class:"form-check"},m7={class:"form-check-input",type:"checkbox",id:"link",name:"link"},g7={class:"form-check"},v7={class:"form-check-input",type:"checkbox",id:"image",name:"image"},y7={class:"form-check"},b7={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},w7={class:"form-check"},k7={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},C7={id:"conf-features",class:"paper-settings-section"},E7={class:"form-check"},S7={class:"form-check-input",type:"checkbox",id:"update",name:"update"},N7={class:"form-check"},R7={class:"form-check-input",type:"checkbox",id:"page",name:"page"},D7={id:"conf-plan",class:"paper-settings-section"},P7={key:0,class:"paper-section-copy"},A7={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},Line truncated
|
|
|
|
|
`).length))+" lines",1)):f("v-if",!0)]),T(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",C9,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,E9)]))],8,k9),[[Z,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",S9,[e.redactionCount()?(a(),l(F,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(p(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,N9),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),v(p(e.languageName||"Text"),1),n("span",R9,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),v(p(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),v(p(e.fmt?.number(e.content.split(`
|
|
|
|
|
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",D9,[e.redactionCount()?(a(),l(F,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[v(p(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,P9),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=v("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(F,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),v(p(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",A9,[e.isCsv()?(a(),l("div",T9,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,O9),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[5]||(t[5]=d=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,I9)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",M9,[n("button",{type:"button",class:P(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[6]||(t[6]=d=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,_9),e.symbolsOpen?(a(),l("div",V9,[n("div",q9,p(e.symbols().length)+" "+p(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(F,null,se(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:c=>e.goToSymbol(d.line)},[n("span",{class:P(["symbols-kind","is-"+d.kind])},p(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",L9,p(d.name),1),n("span",F9,p(d.line),1)],8,$9))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:P(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[7]||(t[7]=d=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,U9)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",B9,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[8]||(t[8]=d=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,z9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[9]||(t[9]=d=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,H9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[10]||(t[10]=d=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,j9)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",G9,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,W9),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=d=>e.copyContent())},[(a(),l("svg",Y9,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,X9)]))],8,K9)):f("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,Q9)])):f("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=d=>e.copyContent())},[(a(),l("svg",Z9,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,x9)]))],8,J9)):f("v-if",!0),e.type=="html"&&e.
Line truncated
|
|
|
|
|
`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",lB)):f("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[17]||(t[17]=d=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),v("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",dB)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[18]||(t[18]=d=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),v("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[19]||(t[19]=d=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),v("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[20]||(t[20]=d=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=v("Wrap lines",-1)),e.wrapLines?(a(),l("span",cB,"\u2713")):f("v-if",!0)],8,uB)):f("v-if",!0),e.isCsv()?(a(),l("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[21]||(t[21]=d=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(a(),l("svg",pB,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,fB)])),v(p(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",hB)):f("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v("View raw",-1)])],8,mB)):f("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),v("View raw",-1)])],8,gB)):f("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),v("Download file",-1)])],8,vB)):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),v("Open website",-1)])],8,yB)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),v("Edit anonymization",-1)])],8,bB)):f("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),v("Download ZIP",-1)])],8,wB)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=d=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),v("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),v("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),v("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=le(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),T(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
|
|
|
|
|
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=kt(le(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,kB),[[pt,e.gotoValue]]),n("span",{class:P(["goto-hint",{"is-error":e.gotoError}])},p(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",EB,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(F,null,se(e.csvRows()[0]||[],(d,c)=>(a(),l("th",{scope:"col",key:c,class:P({"is-num":e.csvNumCol(c)})},[(a(!0),l(F,null,se(e.redactParts(d),(u,y)=>(a(),l(F,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,p(u.n),1)],8,SB)):(a(),l(F,{key:1},[v(p(u.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(F,null,se(e.csvRows().slice(1),(d,c)=>(a(),l("tr",{key:c},[n("td",NB,p(c+1),1),(a(!0),l(F,null,se(d,(u,y)=>(a(),l("td",{key:y,class:P({"is-num":e.csvNumCol(y)})},[(a(!0),l(F,null,se(e.redactParts(u),(h,b)=>(a(),l(F,{key:b},[h.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,p(h.n),1)],8,RB)):(a(),l(F,{key:1},[v(p(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,CB)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?T((a(),l("div",DB,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",PB,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=d=>{e.mdFindQuery=d.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=kt(le(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=kt(le(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,AB),n("span",TB,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=d=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,OB),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=d=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,IB)]),n("span",MB,p(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:P(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=d=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,_B),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=d=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",VB,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,qB),e.readmeToc().length>=3?(a(),l("aside",$B,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",LB,[n("a",{href:"#",class:P(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=le(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(F,null,se(e.readmeToc(),(d,c)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:P(["lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:le(u=>e.scrollToHeading(d.id),["prevent"])},p(d.text),11,FB))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Gt(o,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:P(["file-card file-card-media","view-"+e.type])},[n("header",UB,[n("div",BB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",zB,[n("li",HB,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:p(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,jB)]),(a(!0),l(F,null,se(e.paths,(d,c)=>(a(),l("li",{class:"breadcrumb-item","aria-current":c===e.paths.length-1?"page":null},[(a(!0),l(F,null,se(e.redactParts(d),(u,y)=>(a(),l(F,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,p(u.n),1)],8,WB)):(a(),l(F,{key:1},[v(p(u.t),1)],64))],64))),128))],8,GB))),256))]),n("span",KB,[e.type==
Line truncated
|
|
|
|
|
<span class="ln">10</span> log(<span class="s">"epoch %d: %.3f"</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",BU,[...t[21]||(t[21]=[Ee('<div class="fm-dash-head"><span>Project</span><span>Status</span><span>Views</span><span>Expires</span></div><div class="fm-dash-row"><span><b>DeepLearnUtils</b><i>paper-7f2a \xB7 ICSE 2027</i></span><span class="st is-ready">Ready</span><span>41</span><span>Mar 31, 2027</span></div><div class="fm-dash-row"><span><b>vision-bench#212</b><i>pull request \xB7 FSE 2027</i></span><span class="st is-ready">Ready</span><span>12</span><span>Never</span></div><div class="fm-dash-row"><span><b>graph-repair</b><i>gr-91ab</i></span><span class="st is-progress">Updating</span><span>5</span><span>Jan 5, 2027</span></div><div class="fm-dash-row is-muted"><span><b>JarSift</b><i>OOPSLA 2025</i></span><span class="st is-expired">Expired</span><span>72</span><span>Sep 28, 2026</span></div>',5)])]))],10,LU)])],8,VU)),[[Q,e.feature===i?.key]])),128))])]),f(" FAQ teaser "),t[24]||(t[24]=Ee('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),Oe(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var zU={class:"paper-empty"},HU={class:"paper-empty-inner"},jU={key:0,class:"paper-eyebrow"},GU={key:1,class:"paper-eyebrow"},WU={key:2,class:"paper-empty-title"},KU=["textContent"];function gp(e,t){return a(),l("div",zU,[n("div",HU,[e.error?f("v-if",!0):(a(),l("div",jU,"Working")),e.error?(a(),l("div",GU,"Error")):f("v-if",!0),e.error?f("v-if",!0):(a(),l("h1",WU,[...t[0]||(t[0]=[g(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,KU)):f("v-if",!0)])])}var YU={class:"container paper-page paper-settings"},XU={class:"paper-crumbs"},JU={class:"here"},QU={class:"paper-page-title"},ZU={class:"paper-settings-body"},xU={class:"paper-settings-toc"},e7={href:"#conf-billing"},t7={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},n7={id:"conf-basics",class:"paper-settings-section"},s7={class:"form-group"},o7={class:"invalid-feedback"},i7={class:"invalid-feedback"},r7={class:"form-group"},a7={class:"invalid-feedback"},l7={class:"form-group"},d7={class:"invalid-feedback"},u7={class:"invalid-feedback"},c7={id:"conf-window",class:"paper-settings-section"},p7={class:"form-grid-2"},f7={class:"form-group"},h7={class:"invalid-feedback"},m7={class:"invalid-feedback"},g7={class:"form-group"},v7={class:"invalid-feedback"},y7={class:"invalid-feedback"},b7={id:"conf-rendering",class:"paper-settings-section"},w7={class:"form-check"},k7={class:"form-check-input",type:"checkbox",id:"link",name:"link"},C7={class:"form-check"},E7={class:"form-check-input",type:"checkbox",id:"image",name:"image"},S7={class:"form-check"},N7={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},R7={class:"form-check"},P7={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},A7={id:"conf-features",class:"paper-settings-section"},D7={class:"form-check"},T7={class:"form-check-input",type:"checkbox",id:"update",name:"update"},O7={class:"form-check"},I7={class:"form-check-input",type:"checkbox",id:"page",name:"page"},M7={id:"conf-plan",class:"paper-settings-section"},V7={key:0,class:"paper-section-copy"},q7={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},Line truncated
|
|
|
|
|
`).length))+" lines",1)):f("v-if",!0)]),D(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=d=>e.copyPath())},[(a(),l("svg",A9,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,D9)]))],8,P9),[[Q,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",T9,[e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,O9),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),g(c(e.languageName||"Text"),1),n("span",I9,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.fmt?.number(e.content.split(`
|
|
|
|
|
`).length))+" lines",1)])):f("v-if",!0),e.type=="html"?(a(),l("span",M9,[e.redactionCount()?(a(),l(q,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[g(c(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,V9),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):f("v-if",!0),t[56]||(t[56]=g("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(q,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),g(c(e.formatSize(e.fileSize(e.filePath))),1)],64)):f("v-if",!0)])):f("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=d=>e.openPreserveFiles())},"Left unredacted")):f("v-if",!0),n("div",q9,[e.isCsv()?(a(),l("div",_9,[n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=d=>e.csvView="table")},"Table",10,$9),n("button",{type:"button",role:"radio",class:P(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[5]||(t[5]=d=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,L9)])):f("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",F9,[n("button",{type:"button",class:P(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[6]||(t[6]=d=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,U9),e.symbolsOpen?(a(),l("div",B9,[n("div",z9,c(e.symbols().length)+" "+c(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(q,null,x(e.symbols(),d=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:d.line+d.name,onClick:p=>e.goToSymbol(d.line)},[n("span",{class:P(["symbols-kind","is-"+d.kind])},c(d.kind==="class"?"C":d.kind==="function"?"\u0192":"v"),3),n("span",j9,c(d.name),1),n("span",G9,c(d.line),1)],8,H9))),128))])):f("v-if",!0)])):f("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:P(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[7]||(t[7]=d=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,W9)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",K9,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[8]||(t[8]=d=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,Y9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[9]||(t[9]=d=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,X9)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[10]||(t[10]=d=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,J9)):f("v-if",!0)])):f("v-if",!0),!e.preview||e.url?(a(),l("div",Q9,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,Z9),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=d=>e.copyContent())},[(a(),l("svg",eB,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,tB)]))],8,x9)):f("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,nB)])):f("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=d=>e.copyContent())},[(a(),l("svg",oB,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,iB)]))],8,sB)):f("v-if",!0),e.type=="html"&&e.r
Line truncated
|
|
|
|
|
`).length))+" lines",1)],64)):f("v-if",!0)])):f("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",hB)):f("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[17]||(t[17]=d=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),g("Find in file",-1)])])):f("v-if",!0),e.type=="html"?(a(),l("div",mB)):f("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[18]||(t[18]=d=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),g("Find in file",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[19]||(t[19]=d=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),g("Go to line",-1)])])):f("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[20]||(t[20]=d=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=g("Wrap lines",-1)),e.wrapLines?(a(),l("span",vB,"\u2713")):f("v-if",!0)],8,gB)):f("v-if",!0),e.isCsv()?(a(),l("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[21]||(t[21]=d=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(a(),l("svg",yB,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,bB)])),g(c(e.csvView==="table"?"Show as text":"Show as table"),1)])):f("v-if",!0),e.type!="html"?(a(),l("div",wB)):f("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g("View raw",-1)])],8,kB)):f("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),g("View raw",-1)])],8,CB)):f("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),g("Download file",-1)])],8,EB)):f("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),g("Open website",-1)])],8,SB)):f("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),g("Edit anonymization",-1)])],8,NB)):f("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),g("Download ZIP",-1)])],8,RB)):f("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=d=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),g("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),g("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),g("Report a bug")],-1))])):f("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=ae(d=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),D(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
|
|
|
|
|
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=d=>e.gotoValue=d),onKeydown:t[25]||(t[25]=kt(ae(d=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,PB),[[pt,e.gotoValue]]),n("span",{class:P(["goto-hint",{"is-error":e.gotoError}])},c(e.gotoError||"Line, or line:column"),3)],32)):f("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",DB,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(q,null,x(e.csvRows()[0]||[],(d,p)=>(a(),l("th",{scope:"col",key:p,class:P({"is-num":e.csvNumCol(p)})},[(a(!0),l(q,null,x(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,TB)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(q,null,x(e.csvRows().slice(1),(d,p)=>(a(),l("tr",{key:p},[n("td",OB,c(p+1),1),(a(!0),l(q,null,x(d,(u,y)=>(a(),l("td",{key:y,class:P({"is-num":e.csvNumCol(y)})},[(a(!0),l(q,null,x(e.redactParts(u),(m,b)=>(a(),l(q,{key:b},[m.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+m.n},[n("i",null,c(m.n),1)],8,IB)):(a(),l(q,{key:1},[g(c(m.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,AB)):f("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?D((a(),l("div",MB,null,512)),[[r,{content:e.content,options:e.aceOption}]]):f("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",VB,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=d=>{e.mdFindQuery=d.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=kt(ae(d=>d.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=kt(ae(d=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,qB),n("span",_B,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=d=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,$B),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=d=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,LB)]),n("span",FB,c(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:P(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=d=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,UB),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=d=>e.toggleMdFind(!1))},"\xD7")])):f("v-if",!0),e.type=="html"?(a(),l("div",BB,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,zB),e.readmeToc().length>=3?(a(),l("aside",HB,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",jB,[n("a",{href:"#",class:P(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=ae(d=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(q,null,x(e.readmeToc(),(d,p)=>(a(),l("a",{key:d.id,href:"#"+d.id,class:P(["lvl-"+d.level,{"is-active":e.activeHeading===d.id}]),onClick:ae(u=>e.scrollToHeading(d.id),["prevent"])},c(d.text),11,GB))),128))])])):f("v-if",!0)])):f("v-if",!0)],2)):f("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Gt(s,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):f("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:P(["file-card file-card-media","view-"+e.type])},[n("header",WB,[n("div",KB,[n("button",{type:"button",class:P(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=d=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",YB,[n("li",XB,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:c(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,JB)]),(a(!0),l(q,null,x(e.paths,(d,p)=>(a(),l("li",{class:"breadcrumb-item","aria-current":p===e.paths.length-1?"page":null},[(a(!0),l(q,null,x(e.redactParts(d),(u,y)=>(a(),l(q,{key:y},[u.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+u.n},[n("i",null,c(u.n),1)],8,ZB)):(a(),l(q,{key:1},[g(c(u.t),1)],64))],64))),128))],8,QB))),256))]),n("span",xB,[e.type=="IPython
Line truncated
|
|
|
|
|
`).length+1)),placeholder:`Jane Smith
|
|
|
|
|
MIT CSAIL
|
|
|
|
|
jane.smith@example.org`},null,8,oj),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",sj,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=v("Matches become ",-1)),n("code",null,p(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=v(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=v(" for a custom replacement. Regex is supported.",-1))])]),T(n("div",ij,"Terms are in an invalid format.",512),[[Z,e.defaultsForm?.terms?.errors?.format]])])]),n("section",rj,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",aj,[n("label",lj,[T(n("input",dj,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=v("Keep links",-1))]),n("label",uj,[T(n("input",cj,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=v("Display images",-1))]),n("label",pj,[T(n("input",fj,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=v("Display PDFs",-1))]),n("label",hj,[T(n("input",mj,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=v("Display notebooks",-1))]),n("label",gj,[T(n("input",vj,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=v("Show line counts",-1))]),n("label",yj,[T(n("input",bj,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=v("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",wj,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",kj,[T(n("input",Cj,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=v("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",Ej,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[T((a(),l("select",Sj,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",Nj,p(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",Rj,[n("div",Dj,[e.draftRestored?(a(),l("span",Pj,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",Aj,"Unsaved changes"+p(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",Tj,p(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(a(),l("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=r=>e.discardDraft())},"Discard changes")):f("v-if",!0),n("button",{id:"save",type:"submit",class:P(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},p(e.saving?"Saving\u2026":"Save defaults"),11,Oj),e.error?(a(),l("div",Ij,p(e.error),1)):f("v-if",!0)])],32)),[[s,e.viewState]])],512),[[Z,e.settingsTab==="defaults"]]),T(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",_j,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",Vj,[v(p(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,qj)])):f("v-if",!0),e.billingNotice?(a(),l("p",$j,p(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",Lj,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,Fj)])):f("v-if",!0),n("section",Uj,[n("div",Bj,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",zj,p(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",Hj,[v(p(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access u
Line truncated
|
|
|
|
|
`);t.innerHTML=o.map(i=>{let s=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":s==="+"?"add":s==="-"?"remove":"";return`<span class="md-diff-line${r?" is-"+r:""}">${i||" "}</span>`}).join(`
|
|
|
|
|
`)}),Ap=(e,t=0)=>{let o=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+o+4,24)},Ip=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let o=t.querySelectorAll(".md-diff-line");if(o.length){o.forEach(s=>{s.classList.contains("is-hunk")||s.style.setProperty("--hang",Ap(s.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(`
|
|
|
|
|
`).map(s=>{let r=i.join("");s.replace(/<\/?span\b[^>]*>/g,c=>(c.startsWith("</")?i.pop():i.push(c),c));let d=s.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${Ap(d)}ch">${r}${s||" "}${"</span>".repeat(i.length)}</span>`}).join(`
|
|
|
|
|
`)})},Mp={props:["content","terms","options"],setup(e){let t=Et(null),o=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Op(t.value),Ip(t.value)};return fn(()=>{o(),dt(()=>[e.content,e.terms,e.options],o,{deep:!0})}),()=>Ae("markdown",{ref:t})}},aY={props:["file","terms","options"],setup(e){let t=Et(null),o=()=>tt(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Op(t.value),Ip(t.value)});return fn(o),dt(()=>[e.file?.content,e.terms,e.options],o,{deep:!0}),()=>{let i=e.file||{},s=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(s)||i.language==="Markdown")return Ae("gist-file",{ref:t},Ae(Mp,{content:i.content,terms:e.terms,options:e.options}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},d=(i.language||s||"none").toLowerCase();return Ae("gist-file",{ref:t},Ae("pre",{class:"line-numbers"},Ae("code",{class:"language-"+(r[d]||d),key:i.content},i.content||"")))}}},lY=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let o=document.createElement("div");o.className="nb-code-scroll",t.replaceWith(o),o.appendChild(t);let i=()=>{let s=t.scrollWidth-t.clientWidth>1;if(o.classList.toggle("is-overflowing",s),o.classList.toggle("is-at-end",s&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!s)return;let r=t.clientWidth-16,d=Math.max(24,r*t.clientWidth/t.scrollWidth);o.style.setProperty("--thumb-w",d+"px"),o.style.setProperty("--thumb-x",(r-d)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),dY={props:["file","content"],setup(e){let t=Et(null),o=0,i,s=async()=>{let r=++o;i?.abort(),i=new AbortController;try{let d=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(c=>{if(!c.ok)throw Error("Notebook request failed");return c.json()});if(await Xn("notebook"),r!==o)return;t.value.innerHTML=qs(DOMPurify.sanitize(nb.parse(d).render())),t.value.querySelectorAll("pre code").forEach(c=>window.Prism?.highlightElement(c)),lY(t.value)}catch(d){r===o&&d.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return fn(()=>{s(),dt(()=>[e.file,e.content],s)}),so(()=>{o++,i?.abort()}),()=>Ae("notebook",{ref:t})}},uY={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),o=t.reduce((i,[,s])=>i+s.code,0);return Ae("loc",t.map(([i,s])=>Ae("div",{class:"lang",title:`${i}: ${s.code.toLocaleString()} lines`,style:{width:s.code*100/o+"%",background:langColors[i]}})))}}},_p={Markdown:Mp,GistFile:aY,Notebook:dY,Loc:uY,HtmlDoc:Rp,QuotaUsage:iY,Pdfviewer:id(async()=>(await Xn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Dp))},Vp={async mounted(e,{value:t}){e._editorValue=t;try{if(await ni(),e._editorDisposed)return;let o=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(o.content??""),-1),Tp(e,o.options),e._editorCleanup=o.options?.onLoad?.(i)}catch(o){e._editorDisposed||(e.textContent=o.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Tp(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Tp(e,t={}){let o=rY.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+o),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var qp={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],o=new Set,i=new IntersectionObserver(s=>{s.forEach(d=>d.isIntersecting?o.add(d.target.id):o.delete(d.target.id));let r=t.find(d=>o.has(d.hash.slice(1)));r&&t.forEach(d=>d.classList.toggle("active",d===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});tt(()=>{t.forEach(s=>{let r=document.getElementById(s.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(s=>s.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};function $p(e){let t=[],o=0,i=/\bXXXX-(\d+)\b/g,s;for(;s=i.exec(e);)s.index>o&&t.push(e.slice(o,s.index)),t.push(Ae("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+s[1]},[Ae("i",null,s[1])])),o=s.index+s[0].length;return t.length?(o<e.length&&t.push(e.slice(o)),t):e}function cY(e){let t=$p(e),o=[];for(let i of Array.isArray(t)?t:[t]){if(typeof i!="string"){o.push(i);continue}let s=i.split(/(?<=[._-])/);s.forEach((r,d)=>{o.push(r),d<s.length-1&&o.push(Ae("wbr"))})}return o}function pY(e){if(e<1024)return`${e} B`;let t=["KB","MB","GB"],o=e/1024,i=0;for(;o>=1024&&i<t.length-1;)o/=1024,i++;return`${o.toFixed(1)} ${t[i]}`}function fY(e){let t={children:[]},o=new Map([["",t]]);function i(s){if(o.has(s))return o.get(s);let r=s.lastIndexOf(
Line truncated
|
|
|
|
|
jane.smith@example.org`},null,8,dj),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",uj,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=g("Matches become ",-1)),n("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=g(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=g(" for a custom replacement. Regex is supported.",-1))])]),D(n("div",cj,"Terms are in an invalid format.",512),[[Q,e.defaultsForm?.terms?.errors?.format]])])]),n("section",pj,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",fj,[n("label",hj,[D(n("input",mj,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=g("Keep links",-1))]),n("label",gj,[D(n("input",vj,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=g("Display images",-1))]),n("label",yj,[D(n("input",bj,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=g("Display PDFs",-1))]),n("label",wj,[D(n("input",kj,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=g("Display notebooks",-1))]),n("label",Cj,[D(n("input",Ej,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=g("Show line counts",-1))]),n("label",Sj,[D(n("input",Nj,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=g("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",Rj,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",Pj,[D(n("input",Aj,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=g("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",Dj,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[D((a(),l("select",Tj,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",Oj,c(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",Ij,[n("div",Mj,[e.draftRestored?(a(),l("span",Vj,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",qj,"Unsaved changes"+c(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",_j,c(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(a(),l("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=r=>e.discardDraft())},"Discard changes")):f("v-if",!0),n("button",{id:"save",type:"submit",class:P(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},c(e.saving?"Saving\u2026":"Save defaults"),11,$j),e.error?(a(),l("div",Lj,c(e.error),1)):f("v-if",!0)])],32)),[[o,e.viewState]])],512),[[Q,e.settingsTab==="defaults"]]),D(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",Uj,"Loading billing\u2026")):f("v-if",!0),e.billingError?(a(),l("div",Bj,[g(c(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,zj)])):f("v-if",!0),e.billingNotice?(a(),l("p",Hj,c(e.billingNotice),1)):f("v-if",!0),e.billingPending?(a(),l("div",jj,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,Gj)])):f("v-if",!0),n("section",Wj,[n("div",Kj,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",Yj,c(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",Xj,[g(c(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access u
Line truncated
|
|
|
|
|
`);t.innerHTML=s.map(i=>{let o=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":o==="+"?"add":o==="-"?"remove":"";return`<span class="md-diff-line${r?" is-"+r:""}">${i||" "}</span>`}).join(`
|
|
|
|
|
`)}),Mp=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},_p=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let s=t.querySelectorAll(".md-diff-line");if(s.length){s.forEach(o=>{o.classList.contains("is-hunk")||o.style.setProperty("--hang",Mp(o.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(`
|
|
|
|
|
`).map(o=>{let r=i.join("");o.replace(/<\/?span\b[^>]*>/g,p=>(p.startsWith("</")?i.pop():i.push(p),p));let d=o.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${Mp(d)}ch">${r}${o||" "}${"</span>".repeat(i.length)}</span>`}).join(`
|
|
|
|
|
`)})},$p={props:["content","terms","options"],setup(e){let t=St(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),qp(t.value),_p(t.value)};return fn(()=>{s(),dt(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>De("markdown",{ref:t})}},RJ={props:["file","terms","options"],setup(e){let t=St(null),s=()=>tt(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),qp(t.value),_p(t.value)});return fn(s),dt(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let i=e.file||{},o=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(o)||i.language==="Markdown")return De("gist-file",{ref:t},De($p,{content:i.content,terms:e.terms,options:e.options}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},d=(i.language||o||"none").toLowerCase();return De("gist-file",{ref:t},De("pre",{class:"line-numbers"},De("code",{class:"language-"+(r[d]||d),key:i.content},i.content||"")))}}},PJ=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let s=document.createElement("div");s.className="nb-code-scroll",t.replaceWith(s),s.appendChild(t);let i=()=>{let o=t.scrollWidth-t.clientWidth>1;if(s.classList.toggle("is-overflowing",o),s.classList.toggle("is-at-end",o&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!o)return;let r=t.clientWidth-16,d=Math.max(24,r*t.clientWidth/t.scrollWidth);s.style.setProperty("--thumb-w",d+"px"),s.style.setProperty("--thumb-x",(r-d)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),AJ={props:["file","content"],setup(e){let t=St(null),s=0,i,o=async()=>{let r=++s;i?.abort(),i=new AbortController;try{let d=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(p=>{if(!p.ok)throw Error("Notebook request failed");return p.json()});if(await Jn("notebook"),r!==s)return;t.value.innerHTML=_o(DOMPurify.sanitize(nb.parse(d).render())),t.value.querySelectorAll("pre code").forEach(p=>window.Prism?.highlightElement(p)),PJ(t.value)}catch(d){r===s&&d.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return fn(()=>{o(),dt(()=>[e.file,e.content],o)}),is(()=>{s++,i?.abort()}),()=>De("notebook",{ref:t})}},DJ={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),s=t.reduce((i,[,o])=>i+o.code,0);return De("loc",t.map(([i,o])=>De("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},Lp={Markdown:$p,GistFile:RJ,Notebook:AJ,Loc:DJ,HtmlDoc:Tp,QuotaUsage:SJ,Pdfviewer:id(async()=>(await Jn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Op))},Fp={async mounted(e,{value:t}){e._editorValue=t;try{if(await ni(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),Vp(e,s.options),e._editorCleanup=s.options?.onLoad?.(i)}catch(s){e._editorDisposed||(e.textContent=s.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Vp(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Vp(e,t={}){let s=NJ.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+s),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var Up={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],s=new Set,i=new IntersectionObserver(o=>{o.forEach(d=>d.isIntersecting?s.add(d.target.id):s.delete(d.target.id));let r=t.find(d=>s.has(d.hash.slice(1)));r&&t.forEach(d=>d.classList.toggle("active",d===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});tt(()=>{t.forEach(o=>{let r=document.getElementById(o.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(o=>o.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};function Bp(e){let t=[],s=0,i=/\bXXXX-(\d+)\b/g,o;for(;o=i.exec(e);)o.index>s&&t.push(e.slice(s,o.index)),t.push(De("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+o[1]},[De("i",null,o[1])])),s=o.index+o[0].length;return t.length?(s<e.length&&t.push(e.slice(s)),t):e}function TJ(e){let t=Bp(e),s=[];for(let i of Array.isArray(t)?t:[t]){if(typeof i!="string"){s.push(i);continue}let o=i.split(/(?<=[._-])/);o.forEach((r,d)=>{s.push(r),d<o.length-1&&s.push(De("wbr"))})}return s}function OJ(e){if(e<1024)return`${e} B`;let t=["KB","MB","GB"],s=e/1024,i=0;for(;s>=1024&&i<t.length-1;)s/=1024,i++;return`${s.toFixed(1)} ${t[i]}`}function IJ(e){let t={children:[]},s=new Map([["",t]]);function i(o){if(s.has(o))return s.get(o);let r=o.lastIndexOf(
Line truncated
|
|
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
|
|
@vue/shared/dist/shared.esm-bundler.js:
|
|
|
|
|