mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-14 00:07:00 +01:00
fix: preserve paid hosting deadlines, quotas and review snapshots
This commit is contained in:
1 parent
7d7f95506a
commit
036eddfa0e
10 files changed
+116
-27
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"core.min.js": "core.3b07189932.min.js",
|
||||
"vendor.min.js": "vendor.a8c61c4ffb.min.js",
|
||||
"vendor.min.js": "vendor.0d01dc82d9.min.js",
|
||||
"mermaid.min.js": "mermaid.f848a72d16.min.js",
|
||||
"all.min.css": "all.1d7ab8bc01.min.css",
|
||||
"markdown.min.js": "markdown.44f2e93820.min.js",
|
||||
|
||||
@@ -1158,6 +1158,7 @@ export const anonymizeController = function (state, http, html, params, location
|
||||
? "gist:" + parsed.gistId.toLowerCase()
|
||||
: (parsed.owner + "/" + parsed.repo).toLowerCase() + (parsed.pullRequestId ? "/pull/" + parsed.pullRequestId : "");
|
||||
const draft = formDraft(state, ["sourceUrl", "terms", "repoId", "pullRequestId", "gistId", "source", "options", "conference", "githubConnection"], "anonymize:" + (location.path?.() || ""));
|
||||
let restoredCheckoutConference = null;
|
||||
let checkoutDraftId = null;
|
||||
let checkoutDraftSnapshot = null;
|
||||
state.hostingReview = false;
|
||||
@@ -1395,6 +1396,7 @@ export const anonymizeController = function (state, http, html, params, location
|
||||
try {
|
||||
const saved = (await http.get("/api/billing/draft/" + encodeURIComponent(billingDraft))).data;
|
||||
if (saved.path !== location.path()) throw new Error("Wrong task");
|
||||
restoredCheckoutConference = saved.values.conference || null;
|
||||
for (const key of ["sourceUrl", "terms", "repoId", "source", "options", "conference", "githubConnection"]) {
|
||||
if (Object.prototype.hasOwnProperty.call(saved.values, key)) state[key] = saved.values[key];
|
||||
}
|
||||
@@ -1998,7 +2000,9 @@ export const anonymizeController = function (state, http, html, params, location
|
||||
state.conference_data = null;
|
||||
if (!conference) return;
|
||||
const preserveSavedOptions =
|
||||
state.isUpdate && conference === state._originalConference;
|
||||
conference === restoredCheckoutConference ||
|
||||
(state.isUpdate && conference === state._originalConference);
|
||||
if (conference !== restoredCheckoutConference) restoredCheckoutConference = null;
|
||||
http.get("/api/conferences/" + conference).then(
|
||||
(res) => {
|
||||
if (state.conference !== conference) return;
|
||||
|
||||
Vendored
+22
-22
@@ -1,30 +1,30 @@
|
||||
"use strict";(()=>{var ad=Object.defineProperty;var ld=(e,t)=>{for(var s in t)ad(e,s,{get:t[s],enumerable:!0})};var fe=["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 he={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",markdown:"/script/markdown.44f2e93820.min.js",editor:"/script/editor.4f142d3adc.min.js"};var fo=new Map,cd=he;function xt(e){if(!fo.has(e)){let t=document.createElement("script");t.src=cd[e];let s=new Promise((i,o)=>{t.onload=i,t.onerror=()=>{fo.delete(e),t.remove(),o(new Error(`Unable to load ${e}. Please retry.`))}});fo.set(e,s),document.head.appendChild(t)}return fo.get(e)}async function mi(){await xt("editor"),ace.config.set("basePath","/script/external/ace/")}function mn(e){let t=Object.create(null);for(let s of e.split(","))t[s]=1;return s=>s in t}var Pe={},Xt=[],at=()=>{},us=()=>!1,vn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gn=e=>e.startsWith("onUpdate:"),Ge=Object.assign,In=(e,t)=>{let s=e.indexOf(t);s>-1&&e.splice(s,1)},pd=Object.prototype.hasOwnProperty,Re=(e,t)=>pd.call(e,t),ve=Array.isArray,Ut=e=>Vn(e)==="[object Map]",Ft=e=>Vn(e)==="[object Set]",vi=e=>Vn(e)==="[object Date]";var be=e=>typeof e=="function",Be=e=>typeof e=="string",ht=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",cs=e=>(Ae(e)||be(e))&&be(e.then)&&be(e.catch),wi=Object.prototype.toString,Vn=e=>wi.call(e),ps=e=>Vn(e).slice(8,-1),ho=e=>Vn(e)==="[object Object]",mo=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yn=mn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var vo=e=>{let t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},fd=/-\w/g,Je=vo(e=>e.replace(fd,t=>t.slice(1).toUpperCase())),hd=/\B([A-Z])/g,St=vo(e=>e.replace(hd,"-$1").toLowerCase()),en=vo(e=>e.charAt(0).toUpperCase()+e.slice(1)),qn=vo(e=>e?`on${en(e)}`:""),yt=(e,t)=>!Object.is(e,t),bn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},go=(e,t,s,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})},wn=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var gi,Mn=()=>gi||(gi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ve(e){if(ve(e)){let t={};for(let s=0;s<e.length;s++){let i=e[s],o=Be(i)?yd(i):Ve(i);if(o)for(let r in o)t[r]=o[r]}return t}else if(Be(e)||Ae(e))return e}var md=/;(?![^(]*\))/g,vd=/:([^]+)/,gd=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function yd(e){let t={};return e.replace(gd,s=>s.startsWith("/*")?"":s).split(md).forEach(s=>{if(s){let i=s.split(vd);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function A(e){let t="";if(Be(e))t=e;else if(ve(e))for(let s=0;s<e.length;s++){let i=A(e[s]);i&&(t+=i+" ")}else if(Ae(e))for(let s in e)e[s]&&(t+=s+" ");return t.trim()}var ki="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ei=mn(ki),bd=mn(ki+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function yo(e){return!!e||e===""}function wd(e,t,s){if(e.length!==t.length)return!1;let i=!0;for(let o=0;i&&o<e.length;o++)i=Nt(e[o],t[o],s);return i}function yi(e,t,s){if(e.size!==t.size)return!1;let i=Array.from(t),o=new Uint8Array(i.length);for(let r of e){let a=-1;for(let c=0;c<i.length;c++)if(!o[c]&&Nt(r,i[c],s)){a=c;break}if(a<0)return!1;o[a]=1Line truncated
|
||||
`))),e[un]=Yo(o);let r=i||o.props&&o.props.type==="number";dn(e,t?"change":"input",a=>{a.target.composing||e[un](Ws(e.value,s,r))}),(s||r)&&dn(e,"change",()=>{e.value=Ws(e.value,s,r)}),t||(dn(e,"compositionstart",cc),dn(e,"compositionend",xr),dn(e,"change",xr))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[Wo];delete e[Wo],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[un](Ws(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},a){if(e[un]=Yo(a),e.composing)return;let c=(r||e.type==="number")&&!/^0\d/.test(e.value)?wn(e.value):e.value,f=t??"";if(c===f)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===f)||(e.value=f)}};var Jo={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,dn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>s?wn(Qo(f)):Qo(f)),r=e.multiple,a=r?Ft(e._modelValue)?new Set(o):o:o[0],c=e._pendingValue=[r,r?ve(a)?o.slice():o:a];try{e[un](a)}finally{Ye(()=>{e._pendingValue===c&&(e._pendingValue=void 0)})}}),e[un]=Yo(i)},mounted(e,{value:t}){ea(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[un]=Yo(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!pc(t,s[1],s[0]))&&ea(e,t)}};function pc(e,t,s){if(!s)return Nt(e,t);if(ve(e))return Nt(e,t);if(Ft(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function ea(e,t){let s=e.multiple,i=ve(t);if(!(s&&!i&&!Ft(t))){for(let o=0,r=e.options.length;o<r;o++){let a=e.options[o],c=Qo(a);if(s)if(i){let f=typeof c;f==="string"||f==="number"?a.selected=t.some(v=>String(v)===String(c)):a.selected=Ci(t,c)>-1}else a.selected=t.has(c);else if(Nt(Qo(a),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qo(e){return"_value"in e?e._value:e.value}var fc=["ctrl","shift","alt","meta"],hc={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)=>fc.some(s=>e[`${s}Key`]&&!t.includes(s))},ue=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let a=0;a<t.length;a++){let c=hc[t[a]];if(c&&c(o,t))return}return e(o,...r)}))},mc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rn=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=St(o.key);if(t.some(a=>a===r||mc[a]===r))return e(o)}))},vc=Ge({patchProp:lc},Wu),ta;function gc(){return ta||(ta=qr(vc))}var sa=((...e)=>{let t=gc().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=bc(i);if(!o)return;let r=t._component;!be(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let a=s(o,!1,yc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t});function yc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bc(e){return Be(e)?document.querySelector(e):e}var fn=typeof document<"u";function ra(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function wc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&ra(e.default)}var Oe=Object.assign;function Xo(e,t){let s={};for(let i in t){let o=t[i];s[i]=kt(o)?o.map(e):e(o)}return s}var An=()=>{},kt=Array.isArray;function Js(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var aa=/#/g,kc=/&/g,Ec=/\//g,Cc=/=/g,_c=/\?/g,la=/\+/g,Sc=/%5B/g,Nc=/%5D/g,da=/%5E/g,Dc=/%60/g,ua=/%7B/g,Rc=/%7C/g,ca=/%7D/g,Tc=/%20/g;function Xs(e){return e==null?"":encodeURI(""+e).replace(Rc,"|").replace(Sc,"[").replace(Nc,"]")}function pa(e){return Xs(e).replace(ua,"{").replace(ca,"}").replace(da,"^")}function Ys(e){return Xs(e).replace(la,"%2B").replace(Tc,"+").replace(aa,"%23").replace(kc,"%26").replace(Dc,"`").replace(ua,"{").replace(ca,"}").replace(da,"^")}function Ac(e){return Ys(e).replace(Cc,"%3D")}function Oc(e){return Xs(e).replace(aa,"%23").replace(_c,"%3F")}function fa(e){return Oc(e).replace(Ec,"%2F")}function Tn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Pc=/\/$/,Ic=e=>e.replace(Pc,"");function Zo(e,t,s="/"){let i,o={},r="",a="",c=t.indexOf("#"),f=t.indexOf("?");return f=c>=0&&f>c?-1:f,f>=0&&(i=t.slice(0,f),r=t.slice(f,c>0?c:t.length),o=e(r.slice(1))),c>=0&&(i=i||t.slice(0,c),a=t.slice(c,t.length)),i=qc(i??t,s),{fullPath:i+r+a,path:i,query:o,hash:Tn(a)}}function ha(e,t){let s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function Zs(e,t){return!t||!e.toLowerCase().sLine truncated
|
||||
"use strict";(()=>{var ad=Object.defineProperty;var ld=(e,t)=>{for(var s in t)ad(e,s,{get:t[s],enumerable:!0})};var fe=["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 he={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",markdown:"/script/markdown.44f2e93820.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};var fo=new Map,cd=he;function xt(e){if(!fo.has(e)){let t=document.createElement("script");t.src=cd[e];let s=new Promise((i,o)=>{t.onload=i,t.onerror=()=>{fo.delete(e),t.remove(),o(new Error(`Unable to load ${e}. Please retry.`))}});fo.set(e,s),document.head.appendChild(t)}return fo.get(e)}async function mi(){await xt("editor"),ace.config.set("basePath","/script/external/ace/")}function mn(e){let t=Object.create(null);for(let s of e.split(","))t[s]=1;return s=>s in t}var qe={},Xt=[],at=()=>{},us=()=>!1,vn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gn=e=>e.startsWith("onUpdate:"),Ge=Object.assign,In=(e,t)=>{let s=e.indexOf(t);s>-1&&e.splice(s,1)},pd=Object.prototype.hasOwnProperty,De=(e,t)=>pd.call(e,t),ge=Array.isArray,Ut=e=>Vn(e)==="[object Map]",Ft=e=>Vn(e)==="[object Set]",vi=e=>Vn(e)==="[object Date]";var be=e=>typeof e=="function",Be=e=>typeof e=="string",ht=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",cs=e=>(Te(e)||be(e))&&be(e.then)&&be(e.catch),wi=Object.prototype.toString,Vn=e=>wi.call(e),ps=e=>Vn(e).slice(8,-1),ho=e=>Vn(e)==="[object Object]",mo=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yn=mn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var vo=e=>{let t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},fd=/-\w/g,Je=vo(e=>e.replace(fd,t=>t.slice(1).toUpperCase())),hd=/\B([A-Z])/g,St=vo(e=>e.replace(hd,"-$1").toLowerCase()),en=vo(e=>e.charAt(0).toUpperCase()+e.slice(1)),qn=vo(e=>e?`on${en(e)}`:""),yt=(e,t)=>!Object.is(e,t),bn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},go=(e,t,s,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})},wn=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var gi,Mn=()=>gi||(gi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $e(e){if(ge(e)){let t={};for(let s=0;s<e.length;s++){let i=e[s],o=Be(i)?yd(i):$e(i);if(o)for(let r in o)t[r]=o[r]}return t}else if(Be(e)||Te(e))return e}var md=/;(?![^(]*\))/g,vd=/:([^]+)/,gd=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function yd(e){let t={};return e.replace(gd,s=>s.startsWith("/*")?"":s).split(md).forEach(s=>{if(s){let i=s.split(vd);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function A(e){let t="";if(Be(e))t=e;else if(ge(e))for(let s=0;s<e.length;s++){let i=A(e[s]);i&&(t+=i+" ")}else if(Te(e))for(let s in e)e[s]&&(t+=s+" ");return t.trim()}var ki="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ei=mn(ki),bd=mn(ki+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function yo(e){return!!e||e===""}function wd(e,t,s){if(e.length!==t.length)return!1;let i=!0;for(let o=0;i&&o<e.length;o++)i=Nt(e[o],t[o],s);return i}function yi(e,t,s){if(e.size!==t.size)return!1;let i=Array.from(t),o=new Uint8Array(i.length);for(let r of e){let a=-1;for(let c=0;c<i.length;c++)if(!o[c]&&Nt(r,i[c],s)){a=c;break}if(a<0)return!1;o[a]=1Line truncated
|
||||
`))),e[un]=Yo(o);let r=i||o.props&&o.props.type==="number";dn(e,t?"change":"input",a=>{a.target.composing||e[un](Ws(e.value,s,r))}),(s||r)&&dn(e,"change",()=>{e.value=Ws(e.value,s,r)}),t||(dn(e,"compositionstart",cc),dn(e,"compositionend",xr),dn(e,"change",xr))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[Wo];delete e[Wo],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[un](Ws(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},a){if(e[un]=Yo(a),e.composing)return;let c=(r||e.type==="number")&&!/^0\d/.test(e.value)?wn(e.value):e.value,h=t??"";if(c===h)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===h)||(e.value=h)}};var Jo={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,dn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>s?wn(Qo(h)):Qo(h)),r=e.multiple,a=r?Ft(e._modelValue)?new Set(o):o:o[0],c=e._pendingValue=[r,r?ge(a)?o.slice():o:a];try{e[un](a)}finally{Ye(()=>{e._pendingValue===c&&(e._pendingValue=void 0)})}}),e[un]=Yo(i)},mounted(e,{value:t}){ea(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[un]=Yo(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!pc(t,s[1],s[0]))&&ea(e,t)}};function pc(e,t,s){if(!s)return Nt(e,t);if(ge(e))return Nt(e,t);if(Ft(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function ea(e,t){let s=e.multiple,i=ge(t);if(!(s&&!i&&!Ft(t))){for(let o=0,r=e.options.length;o<r;o++){let a=e.options[o],c=Qo(a);if(s)if(i){let h=typeof c;h==="string"||h==="number"?a.selected=t.some(v=>String(v)===String(c)):a.selected=Ci(t,c)>-1}else a.selected=t.has(c);else if(Nt(Qo(a),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qo(e){return"_value"in e?e._value:e.value}var fc=["ctrl","shift","alt","meta"],hc={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)=>fc.some(s=>e[`${s}Key`]&&!t.includes(s))},ce=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let a=0;a<t.length;a++){let c=hc[t[a]];if(c&&c(o,t))return}return e(o,...r)}))},mc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rn=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=St(o.key);if(t.some(a=>a===r||mc[a]===r))return e(o)}))},vc=Ge({patchProp:lc},Wu),ta;function gc(){return ta||(ta=qr(vc))}var sa=((...e)=>{let t=gc().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=bc(i);if(!o)return;let r=t._component;!be(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let a=s(o,!1,yc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t});function yc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bc(e){return Be(e)?document.querySelector(e):e}var fn=typeof document<"u";function ra(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function wc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&ra(e.default)}var Pe=Object.assign;function Xo(e,t){let s={};for(let i in t){let o=t[i];s[i]=kt(o)?o.map(e):e(o)}return s}var An=()=>{},kt=Array.isArray;function Js(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var aa=/#/g,kc=/&/g,Ec=/\//g,Cc=/=/g,_c=/\?/g,la=/\+/g,Sc=/%5B/g,Nc=/%5D/g,da=/%5E/g,Dc=/%60/g,ua=/%7B/g,Rc=/%7C/g,ca=/%7D/g,Tc=/%20/g;function Xs(e){return e==null?"":encodeURI(""+e).replace(Rc,"|").replace(Sc,"[").replace(Nc,"]")}function pa(e){return Xs(e).replace(ua,"{").replace(ca,"}").replace(da,"^")}function Ys(e){return Xs(e).replace(la,"%2B").replace(Tc,"+").replace(aa,"%23").replace(kc,"%26").replace(Dc,"`").replace(ua,"{").replace(ca,"}").replace(da,"^")}function Ac(e){return Ys(e).replace(Cc,"%3D")}function Oc(e){return Xs(e).replace(aa,"%23").replace(_c,"%3F")}function fa(e){return Oc(e).replace(Ec,"%2F")}function Tn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Pc=/\/$/,Ic=e=>e.replace(Pc,"");function Zo(e,t,s="/"){let i,o={},r="",a="",c=t.indexOf("#"),h=t.indexOf("?");return h=c>=0&&h>c?-1:h,h>=0&&(i=t.slice(0,h),r=t.slice(h,c>0?c:t.length),o=e(r.slice(1))),c>=0&&(i=i||t.slice(0,c),a=t.slice(c,t.length)),i=qc(i??t,s),{fullPath:i+r+a,path:i,query:o,hash:Tn(a)}}function ha(e,t){let s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function Zs(e,t){return!t||!e.toLowerCase().sLine truncated
|
||||
${JSON.stringify(e)}${t?`
|
||||
while being at
|
||||
`+JSON.stringify(t):""}`},[je.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Fc(t)}" via a navigation guard.`},[je.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[je.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[je.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function pn(e,t){return Oe(new Error,{type:e,[ka]:!0},t)}function Lt(e,t){return e instanceof Error&&ka in e&&(t==null||!!(e.type&t))}var Uc=["params","query","hash"];function Fc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Uc)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Ea(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(la," "),r=o.indexOf("="),a=Tn(r<0?o:o.slice(0,r)),c=r<0?null:Tn(o.slice(r+1));if(a in t){let f=t[a];kt(f)||(f=t[a]=[f]),f.push(c)}else t[a]=c}return t}function ni(e){let t="";for(let s in e){let i=e[s];if(s=Ac(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(kt(i)?i.map(o=>o&&Ys(o)):[i&&Ys(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function Ca(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=kt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var _a=Symbol(""),oi=Symbol(""),ts=Symbol(""),ns=Symbol(""),os=Symbol("");function On(){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 Yt(e,t,s,i,o,r=a=>a()){let a=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((c,f)=>{let v=m=>{m===!1?f(pn(je.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?f(m):Lc(m)?f(pn(je.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&i.enterCallbacks[o]===a&&typeof m=="function"&&a.push(m),c())},g=r(()=>e.call(i&&i.instances[o],t,s,v)),k=Promise.resolve(g);e.length<3&&(k=k.then(v)),k.catch(m=>f(m))})}function ss(e,t,s,i,o=r=>r()){let r=[];for(let a of e)for(let c in a.components){let f=a.components[c];if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(ra(f)){let v=(f.__vccOpts||f)[t];v&&r.push(Yt(v,s,i,a,c,o))}else{let v=f();r.push(()=>v.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${c}" at "${a.path}"`);let k=wc(g)?g.default:g;a.mods[c]=g,a.components[c]=k;let m=(k.__vccOpts||k)[t];return m&&Yt(m,s,i,a,c,o)()}))}}return r}function Sa(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){let c=t.matched[a];c&&(e.matched.find(v=>cn(v,c))?i.push(c):s.push(c));let f=e.matched[a];f&&(t.matched.find(v=>cn(v,f))||o.push(f))}return[s,i,o]}var Bc=()=>location.protocol+"//"+location.host;function Ma(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let a=o.includes(e.slice(r))?e.slice(r).length:1,c=o.slice(a);return c[0]!=="/"&&(c="/"+c),Zs(c,"")}return Zs(s,e)+i+o}function zc(e,t,s,i){let o=[],r=[],a=null,c=({state:m})=>{let b=Ma(e,location),C=s.value,E=t.value,T=0;if(m){if(s.value=b,t.value=m,a&&a===C){a=null;return}T=E?m.position-E.position:0}else i(b);o.forEach(D=>{D(s.value,C,{delta:T,type:xo.pop,direction:T?T>0?es.forward:es.back:es.unknown})})};function f(){a=s.value}function v(m){o.push(m);let b=()=>{let C=o.indexOf(m);C>-1&&o.splice(C,1)};return r.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Oe({},m.state,{scroll:po()}),"")}}function k(){for(let m of r)m();r=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:f,listen:v,destroy:k}}function Na(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?po():null}}function Hc(e){let{history:t,location:s}=window,i={value:Ma(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(f,v,g){let k=e.indexOf("#"),m=k>-1?(s.host&&document.querySelector("base")?e:e.slice(k))+f:Bc()+e+f;try{t[g?"replaceState":"pushState"](v,"",m),o.value=v}catch(b){console.error(b),s[g?"replace":"assign"](m)}}function a(f,v){r(f,Oe({},t.state,Na(o.value.back,f,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=f}function c(f,v){let g=Oe({},o.value,t.state,{forward:f,scroll:po()});r(g.current,g,!0),r(f,Oe({},Na(i.value,f,null),{position:g.position+1},v),!1),i.value=f}return{location:i,state:o,push:c,replace:a}}function $a(e){e=va(e);let t=Hc(e),s=zc(e,t.state,t.location,t.replace);function i(r,a=!0){a||s.pauseListeners(),history.go(r)}let o=Oe({locatLine truncated
|
||||
`)),e.options=Object.assign({},e.options,v.options),r.restore()})}a();let c=null;e.saveDefault=f=>{if(f&&f.preventDefault&&f.preventDefault(),e.saving)return;let v=r.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(()=>{r.accept(v),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",c&&i.cancel(c),c=i(()=>{e.message=null},2500)},k=>{e.saving=!1;let b="ERRORS."+(k&&k.data&&k.data.error);s(b).then(C=>{e.error=C&&C!==b?C:"Unable to save your defaults. Please try again."},()=>{e.error="Unable to save your defaults. Please try again."})})},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."}))}},Wa=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)})}},Ka=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(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,f){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[c.key];if(v===void 0)return;c.preventDefault();let g=e.features.length,k=v==="first"?0:v==="last"?g-1:(f+v+g)%g;e.feature=e.features[k].key,o(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.focus()})},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"}];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})}r();function a(c){let f={series:c,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!c||c.length<2)return f;let v=new Array(c.length-1);for(let E=1;E<c.length;E++)v[E-1]=c[E]-c[E-1];let g=v.length,k=Math.max.apply(null,v),m=Math.min.apply(null,v),b=Math.min(0,m),C=k-b||1;f.viewW=g*2,f.bars=new Array(g);for(let E=0;E<g;E++){let T=(v[E]-b)/C,D=Math.max(1.5,T*34);f.bars[E]={x:(E*2+.25).toFixed(2),y:(36-D).toFixed(2),w:"1.5",h:D.toFixed(2)}}if(f.deltaToday=v[g-1],g>=2){let E=v[g-2];E&&(f.pctChange=(f.deltaToday-E)/E*100)}return f.pctAbs=Math.round(Math.abs(f.pctChange)),f.isUp=f.pctChange>=0,f}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(c=>{let f=c.data||[];e.history={repositories:a(f.map(v=>v.nbRepositories||0)),users:a(f.map(v=>v.nbUsers||0)),pageViews:a(f.map(v=>v.nbPageViews||0)),pullRequests:a(f.map(v=>v.nbPullRequests||0))}})},Ya=function(e,t,s,i,o,r){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,Ye(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Jt()(document,"click",S=>{e.quotaExpanded&&!S.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.p
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,w.options),e.options.expirationDate=w.options&&w.options.expirationDate?new Date(w.options.expirationDate):M(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),_&&_()})}function S(_,h,w){e.anonymize&&e.anonymize[_]&&e.anonymize[_].setValidity(h,w)}function I(_){try{let h=parseGithubUrl(_);if(h&&h.owner&&h.repo)return h.owner+"/"+h.repo}catch{}return null}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 Y()}catch{}}};function H(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:I(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function K(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function X(){let _=new URLSearchParams(window.location.search).get("billingDraft");if(_){T.restore();try{let w=(await t.get("/api/billing/draft/"+encodeURIComponent(_))).data;if(w.path!==o.path())throw new Error("Wrong task");for(let R of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(w.values,R)&&(e[R]=w.values[R]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),D=w.id,O=JSON.stringify(T.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await K(),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 h;try{h=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!h||h.path!==o.path()||Date.now()-h.savedAt>=30*6e4)return T.restore()?(e.sourceUrl&&await K(),!0):!1;T.restore();for(let w of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(h.draft,w)&&(e[w]=h.draft[w]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await K(),sessionStorage.removeItem("github-access-draft"),!0}oe(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&a(X,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async _=>{e.githubConnection=_.data.connection||"oauth",e.sourceUrl="https://github.com/"+_.data.source.fullName,e._originalFullName=_.data.source.fullName,e.terms=_.data.options.terms.filter(h=>h).join(`
|
||||
`),e.source=_.data.source,e.role=_.data.role||"owner",e._existingNever=_.data.options.expirationMode==="never",e.coauthors=_.data.coauthors||[],e._originalBranch=_.data.source.branch,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,e.repositoryID=_.data.source.repositoryID,e._originalRepositoryID=_.data.source.repositoryID,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await X()&&(await Promise.all([Y(),ee()]),Se())},()=>{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 _=>{if(e.githubConnection=_.data.connection||"oauth",e.sourceUrl="https://github.com/"+_.data.source.repositoryFullName+"/pull/"+_.data.source.pullRequestId,e.terms=_.data.options.terms.filter(h=>h).join(`
|
||||
`),e.source=_.data.source,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await X())try{await $e()}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 _=>{e.sourceUrl="https://gist.github.com/"+_.data.source.gistId,e.terms=_.data.options.terms.filter(h=>h).join(`
|
||||
`),e.source=_.data.source,e.options=Object.assign({},e.options,_.data.options),e.conference=_.data.conference,e._originalConference=_.data.conference,_.data.options.expirationDate&&(e.options.expirationDate=new Date(_.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await X()&&await Le()},()=>{o.url("/404")}))}),t.get("/github/connections").then(_=>{e.githubConnections=_.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&_.data.appEnabled&&_.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&K())}).catch(()=>{}),e.urlSelected=async(_=!1)=>{let h=++f,w;try{w=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,re.cancel(),Ee.cancel(),U.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",S("sourceUrl","github",!1);return}let R=E(w),P=_||C===R;C=R,e.sourceUrlError="",S("sourceUrl","github",!0);let L=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,L&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!P&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],P||(e.source={type:"GitHubStream",branch:"",commit:""}),re.cancel(),Ee.cancel(),U.cancel(),Ne.clear(),qe.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=P;try{w.gistId&&!w.repo?(e.detectedType="gist",e.source={gistId:w.gistId},await Le()):w.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:w.owner+"/"+w.repo,pullRequestId:w.pullRequestId},await $e()):(e.detectedType="repo",await Promise.all([Y(),ee()]),Se())}catch{}finally{h===f&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let _=e.branches.filter(w=>w.name==e.source.branch)[0];if(!_)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=_.commit),e.readme=_.readme,await ee(),Se()}),e.getBranches=async _=>{let h=parseGithubUrl(e.sourceUrl),w=m();try{let R=await t.get(`/api/repo/${h.owner}/${h.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&I(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:_===!0||e.reconnectingSource?"1":"0",repositoryID:H()}});if(!k(w))return;e.branches=R.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let P=e.branches.filter(L=>L.name==e.source.branch);P.length>0&&(!(!e.reconnectingSource&&!_&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=P[0].commit),e.readme=P[0].readme,await ee(_))}catch(R){if(!k(w))return;e.branches=[],e.sourceUnreachable=R&&(R.status===404||R.data&&R.data.error==="repo_not_found");let P=R&&R.data&&R.data.error||(R&&R.status===404?"repo_not_found":"unknown_error");r("ERRORS."+P).then(L=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:L}),e.error=L},console.error),typeof S=="function"&&S("sourceUrl","missing",!1)}finally{b(w)}};async function Y(){let _=parseGithubUrl(e.sourceUrl),h=m();try{ie();let w=await t.get(`/api/repo/${_.owner}/${_.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&I(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:H(),force:"1"}});if(!k(h))return;e.details=w.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(w){if(!k(h))return;throw w.data&&(r("ERRORS."+w.data.error).then(R=>{e.addToast({title:"Error",date:new Date,body:R}),e.error=R},console.error),Ce(w.data.error)),S("sourceUrl","missing",!1),w}finally{b(h)}}async function ee(_){if(e.readme&&!_)return e.readme;let h=parseGithubUrl(e.sourceUrl),w=m();try{let R=await t.get(`/api/repo/${h.owner}/${h.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&I(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:_===!0?"1":"0",branch:e.source.branch,repositoryID:H()}});k(w,!0)&&(e.readme=R.data)}catch{k(w,!0)&&(e.readme="")}finally{b(w)}}function ce(){let _={terms:e.terms?e.terms.split(`
|
||||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(_.branchName=e.source.branch);try{let h=parseGithubUrl(e.sourceUrl);_.repoName=`${h.owner}/${h.repo}`}catch{}return _}function le(_,h,w){let R=null,P=0,L=()=>{if(e.detectedType!==_)return;R&&a.cancel(R);let V=++P;e.previewStatus="loading",R=a(()=>{R=null;let B=h();if(!B){e.previewStatus="idle";return}t.post("/api/anonymize-preview",B).then(Q=>{V===P&&(w(Q.data,B),e.previewStatus="ready")}).catch(()=>{V===P&&(e.previewStatus="error")})},200)};return L.cancel=()=>{P++,R&&a.cancel(R),R=null},e.on("dispose",L.cancel),L}e.retryPreview=()=>{e.detectedType==="repo"&&re(),e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&U()};let re=le("repo",()=>e.readme?{content:e.readme,options:ce()}:null,_=>{if(typeof _?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=_.content;let h="";try{let R=parseGithubUrl(e.sourceUrl),P=e.source.branch||e.details&&e.details.defaultBranch||"main";h=`https://github.com/${R.owner}/${R.repo}/raw/${P}/`}catch{}let w=renderMD(e.anonymize_readme,h);e.html_readme=w,a(Prism.highlightAll,150)});function Se(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),re())}async function $e(){let _=parseGithubUrl(e.sourceUrl),h=m();try{ie();let w=await t.get(`/api/pr/${_.owner}/${_.repo}/${_.pullRequestId}`,{params:{connection:e.githubConnection}});if(!k(h))return;e.details=w.data,e.pullRequestId||(e.pullRequestId=_.repo+"-PR"+_.pullRequestId+"-"+generateRandomId(4))}catch(w){if(!k(h))return;throw w.data&&(r("ERRORS."+w.data.error).then(R=>{e.addToast({title:"Error",date:new Date,body:R}),e.error=R},console.error),Ce(w.data.error)),S("sourceUrl","missing",!1),w}finally{b(h)}}let Ne=ze(new Map);function ke(){let _=new Set,h=e.details&&e.details.pullRequest;if(!h)return _;typeof h.title=="string"&&_.add(h.title),typeof h.body=="string"&&_.add(h.body),typeof h.diff=="string"&&_.add(h.diff);let w=h.comments||[];for(let R of w)typeof R.author=="string"&&_.add(R.author),typeof R.body=="string"&&_.add(R.body);return _}let Ee=le("pr",()=>{let _=ke(),h=Array.from(_);return h.length===0?null:{contents:h,options:ce()}},(_,h)=>{if(!Array.isArray(_?.contents)||_.contents.length!==h.contents.length||_.contents.some(P=>typeof P!="string"))throw Error("Invalid preview response");let w=h.contents,R=new Map;for(let P=0;P<w.length&&P<_.contents.length;P++)R.set(w[P],_.contents[P]);Ne.clear(),R.forEach((P,L)=>Ne.set(L,P))});e.anonymizePrContent=function(_){return _&&(Ne.has(_)?Ne.get(_):"")};async function Le(){let _=parseGithubUrl(e.sourceUrl),h=m();try{ie(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let w=await t.get(`/api/gist/source/${_.gistId}`);if(!k(h))return;e.details=w.data,e.gistId||(e.gistId="gist-"+_.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(w){if(!k(h))return;if(w.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,S("sourceUrl","missing",!1);return}if(w.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,S("sourceUrl","missing",!1);return}throw w.data&&(r("ERRORS."+w.data.error).then(R=>{e.addToast({title:"Error",date:new Date,body:R}),e.error=R},console.error),Ce(w.data.error)),S("sourceUrl","missing",!1),w}finally{b(h)}}let qe=ze(new Map);function Ue(){let _=new Set,h=e.details&&e.details.gist;if(!h)return _;typeof h.description=="string"&&_.add(h.description),typeof h.ownerLogin=="string"&&_.add(h.ownerLogin);let w=h.files||[];for(let P of w)typeof P.filename=="string"&&_.add(P.filename),typeof P.content=="string"&&_.add(P.content);let R=h.comments||[];for(let P of R)typeof P.author=="string"&&_.add(P.author),typeof P.body=="string"&&_.add(P.body);return _}let U=le("gist",()=>{let _=Ue(),h=Array.from(_);return h.length===0?null:{contents:h,options:ce()}},(_,h)=>{if(!Array.isArray(_?.contents)||_.contents.length!==h.contents.length||_.contents.some(P=>typeof P!="string"))throw Error("Invalid preview response");let w=h.contents,R=new Map;for(let P=0;P<w.length&&P<_.contents.length;P++)R.set(w[P],_.contents[P]);qe.clear(),R.forEach((P,L)=>qe.set(L,P)),ne()});e.anonymizeGistContent=function(_){return _&&(qe.has(_)?qe.get(_):"")},e.previewGistFiles=[];function ne(){let _=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=_.map(h=>({filename:e.anonymizeGistContent(h.filename),content:e.anonymizeGistContent(h.content),language:h.language}))}e.watch("details.gist.files",ne,!0),e.watch("terms",ne);function x(){let _=e.conference;if(e.conference_data=null,!_)return;let h=e.isUpdate&&_===e._originalConference;t.get("/api/conferences/"+_).then(w=>{e.conference===_&&(e.conference_data=w.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!h&&(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.
Line truncated
|
||||
`).filter(L=>L),connection:e.githubConnection,fullName:`${w.owner}/${w.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(R.options.pageSource=e.details.pageSource),ie();let P=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(P,R,{headers:{"Content-Type":"application/json"}}).then(()=>{T.clear(),window.location.href="/status/"+e.repoId},L=>{L.data&&(r("ERRORS."+L.data.error).then(V=>{e.error=V},console.error),Ce(L.data.error),["quota_exceeded","subscription_required_for_never_expiration"].includes(L.data.error)&&(L.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Ye(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}))))}).finally(()=>{h.disabled=!1})},e.anonymizeGist=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ge())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let h=_.currentTarget||_.target.closest?.("button")||_.target;h.disabled=!0;let w=parseGithubUrl(e.sourceUrl),R={gistId:e.gistId,terms:e.terms.trim().split(`
|
||||
`).filter(L=>L),source:{gistId:w.gistId},options:e.options,conference:e.conference};ie();let P=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(P,R,{headers:{"Content-Type":"application/json"}}).then(()=>{T.clear(),window.location.href="/gist/"+e.gistId},L=>{L.data&&(r("ERRORS."+L.data.error).then(V=>{e.error=V},console.error),Ce(L.data.error))}).finally(()=>{h.disabled=!1})},e.anonymizePullRequest=_=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ge())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let h=_.currentTarget||_.target.closest?.("button")||_.target;h.disabled=!0;let w=parseGithubUrl(e.sourceUrl),R={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
||||
`).filter(L=>L),source:{repositoryFullName:`${w.owner}/${w.repo}`,pullRequestId:w.pullRequestId},options:e.options,conference:e.conference};ie();let P=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(P,R,{headers:{"Content-Type":"application/json"}}).then(()=>{T.clear(),window.location.href="/pr/"+e.pullRequestId},L=>{L.data&&(r("ERRORS."+L.data.error).then(V=>{e.error=V},console.error),Ce(L.data.error))}).finally(()=>{h.disabled=!1})},e.watch("conference",()=>{x()}),e.watch("terms",()=>{e.detectedType==="repo"&&Se(),e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&U()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Se(),e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&U()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Se(),e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&U()}),e.watch("details",()=>{e.detectedType==="pr"&&Ee(),e.detectedType==="gist"&&U()},!0)},li=function(e,t,s,i,o,r){let a=ct(),c=Jt();e.on("dark-mode",(I,H)=>{e.aceOption&&(H?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,v=!1;e.on("dispose",()=>{v=!0,f++,g&&g.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,c(document,"keydown",function(I){if((I.metaKey||I.ctrlKey)&&I.key==="k"){I.preventDefault();var H=document.querySelector(".tree-search-input");H&&(H.focus(),H.select())}});var g=null;e.onFileSearchChange=function(){g&&(g.resolve(),g=null);let I=e.fileSearchQuery;if(!I||I.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let H=r.defer();g=H,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(I)}`,{timeout:H.promise}).then(function(K){if(!(v||g!==H)){g=null,e.fileSearchLoading=!1;var X={};e.files.forEach(function(U){X[(U.path||"")+"/"+U.name]=!0});for(var Y=[],ee={},ce=0;ce<K.data.length;ce++){var le=K.data[ce];if(le.path)for(var re=le.path.split("/"),Se="",$e=0;$e<re.length;$e++){var Ne=Se;Se=Se?Se+"/"+re[$e]:re[$e];var ke=Ne+"/"+re[$e];!X[ke]&&!ee[ke]&&(ee[ke]=!0,Y.push({name:re[$e],path:Ne}))}}Y.sort(function(U,ne){return(U.path||"").split("/").length-(ne.path||"").split("/").length}),Y.length>0&&e.files.push.apply(e.files,Y);for(var Ee=[],Le=0;Le<K.data.length;Le++){var qe=K.data[Le],Ue=(qe.path||"")+"/"+qe.name;!X[Ue]&&qe.size!=null&&(Ee.push(qe),X[Ue]=!0)}Ee.length>0&&e.files.push.apply(e.files,Ee),e.fileSearchResults=K.data}},function(){!v&&g===H&&(g=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let k={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},m=["license","txt"],b=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],C=["wav","mp3","ogg","wma","flac","aac","m4a"],E=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(I,H){if(e.repoId!=i.repoId)return S();if((i.path||"")!=e.filePath){e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(K=>K&&K.trim().length>0),oe();for(let K=0;K<e.paths.length-1;K++){let X=K>0?e.paths.slice(0,K).join("/"):"";e.files.some(ee=>ee.path===X)||e.getFiles(X)}}});function T(){if(e.paths[0]!="")return;let I=["readme.md","readme.txt","readme.org","readme.1st","readme"],H={};for(let X of e.files)X.name.toLowerCase().indexOf("readme")>-1&&(H[X.name.toLowerCase()]=X.name);let K=null;for(let X of I)if(H[X]){K=X;break}if(!K&&Object.keys(H).length>0&&(K=Object.keys(H)[0]),K){let X=s.url();X[X.length-1]!="/"&&(X+="/"),s.url(X+encodePathForUrl(H[K]))}}e.fileCounts=null,e.getFiles=function(I){let H=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(I)}&v=${e.options.lastUpdateDate}`).then(function(K){if(v||H!==e.repoId)return[];let X=I||"";return e.files=e.files.filter(Y=>Y.path!==X),e.files.push(...K.data),K.data},function(K){if(v||H!==e.repoId)return[];e.type="error",e.content=K&&K.data&&K.data.error||"unknown_error",e.files=[]})};function D(){let I=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(H){v||I!==e.repoId||(e.fileCounts=H.data)},function(){e.fileCounts={}})}function O(){return e.files.filter(I=>I.name==e.paths[e.paths.length-1]&&I.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var q=null;e.on("dispose",function(){q&&a.interval.cancel(q)});function F(I){if(v)return;let H=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(K=>{if(!(v||H!==e.repoId)){if(e.options=K.data,e.options.url){window.location=e.options.url;return}I&&I(K.data)}},K=>{if(!(v||H!==e.repoId)){var X=K.data||{};if(X.error==="rate_limited"&&X.resetAt){let ee=function(){var ce=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ce<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,q&&(a.interval.cancel(q),q=null),F(I);else{var le=Math.floor(ce/60),re=ce%60;e.rateLimitCountdown=le>0?le+"m "+re+"s":re+"s"}};var Y=ee;e.type="rate_limited",e.rateLimitResetAt=X.resetAt,q&&a.interval.cancel(q),ee(),q=a.interval(ee,1e3
Line truncated
|
||||
`+JSON.stringify(t):""}`},[je.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Fc(t)}" via a navigation guard.`},[je.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[je.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[je.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function pn(e,t){return Pe(new Error,{type:e,[ka]:!0},t)}function Lt(e,t){return e instanceof Error&&ka in e&&(t==null||!!(e.type&t))}var Uc=["params","query","hash"];function Fc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Uc)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Ea(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(la," "),r=o.indexOf("="),a=Tn(r<0?o:o.slice(0,r)),c=r<0?null:Tn(o.slice(r+1));if(a in t){let h=t[a];kt(h)||(h=t[a]=[h]),h.push(c)}else t[a]=c}return t}function ni(e){let t="";for(let s in e){let i=e[s];if(s=Ac(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(kt(i)?i.map(o=>o&&Ys(o)):[i&&Ys(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function Ca(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=kt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var _a=Symbol(""),oi=Symbol(""),ts=Symbol(""),ns=Symbol(""),os=Symbol("");function On(){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 Yt(e,t,s,i,o,r=a=>a()){let a=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((c,h)=>{let v=m=>{m===!1?h(pn(je.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?h(m):Lc(m)?h(pn(je.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&i.enterCallbacks[o]===a&&typeof m=="function"&&a.push(m),c())},g=r(()=>e.call(i&&i.instances[o],t,s,v)),k=Promise.resolve(g);e.length<3&&(k=k.then(v)),k.catch(m=>h(m))})}function ss(e,t,s,i,o=r=>r()){let r=[];for(let a of e)for(let c in a.components){let h=a.components[c];if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(ra(h)){let v=(h.__vccOpts||h)[t];v&&r.push(Yt(v,s,i,a,c,o))}else{let v=h();r.push(()=>v.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${c}" at "${a.path}"`);let k=wc(g)?g.default:g;a.mods[c]=g,a.components[c]=k;let m=(k.__vccOpts||k)[t];return m&&Yt(m,s,i,a,c,o)()}))}}return r}function Sa(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){let c=t.matched[a];c&&(e.matched.find(v=>cn(v,c))?i.push(c):s.push(c));let h=e.matched[a];h&&(t.matched.find(v=>cn(v,h))||o.push(h))}return[s,i,o]}var Bc=()=>location.protocol+"//"+location.host;function Ma(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let a=o.includes(e.slice(r))?e.slice(r).length:1,c=o.slice(a);return c[0]!=="/"&&(c="/"+c),Zs(c,"")}return Zs(s,e)+i+o}function zc(e,t,s,i){let o=[],r=[],a=null,c=({state:m})=>{let b=Ma(e,location),C=s.value,E=t.value,R=0;if(m){if(s.value=b,t.value=m,a&&a===C){a=null;return}R=E?m.position-E.position:0}else i(b);o.forEach(D=>{D(s.value,C,{delta:R,type:xo.pop,direction:R?R>0?es.forward:es.back:es.unknown})})};function h(){a=s.value}function v(m){o.push(m);let b=()=>{let C=o.indexOf(m);C>-1&&o.splice(C,1)};return r.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Pe({},m.state,{scroll:po()}),"")}}function k(){for(let m of r)m();r=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:h,listen:v,destroy:k}}function Na(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?po():null}}function Hc(e){let{history:t,location:s}=window,i={value:Ma(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(h,v,g){let k=e.indexOf("#"),m=k>-1?(s.host&&document.querySelector("base")?e:e.slice(k))+h:Bc()+e+h;try{t[g?"replaceState":"pushState"](v,"",m),o.value=v}catch(b){console.error(b),s[g?"replace":"assign"](m)}}function a(h,v){r(h,Pe({},t.state,Na(o.value.back,h,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=h}function c(h,v){let g=Pe({},o.value,t.state,{forward:h,scroll:po()});r(g.current,g,!0),r(h,Pe({},Na(i.value,h,null),{position:g.position+1},v),!1),i.value=h}return{location:i,state:o,push:c,replace:a}}function $a(e){e=va(e);let t=Hc(e),s=zc(e,t.state,t.location,t.replace);function i(r,a=!0){a||s.pauseListeners(),history.go(r)}let o=Pe({locatLine truncated
|
||||
`)),e.options=Object.assign({},e.options,v.options),r.restore()})}a();let c=null;e.saveDefault=h=>{if(h&&h.preventDefault&&h.preventDefault(),e.saving)return;let v=r.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(()=>{r.accept(v),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",c&&i.cancel(c),c=i(()=>{e.message=null},2500)},k=>{e.saving=!1;let b="ERRORS."+(k&&k.data&&k.data.error);s(b).then(C=>{e.error=C&&C!==b?C:"Unable to save your defaults. Please try again."},()=>{e.error="Unable to save your defaults. Please try again."})})},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."}))}},Wa=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)})}},Ka=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(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,h){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[c.key];if(v===void 0)return;c.preventDefault();let g=e.features.length,k=v==="first"?0:v==="last"?g-1:(h+v+g)%g;e.feature=e.features[k].key,o(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.focus()})},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"}];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})}r();function a(c){let h={series:c,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!c||c.length<2)return h;let v=new Array(c.length-1);for(let E=1;E<c.length;E++)v[E-1]=c[E]-c[E-1];let g=v.length,k=Math.max.apply(null,v),m=Math.min.apply(null,v),b=Math.min(0,m),C=k-b||1;h.viewW=g*2,h.bars=new Array(g);for(let E=0;E<g;E++){let R=(v[E]-b)/C,D=Math.max(1.5,R*34);h.bars[E]={x:(E*2+.25).toFixed(2),y:(36-D).toFixed(2),w:"1.5",h:D.toFixed(2)}}if(h.deltaToday=v[g-1],g>=2){let E=v[g-2];E&&(h.pctChange=(h.deltaToday-E)/E*100)}return h.pctAbs=Math.round(Math.abs(h.pctChange)),h.isUp=h.pctChange>=0,h}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(c=>{let h=c.data||[];e.history={repositories:a(h.map(v=>v.nbRepositories||0)),users:a(h.map(v=>v.nbUsers||0)),pageViews:a(h.map(v=>v.nbPageViews||0)),pullRequests:a(h.map(v=>v.nbPullRequests||0))}})},Ya=function(e,t,s,i,o,r){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,Ye(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Jt()(document,"click",_=>{e.quotaExpanded&&!_.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.p
Line truncated
|
||||
`)),e.options=Object.assign({},e.options,S.options),e.options.expirationDate=S.options&&S.options.expirationDate?new Date(S.options.expirationDate):z(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),p&&p()})}function O(p,w,S){e.anonymize&&e.anonymize[p]&&e.anonymize[p].setValidity(w,S)}function B(p){try{let w=parseGithubUrl(p);if(w&&w.owner&&w.repo)return w.owner+"/"+w.repo}catch{}return null}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 te()}catch{}}};function Y(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:B(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function X(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function K(){let p=new URLSearchParams(window.location.search).get("billingDraft");if(p){R.restore();try{let S=(await t.get("/api/billing/draft/"+encodeURIComponent(p))).data;if(S.path!==o.path())throw new Error("Wrong task");D=S.values.conference||null;for(let P of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(S.values,P)&&(e[P]=S.values[P]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),T=S.id,q=JSON.stringify(R.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await X(),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 w;try{w=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!w||w.path!==o.path()||Date.now()-w.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await X(),!0):!1;R.restore();for(let S of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(w.draft,S)&&(e[S]=w.draft[S]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await X(),sessionStorage.removeItem("github-access-draft"),!0}_(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&a(K,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async p=>{e.githubConnection=p.data.connection||"oauth",e.sourceUrl="https://github.com/"+p.data.source.fullName,e._originalFullName=p.data.source.fullName,e.terms=p.data.options.terms.filter(w=>w).join(`
|
||||
`),e.source=p.data.source,e.role=p.data.role||"owner",e._existingNever=p.data.options.expirationMode==="never",e.coauthors=p.data.coauthors||[],e._originalBranch=p.data.source.branch,e.options=Object.assign({},e.options,p.data.options),e.conference=p.data.conference,e._originalConference=p.data.conference,e.repositoryID=p.data.source.repositoryID,e._originalRepositoryID=p.data.source.repositoryID,p.data.options.expirationDate&&(e.options.expirationDate=new Date(p.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await K()&&(await Promise.all([te(),ue()]),Ae())},()=>{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 p=>{if(e.githubConnection=p.data.connection||"oauth",e.sourceUrl="https://github.com/"+p.data.source.repositoryFullName+"/pull/"+p.data.source.pullRequestId,e.terms=p.data.options.terms.filter(w=>w).join(`
|
||||
`),e.source=p.data.source,e.options=Object.assign({},e.options,p.data.options),e.conference=p.data.conference,e._originalConference=p.data.conference,p.data.options.expirationDate&&(e.options.expirationDate=new Date(p.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await K())try{await Oe()}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 p=>{e.sourceUrl="https://gist.github.com/"+p.data.source.gistId,e.terms=p.data.options.terms.filter(w=>w).join(`
|
||||
`),e.source=p.data.source,e.options=Object.assign({},e.options,p.data.options),e.conference=p.data.conference,e._originalConference=p.data.conference,p.data.options.expirationDate&&(e.options.expirationDate=new Date(p.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await K()&&await Fe()},()=>{o.url("/404")}))}),t.get("/github/connections").then(p=>{e.githubConnections=p.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&p.data.appEnabled&&p.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&X())}).catch(()=>{}),e.urlSelected=async(p=!1)=>{let w=++h,S;try{S=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Ce.cancel(),Se.cancel(),x.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",O("sourceUrl","github",!1);return}let P=E(S),V=p||C===P;C=P,e.sourceUrlError="",O("sourceUrl","github",!0);let I=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,I&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!V&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],V||(e.source={type:"GitHubStream",branch:"",commit:""}),Ce.cancel(),Se.cancel(),x.cancel(),ke.clear(),Ve.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=V;try{S.gistId&&!S.repo?(e.detectedType="gist",e.source={gistId:S.gistId},await Fe()):S.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:S.owner+"/"+S.repo,pullRequestId:S.pullRequestId},await Oe()):(e.detectedType="repo",await Promise.all([te(),ue()]),Ae())}catch{}finally{w===h&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let p=e.branches.filter(S=>S.name==e.source.branch)[0];if(!p)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=p.commit),e.readme=p.readme,await ue(),Ae()}),e.getBranches=async p=>{let w=parseGithubUrl(e.sourceUrl),S=m();try{let P=await t.get(`/api/repo/${w.owner}/${w.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&B(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:p===!0||e.reconnectingSource?"1":"0",repositoryID:Y()}});if(!k(S))return;e.branches=P.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let V=e.branches.filter(I=>I.name==e.source.branch);V.length>0&&(!(!e.reconnectingSource&&!p&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=V[0].commit),e.readme=V[0].readme,await ue(p))}catch(P){if(!k(S))return;e.branches=[],e.sourceUnreachable=P&&(P.status===404||P.data&&P.data.error==="repo_not_found");let V=P&&P.data&&P.data.error||(P&&P.status===404?"repo_not_found":"unknown_error");r("ERRORS."+V).then(I=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:I}),e.error=I},console.error),typeof O=="function"&&O("sourceUrl","missing",!1)}finally{b(S)}};async function te(){let p=parseGithubUrl(e.sourceUrl),w=m();try{me();let S=await t.get(`/api/repo/${p.owner}/${p.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&B(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Y(),force:"1"}});if(!k(w))return;e.details=S.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(S){if(!k(w))return;throw S.data&&(r("ERRORS."+S.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),W(S.data.error)),O("sourceUrl","missing",!1),S}finally{b(w)}}async function ue(p){if(e.readme&&!p)return e.readme;let w=parseGithubUrl(e.sourceUrl),S=m();try{let P=await t.get(`/api/repo/${w.owner}/${w.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&B(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:p===!0?"1":"0",branch:e.source.branch,repositoryID:Y()}});k(S,!0)&&(e.readme=P.data)}catch{k(S,!0)&&(e.readme="")}finally{b(S)}}function le(){let p={terms:e.terms?e.terms.split(`
|
||||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(p.branchName=e.source.branch);try{let w=parseGithubUrl(e.sourceUrl);p.repoName=`${w.owner}/${w.repo}`}catch{}return p}function re(p,w,S){let P=null,V=0,I=()=>{if(e.detectedType!==p)return;P&&a.cancel(P);let F=++V;e.previewStatus="loading",P=a(()=>{P=null;let Q=w();if(!Q){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Q).then(J=>{F===V&&(S(J.data,Q),e.previewStatus="ready")}).catch(()=>{F===V&&(e.previewStatus="error")})},200)};return I.cancel=()=>{V++,P&&a.cancel(P),P=null},e.on("dispose",I.cancel),I}e.retryPreview=()=>{e.detectedType==="repo"&&Ce(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()};let Ce=re("repo",()=>e.readme?{content:e.readme,options:le()}:null,p=>{if(typeof p?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=p.content;let w="";try{let P=parseGithubUrl(e.sourceUrl),V=e.source.branch||e.details&&e.details.defaultBranch||"main";w=`https://github.com/${P.owner}/${P.repo}/raw/${V}/`}catch{}let S=renderMD(e.anonymize_readme,w);e.html_readme=S,a(Prism.highlightAll,150)});function Ae(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),Ce())}async function Oe(){let p=parseGithubUrl(e.sourceUrl),w=m();try{me();let S=await t.get(`/api/pr/${p.owner}/${p.repo}/${p.pullRequestId}`,{params:{connection:e.githubConnection}});if(!k(w))return;e.details=S.data,e.pullRequestId||(e.pullRequestId=p.repo+"-PR"+p.pullRequestId+"-"+generateRandomId(4))}catch(S){if(!k(w))return;throw S.data&&(r("ERRORS."+S.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),W(S.data.error)),O("sourceUrl","missing",!1),S}finally{b(w)}}let ke=ze(new Map);function Ie(){let p=new Set,w=e.details&&e.details.pullRequest;if(!w)return p;typeof w.title=="string"&&p.add(w.title),typeof w.body=="string"&&p.add(w.body),typeof w.diff=="string"&&p.add(w.diff);let S=w.comments||[];for(let P of S)typeof P.author=="string"&&p.add(P.author),typeof P.body=="string"&&p.add(P.body);return p}let Se=re("pr",()=>{let p=Ie(),w=Array.from(p);return w.length===0?null:{contents:w,options:le()}},(p,w)=>{if(!Array.isArray(p?.contents)||p.contents.length!==w.contents.length||p.contents.some(V=>typeof V!="string"))throw Error("Invalid preview response");let S=w.contents,P=new Map;for(let V=0;V<S.length&&V<p.contents.length;V++)P.set(S[V],p.contents[V]);ke.clear(),P.forEach((V,I)=>ke.set(I,V))});e.anonymizePrContent=function(p){return p&&(ke.has(p)?ke.get(p):"")};async function Fe(){let p=parseGithubUrl(e.sourceUrl),w=m();try{me(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let S=await t.get(`/api/gist/source/${p.gistId}`);if(!k(w))return;e.details=S.data,e.gistId||(e.gistId="gist-"+p.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(S){if(!k(w))return;if(S.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,O("sourceUrl","missing",!1);return}if(S.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,O("sourceUrl","missing",!1);return}throw S.data&&(r("ERRORS."+S.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),W(S.data.error)),O("sourceUrl","missing",!1),S}finally{b(w)}}let Ve=ze(new Map);function U(){let p=new Set,w=e.details&&e.details.gist;if(!w)return p;typeof w.description=="string"&&p.add(w.description),typeof w.ownerLogin=="string"&&p.add(w.ownerLogin);let S=w.files||[];for(let V of S)typeof V.filename=="string"&&p.add(V.filename),typeof V.content=="string"&&p.add(V.content);let P=w.comments||[];for(let V of P)typeof V.author=="string"&&p.add(V.author),typeof V.body=="string"&&p.add(V.body);return p}let x=re("gist",()=>{let p=U(),w=Array.from(p);return w.length===0?null:{contents:w,options:le()}},(p,w)=>{if(!Array.isArray(p?.contents)||p.contents.length!==w.contents.length||p.contents.some(V=>typeof V!="string"))throw Error("Invalid preview response");let S=w.contents,P=new Map;for(let V=0;V<S.length&&V<p.contents.length;V++)P.set(S[V],p.contents[V]);Ve.clear(),P.forEach((V,I)=>Ve.set(I,V)),Z()});e.anonymizeGistContent=function(p){return p&&(Ve.has(p)?Ve.get(p):"")},e.previewGistFiles=[];function Z(){let p=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=p.map(w=>({filename:e.anonymizeGistContent(w.filename),content:e.anonymizeGistContent(w.content),language:w.language}))}e.watch("details.gist.files",Z,!0),e.watch("terms",Z);function ie(){let p=e.conference;if(e.conference_data=null,!p)return;let w=p===D||e.isUpdate&&p===e._originalConference;p!==D&&(D=null),t.get("/api/conferences/"+p).then(S=>{e.conference===p&&(e.conference_data=S.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!w&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.
Line truncated
|
||||
`).filter(I=>I),connection:e.githubConnection,fullName:`${S.owner}/${S.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(P.options.pageSource=e.details.pageSource),me();let V=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(V,P,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/status/"+e.repoId},I=>{I.data&&(r("ERRORS."+I.data.error).then(F=>{e.error=F},console.error),W(I.data.error),["quota_exceeded","subscription_required_for_never_expiration"].includes(I.data.error)&&(I.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Ye(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}))))}).finally(()=>{w.disabled=!1})},e.anonymizeGist=p=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(_e())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let w=p.currentTarget||p.target.closest?.("button")||p.target;w.disabled=!0;let S=parseGithubUrl(e.sourceUrl),P={gistId:e.gistId,terms:e.terms.trim().split(`
|
||||
`).filter(I=>I),source:{gistId:S.gistId},options:e.options,conference:e.conference};me();let V=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(V,P,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/gist/"+e.gistId},I=>{I.data&&(r("ERRORS."+I.data.error).then(F=>{e.error=F},console.error),W(I.data.error))}).finally(()=>{w.disabled=!1})},e.anonymizePullRequest=p=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(_e())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let w=p.currentTarget||p.target.closest?.("button")||p.target;w.disabled=!0;let S=parseGithubUrl(e.sourceUrl),P={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
|
||||
`).filter(I=>I),source:{repositoryFullName:`${S.owner}/${S.repo}`,pullRequestId:S.pullRequestId},options:e.options,conference:e.conference};me();let V=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(V,P,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},I=>{I.data&&(r("ERRORS."+I.data.error).then(F=>{e.error=F},console.error),W(I.data.error))}).finally(()=>{w.disabled=!1})},e.watch("conference",()=>{ie()}),e.watch("terms",()=>{e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()}),e.watch("details",()=>{e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()},!0)},li=function(e,t,s,i,o,r){let a=ct(),c=Jt();e.on("dark-mode",(O,B)=>{e.aceOption&&(B?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let h=0,v=!1;e.on("dispose",()=>{v=!0,h++,g&&g.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,c(document,"keydown",function(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var B=document.querySelector(".tree-search-input");B&&(B.focus(),B.select())}});var g=null;e.onFileSearchChange=function(){g&&(g.resolve(),g=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let B=r.defer();g=B,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:B.promise}).then(function(Y){if(!(v||g!==B)){g=null,e.fileSearchLoading=!1;var X={};e.files.forEach(function(U){X[(U.path||"")+"/"+U.name]=!0});for(var K=[],te={},ue=0;ue<Y.data.length;ue++){var le=Y.data[ue];if(le.path)for(var re=le.path.split("/"),Ce="",Ae=0;Ae<re.length;Ae++){var Oe=Ce;Ce=Ce?Ce+"/"+re[Ae]:re[Ae];var ke=Oe+"/"+re[Ae];!X[ke]&&!te[ke]&&(te[ke]=!0,K.push({name:re[Ae],path:Oe}))}}K.sort(function(U,x){return(U.path||"").split("/").length-(x.path||"").split("/").length}),K.length>0&&e.files.push.apply(e.files,K);for(var Ie=[],Se=0;Se<Y.data.length;Se++){var Fe=Y.data[Se],Ve=(Fe.path||"")+"/"+Fe.name;!X[Ve]&&Fe.size!=null&&(Ie.push(Fe),X[Ve]=!0)}Ie.length>0&&e.files.push.apply(e.files,Ie),e.fileSearchResults=Y.data}},function(){!v&&g===B&&(g=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let k={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},m=["license","txt"],b=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],C=["wav","mp3","ogg","wma","flac","aac","m4a"],E=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(O,B){if(e.repoId!=i.repoId)return _();if((i.path||"")!=e.filePath){e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(Y=>Y&&Y.trim().length>0),oe();for(let Y=0;Y<e.paths.length-1;Y++){let X=Y>0?e.paths.slice(0,Y).join("/"):"";e.files.some(te=>te.path===X)||e.getFiles(X)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],B={};for(let X of e.files)X.name.toLowerCase().indexOf("readme")>-1&&(B[X.name.toLowerCase()]=X.name);let Y=null;for(let X of O)if(B[X]){Y=X;break}if(!Y&&Object.keys(B).length>0&&(Y=Object.keys(B)[0]),Y){let X=s.url();X[X.length-1]!="/"&&(X+="/"),s.url(X+encodePathForUrl(B[Y]))}}e.fileCounts=null,e.getFiles=function(O){let B=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(Y){if(v||B!==e.repoId)return[];let X=O||"";return e.files=e.files.filter(K=>K.path!==X),e.files.push(...Y.data),Y.data},function(Y){if(v||B!==e.repoId)return[];e.type="error",e.content=Y&&Y.data&&Y.data.error||"unknown_error",e.files=[]})};function D(){let O=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(B){v||O!==e.repoId||(e.fileCounts=B.data)},function(){e.fileCounts={}})}function T(){return e.files.filter(O=>O.name==e.paths[e.paths.length-1]&&O.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var q=null;e.on("dispose",function(){q&&a.interval.cancel(q)});function L(O){if(v)return;let B=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(Y=>{if(!(v||B!==e.repoId)){if(e.options=Y.data,e.options.url){window.location=e.options.url;return}O&&O(Y.data)}},Y=>{if(!(v||B!==e.repoId)){var X=Y.data||{};if(X.error==="rate_limited"&&X.resetAt){let te=function(){var ue=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ue<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,q&&(a.interval.cancel(q),q=null),L(O);else{var le=Math.floor(ue/60),re=ue%60;e.rateLimitCountdown=le>0?le+"m "+re+"s":re+"s"}};var K=te;e.type="rate_limited",e.rateLimitResetAt=X.resetAt,q&&a.interval.cancel(q),te(),q=a.interval(te,1e3)}
Line truncated
|
||||
`+E.join(`
|
||||
`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(T),D.download=i.username+"-repositories.csv",D.click()},e.showStatusMessage=m=>{let b=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,b)},e.fetchGithubInfo=m=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(C=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(C.data,null,2).replace(/[<>]/g,E=>E==="<"?"<":">")+"</pre>"),b.document.close())},C=>{let E=C&&C.data?JSON.stringify(C.data,null,2):String(C);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+E+"</pre>")})};function f(m){t.get("/api/admin/users/"+m+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function v(m){t.get("/api/admin/users/"+m,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}v(i.username),f(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function g(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}g(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",g()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>g(),b=>console.error(b))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>f(i.username),b=>console.error(b))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>f(i.username),b=>console.error(b))},e.updateRepository=m=>{let b=ze({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${m.repoId}/refresh`).then(C=>{C.data.status=="ready"?b.title=`${m.repoId} is refreshed.`:b.title=`Refreshing of ${m.repoId}.`},C=>{b.title=`Error during the refresh of ${m.repoId}.`,b.body=C.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let k=null;e.watch("query",()=>{o.timeout.cancel(k),k=o.timeout(()=>{f(i.username)},500)},!0)},il=function(e,t,s){let i=ct(),o=Jt();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=C=>{if(C.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){C.preventDefault();let E=document.querySelector('.admin-filter-toolbar input[type="search"]');E&&E.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=C=>{C==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[C]="",e.query.page=1},e.chips=[];let a=()=>{let C=[];(e.query.dateFrom||e.query.dateTo)&&C.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=C};e.statusCountFor=C=>{let E=(e.statusCounts||[]).find(T=>T._id===C);return E?E.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=C=>{e.query.sort===C?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=C,e.query.direction="desc"),e.query.page=1},e.sortIcon=C=>e.query.sort===C?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let c="admin.conferences.filterPrefs",f={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},v=loadFilterPrefs(c)||{};e.query=Object.assign({},f,v,{page:1,search:""});let g=s.search();g.search&&(e.query.search=g.search);let k="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(k)||"[]"),e.savePreset=()=>{let C=window.prompt("Preset name:");if(!C)return;let E=Object.assign({},e.query);delete E.page,e.presets=(e.presets||[]).filter(T=>T.name!==C),e.presets.push({name:C,query:E}),localStorage.setItem(k,JSON.stringify(e.presets))},e.applyPreset=C=>{Object.assign(e.query,C.query,{page:1})},e.deletePreset=C=>{e.presets=(e.presets||[]).filter(E=>E.name!==C.name),localStorage.setItem(k,JS
Line truncated
|
||||
`).map((ce,le)=>le===0?ce:ee+ce).join(`
|
||||
`)}else typeof S=="number"||typeof S=="boolean"?Y=String(S):Y=JSON.stringify(S);se.push(`${K}${Y}${X}`)}),se.push("}"),se.join(`
|
||||
`)}function v(D){let O=[],q="",F=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,M=0,z;for(;z=F.exec(D);)q+=D.slice(M,z.index),M=F.lastIndex,O.push({key:z[1],op:z[2]||"=",val:z[3]});return q+=D.slice(M),{filters:O,free:q.trim().toLowerCase()}}function g(D,O){for(let q of O.filters){let F=(z,se,oe)=>{let S=parseFloat(z),I=parseFloat(se);return oe==="="?String(z)===String(se):oe==="!="?String(z)!==String(se):oe===">="?S>=I:oe==="<="?S<=I:oe===">"?S>I:oe==="<"?S<I:!0},M;if(q.key==="code")M=D.displayMessage;else if(q.key==="module")M=D.module;else if(q.key==="status")M=D._status;else if(q.key==="url")M=D._url;else if(q.key==="repo")M=D._repoId;else if(q.key==="level")M=D.level;else continue;if(M==null||!F(M,q.val,q.op))return!1}return!(O.free&&((D.displayMessage||"")+" "+(D.module||"")+" "+(D._url||"")+" "+JSON.stringify(D.raw||[])).toLowerCase().indexOf(O.free)===-1)}function k(){let D=v(e.query.search||"");e.parsedFilterCount=D.filters.length;let O=e.query.bucket,q=e.entries.filter(M=>O&&M._bucket!==O?!1:g(M,D)),F=e.query.group;if(F){let M=oe=>F==="module"?oe.module:oe.displayMessage||oe.message||"_",z=new Map;for(let oe of q){let S=M(oe);if(z.has(S)){let I=z.get(S);I.count++,I._related.push(oe),new Date(oe.ts)>new Date(I.ts)&&(I.ts=oe.ts,I._url=oe._url,I._status=oe._status),new Date(oe.ts)<new Date(I._firstSeen)&&(I._firstSeen=oe.ts)}else{let I=Object.assign({},oe);I._key=`${F}:${S}`,I._related=[oe],I._firstSeen=oe.ts,I._lastHourCount=0,I.count=1,z.set(S,I)}}let se=Date.now()-3600*1e3;for(let oe of z.values())oe._lastHourCount=oe._related.filter(S=>new Date(S.ts).getTime()>=se).length;q=Array.from(z.values())}else q=q.map((M,z)=>(M._key="row:"+z+":"+M.ts,M._related=[M],M._firstSeen=M.ts,M._lastHourCount=0,M.count=1,M));e.query.sort==="count"?q.sort((M,z)=>z.count-M.count||new Date(z.ts)-new Date(M.ts)):q.sort((M,z)=>new Date(z.ts)-new Date(M.ts)),e.visible=q}function m(D){let O=D?e.entries.length:0,q=D?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:O,limit:q}}).then(F=>{let M=(F.data.entries||[]).map(c);e.entries=D?e.entries.concat(M):M,e.available=!!F.data.available,e.cap=F.data.max||e.cap,e.total=F.data.total||e.entries.length,k()},F=>console.error(F))}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length<e.total;function b(){t.get("/api/admin/errors/stats").then(D=>{let O=D.data||{},q=O.prev24h?Math.round((O.last24h-O.prev24h)/O.prev24h*100):0;e.stats={last24h:O.last24h||0,prev24h:O.prev24h||0,delta:q,severity:O.severity||{error:0,warn:0,info:0},unique:O.unique||{error:0,warn:0,info:0},buckets:O.buckets||[],dropped:O.dropped||0}},D=>console.error(D))}function C(){m(),b()}e.barPx=(D,O)=>{let q=e.stats.buckets||[],F=0;for(let oe of q)F=Math.max(F,(oe.error||0)+(oe.warn||0)+(oe.info||0));if(!F)return 0;let M=(D.error||0)+(D.warn||0)+(D.info||0);if(!M)return 0;let z=Math.round(M/F*60),se=D[O]||0;return Math.round(se/M*z)},e.bucketTitle=D=>`${new Date(D.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${D.error||0} err \xB7 ${D.warn||0} warn \xB7 ${D.info||0} info`,e.toggle=D=>{e.expanded[D._key]=!e.expanded[D._key]},e.setBucket=D=>{e.query.bucket=D},e.refreshNow=C,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(C,D=>console.error(D))},e.exportCsv=()=>{let D=["ts","level","module","displayMessage","_status","_url","_repoId"],O=[D.join(",")];for(let z of e.visible)O.push(D.map(se=>{let oe=z[se]==null?"":String(z[se]);return/[",\n]/.test(oe)?`"${oe.replace(/"/g,'""')}"`:oe}).join(","));let q=new Blob([O.join(`
|
||||
`)],{type:"text/csv;charset=utf-8"}),F=URL.createObjectURL(q),M=document.createElement("a");M.href=F,M.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(M),M.click(),document.body.removeChild(M),URL.revokeObjectURL(F)};function E(D){e.copyHint=`${D} copied`,o.timeout(()=>{e.copyHint=""},1500)}e.copyJson=D=>{navigator.clipboard.writeText(D._detailJson).then(()=>E("JSON"))},e.copyCurl=D=>{if(!D._url)return;let q=`curl -X ${D._method||"GET"} '${window.location.origin}${D._url}'`;navigator.clipboard.writeText(q).then(()=>E("curl"))},C();let T=i(()=>{e.query.autoRefresh&&C()},15e3);e.on("dispose",()=>i.cancel(T)),e.watch("query.search",k),e.watch("query.bucket",k),e.watch("query.sort",k),e.watch("query.group",k)},ll=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.performanceError=null,e.latencyBound=function(b,C){return b.count?b[C]==null?"> 60 s":"\u2264 "+b[C]+" ms":"No samples"},e.firstByteBound=function(b){return e.latencyBound({count:b.firstByteCount,p95UpperMs:b.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(b){return Math.max(0,Math.round((Date.now()-b.sampledAt)/1e3))},e.peakRss=function(b){return(e.performance.runtimeSeries||[]).filter(function(C){return C.instance===b.instance}).reduce(function(C,E){return Math.max(C,E.rss)},b.memory.rss)},e.performanceWarning=function(b){return e.sampleAge(b)>45||b.droppedBatches||b.droppedMetrics||b.sockets?.closeWait>0||b.eventLoop.p95Ms>100||b.memoryLimitBytes&&b.memory.rss>b.memoryLimitBytes*.8};var o=!1;e.loadPerformance=function(){var b=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==b&&(e.performance=null),!o&&(o=!0,t.get("/api/admin/performance",{params:{minutes:b}}).then(function(C){b===e.performanceMinutes&&(e.performance=C.data,e.performanceError=C.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){b===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){o=!1,b!==e.performanceMinutes&&e.loadPerformance()}))};function r(b){if(b==null)return"\u2014";for(var C=["B","KB","MB","GB","TB"],E=0,T=b;T>=1024&&E<C.length-1;)T/=1024,E++;return T.toFixed(E>0?1:0)+" "+C[E]}e.humanBytes=r;function a(b){if(!b)return"\u2014";var C=Math.floor(b/86400),E=Math.floor(b%86400/3600),T=Math.floor(b%3600/60);return C>0?C+"d "+(E<10?"0":"")+E+"h":E>0?E+"h "+(T<10?"0":"")+T+"m":T+"m"}e.humanDuration=a;function c(b){return b==null?"\u2014":b>=1e6?(b/1e6).toFixed(1)+"M":b>=1e3?(b/1e3).toFixed(1)+"K":String(b)}e.humanNum=c,e.queueTotal=function(b){return b?(b.waiting||0)+(b.active||0)+(b.delayed||0)+(b.failed||0):0},e.statusCount=function(b){if(!e.data||!e.data.repos)return 0;for(var C=e.data.repos.statusBreakdown||[],E=0;E<C.length;E++)if(C[E]._id===b)return C[E].count;return 0},e.barPct=function(b){var C=e.data&&e.data.repos?e.data.repos.total:0;if(!C)return 0;var E=[b];b==="expired"&&E.push("expiring"),b==="removed"&&E.push("removing"),b==="preparing"&&E.push("download");var T=0;return E.forEach(function(D){T+=e.statusCount(D)}),Math.max(.4,T/C*100)},e.errPct=function(b){if(!e.data||!e.data.errors)return 0;var C=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[b]/C*100};function f(b){var C=b||[];return C.map(function(E,T){var D=C[T-1]||{},O=Object.assign({},E);return O.dailyRepositories=T?Math.max(0,(E.nbRepositories||0)-(D.nbRepositories||0)):0,O.dailyUsers=T?Math.max(0,(E.nbUsers||0)-(D.nbUsers||0)):0,O.dailyPageViews=T?Math.max(0,(E.nbPageViews||0)-(D.nbPageViews||0)):0,O})}function v(b){var C=b&&b.length?b[b.length-1]:{};return{repositories:C.dailyRepositories||0,users:C.dailyUsers||0,pageViews:C.dailyPageViews||0}}var g={};e.historyBarH=function(b,C){return!b||!g[C]?0:Math.max(1,Math.round(b[C]/g[C]*140))},e.historyLabel=function(b){if(!b||!b.date)return"";var C=new Date(b.date);return C.getUTCMonth()+1+"/"+C.getUTCDate()};function k(){e.loadPerformance(),t.get("/api/admin/overview").then(function(b){b.data.history=f(b.data.history),b.data.daily={today:v(b.data.history)},e.data=b.data,e.loading=!1,e.error=null,g={},(b.data.history||[]).forEach(function(C){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(E){(!g[E]||C[E]>g[E])&&(g[E]=C[E])})})},function(b){e.loading=!1,e.error=b.data&&b.data.error||"Failed to load overview"})}k();var m=i(k,3e4);e.on("dispose",function(){i.cancel(m)})};var dl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>el(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>tl(e,t.http)}
Line truncated
|
||||
anonymous_github`)])])])])]),p(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),y("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). ")])])])])]),p(" Privacy & Security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),y("Privacy & 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 \u2014 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,[y("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"),y(" 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. ")])])])]),p(" Self-Hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),y("Self-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",{class:"panel-body p-3"},[n("p",null,[y(
Line truncated
|
||||
`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(R),D.download=i.username+"-repositories.csv",D.click()},e.showStatusMessage=m=>{let b=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,b)},e.fetchGithubInfo=m=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(C=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(C.data,null,2).replace(/[<>]/g,E=>E==="<"?"<":">")+"</pre>"),b.document.close())},C=>{let E=C&&C.data?JSON.stringify(C.data,null,2):String(C);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+E+"</pre>")})};function h(m){t.get("/api/admin/users/"+m+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function v(m){t.get("/api/admin/users/"+m,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}v(i.username),h(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function g(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}g(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",g()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>g(),b=>console.error(b))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>h(i.username),b=>console.error(b))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>h(i.username),b=>console.error(b))},e.updateRepository=m=>{let b=ze({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${m.repoId}/refresh`).then(C=>{C.data.status=="ready"?b.title=`${m.repoId} is refreshed.`:b.title=`Refreshing of ${m.repoId}.`},C=>{b.title=`Error during the refresh of ${m.repoId}.`,b.body=C.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let k=null;e.watch("query",()=>{o.timeout.cancel(k),k=o.timeout(()=>{h(i.username)},500)},!0)},il=function(e,t,s){let i=ct(),o=Jt();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=C=>{if(C.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){C.preventDefault();let E=document.querySelector('.admin-filter-toolbar input[type="search"]');E&&E.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=C=>{C==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[C]="",e.query.page=1},e.chips=[];let a=()=>{let C=[];(e.query.dateFrom||e.query.dateTo)&&C.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=C};e.statusCountFor=C=>{let E=(e.statusCounts||[]).find(R=>R._id===C);return E?E.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=C=>{e.query.sort===C?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=C,e.query.direction="desc"),e.query.page=1},e.sortIcon=C=>e.query.sort===C?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let c="admin.conferences.filterPrefs",h={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},v=loadFilterPrefs(c)||{};e.query=Object.assign({},h,v,{page:1,search:""});let g=s.search();g.search&&(e.query.search=g.search);let k="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(k)||"[]"),e.savePreset=()=>{let C=window.prompt("Preset name:");if(!C)return;let E=Object.assign({},e.query);delete E.page,e.presets=(e.presets||[]).filter(R=>R.name!==C),e.presets.push({name:C,query:E}),localStorage.setItem(k,JSON.stringify(e.presets))},e.applyPreset=C=>{Object.assign(e.query,C.query,{page:1})},e.deletePreset=C=>{e.presets=(e.presets||[]).filter(E=>E.name!==C.name),localStorage.setItem(k,JS
Line truncated
|
||||
`).map((ue,le)=>le===0?ue:te+ue).join(`
|
||||
`)}else typeof _=="number"||typeof _=="boolean"?K=String(_):K=JSON.stringify(_);se.push(`${Y}${K}${X}`)}),se.push("}"),se.join(`
|
||||
`)}function v(D){let T=[],q="",L=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,M=0,z;for(;z=L.exec(D);)q+=D.slice(M,z.index),M=L.lastIndex,T.push({key:z[1],op:z[2]||"=",val:z[3]});return q+=D.slice(M),{filters:T,free:q.trim().toLowerCase()}}function g(D,T){for(let q of T.filters){let L=(z,se,oe)=>{let _=parseFloat(z),O=parseFloat(se);return oe==="="?String(z)===String(se):oe==="!="?String(z)!==String(se):oe===">="?_>=O:oe==="<="?_<=O:oe===">"?_>O:oe==="<"?_<O:!0},M;if(q.key==="code")M=D.displayMessage;else if(q.key==="module")M=D.module;else if(q.key==="status")M=D._status;else if(q.key==="url")M=D._url;else if(q.key==="repo")M=D._repoId;else if(q.key==="level")M=D.level;else continue;if(M==null||!L(M,q.val,q.op))return!1}return!(T.free&&((D.displayMessage||"")+" "+(D.module||"")+" "+(D._url||"")+" "+JSON.stringify(D.raw||[])).toLowerCase().indexOf(T.free)===-1)}function k(){let D=v(e.query.search||"");e.parsedFilterCount=D.filters.length;let T=e.query.bucket,q=e.entries.filter(M=>T&&M._bucket!==T?!1:g(M,D)),L=e.query.group;if(L){let M=oe=>L==="module"?oe.module:oe.displayMessage||oe.message||"_",z=new Map;for(let oe of q){let _=M(oe);if(z.has(_)){let O=z.get(_);O.count++,O._related.push(oe),new Date(oe.ts)>new Date(O.ts)&&(O.ts=oe.ts,O._url=oe._url,O._status=oe._status),new Date(oe.ts)<new Date(O._firstSeen)&&(O._firstSeen=oe.ts)}else{let O=Object.assign({},oe);O._key=`${L}:${_}`,O._related=[oe],O._firstSeen=oe.ts,O._lastHourCount=0,O.count=1,z.set(_,O)}}let se=Date.now()-3600*1e3;for(let oe of z.values())oe._lastHourCount=oe._related.filter(_=>new Date(_.ts).getTime()>=se).length;q=Array.from(z.values())}else q=q.map((M,z)=>(M._key="row:"+z+":"+M.ts,M._related=[M],M._firstSeen=M.ts,M._lastHourCount=0,M.count=1,M));e.query.sort==="count"?q.sort((M,z)=>z.count-M.count||new Date(z.ts)-new Date(M.ts)):q.sort((M,z)=>new Date(z.ts)-new Date(M.ts)),e.visible=q}function m(D){let T=D?e.entries.length:0,q=D?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:T,limit:q}}).then(L=>{let M=(L.data.entries||[]).map(c);e.entries=D?e.entries.concat(M):M,e.available=!!L.data.available,e.cap=L.data.max||e.cap,e.total=L.data.total||e.entries.length,k()},L=>console.error(L))}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length<e.total;function b(){t.get("/api/admin/errors/stats").then(D=>{let T=D.data||{},q=T.prev24h?Math.round((T.last24h-T.prev24h)/T.prev24h*100):0;e.stats={last24h:T.last24h||0,prev24h:T.prev24h||0,delta:q,severity:T.severity||{error:0,warn:0,info:0},unique:T.unique||{error:0,warn:0,info:0},buckets:T.buckets||[],dropped:T.dropped||0}},D=>console.error(D))}function C(){m(),b()}e.barPx=(D,T)=>{let q=e.stats.buckets||[],L=0;for(let oe of q)L=Math.max(L,(oe.error||0)+(oe.warn||0)+(oe.info||0));if(!L)return 0;let M=(D.error||0)+(D.warn||0)+(D.info||0);if(!M)return 0;let z=Math.round(M/L*60),se=D[T]||0;return Math.round(se/M*z)},e.bucketTitle=D=>`${new Date(D.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${D.error||0} err \xB7 ${D.warn||0} warn \xB7 ${D.info||0} info`,e.toggle=D=>{e.expanded[D._key]=!e.expanded[D._key]},e.setBucket=D=>{e.query.bucket=D},e.refreshNow=C,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(C,D=>console.error(D))},e.exportCsv=()=>{let D=["ts","level","module","displayMessage","_status","_url","_repoId"],T=[D.join(",")];for(let z of e.visible)T.push(D.map(se=>{let oe=z[se]==null?"":String(z[se]);return/[",\n]/.test(oe)?`"${oe.replace(/"/g,'""')}"`:oe}).join(","));let q=new Blob([T.join(`
|
||||
`)],{type:"text/csv;charset=utf-8"}),L=URL.createObjectURL(q),M=document.createElement("a");M.href=L,M.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(M),M.click(),document.body.removeChild(M),URL.revokeObjectURL(L)};function E(D){e.copyHint=`${D} copied`,o.timeout(()=>{e.copyHint=""},1500)}e.copyJson=D=>{navigator.clipboard.writeText(D._detailJson).then(()=>E("JSON"))},e.copyCurl=D=>{if(!D._url)return;let q=`curl -X ${D._method||"GET"} '${window.location.origin}${D._url}'`;navigator.clipboard.writeText(q).then(()=>E("curl"))},C();let R=i(()=>{e.query.autoRefresh&&C()},15e3);e.on("dispose",()=>i.cancel(R)),e.watch("query.search",k),e.watch("query.bucket",k),e.watch("query.sort",k),e.watch("query.group",k)},ll=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.performanceError=null,e.latencyBound=function(b,C){return b.count?b[C]==null?"> 60 s":"\u2264 "+b[C]+" ms":"No samples"},e.firstByteBound=function(b){return e.latencyBound({count:b.firstByteCount,p95UpperMs:b.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(b){return Math.max(0,Math.round((Date.now()-b.sampledAt)/1e3))},e.peakRss=function(b){return(e.performance.runtimeSeries||[]).filter(function(C){return C.instance===b.instance}).reduce(function(C,E){return Math.max(C,E.rss)},b.memory.rss)},e.performanceWarning=function(b){return e.sampleAge(b)>45||b.droppedBatches||b.droppedMetrics||b.sockets?.closeWait>0||b.eventLoop.p95Ms>100||b.memoryLimitBytes&&b.memory.rss>b.memoryLimitBytes*.8};var o=!1;e.loadPerformance=function(){var b=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==b&&(e.performance=null),!o&&(o=!0,t.get("/api/admin/performance",{params:{minutes:b}}).then(function(C){b===e.performanceMinutes&&(e.performance=C.data,e.performanceError=C.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){b===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){o=!1,b!==e.performanceMinutes&&e.loadPerformance()}))};function r(b){if(b==null)return"\u2014";for(var C=["B","KB","MB","GB","TB"],E=0,R=b;R>=1024&&E<C.length-1;)R/=1024,E++;return R.toFixed(E>0?1:0)+" "+C[E]}e.humanBytes=r;function a(b){if(!b)return"\u2014";var C=Math.floor(b/86400),E=Math.floor(b%86400/3600),R=Math.floor(b%3600/60);return C>0?C+"d "+(E<10?"0":"")+E+"h":E>0?E+"h "+(R<10?"0":"")+R+"m":R+"m"}e.humanDuration=a;function c(b){return b==null?"\u2014":b>=1e6?(b/1e6).toFixed(1)+"M":b>=1e3?(b/1e3).toFixed(1)+"K":String(b)}e.humanNum=c,e.queueTotal=function(b){return b?(b.waiting||0)+(b.active||0)+(b.delayed||0)+(b.failed||0):0},e.statusCount=function(b){if(!e.data||!e.data.repos)return 0;for(var C=e.data.repos.statusBreakdown||[],E=0;E<C.length;E++)if(C[E]._id===b)return C[E].count;return 0},e.barPct=function(b){var C=e.data&&e.data.repos?e.data.repos.total:0;if(!C)return 0;var E=[b];b==="expired"&&E.push("expiring"),b==="removed"&&E.push("removing"),b==="preparing"&&E.push("download");var R=0;return E.forEach(function(D){R+=e.statusCount(D)}),Math.max(.4,R/C*100)},e.errPct=function(b){if(!e.data||!e.data.errors)return 0;var C=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[b]/C*100};function h(b){var C=b||[];return C.map(function(E,R){var D=C[R-1]||{},T=Object.assign({},E);return T.dailyRepositories=R?Math.max(0,(E.nbRepositories||0)-(D.nbRepositories||0)):0,T.dailyUsers=R?Math.max(0,(E.nbUsers||0)-(D.nbUsers||0)):0,T.dailyPageViews=R?Math.max(0,(E.nbPageViews||0)-(D.nbPageViews||0)):0,T})}function v(b){var C=b&&b.length?b[b.length-1]:{};return{repositories:C.dailyRepositories||0,users:C.dailyUsers||0,pageViews:C.dailyPageViews||0}}var g={};e.historyBarH=function(b,C){return!b||!g[C]?0:Math.max(1,Math.round(b[C]/g[C]*140))},e.historyLabel=function(b){if(!b||!b.date)return"";var C=new Date(b.date);return C.getUTCMonth()+1+"/"+C.getUTCDate()};function k(){e.loadPerformance(),t.get("/api/admin/overview").then(function(b){b.data.history=h(b.data.history),b.data.daily={today:v(b.data.history)},e.data=b.data,e.loading=!1,e.error=null,g={},(b.data.history||[]).forEach(function(C){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(E){(!g[E]||C[E]>g[E])&&(g[E]=C[E])})})},function(b){e.loading=!1,e.error=b.data&&b.data.error||"Failed to load overview"})}k();var m=i(k,3e4);e.on("dispose",function(){i.cancel(m)})};var dl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>el(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>tl(e,t.http)}
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"})]),y("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 & Security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),y("Privacy & 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 \u2014 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,[y("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"),y(" 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"})]),y("Self-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",{class:"panel-body p-3"},[n("p",null,[y(
Line truncated
|
||||
anonymized repository often think it is about the paper, so the
|
||||
label names the service and the tooltip says who to contact. `),t[13]||(t[13]=n("li",{class:"nav-item d-none d-lg-block"},[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"})]),y("Report a bug ")])],-1)),e.isDarkMode?p("v-if",!0):(l(),d("li",SI,[n("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=ue(s=>{e.darkMode(!0)},["prevent"]))},[...t[8]||(t[8]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",NI,[n("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=ue(s=>{e.darkMode(!1)},["prevent"]))},[...t[9]||(t[9]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),e.user?p("v-if",!0):(l(),d("li",DI,[...t[10]||(t[10]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(l(),d("li",RI,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[2]||(t[2]=ue(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):p("v-if",!0),e.user?(l(),d("li",TI,[n("a",AI,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,OI)):p("v-if",!0),n("span",PI,u(e.user?.username),1)]),n("div",II,[n("h6",VI,"Signed in as @"+u(e.user?.username),1),t[11]||(t[11]=pe('<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" 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><a class="dropdown-item" href="https://ko-fi.com/tdurieux" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-heart"></use></svg><span>Support the project</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-logout"></use></svg><span>Sign out</span></a>',9))])])):p("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,qI)):p("v-if",!0)],64)}var MI={class:"paper-landing"},$I={class:"paper-hero"},LI={class:"paper-hero-copy"},UI={class:"paper-cta-row"},FI={key:0,href:"/signin",target:"_self",class:"btn-hero"},BI={key:1,href:"/anonymize",class:"btn-hero"},zI={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},HI={class:"paper-stats-grid"},jI={class:"paper-stat-value"},GI={class:"paper-stat-label"},WI=["viewBox"],KI=["x","y","width","height"],YI={key:1,class:"paper-stat-delta"},QI={class:"paper-features paper-wrap","aria-label":"Product features"},JI={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},XI=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],ZI={class:"paper-eyebrow"},xI={class:"paper-feature-title"},e4={class:"paper-feature-more"},t4={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},n4=["href","target"],o4={class:"paper-features-stage"},s4=["id","aria-labelledby"],i4={class:"paper-frame"},r4={class:"paper-frame-bar","aria-hidden":"true"},a4={class:"url"},l4=["src","alt"],d4={class:"paper-footer"},u4={class:"paper-footer-inner"},c4={class:"paper-footer-col"},p4={key:0,href:"/dashboard"},f4={key:1,href:"/conferences"},h4={class:"paper-footer-foot"};function Al(e,t){return l(),d("div",MI,[p(" Hero: copy on the left, the product on the right "),n("section",$I,[n("div",LI,[t[2]||(t[
Line truncated
|
||||
label names the service and the tooltip says who to contact. `),t[13]||(t[13]=n("li",{class:"nav-item d-none d-lg-block"},[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"})]),y("Report a bug ")])],-1)),e.isDarkMode?f("v-if",!0):(l(),d("li",SI,[n("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=ce(s=>{e.darkMode(!0)},["prevent"]))},[...t[8]||(t[8]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",NI,[n("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=ce(s=>{e.darkMode(!1)},["prevent"]))},[...t[9]||(t[9]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),e.user?f("v-if",!0):(l(),d("li",DI,[...t[10]||(t[10]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(l(),d("li",RI,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[2]||(t[2]=ce(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(l(),d("li",TI,[n("a",AI,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,OI)):f("v-if",!0),n("span",PI,u(e.user?.username),1)]),n("div",II,[n("h6",VI,"Signed in as @"+u(e.user?.username),1),t[11]||(t[11]=pe('<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" 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><a class="dropdown-item" href="https://ko-fi.com/tdurieux" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-heart"></use></svg><span>Support the project</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-logout"></use></svg><span>Sign out</span></a>',9))])])):f("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,qI)):f("v-if",!0)],64)}var MI={class:"paper-landing"},$I={class:"paper-hero"},LI={class:"paper-hero-copy"},UI={class:"paper-cta-row"},FI={key:0,href:"/signin",target:"_self",class:"btn-hero"},BI={key:1,href:"/anonymize",class:"btn-hero"},zI={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},HI={class:"paper-stats-grid"},jI={class:"paper-stat-value"},GI={class:"paper-stat-label"},WI=["viewBox"],KI=["x","y","width","height"],YI={key:1,class:"paper-stat-delta"},QI={class:"paper-features paper-wrap","aria-label":"Product features"},JI={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},XI=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],ZI={class:"paper-eyebrow"},xI={class:"paper-feature-title"},e4={class:"paper-feature-more"},t4={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},n4=["href","target"],o4={class:"paper-features-stage"},s4=["id","aria-labelledby"],i4={class:"paper-frame"},r4={class:"paper-frame-bar","aria-hidden":"true"},a4={class:"url"},l4=["src","alt"],d4={class:"paper-footer"},u4={class:"paper-footer-inner"},c4={class:"paper-footer-col"},p4={key:0,href:"/dashboard"},f4={key:1,href:"/conferences"},h4={class:"paper-footer-foot"};function Al(e,t){return l(),d("div",MI,[f(" Hero: copy on the left, the product on the right "),n("section",$I,[n("div",LI,[t[2]||(t[
Line truncated
|
||||
MIT CSAIL
|
||||
jane.smith@example.org`},nq={class:"settings-syntax"},oq={class:"invalid-feedback"},sq={class:"settings-row"},iq={class:"settings-checks"},rq={class:"settings-check"},aq={class:"form-check-input",type:"checkbox",id:"link",name:"link"},lq={class:"settings-check"},dq={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},uq={class:"settings-check"},cq={class:"form-check-input",type:"checkbox",id:"image",name:"image"},pq={class:"settings-check"},fq={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},hq={class:"settings-check"},mq={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},vq={class:"settings-check"},gq={class:"form-check-input",type:"checkbox",id:"page",name:"page"},yq={class:"settings-row"},bq={class:"settings-check"},wq={class:"form-check-input",type:"checkbox",id:"update",name:"update"},kq={class:"settings-row"},Eq={class:"form-control",id:"expiration",name:"expiration"},Cq={class:"settings-help"},_q={class:"settings-save"},Sq={class:"settings-save-status draft-status",role:"status"},Nq={key:0},Dq={key:1},Rq={key:2},Tq=["disabled"],Aq={key:1,class:"settings-save-error",role:"alert"},Oq=["aria-busy"],Pq={key:0,role:"status"},Iq={key:1,class:"settings-notice",role:"alert"},Vq=["disabled"],qq={key:2,class:"settings-notice",role:"status"},Mq={key:3,class:"settings-notice",role:"status"},$q=["disabled"],Lq={class:"settings-row"},Uq={class:"settings-inline"},Fq={key:0,class:"settings-help"},Bq={key:0,class:"settings-help"},zq={id:"settings-quota"},Hq={key:1,role:"status"},jq={key:1,class:"settings-notice"},Gq={key:2,class:"settings-notice"},Wq={key:3,class:"settings-notice"},Kq={key:4,class:"settings-help"},Yq={key:5,class:"settings-plan billing-plan"},Qq={class:"settings-comparison"},Jq={class:"settings-cycles"},Xq=["checked","onChange"],Zq={class:"settings-help"},xq={class:"settings-actions"},e8=["disabled"],t8={key:6,class:"settings-help"},n8={class:"settings-row"},o8={key:0,class:"settings-inline"},s8=["disabled"],i8={key:1,class:"settings-help"},r8=["disabled"],a8={key:4,class:"settings-row"},l8={class:"settings-inline"},d8=["disabled"],u8={key:0,class:"settings-pass"},c8={class:"settings-help"},p8=["disabled"],f8={key:5,class:"settings-row"},h8={class:"settings-help"},m8={id:"settings-account",class:"settings-account-panel"},v8={class:"paper-account-card"},g8=["src"],y8={class:"paper-account-identity"},b8={class:"paper-account-name"},w8={class:"paper-danger-zone"},k8={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},E8=["textContent"],C8=["disabled"],_8={key:1,class:"settings-delete-confirm"},S8={for:"delete-username"},N8={class:"settings-actions"},D8=["disabled"],R8=["disabled"];function ql(e,t){let s=We("quota-usage"),i=ye("field"),o=ye("form");return l(),d("div",Q5,[n("header",J5,[t[16]||(t[16]=n("h1",null,"Settings",-1)),n("div",X5,[n("span",null,"@"+u(e.user?.username),1)])]),n("nav",Z5,[(l(),d(W,null,Z([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:a=>e.settingsTab=r.id},u(r.label),9,x5)),64))]),N(n("div",null,[t[37]||(t[37]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),N((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[1]||(t[1]=ue(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",eq,[t[22]||(t[22]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[N(n("textarea",tq,null,512),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",nq,[t[21]||(t[21]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[17]||(t[17]=y("Matches become ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[18]||(t[18]=y(". Use ",-1)),t[19]||(t[19]=n("code",null,"term=>replacement",-1)),t[20]||(t[20]=y(" for a custom replacement. Regex is supported.",-1))])]),N(n("div",oq,"Terms are in an invalid format.",512),[[G,e.defaultsForm?.terms?.errors?.format]])])]),n("section",sq,[t[31]||(t[31]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",iq,[n("label",rq,[N(n("input",aq,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[23]||(t[23]=y("Keep links",-1))]),n("label",lq,[N(n("input",dq,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[24]||(t[24]=y("Render notebooks",-1))]),n("label",uq,[N(n("input",cq,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[25]||(t[25]=y("Show images",-1))]),n("label",pq,[N(n("input",fq,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r}
Line truncated
|
||||
`);for(let k=0;k<g.length;k++){let m=g[k];if(m.startsWith("diff --git")){v(),f();continue}if(m.startsWith("--- ")){r&&r.lines.length&&v(),f().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){f().newPath=m.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(m.startsWith("index ")||m.startsWith("similarity index")||m.startsWith("rename ")||m.startsWith("new file mode")||m.startsWith("deleted file mode")||m.startsWith("Binary files"))){if(m.startsWith("@@")){let b=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);b&&(a=parseInt(b[1],10),c=parseInt(b[2],10)),f().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:c,text:m.slice(1)}),c++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(r.lines.push({kind:"ctx",oldNo:a,newNo:c,text:m.startsWith(" ")?m.slice(1):m}),a++,c++))}}return s(o,r),o.join("")}})({trustAsHtml:e=>e});function QM(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function JM(e){return String(e??"").toUpperCase()}function XM(e,t,s=0){return(e||[]).slice(s,s+t)}function ZM(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function xM(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let a=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let c=r.split(".").reduce((v,g)=>v?.[g],i),f=r.split(".").reduce((v,g)=>v?.[g],o);if(typeof c=="string"&&(c=c.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),c!==f)return(c==null?-1:f==null?1:c<f?-1:1)*a}return 0})}function e6(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 t6(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var Hl={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:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",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:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",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
Line truncated
|
||||
jane.smith@example.org`},nq={class:"settings-syntax"},oq={class:"invalid-feedback"},sq={class:"settings-row"},iq={class:"settings-checks"},rq={class:"settings-check"},aq={class:"form-check-input",type:"checkbox",id:"link",name:"link"},lq={class:"settings-check"},dq={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},uq={class:"settings-check"},cq={class:"form-check-input",type:"checkbox",id:"image",name:"image"},pq={class:"settings-check"},fq={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},hq={class:"settings-check"},mq={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},vq={class:"settings-check"},gq={class:"form-check-input",type:"checkbox",id:"page",name:"page"},yq={class:"settings-row"},bq={class:"settings-check"},wq={class:"form-check-input",type:"checkbox",id:"update",name:"update"},kq={class:"settings-row"},Eq={class:"form-control",id:"expiration",name:"expiration"},Cq={class:"settings-help"},_q={class:"settings-save"},Sq={class:"settings-save-status draft-status",role:"status"},Nq={key:0},Dq={key:1},Rq={key:2},Tq=["disabled"],Aq={key:1,class:"settings-save-error",role:"alert"},Oq=["aria-busy"],Pq={key:0,role:"status"},Iq={key:1,class:"settings-notice",role:"alert"},Vq=["disabled"],qq={key:2,class:"settings-notice",role:"status"},Mq={key:3,class:"settings-notice",role:"status"},$q=["disabled"],Lq={class:"settings-row"},Uq={class:"settings-inline"},Fq={key:0,class:"settings-help"},Bq={key:0,class:"settings-help"},zq={id:"settings-quota"},Hq={key:1,role:"status"},jq={key:1,class:"settings-notice"},Gq={key:2,class:"settings-notice"},Wq={key:3,class:"settings-notice"},Kq={key:4,class:"settings-help"},Yq={key:5,class:"settings-plan billing-plan"},Qq={class:"settings-comparison"},Jq={class:"settings-cycles"},Xq=["checked","onChange"],Zq={class:"settings-help"},xq={class:"settings-actions"},e8=["disabled"],t8={key:6,class:"settings-help"},n8={class:"settings-row"},o8={key:0,class:"settings-inline"},s8=["disabled"],i8={key:1,class:"settings-help"},r8=["disabled"],a8={key:4,class:"settings-row"},l8={class:"settings-inline"},d8=["disabled"],u8={key:0,class:"settings-pass"},c8={class:"settings-help"},p8=["disabled"],f8={key:5,class:"settings-row"},h8={class:"settings-help"},m8={id:"settings-account",class:"settings-account-panel"},v8={class:"paper-account-card"},g8=["src"],y8={class:"paper-account-identity"},b8={class:"paper-account-name"},w8={class:"paper-danger-zone"},k8={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},E8=["textContent"],C8=["disabled"],_8={key:1,class:"settings-delete-confirm"},S8={for:"delete-username"},N8={class:"settings-actions"},D8=["disabled"],R8=["disabled"];function ql(e,t){let s=We("quota-usage"),i=ye("field"),o=ye("form");return l(),d("div",Q5,[n("header",J5,[t[16]||(t[16]=n("h1",null,"Settings",-1)),n("div",X5,[n("span",null,"@"+u(e.user?.username),1)])]),n("nav",Z5,[(l(),d(G,null,ee([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:a=>e.settingsTab=r.id},u(r.label),9,x5)),64))]),N(n("div",null,[t[37]||(t[37]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),N((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[1]||(t[1]=ce(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",eq,[t[22]||(t[22]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[N(n("textarea",tq,null,512),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",nq,[t[21]||(t[21]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[17]||(t[17]=y("Matches become ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[18]||(t[18]=y(". Use ",-1)),t[19]||(t[19]=n("code",null,"term=>replacement",-1)),t[20]||(t[20]=y(" for a custom replacement. Regex is supported.",-1))])]),N(n("div",oq,"Terms are in an invalid format.",512),[[j,e.defaultsForm?.terms?.errors?.format]])])]),n("section",sq,[t[31]||(t[31]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",iq,[n("label",rq,[N(n("input",aq,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[23]||(t[23]=y("Keep links",-1))]),n("label",lq,[N(n("input",dq,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[24]||(t[24]=y("Render notebooks",-1))]),n("label",uq,[N(n("input",cq,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[25]||(t[25]=y("Show images",-1))]),n("label",pq,[N(n("input",fq,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r
Line truncated
|
||||
`);for(let k=0;k<g.length;k++){let m=g[k];if(m.startsWith("diff --git")){v(),h();continue}if(m.startsWith("--- ")){r&&r.lines.length&&v(),h().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){h().newPath=m.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(m.startsWith("index ")||m.startsWith("similarity index")||m.startsWith("rename ")||m.startsWith("new file mode")||m.startsWith("deleted file mode")||m.startsWith("Binary files"))){if(m.startsWith("@@")){let b=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);b&&(a=parseInt(b[1],10),c=parseInt(b[2],10)),h().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:c,text:m.slice(1)}),c++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(r.lines.push({kind:"ctx",oldNo:a,newNo:c,text:m.startsWith(" ")?m.slice(1):m}),a++,c++))}}return s(o,r),o.join("")}})({trustAsHtml:e=>e});function QM(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function JM(e){return String(e??"").toUpperCase()}function XM(e,t,s=0){return(e||[]).slice(s,s+t)}function ZM(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function xM(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let a=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let c=r.split(".").reduce((v,g)=>v?.[g],i),h=r.split(".").reduce((v,g)=>v?.[g],o);if(typeof c=="string"&&(c=c.toLowerCase()),typeof h=="string"&&(h=h.toLowerCase()),c!==h)return(c==null?-1:h==null?1:c<h?-1:1)*a}return 0})}function e6(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 t6(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var Hl={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:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",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:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",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
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
@vue/shared/dist/shared.esm-bundler.js:
|
||||
|
||||
Reference in new issue
Block a user