function setCopyBtn(){$(".CopyToClipboard").each(function(){var t=new ZeroClipboard.Client;t.setHandCursor(!0),t.addEventListener("load",function(t){}),t.addEventListener("mouseOver",function(t){var e=t.movie.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling.innerHTML;e=e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),t.setText(e)}),t.addEventListener("complete",function(t,e){alert("代码已经复制到你的剪贴板。")}),t.glue(this,this.parentNode)})}function computePos(){"object"==("undefined"==typeof toolBar?"undefined":_typeof(toolBar))&&(toolBar.setPosX(),toolBar.computePositon())}function getRecommendListUrl(){return null!==getRecommendListUrlArr?getRecommendListUrlArr:(getRecommendListUrlArr=[[],[]],$(".recommend-box div.recommend-item-box").each(function(t,e){if($(e).data("url")){var o=$(e).data("url").toLowerCase().split("://"),n=$(e).data("url").toLowerCase().split("article/details/");getRecommendListUrlArr[0].push(2==o.length?o[1]:o[0]),getRecommendListUrlArr[1].push(2==n.length?"article/details/"+n[1]:n[0])}}),getRecommendListUrlArr)}function baidudatatemp(t,e,o,n){var i="blog",a='
博客';t.linkUrl.indexOf("download.csdn.net")>-1?(i="download",a='
下载'):t.linkUrl.indexOf("edu.csdn.net")>-1&&(i="edu",a='
课程');var s=highlight.map(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")});10==setBaiduJsCount&&(a=""),s="("+s.join("|")+")";var c=new RegExp(s,"gi"),r=/<[^>]*>/g,l=t["abstract"].replace(r,"").replace(c,"$1"),d=t.dispTime.replace(/^(\d*)-/,""),m=t.linkUrl,p=t.title.replace(r,"").replace(c,"$1"),u=m.split("?")[0].split("/").splice(-1)[0],h='"extra":"{\\"utm_medium\\":\\"distribute.'+baiduSearchChannel+".none-task-"+i+"-2~default~baidujs_"+baiduSearchType+"~default-"+e+"-"+u+"-blog-"+articleId+baiduSearchIdentification+'\\",\\"dist_request_id\\":\\"'+distRequestId+'\\",\\"parent_index\\":\\"'+o+'\\"}",',f='
'+t.format_path+'
已加入 GitHub加速计划
查看项目
'+t.star_count+'
'+t.fork_count+"
"+l+"
\n",type:"original",status:2,read_type:"public",authorized_status:!1,check_original:!1,source:"pc_postedit",not_auto_saved:1,cover_type:1,vote_id:0,scheduled_time:0,is_new:1,tags:"笔记"}),t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}else $("#articleSearchTip").remove(),showToast({text:"选中内容为空,请重新选中",bottom:"10%",zindex:9e3,speed:500,time:1500});else window.csdn.loginBox.show()}}),$(document).on("click",".comment-quote-close",function(t){var e=$("#commentQuote");e.animate({height:0},300,function(){e.remove()})})}),window.apiOpenEditor=function(t){showToast({text:"请稍后再试",bottom:"10%",zindex:9e3,speed:500,time:2e3})},window.chatModelObj=new ChatModel({model:"chatdoc",title:"AI学习助手",keycode:"blog",darkMode:"Black"===skinStatus,simpleMode:!0,width:"65%",features:{sug:!1,roles:!1,tools:!1,collapseBtn:!1,skillTree:!1,modelControl:!1}}),function(){function t(t){o.hasClass("no-login")||($("div.article_content").removeAttr("style"),0==$(".column-mask").length&&$(".hide-article-box").hide(),o.hasClass("fans_read_more")&&($("#btnAttent").hasClass("attented")||t.originalEvent&&($(".tool-attend").trigger("click"),window.csdn.report.reportClick({mod:"popu_376",spm:"1001.2101.3001.4248",extend1:"粉丝登录阅读更多"}))))}function e(e,o){var n=($(window).height(),$("div.article_content")),i=n.height();$("#btn-readmore").attr("height",o),i>2e3?(n.css({height:"2000px",overflow:"hidden"}),e.click(t)):e.parent().hide()}0!=$(".btn-readmore").length&&$("#content_views").find("pre").each(function(t,e){e=$(e),e.addClass("set-code-show")});var o=$(".btn-readmore");$(".vipmaskclassname").length<=0&&(o.length>0||$(".vip-mask").length>0?currentUserName?e(o,3):e(o,2):0==$(".column-mask").length&&$(".hide-article-box").addClass("hide-article-style"));var n=window.location.hash,i=RegExp(/\#/);n.match(i)&&($(".btn-readmore").parent().hide(),$("div.article_content").removeAttr("style")),window.csdn=window.csdn?window.csdn:{},window.csdn.clearReadMoreBtn=t}(),$(function(){function t(){var t=$(".recommend-ask-box").find("a.btn-link-toask").data("href");t=t?t:$(".recommend-ask-box").find(".btn-gochat").data("href");var e=$(".recommend-ask-box").find("#txtChat").val();e=e&&e.length?e.trim():$(".recommend-ask-box").find("a.btn-link-toask").data("defaultvalue"),e=e?e:$(".recommend-ask-box").find("#txtChat").data("defaultvalue");var o=document.createElement("a");o.style.display="none",o.href=t+"&query="+encodeURIComponent(e),o.target="_blank",document.body.appendChild(o),o.click(),document.body.removeChild(o)}$(".recommend-ask-box").find("#txtChat").on("keyup",function(e){var o=e.which||e.keyCode;13===o&&t()}),$(".recommend-ask-box").find(".btn-gochat").on("click",function(){t()}),$(".recommend-ask-box").find(".btn-link-toask").on("click",function(){t()})}),$(function(){function t(t){t.list&&t.list.length&&($.each(t.list,function(t,e){var o="",n="";articleId==e.articleId&&(o="active"),e.preView&&(n='试读'),i.columnlistStr+='"}),t.total-t.page*t.size>0?(i.columnPage+=1,i.columnlistStr+='查看更多
暂无更多内容
',$(document).find(i.columnlistHeight).append(i.columnlistStr),i.columnlistStr="")}function e(t,e,o,n){$.ajax({type:"GET",url:blogUrl+t,dataType:"json",xhrFields:{withCredentials:!0},data:e,success:function(t){200==t.code&&o(t.data)},error:function(t){}})}function o(t,e){if(getCookie("UserName")){var o=blogUrl+"phoenix/web/v1/subscribe/subscribe";$.ajax({url:o,type:"post",dataType:"json",data:t,xhrFields:{withCredentials:!0},success:function(t){200===t.code&&(t.data.status&&showToast({text:t.data.msg,bottom:"10%",zindex:9003,speed:500,time:1500}),e.removeClass("articleColumnFreeBt").html("已订阅"))}})}else window.csdn.loginBox.show({spm:"1001.2101.3001.8607"})}function n(t,e,o){if($(document).find(t).length){var n=$(document).find(t).outerHeight(!0),i=$(document).find(e).outerHeight(!0),a=$(document).find(o).outerHeight(!0);$(document).find(o).css({height:n-i+a})}}var i={columnlistBox:"#columnlistBox",columnlistClose:".columnlist-close",columnlistContent:".columnlist-content-box",columnlistHeight:".columnlist-list-box",columnlistShow:$(".bt-columnlist-show"),columnlistShadow:$(".directory-boxshadow"),columnlistItem:$(".column-group"),columnlistUrl:"phoenix/web/v1/column/article-list",columnId:"",columnPage:1,columnlistStr:""};i.columnlistItem.on("click",function(t){$(this).children().length>1&&!$(t.target).is(".item-target")&&($(this).hasClass("open")?($(this).removeClass("open"),$(this).find(".dec").show()):($(this).addClass("open"),$(this).find(".dec").hide()))});var a="";studyLearnWord&&(a=''+studyLearnWord+""),i.columnlistShow.on("click",function(o){i.columnId=$(this).data("id");var s="",c="",r="",l="",d="",m="";isOwner||($(this).data("free")?s=$(this).data("subscribe")?'已订阅':'订阅专栏':($(this).data("join")?$(this).data("studyvip")?$(this).data("subscribe")?s='已订阅 8折续费 '+a+"":(s=' 会员已订阅 ', s+='已下架不支持订阅
',c=""),l='已下架不支持订阅
'),i='查看更多
暂无更多内容
',s.asideColumnInfoDom.find(s.columnlistHeight).append(s.columnlistStr),s.columnlistStr="")}function o(){t(),n(s.columnlistUrl,{columnId:s.columnInfoDom.data("id"),page:s.columnPage},e),$(document).on("click",".column-info-container .look-more-article",function(t){if($(this).hasClass("active")){$(this).fadeOut(function(){$(this).remove()}),n(s.columnlistUrl,{columnId:s.columnInfoDom.data("id"),page:s.columnPage},e);var o=t||window.event;o.stopPropagation?o.stopPropagation():o.cancelBubble=!0}}),$("#recommend-right").prepend(s.asideColumnInfoDom),i(s.asideColumnInfoDom,s.columnlistContent,s.columnlistHeight)}function n(t,e,o){$.ajax({type:"GET",url:blogUrl+t,dataType:"json",xhrFields:{withCredentials:!0},data:e,success:function(t){200==t.code&&o(t.data)},error:function(t){}})}function i(t,e,o){if(t.length){var n=t.outerHeight(!0),i=$(t).find(e).outerHeight(!0),a=$(t).find(o).outerHeight(!0);$(t).find(o).css({height:n-i+a})}}function a(t){for(var e=document.cookie.split("; "),o=0;o
:这篇文章对你有帮助吗?作为一名程序工程师,在评论区留下你的困惑或你的见解,大家一起来交流吧!
'),e.renderData(t.list),getCookie("UserName")?(e.btnShowMore.parent("div.opt-box").remove(),e.showAll=!0,t.floorCount<=e.pageSize?e.commentPagination.addClass("d-none"):0===$("#btnMoreComment").length&&e.commentPagination.removeClass("d-none")):t.floorCount<=3?(e.btnShowMore.parent("div.opt-box").remove(),e.showAll=!0):t.floorCount<=e.pageSize?e.commentPagination.addClass("d-none"):0===$("#btnMoreComment").length&&e.commentPagination.removeClass("d-none"),null===e.commentPageObj?t.pageCount>0&&(e.commentPageObj=new Paging,e.commentPageObj.init({target:e.commentPagination,pagesize:e.pageSize,count:e.commentCount,current:1,firstTpl:"",lastTpl:"",callback:function(t,o,n){e.getPagination(t)}})):e.commentPageObj.render({count:e.commentCount}),""!==u){var n=$("div.has-comment-con ul.comment-list:first-child").find("li.comment-line-box");$(n).each(function(t,e){if(u==$(e).data("commentid")){var o=$(document).scrollTop(),i=$("#csdn-toolbar").height(),a=16;o<52&&(i=2*i);var s=$(n)[t].offsetTop-i-a;return setTimeout(function(){$("html,body").animate({scrollTop:s},200)},850),!1}})}}else e.btnShowMore.parent("div.opt-box").remove(),e.showAll=!0};this.firstLoad?this.getData(1,t):blogMoveHomeArticle&&this.btnShowMore.parent("div.opt-box").remove()},e.prototype.initTxt=function(){var t=this;$("#comment_content").length&&$("#comment_content").focus(function(){t.addId(t);var e=t.commentFontLimit-parseInt($(this).val().length);t.commentCountObj.text(e>=0?e:0),t.cancelBtnToggle(!1),t.commentLineBox.length>0&&($("#commentEditBox").siblings(".comment-list-item").find("a.btn-reply").html("回复"),t.commentLineBox.find(".comment-edit-box").remove())}),getCookie("UserName")&&($(document).click(function(e){if(!$(e.target).is("div.comment-edit-box *")&&!$(e.target).is(".right_recommend_comment_button *")&&!$(e.target).is(".reply")&&($(".comment-operate-isshow").hide(),t.txtComment.length>0)){var o=t.commentFontLimit-t.txtComment.val().length;t.commentCountObj.text(o>=0?o:0)}}),$(document).click(function(t){$(t.target).is(".comment-line-box *")||($("#commentEditBox").siblings(".comment-list-item").find("a.btn-reply").html("回复"),$("#commentEditBox").remove())})),$("input.btn-comment-defualt").click(function(){$(".tool-item-comment").trigger("click")}),$(".tool-item-comment").click(function(){if(3===commentAuth){var t='\n 评论提示
\n"+quotecontent+""+s):(s=this.replaceNewUBB(f[0]),s=this.getCodeInfo(s));var g,v=null!==u.redEnvelopeInfo,b=v?JSON.parse(u.redEnvelopeInfo):null;v&&(g=JSON.stringify({spm:"3001.9224",extend1:{orderNo:u.orderNo}}),b.money=parseFloat(parseInt(b.money)/100).toFixed(2)),h='",o.commentBoxDefault.html($(h)),o.initHotComment=!1,$("#pcCommentBox").show()}o.curFloor--}}return!t.length&&o.commentUnFold.total<=0&&o.commentBoxDefault.html(""),e?a:void w.getRedPacketVerifyBatch()},e.prototype.addId=function(t,e){"new"==e?(t.commentForm=$("#commentformNew"),t.txtComment=$("#comment_contentNew"),t.commentCountObj=t.commentForm.find("em"),t.commtCode=$("#commentCodeNew"),t.commentTxt=$("#comment_replyIdNew"),t.articleId=$("#article_idNew")):(t.commentForm=$("#commentform"),t.txtComment=$("#comment_content"),t.commentCountObj=t.commentForm.find("em"),t.commtCode=$("#commentCode"),t.commentTxt=$("#comment_replyId"),t.articleId=$("#article_id"))},e.prototype.bindBtnFoldMore=function(){var t=this;$(document).on("click","#lookFlodComment",function(){t.isCommentFold=!0,t.commentFold.pageIndex=1,t.getFoldList(t.commentFold),$("#pcFlodCommentSideBox").show(),$("#pcCommentSideBox").hide(),$("#pcCommentSideBox .comment-list-box").html("")}),$(document).on("click","#lookUnFlodComment",function(){t.isCommentFold=!1,t.commentUnFold.pageIndex=1,t.getPagination(t.commentUnFold.pageIndex),$("#pcFlodCommentSideBox").hide(),$("#pcCommentSideBox").show(),$("#pcFlodCommentSideBox .comment-fold-content").html("")}),e.prototype.getFoldList=function(e){$.ajax({url:blogUrl+"phoenix/web/v1/comment/list/"+articleId+"?page="+t.commentFold.pageIndex+"&size="+t.commentFold.pageSize+"&fold="+t.commentFold.fold,type:"post",xhrFields:{withCredentials:!0},success:function(e){if(200===e.code){result=e.data;result.foldCount;if($(".tool-item-comment .count").html(result.count),$(".comment-side-tit-count .count").html(result.count),$(".has-comment-tit .count").html(result.count),$(".has-comment-bt-left .count").html(result.count),$(".look-flod-comment .count").html(result.foldCount),$(".comment-fold-tit .count").html(result.foldCount),result.foldCount>0?t.lookFlodComment.show():t.lookFlodComment.hide(),result.list.length){var o=t.buildListDom(result.list,!0,t,!1),n=document.createElement("div");n.classList.add("comment-fold-con","comment-list-box","comment-operate-item"),n.innerHTML=o,$("#pcFlodCommentSideBox .comment-fold-content").append(n),t.commentFold.pageIndex+=1,t.commentFold.pageCount=result.pageCount,t.commentFold.pageIndex>t.commentFold.pageCount?t.lookBadComment.hide():t.lookBadComment.show()}}}})}};var d="";if(e.prototype.buildHtml=function(t,e,n,i,a){var s="",c="",r="",l="",m=!1,p="",u="";if(t.content=this.replaceUrl(t.content),n){d=i,p=this.getQuote(t.content),t.content=this.replaceQuote(t.content);var h=this.getQuoteInfo(t.content);h.length>1?(r=h[1],l=this.getCodeInfo(h[2]),l=this.replaceNewUBB(l),s=this.getCodeInfo(h[3]),s=this.replaceNewUBB(s),s='引用“'+r+"”的评论:
"+l+""+s):(s=this.replaceNewUBB(h[0]),s=this.getCodeInfo(s)),username===getCookie("UserName")&&(m=!0)}else{var h=this.getReplyInfo(t.content);c=h[1];var f=h.length>2?this.getQuoteInfo(h[2]):this.getQuoteInfo(h[0]);f.length>1?(r=f[1],l=this.getCodeInfo(f[2]),l=this.replaceNewUBB(l),s=this.getCodeInfo(f[3]),s=this.replaceNewUBB(s),s='引用“'+r+"”的评论:
"+l+""+s):(s=this.replaceNewUBB(f[0]),s=this.getCodeInfo(s))}if(o(t),n&&p&&""!=p&&(u='

([\s\S]*?)\<\/pre\>/gi,o=[];if(t.replace(e,function(t){o.push(t)}),o.length)for(var n=t.replace(e,function(t){return"[csdnCommentPreCode]"}),i=n.replace(/\n/g,""),a=0;a");return i},e.prototype.getReplyInfo=function(t){var e=t.split(/\[reply]([\s\S]*?)\[\/reply\][\r\n]{0,1}/gi);return e},e.prototype.getQuoteInfo=function(t){var e=t.split(/\[quote=([\w#\.]+)\]([\s\S]*?)\[\/quote\][\r\n]{0,2}/gi);return e},e.prototype.getCodeInfo=function(t){var e=t.replace(/\[code=([\w#\.]+)\]([\s\S]*?)\[\/code\]/gi,function(t,e,o){return""==$.trim(o)?"":''+s(o.trim())+"
"});return e},e.prototype.replaceNewUBB=function(t){return t=t.replace(/\[face\]([^\]]+):([^\]]+)\[\/face\]/gi,'
')},e.prototype.replaceUrl=function(t){var e=/(https?|http|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g,o=/\[code=([\w#\.]+)\]([\s\S]*?)\[\/code\]/gi,n=[];if(t.replace(o,function(t){n.push(t)}),n.length)for(var i=t.replace(o,function(t){return"[csdnCommentCode]"}),a=i.replace(e,function(t){return'
网页链接'}),s=0;s
网页链接'});return a},e.prototype.replaceQuote=function(t){return t=t.replace(/\[quote\]([\s\S]*?)\[\/quote\]/gi,"")},e.prototype.getQuote=function(t){var e="";return t.replace(/\[quote\]([\s\S]*?)\[\/quote\]/gi,function(t){e=t}),e=e.replace("[quote]","").replace("[/quote]","")},e.prototype.replayComment=function(t){var e=t.Id,o=t.User;this.txtComment.attr("placeholder","回复:"+t.text).data("replayUser",o),this.commentTxt.val(e)},e.prototype.commentCode=function(){var t=this;t.commtCode.find("a").click(function(e){var o="[code="+$(this).data("code")+"]\n\n[/code]",n=t.txtComment.val();(o+n).length<=t.commentFontLimit?(t.txtComment.val(n+o),"comment_content"==t.txtComment[0].id&&$("#comment-content").val(n+o),t.commtCode.parents(".comment-code-box").fadeOut()):showToast({text:"您输入的字数已经超过限定了",bottom:"10%",zindex:9e3,speed:500,time:1500});var i=e||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=!0})},e.prototype.comment=function(){function t(t){if(!getCookie("UserName"))return e.setStorage();window.localStorage.removeItem("AM_comment_data");var o=$(t).find(":submit"),n={commentId:e.commentTxt.val(),content:e.txtComment.val(),articleId:articleId};if("block"===w.formRewardBox.css("display")&&Object.assign(n,w.rewardInfo),n.replyId&&$.trim(n.content)&&(n.content="[reply]"+e.txtComment.data("replayUser")+"[/reply]"+n.content),$(t).find("#comment_content").length&&$("#commentQuote").length&&""!==$("#commentQuote").text()&&(n.content="[quote]"+$("#commentQuote").text().substr(0,50)+"[/quote]"+n.content),""===$.trim(n.content)||""===e.txtComment.val())showToast({text:"请填写评论内容",bottom:"10%",zindex:9e3,speed:500,time:1500});else{var i=blogUrl+"phoenix/web/v1/comment/submit";o.prop("disabled",!0).val("提交中"),$.ajax({url:i,type:"post",dataType:"json",data:n,xhrFields:{withCredentials:!0},success:function(t){if(200===t.code){if(e.isCommentFold)e.commentFold.pageIndex=1,$("#pcFlodCommentSideBox .comment-fold-content").html(""),e.getFoldList(e.commentFold);else{e.commentForm.trigger("reset"),e.commentTxt.val(""),e.txtComment.data("replayUser","").attr("placeholder","想对作者说点什么"),e.cancelBtnToggle(!1),u=t.data,e.init(),e.removeStorage();var o=$("#commentQuote");o.length&&o.animate({height:0},300,function(){o.remove()}),e.commentUnFold.pageIndex=1,$("#pcCommentSideBox .comment-list-box").html("")}"block"===w.formRewardBox.css("display")&&w.formRewardBox.find(".btn-remove-reward").trigger("click"),showToast({text:"评论成功,审核后显示",bottom:"10%",zindex:9e3,speed:500,time:2e3})}else showToast({text:t.message,bottom:"10%",zindex:9e3,speed:500,time:2e3})},complete:function(){o.prop("disabled",!1).val("评论")}})}return!1}var e=this;e.commentForm.submit(function(e){e.preventDefault();var o=this;try{window.csdn.loginBox.key({biz:"blog",subBiz:"other_service",cb:function(){t(o)}})}catch(n){t(o)}})},e.prototype.insertRightCommnetPrompt=function(){if(window.localStorage.getItem("AM_comment_Prompt_show"))return!1;window.localStorage.setItem("AM_comment_Prompt_show",!0);var t=$(".right_recommend_comment"),e=$(".right_recommend_comment_Prompt");e.length>0?e.fadeIn(300):t.prepend('新的评论在这里'),setTimeout(function(){$(".right_recommend_comment_Prompt").fadeOut(500)},4e3)},e.prototype.setStorage=function(){return window.localStorage.setItem("AM_comment_data",this.txtComment.val()),window.localStorage.setItem("AM_comment_replyId",this.commentTxt.val()),window.localStorage.setItem("AM_comment_id",articleId),!!getCookie("UserName")||(window.csdn.loginBox.show(),!1)},e.prototype.removeStorage=function(){window.localStorage.removeItem("AM_comment_data"),window.localStorage.removeItem("AM_comment_replyId"),window.localStorage.removeItem("AM_comment_id")},e.prototype.bindLikedClick=a,e.prototype.bindRedRewardClick=i,e.prototype.cancelBtnToggle=function(t){t?this.cancelBtn.removeClass("d-none"):this.cancelBtn.addClass("d-none")},e.prototype.cancelBtnBindEvent=function(){var t=this;this.cancelBtn.on("click",function(){t.txtComment.attr("placeholder","想对作者说点什么").data("replayUser","").val(""),t.commentTxt.val(""),t.cancelBtnToggle(!1)})},e.prototype.commentIsBlack=function(t,e,o){var n=this,i="https://mp-action.csdn.net/interact/wrapper/pc/black/"+(o?"cancel":"save"),a=o?{username:t,usernameList:[e],bizNo:"blog"}:{username:t,blackUsername:e,bizNo:"blog"};$.ajax({url:i,type:"post",data:JSON.stringify(a),contentType:"application/json",dataType:"json",xhrFields:{withCredentials:!0},success:function(t){200===t.code?(setTimeout(function(){n.isCommentFold?(n.commentFold.pageIndex=1,$("#pcFlodCommentSideBox .comment-fold-content").html(""),n.getFoldList(n.commentFold)):(n.commentUnFold.pageIndex=1,$("#pcCommentSideBox .comment-list-box").html(""),n.getPagination(n.commentUnFold.pageIndex))},100),showToast({text:o?"取消屏蔽成功!":"屏蔽用户成功!",bottom:"10%",zindex:9e3,speed:500,time:1500})):showToast({text:o?"取消屏蔽失败,请刷新页面重新操作!":"屏蔽用户失败,请刷新页面重新操作!",bottom:"10%",zindex:9e3,speed:500,time:1500})}})},e.prototype.commentIsTop=function(t,e){var o=this,n=blogUrl+"phoenix/web/v1/comment/top",i={commentId:t,articleId:articleId,action:e?0:1};$.ajax({url:n,type:"post",dataType:"json",data:i,xhrFields:{withCredentials:!0},success:function(t){200===t.code?(setTimeout(function(){o.isCommentFold?(o.commentFold.pageIndex=1,$("#pcFlodCommentSideBox .comment-fold-content").html(""),o.getFoldList(o.commentFold)):(o.commentUnFold.pageIndex=1,$("#pcCommentSideBox .comment-list-box").html(""),o.getPagination(o.commentUnFold.pageIndex))},100),showToast({text:e?"取消置顶成功!":"置顶评论成功!",bottom:"10%",zindex:9e3,speed:500,time:1500})):showToast({text:e?"取消置顶失败,请重新操作!":"置顶评论失败,请重新操作!",bottom:"10%",zindex:9e3,speed:500,time:1500})}})},e.prototype.commentIsDelete=function(t){var e=this,o=$("#article_id").val(),n=blogUrl+"phoenix/web/v1/comment/delete",i={commentId:t,articleId:o};$.ajax({url:n,type:"post",dataType:"json",data:i,xhrFields:{withCredentials:!0},success:function(o){200===o.code?(setTimeout(function(){e.isCommentFold?(e.commentFold.pageIndex=1,$("#pcFlodCommentSideBox .comment-fold-content").html(""),e.getFoldList(e.commentFold)):(e.commentUnFold.pageIndex=1,$("#pcCommentSideBox .comment-list-box").html(""),e.getPagination(e.commentUnFold.pageIndex));var o=$("#pcCommentBox").find(".hot-comment-box");o.length>0&&o.data("commentid")===t&&(o.html(""),o.data("commentid",""),$("#pcCommentBox").hide())},100),showToast({text:"删除成功!",bottom:"10%",zindex:9e3,speed:500,time:1500})):showToast({text:"删除失败,请重新操作!",bottom:"10%",zindex:9e3,speed:500,time:1500})}})},$(document).on("keydown",".comment-content",function(t){var e=t||event;console.log(t),(e.ctrlKey&&13==e.which||13==e.which&&e.metaKey)&&("comment_content"==$(this).attr("id")?$("#commentform .btn-comment").trigger("click"):$("#commentformNew .btn-comment").trigger("click"))}),$(document).on("click",".second-look-more",function(t){$(this).hide(),$(this).siblings(".comment-line-box-hide").show()}),$(document).on("click",".comment-operate-item",function(t){if(getCookie("UserName")){if($(".comment-operate-isshow").fadeOut(),$(this).hasClass("comment-emoticon")){""==$(".comment-emoticon-img-box").html()&&$(".comment-emoticon-img-box").html(c()),
$(this).find(".comment-emoticonNew").length&&$(this).find(".comment-operate-isshow").html($("#commentform .comment-emoticon-box").html());var e=$(this).find(".comment-emoticon-box");"block"===e.css("display")?e.fadeOut():($("#comment_content").one("focus",function(){e.fadeOut()}),e.fadeIn())}else if($(this).hasClass("comment-code")){var o=$(this).find(".comment-code-box");"block"===o.css("display")?o.fadeOut():($("#comment_content").one("focus",function(){o.fadeOut()}),o.fadeIn()),!$(this).hasClass("comment-codeNew")}else $(this).hasClass("comment-reward")&&w.showRewardForm();var n=t||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0}else csdn.loginBox.show()}),$(document).on("click",".emoticon-monkey-img",function(t){var e=$(this).data("emoticon");if($(this).parents(".comment-emoticon-box").is(".comment-emoticonNew")){var o=$("#comment_contentNew").val()+e;o.length<=1e3?textareaPointLocation.insertAtCaret($("#comment_contentNew")[0],e):showToast({text:"您输入的字数已经超过限定了",bottom:"10%",zindex:9e3,speed:500,time:1500})}else{var o=$("#comment_content").val()+e;o.length<=1e3?textareaPointLocation.insertAtCaret($("#comment_content")[0],e):showToast({text:"您输入的字数已经超过限定了",bottom:"10%",zindex:9e3,speed:500,time:1500})}$(this).parents(".comment-emoticon-box").fadeOut();var n=t||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0}),$(document).on("mouseenter",".comment-like",function(){$(this).hasClass("liked")?($(this).find(".clickedImg").css("display","none"),$(this).find(".comment-like-img-hover").css("display","block")):($(this).find(".unclickImg").css("display","none"),$(this).find(".comment-like-img-hover").css("display","block"))}),$(document).on("mouseleave",".comment-like",function(){$(this).hasClass("liked")?($(this).find(".clickedImg").css("display","block"),$(this).find(".comment-like-img-hover").css("display","none")):($(this).find(".unclickImg").css("display","block"),$(this).find(".comment-like-img-hover").css("display","none"))}),$(document).on("click",".unlogin-comment-box-new .unlogin-comment-bt",function(){window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({spm:"1001.2101.3001.6916"}),getCookie("UserName")||window.csdn.loginBox.show({spm:"1001.2101.3001.8611"})}),$(".blog-postTime").length>0){var m=$(".blog-postTime").data("time"),p="于 "+m+" 发布";$(".blog-postTime").html(p)}var u=r("#comments_");if(u&&!getCookie("UserName")){$("#pcCommentBox").show();var h=$(document).scrollTop(),f=$("#csdn-toolbar").height(),g=2*$("#pcCommentBox").height();h<52&&(f=2*f);var v=$("#pcCommentBox").offset().top-f-g;return setTimeout(function(){$("html,body").animate({scrollTop:v},200)},850),!1}var w=new t;window.csdn.comments?window.csdn.comments:{},window.csdn.Comments=e,window.csdn.comments=new window.csdn.Comments}),$(function(){if(1===articleType){var t=$("main .blog-content-box")[0],e=document.querySelector(".creativecommons span a");e=e?e.innerText:"";var o="";e?o="\r\n————————————————\r\n版权声明:本文为CSDN博主「"+nickName+"」的原创文章,遵循"+e+"版权协议,转载请附上原文出处链接及本声明。\r\n原文链接:"+curentUrl:(e=document.querySelector(".creativecommons"),e=e?e.innerText:"",e?o="\r\n————————————————\r\n"+e+"\r\n原文链接:"+curentUrl:(e="CC 4.0 BY-SA",o="\r\n————————————————\r\n版权声明:本文为CSDN博主「"+nickName+"」的原创文章,遵循"+e+"版权协议,转载请附上原文出处链接及本声明。\r\n原文链接:"+curentUrl)),csdn.copyright.init(t,o)}if(copyPopSwitch&&!getCookie("UserName")){var n=function(){window.csdn.loginBox.show({spm:"1001.2101.3001.9440"})};$("#content_views").unbind("keydown").bind("keydown",function(t){if(t.ctrlKey&&67==t.keyCode)return n(),!1}),$("#content_views").unbind("copy").bind("copy",function(t){return n(),!1})}}),$(function(){function t(t,o){if(!(o.length<2)){var n="";n+="";for(var i=0,a=0,s=0,c=0,r=0,l=0,d=0;di?(n+='',a++):m0&&(n+="
",a--),m==p)for(;a>0;)n+="
",a--;i=m;var u=o.eq(d).text();if(u=/^[\s]+$/.test(u)?u:u.replace(/^[\s]+/g,""),u=e(u),u.length>0)switch(m){case 1:++s,c=0,r=0,l=0;var h="";1===s&&(h="active"),n+="'+u+" ";break;case 2:++c,r=0,l=0,n+=''+u+" ";break;case 3:++r,l=0,n+=''+u+" ";break;case 4:++l,n+=''+u+" "}}for(;a>0;)n+="",a--;return n}}function e(t){return t.replace(/[<>&"]/g,function(t){return{"<":"<",">":">","&":"&",'"':"""}[t]})}function o(t){function e(t){return $(t).each(function(t,n){n.children&&e(n.children),++o}),o}var o=0;return e(t)}function n(t,e,o){var n=$("div.groupfile"),i=n.find("div.toc-box"),a=n.find("div.opt-box");if(e<=2&&($("#liTocBox").remove(),!isShowSideModel&&payColumn&&window.csdn.loadRightColumn()),e>2&&"0"==d&&$("#liTocBox").css("display","block"),e<=2&&"1"==d?($(".groupfile").remove(),$("#rightAsideConcision").remove()):isShowConcision?(isCookieConcision&&($(".recommend-right1").addClass("show-directory"),$("#mainBox").removeAttr("style")),isHasDirectoryModel=!0):$("#rightAsideConcision").remove(),e<=2&&($("#blog_artical_directory").hide(),$(".left_menu .menu_con").hide()),!$(".first_li")[0]){i.html(o(t,m)),s(e,a,i);var c=!1;$("#liTocBox").hover(function(){$("#liTocBox .toc-container").finish().fadeIn(500),$(this).find("button.btn-toc").addClass("active"),c=!1},function(t){c=!0;var e=$(this);setTimeout(function(){c&&($("#liTocBox .toc-container").finish().fadeOut(500),e.find("button.btn-toc").removeClass("active"))},300)})}}function i(){var t=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;t+=10;for(var e=0;e=180?($("#recommend-right").css({position:"fixed",top:t}),$("#recommend-right-concision").css({position:"fixed",top:t})):($("#recommend-right").removeAttr("style"),$("#recommend-right-concision").removeAttr("style")),0==$(document).scrollTop()&&($("#recommend-right").removeAttr("style"),$("#recommend-right-concision").removeAttr("style"))}function s(t,e,o){if(t>9){var n=25*$("div.toc-box").find("li:not(.sub-box)").length,i=225,a=n-i,s=0;e.find("button.btn-opt").click(function(){$(this).hasClass("nomore")||($(this).hasClass("prev")?(s-=25,o.scrollTop(s),s<=0&&$(this).addClass("nomore")):(s+=25,s>=25*(t-17)&&(s=25*(t-17)),o.scrollTop(s),s>=a&&$(this).addClass("nomore")),$(this).siblings().removeClass("nomore"))})}else e.remove()}function c(){function t(e){$(".openvippay")[0]||window.csdn.clearReadMoreBtn(),o.off("click",t)}function e(){var t=window.location.href,e=document.title;setTimeout(function(){history.pushState(null,e,t)},0)}var o=$(".toc-container .toc-box ol li a");return 0!==o.length&&(o.click(t),void o.click(e))}function r(t){var e="";return $(t).each(function(t,o){e+=l(o,t)}),e+"
"}function l(t,e){return t.children.length?""+t.title+' '+r(t.children)+" ":""+t.title+" "}if(!window.hasOwnProperty("isGitCodeBlog")||!isGitCodeBlog){for(var d=1,m=$("#article_content").find("h1,h2,h3,h4"),p=$("#article_content").find("h1").length>0?1:2,u=0;u'+m.eq(u).html());$(".vip_article")[0]?($.ajax({type:"GET",url:blogUrl+"/phoenix/web/v1/get-article-catalog?articleId="+articleId,dataType:"json",xhrFields:{withCredentials:!0},success:function(t){200==t.code&&(n(t.data,o(t.data),r),c(),$("#groupfile .toc-box ol li a").each(function(t,e){e.href="#t"+t}),$("#directory .toc-box ol li a").each(function(t,e){e.href="#t"+t}),$("#rightAsideConcision .toc-box ol li a").each(function(t,e){e.href="#t"+t}),""===String($(".groupfile .toc-box").text()).replace(/(^\s*)|(\s*$)/g,"")?($("#asidedirectory").remove(),$("#groupfile").remove(),$("#rightAsideConcision").remove(),isHasDirectoryModel=!1):$("#groupfile").show())}}),$("#downloadEduApp").click(function(){getCookie("UserName")?window.open("https://vip.csdn.net/studyvip?utm_source=zhuanlan"):window.csdn.loginBox.show()})):(n("",m.length,t),c(),""===String($(".groupfile .toc-box").text()).replace(/(^\s*)|(\s*$)/g,"")?($("#asidedirectory").remove(),$("#groupfile").remove(),$("#rightAsideConcision").remove(),isHasDirectoryModel=!1):$("#groupfile").show()),$(document).on("toolbarHeightChange",function(t){var e=$("#csdn-toolbar").height()+8;$("#recommend-right").css("position")&&$("#recommend-right").css({top:e})});var h=$("#content_views").find("h1,h2,h3,h4"),f=[],g=$("#content_views").offset().top,v=$("#content_views").height(),w=$("#csdn-toolbar").height();$(h).each(function(t,e){f.push($(e)[0].offsetTop+g-2*w)}),f.push(v+g),$(window).resize(function(){f=[],g=$("#content_views").offset().top,v=$("#content_views").height(),w=$("#csdn-toolbar").height(),$(h).each(function(t,e){f.push($(e)[0].offsetTop+g-2*w)}),f.push(v+g)}),$(window).scroll(function(){$(".groupfile .toc-box li").removeClass("active"),i()}),i(),$(document).on("click",".groupfile .toc-box li a",function(t){$(".groupfile .toc-box li").removeClass("active"),$(this).parent().addClass("active")});var b=document.body.clientHeight||document.documentElement.clientHeight;if($("#groupfile").css("max-height",b/2+"px"),$(".groupfile-div").css("max-height",b/2+"px"),$(".groupfile-div1").css("max-height",b-48+"px"),$(document).scroll(function(){a()}),a(),$(document).on("click",".csdn-side-toolbar .option-box",function(t){isShowConcision&&setTimeout(function(){a()},100)}),$(".hide-article-box").length&&"none"!==$(".hide-article-box").css("display")){for(var x=$(".hide-article-box").offset().top,y=0,k=0;ky){var e=$("#getVipUrl").attr("href");e.indexOf("vip")>-1?window.open(e+"?utm_source=brv&sale_source=BgsN7mSaYF"):window.open(e)}}),$(".btn-readmore")[0]&&C.each(function(t,e){$(".groupfile .toc-box ol").find('a[href="#'+$(C[t]).find("a")[0].name+'"]').click(function(){$(".btn-readmore").trigger("click"),$(".btn-readmore").hasClass("no-login")?window.open("https://passport.csdn.net/account/login"):$("#btnAttent").trigger("click")})})}$(document).ready(function(){var t=$(".htmledit_views #main-toc").prevAll("h1,h2,h3,h4"),e=t.length,o=$('.htmledit_views p[id*="-toc"]').slice(1).filter(function(t,e){return $(e).find("a").length||$(e).css({margin:"0"}),$(e).find("a").length}),n=0;o.each(function(t,o){$(o).attr("id","");var i=$(o).css("margin-left").replace("px","")/40,a=0==i?0:48*i;if($(o).css({"padding-left":"24px",margin:"0","margin-left":a+"px","margin-bottom":"2px"}),e>0)$(o).find("a").attr("href","#t"+e),e++;else{var s=$(o).find("a").attr("href").replace("#","");s=s.replace(/%28/g,"(").replace(/%29/g,")").replace(/%7b/g,"{").replace(/%7d/g,"}"),$('[id="'+s+'"]').is("h1,h2,h3,h4")?$(o).find("a").attr("href","#t"+(t-n)):n++}});var i=$(".markdown_views .toc a");i.length&&i.each(function(t,e){var o=$(e).attr("href");o&&$(e).attr("href",o.replace(/%/g,"_"))});var a=$(".markdown_views").find("h1 a,h2 a,h3 a,h4 a");a.length&&a.each(function(t,e){var o=$(e).attr("id");o&&$(e).attr("id",o.replace(/%/g,"_"))}),$(document).on("click","#content_views a[href*=#],div.toc-box a[href*=#],li.tool-item-comment a[href*=#]",function(){var t=$("#csdn-toolbar").height(),e=$(document).scrollTop();if(e<52&&(t=2*t),location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var o=$('[id="'+this.hash.slice(1)+'"]');if(o=o.length&&o||$('[name="'+this.hash.slice(1)+'"]'),o.length){var n=o.offset().top;return $("html,body").animate({scrollTop:n-t},500),!1}}}),setTimeout(function(){if(window.location.href.indexOf("#comments")>-1){var t=$("#csdn-toolbar").height();$("html,body").animate({scrollTop:$("#commentBox").offset().top-t-48},500)}},1e3)})}}),$(function(){function t(t){var e=$(".article-resource-info-box");$.ajax({type:"GET",url:"https://download-console-api.csdn.net/plugin/blog/source/get",dataType:"json",data:{sid:t},xhrFields:{withCredentials:!0},success:function(t){if(200==t.code&&t.data&&t.data.hasOwnProperty("sid")){var o=t.data,n='\n \n
\n \n \n \n 立即下载\n \n ';e.append(n),e.css({display:"flex"}),window.csdn.report.viewCheck()}else e.remove()},error:function(){e.remove()}})}resourceId&&t(resourceId)}),$(function(){function t(t){for(var e=document.cookie.split("; "),o=0;o0&&e.list[t]){var i=n.attr("class");i=a(i),e.language[i]&&v.push({lang:i,code:n[0].innerText.replace(/[\u00A0]/gi," "),key:"code_key_"+t,index:t,demo:n.parent()})}}),v.forEach(function(t,e){v[e].key="code_key_"+e,c="code-edithtml-box"+e,r="'运行',t.demo[0].innerHTML=t.demo[0].innerHTML+r,$(".hljs-button").eq(t.index).addClass(n),$(t.demo).find(".hljs-button").attr("data-report-click",'{"spm":"3001.10243"}'),s(c,e),delete v[e].index,delete v[e].demo})}function i(t,e){try{var o;"ckeditor"==m?(o=$("code.hljs"),n(o,t,"","def",e)):(o=$("pre code"),n($("pre code"),t,"active","mddef",e)),window.csdn.report.viewCheck(),setTimeout(function(){window.localStorage.getItem(u)&&$(".code-edithtml-box").each(function(t,e){t==window.localStorage.getItem(u)&&($(e).find("button").trigger("click"),window.localStorage.removeItem(u))})},200)}catch(i){console.error("CopyButton error: ",i)}}function a(t){var e="";return t.split(" ").forEach(function(t){t.indexOf("language-")!=-1&&(e=t.replace("language-",""))}),e.toLowerCase()}function s(t,e){window.hRenderEditor("."+t,{index:e,codes:v,articleId:articleId,channel:"CSDN-Run",fromSource:f,onPostData:c,articleTitle:articleTitle,onAuth:function(t){t&&"UNKNOWN"==t.data?(w&&w.close(),w=window.open(g,"","width=850,height=600"),window.addEventListener("message",function(e){"passport_cs_csdn_login"==e.data.type&&(t.tCode=e.data.data,window.hUpdateTCode(e.data.data)),"passport_cs_csdn_reload"==e.data.type&&(window.localStorage.setItem(u,t.index),window.location.reload())})):r(window.hUpdateTCode,{index:e},"key")}},{})}function c(t){return new Promise(function(e,o){r(e,t,"")})}function r(e,o,n){t("UserName")?$.ajax({type:"GET",url:"https://passport.csdn.net/v1/login/cloud_studio/get_embed_code",dataType:"json",xhrFields:{withCredentials:!0},data:{strategy:f,authentic:"key"===n||"control"!==p||""},success:function(t){0==t.code&&(o.tCode=t.data.embedCode,e(n?t.data.embedCode:o)),1021==t.code&&l(o),1215==t.code&&(w&&w.close(),w=window.open(g,"","width=850,height=600"),window.addEventListener("message",function(t){"passport_cs_csdn_login"==t.data.type&&(o.tCode=t.data.data,e(n?t.data.data:o)),"passport_cs_csdn_reload"==t.data.type&&(window.localStorage.setItem(u,o.index),window.location.reload())}))},error:function(t){}}):l(o)}function l(t){window.csdn.loginBox.show({spm:"3001.10182",cb:function(e){"control"==p&&window.localStorage.setItem(u,t.index),window.location.reload()}})}function d(){try{var t=$(".abstract-content")[0],e=document.createRange();e.setStart(t,0),e.setEnd(t,t.childNodes.length);var o=(e.getBoundingClientRect().width,e.getBoundingClientRect().height),n=window.getComputedStyle(t,null),i=Number.parseInt(n.paddingTop,10)||0,a=Number.parseInt(n.paddingBottom,10)||0,s=i+a;if(o+s>t.clientHeight){if($(".abstract-ab").length<=0){var c="https://img-home.csdnimg.cn/images/20240708095038.png";"Black"==skinStatus&&(c="https://img-home.csdnimg.cn/images/20240708025423.png"),$(".ai-abstract-box").append('展开 
')}$(".abstract-ab").show()}else $(".abstract-ab").hide()}catch(r){}}var m="",p="",u="CSDN_"+articleId+"_CS",h=document.querySelectorAll("pre code");document.querySelectorAll("div.htmledit_views").length>0?m="ckeditor":h.length>0&&(m="mdeditor");var f="gwzcw.8483411.8483411.8483411",g="https://cloudstudio.net/auth/realms/cloudstudio/protocol/openid-connect/auth?client_id=open-csdn&scope=r:user:id%20c:code_segment&response_type=code&redirect_uri=https%3A%2F%2Fpassport.csdn.net%2Fcloudstudiologin?article_id="+articleId+"&state=CSDN&fromSource="+f+"&kc_idp_hint=&channel=CSDN-Run";e()||o()||window.addEventListener("DOMContentLoaded",function(){$("code.hljs").length<=0&&$("pre code").length<=0||$.ajax({type:"GET",url:blogUrl+"/phoenix/web/v1/code-slice",dataType:"json",xhrFields:{withCredentials:!0},data:{articleId:articleId},success:function(e){200==e.code&&$.ajax({type:"GET",url:blogUrl+"/phoenix/web/v1/ab",dataType:"json",xhrFields:{withCredentials:!0},data:{id:392,key:t("uuid_tt_dd")},success:function(t){200==t.code&&(p=t.data,"exp1"===t.data&&(f="gwzcw.8483427.8483427.8483427",g="https://cloudstudio.net/auth/realms/cloudstudio/protocol/openid-connect/auth?client_id=open-csdn&scope=r:user:id%20c:code_segment&response_type=code&redirect_uri=https%3A%2F%2Fpassport.csdn.net%2Fcloudstudiologin?article_id="+articleId+"&state=CSDN&fromSource="+f+"&kc_idp_hint=&channel=CSDN-Run"),e.data&&e.data.list&&i(e.data,t.data))},error:function(t){}})},error:function(t){}})});var v=[],w=null;d(),window.addEventListener("resize",d),$(".ai-abstract").mouseleave(function(){$(this).removeClass("active")}),$(".abstract-ab").mouseenter(function(){$(".ai-abstract").addClass("active")})}),$(function(){var t=$('#article_content a[href^="#"]');t.each(function(t){$(this).attr("target","_self")})}),$(function(){function t(t,e){var o=e?window.csdn.report.getFullSpm(e):"",n="https://link.csdn.net?from_id="+articleId+"&target="+encodeURIComponent(t+"?utm_source=artical_gitcode"+(o?"&spm="+o:""));return n}function e(t){var e=[{unit:"K",base:1e3},{unit:"M",base:1e6}],o=2;try{var n=e;return n.reduce(function(e,n){var i=n.base,a=n.unit;if(t>=i){var s=Math.pow(10,o);e=""+parseFloat((Math.round(t*s/i)/s).toFixed(o))+a}return e},""+t)}catch(i){}return""+t}function o(o){var n=$("#gitAsideProjectInfo"),i=$("#gitProjectInfo"),a=(e(o.star_count),e(o.forks_count),t(o.web_url,"3001.10288")),s=t(o.web_url,"3001.10290"),c=function(t){return JSON.stringify({spm:"3001.10288",dest:a,extra:{type:t}})};if(n){var r=c("title"),l=c("fork"),d=c("star"),m=c("clone"),p=c("source"),u=c("more");n.find(".title a").attr("href",a).attr("data-report-click",r).text(o.name).attr("title",o.name),n.find("a.link-more").attr("href",a).attr("data-report-click",u),n.find("a.btn-star").attr("href",a).attr("data-report-click",d).find("span.count").text(e(o.star_count)),n.find("a.btn-fork").attr("href",a).attr("data-report-click",l).find("span.count").text(e(o.forks_count)),n.find("a.btn-clone").attr("href",a).attr("data-report-click",m),n.find("a.btn-source").attr("href",a).attr("data-report-click",p),n.show()}if(i){var h=JSON.stringify({spm:"3001.10290",dest:s});i.find("a").attr("href",s).attr("data-report-click",h).attr("data-report-view",h),i.find(".title").text("⚡️Github加速计划 / "+o.name).attr("title",o.name),i.find(".desc").text(o.description?o.description:"").attr("title",o.description?o.description:""),i.find(".icon-start").text(e(o.star_count)),i.find(".icon-fork").text(e(o.forks_count)),i.show(),window.csdn.report.viewCheck()}}function n(o){var n=$("#gitRelatedProjects");if(n){var i=n.find(".gitcode-related-box"),a="",s=n.find("a.link-more");s&&s.attr("href",t("https://gitcode.com"));for(var c=o.length>5?5:o.length,r=0;r\n \n \n '+l.name+'
\n '+p+"\n \n "+(l.description?''+l.description+"
":"")+"\n \n \n "}""!==a&&(i.html(a),window.csdn.report.viewCheck()),n.show()}}function i(){$.ajax({url:"https://datalinkapi.gitcode.com/api/v2/projects/byCArticleId",type:"get",data:{articleId:articleId},xhrFields:{crossDomain:!0,withCredentials:!0},success:function(t){if(t&&t.name){try{a(t.name)}catch(e){$("#gitRelatedProjects").remove()}try{o(t)}catch(e){$("#gitAsideProjectInfo").remove()}}else{$("#gitAsideProjectInfo").remove();try{a(articleTitle)}catch(e){$("#gitRelatedProjects").remove()}}},error:function(){$("#gitAsideProjectInfo").remove();try{a(articleTitle)}catch(t){$("#gitRelatedProjects").remove()}}})}function a(t){$.ajax({url:"https://web-api.gitcode.com/api/v1/search/nauth/query",type:"get",data:{q:t,type:"repo",p:1,pp:10,o:"desc"},xhrFields:{crossDomain:!0,withCredentials:!0},success:function(t){if(t&&t.content&&t.content.length>0)try{n(t.content)}catch(e){$("#gitRelatedProjects").remove()}else $("#gitRelatedProjects").remove()},error:function(){$("#gitRelatedProjects").remove()}})}window.hasOwnProperty("isGitCodeBlog")&&isGitCodeBlog&&i()}),function(){function t(t){var e="",o="",a="";i&&(e="active"),t.type?(o='作者:'+t.author+' '+actionNumberFormat(t.learnNum)+'人已学 课程详情',a=" curriculum-active"):o='加入社区';var s=' '+o+" ";n.innerHTML=s}function e(){$.ajax({url:"https://devpress-api.csdn.net/api/internal/blog/nsInfo/blog/"+articleId,type:"GET",xhrFields:{withCredentials:!0},success:function(e){200==e.code&&e.data?t(e.data):n.remove()}})}function o(t,e){$.ajax({type:"POST",url:"https://devpress-api.csdn.net/v1/user/follow",contentType:"application/json; charset=utf-8",data:JSON.stringify({followTarget:t,type:1}),xhrFields:{withCredentials:!0},success:function(t){window.open(e)},error:function(t){window.open(e)}})}var n=document.getElementById("blogHuaweiyunAdvert"),i=document.getElementById("blogColumnPayAdvert");n&&(e(),$(document).on("click","#blogHuaweiyunAdvert .column-group",function(){if(getCookie("UserName")){var t=$(this).data("id"),e=$(this).data("url");o(t,e)}else window.csdn.loginBox.show()}))}(),$(".comment-box textarea.comment-content").on("select",function(){textareaPointLocation.setCaret(this)}).on("click",function(){textareaPointLocation.setCaret(this)}).on("keyup",function(){textareaPointLocation.setCaret(this)});var textareaPointLocation={setCaret:function(t){t.createTextRange&&(t.caretPos=document.selection.createRange().duplicate())},insertAtCaret:function(t,e){if(document.all)if(t.createTextRange&&t.caretPos){var o=t.caretPos;o.text=" "==o.text.charAt(o.text.length-1)?e+" ":e}else t.value=e;else if(t.setSelectionRange){var n=t.selectionStart,i=t.selectionEnd,a=t.value.substring(0,n),s=t.value.substring(i);t.value=a+e+s}else showToast({text:"This version of Mozilla based browser does not support setSelectionRange",bottom:"10%",zindex:9e3,speed:500,time:1500})}};$(function(){function t(){function t(){$("#publicPrompt").remove(),$(document).off("click",".publicPrompt-close",t),$(document).off("click",".publicPrompt-mask",t)}var e={success:''};this.data={},this.data.status="success",this.data.titleStr="收藏成功",this.data.textStr='已收藏至 个人中心',this.data.imgUrl="",this.init=function(t){return $.extend(this.data,t),this.addStyle(),this.bindDom(),this},this.show=function(t){$.extend(this.data,t),this.insetStructure(this.data)},this.bindDom=function(){$(document).on("click",".publicPrompt-close",t),$(document).on("click",".publicPrompt-mask",t)},this.insetStructure=function(t){var o=''+e[t.status]+t.titleStr+'
'+t.textStr+'
';$("body").append(o)},this.addStyle=function(){var t=document.createElement("style");t.type="text/css",t.innerHTML=["#publicPrompt{","position: fixed;z-index: 99999;top: 0;left: 0;width: 100%;height: 100%;","}","#publicPrompt .publicPrompt-mask{","position: absolute;top: 0;left: 0;width: 100%;height: 100%;","background-color: rgba(0,0,0,0.5);","}","#publicPrompt .publicPrompt-content{","position: absolute;z-index: 2;top: 30%;left: 50%;margin-left: -175px;","background-color: #fff;width: 350px;padding: 16px;","}","#publicPrompt .publicPrompt-content .publicPrompt-title{","font-size: 16px;color: #3D3D3D;","}","#publicPrompt .publicPrompt-title svg{margin-right:4px;}","#publicPrompt .publicPrompt-title .success{fill:#89cb62;width: 20px;height: 20px;vertical-align: sub;}","#publicPrompt .publicPrompt-close{","position: absolute;top: 16px;right: 16px;cursor: pointer;","}","#publicPrompt .publicPrompt-text{","text-align: center;margin-top: 16px;margin-bottom: 16px;font-size: 14px;","}","#publicPrompt .publicPrompt-text a{","color: #3399EA;text-decoration: underline;","}","#publicPrompt .publicPrompt-qr{","display: block;width: 116px;height: 116px;padding: 8px;margin: 0 auto;border: 1px solid #EBEBEB;","}",".publicPrompt-footer-text{","font-size: 14px;color: #4D4D4D;margin-top:8px;text-align: center;","}"].join(""),document.getElementsByTagName("head")[0].appendChild(t)}}window.csdn?window.csdn:{},window.csdn.publicPrompt=t}),$(function(){function t(t,e){l.hide(),m=t,m?c.text("您举报的评论来自文章:"):c.text("举报内容:"),r.css({"z-index":9999}).show(),s.css({"z-index":1e4}).show()}function e(){s.find("#frmReport").trigger("reset"),r.css({"z-index":150}).hide(),s.hide(),$(".ipt-textarea").val(""),$(".box-botoom ul li").removeClass("box-active"),$(".box-content-bottom ul li").removeClass("box-active"),$(".box-content").eq(0).show().siblings().hide(),$("#cllcont").hide(),$(".content-input").val(""),flag=!1,i="",a=""}function o(t){showToast({text:t,bottom:"10%",zindex:9999,speed:500,time:1500})}var n=' 举报
选择你想要举报的内容(必选) - 内容涉黄
- 政治相关
- 内容抄袭
- 涉嫌广告
- 内容侵权
- 侮辱谩骂
- 样式问题
- 其他
';
$("body").append(n);var i="",a="";$(".box-botoom ul li").on("click",function(){flag=!1,$(this).addClass("box-active").siblings().removeClass("box-active"),i=$(this).attr("data"),$(".content-input").val(""),$(".box-content").eq($(this).index()).show().siblings().hide(),"6"==$(this).attr("data")?$("#cllcont").hide():$("#cllcont").show(),"8"==$(this).attr("data")?$("#cllcont").hide():$("#cllcont").show(),$(".ipt-textarea")[0].value="",$(".box-content-bottom ul li").removeClass("box-active"),"7"==$(this).attr("data")?$(".box-content-span").html("补充说明(必填)"):$(".box-content-span").html("补充说明(选填)"),a=""}),$(".box-content-bottom ul li").on("click",function(){$(this).addClass("box-active").siblings().removeClass("box-active"),a=$(this).attr("sub_type"),flag=!0});var s=$("div.report-box"),c=s.find("#reptTit"),r=$("div.mask-dark"),l=$("#rptOriginalurl"),d=s.find('textarea[name="description"]'),m=!1,p=0;s.find(".btn-close").click(e),r.click(e);var u="";$(".box-active").on("click",function(){if(!i)return o("请选择你想要举报的内容!"),!1;switch(i){case"3":if(u=$("#originalurl").val(),""==u||"http://"==u)return o("举报抄袭必须提供原创文章地址!"),$("#originalurl").focus(),!1;break;case"7":if(u=d.val(),!u)return o("请填写补充说明!"),d.focus(),!1;break;case"5":if(!flag)return o("请选择具体原因"),!1;break;case"6":if(!flag)return o("请选择具体原因"),!1;break;case"8":if(!flag)return o("请选择具体原因"),!1}var t={articleId:articleId,commentId:m?p:"",subType:a,type:i,originalUrl:u,description:d.val()},n=m?"report-comment":"report-article";$.ajax({url:blogUrl+"/phoenix/web/v1/"+n,type:"post",dataType:"json",data:t,xhrFields:{withCredentials:!0},success:function(t){200==t.code?(e(),sessionStorage.removeItem("usename"),sessionStorage.removeItem("articleId"),o("感谢您的举报,我们会尽快审核!"),$(".ipt-textarea").val(""),$(".box-botoom ul li").removeClass("box-active"),$(".box-content-bottom ul li").removeClass("box-active"),$(".box-content").eq(0).show().siblings().hide(),$("#cllcont").hide(),$(".content-input").val(""),flag=!1,i="",a="",u="",e()):o("举报失败")}})}),$("div.comment-box").on("click","a.btn-report",function(){p=$(this).parents("li.comment-line-box").data("commentid")}),window.showReport=t}),$(function(){}),$(function(){function t(){$("code.has-numbering").each(function(t,e){$(e).css("position","absolute"),$(e).parent("pre.prettyprint").css({position:"relative",height:$(e).outerHeight()+20+"px"})})}window.csdn=window.csdn?window.csdn:{},window.csdn.setSafariCodestyle=t}),$(function(){0==$(".btn-readmore").length&&($("#content_views").find("pre").each(function(t,e){e=$(e),e.find("code").height()>340?(e.addClass("set-code-hide"),e.append('')):e.addClass("set-code-show")}),$(window).resize().scroll(),$(document).on("click",".hide-preCode-bt",function(){return $(this).parents("pre").removeClass("set-code-hide").addClass("set-code-show"),$(this).parents(".hide-preCode-box").hide().remove(),$(window).resize().scroll(),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({spm:"1001.2101.3001.7365"}),!1}))}),$(function(){}),window.csdn.insertcallbackBlock=computePos,$(function(){function t(){var t="Black"===skinStatus?"-dark":"",o=blogStaticHost+"dist/pc/img/sideSearch.png";o="exp"!==sideToolbarResult?o:blogStaticHost+"dist/pc/img/toolbar/search"+t+".png";var n=document.referrer;if(n&&n.indexOf("so.csdn.net")>-1){var i='
搜索 ';$(".csdn-side-toolbar").prepend(i);var a=' '+c+'否是 ';if($(".csdn-side-toolbar .search").append(a),!getCookie("referrer_search")){var s=0;timer=setInterval(function(){s++,3==s&&$(".side-search-box").fadeIn(1500),7==s&&($(".side-search-box").fadeOut(1500),clearInterval(timer))},1e3),e("referrer_search",(new Date).getTime(),2)}$(".csdn-side-toolbar .search").on("click",function(t){getCookie("referrer_search")||clearInterval(timer),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({spm:"1001.2101.3001.5543",dest:articleDetailUrl,extend1:c}),$(".side-search-box").fadeIn(500),setTimeout(function(){$(".side-search-box").fadeOut(1500)},1e4)}),$(".side-search-box .search-bt").on("click",function(t){getCookie("referrer_search")||clearInterval(timer);var e="";e="yes"===$(t.target).data("type")?"yes":"no",window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&(window.csdn.report.reportClick({spm:"1001.2101.3001.5543",dest:articleDetailUrl,extend1:c,ab:e}),t.stopPropagation()),$(".side-search-box .side-search-content").html("感谢您的反馈!").css({width:"92px"}),setTimeout(function(){$(".csdn-side-toolbar .search").fadeOut(800,function(){$(this).remove()})},1e3)})}}function e(t,e,o){var n=new Date;n.setTime(n.getTime()+36e5*o),document.cookie=t+"="+escape(e)+";expires="+n.toGMTString()+";domain=.csdn.net;path=/"}function o(t,e){r&&t>.5*e&&$(".csdn-side-toolbar .side-question-box").length>0&&(getCookie("blog_ask_question")||($(".csdn-side-toolbar .side-question-box").fadeIn(),d&&(window.csdn.report&&"function"==typeof window.csdn.report.reportView&&window.csdn.report.reportView({spm:"1001.2101.3001.6041"}),d=!1)))}function n(){if(isShowConcision){var t=' 
显示侧栏 ',e=' 
隐藏侧栏 ';$(".csdn-side-toolbar").prepend(t+e)}}function i(){var t="Black"===skinStatus?"-dark":"";if(isShowConcision){var e='
显示侧栏 ',o='
隐藏侧栏 ';$(".csdn-side-toolbar").prepend(e+o)}}function a(){p=setInterval(function(){if(window.csdn&&window.csdn.toolbarData&&window.csdn.toolbarData.topicData&&(clearInterval(p),window.csdn.toolbarData.topicData.length>0)){var t=blogStaticHost+"dist/pc/img/"+("Black"!==skinStatus?"btnGuideSide1":"btnGuideSide2")+".gif",e='href="https://mp.csdn.net/mp_blog/manage/creative"',o="3001.9732",n='\n \n
\n \n \n 点我去创作中心查看更多活动~\n \n ';$(".csdn-side-toolbar").prepend(n),window.csdn.report.viewCheck(),setTimeout(function(){$(".sidetool-writeguide-box .tip-box").remove()},5e3)}window.csdn&&window.csdn.toolbarData&&window.csdn.toolbarData.remunerationData&&$("#remuneration").length>0&&($("#remuneration img").attr("src",window.csdn.toolbarData.remunerationData.mphome),$("#remuneration").attr("href",window.csdn.toolbarData.remunerationData.url),$("#remuneration").show(),window.csdn&&window.csdn.report&&window.csdn.report.reportView({spm:"1001.2101.3001.9809"}))},500)}function s(){p=setInterval(function(){window.csdn&&window.csdn.toolbarData&&window.csdn.toolbarData.remunerationData&&$("#remuneration").length>0&&(clearInterval(p),$("#remuneration img").attr("src",window.csdn.toolbarData.remunerationData.mphome),$("#remuneration").attr("href",window.csdn.toolbarData.remunerationData.url),$("#remuneration").show(),window.csdn&&window.csdn.report&&window.csdn.report.reportView({spm:"1001.2101.3001.9809"}))},500)}window.getSideToolbarTime=setInterval(function(){$(".csdn-side-toolbar").length>0&&(clearInterval(getSideToolbarTime),t(),"exp"!==sideToolbarResult?(a(),n()):(i(),s()))},1e3);var c="此内容解决你搜索的问题?";"control"===showSearchText&&(c="此内容是您要找的内容?"),"secondText"===showSearchText&&(c="此内容解决你搜索的问题?");var r=!0,l=!0,d=!0,m=document.documentElement.clientHeight;window.onscroll=function(){var t=document.documentElement.scrollTop||document.body.scrollTop;o(t,m)},$(document).on("click",".csdn-side-toolbar .fade-question-box",function(){$(".csdn-side-toolbar .side-question-box").fadeOut(),e("blog_ask_question",(new Date).getTime(),72),r=!1}),$(document).on("mouseenter",".csdn-side-toolbar .question",function(t){$(".csdn-side-toolbar .side-question-box").fadeIn(),$(t.target).hasClass("ask_question_img")&&l&&"block"==$(".csdn-side-toolbar .side-question-box").css("display")&&(window.csdn.report&&"function"==typeof window.csdn.report.reportView&&window.csdn.report.reportView({spm:"1001.2101.3001.6041"}),l=!1)}),$(document).on("mouseleave",".csdn-side-toolbar .question",function(t){l=!0}),$(document).on("click",".csdn-side-toolbar .question",function(t){window.open("https://ask.csdn.net/new?spm=1001.2101.3001.6040")}),$(document).on("click",".csdn-side-toolbar .side-question-box",function(t){t.stopPropagation()}),$(document).on("click",".csdn-side-toolbar .sidecolumn",function(t){var e=$(this).data("type");"show"==e?(isShowDirectoryModel||($("#rightAsideConcision").removeClass("show-directory"),$(".directory.directory-hide").hide(),$(".directory.directory-show").show()),$("#mainBox").removeAttr("style"),isShowSideModel=!1,$(".main_father").removeClass("mainfather-concision"),$(".main_father .container").removeClass("container-concision"),$(".sidecolumn.sidecolumn-show").hide(),$(".sidecolumn.sidecolumn-hide").show(),setCookieBaseHour("blog_details_concision",(new Date).getTime(),24)):(isShowDirectoryModel?$("#mainBox").css("margin-right","0"):($("#rightAsideConcision").addClass("show-directory"),$(".directory.directory-hide").show(),$(".directory.directory-show").hide(),$("#mainBox").removeAttr("style")),$(".main_father").addClass("mainfather-concision"),$(".main_father .container").addClass("container-concision"),isShowSideModel=!0,$(".sidecolumn.sidecolumn-hide").hide(),$(".sidecolumn.sidecolumn-show").show(),setCookieBaseHour("blog_details_concision",0,24)),window.csdn.fixedSidebar.stopListener=!$(".main_father").hasClass("mainfather-concision")}),$(document).on("click",".csdn-side-toolbar .directory",function(t){var e=$(this).data("type");"show"==e?(isShowSideModel||($("#rightAsideConcision").addClass("show-directory"),$(".main_father").addClass("mainfather-concision"),$(".main_father .container").addClass("container-concision"),$(".sidecolumn.sidecolumn-hide").hide(),$(".sidecolumn.sidecolumn-show").show()),$("#mainBox").removeAttr("style"),isShowDirectoryModel=!1,$(".directory.directory-show").hide(),$(".directory.directory-hide").show(),$("#rightAsideConcision").addClass("show-directory")):(isShowDirectoryModel=!0,$("#mainBox").css("margin-right","0"),$(".directory.directory-hide").hide(),$(".directory.directory-show").show(),$("#rightAsideConcision").removeClass("show-directory")),window.csdn.fixedSidebar.stopListener=!$(".main_father").hasClass("mainfather-concision"),setCookieBaseHour("blog_details_concision",0,24)});var p});var getRecommendListUrlArr=null;$("#recommend-item-box-tow").children().length<=0&&$("#recommend-item-box-tow").remove(),baiduKey?csdn.afterCasInit=function(t,e){if(!t)return!1;var o="";4==articleSource&&$("#recommendDown .recommend_down").length<=0?csdn.baiduSearch(t,function(e){if(needInsertBaidu&&isRecommendModule)if(e&&e.length)showDownRecommend(e[0]);else{var n=$(".recommend-box .type_download")[0];if(n&&$(n).length){var i=$(n).find("a")[0],a={linkUrl:$(n).data("url"),title:$(i).text()};showDownRecommend(a)}}csdn.baiduSearch(t,function(t){needInsertBaidu&&isRecommendModule?(showResult(t,o),getQueryIdx(),reportTop10()):(getQueryIdx(),reportTop10())})},"download.csdn.net"):csdn.baiduSearch(t,function(t){needInsertBaidu&&isRecommendModule?(showResult(t,o),getQueryIdx(),reportTop10()):(getQueryIdx(),reportTop10())})}:(getQueryIdx(),reportTop10());var articleTitleContent=$("#articleContentId").text().replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、"]/g,"").replace(/\s/g,"").toLowerCase();$(function(){function t(){var t=$("#toolBarBox").offset().top,e=$("#toolBarBox").offset().left,o=$(".left-toolbox").height(),n=$("#toolBarBox").width(),i=window.innerHeight,a=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;t+o-i-a>0?($("#toolBarBox .left-toolbox").css({position:"fixed","z-index":"999",left:e+"px",bottom:"0",width:n+"px"}),$("#toolBarBox").addClass("more-toolbox-active")):($("#toolBarBox .left-toolbox").css({position:"relative","z-index":"999",left:"0px",bottom:"0",width:n+"px"}),$("#toolBarBox").removeClass("more-toolbox-active"))}function e(){var t=$("#toolBarBox").offset().top,e=$("#toolBarBox").offset().left,o=$(".left-toolbox").height(),n=$("#toolBarBox").width()-50,i=window.innerHeight,a=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;t+o-i-a>0?($("#toolBarBox .gitcode-guide-box").css({position:"fixed","z-index":"999",left:e+"px",bottom:"64px",width:n+"px"}),$("#toolBarBox").addClass("more-toolbox-active")):($("#toolBarBox .gitcode-guide-box").css({position:"relative","z-index":"999",left:"0px",bottom:"0",width:n+"px"}),$("#toolBarBox").removeClass("more-toolbox-active"))}function o(t,e){if(T.skinBoxshadow.html(""),t){var o=' '+e+" ";T.skinBoxshadow.append(o)}else{var n=' '+e+" ";T.skinBoxshadow.append(n)}T.skinBoxshadow.fadeIn(200),setTimeout(function(){T.skinBoxshadow.fadeOut(200),T.skinBoxshadow.html("")},1500)}function n(t,e){e?t.addClass("active"):t.removeClass("active")}function i(t){getCookie("UserName")?$.ajax({url:blogUrl+"/phoenix/web/v1/article/like",type:"post",dataType:"json",data:{articleId:articleId},xhrFields:{withCredentials:!0},success:function(e){if(200==e.code){if(e.data.status)$("#is-like-img").hide(),$("#is-like-img-new").hide(),$("#is-like-imgactive").show(),$("#is-like-imgactive-new").show(),isLikeStatus=!0,isUnLikeStatus&&t&&a(!1),n($("#spanCount"),!0),$("#spanCount")[0].style="color:#fc5531 !important;",window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1582594662_001",spm:"1001.2101.3001.4241",dest:"",extend1:'{"praise":1}'});else{$("#is-like-imgactive").hide(),$("#is-like-imgactive-new").hide(),$("#is-like-img").show(),$("#is-like-img-new").show(),isLikeStatus=!1,t&&a(!1),n($("#spanCount"),!1);var i="color:#999999 !important;";"Black"===skinStatus&&(i="color:#ccccd8 !important;"),$("#spanCount")[0].style=i,window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1582594662_001",spm:"1001.2101.3001.4241",dest:"",extend1:'{"praise":0}'})}$("#spanCount").text(e.data.like_num>0?e.data.like_num:""),$("#blog-digg-num").text(e.data.like_num>0?"点赞数"+actionNumberFormat(e.data.like_num):"点赞数0")}else o(!1,e.message);k()}}):window.csdn.loginBox.show({spm:"1001.2101.3001.8604"})}function a(t){getCookie("UserName")?$.ajax({url:blogUrl+"/phoenix/web/v1/article/bury",type:"post",dataType:"json",data:{articleId:articleId},xhrFields:{withCredentials:!0},success:function(e){200==e.code?e.data.status?($("#is-unlike-img").hide(),$("#is-unlike-imgactive").show(),isUnLikeStatus=!0,isLikeStatus&&t&&i(!1),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({spm:"1001.2101.3001.6669",extend1:'{"praise":1}'})):($("#is-unlike-imgactive").hide(),$("#is-unlike-img").show(),isUnLikeStatus=!1,t&&i(!1),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({spm:"1001.2101.3001.6669",extend1:'{"praise":0}'})):o(!1,e.message)}}):window.csdn.loginBox.show({spm:"1001.2101.3001.8605"})}function s(){window.csdn.loginBox.key({biz:"blog",subBiz:"other_service",cb:function(){$.ajax({url:blogUrl+"/phoenix/web/v1/collect",dataType:"json",type:"POST",xhrFields:{withCredentials:!0},data:{articleId:articleId},success:function(t){200===t.code&&c(t.data.status)},error:function(){}})}})}function c(t,e){var o=1*$("#get-collection").attr("data-num");if(t){if($("#is-collection-imgactive").show(),$("#is-collection-img").hide(),n($("#get-collection"),!0),$("#blog_detail_zk_collection .un-collect-status").hide(),$("#blog_detail_zk_collection .collect-status").show(),I){if(I=!1,e)return;o?($(".get-collection").text(actionNumberFormat(o+1)),$("#get-collection").text(o+1),$("#get-collection").attr("data-num",o+1)):$(".get-collection").text("1")}}else{if($("#is-collection-imgactive").hide(),$("#is-collection-img").show(),n($("#get-collection"),!1),"White"==skinStatus?$(".get-collection").css({color:"#999aaa"}):$(".get-collection").css({color:"#999999"}),$("#blog_detail_zk_collection .un-collect-status").show(),$("#blog_detail_zk_collection .collect-status").hide(),I=!0,e)return;o?1*o-1<=0?($(".get-collection").text(""),$("#get-collection").attr("data-num",0)):($(".get-collection").text(actionNumberFormat(o-1)),$("#get-collection").text(o-1),$("#get-collection").attr("data-num",o-1)):$(".get-collection").text("")}k()}function r(){getCookie("UserName")&&$.ajax({url:blogUrl+"phoenix/web/v1/isCollect",type:"GET",xhrFields:{withCredentials:!0},data:{articleId:articleId},success:function(t){200===t.code&&c(t.data.status,!0),k()}})}function l(t,e,o){o.length&&$.ajax({type:"GET",url:blogUrl+t,dataType:"json",xhrFields:{withCredentials:!0},data:{articleId:articleId},success:function(t){200==t.code&&e(t.data,o)},error:function(t){}})}function d(t,e){var o="";if(t.list&&t.list.length){if(o='",o+=''+(t.total>10?"等":"")+''+t.total+"人已打赏",e.html(o),T.rewardContent.show(),T.initHeighgt=50,p())var n=422;else var n=480;$(".tool-item-reward .count").html(t.total),T.rewardNew.css({"max-height":n+T.initHeighgt+"px"})}else T.rewardContent.hide(),T.initHeighgt=0}function m(t,e){Number(t)-Number(e)<0?T.sureBoxBlance.addClass("active"):T.sureBoxBlance.removeClass("active")}function p(){var t=0;return T.payType.each(function(e,o){if($(o).hasClass("active"))return void(t=e)}),"blance"===T.payType.eq(t).data("type")}function u(t){T.sureBoxBlance.find(".tip").removeAttr("style",""),t.value||(t.value=2),T.moneyNum=t.value,m(T.blance,T.moneyNum),T.codeNum.html("¥"+T.moneyNum),0请在手机端操作",T.codeImgBox.html('
'+imgtext+"")}function g(t){showToast({text:t.errorMessage,bottom:"10%",zindex:9002,speed:500,time:1500})}function v(){T.codeImgBox.html(T.repeatAgain)}function w(t,e){var o=qrcode(6,"M");o.addData(t),o.make(),e.html(o.createImgTag(3,3))}function b(t,e){w(e.pay_url,T.codeImgBox)}function x(){T.rewardNew.fadeOut(),T.skinBoxshadow.html("");var t='
';T.skinBoxshadow.append(t),setTimeout(function(){l(T.ajaxRewardUrl,d,T.rewardContent),T.skinBoxshadow.fadeOut(200),T.skinBoxshadow.html("")},4e3)}function y(t){if(getCookie("UserName")){var e=$(".tool-attend");e.is(".tool-unbt-attend")?(e.removeClass("tool-unbt-attend").addClass("tool-bt-attend").text("关注"),N&&(window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1592215036_002",spm:"1001.2101.3001.4132",extend1:"已关注"}),N=!1)):(e.removeClass("tool-bt-attend").addClass("tool-unbt-attend").text("已关注"),N&&(window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1592215036_002",spm:"1001.2101.3001.4132",extend1:"关注"}),N=!1))}else window.csdn.loginBox.show({spm:"1001.2101.3001.8606"});k()}function k(){if("block"===$("#is-like-imgactive").css("display")&&"block"===$("#is-collection-imgactive").css("display")&&$(".tool-unbt-attend").length>0){if($("#health-companies").length){$("#health-companies").removeClass("active");var t=$("#health-companies").attr("src");t.indexOf("Default")>-1?$("#health-companies").attr("src",t):$("#health-companies").attr("src",t.replace("Active","Default"))}}else if($("#health-companies").length){$("#health-companies").addClass("active");var t=$("#health-companies").attr("src");t.indexOf("Default")>-1?$("#health-companies").attr("src",t.replace("Default","Active")):$("#health-companies").attr("src",t)}}$(document).on("mouseover",".article-bar-top .time",function(){if($(".article-info-box .up-time").length){var t=$(this).offset().left,e=($(this).width(),$(this).parents().find(".article-bar-top").offset().left);$(".article-info-box .up-time").css({left:t-e-20}).show()}}),$(document).on("mouseout",".article-bar-top .time",function(){$(".article-info-box .up-time").length&&$(".article-info-box .up-time").hide()});var C=!0;$(document).on("click",".article-info-box .slide-toggle",function(){C?$(this).text("收起"):$(this).text("版权"),$(this).parents(".article-info-box").find(".slide-content-box").slideToggle(),C=!C});var S='{"mod":"1585297308_001","spm":"1001.2101.3001.6548","dest":"'+articleDetailUrl+'","extend1":"pc","ab":"new"}';if(canRead){var _=$("");$(".hide-article-box").length?$(document).on("click",".hide-article-box .btn-readmore",function(){$("#content_views").after(_)}):$("#content_views").after(_)}$("#blog_detail_zk_collection").click(function(){getCookie("UserName")?window.csdn.collectionBox.show(window.csdn.collectionBox.params):window.csdn.loginBox.show({spm:"1001.2101.3001.4130"})}),$("#tool-reward").on("click",function(){$("#reward").show()});var B=$("#tool-downloadpdf");B.length>0&&B.on("click",function(){setTimeout(function(){$(".blog-content-box").print()},500)}),$(".is-like").on("click",function(){isUnLikeStatus?a(!0):i(!1)}),$("#is-unlike").on("click",function(){isLikeStatus?i(!0):a(!1)}),$("#getVipUrl").on("click",function(){if($(this).hasClass("unlogin"))window.csdn.loginBox.show({spm:"1001.2101.3001.4249"});else if(vipArticleAbStyle&&("control"===vipArticleAbStyle||"newStyle2"===vipArticleAbStyle)&&window.csdn&&window.csdn.userOrderTip)window.csdn.userOrderTip.show({product_id:1151,goods_id:2076,flag:6,learnNum:viewCountFormat,tags:["6"],report_ext:{spm:"1001.2101.3001.4249"}});else{var t=document.createElement("a");t.style.display="none",t.href="https://mall.csdn.net/vip?spm=1001.2101.3001.4249",t.target="_blank",document.body.appendChild(t),t.click(),document.body.removeChild(t)}}),$("#btn-readmore-zk").on("click",function(){$("#btn-readmore").show()}),$("#btn-no-login").on("click",function(){window.csdn.loginBox.show({spm:"1001.2101.3001.9442"})}),$("#btn-readmore").on("click",function(){var e=$(window).height();e*$(this).attr("height");$(".hide-article-box").show(),$("div.article_content")[0].style="height:2000px; overflow: hidden;",t(),$("#btn-readmore").hide(),$(".btn-readmore-gz")&&$(".btn-readmore-gz span").text("阅读全文")}),$(document).on("click",".is-collection > a.tool-item-href",function(){getCookie("UserName")?window.csdn.collectionBox.show(window.csdn.collectionBox.params):window.csdn.loginBox.show({spm:"1001.2101.3001.4130"})}),$(document).on("click",".btn-change-collect",function(){getCookie("UserName")?window.csdn.collectionBox.show(window.csdn.collectionBox.params):window.csdn.loginBox.show({spm:"1001.2101.3001.4130"})}),$(document).on("click",".tool-more .article-report",function(){getCookie("UserName")?showReportNew(!1,articleTitles):window.csdn.loginBox.show()}),t(),$(window).scroll(function(){t()}),$(window).resize(function(){t()}),window.hasOwnProperty("isGitCodeBlog")&&isGitCodeBlog&&(e(),$(window).scroll(function(){e()}),$(window).resize(function(){e()})),$(document).on("click",".csdn-side-toolbar .option-box",function(e){isShowConcision&&setTimeout(function(){t()},100)}),$(".btn-readmore").click(t);var I=!0;window.csdn.collectionBox.params={url:curentUrl,title:articleTitle,description:articleDesc,author:username,source_id:articleId,source:"blog",collectionCallBack:function(t){c(t)}},r();var T={blance:"",rewardBtNew:$("#rewardBtNew,#rewardBtNewHide"),rewardNew:$("#rewardNew"),rewardContent:$(".reward-box-new .reward-content"),skinBoxshadow:$(".skin-boxshadow"),rewardClose:$(".reward-popupbox-new .reward-close"),sureBoxBlance:$(".reward-popupbox-new .sure-box-blance"),moneyNum:1,payType:$(".reward-popupbox-new .pay-type"),domBlance:$(".reward-popupbox-new .pay-type-num"),rewardBt:$(".reward-popupbox-new .reward-sure"),chooseMoney:$(".reward-popupbox-new .choose-money"),customizeMoney:$(".reward-popupbox-new .customize-money"),customizeTip:$(".reward-popupbox-new .customize-tip"),isShowCode:$(".reward-popupbox-new .sure-box-money"),codeNum:$(".reward-popupbox-new .code-num"),codeImgBox:$(".reward-popupbox-new .code-img-box"),payrun:'
获取中',repeatAgain:'
点击重新获取',ajaxRewardUrl:"phoenix/web/v1/reward/article-users",initHeighgt:0};T.rewardBtNew.on({click:function(){getCookie("UserName")?getCookie("UserName")!==username?(l(T.ajaxRewardUrl,d,T.rewardContent),T.codeNum.html("¥"+T.moneyNum),T.sureBoxBlance.find(".tip").html(""),T.isShowCode.slideDown(500),T.sureBoxBlance.slideUp(500),T.rewardNew.animate({"max-height":480+T.initHeighgt+"px"},500),h(),T.skinBoxshadow.fadeIn(),T.rewardNew.fadeIn()):showToast({text:"自己不能打赏自己",bottom:"10%",zindex:9002,speed:500,time:1500}):window.csdn.loginBox.show({spm:"1001.2101.3001.4237"})}}),T.rewardClose.on("click",function(t){T.rewardNew.fadeOut(),T.skinBoxshadow.fadeOut();var e=t||window.e;e&&e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}),T.payType.click(function(){T.payType.removeClass("active"),$(this).addClass("active"),p()?(m(T.blance,T.moneyNum),T.isShowCode.slideUp(500),T.sureBoxBlance.slideDown(500,function(){T.sureBoxBlance.find(".tip").html('您的余额不足,请更换扫码支付或充值')}),T.rewardNew.animate({"max-height":422+T.initHeighgt+"px"},500)):(T.codeNum.html("¥"+T.moneyNum),T.sureBoxBlance.find(".tip").html(""),T.isShowCode.slideDown(500),T.sureBoxBlance.slideUp(500),T.rewardNew.animate({"max-height":480+T.initHeighgt+"px"},500),h())}),T.chooseMoney.click(function(){T.chooseMoney.removeClass("choosed"),T.customizeMoney.removeClass("active"),T.customizeMoney.attr("placeholder","自定义"),T.customizeMoney.val(""),$(this).addClass("choosed"),T.moneyNum=$(this).data("id"),T.codeNum.html("¥"+T.moneyNum),p()?m(T.blance,T.moneyNum):h()}),T.customizeMoney.on({focus:function(){T.chooseMoney.removeClass("choosed"),$(this).addClass("active"),$(this).attr("placeholder","1-500"),p()&&(T.sureBoxBlance.addClass("active"),T.sureBoxBlance.find(".tip").css({display:"none"}))},input:function(){$(this)[0].value=$(this)[0].value.replace(/^(0+)|[^\d]+/g,""),$(this)[0].value?($(this)[0].value>500&&($(this)[0].value=2,T.customizeTip.fadeIn(1e3,function(){T.customizeTip.fadeOut(1e3)})),m(T.blance,$(this)[0].value),T.sureBoxBlance.find(".tip").removeAttr("style","")):p()&&(T.sureBoxBlance.addClass("active"),T.sureBoxBlance.find(".tip").css({display:"none"}))},blur:function(){u($(this)[0])}}),T.customizeMoney.on("keydown",function(t){var e=t||event;13==e.which&&u($(this)[0])}),T.rewardBt.on("click",function(t){if(getCookie("UserName"))if(initRewardObject&&""!=initRewardObject.sign){if(!T.sureBoxBlance.hasClass("active")&&"none"!==T.sureBoxBlance.css("display")&&p&&00&&($(".tool-attend").trigger("click"),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1592215036_002",spm:"1001.2101.3001.4132",extend1:"关注"})),$("#is-like-imgactive-animation-like").show().addClass("active-animation"),$("#is-collection-img-collection").show().addClass("active-animation"),$(".tool-item-follow").show().addClass("active-animation"),setTimeout(function(){$("#is-like-imgactive-animation-like").hide().removeClass("active-animation"),$("#is-collection-img-collection").hide().removeClass("active-animation"),$(".tool-item-follow").hide().removeClass("active-animation")},800)):window.csdn.loginBox.show()});var F=!0;if($(".toolbox-list a.tool-item-href").on({mouseover:function(){if(F){var t=$(this).find("img.isdefault"),e=$(this).find("span.count");t.attr("src");"block"==t.css("display")?"White"==skinStatus?e.css({color:"#999999"}):e.css({color:"#999aaa"}):e.css({color:"#fc5531"}),F=!F}},mouseout:function(){if(!F){var t=$(this).find("img.isdefault"),e=$(this).find("span.count");t.attr("src");"block"==t.css("display")?"White"==skinStatus?e.css({color:"#999aaa"}):e.css({color:"#999999"}):e.css({color:"#fc5531"}),F=!F}}}),!getCookie("UserName")){var U=$("div.article_content"),P=U.offset().top,A=U.height(),j=document.body.clientHeight||document.documentElement.clientHeight,R=$(document).scrollTop(),D=!0;$(document).scroll(function(){R=$(document).scrollTop(),(R+j-P>A/2||R+j-P>2*j)&&D&&$(".tool-active-list").show()}),$("#tool-active-list-collection").on("click",function(){window.csdn.loginBox.show({spm:"1001.2101.3001.9443"})}),$("#tool-active-list-close").on("click",function(){$(".tool-active-list").hide(),D=!1})}if($(".annotation-boxshadow").length>0){window.addEventListener("message",function(t){t.data&&"blog-code"==t.data.type&&t.data.success&&($("#annotatio-num").text(t.data.unUseCount),t.data.unUseCount<=0&&($(".code-annotation").html(''),$(".code-annotation").addClass("active")),$(".i-ai-code-bottom").show(),window.csdn.report&&"function"==typeof window.csdn.report.reportView&&window.csdn.report.reportView({spm:"3001.10008"}))});var E=!1;$(".annotation-content").hover(function(){E=!0},function(){E=!1}),$(".annotation-boxshadow").on("click",function(t){E||($(this).hide(),$("#annotation-iframe")[0].contentWindow.postMessage({type:"blog-code-close"},"*"))}),$(document).on("click",".annotation-close",function(){$(".annotation-boxshadow").hide(),$("#annotation-iframe")[0].contentWindow.postMessage({type:"blog-code-close"},"*")})}var M="",L=$(".annotation-content").attr("data-num")||"0";$(document).on("click",".annotation-btn",function(){var t="3001.10008";L!=$(".annotation-content").attr("data-num")&&(M=""),L=$(".annotation-content").attr("data-num")||"0",$(this).find(".annotation-active").show(),$(this).find(".annotation-def").hide(),$(".annotation-btn").removeClass("active"),$(this).addClass("active"),"cai"==$(this).data("type")?(t="3001.10009",$(".annotation-zan .annotation-def").show(),$(".annotation-zan .annotation-active").hide()):($(".annotation-cai .annotation-def").show(),$(".annotation-cai .annotation-active").hide()),$(this).data("type")!=M&&window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({spm:t,extra:JSON.stringify({index:L})}),M=$(this).data("type")})}),$(function(){function t(){var t=new Date;t.setHours(23,59,59,999);var e=t.getTime();localStorage.setItem("trafficBubble_"+articleId,e)}window.csdn.report&&"function"==typeof window.csdn.report.reportView&&window.csdn.report.reportView({spm:"3001.10095"});var e=null,o=document.getElementById("is-traffic");if(o){var n=(new Date).getTime(),i=localStorage.getItem("trafficBubble_"+articleId);if(null===i||i&&parseInt(i)i/2||s+a-n>2*a)&&(window.csdn.loginBox.show({spm:"3001.9454"}),t("unlogin_scroll_step",(new Date).getTime()))})}}),"undefined"!=typeof document.addEventListener&&document.addEventListener("DOMContentLoaded",function(){return"undefined"==typeof Chart?void("undefined"!=typeof console&&console.log("ERROR: You must include chart.min.js on this page in order to use Chart.js")):void[].forEach.call(document.querySelectorAll("div.chartjs"),function(t){var e,o;e="undefined"!=typeof chartjs_colors?chartjs_colors:"undefined"!=typeof chartjs_colors_json?JSON.parse(chartjs_colors_json):{fillColor:"rgba(151,187,205,0.5)",strokeColor:"rgba(151,187,205,0.8)",highlightFill:"rgba(151,187,205,0.75)",highlightStroke:"rgba(151,187,205,1)",data:["#B33131","#B66F2D","#B6B330","#71B232","#33B22D","#31B272","#2DB5B5","#3172B6","#3232B6","#6E31B2","#B434AF","#B53071"]},o="undefined"!=typeof chartjs_config?chartjs_config:"undefined"!=typeof chartjs_config_json?JSON.parse(chartjs_config_json):{Bar:{animation:!1},Doughnut:{animateRotate:!1},Line:{animation:!1},Pie:{animateRotate:!1},PolarArea:{animateRotate:!1}};var n=t.getAttribute("data-chart"),i=JSON.parse(t.getAttribute("data-chart-value"));if(i&&i.length&&n){t.innerHTML="";var a=document.createElement("canvas");a.height=t.getAttribute("data-chart-height"),t.appendChild(a);var s=document.createElement("div");s.setAttribute("class","chartjs-legend"),t.appendChild(s);var c,r=a.getContext("2d"),l=new Chart(r);if("bar"!=n)for(c=0;c").addClass("pre-numbering").hide();$(this).addClass("has-numbering").parent().append(e);for(var o=1;o ").text(o));e.fadeIn(1700)}),$(".pre-numbering li").css("color","#999"),setTimeout(function(){$(".math").each(function(t,e){$(this).find("span").last().css("color","#fff")})}),setTimeout(function(){$(".toc a[target='_blank']").attr("target",""),$("a.reversefootnote,a.footnote").attr("target","")},500)},html_line:function(){function t(){$(".CopyToClipboard").each(function(){var t=new ZeroClipboard.Client;t.setHandCursor(!0),t.addEventListener("load",function(t){}),t.addEventListener("mouseOver",function(t){var e=t.movie.parentNode.parentNode.parentNode.parentNode.nextSibling.innerHTML;e=e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),t.setText(e)}),t.addEventListener("complete",function(t,e){alert("代码已经复制到你的剪贴板。")}),t.glue(this,this.parentNode)})}$(".article_content pre").each(function(){var t=$(this);try{if(t.attr("class").indexOf("brush:")!=-1){var e=t.attr("class").split(";")[0].split(":")[1];t.attr("name","code"),t.attr("class",e)}t.attr("class")&&t.attr("name","code")}catch(o){}}),$(".article_content textarea[name=code]").each(function(){var t=$(this);t.attr("class").indexOf(":")!=-1&&t.attr("class",t.attr("class").split(":")[0])}),$(".highlighter").each(function(t,e){hljs.highlightBlock(e),hljs.lineNumbersBlock(e)}),window.clipboardData||setTimeout(t,1e3)}},a=$(".markdown_views")[0];a?(i.markdown_line(),/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&window.csdn.setSafariCodestyle()):i.html_line(),$(document).on("click",".input-mod",function(){$(".select-option").show(),$(".select-button").removeClass("rotate0").addClass("rotate180")}),$(document).on("input porpertychange",".private-input",function(){n(),$(this).val().length>120&&$(this).val($(this).val().substr(0,120)),$(".textarea-box .number").text(120-$(this).val().length),$(this).val().length>0&&$(".private-form").removeClass("no-active").addClass("active")}),$(document).on("click",".select-option li",function(){$(".super-private").height(126),$(".private-content .other").hide(),n(),$(".select-active").text($(this).text()).data("index",$(this).data("index")),$(this).data("isinput")?($(".super-private").height(240),$(".private-content .other").show()):$(".private-form").removeClass("no-active").addClass("active"),$(".select-button").addClass("rotate0").removeClass("rotate180"),$(".select-option").fadeOut()}),$(document).on("click",".select-button",function(){"block"===$(".select-option").css("display")?($(".select-option").fadeOut(),$(this).removeClass("rotate180").addClass("rotate0")):($(this).removeClass("rotate0").addClass("rotate180"),$(".select-option").fadeIn()),e.stopPropagation(),e.cancelBubble=!0}),$(document).on("click",".private-close, .close-active",function(){$(".super-private").hide(),$(".mask-dark").hide()}),$(document).on("click",".private-footer .active",function(){var e=$(".select-active").data("index"),o=$(".reason").val();e||alert("请选择原因"),text="text",t(articleId,e,o)})}),$(function(){$("article").find("table").map(function(){$(this).wrap('')})}),$(function(){window.addEventListener("message",function(t){"https://inscode.csdn.net"===t.origin&&"needLogin"===t.data&&window.csdn.loginBox.show()})}),!function(){function t(){var t=navigator.userAgent.toLowerCase();return window.ActiveXObject||"ActiveXObject"in window?"ie":t.indexOf("firefox")>=0?"firefox":t.indexOf("chrome")>=0?"chrome":t.indexOf("opera")>=0?"opera":t.indexOf("safari")>=0?"safari":void 0}var e=function(t,e,o,n,i,a){function s(o,n,i){var r=(o+n)/2;if(i<=0||n-o=0?"win":t.indexOf("mac")>=0?"mac":"win"}function e(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function o(t){return"win"==t.system&&1!=t.zoom||("mac"==t.system&&t.zoom%1!=0&&t.zoom%2!=0||void 0)}function n(n){var i={win:{add:187,minus:189,origin:48},mac:{add:187,minus:189,origin:48}},a=i[t()];if(n.ctrlKey||n.metaKey)if(n.keyCode==a.add||n.keyCode==a.minus){var s={zoom:e(detectZoom(),2),system:t()};l(o(s),r,u)}else n.keyCode!=a.add&&n.keyCode!=a.origin||d.animate(m,2e3)}function i(t){setTimeout(n,300,t)}function a(t,e){return localStorage.setItem(t,e)}function s(t){return localStorage.getItem(t)}function c(t){var e=document.createElement("style");e.type="text/css",e.innerHTML=[".leftPop{width:330px;position: fixed;font-size: 12px;","box-shadow: 0 4px 8px 0 rgba(0,0,0,0.10);padding:16px 40px 16px 16px;z-index: 100;","}",".leftPop .leftPop-close{position: absolute;right: 20px;"+t,"cursor: pointer;","}"].join(""),document.getElementsByTagName("head")[0].appendChild(e)}function r(t){var e=$(".leftPop");if(e.length>0)return e.stop(!0,!1).animate(t.animate,t.animateTime),!1;var o='';e=$(''+o+""),c(t.closeColor),e.append(t.template).css(t.style),e.appendTo($("body")).delay(2e3).animate(t.animate,t.animateTime),d=e,$(".leftPop-close").on("click",function(){e.stop(!0,!1).animate(t.closeAnimate,t.animateTime),a("leftPop",0)})}function l(t,e,o){var n=s("leftPop");t&&null==n?e(o):d.stop(!0,!1).animate(o.closeAnimate,o.animateTime)}var d=({zoom:e(detectZoom(),2),system:t()},$("leftPop")),m={right:"-100%"},p={win:{even:"keyup",fun:n},mac:{even:"keydown",fun:i}};$(window).on(p[t()].even,p[t()].fun);var u={template:"你的浏览器目前处于缩放状态,页面可能会出现错位现象,建议100%大小显示。",style:{right:"-100%","background-color":"#EBF5FD",top:"100px","border-left":"4px solid #70B8F0"},closeColor:"fill:#70B8F0;",animate:{right:0},closeAnimate:m,animateTime:2e3}});