${e.answer}
`), !1; } return !0; } }, { type: "save", name: "\u804c\u6559\u4e91\u6536\u5f55", match: () => location.href.includes("examrecord_recordDetail.action"), question: { html: ".q_content", question: ".divQuestionTitle", options: ".questionOptions>div.q_option_readonly", type: ".question-box .tag", workType: "zhijiaoyun", pageType: "zhijiaoyun" }, init: async () => { await waitUntil((function() { return 0 !== D(".q_content").length; })); }, answerHook: e => { const t = D(e.html).find(".exam.icon_examright").length, n = D(e.html).find("input[name='quesId']:not([id='']").attr("id"), a = D(`input#qId${n}`).attr("qtype"), s = D(e.html).find("span[name^='questionIndex']").text().trim() + "\u3001", o = D(e.html).find(".q_score").text().trim(); switch (e.question = e.question.replace(s, "").replace(o, "").trim(), e.options = D(e.html).find(".questionOptions>div.q_option_readonly").map(((e, t) => { let n = D(t).find("span[name='optionIndexName']").text().trim(); return removeHtml(D(t).html()).replace(n, "").trim(); })).get(), a) { case "\u5355\u9879\u9009\u62e9\u9898": case "\u5355\u9009\u9898": case "singlechoice": e.type = "0"; break; case "\u591a\u9879\u9009\u62e9\u9898": case "\u591a\u9009\u9898": case "multichoice": e.type = "1"; break; case "\u5224\u65ad\u9898": case "bijudgement": e.type = "3"; break; case "fillblank": case "\u586b\u7a7a\u9898": e.type = "2"; const t = D(e.html).find(".answerOption>span:eq(0)").clone(); t.find(".exam_answers").remove(), e.question = titleClean(removeHtml(t.html())).replace(/\uff08.*?\u5206\uff09/g, "").trim(); break; case "cloze": case "\u5b8c\u5f62\u586b\u7a7a": e.type = "14", e.options = D(e.html).find(".questionOptions>.exam_cloze_choice").map(((e, t) => [ D(t).find(".optionContent").map(((e, t) => removeHtml(D(t).html()))).get() ])).get(), e.answer = D(e.html).find(".exam_rightAnswer .answer_table .one_answer>span").map(((t, n) => { const a = D(n).text().trim(); return e.options[t][a.charCodeAt(0) - 65]; })).get(); break; case "textarea": e.type = "4", e.options = [], e.answer = removeHtml(D(e.html).find(".exam_rightAnswer .has_standard_answer").html()); } switch (e.type) { case "0": case "1": if (e.answer = D(e.html).find('.exam_rightAnswer .exam_answers_tit>span[name="rightAnswer"]').text().trim().split("").map((t => e.options[t.charCodeAt(0) - 65])), e.answer, 0 == e.answer.length) { if (0 == t) return; e.answer = D(e.html).find('.exam_stu_answer span[name="stuAnswer"]').text().trim().split("").map((t => e.options[t.charCodeAt(0) - 65])); } break; case "2": e.answer = 0 == t ? D(e.html).find(".exam_rightAnswer span.fillblank_answer").map(((e, t) => removeHtml(D(t).html()))).get() : D(e.html).find(".exam_stu_answer span.fillblank_answer").map(((e, t) => removeHtml(D(t).html()))).get(), e.answer; break; case "3": e.options = []; let n = D(e.html).find('.exam_stu_answer span[name="stuAnswer"]').text().trim(); [ "\u6b63\u786e", "\u9519\u8bef" ].includes(n) && (e.answer = t ? [ n ] : [ "\u6b63\u786e" === n ? "\u9519\u8bef" : "\u6b63\u786e" ]); } return e; } }, { type: "save", name: "\u667a\u6167\u804c\u6559\u6536\u5f55", match: () => "zjy2.icve.com.cn" === location.host && (location.href.includes("/spocviewsJob") || location.href.includes("/viewExam")), question: { html: ".subjectDet", question: ".seeTitle .htmlP.ql-editor", options: ".optionList .htmlP.ql-editor", type: ".question-box .tag", workType: "zhijiaoyun", pageType: "zhijiaoyun" }, init: async () => { await waitUntil((function() { return 0 !== D(".subjectDet").length; })); }, answerHook: e => { const t = D(e.html).find(".xvhao").text().trim(); e.type = typeConvert(t.match(/\u3010(.*)\u3011/)[1].trim().replace("\u586b\u7a7a\u9898(\u5ba2\u89c2)", "\u586b\u7a7a\u9898")); let n = D(e.html).find(".answer").text().trim(); switch (e.answer = n.split(",").map((t => e.options[t.charCodeAt(0) - 65])), e.type) { case "2": e.options = [], e.answer = D(e.html).find(".answer>span").map(((e, t) => removeHtml(D(t).html()))).get(); break; case "3": e.options = D(e.html).find(".optionList>div").map(((e, t) => removeHtml(D(t).html()))).get(), e.answer = n.split(",").map((t => e.options[t.charCodeAt(0) - 65])), e.answer = judgeAnswer(e.answer[0]), e.options = []; break; case "11": const t = D(e.html).find(".optionList .matching>.htmlP.ql-editor").map(((e, t) => removeHtml(D(t).html()))).get(), a = D(e.html).find(".optionList>.text .htmlP.ql-editor").map(((e, t) => removeHtml(D(t).html()))).get(); e.options = [ t, a ]; let s = {}; n = D(e.html).find(".answer>span").map(((e, n) => { let [o, i] = D(n).text().trim().split("."); o.charCodeAt(0) >= 65 ? o = (o.charCodeAt(0) - 65).toString() : /^\d+$/.test(o) && (o = (parseInt(o) - 1).toString()), i.charCodeAt(0) >= 65 ? i = (i.charCodeAt(0) - 65).toString() : /^\d+$/.test(i) && (i = (parseInt(i) - 1).toString()), s[t[o]] = a[i]; })), e.answer = s; } return e; } }, { type: "ask", name: "\u667a\u6167\u804c\u6559+\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u95ee\u9898\u8f83\u591a\uff0c\u9047\u5230\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.href.includes("coursePreview/jobTest") || location.href.includes("spockeepTest") || location.href.includes("spocjobTest"), question: { html: ".subjectDet", question: ".ql-editor", options: ".optionList .ql-editor", type: ".question-box .tag", workType: "zhijiaoyun", pageType: "zhijiaoyun" }, init: async () => { await waitUntil((function() { return 0 !== D(".subjectDet").length; })); }, next: () => {}, ischecked: e => e.parent().parent().parent().hasClass("is-checked"), questionHook: e => { const t = D(e.html).find(".title.titleTwo").text().trim(); if (e.type = typeConvert(t.match(/\u3010(.*)\u3011/)[1].trim().replace("\u586b\u7a7a\u9898(\u5ba2\u89c2)", "\u586b\u7a7a\u9898")), "3" === e.type) e.options = [], e.$options = D(e.html).find(".optionList>div label"); return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u667a\u6167\u804c\u6559+\u6536\u5f55", match: () => "zyk.icve.com.cn" === location.host && (location.href.includes("/coursePreview/viewJob1") || location.href.includes("/viewExam")), question: { html: ".subjectDet", question: ".seeTitle>span:eq(1)", options: ".optionList>div", type: ".question-box .tag", workType: "zhijiaoyun", pageType: "zhijiaoyun" }, init: async () => { await waitUntil((function() { return 0 !== D(".subjectDet").length; })); }, answerHook: e => { e.options = removeStartChar(e.options); const t = D(e.html).find(".xvhao").text().trim(); e.type = typeConvert(t.match(/\u3010(.*)\u3011/)[1].trim().replace("\u586b\u7a7a\u9898(\u5ba2\u89c2)", "\u586b\u7a7a\u9898")); let n = D(e.html).find(".answer").text().trim(); switch (e.answer = n.split(",").map((t => e.options[t.charCodeAt(0) - 65])), e.type) { case "2": e.options = [], e.answer = D(e.html).find(".answer>span").map(((e, t) => removeHtml(D(t).html()))).get(); break; case "3": e.options = D(e.html).find(".optionList>div").map(((e, t) => removeHtml(D(t).html()))).get(), e.answer = n.split(",").map((t => e.options[t.charCodeAt(0) - 65])), e.answer = judgeAnswer(e.answer[0]), e.options = []; } return e; } } ], $e = [ { type: "ask", name: "\u5ddd\u519c\u5728\u7ebf\u7b54\u9898", tips: "\u5ddd\u519c\u5728\u7ebf\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988", match: () => ("any.cnzx.info:81" === location.host || "zice.cnzx.info" === location.host) && location.href.includes("KaoShi/ShiTiYe.aspx"), question: { html: "li.question", question: ".wenti >p.stem", options: ".wenti > ol > li", type: ".question_head > span:eq(0)", workType: "cnzx", pageType: "cnzx" }, init: async () => {}, ischecked: e => e.find("input").prop("checked"), questionHook: e => (e.$options = D(e.html).find(".wenti > ol > li input"), 0 !== e.options.length && (e.type = "radio" === e.$options.eq(0).attr("type") ? "0" : "1", 2 === e.options.length && e.options.includes("\u6b63\u786e") && e.options.includes("\u9519\u8bef") && (e.type = "3", e.options = [])), e), setAnswer: e => "3" !== e.type || (D(e.html).find(".wenti > ol > li").each(((t, n) => { isTrue(e.answer) && isTrue(removeHtml(D(n).html())) && e.ques.$options.eq(t).click(), isFalse(e.answer) && isFalse(removeHtml(D(n).html())) && e.ques.$options.eq(t).click(); })), !1), finish: e => { D("li.paginationjs-next.J-paginationjs-next").click(); } }, { type: "save", name: "\u6536\u5f55", match: () => "zice.cnzx.info" === location.host && location.href.includes("ZaiXianLianXi.aspx"), question: { html: ".ShiTi>.ShiTiMiaoShu", question: ".ShiTiMiaoShu", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "cnzx", pageType: "cnzx" }, init: async () => {}, answerHook: e => { D(e.html).text(), e.question = removeHtml(titleClean(removeHtml(D(e.html).html()))); let t = D("ul.TiXing>li.DangQianTiXing:eq(0)>a").text(), n = [], a = D(e.html).next(); switch (e.options = removeStartChar(a.find("ul li").map(((e, t) => (D(t).hasClass("DaAn1") && n.push(e), titleClean(removeHtml(D(t).html()))))).get()), e.answer = n.map((t => e.options[t])), t) { case "\u5355\u9009\u9898": case "\u8bcd\u6c47\u4e0e\u7ed3\u6784": case "\u4ea4\u9645\u7528\u8bed": e.type = "0"; break; case "\u591a\u9009\u9898": e.type = "1"; break; case "\u5224\u65ad\u9898": e.type = "3", e.options = [], e.answer = isTrue(e.answer[0]) ? [ "\u6b63\u786e" ] : isFalse(e.answer[0]) ? [ "\u9519\u8bef" ] : []; } return e; } } ], yktDecode = (e, t, n) => { let a = /(.+?)<\/span>/g, s = n.match(a); return s && s.forEach((s => { a = /(.+?)<\/span>/; let o = a.exec(s); if (o && o.length > 1) { let a = o[1].split("").map((n => e[t[n]])).join(""); n = n.replace(o[0], a); } })), n; }, ttfDownload = async e => new Promise((t => { ae({ method: "GET", url: e, responseType: "arraybuffer", onload: function(e) { let n = {}; const a = qe.parse(e.response); for (let t = 19968; t <= 40960; t++) { let e = String.fromCharCode(t), s = qe.U.codeToGlyph(a, t); const o = qe.U.glyphToPath(a, s); let i = somd5(JSON.stringify(o)); n[e] = i; } t(n); }, onerror: function(e) { t({}); } }); })), getTTF = async () => { const e = [ "https://cdn.jsdelivr.net/gh/chengbianruan/staticfile/1.json", "https://jsd.vxo.im/gh/chengbianruan/staticfile/1.json", "https://cdn.jsdmirror.com/gh/chengbianruan/staticfile/1.json" ]; for (let t = 0; t < e.length; t++) { const n = e[t], a = await ttfDownload1(n); if (a) return a; } }, Le = [ { type: "hook", name: "hook", match: location.host.includes("yuketang.cn") || location.host.includes("gdufemooc.cn"), main: e => { se.mainClass = D("#app")[0].__vue__.$route.name, se.mainClass; let t = new MutationObserver((async e => { se.mainClass !== D("#app")[0].__vue__.$route.name && (se.mainClass = D("#app")[0].__vue__.$route.name, vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u96e8\u8bfe\u5802\u8003\u8bd5", tips: "\u96e8\u8bfe\u5802\u6682\u65f6\u672a\u5f00\u53d1\u5b8c\uff0c\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad", match: () => location.host.includes("yuketang.cn") && location.href.includes("/exam/"), question: { html: ".exercise-item", question: ".content", options: ".el-checkbox__label,.el-radio__label", type: ".question-box .tag", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return 0 !== D(".exercise-item").length; })); }, next: () => {}, ischecked: e => e.parent().hasClass("is-checked"), questionHook: e => { const t = e.html.__vue__.item; e.type = typeConvert(t.TypeText), e.question = titleClean(removeHtml(t.Body)).trim(); const n = {}; switch (t.Options && t.Options.forEach((e => { n[e.key] = removeHtml(e.value); })), e.options = t.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(e.value))), e.type) { case "0": case "1": break; case "2": case "3": e.options = []; } return e; }, setAnswer: e => "3" !== e.type || (e.ques.$options.get().forEach((t => { isFalse(e.answer) && D(t).find(".el-icon-close").length > 0 && t.click(), isTrue(e.answer) && D(t).find(".el-icon-check").length > 0 && t.click(); })), !1), finish: e => {} }, { type: "ask", name: "\u96e8\u8bfe\u5802\u4f5c\u4e1a", tips: "\u96e8\u8bfe\u5802\u4ec5\u517c\u5bb9\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005\u3002\u96e8\u8bfe\u5802\u4f5c\u4e1a\u8bf7\u52a1\u5fc5\u5f00\u542f\u81ea\u52a8\u5207\u6362\uff0c\u5426\u5219\u65e0\u6cd5\u81ea\u52a8\u7b54\u9898\u6216\u5bfc\u81f4\u7b54\u9898\u9519\u4e71", match: () => location.host.includes("yuketang.cn") && location.href.includes("cloud/student/exercise"), question: { html: ".subject-item.J_order", question: ".content", options: ".el-radio__label", type: ".question-box .tag", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return 0 == D(".el-icon-loading").length && D(".container-problem").length > 0 && D(".container-problem")[0].__vue__ && D(".container-problem")[0].__vue__.exerciseList; })); const e = D(".container-problem")[0].__vue__.exerciseList; e ? (msg("\u6b63\u5728\u4e0b\u8f7d\u5b57\u4f53\u5305\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85"), se.ttfTable = await ttfDownload(e.font), se.ttf2Table = await getTTF(), se.ttf2Table ? se.problems = e.problems : msg("\u89e3\u5bc6\u5b57\u4f53\u5305\u4e0b\u8f7d\u5931\u8d25")) : msg("\u672a\u627e\u5230\u9898\u76ee"); }, toquestion: e => { D(`.aside-body ul>li:eq(${e}) .subject-item`).click(); }, next: () => { D('.el-button.el-button--text:contains("\u4e0b\u4e00\u9898")').click(); }, ischecked: e => e.hasClass("is-checked"), questionHook: (e, t) => { if (D(".el-button.el-button--info.is-disabled.is-plain").length > 0) return; const n = se.problems[t], a = se.ttfTable, s = se.ttf2Table, o = n.content; n.user, e.question = titleClean(removeHtml(yktDecode(s, a, o.Body))).trim(), e.type = typeConvert(o.TypeText), e.$options = () => D(".item-body ul>li>label"); const i = {}; switch (o.Options && (o.Options.map((e => { i[e.key] = removeHtml(yktDecode(s, a, e.value)); })), e.options = o.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(yktDecode(s, a, e.value))))), e.type) { case "0": case "1": break; case "2": e.question = removeHtml(e.question.replace(/\[\u586b\u7a7a\d\]/g, "")); break; case "3": e.options = []; break; default: e.type; } return e; }, setAnswerHook: e => {}, setAnswer: e => "3" !== e.type || (D(".item-body ul>li").get().forEach((t => { isFalse(e.answer) && D(t).find('use[*|href="#icon--tiankongticuowu"]').length > 0 && D(t).find("label").click(), isTrue(e.answer) && D(t).find('use[*|href="#icon--tiankongtizhengque"]').length > 0 && D(t).find("label").click(); })), !1), finish: e => {} }, { type: "save", name: "\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("yuketang.cn") && location.href.includes("/result/"), question: { html: ".subject-item > .result_item", question: "h4.clearfix.exam-font", options: "ul.list-unstyled li", type: ".item-type", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return D(".subject-item").length > 0; })); }, answerHook: (e, t) => { const n = e.html.__vue__.item; e.type = typeConvert(n.TypeText); const a = {}; switch (n.Options && (n.Options.forEach((e => { a[e.key] = removeHtml(e.value); })), e.options = n.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(e.value)))), e.question = titleClean(removeHtml(n.Body)).trim(), e.type) { case "0": case "1": "string" == typeof n.Answer ? e.answer = n.Answer.split("").map((e => a[e])) : "object" == typeof n.Answer && (e.answer = n.Answer.map((e => a[e]))); break; case "2": n.Blanks, e.answer = n.Blanks.map((e => removeHtml(e.Answers[0]))); break; case "3": e.options = [], isTrue(n.Answer[0]) ? e.answer = [ "\u6b63\u786e" ] : isFalse(n.Answer[0]) ? e.answer = [ "\u9519\u8bef" ] : e.answer = []; } return e; } }, { type: "save", name: "\u96e8\u8bfe\u5802\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("yuketang.cn") && location.href.includes("cloud/student/exercise"), question: { html: ".subject-item.J_order", question: "h4.clearfix.exam-font", options: "ul.list-unstyled li", type: ".item-type", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return 0 == D(".el-icon-loading").length && D(".container-problem").length > 0 && D(".container-problem")[0].__vue__ && D(".container-problem")[0].__vue__.exerciseList; })), await waitUntil((function() { return 0 != D(".el-button.el-button--info.is-disabled.is-plain").length; })); const e = D(".container-problem")[0].__vue__.exerciseList; e ? (msg("\u6b63\u5728\u4e0b\u8f7d\u5b57\u4f53\u5305\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85"), se.ttfTable = await ttfDownload(e.font), se.ttf2Table = await getTTF(), se.ttf2Table ? (se.problems = e.problems, D(".container-problem")[0].__vue__.exerciseList) : msg("\u89e3\u5bc6\u5b57\u4f53\u5305\u4e0b\u8f7d\u5931\u8d25")) : msg("\u672a\u627e\u5230\u9898\u76ee"); }, answerHook: (e, t) => { const n = se.problems[t], a = se.ttfTable, s = se.ttf2Table, o = n.content, i = n.user; e.question = titleClean(removeHtml(yktDecode(s, a, o.Body))).trim(), e.type = typeConvert(o.TypeText); const r = {}; switch (o.Options && (o.Options.map((e => { r[e.key] = removeHtml(yktDecode(s, a, e.value)); })), e.options = o.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(yktDecode(s, a, e.value))))), e.type) { case "0": case "1": "string" == typeof i.answer ? e.answer = i.answer.split("").map((e => r[e])) : "object" == typeof i.answer && (e.answer = i.answer.map((e => r[e]))); break; case "2": e.question = removeHtml(e.question.replace(/\[\u586b\u7a7a\d\]/g, "")), e.answer = o.Blanks.map((e => removeHtml(e[0]))), e.answer = e.answer.filter((e => "undefined" !== e)), e.answer.length != o.blank_count && (e.answer, e.answer = [], i.answers, e.answer = Object.values(i.answers).map((e => removeHtml(e[0])))); break; case "3": e.options = [], isTrue(i.answer[0]) ? e.answer = [ "\u6b63\u786e" ] : isFalse(i.answer[0]) ? e.answer = [ "\u9519\u8bef" ] : e.answer = []; } return e; } }, { type: "ask", name: "\u5e7f\u8d22\u6155\u8bfe\u4f5c\u4e1a", tips: "\u5e7f\u8d22\u6155\u8bfe\u4f5c\u4e1a\u4ec5\u517c\u5bb9\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005\u3002\u5e7f\u8d22\u6155\u8bfe\u4f5c\u4e1a\u4f5c\u4e1a\u8bf7\u52a1\u5fc5\u5f00\u542f\u81ea\u52a8\u5207\u6362\uff0c\u5426\u5219\u65e0\u6cd5\u81ea\u52a8\u7b54\u9898\u6216\u5bfc\u81f4\u7b54\u9898\u9519\u4e71", match: () => location.host.includes("gdufemooc.cn") && location.href.includes("/homework/"), question: { html: ".subject-item[examasideclosesubjectitem]", question: ".content", options: ".el-radio__label", type: ".question-box .tag", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return 0 == D(".el-icon-loading").length && D(".container-problem").length > 0 && D(".container-problem")[0].__vue__ && D(".container-problem")[0].__vue__.exerciseList; })); const e = D(".container-problem")[0].__vue__.exerciseList; e ? (msg("\u6b63\u5728\u4e0b\u8f7d\u5b57\u4f53\u5305\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85"), se.ttfTable = await ttfDownload(e.font), se.ttf2Table = await getTTF(), se.ttf2Table ? se.problems = e.problems : msg("\u89e3\u5bc6\u5b57\u4f53\u5305\u4e0b\u8f7d\u5931\u8d25")) : msg("\u672a\u627e\u5230\u9898\u76ee"); }, toquestion: e => { D(`.aside-body ul>li:eq(${e}) .subject-item`).click(), D(".submitProblemsDialog>.el-dialog__footer button:contains('\u5148\u4e0d\u7528\u4e86')").length, D(".submitProblemsDialog>.el-dialog__footer button:contains('\u5148\u4e0d\u7528\u4e86')").last().click(); }, next: () => { D('.el-button.el-button--text:contains("\u4e0b\u4e00\u9898")').click(), D(".submitProblemsDialog>.el-dialog__footer button:contains('\u5148\u4e0d\u7528\u4e86')").last().click(); }, ischecked: e => e.hasClass("is-checked"), questionHook: (e, t) => { const n = se.problems[t], a = se.ttfTable, s = se.ttf2Table, o = n.content; n.user, e.question = titleClean(removeHtml(yktDecode(s, a, o.Body))).trim(), e.type = typeConvert(o.TypeText), e.$options = () => D(".item-body ul>li>label"); const i = {}; switch (o.Options && (o.Options.map((e => { i[e.key] = removeHtml(yktDecode(s, a, e.value)); })), e.options = o.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(yktDecode(s, a, e.value))))), e.type) { case "0": case "1": break; case "2": e.question = removeHtml(e.question.replace(/\[\u586b\u7a7a\d\]/g, "")); break; case "3": e.options = []; break; default: e.type; } return e; }, setAnswerHook: e => {}, setAnswer: e => "3" !== e.type || (D(".item-body ul>li").get().forEach((t => { isFalse(e.answer) && D(t).find('use[*|href="#icon--tiankongticuowu"]').length > 0 && D(t).find("label").click(), isTrue(e.answer) && D(t).find('use[*|href="#icon--tiankongtizhengque"]').length > 0 && D(t).find("label").click(); })), !1), finish: e => {} }, { type: "save", name: "\u96e8\u8bfe\u5802\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("gdufemooc.cn") && location.href.includes("/homework/"), question: { html: ".subject-item[examasideclosesubjectitem]", question: "h4.clearfix.exam-font", options: "ul.list-unstyled li", type: ".item-type", workType: "yuketang", pageType: "yuketang" }, init: async () => { await waitUntil((function() { return 0 == D(".el-icon-loading").length && D(".container-problem").length > 0 && D(".container-problem")[0].__vue__ && D(".container-problem")[0].__vue__.exerciseList; })), await waitUntil((function() { return 0 != D(".el-button.el-button--info.is-disabled.is-plain").length; })); const e = D(".container-problem")[0].__vue__.exerciseList; e ? (msg("\u6b63\u5728\u4e0b\u8f7d\u5b57\u4f53\u5305\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85"), se.ttfTable = await ttfDownload(e.font), se.ttf2Table = await getTTF(), se.ttf2Table ? (se.problems = e.problems, D(".container-problem")[0].__vue__.exerciseList) : msg("\u89e3\u5bc6\u5b57\u4f53\u5305\u4e0b\u8f7d\u5931\u8d25")) : msg("\u672a\u627e\u5230\u9898\u76ee"); }, answerHook: (e, t) => { const n = se.problems[t], a = se.ttfTable, s = se.ttf2Table, o = n.content, i = n.user; e.question = titleClean(removeHtml(yktDecode(s, a, o.Body))).trim(), e.type = typeConvert(o.TypeText); const r = {}; switch (o.Options && (o.Options.map((e => { r[e.key] = removeHtml(yktDecode(s, a, e.value)); })), e.options = o.Options.sort(((e, t) => e.key.charCodeAt(0) - t.key.charCodeAt(0))).map((e => removeHtml(yktDecode(s, a, e.value))))), e.type) { case "0": case "1": "string" == typeof i.answer ? e.answer = i.answer.split("").map((e => r[e])) : "object" == typeof i.answer && (e.answer = i.answer.map((e => r[e]))); break; case "2": e.question = removeHtml(e.question.replace(/\[\u586b\u7a7a\d\]/g, "")), e.answer = o.Blanks.map((e => removeHtml(e[0]))), e.answer = e.answer.filter((e => "undefined" !== e)), e.answer.length != o.blank_count && (e.answer, e.answer = [], i.answers, e.answer = Object.values(i.answers).map((e => removeHtml(e[0])))); break; case "3": e.options = [], isTrue(i.answer[0]) ? e.answer = [ "\u6b63\u786e" ] : isFalse(i.answer[0]) ? e.answer = [ "\u9519\u8bef" ] : e.answer = []; } return e; } } ], Ie = [ { type: "ask", name: "\u5b89\u5fbd\u7ee7\u7eed\u6559\u80b2\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u5355\u9009\u3001\u591a\u9009\u3001\u5224\u65ad\u9898\u578b\uff0c\u5176\u4ed6\u9898\u578b\u6682\u4e0d\u652f\u6301", match: () => location.href.includes("study/html/content/studying/?courseOpenId=") || location.href.includes("study/html/content/sxsk/?courseOpenId=") || location.href.includes("study/html/content/tkOnline/?courseOpenId="), question: { html: ".e-q-body>.e-q", question: ".ErichText", options: "ul>li>.ErichText", type: ".question-box .tag", workType: "ahjxjy", pageType: "ahjxjy" }, init: async () => { if (await waitUntil((function() { return isExist(".e-q-body>.e-q") && isExist(".e-item"); })), !isExist(".photo-time") && !isExist(".btn_save")) return !1; }, ischecked: e => e.parent().hasClass("checked"), questionHook: e => { var t; const n = D(e.html).parent().parent(); switch (e.type = n ? null == (t = n.attr("id")) ? void 0 : t.trim() : "", e.type) { case "2": e.type = "1"; break; case "1": e.type = "0"; break; case "3": e.type = "3", e.$options = D(e.html).find("ul>li"); break; case "4": e.type = "2"; break; case "5": e.type = "4"; break; default: e.type, e.type = "8"; } return e; }, setAnswer: e => { switch (e.type) { case "4": case "2": return D(e.html).find("textarea.answer-input").focus(), D(e.html).find(" textarea.answer-input"), D(e.html).find(".answer-input.edui-default").each(((t, n) => { let a = D(n).attr("id"), s = se.UE.getEditor(a); s.ready((function() { s.setContent(`${e.answer[t]}
`); })); })), D(e.html).find(".answer-input").blur(), !1; } return !0; }, finish: e => {} }, { type: "save", name: "\u5b89\u5fbd\u7ee7\u7eed\u6559\u80b2\u6536\u5f55", tips: "\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u5355\u9009\u3001\u591a\u9009\u3001\u5224\u65ad\u9898\u578b\uff0c\u5176\u4ed6\u9898\u578b\u6682\u4e0d\u652f\u6301", match: () => location.href.includes("study/html/content/studying/?courseOpenId=") || location.href.includes("study/html/content/sxsk/?courseOpenId=") || location.href.includes("study/html/content/tkOnline/?courseOpenId="), question: { html: ".e-q-body>.e-q", question: ".ErichText", options: "ul>li>.ErichText", type: ".question-box .tag", workType: "ahjxjy", pageType: "ahjxjy" }, init: async () => { if (await waitUntil((function() { return isExist(".e-save"), isExist(".e-q-body>.e-q") && isExist(".w_e-q-panel"); })), !isExist(".e-quest-review")) return !1; }, answerHook: e => { var t; const n = D(e.html).parent().parent(); e.type = n ? null == (t = n.attr("id")) ? void 0 : t.trim() : "", e.$options = D(e.html).find("ul>li"); let a = D(e.html).find("ul>li.checked").map(((e, t) => removeHtml(D(t).find(".ErichText").html()))).get(); const s = D(e.html).find(".e-q-right").length > 0; e.answer = a.filter((e => "" !== e)); let o = D(e.html).find(".e-ans-ref .e-ans-r").map(((e, t) => removeHtml(D(t).html()))).get(); 1 === o.length && o[0].length > 1 && (o = o[0].split("\u3001")); let i = o.map((t => { let n = t.charCodeAt() - 65; return e.options[n]; })).filter((e => "" !== e && void 0 !== e)); switch (e.type) { case "2": e.type = "1"; break; case "1": e.type = "0"; break; case "3": e.type = "3", e.answer = D(e.html).find("ul>li.checked").map(((e, t) => removeHtml(D(t).html()))).get(), e.options = [], isTrue(e.answer[0]) ? e.answer = [ "\u6b63\u786e" ] : isFalse(e.answer[0]) ? e.answer = [ "\u9519\u8bef" ] : e.answer = []; break; case "4": e.type = "2", e.options = []; break; case "5": e.type = "4", i = [ removeHtml(D(e.html).find(".e-ans-ref>.e-ans-r").html()) ], e.options = []; break; case "11": e.type = "19"; const t = D(e.html).find("form").map(((e, t) => ({ type: "0", question: removeHtml(D(t).find(".e-q-q .ErichText").html()), options: D(t).find("ul li .ErichText").map(((e, t) => removeHtml(D(t).html()))).get() }))).get(); i = i.length > 0 ? judgeAnswer(i[0]) : [], e.options = t; default: return void e.type; } if (i.length > 0) return e.answer = i, e; if (!s && "3" === e.type && e.answer.length > 0) e.answer = isTrue(e.answer[0]) ? [ "\u9519\u8bef" ] : isFalse(e.answer[0]) ? [ "\u6b63\u786e" ] : []; else if (!s) return; return e; }, paper: e => { const t = se.online, n = { platform: "ahjxjy" }; n.hash = t.courseOpenId, n.name = se.localStorage.courseNmae, n.info = {}, n.chapter = [ { hash: `${t.cell.id}`, name: t.cell.title, question: e } ], xe.setPaper(n.hash, n); } } ], Oe = [ { type: "save", name: "\u9752\u4e66\u4f5c\u4e1a\u7b54\u9898\u6536\u5f55", match: () => location.host.includes("qingshuxuetang.com") && (location.href.includes("Student/ExercisePaper?courseId=") || location.href.includes("Student/ViewQuiz?quizId=") || location.href.includes("Student/SimulationExercise/Detail?id=") || location.href.includes("Student/Quiz/Detail?id=")), question: { html: ".paper-container > .question-detail-container", question: ".question-detail-description", options: ".question-detail-options .question-detail-option .option-description-preview", type: ".question-detail-type-desc", workType: "qingshu", pageType: "qingshu" }, init: async () => { await waitUntil((function() { return isExist(".question-detail-container") && se.qsques; })); }, answerHook: (e, t) => { const n = se.qsques[t]; switch (e.question = removeHtml(n.description), e.options = n.options ? n.options.map((e => removeHtml(e.description))) : [], e.type = typeConvert(n.typeDesc), e.answer = n.solution.split("").map((t => e.options[t.charCodeAt(0) - 65])), e.type) { case "3": e.options = [], e.answer = isTrue(e.answer[0]) ? [ "\u6b63\u786e" ] : isFalse(e.answer[0]) ? [ "\u9519\u8bef" ] : [ "" ]; break; case "15": e.options = [], e.answer = [], n.subQuestions.forEach((t => { let n = t.options ? t.options.map((e => removeHtml(e.description))) : [], a = t.solution.split("").map((e => n[e.charCodeAt(0) - 65])); e.answer.push(a), e.options.push(n); })); } return e; } }, { type: "ask", name: "\u9752\u4e66\u5b66\u5802\u4f5c\u4e1a\u7b54\u9898", tips: "\u9752\u4e66\u5b66\u5802\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u7b49\u9898\u578b\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("qingshuxuetang.com") && (location.href.includes("/Student/ExercisePaper") || location.href.includes("Student/ExamPaper") || location.href.includes("Student/ViewQuiz") || location.href.includes("Student/SimulationExercise/Detail") || location.href.includes("Student/Quiz/Detail")), question: { html: ".paper-container > .question-detail-container", question: ".question-detail-description", options: ".question-detail-options .question-detail-option .option-description", type: ".question-detail-type-desc", workType: "qingshu", pageType: "qingshu" }, init: async () => { await waitUntil((function() { return isExist(".question-detail-container") && se.qsques; })); }, next: () => {}, ischecked: e => e.parent().find("input").prop("checked"), toquestion: e => { D(`.group_item:eq(${e})`), D(`.group_item:eq(${e})`).click(); }, questionHook: (e, t) => { const n = se.qsques[t]; if (e.question = removeHtml(n.description), e.options = n.options ? n.options.map((e => removeHtml(e.description))) : [], e.type = typeConvert(n.typeDesc), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} } ], Pe = [ { type: "save", name: "\u4f18\u8bfe\u5728\u7ebf\u6536\u5f55", match: () => "cce.org.uooconline.com" === location.host && (location.href.includes("/exam/paper") || location.href.includes("/exam/")), question: { html: ".queContainer", question: ".topic-title", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "uooc", pageType: "uooc" }, init: async () => { await waitUntil((function() { return 0 !== D(".queContainer").length; })); }, answerHook: e => { const t = se.angular.element(e.html).scope().question; if (e.type = typeConvert(t.type_text), e.question = t.question, e.options = t.options_app.map((e => e.value)), e.answer = t.answer.map((e => t.options[e])), "3" === e.type) e.options = [], e.answer = judgeAnswer(e.answer[0]); return e; } } ], Me = [ { type: "ask", name: "\u4eac\u4eba\u5e73\u53f0\u7b54\u9898", tips: "\u4eac\u4eba\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("cj-edu.com") && (location.href.includes("/Examination") || location.href.includes("/ExamInfo")), question: { html: ".el-main>.all_subject>div.el-row", question: "div.stem", options: "ul li > label > span.el-radio__label > div:nth-child(2),ul li > label > span.el-checkbox__label > div:nth-child(2)", type: ".question-box .tag", workType: "cjedu", pageType: "cjedu" }, init: async () => { await waitUntil((function() { return 0 !== D(".el-main>.all_subject>div.el-row").length; })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { switch (D(e.html).prevAll("h1").first().text().trim()) { case "\u5355\u9009\u9898": e.type = "0"; break; case "\u591a\u9009\u9898": e.type = "1"; break; case "\u5224\u65ad\u9898": e.$options = D(e.html).find("ul li>label"), e.options = [], e.type = "3"; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u4eac\u4eba\u5e73\u53f0\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("cj-edu.com") && location.href.includes("/ViewAnswerSheet"), question: { html: ".el-main>.all_subject>div.el-row", question: "p.stem", options: "ul li > label > span.el-radio__label > div:nth-child(2),ul li > label > span.el-checkbox__label > div:nth-child(2)", type: ".question-box .tag", workType: "cjedu", pageType: "cjedu" }, init: async () => { await waitUntil((function() { return 0 !== D(".el-main>.all_subject>div.el-row").length; })); }, answerHook: e => { let t = D(e.html).find(".seeStudentAnswer>p.answer").text().replace("\u53c2\u8003\u7b54\u6848\uff1a", "").trim(), n = D(e.html).prevAll("h1").first().text().trim(); switch (e.options.length > 0 && (e.answer = t.split(",").map((t => e.options[t.charCodeAt(0) - 65]))), n) { case "\u5355\u9009\u9898": e.type = "0"; break; case "\u591a\u9009\u9898": e.type = "1"; break; case "\u5224\u65ad\u9898": e.options = [], e.answer = judgeAnswer(t), e.type = "3"; } return e; } } ], De = [ { type: "hook", name: "hook", match: location.host.includes("ytccr.com"), main: e => { const getHash = () => getUrl(); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7ece\u901a\u7ee7\u6559\u4e91\u7b54\u9898", tips: "\u7ece\u901a\u7ee7\u6559\u4e91\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad", match: () => location.host.includes("ytccr.com") && location.href.includes("learning-work") && location.href.includes("type=3"), question: { html: ".border-item", question: ".title.qa-title", options: ".opts-list .opt-title-cnt", type: ".question-box .tag", workType: "ytccr", pageType: "ytccr" }, init: async () => { await waitUntil((function() { return 0 !== D(".border-item").length; })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { if (e.type = typeConvert(D(e.html).find(".qtype").text().trim()), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u7ece\u901a\u7ee7\u6559\u4e91\u6536\u5f55", match: () => location.host.includes("ytccr.com") && location.href.includes("learning-work") && location.href.includes("type=5"), question: { html: ".border-item", question: ".title.qa-title", options: ".opts-list .opt-title-cnt", type: ".question-box .tag", workType: "ytccr", pageType: "ytccr" }, init: async () => { await waitUntil((function() { return 0 !== D(".border-item").length; })); }, answerHook: e => { e.type = typeConvert(D(e.html).find(".qtype").text().trim()); let t = D(e.html).find(".u-text-success,.u-text-danger").text().split("\uff0c")[0].trim(); if (t = t.match(/[A-Z]+$/)[0].trim(), e.answer = t.split("").map((t => e.options[t.charCodeAt(0) - 65])), 0 === e.answer.length) return e; if ("3" === e.type) e.options = [], e.answer = judgeAnswer(e.answer[0]); return e; } } ], ze = [ { type: "ask", name: "\u5b66\u8d77\u8003\u8bd5", tips: "\u5b66\u8d77\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.href.includes("oxer/page/ots/examIndex.html"), question: { html: ".queItemClass", question: "dt > div.din:eq(1)", options: "dd > div", type: ".question-box .tag", workType: "xueqi", pageType: "xueqi" }, init: async () => { await waitUntil((function() { return isExist(".queItemClass"); })), se.document.onkeydown = null, se.oncontextmenu = null; }, next: () => {}, ischecked: e => e.parent().hasClass("cur"), questionHook: e => { let t = D(e.html).parent().find("div .fb:eq(0)").text().split("\u3001")[1]; if (t.includes("\u5224\u65ad") && (t = "\u5224\u65ad\u9898"), e.type = typeMatch(t), "3" === e.type) e.options = [], e.$options = D(e.html).find("input"); return e; }, setAnswer: e => { if ("3" === e.type) { let t = e.answer; return e.ques.$options.each(((e, n) => { isTrue(t) && isTrue(removeHtml(D(n).val())) && D(n).click(), isFalse(t) && isFalse(removeHtml(D(n).val())) && D(n).click(); })), !1; } return !0; }, finish: e => {} }, { type: "save", name: "\u5b66\u671f\u8003\u8bd5\u6536\u5f55", match: () => location.href.includes("OTS-UniverDetail.html"), question: { html: ".dl_list", question: "dt > div.fl:eq(1)", options: "dd > var", type: ".question-box .tag", workType: "xueqi", pageType: "xueqi" }, init: async () => { await waitUntil((function() { return isExist(".dl_list"); })); }, answerHook: e => { var t, n, a, s, o; const i = D(e.html).attr("queid"), r = e.html._ms_context_.el.questions.find((e => e.id === i)); r.questionTypeName.includes("\u5224\u65ad") && (r.questionTypeName = "\u5224\u65ad\u9898"), e.type = typeMatch(r.questionTypeName), e.question = removeHtml(r.stem), console.log(r), e.options = (null == (n = null == (t = r.answerArea) ? void 0 : t.optionList) ? void 0 : n.sort(((e, t) => e.sequence - t.sequence)).map((e => removeHtml(e.content)))) || []; let l = r.answer.ans || (null == (a = r.answer.ansL) ? void 0 : a.join("")) || null; if (l) e.answer = l.split("").map((t => e.options[t.charCodeAt(0) - 65])); else { const t = (null == (o = null == (s = r.answerArea) ? void 0 : s.optionList) ? void 0 : o.filter((e => e.isTrue)).map((e => removeHtml(e.content)))) || []; if (0 === r.answerScore) return; e.answer = t; } return "3" === e.type && (e.options = [], e.answer = judgeAnswer(l)), e; }, paper: e => { const t = D(".dl_list:eq(0)")[0]._ms_context_.loop.category, n = D(".dl_list:eq(0)")[0]._ms_context_.oAnswerDetailInfo, a = { platform: "xueqi" }; a.hash = t.code, a.name = t.value, a.info = {}, a.chapter = [ { hash: `${n.arrangementid}`, name: n.arrangementname, question: e } ], xe.setPaper(a.hash, a); } } ], Ve = [ { type: "hook", name: "hook", match: "gdrtvu.exam-cloud.cn" === location.host, main: e => { unsafeWindow.mainClass = getUrl(); let t = new MutationObserver((async e => { unsafeWindow.mainClass !== getUrl() && (unsafeWindow.mainClass = getUrl(), vuePageChange(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7b54\u9898", tips: "\u516c\u544a", match: () => location.host.includes("exam-cloud.cn") && location.href.includes("oe-web/online-exam/exam"), question: { html: ".question-container", question: ".question-body:first", options: ".option .question-options", type: ".question-header .container", workType: "guangkai", pageType: "guangkai" }, init: async () => { await waitUntil((function() { return isExist(".question-container"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { let t = D(".list .current-question").parent().parent().find(".title").text(); if (console.log(t), t = t.split("\u3001")[1], t = t.replace(/\(.*\)/, "").trim(), console.log(t), e.type = typeConvert(t), "8" == e.type ? e.type = typeMatch(t) : e.type, "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => { D(".next .qm-primary-button").length && D(".next .qm-primary-button")[0].click(); } } ], Be = [ { type: "hook", name: "hook", match: location.host.includes("open.ha.cn"), main: e => { const getHash = () => D(".stuHomeworkVersionId.active").attr("id"); se.mainClass = getHash(); let t = new MutationObserver((async e => { getHash(), se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D(".homeworkBody").length >= 1 && t.observe(D(".homeworkBody")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u4e91\u4e0a\u6cb3\u5f00\u7b54\u9898", tips: "\u4e91\u4e0a\u6cb3\u5f00\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("open.ha.cn") && location.href.includes("/homework/showHomeworkByStatus") && location.href.includes("checked=false"), question: { html: ".layui-colla-content > .insert", question: ".window-title", options: ".option-title", type: ".question-box .tag", workType: "openha", pageType: "openha" }, init: async () => { await waitUntil((function() { return isExist(".layui-colla-content > .insert"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => (e.options = e.$options.map(((t, n) => { let a = D(n).find(".numberCover").text().trim(); return removeHtml(e.$options.eq(t).html()).replace(a, "").trim(); })).get(), e.type = typeConvert(D(e.html).find(".questionDiv>.float-l:eq(1)").text().trim()), e.$options = D(e.html).find(".option-title .numberCover"), e), setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u4e91\u4e0a\u6cb3\u5f00\u6536\u5f55", match: () => location.host.includes("open.ha.cn") && location.href.includes("/homework/showHomeworkByStatus") && location.href.includes("checked=true"), question: { html: ".layui-colla-content > .insert", question: ".window-title", options: ".option-title", type: ".question-box .tag", workType: "openha", pageType: "openha" }, init: async () => { await waitUntil((function() { return isExist(".layui-colla-content > .insert"); })); }, answerHook: e => { let t = []; const n = 0 == D(e.html).find(".option-title.error2").length; if (e.options = e.$options.map(((n, a) => { let s = D(a).find(".numberCover").text().trim(), o = removeHtml(e.$options.eq(n).html()).replace(s, "").trim(); return D(a).hasClass("answer-title") && t.push(o), o; })).get(), e.type = typeConvert(D(e.html).find(".questionDiv>.float-l:eq(1)").text().trim()), n) return e.answer = t, D(e.html).find(".option-title.error2"), e; }, paper: e => { const t = se.homework, n = { platform: "openha" }; n.hash = t.courseId, n.name = t.courseName, n.info = {}, n.chapter = [ { hash: `${t.homeworkId}`, name: t.title, question: e } ], xe.setPaper(n.hash, n); } } ], Ge = [ { type: "hook", name: "hook", match: "lhycjy.cloudwis.tech" === location.host || "hnlg.crjxjy.net" === location.host, main: e => { const getHash = () => (D(".item.changeless-box.active").attr("data-id"), D(".item.changeless-box.active").attr("data-id")); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), "homework-detail-container" === se.mainClass && await waitUntil((function() { return 0 === D(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); })); D(".exam-content").length >= 1 && t.observe(D(".exam-content")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u6cb3\u5357\u7ee7\u7eed\u6559\u80b2\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988", match: () => location.href.includes("uc/task/startTask"), question: { html: ".carousel-inner>.item.changeless-box.active", question: ".exam-tg-txt__wrap.e-tg-box", options: ".ic-options-list address", type: ".question-box .tag", workType: "cloudwis", pageType: "cloudwis" }, init: async () => { if (await waitUntil((function() { return isExist(".carousel-inner>.item.changeless-box"); })), !isExist("#finish")) return !1; }, next: () => { D(".next-slide").click(); }, ischecked: e => e.find(".checked").length > 0, questionHook: e => (e.type = typeConvert(D(e.html).attr("data-name") || ""), e.$options = D(e.html).find(".ic-options__wrap label"), e.question = e.question.replace(/^\(\d+\)/, "").trim(), e.question = e.question.replace(/\(\d+\u5206\)$/, "").trim(), e), setAnswer: e => !0, finish: e => {} }, { type: "ask", name: "\u6cb3\u5357\u7ee7\u7eed\u6559\u80b2\u8003\u8bd5\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988", match: () => location.href.includes("uc/exam/record/startExamination"), question: { html: ".trunk-box", question: ".exam-tg-txt__wrap.e-tg-box", options: ".ic-options-list address", type: ".question-box .tag", workType: "cloudwis", pageType: "cloudwis" }, init: async () => { if (await waitUntil((function() { return isExist(".trunk-box") && isExist(".ic-ac-checkbox-ol"); })), await waitUntil((function() { return window.scrollTo(0, document.body.scrollHeight), D(".ic-ac-checkbox-ol li").length == D(".trunk-box").length; })), !isExist("#submit-btn")) return !1; }, next: () => { D(".next-slide").click(); }, ischecked: e => e.find(".checked").length > 0, questionHook: e => { const t = D(e.html).attr("data-type"); switch (console.log(t), t) { case "1": e.type = "0"; break; case "2": e.type = "1"; break; case "3": e.type = "3", e.options = []; } return e.question = e.question.replace(/^\d+\u3001/, "").trim(), e.question = e.question.replace(/\(\d+\u5206\)$/, "").trim(), e.question = e.question.replace(/\[\S+\]$/, "").trim(), e.$options = D(e.html).find(".ic-options__wrap label"), e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u6cb3\u5357\u7ee7\u7eed\u6559\u80b2\u6536\u5f55", match: () => "lhycjy.cloudwis.tech" === location.host && location.href.includes("uc/task/startTask"), question: { html: ".carousel-inner>.item.changeless-box", question: ".exam-tg-txt__wrap.e-tg-box", options: ".ic-options-list address", type: ".question-box .tag", workType: "cloudwis", pageType: "cloudwis" }, init: async () => { if (await waitUntil((function() { return isExist(".carousel-inner>.item.changeless-box") && isExist(".slide-tihao"); })), await waitUntil((function() { return D(".slide-tihao").length, D(".carousel-inner>.item.changeless-box").length, D(".slide-tihao").eq(-1), D(".slide-tihao").length == D(".carousel-inner>.item.changeless-box").length; })), isExist("#finish")) return !1; D(".slide-tihao").eq(-1)[0].click(); }, next: () => {}, answerHook: e => { const t = D(e.html).find(".analysis-box .fs20.c-primary.vam").text().trim().split(""); return e.type = typeConvert(D(e.html).attr("data-name") || ""), e.answer = t.map((t => e.options[t.charCodeAt(0) - 65])), e.question = e.question.replace(/^\(\d+\)/, "").trim(), e.question = e.question.replace(/\(\d+\u5206\)$/, "").trim(), e; } }, { type: "save", name: "\u6cb3\u5357\u7ee7\u7eed\u6559\u80b2\u8003\u8bd5\u6536\u5f55", match: () => location.href.includes("uc/exam/record/startExamination"), question: { html: ".trunk-box.answer-question", question: ".exam-tg-txt__wrap.e-tg-box", options: ".ic-options-list address", type: ".question-box .tag", workType: "cloudwis", pageType: "cloudwis" }, init: async () => { if (await waitUntil((function() { return isExist(".trunk-box") && isExist(".ic-ac-correct"); })), await waitUntil((function() { return window.scrollTo(0, document.body.scrollHeight), D(".ic-ac-correct,.ic-ac-error").length == D(".trunk-box").length; })), isExist("#submit-btn")) return !1; }, next: () => { D(".next-slide").click(); }, answerHook: e => { const t = D(e.html).attr("data-type"); console.log(t); const n = D(e.html).find(".ic-options__wrap label").filter(((e, t) => D(t).find(".checked").length > 0)).map(((e, t) => removeHtml(D(t).html()))).get(); switch (e.answer = n.map((t => e.options[t.charCodeAt(0) - 65])), e.question = e.question.replace(/^\d+\u3001/, "").trim(), e.question = e.question.replace(/\(\d+\u5206\)$/, "").trim(), e.question = e.question.replace(/\[\S+\]$/, "").trim(), t) { case "1": e.type = "0"; break; case "2": e.type = "1"; break; case "3": e.type = "3", e.options = [], e.answer = judgeAnswer(e.answer[0]); } return e; } } ], Ne = [ { type: "hook", name: "hook", match: location.host.includes("sclecb.cn"), main: e => { const getHash = () => getUrl(); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u56db\u5ddd\u5f00\u653e\u5927\u5b66\u7b54\u9898", tips: "\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => "study.sclecb.cn" === location.host && /\/[0-9]+\/show/i.test(location.href), question: { html: ".testpaper-question.js-testpaper-question", question: ".testpaper-question-stem", options: ".testpaper-question-choices li", type: ".question-box .tag", workType: "sclecb", pageType: "sclecb" }, init: async () => { await waitUntil((function() { return isExist(".testpaper-question.js-testpaper-question"); })); }, next: () => {}, ischecked: e => e.hasClass("checked"), questionHook: e => { switch (e.options = removeStartChar(e.options), e.$options = D(e.html).find(".testpaper-question-choice-inputs > label > input"), e.type = typeConvert(D(e.html).parent().parent().find(".panel-heading>strong").text().trim()), e.type, e.type) { case "0": case "1": break; case "3": e.$options = D(e.html).find(".radio-inline"); } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "ask", name: "\u56db\u5ddd\u5f00\u653e\u5927\u5b66\u7b54\u9898\u65e7", tips: "\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("sclecb.cn") && /student\/course\/study\/[0-9a-zA-Z]+\/test\/redo/i.test(location.href), question: { html: ".questiono-item", question: ".clearfix.questiono-header h6", options: ".common_test_option .processing_img", type: ".question-box .tag", workType: "sclecb", pageType: "sclecb" }, init: async () => { await waitUntil((function() { return isExist(".questiono-item"); })); }, next: () => {}, ischecked: e => e.hasClass("checked"), questionHook: e => { const t = D(e.html).parent().parent().find("div:eq(0)").text().trim(); switch (!0) { case t.includes("\u5355\u9009\u9898"): e.type = "0"; break; case t.includes("\u591a\u9009\u9898"): e.type = "1"; break; case t.includes("\u5224\u65ad\u9898"): e.type = "3", e.options = [], e.$options = D(e.html).find(".common_test_option > label"); break; default: return; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u56db\u5ddd\u5f00\u653e\u5927\u5b66\u6536\u5f55", match: () => "study.sclecb.cn" === location.host && (/task\/[0-9]+\/activity_show/i.test(location.href) || /result\/[0-9]+\/show/i.test(location.href)), question: { html: ".testpaper-question.js-testpaper-question", question: ".testpaper-question-stem", options: ".testpaper-question-choices li", type: ".question-box .tag", workType: "sclecb", pageType: "sclecb" }, init: async () => { await waitUntil((function() { return isExist(".testpaper-question.js-testpaper-question"); })); }, answerHook: (e, t) => { let n = []; e.options = e.$options.map(((e, t) => { const a = removeHtml(D(t).clone().find(".testpaper-question-choice-index").remove().end().html()); return D(t).hasClass("testpaper-question-choice-right") && n.push(a), a; })).get(), e.answer = n, e.type = typeConvert(D(".js-panel-card>span").eq(t).prevAll("p").first().text().trim()); const a = D(".js-panel-card>span").eq(t).hasClass("bg-success"); switch (e.type) { case "0": case "1": break; case "3": let t = ""; t = D(e.html).find(".testpaper-question-result").text().replace("\u4f60\u7684\u7b54\u6848\u662f", "").trim(), e.answer = judgeAnswer(t); } if (!a && e.answer.length > 0 && "3" == e.type) e.answer = "\u6b63\u786e" == e.answer[0] ? [ "\u9519\u8bef" ] : "\u9519\u8bef" == e.answer[0] ? [ "\u6b63\u786e" ] : []; else if (!a) return; return e; } } ], Re = [ { type: "hook", name: "hook", match: location.host.includes("superchutou.com"), main: e => { const getHash = () => getUrl(); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#root").length >= 1 && t.observe(D("#root")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u51fa\u5934\u7cfb\u7edf\u7b54\u9898", tips: "\u672c\u8003\u8bd5\u4ec5\u9002\u914d\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("superchutou.com") && location.href.includes("onlineclass/exam/"), question: { html: "[class^='single_excer_item']", question: "[class^='title_content'] > [class^='title_content_text']:eq(1)", options: "[class^='options_content'] label", type: ".question-box .tag", workType: "chutou", pageType: "chutou" }, init: async () => { await waitUntil((function() { return isExist("[class^='single_excer_item']"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { let t = D(e.html).find("[class^='title_content'] > span:eq(1)").text(); if (t = t.replace(/\u3010|\u3011/g, "").trim(), e.type = typeConvert(t), e.options = removeStartChar(e.options), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => location.host.includes("superchutou.com") && location.href.includes("/onlineclass/analysis/"), question: { html: "[class^='single_excer_item']", question: "[class^='title_content'] > [class^='title_content_text']:eq(1)", options: "[class^='options_content'] label", type: ".question-box .tag", workType: "chutou", pageType: "chutou" }, init: async () => {}, answerHook: e => { let t = D(e.html).find("[class^='title_content'] > span:eq(1)").text(); t = t.replace(/\u3010|\u3011/g, "").trim(), e.type = typeConvert(t), e.options = removeStartChar(e.options); const n = D(e.html).find(".ant-collapse-header>div.ant-row>div.ant-col.ant-col-18>div:eq(1)").text().replace("\u53c2\u8003\u7b54\u6848\uff1a", "").trim(); switch (e.type) { case "0": case "1": e.answer = n.split("").map((t => e.options[t.charCodeAt(0) - 65])); break; case "3": e.options = [], e.answer = judgeAnswer(n); } return e; } } ], Je = [ { type: "ask", name: "\u826f\u5e08\u5728\u7ebf\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u9002\u914d\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("ls365.net") && (location.href.includes("student/examing.aspx") || location.href.includes("Student/myhomework.aspx")), question: { html: ".exam_question", question: ".exam_question_title", options: ".question_select .select_detail", type: ".exam_question_title strong", workType: "ls365", pageType: "ls365" }, init: async () => { await waitUntil((function() { return isExist(".exam_question"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { let t = D(e.html).find(".exam_question_title").clone(); t.find(".question_number").remove(), t.find("strong").remove(), t.find(".exam_feed_back").remove(), e.question = removeHtml(t.html()); let n = D(e.html).find(".exam_question_title strong").text(); return n = n.replace(/\[|\]/g, "").trim(), e.type = typeConvert(n), e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u826f\u5e08\u5728\u7ebf\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("ls365.net") && location.href.includes("User/Student/ViewPaper.aspx"), question: { html: "[name^='anchor_']", question: ".title-img-ctr", options: ".pold .phtml", type: ".QuestionsType", workType: "ls365", pageType: "ls365" }, init: async () => { await waitUntil((function() { return isExist("[name^='anchor_']"); })); }, answerHook: e => { let t = D(e.html).find(".QuestionsType").text(); t = t.replace(/\[|\]/g, "").trim(), e.type = typeConvert(t); let n = D(e.html).find(".my-work-answer>p").filter(((e, t) => t.innerText.includes("\u53c2\u8003\u7b54\u6848"))).map(((e, t) => D(t).find(".two").text())).get(); if (0 !== n.length) return e.answer = n[0].split("").map((t => e.options[t.charCodeAt(0) - 65])), e; } }, { type: "save", name: "\u826f\u5e08\u5728\u7ebf\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("ls365.net") && location.href.includes("Student/myhomework_after.aspx"), question: { html: "[name^='anchor_']", question: ".my-work-nav>.col-md-10", options: ".pold .phtml", type: ".QuestionsType", workType: "ls365", pageType: "ls365" }, init: async () => { await waitUntil((function() { return isExist("[name^='anchor_']"); })); }, answerHook: e => { let t = D(e.html).find(".my-work-nav>div:eq(0)>span:eq(0)").text(); t = t.replace(/\[|\]/g, "").trim(), e.type = typeConvert(t); let n = D(e.html).find(".my-work-answer>p").filter(((e, t) => t.innerText.includes("\u53c2\u8003\u7b54\u6848"))).map(((e, t) => D(t).find(".two").text())).get(); if (0 !== n.length) return e.answer = n[0].split("").map((t => e.options[t.charCodeAt(0) - 65])), e; } } ], We = [ { type: "hook", name: "hook", match: location.host.includes("jijiaox.com"), main: e => { se.mainClass = D("#app")[0].__vue__.$route.path; let t = new MutationObserver((async e => { se.mainClass !== D("#app")[0].__vue__.$route.path && (se.mainClass = D("#app")[0].__vue__.$route.path, vuePageChange(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7ee7\u6559\u4e91\u8003\u8bd5\u7b54\u9898", tips: "\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u3001\u7b80\u7b54\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("jijiaox.com") && (location.href.includes("/mg/studentindexexam/") || !location.href.includes("examrec")), question: { html: ".question>div", question: ".topic-title", options: ".ml_2 label", type: ".question-box .tag", workType: "jijiaox", pageType: "jijiaox" }, init: async () => { await waitUntil((function() { return isExist(".question>div"); })); }, next: () => {}, ischecked: e => e.hasClass("is-checked"), questionHook: (e, t) => { const n = D(".page")[0].__vue__.$data.testInfo.studentPraxisList[t]; switch (e.options = n.options ? n.options : [], "string" == typeof e.options && (e.options = []), e.question = removeHtml(n.title), n.type) { case "single": e.type = "0"; break; case "muti": e.type = "1"; break; case "charge": e.type = "3"; break; case "text": e.type = "4"; break; default: console.log(n.type, "\u672a\u77e5\u7c7b\u578b"); } return e; }, setAnswer: e => "4" !== e.type || (D(e.html).find(".editor")[0].__vue__.editor.txt.html(e.answer[0]), !1), finish: e => {} }, { type: "save", name: "\u7ee7\u6559\u4e91\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("jijiaox.com") && location.href.includes("/mg/studentindexexam/examrec/"), question: { html: ".question>div", question: ".topic-title", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "jijiaox", pageType: "jijiaox" }, init: async () => { await waitUntil((function() { return isExist(".question>div"); })); }, answerHook: (e, t) => { const n = D(".page")[0].__vue__.$data.testInfo.studentPraxisList[t], a = n.answer; switch (e.options = n.options ? n.options : [], "string" == typeof e.options && (e.options = []), e.question = removeHtml(n.title), n.type) { case "single": e.type = "0"; break; case "muti": e.type = "1"; break; case "charge": e.type = "3", e.answer = "1" == a ? [ "\u6b63\u786e" ] : "-1" == a ? [ "\u9519\u8bef" ] : []; break; case "text": e.type = "4", e.answer = [ removeHtml(a) ]; break; default: console.log(n.type, "\u672a\u77e5\u7c7b\u578b"); } switch (e.type) { case "0": case "1": console.log("________", a), e.answer = "string" == typeof a ? a.split("").map((t => e.options[t.charCodeAt(0) - 65])) : a.map((t => (console.log(t), e.options[t.charCodeAt(0) - 65]))); } return console.log(e), e; } } ], Qe = [ { type: "hook", name: "hook", match: location.host.includes("wencaischool.net") && D("#app").length, main: e => { se.mainClass = D("#app")[0].__vue__.$route.path; let t = new MutationObserver((async e => { se.mainClass !== D("#app")[0].__vue__.$route.path && (se.mainClass = D("#app")[0].__vue__.$route.path, vuePageChange(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); const n = document.createElement("style"); n.type = "text/css", n.innerHTML = "* {\n font-size: 13px !important;\n }", document.head.appendChild(n); } }, { type: "ask", name: "\u67e0\u6aac\u6587\u624d\u8003\u8bd5\u7b54\u9898", tips: "\u6b64\u5e73\u53f0\u7b54\u9898\u95f4\u9694\u5c3d\u91cf3s\u5de6\u53f3\uff0c\u5426\u5219\u53ef\u80fd\u9009\u4e0d\u4e0a\u7b54\u6848\uff0c\u4e0d\u652f\u6301\u7684\u9898\u578b\u8bf7\u8054\u7cfb\u4f5c\u8005\u9002\u914d", match: () => location.host.includes("wencaischool.net") && location.href.includes("/separation/exam/index.html"), question: { html: ".tmList", question: ".tmTitleTxt", options: ".perRad .opCont", type: ".question-box .tag", workType: "wencai", pageType: "wencai" }, init: async () => { await waitUntil((function() { return isExist(".tmList") && D("#onlineExamArea")[0].__vue__._data.itemsList.length > 0; })); }, next: () => {}, ischecked: e => e[0].checked, questionHook: e => { let t = D(e.html).find(".tmc.tm").attr("ttype"); return e.type = typeConvert({ 1: "\u586b\u7a7a\u9898", 2: "\u7b80\u7b54\u9898", 3: "\u5355\u9009\u9898", 4: "\u591a\u9009\u9898", 5: "\u9605\u8bfb\u7406\u89e3", 12: "\u5b8c\u5f62\u586b\u7a7a" }[t]), e.$options = D(e.html).find(".perRad input"), e; }, setAnswer: e => { switch (e.type) { case "4": return D(e.html).find("textarea").focus(), document.execCommand("selectAll"), document.execCommand("insertText", !1, e.answer[0]), !1; case "2": D(e.html).find(".ansbox.inputAnswer input").each((async (t, n) => { n.focus(), document.execCommand("selectAll"); let a = e.answer[t]; document.execCommand("insertText", !1, a), await sleep(1e3); })); } return !0; }, finish: e => {} }, { type: "save", name: "\u67e0\u6aac\u6587\u624d\u8003\u8bd5\u6536\u5f55", match: () => location.host.includes("wencaischool.net") && location.href.includes("/separation/exam/index.html"), question: { html: ".tmList", question: ".tmTitleTxt", options: ".perRad .opCont", type: ".question-box .tag", workType: "wencai", pageType: "wencai" }, init: async () => { await waitUntil((function() { return isExist(".tmList") && D("#onlineExamArea")[0].__vue__._data.itemsList.length > 0; })); }, answerHook: (e, t) => { const n = D("#onlineExamArea")[0].__vue__._data.itemsList[t]; e.question = removeHtml(n.itemName), e.options = n.optionNodes.map((e => removeHtml(e.optionContent))); e.type = typeConvert({ 1: "\u586b\u7a7a\u9898", 2: "\u7b80\u7b54\u9898", 3: "\u5355\u9009\u9898", 4: "\u591a\u9009\u9898", 5: "\u9605\u8bfb\u7406\u89e3", 12: "\u5b8c\u5f62\u586b\u7a7a" }[n.itemType]); let a = n.itemAnswer[0].optionContent; switch (e.type) { case "0": case "1": e.answer = a.split("").map((t => e.options[t.charCodeAt(0) - 65])); break; case "4": e.answer = removeHtml(a); break; case "2": e.answer = n.itemAnswer.map((e => removeHtml(e.optionContent))); } return e; } }, { type: "ask", name: "\u67e0\u6aac\u6587\u624d\u4f5c\u4e1a\u7b54\u9898", tips: "\u67e0\u6aac\u6587\u624d\u4f5c\u4e1a\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u3001\u586b\u7a7a\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u8054\u7cfb\u4f5c\u8005\u9002\u914d", match: () => location.host.includes("wencaischool.net") && location.href.includes("/exam/portal/exam.jsp"), question: { html: "table[id^='tblItem_'][islabel='0']", question: "table>tbody>tr:eq(0)>td:eq(0)", options: "table>tbody>tr:eq(1)>td:eq(0) table>tbody>tr>td>label", type: ".question-box .tag", workType: "wencai", pageType: "wencai" }, init: async () => { await waitUntil((function() { return isExist("table[id^='tblItem_'][islabel=0]"); })), D(".aah_wrapper>div").css("z-index", 9999); }, next: () => {}, ischecked: e => e[0].checked, questionHook: e => { let t = removeHtml(D(e.html).parent().parent().prevAll("tr").filter((function() { return D(this).find("table[islabel='1']").length > 0; })).first().html()); if (e.type = typeMatch(t), "8" == e.type && t.includes("\u9009\u62e9\u9898") && (e.type = "0"), "3" === e.type) e.options = []; return e; }, setAnswer: e => { if ("2" === e.type) { const t = D(e.html).find("table>tbody>tr:eq(0)>td:eq(0)>input"); t.length == e.answer.length && t.each((async (t, n) => { n.value = "", n.focus(), document.execCommand("selectAll"); let a = e.answer[t]; document.execCommand("insertText", !1, a), await sleep(1e3); })); } return !0; }, finish: e => {} }, { type: "save", name: "\u67e0\u6aac\u6587\u624d\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("wencaischool.net") && location.href.includes("/openlearning/exam/portal/view_answer.jsp"), question: { html: "tr[id^='trScore_']", question: "table>tbody>tr:eq(0)>td:eq(0)", options: "table>tbody>tr:eq(1)>td:eq(0) table>tbody>tr>td>label", type: ".question-box .tag", workType: "wencai", pageType: "wencai" }, init: async () => {}, answerHook: (e, t) => { const n = removeHtml(D(e.html).prevAll("tr:not([id])").first().html()); switch (e.type = typeMatch(n), "8" == e.type && n.includes("\u9009\u62e9\u9898") && (e.type = "0"), e.type) { case "0": case "1": case "3": const t = D(e.html).find("table>tbody>tr:eq(1)>td:eq(0)>div[style='color:darkred;font-size:10pt']").text().split("\u7b54\u6848\uff1a")[1].split("]")[0]; e.answer = t.split("").map((t => e.options[t.charCodeAt(0) - 65])), "3" == e.type && (e.options = [], e.answer = judgeAnswer(e.answer[0])); break; case "2": const n = D(e.html).find("table>tbody>tr:eq(0)>td:eq(0)").clone(); n.find("input").remove(), e.answer = n.find("nobr").map(((e, t) => { const n = removeHtml(D(t).html()); return /\[\u53c2\u8003\u7b54\u6848\uff1a(.+?)\]/.exec(n)[1]; })).get(), n.find("nobr").remove(), n.find("font").remove(), e.question = removeHtml(n.html()); } return e; } } ], Xe = [ { type: "hook", name: "hook", match: "www.xxxx.com" === location.host, main: e => { const getHash = () => D(".el-main > div:eq(0)").attr("class"); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), "homework-detail-container" === se.mainClass && await waitUntil((function() { return 0 === D(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); for (let n of e) "attributes" === n.type && "class" === n.attributeName && n.target.textContent && (n.target.textContent.includes("\u4e0b\u4e00\u9898") || n.target.textContent.includes("\u4e0a\u4e00\u9898")) && (t.disconnect(), vuePageChange$1()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "save", name: "\u6536\u5f55", match: () => location.host.includes("yxlearning.com") && location.href.includes("exam/start?myExamRecordId"), question: { html: ".subject>.mb20.sub", question: ".ls1.lh30.text-f666", options: "ul.options>li.cursor-p", type: ".question-box .tag", workType: "yxlearning", pageType: "yxlearning" }, init: async () => { if (await waitUntil((function() { return isExist(".mb20.sub"); })), !se.yxques) return !1; }, answerHook: (e, t) => { const n = []; se.yxques.questionStemRPS.forEach(((e, t) => { e.listPaperQuestionRP.forEach(((e, t) => { n.push(e); })); })); const a = n[t]; e.question = titleClean(removeHtml(a.questionName)); const s = a.type, o = []; switch (e.options = removeStartChar(a.paperOptionRPS.map((e => removeHtml(e.context)))), a.paperOptionRPS.forEach(((t, n) => { 1 == t.standardAnswer && o.push(e.options[n]); })), e.answer = o, s) { case 1: e.type = "3", e.options = [], e.answer = judgeAnswer(e.answer[0]); break; case 2: e.type = "0"; break; case 3: e.type = "1"; } return e; } }, { type: "ask", name: "\u65e5\u7167\u4e13\u4e1a\u6280\u672f\u4eba\u5458\u7b54\u9898", tips: "\u672c\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988", match: () => location.host.includes("yxlearning.com") && location.href.includes("exam/start?myExamRecordId"), question: { html: ".mb20.sub", question: ".ls1.lh30.text-f666", options: ".cursor-p", type: ".question-box .tag", workType: "yxlearning", pageType: "yxlearning" }, init: async () => { await waitUntil((function() { return isExist(".mb20.sub"); })); }, next: () => {}, ischecked: e => e.hasClass("active"), questionHook: e => { if (e.options = removeStartChar(D(e.html).find("ul>li").map(((e, t) => removeHtml(D(t).html()))).get()), e.$options = D(e.html).find("ul>li"), e.type = typeConvert(D(e.html).parent().prevAll(".title").first().find("[du-html='questionStemName']").text().trim()), "3" === e.type) e.options = [], e.$options = D(e.html).find("ul>li"); return e; }, setAnswer: e => !0, finish: e => {} } ], Ze = [ { type: "ask", name: "\u9ea6\u80fd\u7f51\u7b54\u9898", tips: "\u8be5\u5e73\u53f0\u4ec5\u517c\u5bb9\u9009\u62e9\u5224\u65ad\uff0c\u5176\u4ed6\u9898\u578b\u53ef\u80fd\u5b58\u5728bug\uff0c\u8bf7\u81ea\u884c\u68c0\u67e5", match: () => location.href.includes("lms/web/onlineexam/exambegin"), question: { html: ".ptypediv>.sdiv", question: ".namediv", options: ".itemdiv > .optiondiv", type: ".question-box .tag", workType: "cjnep", pageType: "cjnep" }, init: async () => { await waitUntil((function() { return isExist(".sdiv"); })); }, next: () => { D('.btndiv > span:contains("\u4e0b\u4e00\u9898")').click(); }, toquestion: e => { D(`.controldiv > a:eq(${e})`), D(".controldiv > a:eq(61)").click(), D(`.controldiv > a:eq(${e})`)[0].click(); }, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { e.question = e.question.replace(/^\u7b2c\d+\s\u9898[\uff1a:]?/, "").trim(), e.options = removeStartChar(e.options); let t = D(e.html).parent().find(".pnamediv").text(); if (e.type = typeMatch(t), e.$options = D(e.html).find(".ansdiv input"), "3" === e.type) e.options = []; return e; }, setAnswer: e => { switch (e.type) { case "3": let t = e.answer; return D(e.html).find(".ansdiv input").each(((e, n) => { isTrue(t) && "1" == D(n).val() && D(n).click(), isFalse(t) && "0" == D(n).val() && D(n).click(); })), !1; case "2": case "4": case "5": case "6": return D(e.html).find(".ansdiv textarea").val(e.answer.join(";")), D(e.html).find(".ansdiv textarea").trigger("input"), D(e.html).find(".ansdiv textarea").trigger("keydown"), !1; } return !0; }, finish: e => {} }, { type: "save", name: "\u9ea6\u80fd\u7f51\u7b54\u9898\u6536\u5f55", match: () => location.href.includes("lms/web/exam/examshow"), question: { html: ".ptypediv>.sdiv", question: ".namediv", options: ".itemdiv > .optiondiv", type: ".question-box .tag", workType: "cjnep", pageType: "cjnep" }, init: async () => { await waitUntil((function() { return isExist(".sdiv"); })); }, answerHook: e => { e.question = e.question.replace(/^\u7b2c\d+\s\u9898[\uff1a:]?/, "").trim(), e.options = removeStartChar(e.options); let t = D(e.html).find(".ansdiv input[name^='aquestion']:checked").closest(".item-span").text(); t = t.replace(/\s|\./g, "").trim(), e.answer = t.split("").map((t => e.options[t.charCodeAt() - 65])); let n = D(e.html).parent().find(".pnamediv").text(); e.type = typeMatch(n); let a = ""; try { a = D(e.html).find(".ansdiv").contents().filter((function() { return 3 === this.nodeType && this.nodeValue.trim().startsWith("\u7b54\u6848\uff1a"); })).get(0).nodeValue.trim().substring(3).trim(), a = removeHtml(a); } catch (s) {} switch (e.type) { case "2": e.answer = a.split(";"); break; case "3": a = D(D(e.html).find(".ansdiv").html().split("\u6b63\u786e\u7b54\u6848\uff1a")[1]).find("input[name^='aquestion']:checked").closest("span").text(), e.answer = judgeAnswer(a); break; case "4": a.length > 0 && (e.answer = [ a ]), e.options = []; } return e; } } ], Ye = [ { type: "hook", name: "hook", match: location.host.includes("91huayi.com"), main: e => { const getHash = () => D(".dd_01").attr("questionid"); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), "homework-detail-container" === se.mainClass && await waitUntil((function() { return 0 === D(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); })); D(".box").length >= 1 && t.observe(D(".box")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u534e\u533b\u7f51\u7b54\u9898", tips: "\u76ee\u524d\u4ec5\u652f\u6301\u9009\u9879\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("91huayi.com") && location.href.includes("/ExamInterface/ComputerExamIndex"), question: { html: "#exampage", question: ".dd_01", options: ".dd_02", type: ".big_type", workType: "huayi", pageType: "huayi" }, init: async () => {}, next: () => { var e; null == (e = D("#btnNext")) || e.click(); }, ischecked: e => e.prop("checked"), questionHook: e => { const t = D(e.html).find(".dd_01").clone(); return t.find(".dd_01_red").remove(), e.question = removeHtml(t.html()), e.options = removeStartChar(e.options), e.type = typeMatch(D(e.html).find(".big_type").text()), e.$options = D(e.html).find("dd.q-content input"), e; }, setAnswer: e => { switch (console.log(e), e.type) { case "0": case "1": return e.ques.$options.each(((t, n) => { if (e.answer.includes(t)) { if (e.rule.ischecked && e.rule.ischecked(D(n))) return; n.click(); } else e.rule.ischecked && e.rule.ischecked(D(n)) && n.click(); })), !1; } return !0; }, finish: e => {} } ], Ke = [ { type: "ask", name: "\u4e91\u5357\u5f00\u653e\u5927\u5b66\u7b54\u9898", tips: "\u4e91\u5f00\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.href.includes("hw/student/studentStartHomework.action") && location.host.includes("teach.ynou.edu.cn"), question: { html: ".e_juan02biaoti", question: ".qcontent > p:first", options: ".signDefault>.label", type: ".question-box .tag", workType: "ynou", pageType: "ynou" }, init: async () => { await waitUntil((function() { return 0 !== D(".e_juan02biaoti").length; })), D("body").css("text-align", "left"); }, next: () => {}, ischecked: e => (e.find("input").is(":checked"), e.find("input").is(":checked")), questionHook: e => { e.options = []; const t = D(e.html).find(".e_juan02daan").clone(); t.find(".clear").nextAll().remove(); const n = removeHtml(t.html()), a = n.split(/[A][\u3001\.\uff0e]/)[0].trim(); null !== a && (e.question = a), e.question = a, e.question = a; const s = n.match(/(?:[A-G](?:[\u3001.]|\s)?\s?.*?)(?=\s*[A-G](?:[\u3001.]|\s)?|\s*$)/gs); if (null !== s) { const t = removeOptionsStartChar(s.map((e => e.trim()))); !1 !== t && (e.options = t); } const o = D(e.html).find(".signDefault").attr("answer_control"); return "radio" === o && e.options.length > 1 && (e.type = "0"), "checkbox" === o && e.options.length > 1 && (e.type = "1"), "radio" === o && 0 === e.options.length && (e.type = "3"), e; }, setAnswer: e => { if (console.log(e), "3" === e.type) { let t = e.answer; return e.ques.$options.each(((e, n) => { isTrue(t) && isTrue(removeHtml(D(n).html())) && D(n).click(), isFalse(t) && isFalse(removeHtml(D(n).html())) && D(n).click(); })), !1; } return !0; }, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => location.href.includes("/hw/student/studentViewHomework.action") && location.host.includes("teach.ynou.edu.cn"), question: { html: ".e_juan02biaoti", question: ".qcontent > p:first", options: ".signDefault>.label", type: ".question-box .tag", workType: "ynou", pageType: "ynou" }, init: async () => { await waitUntil((function() { return 0 !== D(".e_juan02biaoti").length; })), D("body").css("text-align", "left"); }, answerHook: e => { e.options = []; const t = D(e.html).find(".e_juan02daan").clone(); t.find(".clear").nextAll().remove(); const n = removeHtml(t.html()), a = n.split(/[A][\u3001\.\uff0e]/)[0].trim(); if (null === a) return null; e.question = a; const s = n.match(/(?:[A-G](?:[\u3001.]|\s)?\s?.*?)(?=\s*[A-G](?:[\u3001.]|\s)?|\s*$)/gs); if (null !== s) { const t = removeOptionsStartChar(s.map((e => e.trim()))); if (0 == t) return null; e.options = t; } const o = D(e.html).find(".signDefault").attr("answer_control"); "radio" === o && e.options.length > 1 && (e.type = "0"), "checkbox" === o && e.options.length > 1 && (e.type = "1"), "radio" === o && 0 === e.options.length && (e.type = "3"); const i = D(e.html).find(".right_answer>font").text(); switch (e.type) { case "0": case "1": e.answer = i.split("").map((t => e.options[t.charCodeAt(0) - 65])); break; case "3": e.answer = isTrue(i) ? "\u6b63\u786e" : isFalse(i) ? "\u9519\u8bef" : ""; } return e; } } ], et = [ { type: "hook", name: "hook", match: location.host.includes("21tb.com"), main: e => { const getHash = () => D("#examIngEmsRightPanel").attr("class"); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#examIngEmsRightPanel").length >= 1 && t.observe(D("#examIngEmsRightPanel")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "21tb\u7b54\u9898", tips: "21tb\u5e73\u53f0\u7b54\u9898\uff0c\u76ee\u524d\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u9898", match: () => location.host.includes("21tb.com") && location.href.includes("exercise/newExercise.fullExerciseTemp.do"), question: { html: ".paper-content > .question-panel-middle", question: ".question-stem>.name", options: "ul.question-options>li>label", type: ".question-box .tag", workType: "21tb", pageType: "21tb" }, init: async () => { if (D(".view-paper-content").length > 0) return !1; }, next: () => {}, ischecked: e => e.parent().find("input").prop("checked"), questionHook: e => { e.question = titleClean(e.question), e.question = e.question.replace(/\uff08\d+\u5206\uff09$/, "").trim(), e.options = e.options.map((e => e.replace(/^[A-Z]\s*\.\s*/, ""))), e.options = removeStartChar(e.options); const t = D(e.html).attr("class") || ""; switch (console.log(t), !0) { case t.includes("SINGLE"): e.type = "0"; break; case t.includes("MULTIPLE"): e.type = "1"; break; case t.includes("JUDGMENT"): e.type = "3", e.options = []; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "21tb\u6536\u5f55", match: () => location.host.includes("21tb.com") && location.href.includes("exercise/newExercise.fullExerciseTemp.do"), question: { html: "form > .question-panel-middle", question: ".question-stem>.name", options: "ul.question-options>li>label", type: ".question-box .tag", workType: "21tb", pageType: "21tb" }, init: async () => { if (console.log(D(".view-paper-content").length), 0 == D(".view-paper-content").length) return !1; }, answerHook: e => { e.question = titleClean(e.question), e.question = e.question.replace(/\uff08\d+\u5206\uff09$/, "").trim(), e.options = e.options.map((e => e.replace(/^[A-Z]\s*\.\s*/, ""))), e.options = removeStartChar(e.options); const t = D(e.html).attr("questtype") || "", n = D(e.html).find(".true-answer").text().split("\uff1a")[1].trim(); switch (!0) { case t.includes("SINGLE"): e.type = "0", e.answer = n.split(", ").map((t => e.options[t.charCodeAt(0) - 65])); break; case t.includes("MULTIPLE"): e.type = "1", e.answer = n.split(", ").map((t => e.options[t.charCodeAt(0) - 65])); break; case t.includes("JUDGMENT"): e.type = "3", e.options = [], e.answer = judgeAnswer(n); } return console.log(e), e; } }, { type: "ask", name: "21tb\u8003\u8bd5\u7b54\u9898", tips: "21tb\u5e73\u53f0\u7b54\u9898\uff0c\u76ee\u524d\u4ec5\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u9898", match: () => location.host.includes("21tb.com") && location.href.includes("ems/html/examCenter/fullExamTemp.do"), question: { html: ".paper-content > .question-panel-middle", question: ".question-stem", options: "ul.question-options>li>label", type: ".question-box .tag", workType: "21tb", pageType: "21tb" }, init: async () => { if (D(".view-paper-content").length > 0) return !1; }, next: () => {}, ischecked: e => e.parent().find("input").prop("checked"), questionHook: e => { const t = D(e.html).find(".question-stem").clone(); t.find(".num").remove(), e.question = titleClean(removeHtml(t.html())).replace(/^\./, ""), e.question = e.question.replace(/\uff08\d+\u5206\uff09$/, "").trim(), e.options = e.options.map((e => e.replace(/^[A-Z]\s*\.\s*/, ""))), e.options = removeStartChar(e.options); const n = D(e.html).attr("class") || ""; switch (console.log(n), !0) { case n.includes("SINGLE"): e.type = "0"; break; case n.includes("MULTIPLE"): e.type = "1"; break; case n.includes("JUDGMENT"): e.type = "3", e.options = []; } return e; }, setAnswer: e => !0, finish: e => {} } ], tt = [ { type: "hook", name: "hook", match: location.host.includes("168wangxiao.com"), main: e => { const getHash = () => (D(".question-submit-btn").text(), D(".question-submit-btn").text() || D(".listTit>span").text()); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), "homework-detail-container" === se.mainClass && await waitUntil((function() { return 0 === D(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && (D("#app")[0], t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 })); } }, { type: "ask", name: "168\u7f51\u6821\u7b54\u9898", tips: "168\u7f51\u6821\u76ee\u524d\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u3001\u586b\u7a7a\u3001\u7b80\u7b54\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("168wangxiao.com") && location.href.includes("/web/learningCenter/details/"), question: { html: ".question-item-container", question: ".title-content", options: ".options .opt-content", type: ".type", workType: "168wx", pageType: "168wx" }, init: async () => (await waitUntil((function() { return 0 !== D(".question-item-container").length; })), !D(".question-submit-btn").text().includes("\u91cd\u65b0\u7b54\u9898")), next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { const t = D(e.html).find(".type").text(); return e.type = typeMatch(t), e; }, setAnswer: e => "4" !== e.type || (D(e.html).find(".ql-editor"), D(e.html).find(".ql-editor")[0].innerHTML = e.answer[0], !1), finish: e => {} }, { type: "save", name: "168\u7f51\u6821\u7b54\u9898", match: () => location.host.includes("168wangxiao.com") && location.href.includes("/web/learningCenter/details/"), question: { html: ".question-item-container", question: ".title-content", options: ".options .opt-content", type: ".type", workType: "168wx", pageType: "168wx" }, init: async () => (await waitUntil((function() { return 0 !== D(".question-item-container").length; })), D(".question-submit-btn").text().includes("\u91cd\u65b0\u7b54\u9898")), answerHook: e => { const t = D(e.html).find(".type").text(); switch (e.type = typeMatch(t), e.answer = D(e.html).find(".options .opt-content.is-correct-answer").map(((e, t) => removeHtml(D(t).html()))).get(), e.type) { case "2": e.options = [], e.answer = D(e.html).find(".analyze-container>.answer>.text-container>p").map(((e, t) => removeHtml(D(t).html()))).get(); break; case "3": e.options = [], e.answer = [ judgeAnswer(e.answer[0]) ]; break; case "4": e.options = [], e.answer = D(e.html).find(".analyze-container>.answer>.text-container").map(((e, t) => removeHtml(D(t).html()))).get(); } return e; } }, { type: "ask", name: "168\u7f51\u6821\u8003\u8bd5", tips: "168\u7f51\u6821\u76ee\u524d\u652f\u6301\u9009\u62e9\u3001\u5224\u65ad\u3001\u586b\u7a7a\u3001\u7b80\u7b54\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("168wangxiao.com") && location.href.includes("/web/examination/answer"), question: { html: ".Answer-area", question: ".listTit>span", options: ".el-checkbox-group>label", type: ".type", workType: "168wx", pageType: "168wx" }, init: async () => { await waitUntil((function() { return 0 !== D(".Answer-area").length; })); }, next: () => { D('button:contains("\u4e0b\u4e00\u9898")').click(); }, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => (e.options = removeOptionsStartChar(e.options), e.type = typeMatch(D(".tit-type").text()), e), setAnswer: e => "4" !== e.type || (D(e.html).find(".ql-editor"), D(e.html).find(".ql-editor")[0].innerHTML = e.answer[0], !1), finish: e => {} } ], nt = [ { type: "ask", name: "\u9ea6\u80fd\u7f51\u7b54\u9898", tips: "\u9ea6\u80fd\u7f51\u7b54\u9898\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("mynep.com") && location.href.includes("my-exam/exambegin"), question: { html: ".et_test", question: ".et_title", options: "ul>.et_answer>label", type: ".question-box .tag", workType: "mynep", pageType: "mynep" }, init: async () => {}, toquestion: e => { se.select_num(e + 1); }, next: () => {}, ischecked: e => e.parent().find("input").prop("checked"), questionHook: e => { e.question = e.question.replace(/\u7b2c\d+\u9898\uff1a/, ""), e.options = removeStartChar(e.options); switch (D(e.html).find('input[id^="question-num-isdone"]').attr("question_num_type_id")) { case "1": e.type = "0"; break; case "2": e.type = "1"; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => location.host.includes("mynep.com") && location.href.includes("web/my-exam/examshow"), question: { html: ".et_test", question: ".et_title", options: "ul>.et_answer>label", type: ".question-box .tag", workType: "mynep", pageType: "mynep" }, init: async () => {}, answerHook: e => { const t = D(e.html).find(".et_title").clone(); t.find(".exam-btn").remove(), t.find("div").remove(), e.question = removeHtml(t.html()).replace(/\u7b2c\d+\u9898\uff1a/, "").trim(), e.options = []; const n = []; D(e.html).find(".et_answer>.et_answer>.et_answer>label").map(((t, a) => { e.options.push(removeHtml(D(a).html()).trim()), D(a).parent().find("input").prop("checked") && n.push(t); })).get(), e.options = removeStartChar(e.options), e.answer = n.map((t => e.options[t])); switch (D(e.html).find('input[id^="question-num-isdone"]').attr("question_num_type_id")) { case "1": e.type = "0"; break; case "2": e.type = "1"; break; default: return !1; } return e; } } ], at = [ { type: "ask", name: "\u4e91\u73ed\u8bfe\u7b54\u9898", tips: "\u4e91\u73ed\u8bfe\u4ec5\u652f\u6301\u9009\u62e9\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => "www.mosoteach.cn" === location.host && location.href.includes("/web/index.php?c=interaction_quiz&m=reply"), question: { html: ".topic-item", question: ".t-subject", options: ".t-option.t-item label", type: ".t-type", workType: "mosoteach", pageType: "mosoteach" }, init: async () => { await waitUntil((function() { var e; return 0 !== (null == (e = D("#app")[0]) ? void 0 : e.__vue__.$data.topics.length); })); }, next: () => {}, ischecked: e => e.hasClass("is-checked"), questionHook: (e, t) => { const n = D("#app")[0].__vue__.$data.topics[t]; e.question = titleClean(removeHtml(n.subject)); const a = n.options; switch (a.sort(((e, t) => e.item_no - t.item_no)), e.options = a.map((e => removeHtml(e.content))), n.type) { case "SINGLE": e.type = "0"; break; case "MULTI": e.type = "1"; } return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => "www.mosoteach.cn" === location.host && location.href.includes("/web/index.php?c=interaction_quiz&m=person_quiz_result"), question: { html: ".topic-list > .topic-item", question: ".topic-title", options: ".el-radio-group label .label,.el-checkbox-group label .label", type: ".question-box .tag", workType: "mosoteach", pageType: "mosoteach" }, init: async () => { await waitUntil((function() { var e; return 0 !== (null == (e = D("#app")[0]) ? void 0 : e.__vue__.$data.topics.length); })); }, answerHook: (e, t) => { const n = D("#app")[0].__vue__.$data.topics[t]; e.question = titleClean(removeHtml(n.subject)); const a = n.options; switch (a.sort(((e, t) => e.item_no - t.item_no)), e.options = a.map((e => removeHtml(e.content))), e.answer = n.answers.map((t => e.options[t])), n.type) { case "SINGLE": e.type = "0"; break; case "MULTI": e.type = "1"; break; default: return null; } return e; } } ], st = [ { type: "hook", name: "hook", match: "www.learnin.com.cn" === location.host, main: e => { const getHash = () => { try { return D(".page-student-course-topic-do-container")[0].__vue__.$data.topic.studentTopic.id; } catch (e) { return ""; } }; se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "save", name: "learnin\u6536\u5f55", match: () => "www.learnin.com.cn" === location.host && location.href.includes("/user/#/user/student/course/") && 0 == D("button:contains('\u63d0\u4ea4\u4f5c\u4e1a')").length, question: { html: ".store-question-item-container", question: ".question-title", options: ".question-info>.question-option-list>.option-item", type: ".item-question-header>.header-left", workType: "learnin", pageType: "learnin" }, init: async () => { await waitUntil((function() { return isExist(".store-question-item-container"); })); }, answerHook: (e, t) => { const n = D(".page-student-course-topic-do-container")[0].__vue__.$data.topic.topicItems[0].childList, a = n[t]; switch (n[t], a.questionTypeCode) { case "judgment": e.type = "3"; break; case "single": e.type = "0"; break; case "multiple": e.type = "1"; break; default: return e; } e.question = titleClean(removeHtml(a.questionTitle)); let s = [], o = []; return a.optionList.forEach((e => { const t = removeHtml(e.content); e.isAnswer && o.push(t), s.push(t); })), e.options = s, e.answer = o, "3" == e.type && (e.options = [], e.answer = judgeAnswer(o[0])), e; } }, { type: "ask", name: "learnin\u7b54\u9898", tips: "learnin\u4ec5\u652f\u6301\u9009\u62e9\u5224\u65ad\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => "www.learnin.com.cn" === location.host && location.href.includes("/user/#/user/student/course/") && 1 == D("button:contains('\u63d0\u4ea4\u4f5c\u4e1a')").length, question: { html: ".store-question-item-container", question: ".question-title", options: ".question-info>.question-option-list>.option-item>.option-index", type: ".item-question-header>.header-left", workType: "learnin", pageType: "learnin" }, init: async () => { await waitUntil((function() { return isExist(".store-question-item-container"); })); }, next: () => {}, ischecked: e => e.hasClass("active"), questionHook: (e, t) => { const n = D(".page-student-course-topic-do-container")[0].__vue__.$data.topic.topicItems[0].childList, a = n[t]; switch (n[t], a.questionTypeCode) { case "judgment": e.type = "3"; break; case "single": e.type = "0"; break; case "multiple": e.type = "1"; break; default: return e; } e.question = titleClean(removeHtml(a.questionTitle)); let s = []; return a.optionList.forEach((e => { const t = removeHtml(e.content); s.push(t); })), e.options = s, "3" == e.type && (e.options = []), e; }, setAnswer: e => !0, finish: e => {} } ], ot = [ { type: "hook", name: "hook", match: location.host.includes("ouchn.edu.cn"), main: e => { const getHash = () => getUrl(); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7535\u5927\u7b54\u9898", tips: "\u7535\u5927\u76ee\u524d\u4ec5\u652f\u6301\u5355\u9009\u9898\uff0c\u5176\u4ed6\u9898\u578b\u8bf7\u53cd\u9988\u7ed9\u4f5c\u8005", match: () => location.host.includes("ouchn.edu.cn") && location.href.includes("learningPlatform/#/myExamDetails/examQuestion"), question: { html: ".everyQuest", question: ".topicTitle", options: ".optionList .topicTitle", type: ".question-box .tag", workType: "ouchn", pageType: "ouchn" }, init: async () => { await waitUntil((function() { return isExist(".everyQuest"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => (e.type = "0", e), setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u7535\u5927\u6536\u5f55", match: () => location.host.includes("ouchn.edu.cn") && location.href.includes("learningPlatform/#/myExamDetails/testPaper"), question: { html: ".everyQuest", question: ".topicTitle", options: ".optionList .topicTitle", type: ".question-box .tag", workType: "ouchn", pageType: "ouchn" }, init: async () => { await waitUntil((function() { return isExist(".everyQuest"); })); }, answerHook: e => { const t = D(e.html).find('.rightAndWrong>span:contains("\u6b63\u786e\u7b54\u6848")').text().replace("\u6b63\u786e\u7b54\u6848\uff1a", "").trim(), n = e.options; let a = []; return t.split("").forEach((e => { a.push(n[e.charCodeAt(0) - 65]); })), 1 == a.length ? e.type = "0" : e.type = "1", e.answer = a, e; } } ], it = [ { type: "hook", name: "mooc", match: "www.icourse163.org" === location.host, main: e => { se.mainClass = D("#courseLearn-inner-box > div:eq(0)").attr("class"); let t = new MutationObserver((async e => { se.mainClass !== D("#courseLearn-inner-box > div:eq(0)").attr("class") && (se.mainClass = D("#courseLearn-inner-box > div:eq(0)").attr("class"), "homework-detail-container" === se.mainClass && await waitUntil((function() { return 0 === D(".el-loading-mask").length; })), vuePageChange$1(), t.disconnect()); })); D("#courseLearn-inner-box").length >= 1 && t.observe(D("#courseLearn-inner-box")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "mooc\u7b54\u9898", tips: "\u4e2d\u56fd\u5927\u5b66MOOC\u9650\u5236\u7b54\u9898\u901f\u5ea6\uff0c\u8bf7\u4e0d\u8981\u8fc7\u5feb", match: () => "www.icourse163.org" === location.host && location.href.includes("#/learn/quiz?id="), question: { html: ".u-questionItem", question: ".f-richEditorText", options: "ul.choices>li>input", type: ".qaCate.j-qacate.f-fl", workType: "mooc", pageType: "mooc" }, init: async () => { await waitUntil((function() { return D(".u-questionItem").length, 0 !== D(".u-questionItem").length; })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: (e, t) => { D(e.html).find(".qaCate.j-qacate.f-fl > span:eq(0)").attr("class"); const n = se.learnUtilQuestionList[t]; switch (e.question = removeHtml(n.title), e.options = n.options.map((e => removeHtml(e.content))), n.type) { case 1: e.type = "0"; break; case 2: e.type = "1"; break; case 3: e.type = "2"; break; case 4: e.type = "3", e.options = []; break; default: n.type, e.type = "8"; } return e; }, setAnswer: e => { switch (e.type) { case "2": return D(e.html).find(".u-baseinputui>textarea").each(((t, n) => { D(n).val(e.answer[t]), D(n).focus(), D(n).blur(); })), !1; case "3": let t = e.answer; D(e.html).find("ul.choices>li").each(((e, n) => { isTrue(t) && D(n).find(".u-icon-correct").length > 0 && D(n).find("input").click(), isFalse(t) && D(n).find(".u-icon-wrong").length > 0 && D(n).find("input").click(); })); } return !0; }, finish: e => {} }, { type: "save", name: "\u4e2d\u56fd\u5927\u5b66mooc\u6536\u5f55", match: () => "www.icourse163.org" === location.host && location.href.includes("#/learn/quizscore?id="), question: { html: ".u-questionItem", question: ".f-richEditorText", options: "ul.choices li>input", type: ".qaCate.j-qacate.f-fl", workType: "mooc", pageType: "mooc" }, init: async () => { await waitUntil((function() { return D(".u-questionItem").length, 0 !== D(".u-questionItem").length; })); }, answerHook: (e, t) => { const n = se.learnUtilQuestionList[t]; e.question = removeHtml(n.title); let a = [], s = []; switch (n.options.forEach((e => { a.push(removeHtml(e.content)), e.answer && s.push(removeHtml(e.content)); })), e.options = a, e.answer = s, n.type) { case 1: e.type = "0"; break; case 2: e.type = "1"; break; case 3: e.type = "2", e.answer = [ n.stdAnswer ]; break; case 4: e.type = "3", e.options = []; break; default: n.type; } return e; } } ], rt = [ { type: "ask", name: "\u7b54\u9898", tips: "\u516c\u544a", match: () => (location.host.includes("swufe-online.com") || location.host.includes("webtrn.cn")) && (location.href.includes("learnspace/course/test/coursewareTest_intoRedoTestPage.action") || location.href.includes("learnspace/learn/learn/templateeight/index.action") || location.href.includes("learnspace/course/test/coursewareTest_intoTestPage.action")), question: { html: ".bank_test > .test_item", question: ".test_item_tit", options: ".test_item_theme>ul>li>label, .test_item_theme>label", type: ".question-box .tag", workType: "swufe", pageType: "swufe" }, init: async () => { await waitUntil((function() { return isExist(".bank_test > .test_item"); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: e => { const t = D(e.html).find(".test_item_tit").clone(); if (t.find(".tipNodo").remove(), e.question = removeHtml(t.html()), e.question = titleClean(e.question), e.type = typeMatch(D(e.html).prevAll(".test_item_type").first().text()), e.question = e.question.replace(/^[.*?]\s*/, "").replace(/^\u3010.*?\u3011\s*/, "").replace(/\s*\uff08\d+\.\d+\u5206\uff09$/, "").replace(/^\d+\./, "").trim().replace(/^\d+\uff0e/, "").trim().replace(/^\d+ ./, "").trim(), e.options = removeStartChar(e.options), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u897f\u8d22\u5728\u7ebf\u9636\u6bb5\u6d4b\u9a8c\u6536\u5f55", match: () => (location.host.includes("swufe-online.com") || location.host.includes("webtrn.cn")) && (location.href.includes("learnspace/course/test/coursewareTest_intoTestAnswerPage.action") || location.href.includes("learnspace/learn/learn/templateeight/index.action")), question: { html: ".bank_test > .test_item", question: ".test_item_tit", options: ".test_item_theme>ul>li>.zdh_op_con", type: ".question-box .tag", workType: "swufe", pageType: "swufe" }, init: async () => {}, answerHook: e => { e.type = typeMatch(D(e.html).prevAll(".test_item_type").first().text()), e.question = e.question.replace(/^[.*?]\s*/, "").replace(/^\u3010.*?\u3011\s*/, "").replace(/\s*\uff08\d+\.\d+\u5206\uff09$/, "").replace(/^\d+\./, "").trim().replace(/^\d+\uff0e/, "").trim().replace(/^\d+ ./, "").trim(), e.options = removeStartChar(e.options); const t = D(e.html).find(".test_item_key_tit").text().replace("\u53c2\u8003\u7b54\u6848\uff1a", "").trim(); switch (e.type) { case "0": case "1": e.answer = t.split("").map((t => { let n = t.charCodeAt() - 65; return e.options[n]; })); break; case "3": e.answer = judgeAnswer(t), e.options = []; } return e; } }, { type: "ask", name: "\u897f\u8d22\u5728\u7ebf\u7efc\u5408\u7ec3\u4e60\u7b54\u9898", tips: "\u897f\u8d22\u5728\u7ebf\u6536\u5f55\u8bf7\u91cd\u65b0\u70b9\u51fb\u9898\u578b\u5207\u6362\u89e6\u53d1", match: () => location.host.includes("swufe-online.com") && location.href.includes("/learnspace/userDefine/t_test.jsp?courseId="), question: { html: ".timu_title", question: ".timu_title", options: ".test_item_theme>ul>li", type: ".question-box .tag", workType: "swufe", pageType: "swufe" }, init: async () => { if (await waitUntil((function() { return isExist(".timu_title"); })), !document.body.innerHTML.includes("\u63d0\u4ea4\u7b54\u9898\u540e\u663e\u793a")) return !1; D(".layui-tab-title>li").on("click", (function() { vuePageChange$1(); })); }, next: () => {}, ischecked: e => e.parent().parent().hasClass("is-checked"), questionHook: (e, t) => { const n = D(e.html).attr("id"); return e.type = typeMatch(D(".layui-this").text()), e.question = removeHtml(D(e.html).html()), e.options = D(`#${n}`).map((function() { let t = [], n = D(this).next(), a = []; for (;n.length && n.hasClass("question-item-opt"); ) a.push(removeHtml(n[0].outerHTML)), t.push(n), n = n.next(); return e.$options = D(t.map((e => e[0]))).find("label"), a; })).get(), e.options = removeStartChar(e.options), e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u897f\u8d22\u5728\u7ebf\u7efc\u5408\u4f5c\u4e1a\u6536\u5f55", match: () => location.host.includes("swufe-online.com") && location.href.includes("/learnspace/userDefine/t_test.jsp?courseId="), question: { html: ".timu_title", question: ".timu_title", options: ".test_item_theme>ul>li", type: ".question-box .tag", workType: "swufe", pageType: "swufe" }, init: async () => { if (await waitUntil((function() { return isExist(".timu_title"); })), document.body.innerHTML.includes("\u63d0\u4ea4\u7b54\u9898\u540e\u663e\u793a")) return !1; D(".layui-tab-title>li").on("click", (function() { vuePageChange$1(); })); }, answerHook: e => { const t = D(e.html).attr("id"); switch (e.type = typeMatch(D(".layui-this").text()), e.question = removeHtml(D(e.html).html()), e.options = D(`#${t}`).map((function() { let t = [], n = D(this).next(), a = []; for (;n.length && n.hasClass("question-item-opt"); ) a.push(removeHtml(n[0].outerHTML)), t.push(n), n = n.next(); return e.$options = D(t.map((e => e[0]))).find("label"), a; })).get(), e.options = removeStartChar(e.options), e.type) { case "0": case "1": const n = D(`#${t}`).nextAll(".ans").first().find("span:eq(0)").text(); e.answer = n.trim().split("").map((t => { let n = t.charCodeAt() - 65; return e.options[n]; })); break; case "3": e.answer = judgeAnswer(D(`#${t}`).nextAll(".ans").first().find("span:eq(0)").text().trim()), e.options = []; break; case "7": case "4": e.answer = removeHtml(D(`#${t}`).nextAll(".ans").first().html()).replace("\u6b63\u786e\u7b54\u6848\uff1a", "").trim(), e.options = []; break; default: e.type; } return e; } } ], lt = [ { type: "ask", name: "\u91cd\u5e86\u6cd5\u6cbb\u8003\u8bd5\u7b54\u9898", tips: "\u672c\u5e73\u53f0\u65e0\u7b54\u6848\u6536\u5f55\uff0c\u9700\u8981\u81ea\u884c\u8865\u5145\u9898\u5e93\uff0c\u5efa\u8bae\u4f7f\u7528\u9898\u5e93\u5bfc\u5165\u529f\u80fd", match: () => "ks.cqsdx.cn" === location.host && location.pathname.includes("/exam/user/bind"), question: { html: ".qlist", question: "span:eq(1)", options: "label", type: ".badge.badge-danger", workType: "cqsdx", pageType: "cqsdx" }, init: async () => { await waitUntil((function() { return isExist(".qlist"); })); }, toquestion: e => { D(`#question_card button:eq(${e})`).click(); }, next: () => {}, ischecked: e => e.find("div").hasClass("checked"), questionHook: e => { const t = D(e.html).find(".badge.badge-danger").text(); if (e.type = typeMatch(t), e.question = e.question.replace(/\u206B/g, "").trim(), e.options = e.options.map((e => e.replace(/\u206B/g, "").trim())), "3" === e.type) e.options = []; return e; }, setAnswer: e => !0, finish: e => {} } ], ct = [ { type: "hook", name: "hook", match: location.host.includes("telfri-edu.com"), main: e => { const getHash = () => getUrl(); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7b54\u9898", tips: "\u516c\u544a", match: () => location.host.includes("telfri-edu.com") && location.href.includes("/learn/homework/do/"), question: { html: ".topic-group>.topic-container", question: ".topic-title", options: ".topic-answer .radio-wrap .radio-text", type: ".question-box .tag", workType: "olearn", pageType: "olearn" }, init: async () => { await waitUntil((function() { return isExist(".topic-group>.topic-container"); })); }, next: () => {}, ischecked: e => e.hasClass("is-active"), questionHook: e => { let t = D(e.html).prevAll(".topic-title").first().find(".title-bold").text().trim(); return e.$options = D(e.html).find(".topic-answer .radio-wrap .el-radio-button"), e.type = typeMatch(t), e; }, setAnswer: e => !0, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => location.host.includes("telfri-edu.com") && location.href.includes("/learn/homework/show/"), question: { html: ".topic-group>.topic-container", question: ".topic-title", options: ".topic-answer .radio-wrap .radio-text", type: ".question-box .tag", workType: "olearn", pageType: "olearn" }, init: async () => { await waitUntil((function() { return isExist(".topic-group>.topic-container"); })); }, answerHook: e => { let t = D(e.html).prevAll(".topic-title").first().find(".title-bold").text().trim(); e.type = typeMatch(t); const n = D(e.html).find(".standard-answer>.analysis-text").text().trim(); switch (e.type) { case "0": case "1": e.answer = n.split("").map((t => e.options[t.charCodeAt(0) - 65])); } return e; } } ], ut = [ { type: "hook", name: "hook", match: location.host.includes("yxbyun.com"), main: e => { const getHash = () => D("#app")[0].__vue__.$route.path; se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "save", name: "\u4ebf\u5b66\u5b9d\u6536\u5f55", match: () => location.host.includes("yxbyun.com") && (location.href.includes("yxbstudent/#/testPaper") || location.href.includes("yxbstudent/#/finalExam")), question: { html: ".test_wrap", question: ".content", options: ".el-radio-group input", type: ".question-box .tag", workType: "yxbyun", pageType: "yxbyun" }, init: async () => { await waitUntil((function() { return isExist(".test_wrap"); })); }, answerHook: e => { var t; const n = D(e.html).find("div:eq(0)")[0].__vue__, a = (null == (t = n.pagerData) ? void 0 : t.question) || n.smallPaper.questionTopic; return e.type = typeMatch(n.queTypeName), e.question = titleClean(removeHtml(a.questionTitle)), e.options = (a.optionList || a.questionOptionList).map((e => removeHtml(e.questionContent))), [ "0", "1", "3" ].includes(e.type) && (e.answer = a.questionAnswer.split(",").map((t => e.options[t.charCodeAt(0) - 65]))), "3" === e.type && (e.options = [], e.answer = judgeAnswer(e.answer)), e; } }, { type: "ask", name: "\u7b54\u9898", match: () => location.host.includes("yxbyun.com") && (location.href.includes("yxbstudent/#/testPaper") || location.href.includes("yxbstudent/#/finalExam")), question: { html: ".test_wrap", question: ".content", options: ".answer>.daan,.el-radio-group>label", type: ".question-box .tag", workType: "yxbyun", pageType: "yxbyun" }, init: async () => { await waitUntil((function() { return isExist(".test_wrap"); })); }, next: () => {}, ischecked: e => e.hasClass("active"), questionHook: e => { var t; const n = D(e.html).find("div:eq(0)")[0].__vue__, a = (null == (t = n.pagerData) ? void 0 : t.question) || n.smallPaper.questionTopic; if (e.type = typeMatch(n.queTypeName), e.question = titleClean(removeHtml(a.questionTitle)), e.options = (a.optionList || a.questionOptionList).map((e => removeHtml(e.questionContent))), "3" === e.type) e.options = []; return e; }, setAnswer: e => { if ("3" === e.type) { let t = e.answer; return e.ques.$options.each(((e, n) => { isTrue(t) && isTrue(removeHtml(D(n).parent().html())) && D(n).click(), isFalse(t) && isFalse(removeHtml(D(n).parent().html())) && D(n).click(), removeHtml(D(n).parent().html()); })), !1; } return !0; }, finish: e => {} } ], pt = [ { type: "hook", name: "hook", match: location.host.includes("wdjycj.com"), main: e => { const getHash = () => getUrl(); se.mainClass = getHash(); let t = new MutationObserver((async e => { se.mainClass !== getHash() && (se.mainClass = getHash(), vuePageChange$1(), t.disconnect()); })); D("#app").length >= 1 && t.observe(D("#app")[0], { subtree: !0, attributes: !0, childList: !0 }); } }, { type: "ask", name: "\u7b54\u9898", tips: "\u516c\u544a", match: () => location.host.includes("wdjycj.com") && (location.href.includes("/testpaper-test?id=") || location.href.includes("/final-exam")), question: { html: ".st-item", question: ".st-title", options: ".st-main>p", type: ".question-box .tag", workType: "wdjycj", pageType: "wdjycj" }, init: async () => { await waitUntil((function() { return isExist(".st-item"); })); }, next: () => {}, toquestion: e => { D(`.card-box .bj:eq(${e})`).click(); }, ischecked: e => D(e).find("input").prop("checked"), questionHook: e => { e.options = removeOptionsStartChar(e.options); const t = D(e.html).find(".st-title").clone(); D(t).find("strong").remove(), e.question = removeHtml(D(t).html()); let n = D(e.html).prevAll(".title").first().text().trim(); return e.type = typeMatch(n), e.$options = D(e.html).find(".answer-box>.answer>label"), e; }, setAnswer: e => { switch (e.type) { case "4": case "5": case "6": case "7": return D(e.html).find(".quill-editor").map(((t, n) => { n.__vue__.value = e.answer[t]; })), !1; } return !0; }, finish: e => {} }, { type: "save", name: "\u6536\u5f55", match: () => location.host.includes("wdjycj.com") && location.href.includes("/testpaper-test-result?resultId="), question: { html: ".st-item", question: ".st-title", options: ".st-main>p", type: ".question-box .tag", workType: "wdjycj", pageType: "wdjycj" }, init: async () => { await waitUntil((function() { return isExist(".st-item"); })); }, answerHook: e => { e.options = removeOptionsStartChar(e.options); const t = D(e.html).find(".st-title").clone(); D(t).find("strong").remove(), e.question = removeHtml(D(t).html()); let n = D(e.html).prevAll(".title").first().text().trim(); e.type = typeMatch(n); let a = removeHtml(D(e.html).find(".answer").html()).match(/\u3010\u53c2\u8003\u7b54\u6848\u3011\uff1a([\s\S]*)\u3010\u662f\u5426\u6b63\u786e\u3011\uff1a/); if (a) switch (e.type) { case "0": case "1": e.answer = a[1].trim().split("").map((t => e.options[t.charCodeAt(0) - 65])); break; case "4": case "5": case "6": case "7": e.answer = [ a[1].trim() ]; } return e; } } ], dt = Object.freeze(Object.defineProperty({ __proto__: null, a21tb: et, ahjxjy: Ie, chaoxing: Ce, chatglm: Se, chengjiaoyun: Ee, chutou: Re, cjedu: Me, cjnep: Ze, cloudwis: Ge, cnzx: $e, cqsdx: lt, gkks: Ve, guokai: He, huayi: Ye, jijiaox: We, jsou: Fe, learnin: st, ls365: Je, mooc: it, mosoteach: at, mynep: nt, olearn: ct, openha: Be, ouchn: ot, qingshu: Oe, sclecb: Ne, swufe: rt, uooc: Pe, wdjycj: pt, wencai: Qe, wx168: tt, xinwei: Ae, xueqi: ze, ykt: Le, ynou: Ke, ytccr: De, yunmuxueyuan: ve, yxbyun: ut, yxlearning: Xe, zhihuishu: Te, zhijiaoyun: je }, Symbol.toStringTag, { value: "Module" })), ht = []; for (const qa in dt) ht.push(...dt[qa]); const parseRule = async e => { await waitUntil((() => void 0 !== se[yt + "app"])); const t = e.filter((e => "function" == typeof e.match ? e.match() : e.match)), n = getAppStore(), a = { app: n, ask: getAskStore() }; if (!t.length) return n.app.alert = "\u5f53\u524d\u6ca1\u6709\u4efb\u52a1", console.log("\u6ca1\u6709\u5339\u914d\u5230\u89c4\u5219", "error"), void addLog("\u6ca1\u6709\u5339\u914d\u5230\u89c4\u5219", "error"); for (const s of t) { if (console.log(`\u5339\u914d\u5230\u89c4\u5219\uff1a${s.name}`, "success"), addLog(`\u5339\u914d\u5230\u89c4\u5219\uff1a${s.name}`, "success"), s.init) { let e = await s.init(); if ("boolean" == typeof e && !1 === e) continue; } n.alert = `\u5f53\u524d\u4efb\u52a1:${s.name}`, "hook" === s.type && s.main(a), "ask" === s.type && askParser(s, a), "save" === s.type && saveParser(s, a); } }, saveParser = (e, t) => { const n = t.app, a = t.ask; a.rule = e, e.tips && (a.tips = e.tips); const s = questionSaveParser(e.question, e.answerHook || null).filter((e => null != e && 0 !== e.answer.length && "" !== e.answer && "8" != e.type)).map((e => (e.question = titleClean(e.question), e))); if (a.saveQuestionData = s, s.forEach((e => { 0 !== e.answer.length && Answer.cacheAnswer(e); })), e.paper && "function" == typeof e.paper) try { e.paper(s); } catch (i) { addLog("\u6574\u5377\u7f13\u5b58\u5f02\u5e38", "error"); } const o = { questionList: s, pageType: e.question.pageType }; n.setPage("question"), s.length && Answer.syncQuestionList(o), n.app.alert = `\u9898\u5e93\u6536\u5f55\u5b8c\u6210\uff0c\u5171\u7f13\u5b58${s.length}\u9053\u9898\u76ee`, msg(`\u9898\u5e93\u6536\u5f55\u5b8c\u6210\uff0c\u5171\u7f13\u5b58${s.length}\u9053\u9898\u76ee`, "success"), e.next && e.next(); }, askParser = (e, t) => { const n = t.app, a = t.ask; a.rule = e, e.tips && (a.tips = e.tips), n.app.showFloat = !n.app.hideFloat, n.setPage("ask"), a.clearQuestion(); questionParser(e.question, e.questionHook || null).map((e => (e.question = titleClean(e.question), "3" == e.type && (e.options = []), e))).forEach((e => { a.addQuestion(e); })), a.autoAnswer && a.toggleStart(); }, questionSaveParser = (e, t) => { "function" == typeof e.html && (e.html = e.html()); return D(e.html).map(((n, a) => { const s = removeHtml(D(a).find(e.question).html()), o = D(a).find(e.options).map(((e, t) => removeHtml(D(t).html()))).get(), i = D(a).find(e.type).val(), r = D(a)[0]; let l = { question: titleClean(s ?? ""), options: o, $options: D(a).find(e.options), $answer: D(a).find(e.answer), answer: [], type: i, html: r }; try { t && (l = t(l, n)); } catch (c) { console.log("\u6536\u5f55hook\u62a5\u9519", c); } return null == l || null == l ? null : { question: l.question, options: l.options, answer: l.answer, type: l.type, hash: questionHash(l.type, l.question, l.options) }; })).get(); }, questionParser = (e, t) => { "function" == typeof e.html && (e.html = e.html()); return D(e.html).map(((n, a) => { const s = removeHtml(D(a).find(e.question).html()), o = D(a).find(e.options).map(((e, t) => removeHtml(D(t).html()))).get(), i = D(a).find(e.type).val(), r = e.workType, l = D(a)[0]; let c = { question: titleClean(s ?? ""), options: o, $options: D(a).find(e.options), type: i, html: l, workType: r, pageType: e.pageType }; return t && (c = t(c, n)), c; })).get(); }; function getAppStore() { return se[yt + "app"]; } function getAskStore() { return se[yt + "ask"]; } function request(e, t, n = void 0, a = void 0, s = 5e3) { "GET" === t && n && (e += `?${new URLSearchParams(n).toString()}`), "POST" === t && (a = { ...a }); const o = { "User-Agent": se.navigator.userAgent, "Content-Type": "application/json", referer: location.href, ...a }; return new Promise(((a, i) => { const r = Date.now(); ae({ method: t, url: e, headers: o, data: "GET" !== t ? JSON.stringify(n) : void 0, timeout: s, onload: function(e) { const t = Date.now(); a([ e, t - r ]); }, ontimeout: () => i(new Error("\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6")), onerror: e => { i(e); } }); })); } function requestApi(e, t, n = void 0, a = void 0, s = 5e3) { return new Promise((async (o, i) => { let r; { const e = function(e) { const t = Object.keys(e).sort(), n = t.indexOf("html"); -1 !== n && t.splice(n, 1); const a = t.map((t => { let n = e[t]; return Array.isArray(n) && 0 === n.length || "object" == typeof n && 0 === Object.keys(n).length ? null : ((Array.isArray(n) || "object" == typeof n) && (n = JSON.stringify(n)), `${t}=${n}`); })), s = a.filter((e => null !== e)); return we(s.join("&")); }(n); a = { ...a, aka: e }, r = await encrypt(JSON.stringify(n), e); } const l = { "User-Agent": se.navigator.userAgent, "Content-Type": "application/json", referer: location.href, v: gt.script.version, ...a }, c = Date.now(); ae({ method: t, url: e, headers: l, data: JSON.stringify({ data: r }), timeout: s, onload: function(e) { const t = Date.now(); o([ e, t - c ]); }, ontimeout: () => i(new Error("\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6")), onerror: e => { i(e); } }); })); } const vuePageChange$1 = async () => { if (se.vuePageChangeLock) return; se.vuePageChangeLock = !0; const e = getAppStore(), t = getAskStore(); t.questionInx = 0, e.app.showFloat = !1, e.setPage("home"), t.clearQuestion(), await parseRule(ht), se.vuePageChangeLock = !1; }, addLog = (e, t = "info") => { const n = getAppStore(), a = (new Date).toLocaleString(); try { n.addLog({ time: a, type: t, content: e }); } catch (s) { console.log(e); } }, updateCheck1 = () => { const e = getAppStore(); let t; try { t = e.script.updateURL.match(/scripts\/(\d+)/)[1]; } catch { t = wt; } let n = `https://greasyfork.org/zh-CN/scripts/${t}.json`; return new Promise(((e, a) => { request(n, "GET", {}, {}).then((e => { (e = JSON.parse(e[0].responseText)).version > gt.script.version ? msg(`\u68c0\u6d4b\u5230\u65b0\u7248\u672c${e.version},\u8bf7\u53ca\u65f6\u66f4\u65b0")).replace(/<\/xmp>/g, ""); let a = (e = I.sanitize(e, { ALLOWED_TAGS: [ "img", "br", "sub", "sup" ], ALLOWED_ATTR: [ "src", "href" ], ALLOW_DATA_ATTR: !1, KEEP_CONTENT: !0 })).match(/
${t.utils.escapeHtml(e)}
`,
html: !0,
breaks: !0,
linkify: !0
}), n = t.renderer.rules.link_open || ((e, t, n, a, s) => s.renderToken(e, t, n));
return t.renderer.rules.link_open = (e, t, a, s, o) => {
const i = e[t].attrIndex("target");
return i < 0 ? (e[t].attrPush([ "target", "_blank" ]), e[t].attrPush([ "rel", "noopener noreferrer" ])) : e[t].attrs[i][1] = "_blank",
n(e, t, a, s, o);
}, t.render(e);
}, aiAsk = async (e, t, n, a = "1\u3001\u8bf7\u6839\u636e\u4ee5\u4e0b\u9898\u76ee\u63d0\u4f9b\u6b63\u786e\u7684\u7b54\u6848\u3002\n2\u3001\u4e0d\u8981\u8bf4\u65e0\u5173\u7684\u8bdd\uff0c\u53ea\u9700\u8981\u56de\u7b54\u95ee\u9898\u3002\n3\u3001\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u8bf7\u8fd4\u56de\u3010\u6211\u4e0d\u4f1a\u3011") => {
let s = getApp(), o = s.gpt[s.gptIndex], i = o.api, r = JSON.stringify({
model: "gpt-4o",
messages: [ {
role: "system",
content: a
}, {
role: "user",
content: e
} ],
stream: !0
}), l = {
Accept: "application/json",
Authorization: `Bearer ${o.key}`,
"Content-Type": "application/json"
};
return new Promise(((e, a) => {
if (!o.key) return t(`${o.msg}`), e("\u6682\u65e0KEY");
ae({
method: "POST",
url: i,
data: r,
headers: l,
responseType: "stream",
onloadstart: async s => {
let o = "", i = !1;
const r = s.response.getReader(), l = new TextDecoder;
try {
for (;!i; ) {
const {done: a, value: s} = await r.read();
if (await sleep(50), a) return i = !0, n(), e(o);
0;
parsePack(l.decode(s)).forEach((e => {
if (!e.choices || 0 === e.choices.length) return;
const n = e.choices[0].delta.content;
void 0 !== n && "" !== n && (o += n, t(n));
}));
}
} catch (c) {
return console.error("Error reading stream:", c), a(c);
}
}
});
}));
}, Tt = defineStore("ask", {
state: () => ({
questionList: [],
questionInx: 0,
inx: 0,
Interval: 0,
start: !1,
skipFinish: Cache.get("skipFinish", !1),
autoNext: Cache.get("autoNext", !1),
autoAnswer: Cache.get("autoAnswer", !0),
freeFirst: !0,
randomAnswer: Cache.get("randomAnswer", !1),
lock: !1,
formMap: {},
type: "cx",
loading: !1,
loadingText: "\u52a0\u8f7d\u4e2d....",
tips: "\u672c\u811a\u672c\u4ec5\u4f9b\u5b66\u4e60\u7814\u7a76\uff0c\u8bf7\u52ff\u7528\u4e8e\u975e\u6cd5\u7528\u9014",
delay: Cache.get("delay", 1e3),
saveQuestionData: []
}),
actions: {
addQuestion(e) {
this.questionList.push({
...e,
answer: [],
status: 0,
aiMsg: ""
});
},
clearQuestion() {
this.questionList = [];
},
getQuestion() {
return this.questionList[this.questionInx];
},
nextQuestion() {
if (this.questionInx === this.questionList.length - 1) return clearInterval(this.Interval),
void (this.start = !1);
this.questionInx++;
},
prevQuestion() {
0 !== this.questionInx && this.questionInx--;
},
toQuestion(e) {
this.questionInx = e;
let t = this.questionList[e];
if (this.rule.toquestion && this.rule.toquestion(e), t.html.scrollIntoView({
block: "center"
}), se.self !== se.top) {
let n = document.querySelector(".el-dialog");
if (n) {
n.style.transform = "none";
let a = t.html.getBoundingClientRect();
n.style.top = a.top - 700 + "px", 0 === e && (n.style.top = "0px"), e === this.questionList.length - 1 && document.documentElement.scrollHeight > 2e3 && (n.style.top = a.top - 900 + "px");
}
}
t.html.style.boxShadow = "0 0 10px rgba(0, 0, 0, 0.15)", setTimeout((() => {
t.html.style.boxShadow = "";
}), 500);
},
setQuestionStatus(e, t) {
this.questionList[e] && null != this.questionList[e].status && (this.questionList[e].status = t);
},
async toggleStart() {
const e = getAppStore();
if (!this.lock && (this.start = !this.start, this.start)) {
this.lock = !0;
for (let t = this.questionInx; t < this.questionList.length && this.start; t++) {
if (this.skipFinish && 1 === this.questionList[t].status) continue;
this.questionInx = t, "8" !== this.questionList[t].type ? (await this.reAnswer(t),
e.app.alert = `\u5f53\u524d\u8fdb\u5ea6:${t + 1}/${this.questionList.length}`, await sleep(this.delay + 1e3 * Math.random()),
this.rule.toquestion && this.rule.toquestion(this.questionInx + 1), this.autoNext && this.rule.next && this.rule.next()) : this.setQuestionStatus(t, 2);
}
this.autoNext && this.rule.finish && this.rule.finish({
question: this.questionList
}), this.start = !1, this.lock = !1, this.formMap = {}, this.questionList.forEach((t => {
var n;
if (null == (n = t.form) ? void 0 : n.form) {
let e = t.form.form;
e && (this.formMap[e] = this.formMap[e] ? this.formMap[e] + 1 : 1);
} else this.formMap["\u65e0\u7b54\u6848"] = this.formMap["\u65e0\u7b54\u6848"] ? this.formMap["\u65e0\u7b54\u6848"] + 1 : 1;
e.app.alert = "\u7b54\u9898\u5b8c\u6210~";
}));
}
},
async reAnswer(e) {
const t = getAppStore();
let n = this.questionList[e], a = [];
this.loading = !0, this.loadingText = "\u52a0\u8f7d\u4e2d....";
let s = await Answer.getCacheAnswer(n), o = ApiAnswerMatch([ s ], n);
if (!o.haveAnswer && (this.loadingText = "\u6b63\u5728\u4ece\u63a5\u53e3\u4e2d\u83b7\u53d6\u7b54\u6848",
s = await Answer.getAnswersFree(n), o = ApiAnswerMatch(s, n), a = s, !o.haveAnswer && t.app.askGpt)) {
this.loadingText = "\u6b63\u5728\u4eceAI\u4e2d\u83b7\u53d6\u7b54\u6848";
let e = this.buildAIQuestionText(n);
if (!e.includes("\u7231\u95ee\u7b54\u52a9\u624b
\n${t + 1}\u3001[${typeConvert(e.type, !1)}]${e.question}
\n${n = e.options,
"object" != typeof n ? "" : n.map(((e, t) => String.fromCharCode(65 + t) + "." + e)).join("
")}
\u7b54\u6848\uff1a${answerFormat(e.answer)}
\n \n `; var n; })).join("${e.utils.escapeHtml(t)}
`,
html: !0,
breaks: !0,
linkify: !0
}), t = e.renderer.rules.link_open || ((e, t, n, a, s) => s.renderToken(e, t, n));
return e.renderer.rules.link_open = (e, n, a, s, o) => {
const i = e[n].attrIndex("target");
return i < 0 ? (e[n].attrPush([ "target", "_blank" ]), e[n].attrPush([ "rel", "noopener noreferrer" ])) : e[n].attrs[i][1] = "_blank",
t(e, n, a, s, o);
}, e.render(this.aiMsg);
},
resetAi() {
this.aiMsg = "", this.aiLoading = !1;
}
}
}), Un = [ "innerHTML" ], Hn = vue.createElementVNode("h2", null, "\u7231\u95ee\u7b54\u5b98\u65b9\u9898\u5e93\u5f00\u53d1\u4e2d...", -1), En = [ "innerHTML" ], Fn = vue.defineComponent({
__name: "Ai",
setup(e) {
let t = getApp(), a = t.gpt[t.gptIndex];
const s = Sn(), o = vue.ref(""), search = async () => {
if (o.value) {
if (s.resetAi(), "2" === r.value) return s.aiMsg = "\u7231\u95ee\u7b54\u5b98\u65b9\u9898\u5e93\u5f00\u53d1\u4e2d...",
void msg("\u7231\u95ee\u7b54\u5b98\u65b9\u9898\u5e93\u5f00\u53d1\u4e2d...");
s.aiLoading = !0;
try {
await aiAsk(o.value, (e => {
s.aiLoading = !1, s.aiMsg += e, console.log(s.aiMsg);
}), (() => {
s.aiMsg.length <= 0 && (s.aiMsg = a.msg);
}));
} catch (e) {
console.error("AI\u68c0\u7d22\u8d85\u65f6\uff0c\u53ef\u80fd\u662f\u7f51\u7edc\u95ee\u9898\u6216\u8005\u5bf9\u5e94GPT\u7684cookie\u5931\u6548", e),
s.aiMsg = a.msg;
} finally {
s.aiLoading = !1;
}
}
}, i = [ {
label: "AI\u68c0\u7d22",
value: "1",
key: "ai"
}, {
label: "\u7231\u95ee\u7b54\u9898\u5e93",
value: "2",
key: "ask"
} ], r = vue.ref("1");
return (e, t) => {
const n = vue.resolveComponent("el-input"), l = vue.resolveComponent("el-col"), c = vue.resolveComponent("el-row"), u = vue.resolveComponent("el-radio"), p = vue.resolveComponent("el-radio-group"), d = vue.resolveComponent("el-button"), h = vue.resolveComponent("el-card"), m = vue.resolveDirective("loading");
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ vue.createVNode(c, null, {
default: vue.withCtx((() => [ vue.createVNode(l, {
span: 24
}, {
default: vue.withCtx((() => [ vue.createVNode(n, {
modelValue: o.value,
"onUpdate:modelValue": t[0] || (t[0] = e => o.value = e),
type: "textarea",
placeholder: "\u8bf7\u8f93\u5165\u9898\u76ee\u6216\u95ee\u9898",
rows: 4
}, null, 8, [ "modelValue" ]) ])),
_: 1
}) ])),
_: 1
}), vue.createVNode(c, null, {
default: vue.withCtx((() => [ vue.createVNode(l, {
span: 24
}, {
default: vue.withCtx((() => [ vue.createVNode(p, {
modelValue: r.value,
"onUpdate:modelValue": t[1] || (t[1] = e => r.value = e),
size: "small"
}, {
default: vue.withCtx((() => [ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(i, (e => vue.createVNode(u, {
value: e.value,
key: e.value
}, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(e.label), 1) ])),
_: 2
}, 1032, [ "value" ]))), 64)) ])),
_: 1
}, 8, [ "modelValue" ]) ])),
_: 1
}) ])),
_: 1
}), vue.createVNode(c, {
style: {
"margin-bottom": "15px"
}
}, {
default: vue.withCtx((() => [ vue.createVNode(l, {
span: 24
}, {
default: vue.withCtx((() => [ vue.createVNode(d, {
type: "primary",
size: "large",
icon: "el-icon-search",
style: {
width: "100%"
},
onClick: search
}, {
default: vue.withCtx((() => [ vue.createTextVNode(" \u641c\u7d22 ") ])),
_: 1
}) ])),
_: 1
}) ])),
_: 1
}), "1" === r.value ? (vue.openBlock(), vue.createBlock(h, {
key: 0,
shadow: "hover",
style: {
"margin-bottom": "15px"
}
}, {
default: vue.withCtx((() => [ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", null, [ vue.createElementVNode("div", {
innerHTML: vue.unref(s).currentAiMd() || "AI\u7b54\u9898\u4ec5\u4f9b\u53c2\u8003\uff0c\u4e0d\u4fdd\u8bc1\u51c6\u786e\u6027"
}, null, 8, Un) ])), [ [ m, vue.unref(s).aiLoading ] ]) ])),
_: 1
})) : vue.createCommentVNode("", !0), "2" === r.value ? (vue.openBlock(), vue.createBlock(h, {
key: 1,
shadow: "hover",
style: {
"margin-bottom": "15px"
}
}, {
default: vue.withCtx((() => [ Hn ])),
_: 1
})) : vue.createCommentVNode("", !0), "1" === r.value ? (vue.openBlock(), vue.createBlock(h, {
key: 2,
shadow: "hover",
style: {
"margin-bottom": "15px"
}
}, {
default: vue.withCtx((() => [ vue.createElementVNode("div", {
innerHTML: vue.unref(markToHtml)(`\u5f53\u524d\u91c7\u7528\u7684\u662f ${vue.unref(a).name} \u670d\u52a1\uff0c\u4ec5\u4f9b\u6d4b\u8bd5\u4f7f\u7528\uff0c\u4e0d\u4fdd\u8bc1\u51c6\u786e\u6027\u3002\n \u5982\u6709\u4fb5\u6743\uff0c\u8bf7\u8054\u7cfb\u6211\u4eec\u5220\u9664\u3002\n \u8bf7\u5927\u5bb6\u591a\u591a\u652f\u6301\u5b98\u65b9\uff1a${vue.unref(a).home}`)
}, null, 8, En) ])),
_: 1
})) : vue.createCommentVNode("", !0) ], 64);
};
}
}), jn = {
key: 2,
style: {
width: "calc(100% - 130px)",
"margin-left": "10px"
}
}, $n = {
key: 0,
style: {
color: "red",
"margin-top": "5px"
}
}, Ln = vue.defineComponent({
__name: "ParamTable",
props: {
data: {},
presetValues: {}
},
setup(e) {
const t = e.presetValues || [];
return (e, n) => {
const a = vue.resolveComponent("el-input"), s = vue.resolveComponent("el-table-column"), o = vue.resolveComponent("el-option"), i = vue.resolveComponent("el-select"), r = vue.resolveComponent("el-button"), l = vue.resolveComponent("el-table");
return vue.openBlock(), vue.createElementBlock("div", null, [ vue.createVNode(l, {
data: e.data,
border: ""
}, {
default: vue.withCtx((() => [ vue.createVNode(s, {
label: "Key",
width: "200"
}, {
default: vue.withCtx((({row: e}) => [ vue.createVNode(a, {
modelValue: e.key,
"onUpdate:modelValue": t => e.key = t,
placeholder: "Key",
style: {
width: "100%"
}
}, null, 8, [ "modelValue", "onUpdate:modelValue" ]) ])),
_: 1
}), vue.createVNode(s, {
label: "Value"
}, {
default: vue.withCtx((({row: e}) => [ vue.createVNode(i, {
modelValue: e.valueType,
"onUpdate:modelValue": t => e.valueType = t,
placeholder: "Value Type",
style: {
width: "120px"
}
}, {
default: vue.withCtx((() => [ vue.createVNode(o, {
label: "\u5185\u7f6e\u503c",
value: "preset"
}), vue.createVNode(o, {
label: "\u81ea\u5b9a\u4e49",
value: "custom"
}) ])),
_: 2
}, 1032, [ "modelValue", "onUpdate:modelValue" ]), "custom" === e.valueType ? (vue.openBlock(),
vue.createBlock(a, {
key: 0,
modelValue: e.value,
"onUpdate:modelValue": t => e.value = t,
placeholder: "Value",
style: {
width: "calc(100% - 130px)",
"margin-left": "10px"
}
}, null, 8, [ "modelValue", "onUpdate:modelValue" ])) : vue.createCommentVNode("", !0), "preset" === e.valueType ? (vue.openBlock(),
vue.createBlock(i, {
key: 1,
modelValue: e.value,
"onUpdate:modelValue": t => e.value = t,
placeholder: "\u9009\u62e9\u5185\u7f6e\u503c",
style: {
width: "calc(100% - 130px)",
"margin-left": "10px"
}
}, {
default: vue.withCtx((() => [ (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(t), (e => (vue.openBlock(), vue.createBlock(o, {
key: e.key,
label: e.label,
value: e.value
}, null, 8, [ "label", "value" ])))), 128)) ])),
_: 2
}, 1032, [ "modelValue", "onUpdate:modelValue" ])) : vue.createCommentVNode("", !0), "code" === e.valueType ? (vue.openBlock(),
vue.createElementBlock("div", jn, [ vue.createVNode(a, {
modelValue: e.value,
"onUpdate:modelValue": t => e.value = t,
placeholder: "\u8bf7\u8f93\u5165\u4ee3\u7801",
type: "textarea",
style: {
width: "100%"
}
}, null, 8, [ "modelValue", "onUpdate:modelValue" ]), vue.createVNode(r, {
size: "small",
type: "primary",
style: {
"margin-top": "5px"
},
onClick: t => (e => {
if ("code" === e.valueType) try {
e.error = "";
const t = new Function(`return ${e.value}`)();
console.log("\u4ee3\u7801\u8fd0\u884c\u7ed3\u679c\uff1a", t), e.error = "";
} catch (t) {
console.error("\u4ee3\u7801\u8fd0\u884c\u9519\u8bef\uff1a", t), e.error = `\u4ee3\u7801\u8fd0\u884c\u9519\u8bef: ${t.message}`;
}
})(e)
}, {
default: vue.withCtx((() => [ vue.createTextVNode(" \u8fd0\u884c\u4ee3\u7801 ") ])),
_: 2
}, 1032, [ "onClick" ]), e.error ? (vue.openBlock(), vue.createElementBlock("div", $n, vue.toDisplayString(e.error), 1)) : vue.createCommentVNode("", !0) ])) : vue.createCommentVNode("", !0) ])),
_: 1
}), vue.createVNode(s, {
label: "\u64cd\u4f5c",
width: "100"
}, {
default: vue.withCtx((({$index: t}) => [ vue.createVNode(r, {
size: "small",
onClick: n => e.$emit("remove", t)
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u5220\u9664") ])),
_: 2
}, 1032, [ "onClick" ]) ])),
_: 1
}) ])),
_: 1
}, 8, [ "data" ]), vue.createVNode(r, {
size: "small",
onClick: n[0] || (n[0] = t => e.$emit("add"))
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u6dfb\u52a0") ])),
_: 1
}) ]);
};
}
}), In = {
key: 0
}, On = {
key: 1
}, Pn = {
key: 0,
class: "error-message"
}, Mn = {
key: 2
}, Dn = {
class: "mt-30"
}, zn = {
key: 0
}, Vn = {
class: "json-preview",
style: {
"max-height": "300px",
"overflow-y": "auto"
}
}, Bn = {
key: 1
}, Gn = [ "innerHTML" ], Nn = {
key: 2
}, Rn = {
style: {
"max-height": "300px",
"overflow-y": "auto"
}
}, Jn = {
style: {
"max-height": "300px",
"overflow-y": "auto"
}
}, Wn = {
style: {
"max-height": "300px",
"overflow-y": "auto"
}
}, Qn = {
style: {
"max-height": "300px",
"overflow-y": "auto"
}
}, Xn = {
key: 2,
class: "mt-10"
}, Zn = vue.createElementVNode("strong", null, "\u63d0\u53d6\u7684\u7b54\u6848\uff1a", -1), Yn = {
key: 3,
class: "mt-10"
}, Kn = vue.defineComponent({
__name: "ApiComponent",
setup(e) {
const t = [ "GET", "POST" ], a = vue.ref("POST"), s = vue.ref("http://cx.icodef.com/wyn-nb?v=4"), o = vue.ref([]), i = vue.ref([]), r = vue.ref('{\n "question": "$question",\n "options": "$options",\n "type": "$type"\n}'), l = vue.ref([ {
key: "question",
value: "$question",
valueType: "preset"
}, {
key: "options",
value: "$options",
valueType: "preset"
}, {
key: "type",
value: "$type",
valueType: "preset"
} ]), c = vue.ref("json"), u = [ {
label: "None",
value: "none"
}, {
label: "JSON",
value: "json"
}, {
label: "x-www-form-urlencoded",
value: "urlencoded"
} ], p = [ {
key: "timestamp",
label: "\u5f53\u524d\u65f6\u95f4\u6233",
value: "$timestamp"
}, {
key: "random",
label: "\u968f\u673a\u6570",
value: "$random"
}, {
key: "question",
label: "\u9898\u5e72",
value: "$question"
}, {
key: "options",
label: "\u9009\u9879",
value: "$options"
}, {
key: "type",
label: "\u9898\u578b",
value: "$type"
}, {
key: "typename",
label: "\u9898\u578b\u540d",
value: "$typename"
} ], d = {
timestamp: Date.now(),
random: Math.random(),
question: "\u6025\u6027\u5417\u5561\u4e2d\u6bd2\u7684\u62ee\u6297\u5242\u662f:",
options: [ "\u7eb3\u916a\u916e", "\u66f2\u9a6c\u6735", "\u5c3c\u83ab\u5730\u5e73", "\u963f\u6258\u54c1", "\u80be\u4e0a\u817a\u7d20" ],
type: "0",
typename: "\u5355\u9009\u9898"
}, h = vue.ref({
data: "",
headers: "",
raw: "",
contentType: ""
}), m = vue.ref(""), y = vue.ref("body"), S = vue.ref("body"), H = vue.ref(!0), F = vue.ref(!1), j = vue.computed((() => [ "GET", "DELETE" ].includes(a.value)));
function replacePresetValues(e, t) {
if ("string" == typeof e) return e.replace(/\$(\w+)/g, ((e, n) => void 0 !== t[n] ? t[n] : `$${n}`));
if (Array.isArray(e)) return e.map((e => replacePresetValues(e, t)));
if ("object" == typeof e && null !== e) {
const n = {};
for (const a in e) n[a] = replacePresetValues(e[a], t);
return n;
}
return e;
}
function generateGMConfig() {
const e = i.value.filter((e => e.key)).map((e => {
const t = replacePresetValues(e.value, d);
return `${encodeURIComponent(e.key)}=${encodeURIComponent(t)}`;
})).join("&"), t = e ? `${s.value}?${e}` : s.value, n = {};
o.value.forEach((({key: e, value: t}) => {
e && (n[e] = t);
})), n["Content-Type"] = "json" === c.value ? "application/json" : "application/x-www-form-urlencoded";
let u = null;
if ("json" === c.value) try {
const e = replacePresetValues(JSON.parse(r.value || "{}"), d);
u = JSON.stringify(e);
} catch (p) {
console.error("JSON \u89e3\u6790\u5931\u8d25\uff1a", p);
} else if ("urlencoded" === c.value) {
u = l.value.map((e => ({
key: e.key,
value: replacePresetValues(e.value, d)
}))).filter((e => e.key)).map((e => `${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`)).join("&");
}
return {
method: a.value,
url: t,
headers: n,
data: u
};
}
function validateJson() {
try {
JSON.parse(r.value), H.value = !0;
} catch {
H.value = !1;
}
}
function formatJson() {
if (!H.value) return msg("JSON \u683c\u5f0f\u65e0\u6548\uff0c\u8bf7\u68c0\u67e5\uff01");
r.value = JSON.stringify(JSON.parse(r.value), null, 2);
}
function addRow(e) {
e.push({
key: "",
value: ""
});
}
function removeRow(e, t) {
e.splice(t, 1);
}
function sendRequest() {
if ("json" === c.value && !H.value) return msg("JSON \u683c\u5f0f\u65e0\u6548\uff0c\u8bf7\u68c0\u67e5\uff01");
F.value = !0;
const e = generateGMConfig();
ae({
method: e.method,
url: e.url,
headers: e.headers,
data: e.data || void 0,
onload: e => {
!function(e) {
var t;
const n = (null == (t = e.responseHeaders.match(/content-type:\s?([\w/+-]+)/i)) ? void 0 : t[1]) || "", a = function(e, t) {
if (t.includes("application/json")) try {
return JSON.stringify(JSON.parse(e), null, 2);
} catch {
return "\u65e0\u6cd5\u89e3\u6790\u7684 JSON \u6570\u636e";
}
return t.includes("text/html") || t.includes("text/plain") ? e : `\u65e0\u6cd5\u89e3\u6790\u7684\u54cd\u5e94\u7c7b\u578b\uff1a${t}`;
}(e.responseText, n);
m.value = JSON.stringify(generateGMConfig(), null, 2), h.value = {
data: a,
headers: e.responseHeaders,
raw: e.responseText,
contentType: n
};
}(e), F.value = !1;
},
onerror: e => {
!function(e) {
h.value = {
data: e.message || "\u8bf7\u6c42\u5931\u8d25",
headers: "",
raw: "",
contentType: ""
}, msg(`\u8bf7\u6c42\u9519\u8bef: ${e.message || "\u672a\u77e5\u9519\u8bef"}`);
}(e), F.value = !1;
}
});
}
const $ = vue.ref("data"), L = vue.ref('(res) => res.code === 1 ? /\u53db\u9006|\u516c\u4f17\u53f7|\u674e\u6052\u96c5|\u4e00\u4e4b/.test(res.data) ? null : res.data.replace(/javascript:void\\(0\\);/g, "").trim().replace(/\\n/g, "").split("#") : null'), I = vue.ref("field"), O = vue.ref("");
function extractAnswer() {
if ($.value || L.value) try {
const e = JSON.parse(h.value.data);
if ("function" === I.value) {
const t = new Function("res", `return (${L.value})(res);`);
O.value = t(e);
} else if ($.value) {
const t = function(e, t) {
const n = t.split(/\.|\[|\]/).filter((e => e));
let a = e;
for (const s of n) {
if (null == a) return;
a = isNaN(Number(s)) ? a[s] : a[Number(s)];
}
return a;
}(e, $.value);
O.value = void 0 !== t ? JSON.stringify(t, null, 2) : "\u63d0\u53d6\u7b54\u6848\u5931\u8d25\uff0c\u65e0\u6cd5\u627e\u5230\u5bf9\u5e94\u5b57\u6bb5\u7684\u7b54\u6848";
}
} catch (e) {
O.value = "\u63d0\u53d6\u7b54\u6848\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5 JSON \u6570\u636e\u6216\u63d0\u53d6\u903b\u8f91" + e;
} else msg("\u8bf7\u586b\u5199\u7b54\u6848\u5b57\u6bb5\u8def\u5f84\u6216\u81ea\u5b9a\u4e49\u63d0\u53d6\u51fd\u6570\uff01");
}
function saveApi() {
if (O.value.includes("\u63d0\u53d6\u7b54\u6848\u5931\u8d25")) return void msg("\u63d0\u53d6\u7b54\u6848\u5931\u8d25\uff0c\u65e0\u6cd5\u4fdd\u5b58\u63a5\u53e3\uff01");
let e = {
method: a.value,
url: s.value
};
const t = {};
if (o.value.forEach((({key: e, value: n}) => {
e && (t[e] = n);
})), e.headers = t, "GET" === e.method) {
e.params = i.value, e.type = "get";
const t = i.value.filter((e => e.key)).map((e => {
const t = replacePresetValues(e.value, d);
return `${encodeURIComponent(e.key)}=${encodeURIComponent(t)}`;
})).join("&");
e.url = t ? `${s.value}?${t}` : s.value;
} else if ("json" === c.value) e.data = JSON.parse(r.value), e.type = "json"; else if ("urlencoded" === c.value) {
const t = {};
for (const e of l.value) t[e.key] = e.value;
e.data = t, e.type = "urlencoded";
}
"field" === I.value ? e.response = {
type: "field",
value: $.value
} : L.value && (e.response = {
type: "function",
value: L.value
});
}
return (e, n) => {
const d = vue.resolveComponent("el-alert"), f = vue.resolveComponent("el-option"), P = vue.resolveComponent("el-select"), M = vue.resolveComponent("el-col"), D = vue.resolveComponent("el-input"), z = vue.resolveComponent("el-button"), V = vue.resolveComponent("el-row"), B = vue.resolveComponent("el-tab-pane"), G = vue.resolveComponent("el-tabs"), N = vue.resolveComponent("el-divider"), R = vue.resolveComponent("el-radio"), J = vue.resolveComponent("el-radio-group"), W = vue.resolveComponent("el-main"), Q = vue.resolveComponent("el-container");
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ vue.createVNode(d, {
title: "\u5f00\u53d1\u4e2d.....\u6682\u4e0d\u53ef\u7528",
type: "error"
}), vue.createVNode(Q, null, {
default: vue.withCtx((() => [ vue.createVNode(W, {
class: "request-builder"
}, {
default: vue.withCtx((() => [ vue.createVNode(V, {
gutter: 20,
class: "mb-20"
}, {
default: vue.withCtx((() => [ vue.createVNode(M, {
span: 6
}, {
default: vue.withCtx((() => [ vue.createVNode(P, {
modelValue: a.value,
"onUpdate:modelValue": n[0] || (n[0] = e => a.value = e),
placeholder: "Method"
}, {
default: vue.withCtx((() => [ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(t, (e => vue.createVNode(f, {
key: e,
label: e,
value: e
}, null, 8, [ "label", "value" ]))), 64)) ])),
_: 1
}, 8, [ "modelValue" ]) ])),
_: 1
}), vue.createVNode(M, {
span: 12
}, {
default: vue.withCtx((() => [ vue.createVNode(D, {
modelValue: s.value,
"onUpdate:modelValue": n[1] || (n[1] = e => s.value = e),
placeholder: "URL",
clearable: ""
}, null, 8, [ "modelValue" ]) ])),
_: 1
}), vue.createVNode(M, {
span: 6
}, {
default: vue.withCtx((() => [ vue.createVNode(z, {
type: "primary",
loading: F.value,
onClick: sendRequest,
class: "full-width"
}, {
default: vue.withCtx((() => [ vue.createTextVNode(" \u53d1\u9001\u8bf7\u6c42 ") ])),
_: 1
}, 8, [ "loading" ]) ])),
_: 1
}) ])),
_: 1
}), vue.createVNode(G, {
modelValue: y.value,
"onUpdate:modelValue": n[10] || (n[10] = e => y.value = e),
class: "mb-20"
}, {
default: vue.withCtx((() => [ vue.createVNode(B, {
label: "Query",
name: "query"
}, {
default: vue.withCtx((() => [ vue.createVNode(Ln, {
data: i.value,
"preset-values": p,
onAdd: n[2] || (n[2] = e => addRow(i.value)),
onRemove: n[3] || (n[3] = e => removeRow(i.value, e))
}, null, 8, [ "data" ]) ])),
_: 1
}), vue.createVNode(B, {
label: "Headers",
name: "headers"
}, {
default: vue.withCtx((() => [ vue.createVNode(Ln, {
data: o.value,
"preset-values": p,
onAdd: n[4] || (n[4] = e => addRow(o.value)),
onRemove: n[5] || (n[5] = e => removeRow(o.value, e))
}, null, 8, [ "data" ]) ])),
_: 1
}), vue.createVNode(B, {
label: "Body",
name: "body"
}, {
default: vue.withCtx((() => [ vue.createVNode(P, {
modelValue: c.value,
"onUpdate:modelValue": n[6] || (n[6] = e => c.value = e),
placeholder: "Body \u7c7b\u578b",
disabled: j.value,
class: "mb-10"
}, {
default: vue.withCtx((() => [ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(u, (e => vue.createVNode(f, {
key: e.value,
label: e.label,
value: e.value
}, null, 8, [ "label", "value" ]))), 64)) ])),
_: 1
}, 8, [ "modelValue", "disabled" ]), "none" === c.value ? (vue.openBlock(), vue.createElementBlock("div", In, "\u65e0\u8bf7\u6c42\u4f53")) : "json" === c.value ? (vue.openBlock(),
vue.createElementBlock("div", On, [ vue.createVNode(D, {
modelValue: r.value,
"onUpdate:modelValue": n[7] || (n[7] = e => r.value = e),
type: "textarea",
placeholder: "JSON \u683c\u5f0f\u7684\u8bf7\u6c42\u4f53",
rows: 10,
class: vue.normalizeClass({
"is-error": !H.value
}),
onInput: validateJson
}, null, 8, [ "modelValue", "class" ]), vue.createVNode(z, {
type: "success",
size: "small",
onClick: formatJson
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u683c\u5f0f\u5316 JSON") ])),
_: 1
}), H.value ? vue.createCommentVNode("", !0) : (vue.openBlock(), vue.createElementBlock("p", Pn, "JSON \u683c\u5f0f\u65e0\u6548\uff0c\u8bf7\u68c0\u67e5\uff01")) ])) : "urlencoded" === c.value ? (vue.openBlock(),
vue.createElementBlock("div", Mn, [ vue.createVNode(Ln, {
data: l.value,
"preset-values": p,
onAdd: n[8] || (n[8] = e => addRow(l.value)),
onRemove: n[9] || (n[9] = e => removeRow(l.value, e))
}, null, 8, [ "data" ]) ])) : vue.createCommentVNode("", !0) ])),
_: 1
}) ])),
_: 1
}, 8, [ "modelValue" ]), vue.createElementVNode("div", Dn, [ vue.createVNode(G, {
modelValue: S.value,
"onUpdate:modelValue": n[11] || (n[11] = e => S.value = e)
}, {
default: vue.withCtx((() => [ vue.createVNode(B, {
label: "Body",
name: "body"
}, {
default: vue.withCtx((() => [ h.value.contentType.includes("application/json") ? (vue.openBlock(), vue.createElementBlock("div", zn, [ vue.createElementVNode("pre", Vn, vue.toDisplayString(h.value.data), 1) ])) : h.value.contentType.includes("text/html") ? (vue.openBlock(),
vue.createElementBlock("div", Bn, [ vue.createElementVNode("div", {
innerHTML: h.value.data,
style: {
"max-height": "300px",
"overflow-y": "auto"
}
}, null, 8, Gn) ])) : (vue.openBlock(), vue.createElementBlock("div", Nn, [ vue.createElementVNode("pre", Rn, vue.toDisplayString(h.value.data), 1) ])) ])),
_: 1
}), vue.createVNode(B, {
label: "\u8bf7\u6c42\u53c2\u6570",
name: "request-headers"
}, {
default: vue.withCtx((() => [ vue.createElementVNode("pre", Jn, vue.toDisplayString(m.value), 1) ])),
_: 1
}), vue.createVNode(B, {
label: "\u54cd\u5e94\u5934",
name: "response-headers"
}, {
default: vue.withCtx((() => [ vue.createElementVNode("pre", Wn, vue.toDisplayString(h.value.headers), 1) ])),
_: 1
}), vue.createVNode(B, {
label: "\u539f\u59cb\u54cd\u5e94",
name: "raw"
}, {
default: vue.withCtx((() => [ vue.createElementVNode("pre", Qn, vue.toDisplayString(h.value.raw), 1) ])),
_: 1
}) ])),
_: 1
}, 8, [ "modelValue" ]) ]), vue.createVNode(N), vue.createElementVNode("div", null, [ vue.createVNode(d, {
title: "\u8bf7\u9009\u62e9\u63d0\u53d6\u7b54\u6848\u7684\u65b9\u5f0f\uff08\u5b57\u6bb5\u8def\u5f84\u6216\u81ea\u5b9a\u4e49\u51fd\u6570\uff09",
type: "info",
class: "mb-10"
}), vue.createVNode(J, {
modelValue: I.value,
"onUpdate:modelValue": n[12] || (n[12] = e => I.value = e),
class: "mb-10"
}, {
default: vue.withCtx((() => [ vue.createVNode(R, {
value: "field"
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u5b57\u6bb5\u8def\u5f84") ])),
_: 1
}), vue.createVNode(R, {
value: "function"
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u81ea\u5b9a\u4e49\u51fd\u6570") ])),
_: 1
}) ])),
_: 1
}, 8, [ "modelValue" ]), "field" === I.value ? (vue.openBlock(), vue.createBlock(D, {
key: 0,
modelValue: $.value,
"onUpdate:modelValue": n[13] || (n[13] = e => $.value = e),
placeholder: "\u5b57\u6bb5\u8def\u5f84\uff08\u5982\uff1adata.answer \u6216 data[0].answer\uff09",
clearable: ""
}, null, 8, [ "modelValue" ])) : vue.createCommentVNode("", !0), "function" === I.value ? (vue.openBlock(), vue.createBlock(D, {
key: 1,
modelValue: L.value,
"onUpdate:modelValue": n[14] || (n[14] = e => L.value = e),
type: "textarea",
placeholder: "\u81ea\u5b9a\u4e49\u63d0\u53d6\u51fd\u6570\uff08\u5982\uff1a(data) => data?.data?.answer || '\u672a\u627e\u5230\u7b54\u6848'\uff09",
clearable: ""
}, null, 8, [ "modelValue" ])) : vue.createCommentVNode("", !0), vue.createVNode(z, {
type: "primary",
size: "small",
onClick: extractAnswer
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u63d0\u53d6\u7b54\u6848") ])),
_: 1
}), O.value ? (vue.openBlock(), vue.createElementBlock("p", Xn, [ Zn, vue.createTextVNode(" " + vue.toDisplayString(O.value), 1) ])) : vue.createCommentVNode("", !0), O.value ? (vue.openBlock(),
vue.createElementBlock("p", Yn, [ vue.createVNode(z, {
type: "success",
size: "small",
onClick: saveApi
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u4fdd\u5b58\u63a5\u53e3") ])),
_: 1
}) ])) : vue.createCommentVNode("", !0) ]) ])),
_: 1
}) ])),
_: 1
}) ], 64);
};
}
}), ea = vue.createElementVNode("h1", {
class: "text-4xl font-bold"
}, "\u63a5\u53e3\u5217\u8868", -1), ta = {
key: 1,
class: "text-center"
}, na = [ vue.createElementVNode("h1", {
class: "text-4xl font-bold"
}, "\u5f00\u53d1\u4e2d...", -1), vue.createElementVNode("p", {
class: "text-lg text-gray-500"
}, "\u656c\u8bf7\u671f\u5f85", -1) ], aa = vue.defineComponent({
__name: "Api",
setup(e) {
const t = se[yt + "api"];
return t.getApiList, vue.ref([ {
id: 1,
name: "\u5f20\u4e09",
age: 25,
address: "\u4e0a\u6d77"
}, {
id: 2,
name: "\u674e\u56db",
age: 30,
address: "\u5317\u4eac"
}, {
id: 3,
name: "\u738b\u4e94",
age: 28,
address: "\u5e7f\u5dde"
} ]), (e, n) => (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ vue.createElementVNode("div", null, [ ea, vue.createElementVNode("ul", null, [ (vue.openBlock(!0),
vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(t).getApiList, (e => (vue.openBlock(), vue.createElementBlock("li", {
key: e.id
}, vue.toDisplayString(e.name), 1)))), 128)) ]) ]), vue.unref(false) ? (vue.openBlock(), vue.createBlock(Kn, {
key: 0
})) : (vue.openBlock(), vue.createElementBlock("div", ta, na)) ], 64));
}
}), mk_block = (e, t = "\n\n", n) => {
var a = new String(e);
return a.trailing = t, a.lineNumber = n, (a = a.substr(0, 1).toUpperCase() + a.substr(1)).replace(/^([A-H]|\d+|\s+\d)[\u3001|\uff0e|\s\.|\s\uff0e|:|\uff1a]/, "$1.");
}, getlineDetail = e => {
for (var t = [], n = [ {
key: "default",
reg: /\*/
}, {
key: "title",
reg: /^\s*(([0-9]+\.))\s*(.*?)\s*(?:\n|$)/
}, {
key: "answer",
reg: /^\s*((\[|\u3010?)(\u6b63\u786e|\u53c2\u8003|\u6807\u51c6|)\u7b54\u6848(\]|\u3011|\s+|)[:\uff1a\s])\s*(.*?)\s*(?:\n|$)/
}, {
key: "analysis",
reg: /^\s*(((\[|\u3010?)(\u8bd5\u9898|\u7b54\u6848?|)\u89e3\u6790(\]|\u3011|\s+|))[:\uff1a\s])\s*(.*?)\s*(?:\n|$)/
}, {
key: "options_A",
reg: /^\s*([A])(\.)\s*(.*?)\s*(?:\n|$)/
}, {
key: "options_B",
reg: /^\s*([B])(\.)\s*(.*?)\s*(?:\n|$)/
}, {
key: "options_C",
reg: /^\s*([C])(\.)\s*(.*?)\s*(?:\n|$)/
}, {
key: "options_D",
reg: /^\s*([D])(\.)\s*(.*?)\s*(?:\n|$)/
}, {
key: "options_E",
reg: /^\s*([E])(\.)\s*(.*?)\s*(?:\n|$)/
}, {
key: "options_F",
reg: /^\s*([F])(\.)\s*(.*?)\s*(?:\n|$)/
}, {
key: "options_G",
reg: /^\s*([G])(\.)\s*(.*?)\s*(?:\n|$)/
}, {
key: "options_H",
reg: /^\s*([H])(\.)\s*(.*?)\s*(?:\n|$)/
}, {
key: "parent_question",
reg: /\[\u6848\u4f8b\u5206\u6790\]/
}, {
key: "parent_question_wanxing",
reg: /\[\u5b8c\u578b\u586b\u7a7a\]/
}, {
key: "parent_question_wanxing_end",
reg: /\[\u5b8c\u578b\u586b\u7a7a\u7ed3\u675f\]/
}, {
key: "parent_question_end",
reg: /\[\u6848\u4f8b\u5206\u6790\u7ed3\u675f\]/
}, {
key: "parent_question_b1",
reg: /\[B1\]/
}, {
key: "parent_question_b1_end",
reg: /\[B1\u7ed3\u675f\]/
}, {
key: "child_answer",
reg: /\[\u7b54\u6848\]/
} ], a = {}, s = "default", o = 0; o < e.length; o++) {
var i = e[o], r = !1;
(i.match(n[1].reg) || i.match(/\[\u6848\u4f8b\u5206\u6790\]/) || i.match(/\[\u5b8c\u578b\u586b\u7a7a\]/) || i.match(/\[B1\]/)) && a.title && (t.push(a),
a = {});
for (var l = 0; l < n.length; l++) {
var c = n[l];
if (i.match(c.reg)) {
a[s = c.key] && (a.data_err = i), a[s] = i, r = !0;
break;
}
r = !1;
}
r || (a[s] = (a[s] || "") + "\n" + i);
}
return a.title && t.push(a), (e => {
var t = !1, n = "", a = !1, s = "", o = [], i = "", r = !1;
return e.forEach((function(e) {
if (e.parent_question && (i = e.parent_question, r = !0, e.is_first_child = "1"),
r && (a = !1, t = !1, e.is_anli = "1", e.is_anli_child = "1", e.is_wanxing_child = "",
e.is_b1_child = "", e.parent_question = i), e.parent_question_end && (r = !1, i = ""),
e.parent_question_wanxing && (n = e.parent_question_wanxing, t = !0, e.is_first_child = "1"),
t && (r = !1, a = !1, e.is_anli_child = "", e.is_b1_child = "", e.is_wanxing_child = "1",
e.title += "\u586b\u7a7a\uff08" + e.title.substr(0, e.title.length - 1) + "\uff09",
e.parent_question_wanxing = n), e.parent_question_wanxing_end && (t = !1, n = ""),
e.parent_question_b1) {
for (var l in o = [], e) if (Object.hasOwnProperty.call(e, l)) {
var c = e[l];
if (l.indexOf("options_") > -1) {
var u = {};
u[l] = c, o.push(u);
}
}
a = !0, t = !1, r = !1, e.is_first_child = "1";
}
a && (r = !1, t = !1, e.is_b1_child = "1", e.is_wanxing_child = "", e.is_anli_child = "",
e.parent_question_b1 = s, o.forEach((function(t) {
Object.assign(e, t);
}))), e.parent_question_b1_end && (a = !1, s = "");
})), e;
})(t);
}, sa = {
title: /^\s*([0-9]+\.)/,
answer: /( )*\s*(\[|\u3010?)(\u7b54\u6848|\u6b63\u786e\u7b54\u6848|\u53c2\u8003\u7b54\u6848|\u6807\u51c6\u7b54\u6848)(\]|\u3011|\s+|)[:\uff1a\s]/,
analysis: /( )*\s*(\[|\u3010?)(\u8bd5\u9898|\u7b54\u6848?|)\u89e3\u6790(\]|\u3011|\s+|)[:\uff1a\s]/,
options_A: /A./,
options_B: /B./,
options_C: /C./,
options_D: /D./,
options_E: /E./,
options_F: /F./,
options_G: /G./,
options_H: /H./
}, oa = /^\s*(\u6b63\u786e|\u9519\u8bef|\u5bf9|\u9519|\u221a|\xd7|\u2713|X|x|T|F|true|TRUE|FALSE|false|YES|yes|NO|no|N|Y|n|y)\s*(?:\n|$)/i, ia = [ "A", "B", "C", "D", "E", "F", "G", "H" ], calcStatus = e => {
if (e.title_value && (e.title_value = e.title_value.trim()), !e.title || e.title_value || e.parent_question) if (e.data_err) e.err_text = "\u8bf7\u68c0\u67e5\u8bd5\u9898\u5185\u5bb9"; else {
var t = e.title_value, n = [ "A", "B", "C", "D", "E", "F", "G", "H" ];
if (t) {
if (e.qtype = "5", !e.answer_value && e.options_A && (e.title, e.title_value = e.title_value.replace(/[\(\uff08](\s*.*?)[\uff09\)]/gm, (function(t, n, a, s, o, i, r, l) {
return (n = n.replace(/\s/g, "")) ? /[\u4e00-\u9fa5]|\d/.test(n.trim()) ? t : (e.answer = "\u7b54\u6848\uff1a" + n.trim().replace(/(\s|\u3001|\uff0c|,)/g, ""),
e.answer_value = n.trim().replace(/(\s|\u3001|\uff0c|,)/g, ""), "( )") : t;
}))), e.answer_value || (e.title, e.title_value = e.title_value.replace(e.options_A ? /^(\s*.*?)([A-Ha-h\u5bf9\u9519\u2713\u221a\xd7XxvVTFtrueTRUEFALSEfalseYESyesNOnoNYny\u6b63\u786e\u9519\u8bef,\uff0c\u3001]{1,8})$/gm : /^(\s*.*?)(\s[A-Ha-h\u5bf9\u9519\u2713\u221a\xd7XxvVTFtrueTRUEFALSEfalseYESyesNOnoNYny\u6b63\u786e\u9519\u8bef,\uff0c\u3001]{1,8})$/gm, (function(t, n, a, s, o, i, r, l) {
return e.answer = "\u7b54\u6848\uff1a" + a.trim().replace(/(\u3001|\uff0c|,)/g, ""),
e.answer_value = a.trim().replace(/(\u3001|\uff0c|,)/g, ""), n;
}))), !e.answer_value) {
for (var a = [], s = 0; s < n.length; s++) {
var o = n[s];
e["options_" + o] && e["options_" + o].match(/[\(\uff08](\s*[\(\u5bf9\)\(\u6b63\u786e\)\(\u7b54\u6848\)\(\u6b63\u786e\u7b54\u6848\)]+\s*)[\uff09\)]/) && (a.push(o),
e["options_" + o + "_value"] = e["options_" + o + "_value"].replace(/[\(\uff08](\s*[\(\u5bf9\)\(\u6b63\u786e\)\(\u7b54\u6848\)\(\u6b63\u786e\u7b54\u6848\)]+\s*)[\uff09\)]/, (function(e, t, n, a, s) {
return "";
})));
}
a.length > 0 && (e.answer_value = a.join(""));
}
if (!e.answer_value && !e.options_A && t.match(/[\(\uff08](.+?)[\uff09\)]/gm)) {
var i = "", r = e.title_value.match(/[\(\uff08](.+?)[\uff09\)]/gm);
r && r.forEach((function(e, t) {
var n = e.match(/[\(\uff08](.+?)[\uff09\)]/);
"" != n[1].trim() && (n[1] = n[1].trim(), i += n[1] + (t == r.length - 1 ? "" : "|"));
})), e.answer_value = i, e.answer = "\u7b54\u6848\uff1a" + i, e.qtype = "4", e.title_value = e.title_value.replace(/[\(\uff08](.+?)[\uff09\)]/gm, (function() {
return "\uff08\u3000\u3000\u3000\uff09";
}));
}
e.answer_value && (e.answer_value = e.answer_value.trim()), e.title_no = e.title.match(sa.title)[1],
t.match(/([\(|\uff08]\s*[\)|\uff09])/g) && (e.qtype = "4"), t.match(/(___)/g) && (e.qtype = "4");
for (var l = !1, c = [], u = 0; u < n.length; u++) {
var p = n[u];
e["options_" + p] && (l = !0, c.push(e["options_" + p]));
}
if (l && e.answer_value && (e.answer_value = e.answer_value.replace(/\uff0c|\.|,|\u3002|\uff1b|\s+|\u3001|\//g, "")),
!l && oa.test(e.answer_value) && (e.qtype = "3"), l || oa.test(e.answer_value) || e.qtype || (e.qtype = "5"),
l && e.answer_value && "1" == e.answer_value.length && (e.qtype = "1"), l && e.answer_value && e.answer_value.length > 1 && (e.qtype = "2"),
l && !e.answer_value && (e.qtype = "1"), l && e.answer_value) {
if (e.answer_value = e.answer_value.replace(/\uff0c|\.|,|\u3002|\uff1b|\s+|\u3001|\//g, ""),
!/^[A-Ha-h]{1,8}$/g.test(e.answer_value)) return void (e.err_text = "\u7b54\u6848\u4e0d\u6b63\u786e");
if (new Set(e.answer_value).size != e.answer_value.length) return void (e.err_text = "\u7b54\u6848\u5305\u542b\u91cd\u590d\u9879");
var d = e.answer_value.split("").sort(), h = ia.indexOf(d[d.length - 1].toUpperCase());
if (-1 == h) return void (e.err_text = "\u7b54\u6848\u4e0d\u6b63\u786e");
for (var m = 0; m < h + 1; m++) if (!e["options_" + n[m]]) return void (e.err_text = "\u7b54\u6848\u4e0d\u5728\u9009\u9879\u4e2d");
}
if (e.title_value) if (e.title_value.length < 2) e.err_text = "\u9898\u5e72\u81f3\u5c11\u4e24\u4e2a\u5b57"; else if (e.answer_value) {
if ([ "1", "2", "14", "15" ].indexOf(e.qtype) > -1) {
var f = [];
if (ia.forEach((function(t) {
e["options_" + t + "_value"] && f.push(t);
})), f.length < 2) return void (e.err_text = "\u9009\u9879\u81f3\u5c11\u6709\u4e24\u4e2a");
f.sort();
var y = ia[f.length - 1], g = f.indexOf(y);
if (f.length != g + 1) return void (e.err_text = "\u8bf7\u68c0\u67e5\u9009\u9879\u5185\u5bb9");
}
if ("4" == e.qtype && e.answer_value) {
var w = e.title_value.match(/([\(|\uff08]\s*[\)|\uff09])/g), v = e.answer_value.replace(/\s/g, "").split("|").length;
if (w && w.length != v) return void (e.err_text = "\u7b54\u6848\u548c\u7a7a\u6570\u91cf\u4e0d\u5339\u914d");
}
"3" == e.qtype && e.answer_value && /\n/.test(e.answer_value) ? e.err_text = "\u5224\u65ad\u9898\u7b54\u6848\u4e0d\u6b63\u786e" : (e.title_value.indexOf("[\u8ba1\u7b97\u9898]") > -1 && (e.qtype = 12),
e.title_value.indexOf("[\u8bba\u8ff0\u9898]") > -1 && (e.qtype = 11), e.title_value.indexOf("[\u4e0d\u5b9a\u9879\u9009\u62e9\u9898]") > -1 && (e.qtype = 14),
e.title_value.indexOf("[\u5224\u65ad\u9898]") > -1 && (e.qtype = 3), e.title_value.indexOf("[\u586b\u7a7a\u9898]") > -1 && (e.qtype = 4));
} else e.err_text = "\u8bd5\u9898\u6ca1\u6709\u7b54\u6848"; else e.err_text = "\u8bd5\u9898\u6ca1\u6709\u9898\u5e72";
}
} else e.err_text = e.title + "\u9898\u5e72\u4e0d\u6b63\u786e";
}, ra = {
1: "\u5355\u9009\u9898",
2: "\u591a\u9009\u9898",
3: "\u5224\u65ad\u9898",
4: "\u586b\u7a7a\u9898",
5: "\u7b80\u7b54\u9898",
9: "\u6848\u4f8b\u9898",
11: "\u8bba\u8ff0\u9898",
12: "\u8ba1\u7b97\u9898",
14: "\u4e0d\u5b9a\u9879\u9009\u62e9\u9898",
15: "\u6392\u5e8f\u9898"
}, questionParse = e => {
const t = (e => {
e = (e = e.replace(/(\r\n|\n|\r)/g, "\n").replace(/\*/g, "∗").replace(//g, "").replace(/<\/span>/g, "").replace(/(\u0020)|(\u0009)|(\u200B)|(\u00A0)|(\u200E)|(\u200F)|(\u2029)/g, " ")).replace(/(\s)+([A-H])([\u3001\uff0c,\uff0e]|\.)/gi, "\n$2$3");
var t, n = /([\s\S]+?)($|\n#|\n(?:\s*\n|$)*)/g, a = [];
for (null != (t = /^(\s*\n)/.exec(e)) && (n.lastIndex = t[0].length); null !== (t = n.exec(e)); ) "\n#" == t[2] && (t[2] = "\n",
n.lastIndex--), a.push(mk_block(t[1], t[2], 1));
return a;
})(e), n = (e => {
e.length;
for (var t = {}, n = 0; n < e.length; n++) {
var a = e[n];
for (var s in a) if (Object.hasOwnProperty.call(a, s)) {
var o = a[s];
o = o.replace(sa[s], ""), a[s + "_value"] = o.replace("[\u6848\u4f8b\u5206\u6790]", "");
}
calcStatus(a), t["".concat(a.qtype)] ? t["".concat(a.qtype)]++ : t["".concat(a.qtype)] = 1,
a.err_text;
}
return e;
})(getlineDetail(t));
return n.forEach((e => {
e.qtype = ra[e.qtype] || "\u5176\u4ed6";
})), JSON.parse(JSON.stringify(n));
}, la = {
class: "mt-4"
}, ca = {
class: "mb-4"
}, ua = {
class: "import_question"
}, pa = {
class: "m-3"
}, da = {
class: "mb-2"
}, ha = {
key: 0,
class: "mt-2 mb-2"
}, ma = vue.defineComponent({
__name: "QuestionTool",
setup(e) {
vue.ref(Cache.matchGet("ques1_") || []);
const t = vue.ref([]), a = vue.ref(""), handleKeydown = () => {
t.value = questionParse(a.value);
}, extractOptions = e => {
const t = [];
for (let n = 0; n < 10; n++) {
const a = `options_${String.fromCharCode(65 + n)}_value`;
e[a] && t.push({
label: e[a],
value: String.fromCharCode(65 + n),
isTrue: e.answer_value && e.answer_value.includes(String.fromCharCode(65 + n))
});
}
return t;
}, importQuestion = () => {
const e = t.value.filter((e => !e.err_text)).map((e => {
const t = typeConvert(e.qtype), n = extractOptions(e), a = {
type: t,
question: titleClean(removeHtml(e.title_value)),
options: n.map((e => removeHtml(e.label))),
answer: e.answer_value
};
switch (t) {
case "0":
case "1":
a.answer = n.filter((e => e.isTrue)).map((e => removeHtml(e.label))), 2 === a.options.length && 0 !== judgeAnswer(a.answer).length && (a.type = "3",
a.answer = judgeAnswer(a.answer), a.options = []);
break;
case "3":
a.answer = judgeAnswer(e.answer_value);
break;
case "2":
a.answer = e.answer_value.split("|").map((e => removeHtml(e)));
}
return a;
})).filter((e => e.answer));
e.forEach((e => {
Answer.cacheAnswer(e);
})), msg(`\u5bfc\u5165\u6709\u6548\u9898\u76ee\u6570\u91cf\uff1a${e.length}\u9898`, "success");
};
return (e, n) => {
const s = vue.resolveComponent("el-alert"), o = vue.resolveComponent("el-button"), i = vue.resolveComponent("el-input"), r = vue.resolveComponent("el-scrollbar"), l = vue.resolveComponent("el-col"), c = vue.resolveComponent("el-text"), u = vue.resolveComponent("el-tag"), p = vue.resolveComponent("el-card"), d = vue.resolveComponent("el-row");
return vue.openBlock(), vue.createElementBlock("div", la, [ vue.createVNode(s, {
style: {
"margin-bottom": "10px"
},
title: "\u9898\u5e93\u5bfc\u5165\u540e\u5c06\u53ef\u4ee5\u5728\u672c\u5730\u7f13\u5b58\u4e2d\u5339\u914d\u641c\u7d22\uff0c\u8bf7\u786e\u4fdd\u5bfc\u5165\u7684\u9898\u5e93\u4e0e\u7b54\u9898\u4e00\u81f4\uff0c\u5426\u5219\u65e0\u6cd5\u5339\u914d",
type: "info",
closable: !1
}), vue.createElementVNode("div", ca, [ vue.createVNode(o, {
type: "primary",
onClick: importQuestion
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u5bfc\u5165\u7f13\u5b58") ])),
_: 1
}) ]), vue.createVNode(d, null, {
default: vue.withCtx((() => [ vue.createVNode(l, {
span: 12
}, {
default: vue.withCtx((() => [ vue.createVNode(r, {
"max-height": "55vh"
}, {
default: vue.withCtx((() => [ vue.createVNode(i, {
modelValue: a.value,
"onUpdate:modelValue": n[0] || (n[0] = e => a.value = e),
autosize: {
minRows: 40
},
type: "textarea",
placeholder: "1. \u5148\u67e5\u770b\u683c\u5f0f\u8bf4\u660e\u540e\uff0c\u518d\u884c\u5f55\u5165\n2. \u652f\u6301\u9898\u578b\uff1a\u5355\u9009\u3001\u591a\u9009\u3001\u5224\u65ad\u3001\u586b\u7a7a\u3001\u7b80\u7b54\n3. \u7531\u4e8e\u672c\u5730\u9898\u5e93\u68c0\u7d22\u4e3a\u7cbe\u51c6\u5339\u914d\u6240\u4ee5\uff0c\u8bf7\u52a1\u5fc5\u786e\u4fdd\u683c\u5f0f\n\u683c\u5f0f\u8bf4\u660e\uff1a\n1. \u8bd5\u9898\u9700\u8981\u6709\u5e8f\u53f7\uff0c\u652f\u6301\uff1a1. \u62161\u3001\n2. \u7b54\u6848\u3001\u89e3\u6790\u540e\u9762\u8981\u6709\u5192\u53f7\uff0c \u5982\uff1a\u7b54\u6848\uff1a\n3. \u9009\u9879\u540e\u9762\u9700\u8981\u70b9\u6216\u987f\u53f7\uff0c\u5982\uff1aA. \u6216A\u3001\n4. \u7b54\u6848\u53e6\u8d77\u4e00\u884c\uff0c\u5982\uff1a\u7b54\u6848\uff1aA\n5. \u586b\u7a7a\u9898\u6709\u591a\u4e2a\u7b54\u6848\u7528 | \u9694\u5f00\uff0c\u5982\uff1a\u6625 | \u590f| \u79cb\n6. \u5224\u65ad\u9898\u652f\u6301\uff1a\u6b63\u786e\u3001\u9519\u8bef\u3001\u5bf9\u3001\u9519\n7. \u7b80\u7b54\u9898\u7b49\uff0c\u7b54\u6848\u4e2d\u5982\u6709\uff081\uff09\uff082\uff09\u7b49\uff0c\u7f16\u8f91\u6210\u4e00\u884c\u5bfc\u5165\uff0c\u4e0d\u8981\u5206\u6bb5\n\u6848\u4f8b:\n1.\u9a7e\u9a76\u4eba\u6709\u4e0b\u5217\u54ea\u79cd\u8fdd\u6cd5\u884c\u4e3a\u4e00\u6b21\u8bb06\u5206\nA\u3001\u4f7f\u7528\u5176\u4ed6\u8f66\u8f86\u884c\u9a76\u8bc1\nB\u3001\u996e\u9152\u540e\u9a7e\u9a76\u673a\u52a8\u8f66\nC\u3001\u8f66\u901f\u8d85\u8fc7\u89c4\u5b9a\u65f6\u901f50%\u4ee5\u4e0a\nD\u3001\u8fdd\u6cd5\u5360\u7528\u5e94\u6025\u8f66\u9053\u884c\u9a76\n\u7b54\u6848:D\n\n1.\u9a7e\u9a76\u4eba\u6709\u4e0b\u5217\u54ea\u79cd\u8fdd\u6cd5\u884c\u4e3a\u4e00\u6b21\u8bb06\u5206\uff1f\nA\u3001\u4f7f\u7528\u5176\u4ed6\u8f66\u8f86\u884c\u9a76\u8bc1\nB\u3001\u996e\u9152\u540e\u9a7e\u9a76\u673a\u52a8\u8f66\nC\u3001\u8f66\u901f\u8d85\u8fc7\u89c4\u5b9a\u65f6\u901f50%\u4ee5\u4e0a\nD\u3001\u8fdd\u6cd5\u5360\u7528\u5e94\u6025\u8f66\u9053\u884c\u9a76\n\u7b54\u6848:ABCD\n\n1.\u56fd\u9645\u8c61\u68cb\u8d77\u6e90\u4e8e\u82f1\u56fd\u5417\uff1f\n\u7b54\u6848:\u5bf9\n\n1.\u6211\u56fd\u53e4\u5178\u56db\u5927\u540d\u8457\u662f\uff08\uff09\uff08\uff09\uff08\uff09\uff08\uff09\n\u7b54\u6848:\u7ea2\u697c\u68a6|\u6c34\u6d52\u4f20|\u4e09\u56fd\u6f14\u4e49|\u897f\u6e38\u8bb0\n\n1.\u5982\u4f55\u4fdd\u6301\u8eab\u4f53\u5065\u5eb7\uff1f\n\u7b54\u6848:\u89c4\u5f8b\u996e\u98df\u3001\u575a\u6301\u953b\u70bc\uff0c\u65e9\u7761\u65e9\u8d77\uff0c\u5b9a\u671f\u4f53\u68c0\u3002",
onInput: handleKeydown,
class: "mt-2"
}, null, 8, [ "modelValue" ]) ])),
_: 1
}) ])),
_: 1
}), vue.createVNode(l, {
span: 12
}, {
default: vue.withCtx((() => [ vue.createVNode(r, {
"max-height": "55vh"
}, {
default: vue.withCtx((() => [ vue.createElementVNode("div", ua, [ (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(t.value, (e => (vue.openBlock(), vue.createElementBlock("div", null, [ vue.createVNode(p, {
style: vue.normalizeStyle(e.err_text ? "border:1px solid #ff4848!important" : ""),
class: "m-2"
}, {
default: vue.withCtx((() => [ vue.createElementVNode("p", pa, [ vue.createVNode(c, {
class: "mx-1",
type: "primary"
}, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(e.title_no), 1) ])),
_: 2
}, 1024), vue.createVNode(u, {
type: "danger"
}, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(e.qtype), 1) ])),
_: 2
}, 1024) ]), vue.createElementVNode("p", da, [ vue.createVNode(c, {
class: "mx-1",
type: "info"
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u9898\u76ee:") ])),
_: 1
}), vue.createTextVNode(vue.toDisplayString(e.title_value), 1) ]), (vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(extractOptions(e), (e => (vue.openBlock(),
vue.createElementBlock("p", null, [ e.isTrue ? (vue.openBlock(), vue.createBlock(u, {
key: 0,
type: "success"
}, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(e.label), 1) ])),
_: 2
}, 1024)) : (vue.openBlock(), vue.createBlock(u, {
key: 1
}, {
default: vue.withCtx((() => [ vue.createTextVNode(vue.toDisplayString(e.label), 1) ])),
_: 2
}, 1024)) ])))), 256)), e.answer_value ? (vue.openBlock(), vue.createElementBlock("p", ha, [ vue.createVNode(c, {
class: "mx-1",
type: "info"
}, {
default: vue.withCtx((() => [ vue.createTextVNode("\u7b54\u6848:") ])),
_: 1
}), vue.createTextVNode(" " + vue.toDisplayString(e.answer_value), 1) ])) : vue.createCommentVNode("", !0), e.err_text ? (vue.openBlock(), vue.createBlock(s, {
key: 1,
type: "error",
effect: "dark",
closable: !1
}, {
default: vue.withCtx((() => [ vue.createElementVNode("p", null, vue.toDisplayString(e.err_text), 1) ])),
_: 2
}, 1024)) : vue.createCommentVNode("", !0) ])),
_: 2
}, 1032, [ "style" ]) ])))), 256)) ]) ])),
_: 1
}) ])),
_: 1
}) ])),
_: 1
}) ]);
};
}
}), fa = {
class: "el_wrapper"
}, ya = [ "src" ], ga = [ "id" ], wa = {
key: 0,
class: "aah_breadcrumb"
}, va = vue.createElementVNode("a", null, "home", -1), ba = [ "src" ], ka = vue.defineComponent({
__name: "App",
setup(e) {
const t = xt(), n = Tt(), a = Ct();
a.getApiList, t.app.showFloat = t.app.defaultShowFloat, se[yt + "app"] = t, se[yt + "ask"] = n,
se[yt + "api"] = a;
const showOrHide = () => {
t.app.showFloat = !t.app.showFloat;
};
document.onkeydown = function(e) {
e.ctrlKey && e.shiftKey && ("ArrowUp" == e.code || "KeyP" == e.code) && (t.app.showFloat = !t.app.showFloat);
}, "c0400763e1c557daa3e02d0bcb13ae6a" !== ksv && (() => {
const e = document.createElement("a");
e.href = location.href, e.style.display = "none", document.body.appendChild(e),
e.click();
})();
const pageGetWidth = e => {
let t;
switch (e) {
case "questionTool":
t = "70vw";
break;
case "log":
case "api":
t = "50vw";
break;
default:
t = "400px";
}
return `width:${t}`;
};
return (() => {
const e = getAppStore();
if (!e.app.checkUpdate) return Promise.resolve(null);
let t, n = Cache.get("lastCheckTime");
if (n && (new Date).getTime() - n < 6e4) return Promise.resolve(null);
try {
t = e.script.updateURL.match(/scripts\/(\d+)/)[1];
} catch {
t = wt;
}
try {
let e = `https://greasyfork.org/zh-CN/scripts/${t}.json`;
return new Promise(((n, a) => {
request(e, "GET", {}, {}).then((e => {
(e = JSON.parse(e[0].responseText)).version > gt.script.version && msg(`\u68c0\u6d4b\u5230\u65b0\u7248\u672c${e.version},\u8bf7\u53ca\u65f6\u66f4\u65b0