1"use strict";(self.webpackChunkvirtual_judge=self.webpackChunkvirtual_judge||[]).push([[5063],{8774(t,e,n){n.d(e,{y:()=>i});var o=n(9787),a=n(1313).A,s=n(7569);let l=0;function i({$control:t,$ojInput:e,$probNum:n,suggestionType:i="all",onSelect:r}){const c=t.find(".problem-suggestions"),d="problem-suggestions-"+ ++l;let p;c.attr("id",d),n.attr("aria-controls",d);let u=[],b=-1;const m=new Set(a.getOjsList().map(t=>t.name));function f(){const t=e.val().trim();return{oj:m.has(t)?t:"",query:n.val().trim()}}function g(){b=-1,c.prop("hidden",!0).removeClass("show").empty(),n.attr("aria-expanded","false")}function v(t){const e=u[t];e&&(g(),r(e))}const h=(0,o.s)(function(){if(0===t.parents("html").length)return;p?.abort(),u=[];const e=f();e.query.length<2?g():(g(),p=s.get(`${basePath}/problem/suggestions`,{query:e.query,...e.oj?{oj:e.oj}:{},..."all"===i?{}:{type:i}}).done(o=>{const a=f();if(e.oj!==a.oj||e.query!==a.query||0===t.parents("html").length)return;u=Array.isArray(o)?o.filter(t=>t?.oj&&t?.probNum):[],c.empty(),u.forEach((t,e)=>{const n=s("<button/>",{type:"button",class:"dropdown-item problem-suggestion-item",role:"option"}).attr("data-index",e);s("<span/>",{class:"problem-suggestion-oj",text:t.oj}).appendTo(n),s("<span/>",{class:"problem-suggestion-separator",text:"-"}).appendTo(n),s("<span/>",{class:"problem-suggestion-prob-num",text:t.probNum}).appendTo(n),s("<span/>",{class:"problem-suggestion-separator",text:" | "}).appendTo(n),s("<span/>",{class:"problem-suggestion-title",text:t.title||""}).appendTo(n),n.appendTo(c)});const l=u.length>0;c.prop("hidden",!l).toggleClass("show",l),n.attr("aria-expanded",l?"true":"false")}))},250);function y(e){s(e.target).closest(".problem-suggestion-control").is(t)||g()}return n.on("input.problemSuggestions focus.problemSuggestions",h),n.on("keydown.problemSuggestions",t=>{var e;c.prop("hidden")||0===u.length||("ArrowDown"===t.key||"ArrowUp"===t.key?(t.preventDefault(),e=b+("ArrowDown"===t.key?1:-1),b=(e+u.length)%u.length,c.children().removeClass("active").eq(b).addClass("active")):"Enter"===t.key&&b>=0?(t.preventDefault(),v(b)):"Escape"===t.key&&(t.preventDefault(),g()))}),s(document).on("mousedown.problemSuggestions focusin.problemSuggestions",y),e.on("input.problemSuggestions change.problemSuggestions",h),c.on("mousedown.problemSuggestions",".problem-suggestion-item",function(t){t.preventDefault(),v(Number(s(this).attr("data-index")))}),{destroy(){p?.abort(),n.off(".problemSuggestions"),e.off(".problemSuggestions"),c.off(".problemSuggestions"),s(document).off("mousedown.problemSuggestions focusin.problemSuggestions",y),g()}}}},5451(t,e,n){n.d(e,{J:()=>a});var o=n(457);function a(t,e={}){return t?o.Ay.create(t,{animation:180,chosenClass:"vjudge-sortable-chosen",dragClass:"vjudge-sortable-drag",fallbackClass:"vjudge-sortable-fallback",fallbackOnBody:!0,fallbackTolerance:4,forceFallback:!0,ghostClass:"vjudge-sortable-ghost",...e}):null}},1500(t,e,n){n.d(e,{showEditContest:()=>L});var o=n(2931),a=n.n(o),s=n(8920),l=n(8796),i=n(3261);const r=/\d+/g;function c({prepareParams:t,onError:e,onSuccess:n}){let o=null;return{async beforeAddFile(){try{return o=await t(),!0}catch(t){return o=null,e(function(t){return t instanceof Error?t.message:String(t)}(t)),!1}},getExtraFields:()=>o||{},appendFormData:t=>(0,l.eI)(t,o||{}),handleProcessResponse:t=>t?.cellMeaningOptions?(n(function(t){const e={};return Object.entries(t||{}).forEach(([t,n])=>{const o=function(t){const e={};return(String(t||"").match(r)||[]).forEach((t,n)=>{e[n]=t}),e}(t);e[t]={},Object.entries(n||{}).forEach(([n,a])=>{e[t][n]="string"==typeof a&&a.startsWith("contest.replay.cell_options.")?{i18nKey:a,i18nArgs:o}:a})}),e}(t.cellMeaningOptions),t),!0):(e(t?.error||""),!1)}}var d=n(8774),p=n(1438),u=n(5416),b=n(9616),m=n(2280);const f=n.p+"71f4e3f87616629da9a7.png";var g=n(7532),v=n(1008),h=n(3978),y=n(1693),w=n(5451),k=n(7411),x=n(7569);function _({select:t,trigger:e,menu:n}){const o=x(t),a=x(e),s=x(n);let l=[];function i(t){return"string"==typeof t?t:x(t).clone(!0)}function r(){const t=function(){const t=String(o.val()??"");return l.find(e=>String(e.value)===t)||l[0]}();a.find(".contest-icon-select-value").empty(),t&&a.find(".contest-icon-select-value").append(i(t.icon),x("<span />").text(t.label)),s.find(".contest-icon-select-option").each(function(){x(this).toggleClass("active",String(x(this).attr("data-value"))===String(t?.value??""))})}return s.on("click",".contest-icon-select-option",function(){o.val(x(this).attr("data-value")).trigger("change")}),o.on("change",r),{setOptions:function(t){l=t,s.empty(),l.forEach(t=>{s.append(x("<button />",{type:"button",class:"dropdown-item contest-icon-select-option"}).attr("data-value",t.value).append(i(t.icon),x("<span />").text(t.label)))}),r()},sync:r}}var S=n(1313).A,C=n(7569),T=n(8853).A;const j={type:0,contestId:0,groupId:1003,accessCode:null,participantMode:0,openness:1,title:"Test a contest",beginTime:1479577986e3,length:18e6,timeMachine:1,problems:[{oj:"POJ",probNum:"1001",alias:"Alias 667",pid:1235,enabledStatementKe
1ys:[123,456]},{oj:"HUST",probNum:"1001",alias:"Alias 233",pid:12345,enabledStatementKeys:[789,123]}],rankCellMeaning:{"":0,"-1":1,"123(-2)":2},groups:{1001:"Group A",1002:"Group C"},errMsg:"Unknown error!"},z=[{sumTime:1,penalty:1200,partialScore:0,oneShot:0},{sumTime:0,penalty:0,partialScore:1,oneShot:0},{sumTime:0,penalty:0,partialScore:1,oneShot:1}];let I,O,M,N,A,E={};function D(){return S.getServerTime()>M.beginTime&&2!=M.type&&M.contestId>0}function P(){const t=[];return C("tr.real").each(function(e,n){const o=C(n);if(!o.find("[v=probNum]").val().trim())return;const a=o.data("info"),s=o.find("td.num").text();if(!a)throw"Problem "+s+" is not ready";if(a.alias=o.find("[v=alias]").val(),a.weight=o.find("[v=weight]").val(),a.enabledStatementKeys=E[a.pid],null===a.weight.match(/^\d+$/))throw"Weight '"+a.weight+"' is not valid.";t.push(a)}),t}function R(t){if(!t.match(/^\d{1,4}:\d{1,2}:\d{1,2}$/))throw"Length format should be 'hh:mm:ss'";const e=t.split(/\D+/);return 1e3*(3600*parseInt(e[0],10)+60*parseInt(e[1],10)+parseInt(e[2],10))}function F(){O.groupId=I.find("#contest-group").val(),O.accessCode=I.find("#contest-access-code").val(),O.title=I.find("#contest-title").val(),2===O.type&&(O.participantMode=0),O.beginTime=S.parseDate(I.find("#contest-begin-time").val()).valueOf(),O.length=R(I.find("#contest-length").val()),O.problems=P(),O.rankCellMeaning=function(){const t={};return C("#clarifyRankCell_form").find("select").each(function(e,n){const o=C(n).attr("behalf");t[o]=n.value}),Object.keys(t).length?t:null}(),O.penalty=parseInt(I.find("#contest-penalty").val()),O.enableFreeze?(O.freezeDuration=parseInt(I.find("#contest-freeze-duration").val()||0),O.unfreezeDuration=parseInt(I.find("#contest-unfreeze-duration").val()||0)):(O.freezeDuration=0,O.unfreezeDuration=0)}function q(){return{sumTime:O.sumTime,penalty:parseInt(C("#contest-penalty").val()),partialScore:O.partialScore,oneShot:O.oneShot}}function $(){O.errMsg?(I.find(".modal-body").hide(),C("#edit-alert").text(O.errMsg).show()):(function(){const t=C("#contest-type");let e,n;const o=function(t,e=!0){if(!t&&!e)return"";const n=t||b;return`<img src="${S.escapeHtml(n)}" alt="" aria-hidden="true">`},l=function(){const t=Number(O.groupId)>0?1:0;C("#contest-openness").find("> option:eq(1)").text([T.t("contest.openness_tip.protected_0"),T.t("contest.openness_tip.protected_1")][t]),C("#contest-openness").find("> option:eq(2)").text([T.t("contest.openness_tip.private_0"),T.t("contest.openness_tip.private_1")][t]),n?.setOptions(p())},i=function(t){var e;O.type=parseInt(t),C("#contest-access-code-group").css("display",O.type<2&&O.openness>0&&!Number(O.groupId)?"block":"none"),C("#contest-group-group").css("display",2!=O.type?"flex":"none"),C("#contest-openness-group").css("display",["block","block","none"][t]),C("#contest-participant-mode-group").css("display",2!=O.type?"flex":"none"),C("#contest-freeze-group").toggle(0===O.type),C("#freeze-options").toggle(0===O.type&&O.enableFreeze),l(),C("#contest-participant-mode-0").prop("checked",1===O.type||0===O.participantMode),C('#contest-participant-mode-1, label[for="contest-participant-mode-1"]').prop("disabled",1===O.type).toggleClass("disabled",1===O.type),1===O.type&&(O.participantMode=0),e=2==t,C("#nav-item-replay").toggle(e),C("#contest-edit-replay-pane").toggleClass("d-none",!e),!e&&C("#contest-edit-replay-tab").hasClass("active")&&a().getOrCreateInstance(C("#contest-edit-basic-tab")[0]).show()};(0,g.R)(t,O.type,i),i(O.type),t.find("#contest-type-0 + label img").attr({src:u,height:20}),t.find("#contest-type-2 + label img").attr({src:m,height:20}),M.contestId>0&&(D()?(t.find("input").prop("disabled",!0),t.find("label").addClass("disabled")):2===M.type?(t.find("#contest-type-0, #contest-type-1").prop("disabled",!0),t.find('label[for="contest-type-0"], label[for="contest-type-1"]').addClass("disabled")):(t.find("#contest-type-2").prop("disabled",!0),t.find('label[for="contest-type-2"]').addClass("disabled")));const r=C("#contest-group"),c=(0,y._j)(O.groups);c.forEach(([t,e])=>r.append(C("<option />").val(t).text(e))),O.groupId&&r.val(O.groupId),e=_({select:"#contest-group",trigger:"#contest-group-trigger",menu:"#contest-group-menu"}),e.setOptions([{value:0,label:T.t("contest.group.none"),icon:o(null,!1)},...c.map(([t,e])=>({value:t,label:e,icon:o(Array.isArray(O.groupOptions?.[t])?O.groupOptions[t][1]:null)}))]),r.on("change",function(){O.groupId=Number(this.value)||0,l(),C("#contest-access-code-group").css("display",O.type<2&&O.openness>0&&!O.groupId?"block":"none")}),C("#contest-access-code").val(O.accessCode),O.participantMode=Number.isInteger(O.participantMode)?O.participantMode:0,(0,g.R)(C("#contest-participant-mode"),O.participantMode,function(t){O.participantMode=parseInt(t)}),C("#contest-participant-mode-group").css("display",2!=O.type?"flex":"none");const d=C("#contest-openness"),p=function(){return d.find("option").toArray().map(t=>{return{value:Number(t.value),label:t.textContent,icon:C("<i />",{class:(e=Number(t.value),["fa fa-unlock text-success","fa fa-lock text-warning","fa fa-lock text-danger"][e]||""),"aria-hidden":"true"})};var e})};d.val(O.openness).on("change",function(){O.openness=parseInt(this.value),n.sync(),C("#contest-access-code-group").css("display",O.type<2&&O.openness>0&&!Number(O.groupId)?"block":"none")}),n=_({select:"#contest-openness",trigger:"#contest-openness-trigger",menu:"#contest-openness-menu"}
1),n.setOptions(p()),C("#contest-title").val(O.title),O.contestId?C("#editContestModalLabel").text(T.t("contest.view.update")+" - "+O.title):O.problems.length&&C("#editContestModalLabel").text(T.t("contest.view.clone"));const f=C("#contest-begin-time");f.val(S.formatDate(O.beginTime));const v=D();v&&f.prop("disabled",!0),(new Date).getTimezoneOffset(),C("label[for=contest-begin-time]").append(C("<small />").text(" ("+S.getTimezone()+")"));const h=O.length||18e6,w=Math.floor(h/36e5),k=Math.floor(h%36e5/6e4),x=Math.floor(h%6e4/1e3),j=C("#contest-length");function I(){const t=C("#contest-end-time");try{const e=f.val(),n=S.parseDate(e).valueOf(),o=R(j.val());t.html(S.formatDate(n+o))}catch(e){t.html("--")}}j.val(w+":"+k+":"+x).on("input",I),N=(0,s.z)(f.get(0),{allowInput:!0,clickOpens:!v,dateFormat:"Y-m-d H:i:S",defaultDate:f.val(),enableSeconds:!0,enableTime:!0,time_24hr:!0,onChange:I,onValueUpdate:I}),f.on("input change",I),I(),C("#contest-penalty").val(O.penalty);const A=C(".rank-rule"),E=function(){const t=z.findIndex(function(t){return O&&O.sumTime===t.sumTime&&O.penalty===t.penalty&&O.partialScore===t.partialScore&&O.oneShot===t.oneShot});return-1===t?99:t}();let P=99===E?q():null;(0,g.R)(C("#contest-rank-rule"),E,function(t){const e=parseInt(t);99===e?(P&&B(P),A.show()):(A.is(":visible")&&(P=q()),A.hide(),B(z[e]))}),A.toggle(99===E);const F=(0,g.R)(C("#contest-sum-time"),O.sumTime,function(t){O.sumTime=parseInt(t)}),$=(0,g.R)(C("#contest-partial-score"),O.partialScore,function(t){O.partialScore=parseInt(t)}),L=(0,g.R)(C("#contest-one-shot"),O.oneShot,function(t){O.oneShot=parseInt(t)}),J=C("#contest-enable-freeze");function B(t){Object.assign(O,t),F.set(O.sumTime),C("#contest-penalty").val(O.penalty),$.set(O.partialScore),L.set(O.oneShot)}O.enableFreeze=O.freezeDuration>0?1:0,(0,g.R)(J,O.enableFreeze,function(t){O.enableFreeze=parseInt(t)>0,C("#freeze-options").toggle(O.enableFreeze)}),C("#freeze-options").toggle(0===O.type&&O.enableFreeze),C("#contest-freeze-duration").val(O.freezeDuration),C("#contest-unfreeze-duration").val(O.unfreezeDuration),C('#contest-participant-mode-1, label[for="contest-participant-mode-1"]').prop("disabled",1===O.type).toggleClass("disabled",1===O.type)}(),function(){const t=C("#cp_row_template"),e=C("#addBtn"),n=C("#edit-plain"),o=C("#reset-problems"),a=C("#clear-problems"),s=C("#problems-plain-btn-cancel"),l=S.getOjsList(),r=new Set(l.map(t=>t.name));for(let e=0;e<l.length;e++)t.find("select").append("<option value='"+l[e].name+"'>"+l[e].name+"</option>");function c(t){"table"===t?(C("#problems-opt").show(),C("#card-problems-plain").hide(),C("#card-problems").show(),C("#btn-confirm").prop("disabled",!1)):"plain"===t&&(C("#problems-opt").hide(),C("#card-problems-plain").show(),C("#card-problems").hide(),C("#problems-plain-alert").hide(),C("#btn-confirm").prop("disabled",!0))}function p(e,n){const o=t.clone();let a;C("tr.cp_row.real").length&&(a=C("tr.cp_row.real").eq(-1)),o.removeAttr("id").addClass("real").insertBefore("#cp_row_template").show();const s=o.find("[v=oj]"),l=e?e.oj:a?a.find("[v=oj]").val():"All";s.val(l),s.click(function(){(0,i.A)({selected:s.val(),callback:function(t){s.val(t).change()}})});const c=o.find("[v=probNum]"),p=a?a.find("[v=probNum]").val().trim():"";let b;e?c.val(e.probNum):(b=p.match(/^(.*?)(\d+)$/))?c.val(b[1]+(parseInt(b[2])+1)):(b=p.match(/^(.*)([A-Ya-y])$/))?c.val(b[1]+String.fromCharCode(b[2].charCodeAt(0)+1)):c.val("");const m=(0,d.y)({$control:o.find(".problem-suggestion-control"),$ojInput:s,$probNum:c,onSelect(t){s.val(t.oj),c.val(t.probNum),g()}});s.on("change",g),c.on("change",g),C("[v=weight]",o).val(e?e.weight:a?C("[v=weight]",a).val():"1"),C("[v=alias]",o).val(e?e.alias:""),C("td:eq(5), td:eq(6)",o).html("");const f=C(".contest-edit-problems-table-scroll");function g(){o.removeData("info"),o.removeData("crawlTaskContext");const t=s.val().trim(),e=r.has(t)?t:"",n=c.val().trim(),a=o.children().eq(-1);!function(){const t=o.children().eq(-1);(0,v.kM)(t),t.removeAttr("data-bs-toggle title").empty()}(),e&&n&&(a.html("<i class='fa fa-spinner fa-spin'></i>"),C.get(basePath+`/problem/info/${encodeURIComponent(e+"-"+n)}`).done(function(t){if(0===o.parents("html").length||e!==s.val().trim()||n!==c.val().trim())return;const l=t.pid,i=t.title,r=t.crawling,d=t.error;o.data("info",{pid:l,oj:e,probNum:n});let p="<i class='fa problem-lookup-status'></i> ";p+=l?"<a target='_blank' href='"+basePath+"/problem/"+e+"-"+n+"'><span>"+i+"</span></a>":"<i18n>contest.problem_lookup.not_found</i18n>";const u=r?"fa-spinner fa-spin":d?"fa-exclamation-triangle text-danger":l?"fa-check text-success":"";if(a.html(p).i18n().find(".problem-lookup-status").addClass(u),(0,v.kM)(a),d){o.data("crawlTaskContext",{oj:e,problemId:n}),a.find(".problem-lookup-status").attr("data-bs-toggle","tooltip").attr("title",T.t(d));const t=T.t("problem.view.recrawl");a.append(C("<button>",{type:"button",class:"btn btn-sm btn-outline-primary recrawl-problem ms-2",title:t,"aria-label":t}).attr("data-bs-toggle","tooltip").append('<i class="fa fa-refresh" aria-hidden="true"></i>'))}(0,v.initTooltips)(a)}))}f.scrollTop(f.prop("scrollHeight")),o.on("click","td:last-child .recrawl-problem",function(){const t=o.data("crawlTaskContext");t&&(0,k.c)({remoteOj:t.oj,remoteProblemId:t.problemId,autoCreate:!0})}),o.find(".delete").click(function(){m.destroy(),C(this).parent().parent().remove(),u()}),n&&u(),g()}function u(){t.appendTo(C("#addtable").find("tbody")),C("tr.cp_row").each(function(t){C("td:last-child",C(this)).prev().html(S.getCproblemNum(t))}),C("tr.cp_row.real").length>=702?e.hide():e.show()}e.click(function(){p(null,!0)}),a.click(function(){C("tr.cp_row.real .delete").trigger("click"),p(null,!0)}),o.click(function(){C("tr.cp_row.real .delete").trigger("click"),E={}
1,M.problems.forEach(function(t){p(t,!1),E[t.pid]=t.enabledStatementKeys}),0===M.problems.length&&p(null,!1),u()}),t.find("a img").attr("src",f),0===O.problems.length?p(null,!1):O.problems.forEach(function(t){p(t,!1),E[t.pid]=t.enabledStatementKeys}),u(),A=(0,w.J)(C("#addTable tbody")[0],{direction:"vertical",draggable:"tr.cp_row.real",handle:".problem-drag-handle",onEnd:u}),n.click(function(){const t=P().map(function(t){return t.oj+"\t|\t"+t.probNum+"\t|\t"+t.weight+"\t|\t"+t.alias}).join("\n");C("#problems-plain").val(t),c("plain")}),s.click(function(){c("table")}),C("#problems-plain-btn-confirm").click(function(){const t=S.getOjs(),e=function(){const e=[],n=C("#problems-plain").val().split("\n");for(let o=0;o<n.length;o++){const a=n[o].trim();if(0===a.length)continue;const s=a.split("|");if(4!==s.length)return"Line '"+a+"' is not valid.";const l=s[0].trim(),i=s[1].trim(),r=s[2].trim(),c=s[3].trim();if(!t[l])return"Unknown OJ '"+l+"'.";if(0===i.length)return"Problem number is empty.";if(null===r.match(/^\d+$/))return"Weight '"+r+"' is not valid.";e.push({oj:l,probNum:i,weight:parseInt(r),alias:c})}return e}();"string"!=typeof e?(C("tr.cp_row.real").remove(),e.forEach(function(t){p(t,!1)}),u(),c("table")):C("#problems-plain-alert").text(e).show()})}(),function(){const t=function(t){C("#edit-alert").text(t).show()},e=c({prepareParams(){if(F(),O.problems.length<=0)throw new Error("Please select at least 1 problem");return{contestLength:O.length,problemNumber:O.problems.length}},onError(e){t(e)},onSuccess(t){!function(t){const e=C("#clarifyRankCell_form");e.empty(),e.append(`<div class='row' style='margin: 20px;'>${T.t("contest.edit.rank_cell_meaning")}</div>`),Object.keys(t).forEach(function(n){const o=t[n],a=C("<select class='form-select' style='width: 100%'></select>");a.attr("behalf",n);for(const t in o)a.append("<option value='"+t+"'>"+(0,p.EL)(o[t])+"</option>");e.append(C("<div class='form-group row' />").append("<div class='col-sm-3' style='text-align: right'>"+n+"</div>").append("<div class='col-sm-9'>"+a[0].outerHTML+"</div>"))})}(t),C("#edit-alert").hide()}});(0,l.ky)(document.getElementById("replay-rank-upload-input"),{acceptedFileTypes:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],beforeAddFile:()=>e.beforeAddFile(),endpoint:`${basePath}/contest/uploadRank`,extraFields:()=>e.getExtraFields(),fieldName:"rankListFile",onError(e){t(e)},onSuccess(t){e.handleProcessResponse(t)},sizeLimitBytes:10485760,t:T.t.bind(T)})}(),function(){const t=C("#btn-confirm");t.click(function(){try{F()}catch(t){return C("#edit-alert").text(t).show(),!1}t.prop("disabled",!0),C.ajax({type:"POST",url:basePath+"/contest/edit",dataType:"json",contentType:"application/json",data:JSON.stringify(O)}).done(function(e){e.error?(t.prop("disabled",!1),C("#edit-alert").renderServerText(e.error)):e.contestId&&(window.location.href=basePath+"/contest/"+e.contestId)}).fail(function(e,n,o){t.prop("disabled",!1),C("#edit-alert").text(n+" - "+o).show()})})}())}function L(t){I||(0,h.showTemplateModal)('<div class="modal fade" id="editContestModal" tabindex="-1" role="dialog" style="overflow: auto">\n <div class="modal-dialog modal-lg" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title" id="editContestModalLabel" data-i18n="contest.create_contest"></h5>\n <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>\n </div>\n <div class="modal-body">\n <div class="contest-edit-panel">\n <ul class="nav nav-tabs contest-edit-tabs" id="contest-edit-tabs" role="tablist">\n <li class="nav-item" role="presentation">\n <button class="nav-link active"\n id="contest-edit-basic-tab"\n data-bs-toggle="tab"\n data-bs-target="#contest-edit-basic-pane"\n type="button"\n role="tab"\n aria-controls="contest-edit-basic-pane"\n aria-selected="true"\n data-i18n="contest.basic_info"></button>\n </li>\n <li class="nav-item" role="presentation">\n <button class="nav-link"\n id="contest-edit-problems-tab"\n data-bs-toggle="tab"\n data-bs-target="#contest-edit-problems-pane"\n type="button"\n role="tab"\n aria-controls="contest-edit-problems-pane"\n aria-selected="false"\n data-i18n="contest.problem_set"></button>\n </li>\n <li class="nav-item" id="nav-item-replay" role="presentation" style="display: none">\n <button class="nav-link"\n id="contest-edit-replay-tab"\n data-bs-toggle="tab"\n data-bs-target="#contest-edit-replay-pane"\n type="button"\n role="tab"\n aria-controls="contest-edit-replay-pane"\n aria-selected="false"\n data-i18n="contest.replay_info"></button>\n </li>\n </ul>\n\n <div class="tab-content contest-edit-tab-content">\n <section class="tab-pane show active contest-edit-section"\n id="contest-edit-basic-pane"\n role="tabpanel"\n aria-labelledby="contest-edit-basic-tab">\n <div class="card-body">\n <div class="form-group row">\n <label for="contest-type" class="col-2 col-form-label">\n <i18n>contest.type_label</i18n>\n </label>\n <div class="btn-group col-10" role="group" aria-label="Contest type" id="contest-type">\n <input class="btn-check" type="radio" name="contestType" id="contest-type-0" value="
10" autocomplete="off">\n <label class="btn btn-secondary" for="contest-type-0">\n <img src="">\n <i18n>contest.type.classical</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestType" id="contest-type-1" value="1" autocomplete="off">\n <label class="btn btn-secondary" for="contest-type-1">\n <i class="fa fa-smile-o text-warning" aria-hidden="true"></i>\n <i18n>contest.type.practice</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestType" id="contest-type-2" value="2" autocomplete="off">\n <label class="btn btn-secondary" for="contest-type-2">\n <img src="">\n <i18n>contest.type.replay</i18n>\n </label>\n </div>\n </div>\n\n <div class="form-group row" id="contest-group-group">\n <label for="contest-group" class="col-2 col-form-label">\n <i18n>contest.group_owner</i18n>\n </label>\n <div class="col-10">\n <div class="contest-icon-select">\n <button type="button"\n class="btn btn-outline-secondary dropdown-toggle contest-icon-select-trigger"\n id="contest-group-trigger"\n data-bs-toggle="dropdown"\n data-bs-display="static"\n aria-expanded="false">\n <span class="contest-icon-select-value" id="contest-group-selection"></span>\n </button>\n <div class="dropdown-menu contest-icon-select-menu" id="contest-group-menu" aria-labelledby="contest-group-trigger"></div>\n <select class="visually-hidden" id="contest-group" aria-hidden="true" tabindex="-1">\n <option value="0" data-i18n="contest.group.none"></option>\n </select>\n </div>\n </div>\n </div>\n\n <div class="form-group row" id="contest-openness-group">\n <label for="contest-openness" class="col-2 col-form-label">\n <i18n>contest.openness</i18n>\n </label>\n <div class="col-10">\n <div class="contest-icon-select">\n <button type="button"\n class="btn btn-outline-secondary dropdown-toggle contest-icon-select-trigger"\n id="contest-openness-trigger"\n data-bs-toggle="dropdown"\n data-bs-display="static"\n aria-expanded="false">\n <span class="contest-icon-select-value" id="contest-openness-selection"></span>\n </button>\n <div class="dropdown-menu contest-icon-select-menu" id="contest-openness-menu" aria-labelledby="contest-openness-trigger"></div>\n <select class="visually-hidden" id="contest-openness" aria-hidden="true" tabindex="-1">\n <option value="0" data-i18n="contest.openness_tip.public"></option>\n <option value="1" data-i18n="contest.openness_tip.protected"></option>\n <option value="2" data-i18n="contest.openness_tip.private"></option>\n </select>\n </div>\n </div>\n </div>\n\n <div class="form-group row" id="contest-access-code-group">\n <label for="contest-access-code" class="col-2 col-form-label">\n <i18n>contest.access_code</i18n>\n </label>\n <div class="col-10">\n <input class="form-control" type="text" id="contest-access-code">\n </div>\n </div>\n\n <div class="form-group row">\n <label for="contest-title" class="col-2 col-form-label">\n <i18n>contest.title</i18n>\n </label>\n <div class="col-10">\n <input class="form-control" type="text" id="contest-title">\n </div>\n </div>\n\n <div class="form-group row">\n <label for="contest-begin-time" class="col-2 col-form-label">\n <i18n>contest.begin_time</i18n>\n </label>\n <div class="col-10">\n <input class="form-control"\n type="text"\n id="contest-begin-time"\n placeholder="eg: 2016-12-31 23:59:59">\n </div>\n </div>\n\n <div class="form-group row">\n <label for="contest-length" class="col-2 col-form-label">\n <i18n>contest.length</i18n>\n </label>\n <div class="col-4">\n <input class="form-control" type="text" id="contest-length" placeholder="hh:mm:ss">\n </div>\n <div class="col-6 contest-edit-inline-hint contest-end-time-hint">\n (<i18n>contest.end_time</i18n>: <span id="contest-end-time"></span>)\n </div>\n </div>\n\n <div class="form-group row" id="contest-participant-mode-group">\n <label for="contest-participant-mode" class="col-2 col-form-label" id="contest-participant-mode-label">\n <i18n>contest.participant_mode.label</i18n>\n </label>\n <div class="col-10 d-flex flex-wrap align-items-center gap-3">\n <div class="btn-group" role="group" aria-labelledby="contest-participant-mode-label" id="contest-participant-mode">\n <input class="btn-check" type="radio" name="contestParticipantMode" id="contest-participant-mode-0" value="
10" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-participant-mode-0">\n <i18n>contest.participant_mode.individual_only</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestParticipantMode" id="contest-participant-mode-1" value="1" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-participant-mode-1">\n <i18n>contest.participant_mode.user_or_team</i18n>\n </label>\n </div>\n <a href="https://vjudge.net/article/18803" target="_blank" class="btn btn-link contest-rank-rule-help" id="contest-participant-mode-help">\n <i class="fa fa-question-circle"></i>\n </a>\n </div>\n </div>\n\n <div class="form-group row" id="contest-rank-rule-group">\n <label for="contest-rank-rule" class="col-2 col-form-label">\n <i18n>contest.rank_rule.label</i18n>\n </label>\n <div class="col-10 contest-rank-rule-control">\n <div class="btn-group" role="group" aria-label="Contest rank rule" id="contest-rank-rule">\n <input class="btn-check" type="radio" name="contestRankRule" id="contest-rank-rule-0" value="0" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-rank-rule-0">\n <i18n>contest.rank_rule.0</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestRankRule" id="contest-rank-rule-1" value="1" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-rank-rule-1">\n <i18n>contest.rank_rule.1</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestRankRule" id="contest-rank-rule-2" value="2" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-rank-rule-2">\n <i18n>contest.rank_rule.2</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestRankRule" id="contest-rank-rule-99" value="99" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-rank-rule-99">\n <i18n>contest.rank_rule.99</i18n>\n </label>\n </div>\n <a href="https://vjudge.net/article/11038" target="_blank" class="btn btn-link contest-rank-rule-help" id="contest-rank-rule-help">\n <i class="fa fa-question-circle"></i>\n </a>\n </div>\n </div>\n\n <div class="rank-rule" style="border: 1px solid #888; padding: 10px 10px 0 0; margin-bottom: 10px">\n <div class="form-group row rank-rule" id="contest-sum-time-group">\n <label for="contest-sum-time" class="col-2 col-form-label">\n <i18n>contest.sum_time.label</i18n>\n </label>\n <div class="btn-group col-10" role="group" aria-label="Contest sum time" id="contest-sum-time">\n <input class="btn-check" type="radio" name="contestSumTime" id="contest-sum-time-1" value="1" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-sum-time-1">\n <i18n>contest.sum_time.1</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestSumTime" id="contest-sum-time-0" value="
10" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-sum-time-0">\n <i18n>contest.sum_time.0</i18n>\n </label>\n </div>\n </div>\n\n <div class="form-group row rank-rule">\n <label for="contest-penalty" class="col-2 col-form-label">\n <i18n>contest.penalty_each</i18n>\n </label>\n <div class="col-10">\n <input class="form-control" type="text" id="contest-penalty">\n </div>\n </div>\n\n <div class="form-group row rank-rule" id="contest-partial-score-group">\n <label for="contest-partial-score" class="col-2 col-form-label">\n <i18n>contest.partial_score.label</i18n>\n </label>\n <div class="btn-group col-10" role="group" aria-label="Contest partial score" id="contest-partial-score">\n <input class="btn-check" type="radio" name="contestPartialScore" id="contest-partial-score-0" value="0" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-partial-score-0">\n <i18n>contest.partial_score.0</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestPartialScore" id="contest-partial-score-1" value="1" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-partial-score-1">\n <i18n>contest.partial_score.1</i18n>\n </label>\n </div>\n </div>\n\n <div class="form-group row rank-rule" id="contest-one-shot-group">\n <label for="contest-one-shot" class="col-2 col-form-label">\n <i18n>contest.one_shot</i18n>\n </label>\n <div class="btn-group col-10" role="group" aria-label="Contest one shot" id="contest-one-shot">\n <input class="btn-check" type="radio" name="contestOneShot" id="contest-one-shot-0" value="0" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-one-shot-0">\n <i18n>contest.one_shot.0</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestOneShot" id="contest-one-shot-1" value="1" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-one-shot-1">\n <i18n>contest.one_shot.1</i18n>\n </label>\n </div>\n </div>\n </div>\n\n <div class="form-group row" id="contest-freeze-group">\n <label class="col-2 col-form-label">\n <i18n>contest.freeze_setting</i18n>\n </label>\n <div class="btn-group col-10" role="group" aria-label="Contest enable freeze" id="contest-enable-freeze">\n <input class="btn-check" type="radio" name="contestEnableFreeze" id="contest-enable-freeze-0" value="0" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-enable-freeze-0">\n <i18n>contest.enable_freeze.0</i18n>\n </label>\n <input class="btn-check" type="radio" name="contestEnableFreeze" id="contest-enable-freeze-1" value="1" autocomplete="off"/>\n <label class="btn btn-secondary" for="contest-enable-freeze-1">\n <i18n>contest.enable_freeze.1</i18n>\n </label>\n </div>\n </div>\n\n <div id="freeze-options" style="border: 1px solid #888; padding: 10px 10px 0 0; margin-bottom: 10px;">\n <div class="form-group row">\n <label for="contest-freeze-duration" class="col-2 col-form-label">\n <i18n>contest.freeze_duration</i18n>\n </label>\n <div class="col-10">\n <input class="form-control" type="number" id="contest-freeze-duration" min="0"\n placeholder="60"\n style="width: 150px; display: inline-block;"/>
1\n <span style="margin-left: 10px;"><i18n>contest.minutes_before_end</i18n></span>\n </div>\n </div>\n <div class="form-group row">\n <label for="contest-unfreeze-duration" class="col-2 col-form-label">\n <i18n>contest.unfreeze_duration</i18n>\n </label>\n <div class="col-10">\n <input class="form-control" type="number" id="contest-unfreeze-duration" min="0" max="10080"\n placeholder="1440"\n style="width: 150px; display: inline-block;"/>\n <span style="margin-left: 10px;"><i18n>contest.minutes_after_end</i18n></span>\n </div>\n </div>\n </div>\n\n </div>\n </section>\n\n <section class="tab-pane contest-edit-section"\n id="contest-edit-problems-pane"\n role="tabpanel"\n aria-labelledby="contest-edit-problems-tab">\n <div class="card-body" id="card-problems-plain" style="display: none">\n <textarea class="form-control"\n id="problems-plain"\n name="problems-plain"\n rows="15"\n placeholder="OJ | Prob | Weight | Alias"></textarea>\n <div class="problems-plain-footer">\n <div class="alert alert-danger" role="alert" id="problems-plain-alert"\n style="display: none"></div>\n <button type="button" class="btn btn-secondary" id="problems-plain-btn-cancel"\n data-i18n="button.cancel"></button>\n <button type="button" class="btn btn-primary" id="problems-plain-btn-confirm"\n data-i18n="button.confirm"></button>\n </div>\n </div>\n\n <div class="card-body" id="card-problems">\n <div class="alert alert-warning" id="info-problem-set-fixed" style="display: none"\n data-i18n="contest.edit.problem_set_locked"></div>\n <div id="problems-opt">\n <button type="button" id="addBtn" class="contest-problem-action add-problem">\n <i class="fa fa-plus"></i>\n <i18n>contest.add_a_problem</i18n>\n </button>\n <button type="button" id="edit-plain" class="contest-problem-action"\n data-i18n-title="contest.problem_set_tip">\n <i class="fa fa-edit"></i>\n <span data-i18n="button.edit"></span>\n </button>\n <button type="button" id="reset-problems" class="contest-problem-action">\n <i class="fa fa-undo"></i>\n <span data-i18n="button.reset"></span>\n </button>\n <button type="button" id="clear-problems" class="contest-problem-action">\n <i class="fa fa-trash"></i>\n <span data-i18n="button.clear"></span>\n </button>\n </div>\n <div class="contest-edit-problems-table-scroll">\n <table id="addTable" class="sorted_table">\n <thead>\n <tr>\n <th style="width:52px;min-width:52px;text-align: right;"></th>\n <th style="width:120px;min-width:120px;text-align: center;">OJ</th>\n <th style="width:100px;min-width:100px;text-align: center;" data-i18n="contest.prob">\n ProbNum\n </th>\n <th style="min-width:40px;text-align: center;" data-i18n="contest.weight">Wgt.</th>\n <th style="width:120px;min-width:120px;text-align: center;" data-i18n="contest.alias">\n Alias\n </th>\n <th style="width:30px;min-width:30px;text-align: center;"></th>\n <th style="min-width:350px;text-align:left" data-i18n="contest.problem_title">æ é¢</th>\n </tr>\n </thead>\n <tbody>\n <tr id="cp_row_template" class="cp_row" style="display:none">\n <td class="oprt" style="text-align: right;">\n <button type="button"\n class="sortable-drag-handle problem-drag-handle"\n data-i18n-title="button.reorder"\n data-i18n-aria-label="button.reorder">\n <i class="fa fa-bars" aria-hidden="true"></i>\n </button>\n <a class="delete" href="javascript:void(0)">\n <i class="fa fa-remove text-danger"></i>\n </a>\n </td>\n <td>\n <input class="form-control" v="oj" style="text-align: center"/>\n </td>\n <td>\n <div class="problem-suggestion-control">\n <input class="form-control" v="probNum" autocomplete="off" aria-autocomplete="list" aria-expanded="false"/>\n <div class="problem-suggestions dropdown-menu" hidden role="listbox" data-bs-popper="static"></div>\n </div>\n <input type="hidden" v="pid"/>\n </td>\n <td>\n <input class="form-control"\n style="text-align: center; padding-left: 0; padding-right: 0" v="weight"/>\n </td>\n <td>\n <input class="form-control" v="alias"/>\n </td>\n <td class="num" style="text-align: center;"></td>\n <td style="white-space: nowrap"></td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n </section>\n\n <section class="tab-pane contest-edit-section"\n id="contest-edit-replay-pane"\n role="tabpanel"\n aria-labelledby="contest-edit-replay-tab">\n <div class="card-body row" id="card-body-replay">\n <div class="col-md-3">\n <div class="filepond-modal-copy" data-i18n="upload.filepond.replay_hint"></div>\n <input id="replay-rank-upload-input" type="file">\n </div>\n <div class="col-md-9">\n <div class="row" id="clarifyRankCell_form">\n <div></div>\n </div>\n </div>\n </div>\n </section>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <div class="alert alert-danger" role="alert" id="edit-alert" style="display: none"></div>\n <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" data-i18n="button.cancel">Cancel\n </button>\n <button type="button" class="btn btn-primary" id="btn-confirm" data-i18n="button.confirm">Confirm\n </button>\n </div>\n </div>\n </div>\n</div>\n',{modalOptions:{backdrop:"static"},onCreate(t){I=t},onShow(){O=t||j,M=C.extend(!0,{},O),$()},onHidden(){A?.destroy(),A=null,N&&(N.destroy(),N=null),I=null,C(".popover").remove()}})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.