SOURCE

function docViewerScrollChanged(a, b) {
	b > 0 && a > studySize && (studySize = a)
}
function docLoaded(a) {
	type = 1,
	TimerStartLoad()
}
function InitFrist() {
	if ("1" == $("#hidNeedMobile").val()) return ShowBindPhone(),
	!1
}
function restartStudy(a) {
	"1" == submitIsOpen ? (videoStudy.isCheat = !0, commonHelper.startTimer()) : "1" == learningProgressSubmission ? commonHelper.startTimer() : "1" === a ? initFirstStudy(!0) : "VideoKnowledge" == knowledgeType ? void 0 !== myPlayer && "paused" == myPlayer.getState() && myPlayer.play() : ResetTimer()
}
function gotoUdp() {
	location.replace("/udp/personal/accountsecurity.htm")
}
function videoSeek() {
	oldTime = -1
}
function videoTimeChange(a) {
	if (msgCheatTimes) {
		var b = parseInt(a);
		oldTime != b && msgCheatTimes.indexOf(b) > -1 && (showMsgCheat("0"), oldTime = b)
	}
}
function deleteHeart(a, b) {
	var c = lecaiAPiUrl + "/kng/knowledges/" + (a || kngId) + "/heart";
	$.ajax({
		type: "POST",
		url: c,
		headers: {
			Source: "501",
			Token: token
		},
		data: JSON.stringify({}),
		contentType: "application/json",
		dataType: "json",
		complete: function(a) {
			"function" == typeof b && b()
		}
	})
}
function setExpCookie(a, b, c) {
	var d = new Date;
	d.setTime(d.getTime() + 1e3 * (c || 60)),
	document.cookie = a + "=" + escape(b) + ";expires=" + d.toGMTString() + ";path=/"
}
function getExpCookie(a) {
	var b = document.cookie.match(new RegExp("(^| )" + a + "=([^;]*)(;|$)"));
	return null != b ? unescape(b[2]) : null
}
function delExpCookie(a) {
	null != getExpCookie(a) && setExpCookie(a, "", -1)
}
function checkHeart(a) {
	if ("1" === isSingle) {
		var b = lecaiAPiUrl + "/kng/knowledges/" + kngId + "/heart";
		$.ajax({
			type: "GET",
			url: b,
			headers: {
				Source: "501",
				Token: token
			},
			contentType: "application/json",
			dataType: "json",
			success: function(b) {
				heartbeatTime = b.heartbeatTime,
				heartData = b,
				b.checkResult ? "function" == typeof a && a() : showHeartTip($.i18n.map.knt_tip_heart.replace("{title1}", b.knowledgeName).replace("{title2}", b.knowledgeName))
			},
			error: function() {
				"function" == typeof a && a()
			}
		})
	} else "function" == typeof a && a()
}
function showHeartTip(a) {
	var b = document.getElementById("iframeScorm");
	null != b && (b.style.display = "none");
	var c = "<div id='dvHeartTip' class='playgoon'><div class='el-playgoon-shadow'></div><div class='playgoonbg'></div><div class='playgooncontent'>" + a + "</div><input type='button' style='width: 150px; margin-left: 95px;' onclick='closeWebPage();' value='" + $.i18n.map.kng_lbl_closeknowledge + "' class='btnok' /><input type='button' style='width: 150px; margin-left: 20px;' onclick='learnKng();' value='" + $.i18n.map.kng_lbl_continestudy + "' class='btnok' /></div>";
	"DocumentKnowledge" == knowledgeType ? $("#docplayercontainer").append(c) : ($("#playervideocontainer").append(c), $("#playeraudiocontainer").append(c), $("#playercontainer").append(c)),
	"VideoKnowledge" == knowledgeType && void 0 !== myPlayer && "playing" == myPlayer.getState() ? myPlayer.pause() : (clearInterval(timer), clearInterval(timecheck)),
	CreateSubmitLog("多知识心跳提示", "{}")
}
function learnKng() {
	var a = {
		oldKnowledgeId: heartData.knowledgeId,
		oldSourceId: heartData.source,
		newKnowledgeId: kngId
	},
	b = lecaiAPiUrl + "/kng/knowledges/learn";
	$.ajax({
		type: "POST",
		url: b,
		headers: {
			Source: "501",
			Token: token
		},
		data: JSON.stringify(a),
		contentType: "application/json",
		dataType: "json",
		complete: function(a) {
			a.status >= 200 && a.status < 300 && refresh()
		}
	})
}
function deleteCookieHeart(a) {
	var b = getExpCookie("heartKngId");
	b ? (delExpCookie("heartKngId"), deleteHeart(b,
	function() {
		"function" == typeof a && a()
	})) : "function" == typeof a && a()
}
function TimerStartLoad() {
	"True" == openRewardTip && standardStudyHours < 120 && !isCompleted && "function" == typeof showRewardTip && showRewardTip(),
	deleteCookieHeart(function() {
		checkFirst = !0,
		checkHeart(function() {
			initFirstStudy()
		},
		!0)
	})
}
function initFirstStudy(a) {
	if (!a && msgCheatTimes && ("VideoKnowledge" != knowledgeType && msgCheatTimes.indexOf(0) > -1 || !cheatMobile)) return void showMsgCheat("1");
	if (SyncSchedule(), standardStudyHours <= 0) isCompleted ? completeDivShow() : submitStudy();
	else if (standardStudyHours > 0 && standardStudyHours < 120) {
		if ("VideoKnowledge" == knowledgeType && videoLength < 15 && videoLength > 0) return void completeDivShow();
		var b = "";
		timersmall = setInterval(function() {
			smalltime >= 0 ? (smalltime > 0 ? b = smalltime + $.i18n.map.sty_lbl_second: InitLoadStudy(), $("#spanCountdown").html(b), smalltime -= 1) : clearInterval(timersmall)
		},
		1e3)
	} else InitLoadStudy()
}
function AddUserKnowledge() {
	if ("1" == isSingle && "" != curTitle) CheatWarming(curTitle);
	else {
		var a = '{"orgID":"' + orgID + '","userID":"' + userID + '","knowledgeID":"' + kngId + '","packageID":"' + packageID + '","masterID":"' + masterID + '","masterType":"' + masterType + '","isSingle":"' + isSingle + '"}';
		$.ajax({
			type: "POST",
			contentType: "text/json",
			url: "/Services/StyService.svc/AutoCreateUserKnowledge",
			data: a,
			dataType: "json",
			cache: !1,
			success: function(a) {
				"" != a ? CheatWarming(a) : (SyncSchedule(), existsUserKnowledge = 1, InitLoadStudy(), studySize = 1, $("#divProcessArea").show(), $("#ScheduleText").show(), $("#divStartArea").show(), $("#divNotStartArea").hide(), $("#divWarkup").show(), $("#spantalscore").text(standardStudyScore), 0 == initiativeCreditMode && $("#spanStudyScroeShow").show())
			}
		})
	}
}
function CheatWarming(a) {
	if ("-2" == a || "-2." == a) AppendEditPlanHtml();
	else {
		if ("-1" != a && "-1." != a) return;
		AppendFilePlanHtml()
	}
	$("#divProcessArea").hide(),
	$("#ScheduleText").hide(),
	$("#divNotStartArea").hide(),
	$("#divCompletedArea").hide(),
	$("#divStartArea").hide(),
	isHere = 1
}
function GetCurSchedule() {
	SyncSchedule()
}
function InitLoadStudy() {
	if (standardStudyHours < validtimeSpan) isCompleted || completedStudy();
	else {
		countDown(standardStudyHours - actualStudyHours,
		function(a) {
			$("#spanLeavTimes").html(a)
		}),
		standardStudyHours - actualStudyHours >= validtimeSpan && (UserActionTimer.fn.Start(kngId, validtimeSpan), timecheck = setInterval(CheckIsMove, 1e3 * validtimeSpan))
	}
}
function countDown(a, b) {
	if (clearInterval(timer), ("VideoKnowledge" != knowledgeType || void 0 === myPlayer || "paused" != myPlayer.getState()) && !autoStop) {
		if ($("#hidSpeed").val()) {
			var c = $("#hidSpeed").val();
			c = parseFloat(c)
		}
		c && (c = c > 2 ? 1 : c, a = parseInt(a / c)),
		timer = setInterval(function() {
			timerCount++,
			heartNum++,
			reZero++,
			phaseTrackIntervalNum++,
			actualStudyHours++,
			--a;
			var c = $("#ScheduleText").text();
			if ("True" == openRewardTip && a <= 60 && c.indexOf("100%") < 0 && !isCompleted && ("function" == typeof showRewardTip && showRewardTip(), openRewardTip = "False"), msgCheatTimes && "VideoKnowledge" !== knowledgeType && msgCheatTimes.indexOf(timerCount) > -1) return void showMsgCheat("0");
			if (!msgCheatTimes && "1" == antionhook && phaseTrackIntervalNum >= phaseTrackIntervalTime) {
				var d = document.getElementById("iframeScorm");
				return d && (d.style.display = "none"),
				autoStop = !0,
				phaseTrackIntervalNum = 0,
				AppendWarningHtml(),
				void CreateSubmitLog("防作弊日志记录", "{}")
			}
			if (reZero >= validtimeSpan ? (reZero = 0, heartNum = 0, submitStudy()) : heartNum >= heartbeatTime && (heartNum = 0, checkHeart()), a <= 0) {
				var e = 1;
				type > 0 && (e = 0, studySize >= pageSize && (e = 1)),
				1 == e && 0 == initiativeCreditMode && 0 == getCreditMode && standardStudyHours > 0 && ($("#spanFinishScroeShow").show(), $("#spanFinishScore").show(), $("#spanActCmpScore").text(standardStudyScore), $("#spanTalCmpScore").text(standardStudyScore))
			} else {
				var f = "";
				daysold = Math.floor(a / 86400),
				daysold > 0 && (f += daysold + $.i18n.map.sty_lbl_daytime);
				var g = a - 86400 * daysold;
				hrsold = Math.floor(g / 3600),
				hrsold > 0 && (f += hrsold + $.i18n.map.sty_lbl_hour);
				var h = g - 3600 * hrsold;
				minsold = Math.floor(h / 60),
				minsold > 0 && (f += minsold + $.i18n.map.sty_lbl_minute),
				seconds = h - 60 * minsold,
				seconds > 0 && (f += seconds + $.i18n.map.sty_lbl_second),
				b(f)
			}
		},
		1e3)
	}
}
function MinuteChange(a) {
	if (a < 100) if (a > 0) {
		$("#divScheduleWidth").css("width", 1.13 * a + "px"),
		$("#ScheduleText").html(a + "%"),
		$("#hidStudySchedule").val(a),
		$("div.select").find(".percent").html(a + "%");
		var b = (a * standardStudyScore / 100).toFixed(2);
		0 == getCreditMode && $("#spanobscore").text(b),
		a >= studyRate && ($("#spanCmp").html('<input type="button" class="btn btn-warning" value="' + $.i18n.map.kng_lbl_havelearnedfinish + '" onclick="completedStudy();" />'), $("#divHead2").show()),
		$("#hidUserActualStudyScore").val(b),
		$("#hidUserActualStudyHours").val(actualStudyHours)
	} else $("#divScheduleWidth").css("width", "0px");
	else $("#divScheduleWidth").css("width", "113px"),
	"100%" !== $("#ScheduleText").html() && $("#ScheduleText").html("100%"),
	$("#hidStudySchedule").val("100"),
	$("div.select").find(".percent").html("100%"),
	$("#divStartArea").hide(),
	$("#divNotStartArea").hide(),
	$("#divCompletedArea").show(),
	actualStudyHours = standardStudyHours,
	studySize = pageSize,
	0 == initiativeCreditMode && standardStudyScore > 0 && ($("#spanFinishScroeShow").show(), $("#spanFinishScore").show(), $("#spanActCmpScore").text(standardStudyScore), $("#spanTalCmpScore").text(standardStudyScore)),
	isCompleted = !0
}
function CheckIsMove() {
	UserActionTimer.fn.Start(kngId, validtimeSpan)
}
function fullScreenAction(a) {
	UserActionTimer.fn.SetValidTimeSpan(a)
}
function ResetTimer() {
	$("#divNotStartArea").is(":visible") || window.setTimeout(function() {
		isHere = 1;
		try {
			thisU.MouseActionTime = new Date,
			thisU.LastMouseActionTime = thisU.MouseActionTime
		} catch(a) {}
		isHere = 0,
		InitLoadStudy()
	},
	1e3)
}
function StopTimer() {
	clearInterval(timer)
}
function submitStudy() {
	checkHeart(function() {
		if ("PostStudy" == masterType || "O2OStudy" == masterType || "OJTStudy" == masterType) return void submitPostStudy();
		var a = 0;
		$("#hidViewSchedule").length > 0 && (a = $("#hidViewSchedule").val());
		var b = masterType;
		"Plan" != masterType && "PlanStudy" != masterType && "Position" != masterType && "PositionStudy" != masterType && (b = "", masterID = ""),
		$("#hidSpeed").val() && (speed = $("#hidSpeed").val(), speed = parseFloat(speed)),
		speed && (speed = speed > 2 ? 1 : speed),
		"null" == masterID && (masterID = ""),
		submitStudyMethod('{"knowledgeId":"' + kngId + '","masterId":"' + masterID + '","masterType":"' + b + '","packageId":"' + packageID + '","pageSize":' + pageSize + ',"studySize":' + pageSize + ',"studyTime":' + 120 * speed + ',"type":' + type + ',"offLine":false,"end":false,"care":true,"deviceId":"","studyChapterIds":"' + stuChpIDs + '","viewSchedule":' + parseFloat(a) + "}", '{"knowledgeId":"' + kngId + '","masterId":"' + masterID + '","masterType":"' + b + '","packageId":"' + packageID + '","pageSize":' + pageSize + ',"studySize":' + pageSize + ',"studyTime":' + 120 * speed + ',"type":' + type + ',"offLine":false,"end":false,"care":true,"deviceId":"","studyChapterIds":"' + stuChpIDs + '","viewSchedule":' + parseFloat(a) + ',"multiple":' + parseFloat(speed) + ',"realHour":120}', "study", "submit")
	})
}
function submitPostStudy() {
	var a = 0;
	$("#hidViewSchedule").length > 0 && (a = $("#hidViewSchedule").val());
	var b = masterType,
	c = getQueryString("taskId") || masterID;
	c && c.indexOf(",") && (c = c.split(",")[0]),
	c.indexOf(":st=") > -1 && (c = c.replace(":st=", "")),
	c && c.length > 36 && (c = c.substr(0, 36)),
	$("#hidSpeed").val() && (speed = $("#hidSpeed").val(), speed = parseFloat(speed)),
	speed && (speed = speed > 2 ? 1 : speed),
	"null" == masterID && (masterID = ""),
	submitStudyMethod('{"knowledgeId":"' + kngId + '","masterId":"' + c + '","masterType":"' + b + '","sourceId":"' + packageID + '","studyTime":' + 120 * speed + ',"deviceId":"","offLine":false,"end":false,"viewSchedule":' + parseFloat(a) + "}", '{"knowledgeId":"' + kngId + '","masterId":"' + c + '","masterType":"' + b + '","sourceId":"' + packageID + '","studyTime":' + 120 * speed + ',"deviceId":"","offLine":false,"end":false,"viewSchedule":' + parseFloat(a) + ',"multiple":' + parseFloat(speed) + ',"realHour":120}', "poststudy", "submit")
}
function completeDivShow() {
	$("#divCheat").hide(),
	$("#divProcessArea").show(),
	$("#ScheduleText").show(),
	$("#divNotStartArea").hide(),
	$("#divCompletedArea").show(),
	$("#divStartArea").hide(),
	0 == initiativeCreditMode && 0 == getCreditMode && standardStudyScore > 0 && ($("#spanFinishScore").show(), $("#spanActCmpScore").text(standardStudyScore), $("#spanTalCmpScore").text(standardStudyScore)),
	$("#icon" + kngId) && ($("#icon" + kngId).prop("class", "pic2"), iscurfinish = 1),
	actualStudyHours = standardStudyHours,
	studySize = pageSize,
	MinuteChange(100),
	isHere = 1
}
function completedStudy() {
	if ("PostStudy" == masterType || "O2OStudy" == masterType || "OJTStudy" == masterType) return void completedPostStudy();
	var a = 0;
	$("#hidViewSchedule").length > 0 && (a = $("#hidViewSchedule").val());
	var b = masterType;
	"Plan" != masterType && "Position" != masterType && (b = ""),
	$("#hidSpeed").val() && (speed = $("#hidSpeed").val(), speed = parseFloat(speed)),
	speed && (speed = speed > 2 ? 1 : speed),
	"null" == masterID && (masterID = "");
	var c = '{"knowledgeId":"' + kngId + '","masterId":"' + masterID + '","masterType":"' + b + '","packageId":"' + packageID + '","pageSize":' + pageSize + ',"studySize":' + pageSize + ',"studyTime":' + 120 * speed + ',"type":' + type + ',"offLine":false,"end":true,"care":true,"deviceId":"","studyChapterIds":"' + stuChpIDs + '","viewSchedule":' + parseFloat(a) + "}",
	d = '{"knowledgeId":"' + kngId + '","masterId":"' + masterID + '","masterType":"' + b + '","packageId":"' + packageID + '","pageSize":' + pageSize + ',"studySize":' + pageSize + ',"studyTime":' + 120 * speed + ',"type":' + type + ',"offLine":false,"end":true,"care":true,"deviceId":"","studyChapterIds":"' + stuChpIDs + '","viewSchedule":' + parseFloat(a) + ',"multiple":' + parseFloat(speed) + ',"realHour":120}';
	submitStudyMethod(c, d, "study", "completed"),
	console.log("completedStudy encryptRequest = " + c + " || request =" + d)
}
function completedLaveTimeStudy() {
	if ("PostStudy" == masterType || "O2OStudy" == masterType || "OJTStudy" == masterType) return void completedPostStudy();
	var a = 0;
	$("#hidViewSchedule").length > 0 && (a = $("#hidViewSchedule").val());
	var b = masterType;
	"Plan" != masterType && "Position" != masterType && (b = ""),
	$("#hidSpeed").val() && (speed = $("#hidSpeed").val(), speed = parseFloat(speed)),
	speed && (speed = speed > 2 ? 1 : speed),
	"null" == masterID && (masterID = ""),
	submitStudyMethod('{"knowledgeId":"' + kngId + '","masterId":"' + masterID + '","masterType":"' + b + '","packageId":"' + packageID + '","pageSize":' + pageSize + ',"studySize":' + pageSize + ',"studyTime":' + 120 * speed + ',"type":' + type + ',"offLine":false,"end":true,"care":true,"deviceId":"","studyChapterIds":"' + stuChpIDs + '","viewSchedule":' + parseFloat(a) + "}", '{"knowledgeId":"' + kngId + '","masterId":"' + masterID + '","masterType":"' + b + '","packageId":"' + packageID + '","pageSize":' + pageSize + ',"studySize":' + pageSize + ',"studyTime":' + 120 * speed + ',"type":' + type + ',"offLine":false,"end":true,"care":true,"deviceId":"","studyChapterIds":"' + stuChpIDs + '","viewSchedule":' + parseFloat(a) + ',"multiple":' + parseFloat(speed) + ',"realHour":120}', "study", "completed")
}
function completedPostStudy() {
	var a = 0;
	$("#hidViewSchedule").length > 0 && (a = $("#hidViewSchedule").val());
	var b = masterType,
	c = getQueryString("taskId") || masterID;
	c && c.indexOf(",") && (c = c.split(",")[0]),
	c.indexOf(":st=") > -1 && (c = c.replace(":st=", "")),
	c && c.length > 36 && (c = c.substr(0, 36)),
	$("#hidSpeed").val() && (speed = $("#hidSpeed").val(), speed = parseFloat(speed)),
	speed && (speed = speed > 2 ? 1 : speed),
	submitStudyMethod('{"knowledgeId":"' + kngId + '","masterId":"' + c + '","masterType":"' + b + '","sourceId":"' + packageID + '","studyTime":' + 120 * speed + ',"deviceId":"","offLine":false,"end":true,"viewSchedule":' + parseFloat(a) + "}", '{"knowledgeId":"' + kngId + '","masterId":"' + c + '","masterType":"' + b + '","sourceId":"' + packageID + '","studyTime":' + 120 * speed + ',"deviceId":"","offLine":false,"end":true,"viewSchedule":' + parseFloat(a) + ',"multiple":' + parseFloat(speed) + ',"realHour":120}', "poststudy", "completed")
}
function escape2Html(a) {
	var b = {
		lt: "<",
		gt: ">",
		nbsp: " ",
		amp: "&",
		quot: '"'
	};
	return a.replace(/&(lt|gt|nbsp|amp|quot);/gi,
	function(a, c) {
		return b[c]
	})
}
function AppendWarningHtml() {
	if ($("#dvWarningView").length <= 0) {
		var a = "<div class='playgoon' id='dvWarningView'><div class='el-playgoon-shadow'></div><div class='playgoonbg'></div><div class='playgooncontent'>" + $("#hfTip").val() + "</div><input id='reStartStudy' type='button' class='btnok' value='" + $.i18n.map.kng_lbl_ihere + "' /></div>";
		"DocumentKnowledge" == knowledgeType ? $("#docplayercontainer").append(a) : ($("#playervideocontainer").append(a), $("#playeraudiocontainer").append(a), $("#playercontainer").append(a)),
		document.getElementById("reStartStudy").onmousedown = function() {
			myMousedown = !0
		},
		document.getElementById("reStartStudy").onclick = removeWarningHtml,
		"VideoKnowledge" == knowledgeType && void 0 !== myPlayer && "playing" == myPlayer.getState() ? myPlayer.pause() : clearInterval(timer)
	}
}
function removeWarningHtml() {
	if (myMousedown) {
		myMousedown = !1,
		$("#dvWarningView").remove();
		var a = document.getElementById("iframeScorm");
		null != a && (a.style.display = ""),
		autoStop = !1,
		"VideoKnowledge" == knowledgeType && void 0 !== myPlayer && "paused" == myPlayer.getState() ? myPlayer.play() : ResetTimer()
	}
}
function showSingleTrack(a) {
	var b = document.getElementById("iframeScorm");
	if (null != b && (b.style.display = "none"), $("#dvSingleTrack").length <= 0) {
		var c = "<div id='dvSingleTrack' class='playgoon'><div class='el-playgoon-shadow'></div><div class='playgoonbg'></div><div class='playgooncontent'>" + $.i18n.map.kng_lbl_anticheatprompt + a + $.i18n.map.kng_lbl_notproduceprogress + "</div><input type='button' style='width: 150px; margin-left: 175px;' onclick='StartCurStudy();' value='" + $.i18n.map.kng_lbl_iwantstudy + "' class='btnok' /></div>";
		"DocumentKnowledge" == knowledgeType ? $("#docplayercontainer").append(c) : ($("#playervideocontainer").append(c), $("#playeraudiocontainer").append(c), $("#playercontainer").append(c)),
		"VideoKnowledge" == knowledgeType && void 0 !== myPlayer && "playing" == myPlayer.getState() ? myPlayer.pause() : (clearInterval(timer), clearInterval(timecheck))
	}
}
function AppendFilePlanHtml() {
	if ($("#dvWarningView").length <= 0) {
		var a = "<div class='playgoon' id='divEditPlan'><div class='el-playgoon-shadow'></div><div class='playgoonbg'></div><div class='playgooncontent'>" + $.i18n.map.sty_lbl_planhavebefiled + "</div><input type='button' class='btnok' value='" + $.i18n.map.sty_lbl_gotit + "' onclick='RemoveEditPlanHtml();' /></div>";
		"DocumentKnowledge" == knowledgeType ? $("#playercontainerdiv").append(a) : $("#playercontainer").append(a),
		"VideoKnowledge" == knowledgeType && void 0 !== myPlayer && "playing" == myPlayer.getState() ? myPlayer.pause() : clearInterval(timer)
	}
}
function AppendEditPlanHtml() {
	if ($("#dvWarningView").length <= 0) {
		var a = "<div class='playgoon' id='divEditPlan'><div class='el-playgoon-shadow'></div><div class='playgoonbg'></div><div class='playgooncontent'>" + planupdated + "</div><input type='button' class='btnok' value='" + $.i18n.map.sty_lbl_gotit + "' onclick='RemoveEditPlanHtml();' /></div>";
		"DocumentKnowledge" == knowledgeType ? $("#playercontainerdiv").append(a) : $("#playercontainer").append(a),
		"VideoKnowledge" == knowledgeType && void 0 !== myPlayer && "playing" == myPlayer.getState() ? myPlayer.pause() : clearInterval(timer)
	}
}
function RemoveEditPlanHtml() {
	$("#divEditPlan").remove();
	var a = document.getElementById("iframeScorm");
	null != a && (a.style.display = "")
}
function ShowBindPhone() {
	return $("#hidNeedMobile").val("1"),
	AppendBindPhone(),
	!1
}
function AppendBindPhone() {
	if ($("#dvWarningBindPhone").length <= 0) {
		var a = "<div id='dvWarningBindPhone' class=''><div class='chaos-bg-color text-center'><div class='clearfix ph30'><div class='no-phone-img'></div><div class='font-size-18 text-center'><span data-localize='sys_msg_needphone'></span></div><div class='font-szie-14 text-grey text-center mv10'><span data-localize='sys_msg_bindingmobile'></span></div><div class='text-center'><input type='button' class='btn btn-primary mt15 binding-phone' data-localize='mine_lbl_bindimmediately' onclick='openBindPhone();' /></div></div><div class='chaos-shade-close' onclick='closeWebPage();'></div></div><div class='ui-widget-overlay' style='width: 100%; height: 100%; z-index: 100;'></div></div>";
		"DocumentKnowledge" == knowledgeType ? $("#playercontainerdiv").append(a) : ($("#playervideocontainer").append(a), $("#playeraudiocontainer").append(a), $("#playercontainer").append(a)),
		"VideoKnowledge" == knowledgeType && void 0 !== myPlayer && "playing" == myPlayer.getState() ? myPlayer.pause() : timer && clearInterval(timer)
	}
}
function openBindPhone() {
	ShowIFrameDialog(jQuery.i18n.map.mine_lbl_bindphone, 550, 420, "/udp/Usm/Personal/Daliogs/BindMobilePhone.aspx")
}
function showMsgCheat(a) {
	void 0 !== myPlayer && "playing" == myPlayer.getState() && myPlayer.pause(),
	clearInterval(timer),
	clearInterval(timersmall),
	ShowIFrameDialog($.i18n.map.kng_tit_smscheat, 320, 300, "/kng/Dialog/MessageCheatDaialog.aspx?kngId=" + kngId + "&first=" + a + "&mobile=" + cheatMobile + "&area=" + cheatArea + "&pid=" + masterID + "&masterType=" + masterType),
	setTimeout(function() {
		$(".edialogclose").hide()
	},
	10),
	setTimeout(function() {
		$(".edialogclose").hide()
	},
	100),
	setTimeout(function() {
		$(".edialogclose").hide()
	},
	1e3),
	CreateSubmitLog("短信防作弊  弹出短信验证码", "{}")
}
function closeWebPage() {
	var a = navigator.userAgent; - 1 != a.indexOf("Firefox") || -1 != a.indexOf("Presto") ? window.location.replace("about:blank") : (window.opener = null, window.open("", "_self"), window.close()),
	window.close()
}
function refresh() {
	isRefresh = !0,
	window.location.reload()
}
function SyncPostStudySchedule() {
	var url = "PostStudy" === masterType ? "studyapi/uk/singlepostsync": "studyapi/uk/singleotherpostsync",
	masterTypeStr = masterType,
	taskId = getQueryString("taskId") || masterID;
	taskId && taskId.indexOf(",") && (taskId = taskId.split(",")[0]),
	taskId.indexOf(":st=") > -1 && (taskId = taskId.replace(":st=", "")),
	taskId && taskId.length > 36 && (taskId = taskId.substr(0, 36));
	var arr = '{"knowledgeId":"' + kngId + '","sourceId":"' + packageID + '","taskId":"' + taskId + '","sourceType":"' + masterTypeStr + '","orgId":"' + orgID + '","userId":"' + userID + '"}';
	AjaxCallApiMethod({
		type: "POST",
		url: url,
		data: arr,
		cache: !1,
		async: !1,
		success: function(result) {
			"" != result ? (result = eval("(" + result + ")"), actualStudyHours = 60 * result.actualStudyHours, MinuteChange(result.studySchedule)) : MinuteChange(0)
		},
		error: function(a) {
			console.log(a)
		}
	})
}
function SyncSchedule() {
	if (!isCompleted) {
		var masterTypeStr = masterType;
		if ("PostStudy" == masterType || "O2OStudy" == masterType || "OJTStudy" == masterType) return void SyncPostStudySchedule();
		"Plan" != masterType && "Position" != masterType && (masterTypeStr = "");
		var arr = '{"knowledgeId":"' + kngId + '","packageId":"' + packageID + '","masterId":"' + masterID + '","masterType":"' + masterTypeStr + '"}';
		AjaxCallApiMethodSubmitStudy({
			type: "POST",
			url: "study/updateprogress",
			data: arr,
			cache: !1,
			async: !1,
			success: function(result) {
				result = eval("(" + result + ")"),
				actualStudyHours = 60 * result.actualstudyhours,
				MinuteChange(result.studyschedule)
			},
			error: function(a) {}
		})
	}
}
function submitStudyMethod(encryptRquest, request, type, postType) {
	if ("1" == submitIsOpen || "1" == learningProgressSubmission) return void CreateSubmitLog("开启三端调用老方法作弊", "{}");
	var studyBody = request;
	encryptRquest = JSON.stringify(encryptRquest);
	var arr = '{"body":' + encryptRquest + "}",
	studyUrl = "study/submit?encryption=";
	"PostStudy" === masterType ? studyUrl = "studyapi/study/postsubmit?encryption=": "O2OStudy" != masterType && "OJTStudy" != masterType || (studyUrl = "studyapi/study/postsubmitother?encryption="),
	CreateSubmitLog(studyUrl, encryptRquest);
	var requsetBody = "";
	jQuery.ajax({
		type: "POST",
		contentType: "text/json",
		url: "/kng/services/KngComService.svc/GetEncryptRequest",
		data: arr,
		dataType: "json",
		cache: !1,
		async: !1,
		success: function(result) {
			result = eval("(" + result + ")"),
			"OK" == result.Status && (requsetBody = result.Data, AjaxCallApiMethodSubmitStudy({
				type: "POST",
				url: studyUrl + requsetBody,
				data: studyBody,
				success: function(a) {
					CreateSubmitLog(studyUrl + "success", encryptRquest),
					"submit" == postType && "study" == type ? submitStudySuccess(a) : "submit" == postType && "poststudy" == type ? submitPostStudySuccess(a) : "completed" == postType && "study" == type ? studyCompletedSuccess(a) : "completed" == postType && "poststudy" == type && poststudyCompletedSuccess(a)
				},
				error: function(a) {
					commonHelper.logApiError(studyUrl, encryptRquest, a),
					SyncSchedule(),
					console.log(a)
				}
			}))
		},
		error: function(a) {
			console.log("EncryptBody error" + arr),
			commonHelper.logApiError("请求体md5加密失败", encryptRquest, a)
		}
	})
}
function submitStudySuccess(a) {
	if ("" == a) {
		if (GetCurSchedule(), standardStudyHours <= 0) return;
		InitLoadStudy()
	} else {
		if (a.indexOf("﹡") > -1) {
			var b = a.split("﹡");
			b.length > 0 && (a = b[1], a.length > 8 && (a = a.substring(0, 8) + "..."), a = "[" + a + "]")
		}
		CheatWarming(a)
	}
}
function submitStudyError(xhr) {
	var msg = eval("(" + xhr.responseText + ")"),
	result = msg.error.message;
	if (result.indexOf("﹡") > -1) {
		var arrResult = result.split("﹡");
		arrResult.length > 0 && (result = arrResult[1], result.length > 8 && (result = result.substring(0, 8) + "..."), result = "[" + result + "]")
	}
	CheatWarming(result)
}
function submitPostStudySuccess(a) {
	if (a) {
		if (a.indexOf("﹡") > -1) {
			var b = a.split("﹡");
			b.length > 0 && (a = b[1], a.length > 8 && (a = a.substring(0, 8) + "..."), a = "[" + a + "]")
		}
		CheatWarming(a)
	} else {
		if (GetCurSchedule(), standardStudyHours <= 0) return;
		InitLoadStudy()
	}
}
function studyCompletedSuccess(a) {
	if ("" == a) GetCurSchedule(),
	completeDivShow();
	else {
		if (a.indexOf("﹡") > -1) {
			var b = a.split("﹡");
			b.length > 0 && (a = b[1], a.length > 8 && (a = a.substring(0, 8) + "..."), a = "[" + a + "]")
		}
		CheatWarming(a)
	}
}
function poststudyCompletedSuccess(a) {
	if (a) {
		if (a.indexOf("﹡") > -1) {
			var b = a.split("﹡");
			b.length > 0 && (a = b[1], a.length > 8 && (a = a.substring(0, 8) + "..."), a = "[" + a + "]")
		}
		CheatWarming(a)
	} else completeDivShow()
}
function AjaxCallApiMethodSubmitStudy(a) {
	var b = {
		Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
		Source: 501
	};
	jQuery.extend(b, {
		token: token
	});
	var c = a.url,
	d = lecaiAPiUrl + c;
	isLteIE9() && (d = "/forie9/qidaapi/v1/" + c),
	a.url = d;
	var e = {
		contentType: "application/json",
		dataType: "text",
		headers: b
	};
	jQuery.extend(e, a),
	jQuery.ajax(e)
}
function CreateSubmitLog(a, b) {
	logCount++,
	a = a + "  ,知识id:" + kngId + "  ,日志记录次数:" + logCount + "  ,定时器次数:" + timerCount + "  ,标准学时:" + standardStudyHours + "  ,实际学时:" + actualStudyHours;
	try {
		if ("VideoKnowledge" == knowledgeType) {
			a = a + "  ,视频进度位置:" + parseInt(player.bdPlayer.getPosition())
		}
	} catch(d) {}
	var c = '{"kngId":"' + kngId + '","apiUrl":"' + a + '","context":' + b + "}";
	AjaxAsyncCallMethodWithKng("CreateSubmitLog", c,
	function(a) {
		console.log("学习记录提交!")
	},
	!0, !0, !0)
}
var timerspan = void 0,
timerminute = void 0,
timecheck = void 0,
timersmall = void 0,
speed = 1,
type = 0,
stuChpIDs = "",
iscurfinish = void 0,
reZero = 0,
phaseTrackIntervalNum = 0,
myPlayer, curversion, myMousedown = !1,
oldTime = -1,
heartNum = 0,
heartbeatTime = 0,
autoStop = !1,
heartData = {},
checkFirst = !1,
logCount = 0,
timerCount = 0,
smalltime = 15;
if (void 0 === msgCheatTimes) var msgCheatTimes = "";
if (void 0 === openRewardTip) var openRewardTip = "False";
if (msgCheatTimes) {
	msgCheatTimes = msgCheatTimes.split(";");
	for (var i = 0; i < msgCheatTimes.length; i++) msgCheatTimes[i] = 60 * parseInt(msgCheatTimes[i])
}
masterType || (masterType = getQueryString("masterType") || getQueryString("st") || "");
var isRefresh = !1;
"1" === isSingle && (window.onbeforeunload = function() {
	isRefresh || (commonHelper.delHeart(), setExpCookie("heartKngId", kngId))
});
var timer, daysold, hrsold, minsold, seconds, thisU, UserActionTimer = function() {
	return new UserActionTimer.fn.init
};
UserActionTimer.fn = UserActionTimer.prototype = {
	Key: void 0,
	LastMouseActionTime: new Date,
	shadowTimer: void 0,
	TotalActionTime: 0,
	ValidTimeSpan: void 0,
	MouseActionTime: void 0,
	TempTimeSpan: void 0,
	PostInterval: void 0,
	LastPostTotalActionTime: new Date,
	init: function() {
		return this.LastMouseActionTime = new Date,
		this.TotalActionTime = 0,
		this
	},
	SetValidTimeSpan: function(a) {
		if (thisU = this, a) thisU.TempTimeSpan = thisU.ValidTimeSpan,
		thisU.ValidTimeSpan = 1e4;
		else if (thisU.TempTimeSpan) {
			var b = 0;
			thisU.MouseActionTime = new Date,
			b = thisU.MouseActionTime.getTime() - thisU.LastMouseActionTime.getTime(),
			b <= 1e3 * thisU.ValidTimeSpan && (thisU.TotalActionTime = thisU.TotalActionTime + b),
			thisU.LastMouseActionTime = thisU.MouseActionTime,
			thisU.ValidTimeSpan = thisU.TempTimeSpan,
			thisU.TempTimeSpan = 0
		}
	},
	Start: function(a, b) {
		if (thisU = this, !a) return ! 1;
		this.Key = a,
		this.ValidTimeSpan = b && "" != b ? b: 200,
		$("body").bind("click", {
			actionType: "click",
			thisUserActionTimer: this
		},
		this.mouseActionHandler),
		$("body").bind("mousewheel", {
			actionType: "mousewheel",
			thisUserActionTimer: this
		},
		this.mouseActionHandler),
		$("body").bind("mousemove", {
			actionType: "mousemove",
			thisUserActionTimer: this
		},
		this.mouseActionHandler),
		$("body").bind("keydown", {
			actionType: "keydown",
			thisUserActionTimer: this
		},
		this.mouseActionHandler);
		thisU.MouseActionTime = new Date,
		thisU.MouseActionTime.getTime(),
		thisU.LastMouseActionTime.getTime()
	},
	mouseActionHandler: function(a) {
		var b = $("#bodyShadow");
		b && (b.hide(), this.shadowTimer && clearTimeout(this.shadowTimer), this.shadowTimer = setTimeout(function() {
			b.show()
		},
		15e3)),
		thisU = a.data.thisUserActionTimer;
		var c = 0;
		thisU.MouseActionTime = new Date,
		c = thisU.MouseActionTime.getTime() - thisU.LastMouseActionTime.getTime(),
		c <= 1e3 * thisU.ValidTimeSpan && (thisU.TotalActionTime = thisU.TotalActionTime + c),
		thisU.LastMouseActionTime = thisU.MouseActionTime,
		clearInterval(timecheck),
		timecheck = setInterval(CheckIsMove, 1e3 * validtimeSpan)
	},
	version: "1.0.0"
};
var commonHelper = {
	source: 501,
	heartData: {},
	checkHeart: function(a) {
		var b = this,
		c = lecaiAPiUrl + "/kng/knowledges/" + kngId + "/heart";
		$.ajax({
			type: "GET",
			url: c,
			headers: {
				Source: this.source,
				Token: token
			},
			contentType: "application/json",
			dataType: "json",
			success: function(c) {
				b.heartData = c,
				c.checkResult ? "function" == typeof a && a(c) : b.showHeartTip($.i18n.map.knt_tip_heart.replace("{title1}", c.knowledgeName).replace("{title2}", c.knowledgeName))
			},
			error: function(b) {
				"function" == typeof a && a()
			}
		})
	},
	showHeartTip: function(a) {
		var b = document.getElementById("iframeScorm");
		null != b && (b.style.display = "none");
		var c = "<div id='dvHeartTip' class='playgoon'><div class='el-playgoon-shadow'></div><div class='playgoonbg'></div><div class='playgooncontent'>" + a + "</div><input type='button' style='width: 150px; margin-left: 95px;' onclick='closeWebPage();' value='" + $.i18n.map.kng_lbl_closeknowledge + "' class='btnok' /><input type='button' style='width: 150px; margin-left: 20px;' onclick='commonHelper.learnKng();' value='" + $.i18n.map.kng_lbl_continestudy + "' class='btnok' /></div>";
		$(".el-play-area").append(c),
		"VideoKnowledge" == knowledgeType ? videoStudy.stopTimer() : docStudy.stopTimer(),
		CreateSubmitLog("多知识心跳提示", "{}")
	},
	delHeart: function() {
		var a = lecaiAPiUrl + "/kng/knowledges/" + kngId + "/heart";
		$.ajax({
			type: "POST",
			url: a,
			headers: {
				Source: this.source,
				Token: token
			},
			data: JSON.stringify({}),
			contentType: "application/json",
			dataType: "json",
			complete: function(a) {
				delExpCookie("heartKngId")
			}
		})
	},
	learnKng: function() {
		var a = this,
		b = {
			oldKnowledgeId: a.heartData.knowledgeId,
			oldSourceId: a.heartData.source,
			newKnowledgeId: kngId
		},
		c = lecaiAPiUrl + "/kng/knowledges/learn";
		$.ajax({
			type: "POST",
			url: c,
			headers: {
				Source: this.source,
				Token: token
			},
			data: JSON.stringify(b),
			contentType: "application/json",
			dataType: "json",
			complete: function(a) {
				a.status >= 200 && a.status < 300 && refresh()
			}
		})
	},
	showInvalidTip: function(a) {
		if (a && -1 !== a.indexOf("global.token.invalid")) {
			if ("SourceCode" === fileType) return void refresh();
			var b = document.getElementById("iframeScorm");
			null != b && (b.style.display = "none");
			var c = "<div id='dvInvalid' class='playgoon'><div class='el-playgoon-shadow'></div><div class='playgoonbg'></div><div class='playgooncontent'>" + $.i18n.map.kng_tip_invalid + "</div><input type='button' style='width: 150px; margin-left: 95px;' onclick='closeWebPage();' value='" + $.i18n.map.kng_lbl_closeknowledge + "' class='btnok' /><input type='button' style='width: 150px; margin-left: 20px;' onclick='refresh();' value='" + $.i18n.map.kng_lbl_continestudy + "' class='btnok' /></div>";
			"DocumentKnowledge" == knowledgeType ? $("#docplayercontainer").append(c) : ($("#playervideocontainer").append(c), $("#playeraudiocontainer").append(c), $("#playercontainer").append(c));
			try {
				"VideoKnowledge" == knowledgeType ? (void 0 !== myPlayer && "playing" == myPlayer.getState() ? myPlayer.pause() : (clearInterval(timer), clearInterval(timecheck)), videoStudy.stopTimer()) : (docStudy.stopTimer(), clearInterval(timer), clearInterval(timecheck))
			} catch(d) {}
		}
	},
	log: function(a, b) {
		console.log(a),
		CreateSubmitLog(a, b)
	},
	logApiError: function(a, b, c) {
		var d = "";
		if (c.responseText) {
			c.responseText.indexOf("global.token.invalid") > -1 && this.showInvalidTip(c.responseText);
			try {
				var e = JSON.parse(c.responseText);
				d += ", key: " + e.error.key + ", msg: " + e.error.message
			} catch(f) {
				d += c.responseText
			}
		}
		this.log(a + ",error:" + d, b)
	},
	getEncryptBody: function(encryptRquest, callback) {
		encryptRquest = JSON.stringify(encryptRquest);
		var arr = '{"body":' + encryptRquest + "}";
		jQuery.ajax({
			type: "POST",
			contentType: "text/json",
			url: "/kng/services/KngComService.svc/GetEncryptRequest",
			data: arr,
			dataType: "json",
			cache: !1,
			async: !1,
			success: function(result) {
				result = eval("(" + result + ")"),
				"OK" == result.Status && "function" == typeof callback && callback(result.Data)
			},
			error: function(a) {
				console.log("EncryptBody error" + arr),
				commonHelper.logApiError("请求体md5加密失败", encryptRquest, a)
			}
		})
	},
	showleavTime: function(a) {
		if (! (a <= 0)) {
			var b = "";
			daysold = Math.floor(a / 86400),
			daysold > 0 && (b += daysold + $.i18n.map.sty_lbl_daytime);
			var c = a - 86400 * daysold;
			hrsold = Math.floor(c / 3600),
			hrsold > 0 && (b += hrsold + $.i18n.map.sty_lbl_hour);
			var d = c - 3600 * hrsold;
			minsold = Math.floor(d / 60),
			minsold > 0 && (b += minsold + $.i18n.map.sty_lbl_minute),
			seconds = d - 60 * minsold,
			seconds > 0 && (b += seconds + $.i18n.map.sty_lbl_second),
			$("#spanLeavTimes").html(b),
			"True" == openRewardTip && a <= 60 && !isCompleted && ("function" == typeof showRewardTip && showRewardTip(), openRewardTip = "False")
		}
	},
	showProgress: function(a) {
		if (a) {
			$("#ScheduleText").html(a + "%");
			var b = parseInt(1.13 * a) + "px";
			$("#divScheduleWidth").css("width", b),
			100 === a && commonHelper.completeDivShow()
		}
	},
	completeDivShow: function() {
		$("#divCheat").hide(),
		$("#divProcessArea").show(),
		$("#ScheduleText").show(),
		$("#divNotStartArea").hide(),
		$("#divCompletedArea").show(),
		$("#divStartArea").hide(),
		0 == initiativeCreditMode && 0 == getCreditMode && standardStudyScore > 0 && ($("#spanFinishScore").show(), $("#spanActCmpScore").text(standardStudyScore), $("#spanTalCmpScore").text(standardStudyScore)),
		$("#icon" + kngId) && $("#icon" + kngId).prop("class", "pic2"),
		"True" != openRewardTip || isCompleted || ("function" == typeof showRewardTip && showRewardTip(), openRewardTip = "False"),
		isCompleted = !0
	},
	AppendWarningHtml: function() {
		var a = this;
		if ($("#dvWarningView").length <= 0) {
			var b = "<div class='playgoon' id='dvWarningView'><div class='el-playgoon-shadow'></div><div class='playgoonbg'></div><div class='playgooncontent'>" + $("#hfTip").val() + "</div><input id='reStartStudy' type='button' class='btnok' value='" + $.i18n.map.kng_lbl_ihere + "' /></div>";
			"DocumentKnowledge" == knowledgeType ? $("#docplayercontainer").append(b) : ($("#playervideocontainer").append(b), $("#playeraudiocontainer").append(b), $("#playercontainer").append(b)),
			document.getElementById("reStartStudy").onmousedown = function() {
				myMousedown = !0
			},
			document.getElementById("reStartStudy").onclick = function(b) {
				myMousedown && (myMousedown = !1, $("#dvWarningView").remove(), a.startTimer())
			},
			this.log("防作弊日志记录", "{}")
		}
	},
	startTimer: function() {
		"VideoKnowledge" == knowledgeType ? void 0 !== myPlayer && "paused" == myPlayer.getState() && myPlayer.play() : docStudy.startTimer()
	},
	updateprogress: function(callback) {
		var masterTypeStr = masterType,
		apiUrl = "study/updateprogress",
		arr = "",
		self = this,
		taskId = this.getTaskId();
		arr = '{"knowledgeId":"' + kngId + '","packageId":"' + packageID + '","masterId":"' + taskId + '","masterType":"' + masterTypeStr + '"}',
		AjaxCallApiMethodSubmitStudy({
			type: "POST",
			url: apiUrl,
			data: arr,
			cache: !1,
			async: !1,
			success: function(result) {
				result = eval("(" + result + ")"),
				"function" == typeof callback && callback({
					studySchedule: result.studyschedule,
					standardStudyHours: result.standardstudyhours,
					actualStudyHours: result.actualstudyhours,
					viewSchedule: result.viewSchedule
				})
			},
			error: function(a) {
				"function" == typeof callback && callback({
					studySchedule: actualStudyHours / standardStudyHours,
					standardStudyHours: standardStudyHours / 60,
					actualStudyHours: actualStudyHours / 0,
					viewSchedule: 0
				}),
				self.log("同步进度失败", "{}")
			}
		})
	},
	showMsgCheat: function() {
		void 0 !== myPlayer && "playing" == myPlayer.getState() && myPlayer.pause(),
		ShowIFrameDialog($.i18n.map.kng_tit_smscheat, 320, 300, "/kng/Dialog/MessageCheatDaialog.aspx?kngId=" + kngId + "&first=&mobile=" + cheatMobile + "&area=" + cheatArea + "&pid=" + masterID + "&masterType=" + masterType),
		setTimeout(function() {
			$(".edialogclose").hide()
		},
		10),
		setTimeout(function() {
			$(".edialogclose").hide()
		},
		100),
		setTimeout(function() {
			$(".edialogclose").hide()
		},
		1e3),
		this.log("短信防作弊  弹出短信验证码", "{}")
	},
	startInterval: function(a) {
		try {
			if ("undefined" != typeof Worker) return void 0 === this.myWorker && (this.myWorker = new Worker("/kng/kng_workers.js"), this.myWorker.onmessage = function() {
				"function" == typeof a && a()
			}),
			void this.myWorker.postMessage("start")
		} catch(b) {}
		this.timer = setInterval(function() {
			"function" == typeof a && a()
		},
		1e3)
	},
	stopInterval: function() {
		"undefined" != typeof Worker && this.myWorker ? this.myWorker.postMessage("end") : (this.timer && clearInterval(this.timer), this.timer = void 0)
	},
	getTaskId: function() {
		var a = getQueryString("taskId") || masterID || "";
		return a && a.indexOf(",") && (a = a.split(",")[0]),
		a.indexOf(":st=") > -1 && (a = a.replace(":st=", "")),
		a && a.length > 36 && (a = a.substr(0, 36)),
		a
	},
	getViewschedule: function() {
		var a = 0;
		return $("#hidViewSchedule").length > 0 && (a = $("#hidViewSchedule").val()),
		parseInt(a) || 0
	}
},
videoStudy = {
	speed: 1,
	hookCheat: !1,
	phaseTrackIntervalTime: 300,
	phaseTrackNum: 0,
	startTrackPreventCheat: !1,
	needNum: 30,
	hourNum: 0,
	remainingTime: 0,
	countDownTime: 0,
	commitTime: 0,
	end: !1,
	initStudy: function() {
		deleteCookieHeart(),
		this.hookCheat = "1" == antionhook,
		this.phaseTrackIntervalTime = phaseTrackIntervalTime,
		this.startTrackPreventCheat = "1" == isSingle,
		this.needNum = parseFloat(submitProTimes) || 30,
		this.videoLength = videoLength,
		this.isLess30 = this.videoLength <= this.needNum && standardStudyHours <= 60,
		this.masterId = "",
		this.masterType = "",
		"OJTStudy" == masterType || "Plan" == masterType || "PlanStudy" == masterType || "Position" == masterType || "PositionStudy" == masterType || "O2OStudy" == masterType ? (this.masterId = masterID, this.masterType = masterType) : "PostStudy" === masterType && (this.masterId = commonHelper.getTaskId(), this.masterType = masterType),
		this.initCountDown(),
		this.updateprogress();
		var a = this;
		this.checkHeart(function() {
			isCompleted || (standardStudyHours <= 0 && a.commitTrack(), (standardStudyHours <= 0 || a.isLess30) && "function" == typeof showRewardTip && showRewardTip())
		})
	},
	initCountDown: function() {
		this.isLess30 || isCompleted || ($("#divProcessArea").show(), $("#ScheduleText").show(), $("#divStartArea").show())
	},
	updateprogress: function() {
		if (!isCompleted) {
			var a = this;
			commonHelper.updateprogress(function(b) {
				commonHelper.showProgress(b.studySchedule),
				a.countDownTime = a.remainingTime = 60 * (b.standardStudyHours - b.actualStudyHours),
				b.standardStudyHours < 2 && (a.countDownTime = a.needNum),
				a.isLess30 && (a.remainingTime = 30),
				commonHelper.showleavTime(parseInt(a.countDownTime)),
				100 === b.studySchedule ? isCompleted = !0 : b.viewSchedule && (b.viewSchedule + a.needNum > a.videoLength || b.viewSchedule < 3 ? a.previousTime = 0 : a.previousTime = b.viewSchedule)
			})
		}
	},
	playEnd: function(a) { (this.isLess30 || this.remainingTime < this.needNum) && !isCompleted ? this.commitTrack(a) : "function" == typeof a && a()
	},
	commitTrack: function(callback) {
		var self = this,
		studyTime = parseInt(this.commitTime);
		studyTime = studyTime || 1,
		studyTime > 60 && (studyTime = 60),
		this.checkHeart(function() {
			var param = {
				knowledgeId: kngId,
				masterId: self.masterId,
				masterType: self.masterType,
				packageId: packageID || "",
				pageSize: pageSize || 0,
				studySize: pageSize || 0,
				studyTime: studyTime,
				type: type || 0,
				offLine: !1,
				end: !1,
				care: !0,
				deviceId: "",
				studyChapterIds: stuChpIDs || "",
				viewSchedule: commonHelper.getViewschedule()
			},
			studyUrl = "study/submitpro",
			encryptRquest = JSON.stringify(param);
			commonHelper.log(studyUrl, JSON.stringify(encryptRquest)),
			commonHelper.getEncryptBody(encryptRquest,
			function(encryptBody) {
				param.encryption = encryptBody,
				param.multiple = self.speed,
				param.realHour = self.needNum;
				var paramStr = JSON.stringify(param),
				logStr = JSON.stringify(paramStr);
				AjaxCallApiMethodSubmitStudy({
					type: "POST",
					url: studyUrl,
					data: paramStr,
					success: function(result) {
						commonHelper.log(studyUrl + "success", logStr),
						result && (result = eval("(" + result + ")"), commonHelper.showProgress(result.studySchedule)),
						"function" == typeof callback && callback()
					},
					error: function(a) {
						commonHelper.logApiError(studyUrl, logStr, a)
					}
				})
			})
		}),
		this.hourNum = 0,
		this.commitTime = 0
	},
	startTimer: function() {
		if (! (this.isLess30 && isCompleted || "paused" == myPlayer.getState())) {
			if ($("#dvHeartTip").length > 0) return void("paused" != myPlayer.getState() && myPlayer.pause());
			if (!this.isCheat && msgCheatTimes && (msgCheatTimes.indexOf(parseInt(myPlayer.getPosition().toFixed())) > -1 || !cheatMobile)) return console.log(myPlayer.getPosition()),
			commonHelper.showMsgCheat(),
			void this.stopTimer();
			this.isCheat = !1;
			var a = this;
			commonHelper.stopInterval(),
			commonHelper.startInterval(function() {
				a.handleTimer()
			})
		}
	},
	stopTimer: function() {
		"paused" != myPlayer.getState() && myPlayer.pause(),
		commonHelper.stopInterval()
	},
	handleTimer: function() {
		if ("paused" == myPlayer.getState()) return void console.log("暂停是未关闭定时");
		var a = this;
		return $("#hidSpeed").val() ? (this.speed = $("#hidSpeed").val(), this.speed = parseFloat(this.speed), this.speed = this.speed > 2 ? 1 : this.speed) : this.speed = 1,
		timerCount++,
		this.hourNum++,
		this.remainingTime = this.remainingTime - this.speed,
		60 == standardStudyHours ? this.countDownTime = this.countDownTime - 1 : this.countDownTime = this.countDownTime - this.speed,
		this.commitTime = this.commitTime + this.speed,
		this.phaseTrackNum++,
		msgCheatTimes && msgCheatTimes.indexOf(parseInt(myPlayer.getPosition().toFixed())) > -1 ? (console.log(myPlayer.getPosition()), commonHelper.showMsgCheat(), void a.stopTimer()) : !msgCheatTimes && a.hookCheat && a.phaseTrackNum >= a.phaseTrackIntervalTime ? (a.phaseTrackNum = 0, a.stopTimer(), void commonHelper.AppendWarningHtml()) : (a.hourNum >= a.needNum && a.commitTrack(), void commonHelper.showleavTime(parseInt(a.countDownTime)))
	},
	checkHeart: function(a) {
		this.startTrackPreventCheat ? commonHelper.checkHeart(function(b) {
			"function" == typeof a && a()
		}) : "function" == typeof a && a()
	},
	delHeart: function() {
		this.startTrackPreventCheat && commonHelper.delHeart()
	}
},
docStudy = {
	hookCheat: !1,
	phaseTrackIntervalTime: 300,
	phaseTrackNum: 0,
	startTrackPreventCheat: !1,
	needNum: 30,
	hourNum: 0,
	countDownTime: 0,
	initStudy: function(a, b) {
		if (this.kngType = a || 0, deleteCookieHeart(), $("#divNotStartArea").hide(), this.hookCheat = "1" == antionhook, this.phaseTrackIntervalTime = phaseTrackIntervalTime, this.startTrackPreventCheat = "1" == isSingle, this.needNum = parseFloat(submitProTimes) || 30, this.masterId = "", this.masterType = "", "OJTStudy" == masterType || "Plan" == masterType || "PlanStudy" == masterType || "Position" == masterType || "PositionStudy" == masterType || "O2OStudy" == masterType ? (this.masterId = masterID, this.masterType = masterType) : "PostStudy" === masterType && (this.masterId = commonHelper.getTaskId(), this.masterType = masterType), this.initCountDown(), this.updateprogress(), standardStudyHours <= 0) isCompleted || (this.commitTrack(), "function" == typeof showRewardTip && showRewardTip());
		else {
			var c = this;
			this.checkHeart(function() {
				if (msgCheatTimes && (msgCheatTimes.indexOf(0) > -1 || !cheatMobile)) return void commonHelper.showMsgCheat();
				c.startTimer()
			})
		}
	},
	initCountDown: function() {
		isCompleted || ($("#divProcessArea").show(), $("#ScheduleText").show(), $("#divStartArea").show())
	},
	updateprogress: function() {
		if (!isCompleted) {
			var a = this;
			commonHelper.updateprogress(function(b) {
				commonHelper.showProgress(b.studySchedule),
				a.countDownTime = 60 * (b.standardStudyHours - b.actualStudyHours),
				1 == b.standardStudyHours && (a.countDownTime = a.needNum),
				commonHelper.showleavTime(parseInt(a.countDownTime))
			})
		}
	},
	commitTrack: function() {
		var self = this;
		this.checkHeart(function() {
			var param = {
				knowledgeId: kngId,
				masterId: self.masterId,
				masterType: self.masterType,
				packageId: packageID || "",
				pageSize: pageSize || 0,
				studySize: pageSize || 0,
				studyTime: self.needNum,
				type: self.kngType,
				offLine: !1,
				end: !1,
				care: !0,
				deviceId: "",
				studyChapterIds: stuChpIDs || "",
				viewSchedule: commonHelper.getViewschedule()
			},
			studyUrl = "study/submitpro",
			encryptRquest = JSON.stringify(param);
			commonHelper.log(studyUrl, JSON.stringify(encryptRquest)),
			commonHelper.getEncryptBody(encryptRquest,
			function(encryptBody) {
				param.encryption = encryptBody,
				param.multiple = 1,
				param.realHour = self.needNum;
				var paramStr = JSON.stringify(param),
				logStr = JSON.stringify(paramStr);
				AjaxCallApiMethodSubmitStudy({
					type: "POST",
					url: studyUrl,
					data: paramStr,
					success: function(result) {
						commonHelper.log(studyUrl + "success", logStr),
						result && (result = eval("(" + result + ")"), commonHelper.showProgress(result.studySchedule))
					},
					error: function(a) {
						commonHelper.logApiError(studyUrl, logStr, a)
					}
				})
			})
		}),
		this.hourNum = 0
	},
	startTimer: function() {
		var a = this;
		commonHelper.stopInterval(),
		commonHelper.startInterval(function() {
			a.handleTimer()
		})
	},
	stopTimer: function() {
		commonHelper.stopInterval()
	},
	handleTimer: function() {
		return timerCount++,
		this.hourNum++,
		this.phaseTrackNum++,
		this.countDownTime--,
		msgCheatTimes && msgCheatTimes.indexOf(timerCount) > -1 ? (commonHelper.showMsgCheat(), void this.stopTimer()) : !msgCheatTimes && this.hookCheat && this.phaseTrackNum >= this.phaseTrackIntervalTime ? (this.phaseTrackNum = 0, this.stopTimer(), void commonHelper.AppendWarningHtml()) : (this.hourNum >= this.needNum && this.commitTrack(), void commonHelper.showleavTime(parseInt(this.countDownTime)))
	},
	checkHeart: function(a) {
		this.startTrackPreventCheat ? commonHelper.checkHeart(function(b) {
			"function" == typeof a && a()
		}) : "function" == typeof a && a()
	},
	delHeart: function() {
		this.startTrackPreventCheat && commonHelper.delHeart()
	}
};
console 命令行工具 X clear

                    
>
console