Python社区  »  Python

Python-Camelot:用三行代码提取 PDF 表格数据

算法爱好者 • 1 周前 • 49 次点击  

推荐关注↓

来源 : 机器之心
从 PDF 表格中获取数据是一项痛苦的工作。不久前,一位开发者提供了一个名为 Camelot 的工具,使用三行代码就能从 PDF 文件中提取表格数据。

PDF 文件是一种非常常用的文件格式,通常用于正式的电子版文件。它能够很好的将不同的排版格式固定下来,形成版面清晰且美观的展示效果。然而,对于想要从 PDF 中提取信息的人们来说,PDF 是个噩梦,尤其是表格。

大量的学术报告、论文、分析文章都使用 PDF 展示其中的表格数据,但是对于如果想要直接从表格中复制数据则会非常麻烦。不久前,有一位开发者提供了一个可从文字 PDF 中提取表格信息的工具——Camelot,能够直接将大部分表格转换为 Pandas 的 Dataframe。

  • 项目地址:https://github.com/camelot-dev/camelot

Camelot 是什么

据项目介绍称,Camelot 是一个 Python 工具,用于将 PDF 文件中的表格数据提取出来。

具体而言,用户可以像使用 Pandas 那样打开 PDF 文件,然后利用这个工具提取表格数据,最后再指定输出的形式(如 csv 文件)。

代码示例

项目提供的 PDF 文件如图所示,假设用户需要提取这些文字之间的表格 2-1 中的信息。

PDF 文件,我们需要提取表格 2-1

使用 Camelot 提取表格数据的代码如下:

>>> import camelot
>>> tables = camelot.read_pdf('foo.pdf'#类似于Pandas打开CSV文件的形式
>>> tables[0].df # get a pandas DataFrame!
>>> tables.export('foo.csv', f='csv', compress=True# json, excel, html, sqlite,可指定输出格式
>>> tables[0].to_csv('foo.csv'# to_json, to_excel, to_html, to_sqlite, 导出数据为文件
>>> tables
1>
>>> tables[0]
7, 7)> # 获得输出的格式
>>> tables[0].parsing_report
{
    'accuracy'99.02,
    'whitespace'12.24,
    'order'1,
    'page'1
}

以下为输出的结果,对于合并的单元格,Camelot 在抽取后做了空行处理,这是一个稳妥的方法。

安装方法

项目作者提供了三种安装方法。首先,你可以使用 Conda 进行安装,这是最简单的。

conda install -c conda-forge camelot-py

最流行的安装方法是使用 pip 安装。

pip install camelot-py[cv]

还可以从项目中克隆代码,并使用源码安装。

git clone https://www.github.com/camelot-dev/camelot
cd camelot
pip install ".[cv]"

- EOF -

推荐阅读  点击标题可跳转

1、女娲算法,杀疯了!

2、这才是中国被卡脖子最严重的软件!

3、从此明白了卷积神经网络(CNN)


觉得本文有帮助?请分享给更多人

推荐关注「算法爱好者」,修炼编程内功

点赞和在看就是最大的支持❤️

0) break; outerWidth += parseFloat(parent_style.paddingLeft) + parseFloat(parent_style.paddingRight) + parseFloat(parent_style.marginLeft) + parseFloat(parent_style.marginRight) + parseFloat(parent_style.borderLeftWidth) + parseFloat(parent_style.borderRightWidth); parent = parent.parentNode; } return parent_width; } var getOuterW=function(dom){ var style=getComputedStyle(dom), w=0; if(!!style){ w = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth); } return w; }; var getOuterH =function(dom){ var style=getComputedStyle(dom), h=0; if(!!style){ h = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth); } return h; }; var insertAfter = function(dom,afterDom){ var _p = afterDom.parentNode; if(!_p){ return; } if(_p.lastChild === afterDom){ _p.appendChild(dom); }else{ _p.insertBefore(dom,afterDom.nextSibling); } }; var getQuery = function(name,url){ var u = arguments[1] || window.location.search, reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"), r = u.substr(u.indexOf("\?")+1).match(reg); return r!=null?r[2]:""; }; function setImgSize(item, widthNum, widthUnit, ratio, breakParentWidth) { setTimeout(function () { var img_padding_border = getOuterW(item) || 0; var img_padding_border_top_bottom = getOuterH(item) || 0; if (widthNum > getParentWidth(item) && !breakParentWidth) { widthNum = getParentWidth(item); } height = (widthNum - img_padding_border) * ratio + img_padding_border_top_bottom; if (isIE || '0' === '1' || '' === '1') { var url = item.getAttribute('data-src'); item.src = url; } else { if(parseFloat(widthNum, 10) > 40 && height > 40 && breakParentWidth) { item.className += ' img_loading'; } item.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="; } widthNum !== 'auto' && (item.style.cssText += ";width: " + widthNum + widthUnit + " !important;"); widthNum !== 'auto' && (item.style.cssText += ";height: " + height + widthUnit + " !important;"); }, 10); } (function(){ var images = document.getElementsByTagName('img'); var length = images.length; var max_width = getMaxWith(); for (var i = 0; i < length; ++i) { if (window.__second_open__ && images[i].getAttribute('__sec_open_place_holder__')) { continue; } var imageItem = images[i]; var src_ = imageItem.getAttribute('data-src'); var realSrc = imageItem.getAttribute('src'); if (!src_ || realSrc) continue; var originWidth = imageItem.getAttribute('data-w'); var ratio_ = 1 * imageItem.getAttribute('data-ratio'); var height = 100; if (ratio_ && ratio_ > 0) { var parent_width = getParentWidth(imageItem) || max_width; var initWidth = imageItem.style.width || imageItem.getAttribute('width') || originWidth || parent_width; initWidth = parseFloat(initWidth, 10) > max_width ? max_width : initWidth; if (initWidth) { imageItem.setAttribute('_width', !isNaN(initWidth * 1) ? initWidth + 'px' : initWidth); } if (typeof initWidth === 'string' && initWidth.indexOf('%') !== -1) { initWidth = parseFloat(initWidth.replace('%', ''), 10) / 100 * parent_width; } if (initWidth === 'auto') { initWidth = originWidth; } var widthNum; var widthUnit; if (initWidth === 'auto') { widthNum = 'auto'; } else { var res = /^(\d+(?:\.\d+)?)([a-zA-Z%]+)?$/.exec(initWidth); widthNum = res && res.length >= 2 ? res[1] : 0; widthUnit = res && res.length >= 3 && res[2] ? res[2] : 'px'; } setImgSize(imageItem, widthNum, widthUnit, ratio_, true); (function (item, widthNumber, unit, ratio) { setTimeout(function () { setImgSize(item, widthNumber, unit, ratio, false); }); })(imageItem, widthNum, widthUnit, ratio_); } else { imageItem.style.cssText += ";visibility: hidden !important;"; } } })(); window.__videoDefaultRatio=16/9; window.__getVideoWh = function(dom){ var max_width = getMaxWith(), width = max_width, ratio_ = dom.getAttribute('data-ratio')*1, arr = [4/3, 16/9], ret = arr[0], abs = Math.abs(ret - ratio_); if (!ratio_) { if (dom.getAttribute("data-mpvid")) { ratio_ = 16/9; } else { ratio_ = 4/3; } } else { for (var j = 1, jl = arr.length; j < jl; j++) { var _abs = Math.abs(arr[j] - ratio_); if (_abs < abs) { abs = _abs; ret = arr[j]; } } ratio_ = ret; } var parent_width = getParentWidth(dom)||max_width, width = width > parent_width ? parent_width : width, outerW = getOuterW(dom)||0, outerH = getOuterH(dom)||0, videoW = width - outerW, videoH = videoW/ratio_, speedDotH = 12, height = videoH + outerH + speedDotH; return {w:Math.ceil(width),h:Math.ceil(height),vh:videoH,vw:videoW,ratio:ratio_,sdh: speedDotH}; }; (function(){ var iframe = document.getElementsByTagName('iframe'); for (var i=0,il=iframe.length;i= 200 && xhr.status < 400 ){ obj.success && obj.success(xhr.responseText); } else { obj.error && obj.error(xhr); } obj.complete && obj.complete(); obj.complete = null; } }; xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); xhr.send(data); } var mid = "2650579394" || ""|| ""; var biz = "MzI1MTIzMzI2MA=="||""; var sessionid = ""||"svr_88691017783"; var idx = "2"; (function sendReq(parentNode, copyIframe, index, vid) { ajax({ url: '/mp/videoplayer?vid=' + vid + '&mid=' + mid + '&idx=1&__biz=' + biz + '&sessionid=' + sessionid + '&f=json', type: "GET", dataType: 'json', success: function (json) { var ret = JSON.parse(json || '{}'); var ori = ret.ori_status; var hit_biz_headimg = ret.hit_biz_headimg + '/64'; var hit_nickname = ret.hit_nickname; var hit_username = ret.hit_username; var selfUserName = "gh_3f90502d79bf"; if (ori === 2 && selfUserName !== hit_username) { var videoBar = document.createElement('div'); var videoBarHtml = ''; videoBar.innerHTML = videoBarHtml; var spanContainer = document.getElementById('js_mp_video_container_' + index); if (spanContainer) { spanContainer.parentNode.insertBefore(videoBar, spanContainer); } else { parentNode.insertBefore(videoBar, copyIframe); } var avatorEle = document.getElementById(hit_biz_headimg + index); var avatorSrc = avatorEle.dataset.src; console.log('avatorSrc' + avatorSrc); if (ret.hit_biz_headimg) { avatorEle.style.backgroundImage = 'url(' + avatorSrc + ')'; } } }, error: function (xhr) { } }); })(a.parentNode, a, i, vid); a.style.cssText += ";width: " + obj.w + "px !important;"; a.setAttribute("width",obj.w); if(window.__zoom!=1){ a.style.display = "block"; videoPlaceHolderSpan.style.display = "none"; a.setAttribute("_ratio",obj.ratio); a.setAttribute("_vid",vid); }else{ videoPlaceHolderSpan.style.cssText += "height: " + obj.h + "px !important;"; mydiv.style.cssText += "height: " + obj.h + "px !important;"; a.style.cssText += "height: " + obj.h + "px !important;"; a.setAttribute("height",obj.h); } a.setAttribute("data-vh",obj.vh); a.setAttribute("data-vw",obj.vw); if(a.getAttribute("data-mpvid")){ a.setAttribute("data-src",location.protocol+"//mp.weixin.qq.com/mp/readtemplate?t=pages/video_player_tmpl&auto=0&vid="+vid); }else{ a.setAttribute("data-src",location.protocol+"//v.qq.com/iframe/player.html?vid="+ vid + "&width="+obj.vw+"&height="+obj.vh+"&auto=0"); } } })(); (function(){ if(window.__zoom!=1){ if (!window.__second_open__) { document.getElementById('page-content').style.zoom = window.__zoom; var a = document.getElementById('activity-name'); var b = document.getElementById('meta_content'); if(!!a){ a.style.zoom = 1/window.__zoom; } if(!!b){ b.style.zoom = 1/window.__zoom; } } var images = document.getElementsByTagName('img'); for (var i = 0,il=images.length;i=0 && child.getAttribute("data-vid")==vid){ child.style.cssText += "height: " + h + "px !important;"; child.style.display = ""; } } } } })(); })(); " },{ querySelector:"qqmusic", genId:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return(t.node.getAttribute("musicid")||"").replace(/^\s/,"").replace(/\s$/,"")+"_"+t.index; }, calW:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return 1*t.parentWidth; }, calH:function(){ return 88; }, replaceContentCssText:"", appendContentCssText:"margin:16px 0;diplay:block;", outerContainerLeft:"", outerContainerRight:"" },{ querySelector:"mpvoice", genId:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=decodeURIComponent(t.node.getAttribute("voice_encode_fileid")||"").replace(/^\s/,"").replace(/\s$/,""); return e+"_"+t.index; }, calW:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return 1*t.parentWidth; }, calH:function(){ return 122; }, replaceContentCssText:"", appendContentCssText:"margin:16px 0;diplay:block;", outerContainerLeft:"", outerContainerRight:"" },{ querySelector:"mppoi", genId:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return t.node.getAttribute("data-id")||""; }, calW:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return 1*t.parentWidth; }, calH:function(){ return 219; }, replaceContentCssText:"", appendContentCssText:"margin:16px 0;diplay:block;", outerContainerLeft:"", outerContainerRight:"" },{ querySelector:"mpsearch", genId:function(){ return decodeURIComponent("mpsearch"); }, calW:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return 1*t.parentWidth; }, calH:function(){ return 100; }, replaceContentCssText:"", appendContentCssText:"margin:16px 0;diplay:block;", outerContainerLeft:"", outerContainerRight:"" },{ querySelector:"mpvideosnap", genId:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.node.getAttribute("data-type")||"video"; return decodeURIComponent("live"===e?t.node.getAttribute("data-noticeid")||"":t.node.getAttribute("data-id")||""); }, calW:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.node.getAttribute("data-type")||"video"; return"live"===e||"topic"===e?t.parentWidth:.665*t.parentWidth; }, calH:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.node.getAttribute("data-desc")||"",n=t.node.getAttribute("data-type")||"video"; return"live"===n?113:"topic"===n?143:e?this.calW(t)+44+35+27:this.calW(t)+44+35; }, replaceContentCssText:"", appendContentCssText:"margin:16px auto;diplay:block;", outerContainerLeft:"", outerContainerRight:"" },{ querySelector:"mp-wxaproduct", genId:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return decodeURIComponent(t.node.getAttribute("data-wxaproduct-productid")||""); }, calW:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return 1*t.parentWidth; }, calH:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.node.getAttribute("data-wxaproduct-cardtype")||""; return"mini"===e?124:466; }, replaceContentCssText:"", appendContentCssText:"margin:16px 0;diplay:block;", outerContainerLeft:"", outerContainerRight:"" },{ querySelector:"mpprofile", genId:function(t){ return t.node.getAttribute("data-id")||""; }, calW:function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; return 1*t.parentWidth; }, calH:function(){ return 141; }, replaceContentCssText:"", appendContentCssText:"margin:28px 0 20px;diplay:block;", outerContainerLeft:"", outerContainerRight:"" }] }; t(e); }(function(){ var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]; if("function"==typeof document.querySelectorAll)for(var e={ maxWith:document.getElementById("img-content").getBoundingClientRect().width, idAttr:"data-preloadingid" },n=0,r=t.config.length;r>n;n++)for(var a=t.config[n],i=document.querySelectorAll(a.querySelector),o=0,u=i.length;u>o;o++){ var d=i[o],g=d.parentNode.getBoundingClientRect().width; g=Math.min(g,e.maxWith); var s=a.calW({ parentWidth:g, node:d }),c=a.calH({ parentWidth:g, node:d }),l=a.genId({ index:o, node:d }),p=t.defaultContentTpl.replace(/#height#/g,c).replace(/#width#/g,s),m=document.createElement("div"); if(m.innerHTML=p,a.replaceContentCssText){ var h=a.replaceContentCssText.replace(/#height#/g,c).replace(/#width#/g,s); m.firstChild.style.cssText=h; }else a.appendContentCssText&&(m.firstChild.style.cssText+=a.appendContentCssText); var C=a.outerContainerLeft+m.innerHTML+a.outerContainerRight; m.innerHTML=C,m.firstChild.setAttribute(e.idAttr,l),d.parentNode.insertBefore(m.firstChild,d.nextSibling); } }); ') .replace(/"/g, '"') .replace(/&/g, '&') .replace(/ /g, ' '); } var uin = ''; var key = ''; var pass_ticket = ''; var new_appmsg = 1; var item_show_type = "0"; var real_item_show_type = "0"; var can_see_complaint = "0"; var not_in_mm_css = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/not_in_mm55871f.css"; var article_improve_combo_css = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/combo5acc2a.css"; var tid = ""; var aid = ""; var clientversion = ""; var appuin = "MzI1MTIzMzI2MA=="||""; var voiceid = ""; var source = ""; var ascene = ""; var subscene = ""; var sessionid = ""||"svr_88691017783"; var abtest_cookie = ""; var scene = 75; var itemidx = ""; var appmsg_token = ""; var _copyright_stat = "0"; var _ori_article_type = ""; var is_follow = ""; var nickname = "算法爱好者"; var appmsg_type = "9"; var ct = "1641701100"; var user_name = "gh_3f90502d79bf"; var fakeid = ""; var version = ""; var is_limit_user = "0"; var round_head_img = "http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_png/QtPIxk7nOVeJWFaicUDrq2RhPE6p4Faq7XHibsSTRkzIvIJVBibAbHFaQupL8dAsC2qf6vVJvhX0Zyy0tCFOohf7g/0?wx_fmt=png"; var hd_head_img = "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7fziapk451lmjEDJgoblickSVagicuSrhcblUOJhC555ZzA/0"||""; var ori_head_img_url = "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7fziapk451lmjEDJgoblickSVagicuSrhcblUOJhC555ZzA/132"; var msg_title = 'Python-Camelot:用三行代码提取 PDF 表格数据'.html(false); var msg_desc = htmlDecode(""); var msg_cdn_url = "http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_jpg/QtPIxk7nOVfHIQAuurevgAMs6Y1eSibUI2E5OEwlHppzGg7tZsbibuuuUmUcZlE4yxibUCpm1Hib2xTwAtcf0icywEg/0?wx_fmt=jpeg"; var cdn_url_1_1 = "http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_jpg/QtPIxk7nOVfHIQAuurevgAMs6Y1eSibUI2E5OEwlHppzGg7tZsbibuuuUmUcZlE4yxibUCpm1Hib2xTwAtcf0icywEg/0?wx_fmt=jpeg"; var cdn_url_235_1 = "http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_jpg/QtPIxk7nOVfHIQAuurevgAMs6Y1eSibUIsZOYCLXAlOdt6L40q2TD5yuZDg6Qw4CQImnXb6jybgNelOB3etGHZA/0?wx_fmt=jpeg"; var msg_link = "http://mp.weixin.qq.com/s?__biz=MzI1MTIzMzI2MA==&mid=2650579394&idx=2&sn=fc153ed955638eb6be1fc1b3792b8b98&chksm=f1fe1741c6899e57736ec795384b577bf8f86dedca47920af3aa5ac422abcef115ab6a892b2f#rd"; var user_uin = ""*1; var msg_source_url = ''; var img_format = 'jpeg'; var srcid = ''; var req_id = '0912faZiWfcGJMSzdJk6YG0c'; var networkType; var appmsgid = "" || '' || '2650579394'; var comment_id = "2214984716569640967" || "2214984716569640967" * 1; var comment_enabled = "" * 1; var is_https_res = ("" * 1) && (location.protocol == "https:"); var msg_daily_idx = "1" || ""; var profileReportInfo = "" || ""; var devicetype = ""; var source_encode_biz = ""; var source_username = ""; var reprint_ticket = ""; var source_mid = ""; var source_idx = ""; var source_biz = ""; var author_id = ""; var optimizing_flag = "0" * 1; var show_comment = ""; var __appmsgCgiData = { wxa_product : ""*1, wxa_cps : ""*1, show_msg_voice: "0"*1, can_use_page : ""*1, is_wxg_stuff_uin : "0"*1, card_pos : "", copyright_stat : "0", source_biz : "", hd_head_img : "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7fziapk451lmjEDJgoblickSVagicuSrhcblUOJhC555ZzA/0"||(window.location.protocol+"//"+window.location.host + "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/appmsg/pic_rumor_link.2x55871f.jpg"), has_red_packet_cover: "0" * 1 || 0, minishopCardData: "" }; var _empty_v = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/pages/voice/empty55871f.mp3"; var appmsg_album_info = (function () { var curAlbumId = ''; var publicTagInfo = [ ]; for (var i = 0; i < publicTagInfo.length; i++) { if (curAlbumId) { if (curAlbumId === publicTagInfo[i].id) { return publicTagInfo[i]; } } else { if (publicTagInfo[i].continousReadOn) { return publicTagInfo[i]; } } } return {}; })(); var copyright_stat = "0" * 1; var hideSource = "" * 1; var pay_fee = "" * 1; var pay_timestamp = ""; var need_pay = "" * 1; var need_report_cost = "0" * 1; var use_tx_video_player = "0" * 1; var appmsg_fe_filter = "contenteditable"; var friend_read_source = "" || ""; var friend_read_version = "" || ""; var friend_read_class_id = "" || ""; var is_only_read = "1" * 1; var read_num = "" * 1; var like_num = "" * 1; var liked = "" == 'true' ? true : false; var is_temp_url = "" ? 1 : 0; var send_time = ""; var icon_emotion_switch = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch55871f.svg"; var icon_emotion_switch_active = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_active55871f.svg"; var icon_emotion_switch_primary = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_primary55871f.svg"; var icon_emotion_switch_active_primary = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_active_primary55871f.svg"; var icon_loading_white = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white55871f.gif"; var icon_audio_unread = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/audio/icon_audio_unread55871f.png"; var icon_qqmusic_default = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/qqmusic/icon_qqmusic_default.2x55871f.png"; var icon_qqmusic_source = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/qqmusic/icon_qqmusic_source55871f.svg"; var icon_kugou_source = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/kugou/icon_kugou_source55871f.png"; var topic_default_img = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/topic/pic_book_thumb.2x55871f.png'; var comment_edit_icon = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg_new/icon_edit55871f.png'; var comment_loading_img = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white55871f.gif'; var comment_c2c_not_support_img = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/appmsg/pic_discuss_more55871f.png'; var voice_in_appmsg = { "1":"1" }; var voiceList={}; voiceList={"voice_in_appmsg":[]} var reprint_style = ''*1; var wxa_img_alert = "" != 'false'; var more_read_type = '0'*1; var weapp_sn_arr_json = "" || ""; var video_snap_json = "" || ""; var mp_profile = [ { fakeid: 'MzAxMDM0MzQ4Mg==', nickname: '开源前哨', alias: 'osfront', round_head_img: 'http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_png/DSU8cv1j3ibStMRcibJLd4TkNlt53KNZj0A2IicORH4REC4ics87icsx703M5giby2wuofz3dicMsHVcXDMXTM6t6VBQw/0?wx_fmt=png', signature: '点击获取10万+ star的开发资源库。 日常分享热门、有趣和实用的开源项目~', original_num: '144' * 1, is_biz_ban: '0' * 1, username: 'gh_ea867a042ca6' } , { fakeid: 'MzI1MTIzMzI2MA==', nickname: '算法爱好者', alias: 'AlgorithmFans', round_head_img: 'http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_png/QtPIxk7nOVeJWFaicUDrq2RhPE6p4Faq7XHibsSTRkzIvIJVBibAbHFaQupL8dAsC2qf6vVJvhX0Zyy0tCFOohf7g/0?wx_fmt=png', signature: '算法是程序员的内功!「算法爱好者」专注分享算法相关文章、工具资源和算法题,帮程序员修炼内功。', original_num: '26' * 1, is_biz_ban: '0' * 1, username: 'gh_3f90502d79bf' } ] var ban_scene = "0" * 1; var svr_time = "1641701337" * 1; var is_transfer_msg = ""*1||0; var malicious_title_reason_id = "0" * 1; var malicious_content_type = "0" * 1; var modify_time = ""; var isprofileblock = "0"; var jumpInfo = [ { title: '女娲算法,杀疯了!'.html(false), item_show_type: '0', url: 'http://mp.weixin.qq.com/s?__biz=MzI1MTIzMzI2MA==&mid=2650578233&idx=1&sn=77c168f4b3c99e36eb5edad94d2afba2&chksm=f1fe2bbac689a2ac98cb8447a9bb7c8c11e7b8ab237b90bd0c43296e83c9ca40a2f921ec971c&scene=21#wechat_redirect'.html(false).html(false), subject_name: '算法爱好者', link_type: 'LINK_TYPE_MP_APPMSG', } , { title: '这才是中国被卡脖子最严重的软件!'.html(false), item_show_type: '0', url: 'http://mp.weixin.qq.com/s?__biz=MzI1MTIzMzI2MA==&mid=2650577510&idx=1&sn=f62ceb2fc2a4aa5aabc6c2702986bc61&chksm=f1fe2ce5c689a5f320383f0880f4257725877e4cd8a2d3da9ee9ff4e95c9fc2890f8fe33dacb&scene=21#wechat_redirect'.html(false).html(false), subject_name: '算法爱好者', link_type: 'LINK_TYPE_MP_APPMSG', } , { title: '从此明白了卷积神经网络(CNN)'.html(false), item_show_type: '0', url: 'http://mp.weixin.qq.com/s?__biz=MzI1MTIzMzI2MA==&mid=2650577780&idx=2&sn=4614f8c5b028027d5e0339878b4fb0e2&chksm=f1fe2df7c689a4e1ed88e028356f8fd8bb8a99e7149dc6e4cbc0c4b60e05b31a681fb1752c22&scene=21#wechat_redirect'.html(false).html(false), subject_name: '算法爱好者', link_type: 'LINK_TYPE_MP_APPMSG', } ]; var hasRelatedArticleInfo = '0' * 1 || 0; var relatedArticleFlag = '' * 1 || 0; window.wxtoken = "777"; window.is_login = '' * 1; window.__moon_initcallback = function(){ if(!!window.__initCatch){ window.__initCatch({ idkey : 27611+2, startKey : 0, limit : 128, badjsId: 43, reportOpt : { uin : uin, biz : biz, mid : mid, idx : idx, sn : sn }, extInfo : { network_rate : 0.01, badjs_rate: 0.1 } }); } } var title ="算法爱好者"; var is_new_msg=true; var is_wash = '' * 1; var topbarEnable = false; var enterid = "" * 1 || "" * 1 || parseInt(Date.now() / 1000); var miniprogram_appid = ""; var defaultAvatarUrl = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/common/avatar_default55871f.svg'; document.addEventListener('DOMContentLoaded', function () { window.domCompleteTime = Date.now(); }); var hasRecommendMsg = 0; ; var isPaySubscribe = '0' * 1; var isPaid = '0' * 1; var payShowIAPPrice = 1; var payProductId = '' || ''; var previewPercent = '0' || ''; var payGiftsCount = '0' * 1 || 0; var payFreeGift = '' * 1 || 0; var is_finished_preview = 0; var jump2pay = '' * 1; var isFans; var is_need_reward = (isPaySubscribe && !isPaid) ? 0 : "0" * 1; var is_teenager = '' * 1 || 0; var is_care_mode = '' * 1 || 0; var anchor_tree_msg = ''; var colorScheme = ''; var iapPriceInfo = { }; var productPayPackage = { iap_price_info: iapPriceInfo }; var isCartoonCopyright = '0' * 1; var show_msg_voice = '' * 1; var qnaCardData = ''; var exptype = '' || ''; var expsessionid = '' || ''; var goContentId = ''; var goReplyId = ''; var show_related_article = '' * 1; var wwdistype = ''; window.cgiData = { appImg: '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/pages/video/pic_v.2x55871f.png', } 8&255,255&e],this.valpha=1;else{this.valpha=1;var d=Object.keys(e);"alpha"in e&&(d.splice(d.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var b=d.sort().join("");if(!(b in s))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=s[b];var p=a[this.model].labels,y=[];for(r=0;rr?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),r=t.color[0];return r=(r=(r+e)%360)<0?360+r:r,t.color[0]=r,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var r=e.rgb(),n=this.rgb(),a=void 0===t?.5:t,o=2*a-1,i=r.alpha()-n.alpha(),s=((o*i==-1?o:(o+i)/(1+o*i))+1)/2,l=1-s;return c.rgb(s*r.red()+l*n.red(),s*r.green()+l*n.green(),s*r.blue()+l*n.blue(),r.alpha()*a+n.alpha()*(1-a))}},Object.keys(a).forEach((function(e){if(-1===i.indexOf(e)){var t=a[e].channels;c.prototype[e]=function(){if(this.model===e)return new c(this);if(arguments.length)return new c(arguments,e);var r="number"==typeof arguments[t]?t:this.valpha;return new c(f(a[this.model][e].raw(this.color)).concat(r),e)},c[e]=function(r){return"number"==typeof r&&(r=g(o.call(arguments),t)),new c(r,e)}}})),e.exports=c},function(e,t,r){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,r){var n=r(7),a={};for(var o in n)n.hasOwnProperty(o)&&(a[n[o]]=o);var i=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in i)if(i.hasOwnProperty(s)){if(!("channels"in i[s]))throw new Error("missing channels property: "+s);if(!("labels"in i[s]))throw new Error("missing channel labels property: "+s);if(i[s].labels.length!==i[s].channels)throw new Error("channel and label counts mismatch: "+s);var l=i[s].channels,c=i[s].labels;delete i[s].channels,delete i[s].labels,Object.defineProperty(i[s],"channels",{value:l}),Object.defineProperty(i[s],"labels",{value:c})}i.rgb.hsl=function(e){var t,r,n=e[0]/255,a=e[1]/255,o=e[2]/255,i=Math.min(n,a,o),s=Math.max(n,a,o),l=s-i;return s===i?t=0:n===s?t=(a-o)/l:a===s?t=2+(o-n)/l:o===s&&(t=4+(n-a)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(i+s)/2,[t,100*(s===i?0:r<=.5?l/(s+i):l/(2-s-i)),100*r]},i.rgb.hsv=function(e){var t,r,n,a,o,i=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(i,s,l),u=c-Math.min(i,s,l),h=function(e){return(c-e)/6/u+.5};return 0===u?a=o=0:(o=u/c,t=h(i),r=h(s),n=h(l),i===c?a=n-r:s===c?a=1/3+t-n:l===c&&(a=2/3+r-t),a<0?a+=1:a>1&&(a-=1)),[360*a,100*o,100*c]},i.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2];return[i.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(r,n))),100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},i.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,a=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-a)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-a-t)/(1-t)||0),100*t]},i.rgb.keyword=function(e){var t=a[e];if(t)return t;var r,o,i,s=1/0;for(var l in n)if(n.hasOwnProperty(l)){var c=n[l],u=(o=e,i=c,Math.pow(o[0]-i[0],2)+Math.pow(o[1]-i[1],2)+Math.pow(o[2]-i[2],2));u.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},i.rgb.lab=function(e){var t=i.rgb.xyz(e),r=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(a=a .008856?Math.pow(a,1/3):7.787*a+16/116))]},i.hsl.rgb=function(e){var t,r,n,a,o,i=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(r=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var c=0;c<3;c++)(n=i+1/3*-(c-1))<0&&n++,n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,a[c]=255*o;return a},i.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,a=r,o=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,a*=o<=1?o:2-o,[t,100*(0===n?2*a/(o+a):2*r/(n+r)),100*((n+r)/2)]},i.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,a=Math.floor(t)%6,o=t-Math.floor(t),i=255*n*(1-r),s=255*n*(1-r*o),l=255*n*(1-r*(1-o));switch(n*=255,a){case 0:return[n,l,i];case 1:return[s,n,i];case 2:return[i,n,l];case 3:return[i,s,n];case 4:return[l,i,n];case 5:return[n,i,s]}},i.hsv.hsl=function(e){var t,r,n,a=e[0],o=e[1]/100,i=e[2]/100,s=Math.max(i,.01);return n=(2-o)*i,r=o*s,[a,100*(r=(r/=(t=(2-o)*s)<=1?t:2-t)||0),100*(n/=2)]},i.hwb.rgb=function(e){var t,r,n,a,o,i,s,l=e[0]/360,c=e[1]/100,u=e[2]/100,h=c+u;switch(h>1&&(c/=h,u/=h),n=6*l-(t=Math.floor(6*l)),0!=(1&t)&&(n=1-n),a=c+n*((r=1-u)-c),t){default:case 6:case 0:o=r,i=a,s=c;break;case 1:o=a,i=r,s=c;break;case 2:o=c,i=r,s=a;break;case 3:o=c,i=a,s=r;break;case 4:o=a,i=c,s=r;break;case 5:o=r,i=c,s=a}return[255*o,255*i,255*s]},i.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]},i.xyz.rgb=function(e){var t,r,n,a=e[0]/100,o=e[1]/100,i=e[2]/100;return r=-.9689*a+1.8758*o+.0415*i,n=.0557*a+-.204*o+1.057*i,t=(t=3.2406*a+-1.5372*o+-.4986*i)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},i.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},i.lab.xyz=function(e){var t,r,n,a=e[0];t=e[1]/500+(r=(a+16)/116),n=r-e[2]/200;var o=Math.pow(r,3),i=Math.pow(t,3),s=Math.pow(n,3);return r=o>.008856?o:(r-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},i.lab.lch=function(e){var t,r=e[0],n=e[1],a=e[2];return(t=360*Math.atan2(a,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+a*a),t]},i.lch.lab=function(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},i.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],a=1 in arguments?arguments[1]:i.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return 2===a&&(o+=60),o},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},i.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var r;return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},i.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];3===t[0].length&&(r=r.split("").map((function(e){return e+e})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(e){var t,r=e[0]/255,n=e[1]/255,a=e[2]/255,o=Math.max(Math.max(r,n),a),i=Math.min(Math.min(r,n),a),s=o-i;return t=s<=0?0:o===r?(n-a)/s%6:o===n?2+(a-r)/s:4+(r-n)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?i/(1-s):0)]},i.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1,a=0;return(n=r<.5?2*t*r:2*t*(1-r))<1&&(a=(r-.5*n)/(1-n)),[e[0],100*n,100*a]},i.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,a=0;return n<1&&(a=(r-n)/(1-n)),[e[0],100*n,100*a]},i.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];var a,o=[0,0,0],i=t%1*6,s=i%1,l=1-s;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return a=(1-r)*n,[255*(r*o[0]+a),255*(r*o[1]+a),255*(r*o[2]+a)]},i.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},i.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},i.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},i.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,a=0;return n<1&&(a=(r-n)/(1-n)),[e[0],100*n,100*a]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=i.gray.hsv=function(e){return[0,0,e[0]]},i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,r){var n=r(1),a=r(4),o={};for(var i in n)n.hasOwnProperty(i)&&(o[n[i]]=i);var s=e.exports={to:{},get:{}};function l(e,t,r){return Math.min(Math.max(t,e),r)}function c(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}s.get=function(e){var t,r;switch(e.substring(0,3).toLowerCase()){case"hsl":t=s.get.hsl(e),r="hsl";break;case"hwb":t=s.get.hwb(e),r="hwb";break;default:t=s.get.rgb(e),r="rgb"}return t?{model:r,value:t}:null},s.get.rgb=function(e){if(!e)return null;var t,r,a,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=t[2],t=t[1],r=0;r<3;r++){var i=2*r;o[r]=parseInt(t.slice(i,i+2),16)}a&&(o[3]=Math.round(parseInt(a,16)/255*100)/100)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(a=(t=t[1])[3],r=0;r<3;r++)o[r]=parseInt(t[r]+t[r],16);a&&(o[3]=Math.round(parseInt(a+a,16)/255*100)/100)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(r=0;r<3;r++)o[r]=parseInt(t[r+1],0);t[4]&&(o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(t=e.match(/(\D+)/))?"transparent"===t[1]?[0,0,0,0]:(o=n[t[1]])?(o[3]=1,o):null:null;for(r=0;r<3;r++)o[r]=Math.round(2.55*parseFloat(t[r+1]));t[4]&&(o[3]=parseFloat(t[4]))}for(r=0;r<3;r++)o[r]=l(o[r],0,255);return o[3]=l(o[3],0,1),o},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(r)?1:r,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(r)?1:r,0,1)]}return null},s.to.hex=function(){var e=a(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},s.to.rgb=function(){var e=a(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},s.to.rgb.percent=function(){var e=a(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"},s.to.hsl=function(){var e=a(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},s.to.hwb=function(){var e=a(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},s.to.keyword=function(e){return o[e.slice(0,3)]}},function(e,t,r){"use strict";var n=r(5),a=Array.prototype.concat,o=Array.prototype.slice,i=e.exports=function(e){for(var t=[],r=0,i=e.length;r=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},function(e,t,r){var n=r(2),a=r(8),o={};Object.keys(n).forEach((function(e){o[e]={},Object.defineProperty(o[e],"channels",{value:n[e].channels}),Object.defineProperty(o[e],"labels",{value:n[e].labels});var t=a(e);Object.keys(t).forEach((function(r){var n=t[r];o[e][r]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var r=e(t);if("object"==typeof r)for(var n=r.length,a=0;a 1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=o},function(e,t,r){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,r){var n=r(2);function a(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,a=0;a=a.bottom||r.bottom<=a.top||r.left>=a.right||r.right<=a.left||n.unshift(t)}}));n.length;){var a=this._stack.splice(n.shift(),1)[0];"function"==typeof t&&t(a)}}},{key:"update",value:function(e){this._stack.forEach((function(t){t.updated||Array.prototype.some.call(e,(function(e){return!(1!==e.nodeType||!e.classList.contains(t.className)||(t.el=e,t.updated=!0,0))}))}))}}])&&m(t.prototype,r),n&&m(t,n),e}();function w(e,t){for(var r=0;r'.concat("dark"===this._config.mode?r:"@media ".concat(n," {").concat(r,"}"),"")),this[t]="")}}])&&w(t.prototype,r),o&&w(t,o),e}();function M(e,t){for(var r=0;r e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];this._nodes=e}},{key:"len",value:function(){return this._nodes.length}},{key:"get",value:function(){var e=[];return this._nodes.length?(e=this._nodes,this._nodes=[]):this._delayNodes.length?(e=this._delayNodes,this._delayNodes=[]):this._config.container&&(e=this._config.container.querySelectorAll("*")),e}},{key:"delay",value:function(){var e=this;Array.prototype.forEach.call(this._nodes,(function(t){return e._delayNodes.push(t)})),this._nodes=[]}},{key:"hasDelay",value:function(){return this._delayNodes.length>0}},{key:"addFirstPageNode",value:function(e){this._firstPageNodes.push(e)}},{key:"showFirstPageNodes",value:function(){this._firstPageNodes.forEach((function(e){return e.style.visibility="visible"})),this._firstPageNodes=[]}}])&&M(t.prototype,r),n&&M(t,n),e}(),P=r(0),E=r.n(P),T=r(1),N=r.n(T);function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){a=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}return r}(e,t)||D(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(e){if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3?"rgba":"rgb","(").concat(r.toString(),")")}))},H=function(e){if(!e||e.length<1)return"";if(1===e.length)return e[0];for(var t=e.shift(),r=e.shift();r;){var n=E()(r);t=E()(t).mix(n,n.alpha()),r=e.shift()}return t},R=function(e){var t=J(e);return z.test(t)?t:""},$=function(e){return(299*e[0]+587*e[1]+114*e[2])/1e3},Q=function(){function e(t){var r,n,a,o=t.config,i=t.tnQueue,s=t.bgStack,l=t.cssUtils;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a=0,(n="_idx")in(r=this)?Object.defineProperty(r,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[n]=a,this._config=o,this._tnQueue=i,this._bgStack=s,this._cssUtils=l,this._defaultDarkTextColorRgb=E()(this._config.defaultDarkTextColor).rgb().array(),this._defaultDarkBgColorRgb=E()(this._config.defaultDarkBgColor).rgb().array(),this._defaultDarkBgColorHSL=E()(this._config.defaultDarkBgColor).hsl().array(),this._defaultDarkTextColorBrightness=$(this._defaultDarkTextColorRgb),this._defaultDarkBgColorBrightness=$(this._defaultDarkBgColorRgb),this._defaultDarkBgColorHslBrightness=this._defaultDarkBgColorHSL[2],this._maxLimitOffsetBrightness=this._defaultDarkTextColorBrightness-this._defaultDarkBgColorBrightness}var t,r,n;return t=e,(r=[{key:"_adjustBrightnessByLimit",value:function(e,t){var r=e/$(t),n=Math.min(255,t[0]*r),a=Math.min(255,t[1]*r),o=Math.min(255,t[2]*r);return 0===a||255===n||255===o?a=(1e3*e-299*n-114*o)/587:0===n?n=(1e3*e-587*a-114*o)/299:0!==o&&255!==a||(o=(1e3*e-299*n-587*a)/114),E.a.rgb(n,a,o)}},{key:"_adjustTextBrightness",value:function(e,t){var r=t.rgb().array(),n=t.alpha(),a=$(r)*n+this._defaultDarkBgColorBrightness*(1-n),o=e.rgb().array(),i=e.hsl().array(),s=e.alpha(),l=$(o),c=Math.abs(a-l);if(l>=250)return e;if(c>this._maxLimitOffsetBrightness&&a<=this._defaultDarkBgColorBrightness+2)return this._adjustBrightnessByLimit(this._maxLimitOffsetBrightness+a,o).alpha(s);if(c>=65)return e;if(a>=100){if(i[2]>50){i[2]=90-i[2];var u=E.a.hsl.apply(E.a,F(i)).alpha(s);return this._adjustTextBrightness(u,t)}return this._adjustBrightnessByLimit(Math.min(this._maxLimitOffsetBrightness,a-65),o).alpha(s)}if(i[2]<=40){i[2]=90-i[2];var h=E.a.hsl.apply(E.a,F(i)).alpha(s);return this._adjustTextBrightness(h,t)}return this._adjustBrightnessByLimit(Math.min(this._maxLimitOffsetBrightness,a+65),o).alpha(s)}},{key:"_adjustBackgroundBrightness",value:function(e){var t=e.rgb().array(),r=e.hsl().array(),n=e.alpha(),a=$(t),o=e;return 0===r[1]&&r[2]>40||a>250?o=E.a.hsl(0,0,Math.min(100,100+this._defaultDarkBgColorHslBrightness-r[2])):a>190?o=this._adjustBrightnessByLimit(190,t).alpha(n):r[2]<22&&(r[2]=22,o=E.a.hsl.apply(E.a,F(r))),o.alpha(n).rgb()}},{key:"_adjustBrightness",value:function(e,t,r){var n,a=e.alpha(),o="";if(r.isBgColor){if(t.getAttribute(u)&&a>=.05&&t.removeAttribute(u),n=this._adjustBackgroundBrightness(e),!r.hasInlineColor){var l=t.getAttribute(i)||this._config.defaultLightTextColor,c=n||e,h=this._adjustBrightness(E()(l),t,{isTextColor:!0,parentElementBgColorStr:c});h.newColor?o+=this._cssUtils.genCssKV("color",h.newColor):o+=this._cssUtils.genCssKV("color",l)}}else if(r.isTextColor||r.isBorderColor){var f=r.parentElementBgColorStr||r.isTextColor&&t.getAttribute(s)||this._config.defaultDarkBgColor,g=E()(f);t.getAttribute(u)||(n=this._adjustTextBrightness(e,g))}else r.isTextShadow&&(n=this._adjustBackgroundBrightness(e));return{newColor:n&&e.toString()!==n.toString()&&n.alpha(a).rgb(),extStyle:o}}},{key:"_try",value:function(e){try{return e()}catch(e){console.log("An error occurred when running the dark mode conversion algorithm\n",e),"function"==typeof this._config.error&&this._config.error(e)}}},{key:"convert",value:function(e){var t=this,r=e.nodeName;if(this._config.whitelist.tagName.indexOf(r)>-1)return"";var n,a,o=e.style,h="",d="",b=!1,p=!1,y=!1,m=(o.cssText&&o.cssText.split(";")||[]).map((function(e){var t=e.indexOf(":");return[e.slice(0,t).toLowerCase(),e.slice(t+1)].map((function(e){return(e||"").replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}))})).filter((function(e){var t=L(e,2),r=t[0],o=t[1];return"color"===r?b=!0:/background/i.test(r)&&(p=!0,"background-position"===r?n=o:"background-size"===r&&(a=o)),(/background/i.test(r)||/^(-webkit-)?border-image/.test(r))&&/url\([^)]*\)/i.test(o)&&(y=!0),["-webkit-border-image","border-image","color","background-color","background-image","background","border","border-top","border-right","border-bottom","border-left","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","text-shadow"].indexOf(r)>-1})).sort((function(e,t){var r=L(e,1)[0],n=L(t,1)[0];return"color"===r||"background-image"===r&&"background-color"===n||0===n.indexOf("-webkit-text")?1:-1}));f.indexOf(r)>-1&&!p&&this._try((function(){var t=function(e){var t=null;return Array.prototype.some.call(e.classList,(function(e){return!!A[e]&&(t=A[e],!0)})),t}(e);t||(t=e.getAttribute("bgcolor")),t&&(m.unshift(["background-color",E()(t).toString()]),p=!0)})),"FONT"!==r||b||this._try((function(){var t=e.getAttribute("color");t&&(m.push(["color",E()(t).toString()]),b=!0)}));var v,k,w="",_="",x=0;if(m.some((function(e,r){var n=L(e,2),a=n[0],o=n[1];return t._try((function(){if(0!==a.indexOf("-webkit-text"))return x=r,!0;switch(a){case"-webkit-text-fill-color":w=R(o);break;case"-webkit-text-stroke":var e=o.split(" ");2===e.length&&(_=R(e[1]));break;case"-webkit-text-stroke-color":_=R(o)}return!1}))})),w&&(b?m[m.length-1]=["-webkit-text-fill-color",w]:(m.push(["-webkit-text-fill-color",w]),b=!0)),x&&(m.splice(0,x),_&&m.unshift(["-webkit-text-stroke-color",_])),m.forEach((function(r){var f=L(r,2),d=f[0],m=f[1];return t._try((function(){var r,f=m,v=!1,k=/^background/.test(d),w="text-shadow"===d,_=["-webkit-text-stroke-color","color","-webkit-text-fill-color"].indexOf(d),x=/^border/.test(d),M=/gradient/.test(m),C=[],j="";if(m=J(m,M),z.test(m)){if(M){for(var S=V.exec(m);S;)C.push(S[0]),S=V.exec(m);r=H(C)}var A=0;m=m.replace(V,(function(n){M&&(n=r,v=!0);var a=t._adjustBrightness(E()(n),e,{isBgColor:k,isTextShadow:w,isTextColor:_>-1,isBorderColor:x,hasInlineColor:b}),o=!y&&a.newColor;if(j+=a.extStyle,k||_>0){var h=k?s:i,f=k?c:l,g=o?o.toString():n;0===A&&B(e).forEach((function(e){var r=e.getAttribute(f)||t._config.defaultLightBgColor;e.setAttribute(h,g),e.setAttribute(f,r.split("|").concat(n).join("|")),k&&E()(g).alpha() =.05&&e.getAttribute(u)&&e.removeAttribute(u)}))}return o&&(v=!0),A+=1,o||n})).replace(/\s?!\s?important/gi,"")}if(j&&(h+=j),!(e instanceof SVGElement)){var O=/^background/.test(d),P=/^(-webkit-)?border-image/.test(d);if((O||P)&&/url\([^)]*\)/i.test(m)){v=!0;var T=H((e.getAttribute(c)||t._config.defaultLightBgColor).split("|"));if(m=m.replace(/^(.*?)url\(([^)]*)\)(.*)$/i,(function(r){var o=r,i="",s="",l="";return"1"!==e.getAttribute(u)&&B(e).forEach((function(e){return e.setAttribute(u,"1")})),O?(o="linear-gradient(".concat("rgba(0,0,0,0.1)",", ").concat("rgba(0,0,0,0.1)","),").concat(r),l=t._cssUtils.genCssKV(d,"".concat(o,",linear-gradient(").concat(T,", ").concat(T,")")),n&&(i="top left,".concat(n),h+=t._cssUtils.genCssKV("background-position","".concat(i)),l+=t._cssUtils.genCssKV("background-position","".concat(i,",top left"))),a&&(s="100%,".concat(a),h+=t._cssUtils.genCssKV("background-size","".concat(s)),l+=t._cssUtils.genCssKV("background-size","".concat(s,",100%"))),t._bgStack.push(e,l)):!p&&t._bgStack.push(e,t._cssUtils.genCssKV("background-image","linear-gradient(".concat("rgba(0,0,0,0.1)",", ").concat("rgba(0,0,0,0.1)","),linear-gradient(").concat(T,", ").concat(T,")"))),o})),!b){var N=H((e.getAttribute(l)||t._config.defaultLightTextColor).split("|"));h+=t._cssUtils.genCssKV("color",N),B(e).forEach((function(e){return e.setAttribute(i,N)}))}}}v&&(g.test(f)&&(o[d]=K(f)),M?t._bgStack.push(e,t._cssUtils.genCssKV(d,m)):h+=t._cssUtils.genCssKV(d,m))}))})),h){e.setAttribute("data-style",o.cssText);var M="".concat("js_darkmode__").concat(this._idx++);e.classList.add(M),d+=h?this._cssUtils.genCss(M,h):""}return v=e,k="",Array.prototype.forEach.call(v.childNodes,(function(e){3===e.nodeType&&(k+=e.nodeValue.replace(/\s/g,""))})),k.length>0&&(this._config.delayBgJudge?this._tnQueue.push(e):this._bgStack.contains(e,(function(e){d+=t._cssUtils.genCss(e.className,e.cssKV)}))),d}}])&&U(t.prototype,r),n&&U(t,n),e}(),G=new RegExp("".concat("js_darkmode__","[^ ]+"),"g"),W={hasInit:!1,begin:null,error:null,mode:"",whitelist:{tagName:["MPCPS","IFRAME"]},needJudgeFirstPage:!0,delayBgJudge:!1,container:null,cssSelectorsPrefix:"",defaultLightTextColor:"#191919",defaultLightBgColor:"#fff",defaultDarkTextColor:"#a3a3a3",defaultDarkBgColor:"#191919"},X=function(e,t,r){var n=t[r];switch(e){case"boolean":"boolean"==typeof n&&(W[r]=n);break;case"string":"string"==typeof n&&""!==n&&(W[r]=n);break;case"function":"function"==typeof n&&(W[r]=n);break;case"dom":n instanceof HTMLElement&&(W[r]=n)}},Y=new y(W,"".concat("js_darkmode__","text__")),Z=new k(W,"".concat("js_darkmode__","bg__")),ee=new x(W),te=new O(W),re=new Q({config:W,tnQueue:Y,bgStack:Z,cssUtils:ee}),ne=null,ae=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{type:"dom"};if(t.force&&(ee.isFinish=!1),!ee.isFinish)try{(W.mode?"dark"===W.mode:e.matches)?("dom"===t.type?("function"==typeof W.begin&&W.begin(te.hasDelay()),Array.prototype.forEach.call(te.get(),(function(e){if(e.className&&"string"==typeof e.className&&(e.className=e.className.replace(G,"")),W.needJudgeFirstPage){var t=e.getBoundingClientRect(),r=t.top,n=t.bottom;r<=0&&n<=0?ee.addCss(re.convert(e),!1):r>0&&r0&&n0&&void 0!==arguments[0]?arguments[0]:{};if(!W.hasInit){W.hasInit=!0;var t=W.whitelist.tagName;e.whitelist&&e.whitelist.tagName instanceof Array&&e.whitelist.tagName.forEach((function(e){e=e.toUpperCase(),-1===t.indexOf(e)&&t.push(e)})),["dark","light"].indexOf(e.mode)>-1&&(X("string",e,"mode"),document.getElementsByTagName("html")[0].classList.add(a)),X("function",e,"begin"),X("function",e,"error"),X("boolean",e,"needJudgeFirstPage"),X("boolean",e,"delayBgJudge"),X("dom",e,"container"),X("string",e,"cssSelectorsPrefix"),X("string",e,"defaultLightTextColor"),X("string",e,"defaultLightBgColor"),X("string",e,"defaultDarkTextColor"),X("string",e,"defaultDarkBgColor"),W.mode||null!==ne||(ne=window.matchMedia(n)).addListener(ae)}}function se(e){te.set(e),null!==W.container&&(Z.update(e),Y.update(e)),ae(ne,{force:!0,type:"bg"})}}])})); window.__moon_host = 'res.wx.qq.com';window.__moon_mainjs = 'appmsg/index.js';window.moon_map = {"pages_new/modules/toast/toast.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/toast/toast.html55871f.js","pages_new/modules/toast/toast.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/toast/toast55871f.js","new_video/plugin/util.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/plugin/util55871f.js","pages_new/common_share/video/player/player.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/player.html5ac6ca.js","page/pages/video_new.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/pages/video_new.css5b0fe0.js","pages_new/common_share/video/player/plugins/base_legacy.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/plugins/base_legacy55871f.js","page/pages/video_mod/video_danmu.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/pages/video_mod/video_danmu.css5a6683.js","pages_new/common_share/video/player/plugins/danmu/danmu_util.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/plugins/danmu/danmu_util5a78a8.js","pages_new/common_share/video/player/plugins/danmu/input.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/plugins/danmu/input.html5a78a8.js","appmsg/emotion/emotion_pc.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion_pc.html5a6683.js","pages_new/modules/comment/list/item.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/list/item.html5ac6ca.js","common/actionSheet.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/actionSheet582f2a.js","pages_new/modules/bottom_modal/bottom_modal.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/bottom_modal/bottom_modal.html5a49b9.js","page/pages/bottom_input_bar.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/pages/bottom_input_bar.css5a6683.js","appmsg/emotion/caret.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/caret55871f.js","pages_new/common_share/video/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/report57efc1.js","pages_new/common_share/video/utils/immersive_data.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/utils/immersive_data5ab687.js","common/safeAreaInsets.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/safeAreaInsets57efc1.js","pages_new/common_share/video/player/player.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/player5ac29c.js","pages_new/common_share/video/player/plugins/monitor/monitor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/plugins/monitor/monitor5799e3.js","pages_new/common_share/video/player/plugins/danmu/danmu.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/plugins/danmu/danmu5ab6e6.js","pages_new/common_share/video/player/plugins/base.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/plugins/base55871f.js","pages_new/common_share/video/player/controller.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/controller.html59da4c.js","appmsg/emotion/emotion_pc.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion_pc5a6683.js","appmsg/comment/comment_input/comment_input.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment/comment_input/comment_input.html582f2a.js","appmsg/emotion/selection.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/selection55871f.js","widget/wx-widget/wx_emotion_panel.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/widget/wx-widget/wx_emotion_panel.css5a6683.js","pages_new/modules/comment/dialog/unsupport.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/dialog/unsupport.html582f2a.js","pages_new/modules/comment/dialog/dialog.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/dialog/dialog.html5acc2a.js","pages_new/modules/comment/list/item.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/list/item5acc2a.js","pages_new/modules/comment/list/list.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/list/list.html5acc2a.js","pages_new/modules/comment/write_dialog/write_dialog.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/write_dialog/write_dialog.html59da4c.js","pages_new/modules/bottom_modal/bottom_modal.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/bottom_modal/bottom_modal59da4c.js","pages/bottom_input_bar.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/bottom_input_bar5a78a8.js","a/appdialog_confirm.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/appdialog_confirm.html582f2a.js","widget/wx_profile_dialog_primary.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/widget/wx_profile_dialog_primary.css55871f.js","appmsg/emotion/emotion.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion.html55871f.js","appmsg/emotion/textarea.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/textarea5a6683.js","appmsg/emotion/nav.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/nav55871f.js","appmsg/emotion/common.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/common55871f.js","appmsg/emotion/slide.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/slide55871f.js","icon/emotion_panel/weemoji_panel.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/icon/emotion_panel/weemoji_panel.css5a6683.js","pages/audition_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/audition_tpl.html582f2a.js","pages/musicUrlReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/musicUrlReport55871f.js","pages/music_report_conf.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/music_report_conf55871f.js","pages/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/report5799e3.js","pages/player_adaptor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/player_adaptor55871f.js","pages/music_player.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/music_player59da4c.js","biz_wap/zepto/zepto.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/zepto/zepto55871f.js","pages_new/common_share/video/player/plugins/danmu/danmu_store.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/plugins/danmu/danmu_store55871f.js","pages_new/common_share/video/player/player_store.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/player_store57efc1.js","pages_new/common_share/video/player/controller.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/common_share/video/player/controller5b1484.js","appmsg/without_iframe/video_appmsg.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/without_iframe/video_appmsg.html582f2a.js","page/appmsg_new/mod/album_read.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/mod/album_read.css59da4c.js","appmsg/more_read_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/more_read_tpl.html582f2a.js","appmsg/retry_ajax.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/retry_ajax55871f.js","complain/tips.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/tips55871f.js","pages/loadscript.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/loadscript58247c.js","biz_wap/utils/ajax_load_js.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax_load_js55871f.js","appmsg/reward_entry.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/reward_entry59da4c.js","complain/utils/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/utils/utils55871f.js","pages_new/modules/comment/comment_store.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/comment_store5acc2a.js","pages_new/modules/utils/url.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/utils/url580306.js","appmsg/comment/comment_write_old.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment/comment_write_old.html582f2a.js","appmsg/comment/comment_input/comment_input.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment/comment_input/comment_input5a6683.js","pages_new/3rd/vuex.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/3rd/vuex55871f.js","appmsg/comment/comment_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment/comment_report55871f.js","appmsg/emotion/emotion_panel.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion_panel5a6683.js","pages_new/modules/comment/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/utils5a44e5.js","appmsg/comment_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment_report5a2949.js","pages_new/modules/comment/dialog/unsupport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/dialog/unsupport55871f.js","pages_new/modules/comment/dialog/dialog.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/dialog/dialog5acc2a.js","pages_new/modules/comment/list/list.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/list/list5acc2a.js","pages_new/modules/comment/write_dialog/write_dialog.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/write_dialog/write_dialog59da4c.js","pages_new/modules/comment/comment.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/comment.html5acc2a.js","biz_wap/utils/fakehash.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/fakehash55871f.js","common/keyboard.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/keyboard5a44e5.js","appmsg/i18n.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/i18n55871f.js","video/video_tail_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/video/video_tail_utils55ba12.js","a/web_compt_ad.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/web_compt_ad579253.js","a/appdialog_confirm.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/appdialog_confirm582f2a.js","biz_common/utils/get_para_list.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/get_para_list55871f.js","biz_common/utils/comm_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/comm_report577d19.js","appmsg/my_comment_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/my_comment_tpl.html582f2a.js","appmsg/cmt_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cmt_tpl.html582f2a.js","sougou/a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/sougou/a_tpl.html582f2a.js","biz_common/utils/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/report55871f.js","appmsg/articleReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/articleReport55871f.js","appmsg/topic_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/topic_tpl.html582f2a.js","appmsg/minishop/minishop_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/minishop/minishop_tpl.html5ac6ca.js","appmsg/appmsg_live_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsg_live_tpl.html55871f.js","appmsg/profile/ban_alert_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/profile/ban_alert_tpl.html55871f.js","appmsg/profile/mp_profile_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/profile/mp_profile_tpl.html59da4c.js","appmsg/channel/report_topic.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/channel/report_topic5acb8f.js","appmsg/channel/report_live.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/channel/report_live55871f.js","appmsg/channel/time_format.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/channel/time_format582f2a.js","appmsg/channel/video_snap_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/channel/video_snap_tpl.html5acb8f.js","biz_common/dom/offset.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/offset55871f.js","appmsg/emotion/dom.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/dom55871f.js","appmsg/emotion/emotion.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion5a6683.js","question_answer/write_answer_reply.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/write_answer_reply.html582f2a.js","question_answer/reply_item.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/reply_item.html582f2a.js","question_answer/answer_item.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/answer_item.html582f2a.js","question_answer/qa_card.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/qa_card.html55871f.js","pages/weapp_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/weapp_tpl.html5a23ce.js","appmsg/poi/poi_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/poi/poi_tpl.html59da4c.js","appmsg/search/search_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/search/search_tpl.html59da4c.js","pages/player_tips.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/player_tips55871f.js","redpackage/tpl/card_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/redpackage/tpl/card_tpl.html55871f.js","pages/voice_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/voice_tpl.html5a2949.js","pages/kugoumusic_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/kugoumusic_ctrl582f2a.js","pages/qqmusic_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/qqmusic_ctrl582f2a.js","pages/voice_component.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/voice_component5a2949.js","pages/qqmusic_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/qqmusic_tpl.html59da4c.js","new_video/ctl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/ctl55ba12.js","appmsg/without_iframe/video_appmsg.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/without_iframe/video_appmsg59da4c.js","biz_wap/jsapi/leaveReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/leaveReport55871f.js","biz_wap/utils/hand_up_state.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/hand_up_state55871f.js","biz_common/utils/http.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/http5a9e5d.js","biz_common/utils/cookie.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/cookie55871f.js","appmsg/open_url_with_webview.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/open_url_with_webview55871f.js","appmsg/album_keep_read.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/album_keep_read59da4c.js","appmsg/more_read.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/more_read55871f.js","appmsg/like_and_share.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/like_and_share5ab687.js","appmsg/like.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/like5ab687.js","appmsg/read.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/read582f2a.js","pages_new/modules/utils/event_bus.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/utils/event_bus57efc1.js","appmsg/share_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share_tpl.html582f2a.js","appmsg/appmsgext.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsgext59da4c.js","appmsg/img_copyright_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/img_copyright_tpl.html582f2a.js","pages/video_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/video_ctrl55ba12.js","pages/create_txv.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/create_txv55871f.js","appmsg/pay_read/pay_read_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/pay_read/pay_read_utils5ac12f.js","appmsg/reward_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/reward_utils5af363.js","biz_common/ui/imgonepx.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/ui/imgonepx55871f.js","appmsg/share_biz.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share_biz55871f.js","appmsg/malicious_wording.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/malicious_wording582f2a.js","appmsg/kan_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/kan_report57efc1.js","biz_common/jquery.md5.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/jquery.md555871f.js","complain/utils/const.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/utils/const55871f.js","complain/utils/dom.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/utils/dom5a9e5d.js","appmsg/subscribe/subscribe_btn_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/subscribe/subscribe_btn_tpl.html55871f.js","album/utils/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/album/utils/report5ab687.js","appmsg/rec_report_key.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/rec_report_key577d19.js","pages/scrollY.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/scrollY577d19.js","appmsg/related_article_feedback.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/related_article_feedback59da4c.js","biz_wap/utils/openUrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/openUrl55871f.js","appmsg/related_article_item.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/related_article_item.html59da4c.js","appmsg/related_article_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/related_article_tpl.html582f2a.js","pages_new/appmsg/store.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/appmsg/store5a67cc.js","pages_new/modules/comment/comment.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/modules/comment/comment5acc2a.js","pages_new/appmsg/page_bottom.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/appmsg/page_bottom.html5a67cc.js","common/userGoBack.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/userGoBack59da4c.js","common/navShadow.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/navShadow59da4c.js","pages/mod/bottom_modal.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/mod/bottom_modal.html5a49b9.js","widget/wx-widget/wx_bottom_modal.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/widget/wx-widget/wx_bottom_modal.css5acc2a.js","biz_common/utils/monitor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/monitor566957.js","biz_wap/utils/setMpInfo.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/setMpInfo55871f.js","pages/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/utils5a7316.js","appmsg/like_profile_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/like_profile_tpl.html59f1a7.js","biz_common/template-2.0.1-cmd.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/template-2.0.1-cmd55871f.js","tpl/appmsg/loading.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/tpl/appmsg/loading.html55871f.js","biz_common/base64.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/base6455871f.js","biz_wap/jsapi/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/log55871f.js","biz_wap/utils/storage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/storage55871f.js","appmsg/without_iframe/iframe_communicate.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/without_iframe/iframe_communicate55ce31.js","biz_common/utils/wxgspeedsdk.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/wxgspeedsdk55871f.js","pages/version4video.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/version4video55871f.js","a/a_config.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_config5a8ea4.js","a/a_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_utils55871f.js","a/a.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a5a689a.js","rt/appmsg/getappmsgext.rt.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/rt/appmsg/getappmsgext.rt55871f.js","pages/video_communicate_adaptor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/video_communicate_adaptor55871f.js","appmsg/without_iframe/video_communicate_adaptor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/without_iframe/video_communicate_adaptor562f5c.js","biz_wap/utils/ajax_wx.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax_wx55871f.js","biz_common/utils/respTypes.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/respTypes55871f.js","biz_wap/utils/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/log55871f.js","biz_wap/utils/localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/localstorage55871f.js","common/comm_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/comm_report55871f.js","biz_wap/ui/weui_css.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/ui/weui_css5acc2a.js","sougou/index.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/sougou/index55871f.js","biz_wap/safe/mutation_observer_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/safe/mutation_observer_report55871f.js","appmsg/fereport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/fereport55871f.js","appmsg/fereport_without_localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/fereport_without_localstorage55871f.js","appmsg/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report55871f.js","appmsg/report_and_source.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report_and_source5b0985.js","appmsg/appmsg_copy_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsg_copy_report55871f.js","appmsg/cdn_speed_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_speed_report55871f.js","appmsg/wxtopic.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/wxtopic55871f.js","appmsg/minishop/minishop.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/minishop/minishop57f5ba.js","appmsg/live.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/live582f2a.js","appmsg/profile/mp_insert_profile.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/profile/mp_insert_profile59da4c.js","appmsg/channel/channels.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/channel/channels5aee09.js","question_answer/appmsg.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/appmsg59da4c.js","appmsg/weapp.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weapp5b1484.js","appmsg/weproduct.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weproduct59da4c.js","appmsg/voicemsg.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/voicemsg582f2a.js","appmsg/autoread.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/autoread582f2a.js","appmsg/poi/poi.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/poi/poi59da4c.js","appmsg/search/search.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/search/search55871f.js","redpackage/redpacketcover.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/redpackage/redpacketcover55871f.js","appmsg/voice.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/voice5a2949.js","appmsg/qqmusic.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/qqmusic582f2a.js","appmsg/iframe.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/iframe582545.js","appmsg/page_pos.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/page_pos5a2949.js","appmsg/product.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/product55871f.js","appmsg/outer_link.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/outer_link59da4c.js","appmsg/copyright_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/copyright_report55871f.js","appmsg/async.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/async5ac12f.js","biz_wap/ui/lazyload_img.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/ui/lazyload_img575fc1.js","biz_common/log/jserr.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/log/jserr55871f.js","appmsg/share.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share582f2a.js","appmsg/cdn_img_lib.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_img_lib55871f.js","complain/utils/userpainter.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/utils/userpainter5b0ebe.js","appmsg/subscribe/subscribe.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/subscribe/subscribe55871f.js","appmsg/emotion/weemoji.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/weemoji5a6683.js","page/appmsg_new/not_in_mm.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/not_in_mm.css55871f.js","page/appmsg_new/combo.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/combo.css5acc2a.js","pages_new/3rd/vue.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/3rd/vue55871f.js","appmsg/tags_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/tags_utils5a07c4.js","common/color/dark.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/dark55871f.js","common/color/light.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/light55871f.js","common/color/background_color.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/color/background_color55871f.js","appmsg/wxwork_hidden.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/wxwork_hidden55871f.js","appmsg/set_article_read.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/set_article_read577d19.js","appmsg/getForbidConfig.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/getForbidConfig55871f.js","appmsg/related_article.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/related_article5a6683.js","pages_new/appmsg/page_bottom.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages_new/appmsg/page_bottom5a67cc.js","appmsg/pay_read/buy_wecoin_btn_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/pay_read/buy_wecoin_btn_tpl.html584046.js","appmsg/pay_read/pay_confirm_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/pay_read/pay_confirm_tpl.html5ac12f.js","pages/mod/bottom_modal.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/mod/bottom_modal59da4c.js","biz_wap/utils/jsmonitor_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/jsmonitor_report55871f.js","appmsg/topbar.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/topbar59da4c.js","appmsg/finance_communicate.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/finance_communicate55871f.js","appmsg/like_profile.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/like_profile5ae287.js","appmsg/loading.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/loading55871f.js","appmsg/pay_report_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/pay_report_utils584046.js","appmsg/popup_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/popup_report59da4c.js","complain/localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/localstorage55871f.js","common/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/utils5ac29c.js","biz_wap/utils/wapsdk.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/wapsdk55871f.js","a/mpAdAsync.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/mpAdAsync59da4c.js","biz_common/utils/url/parse.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/url/parse55871f.js","appmsg/appmsg_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsg_report5a2949.js","biz_common/moment.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/moment58e303.js","biz_wap/jsapi/core.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/core55871f.js","biz_common/dom/event.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/event571639.js","appmsg/test.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/test55871f.js","biz_wap/utils/mmversion.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/mmversion5add62.js","appmsg/max_age.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/max_age55871f.js","biz_common/dom/attr.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/attr55871f.js","biz_wap/utils/ajax.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax55871f.js","appmsg/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/log55871f.js","biz_common/dom/class.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/class55871f.js","biz_wap/utils/device.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/device55871f.js","appmsg/weapp_common.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weapp_common582f2a.js","appmsg/review_image.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/review_image55871f.js","biz_common/utils/string/html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/string/html567d88.js","cps/tpl/list_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/list_tpl.html5a07c4.js","cps/tpl/card_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/card_tpl.html5a07c4.js","cps/tpl/banner_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/banner_tpl.html582f2a.js","biz_common/tmpl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/tmpl55871f.js","appmsg/set_font_size.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/set_font_size5af363.js","common/tap_highlight.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/tap_highlight59da4c.js","appmsg/sec_load_fail_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/sec_load_fail_report55871f.js","biz_wap/ui/weui.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/ui/weui59da4c.js","appmsg/search_image.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/search_image55871f.js","appmsg/index.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/index5add62.js"}; r;r++){ var a=n[r].split("="); a[0]&&a[1]&&t.push(a[0]+"="+encodeURIComponent(a[1])); } var s=new window.Image; return void(s.src=(o+t.join("&")).substr(0,1024)); } var c; if(window.ActiveXObject)try{ c=new ActiveXObject("Msxml2.XMLHTTP"); }catch(d){ try{ c=new ActiveXObject("Microsoft.XMLHTTP"); }catch(_){ c=!1; } }else window.XMLHttpRequest&&(c=new XMLHttpRequest); c&&(c.open(e,o,!0),c.setRequestHeader("cache-control","no-cache"),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"), c.setRequestHeader("X-Requested-With","XMLHttpRequest"),c.send(n)); } function a(e){ return function(o,n){ if("string"==typeof o)try{ o=new Function(o); }catch(t){ throw t; } var r=[].slice.call(arguments,2),i=o; return o=function(){ try{ return i.apply(this,r.length&&r||arguments); }catch(e){ throw e.stack&&console&&console.error&&console.error("[TryCatch]"+e.stack),h&&window.__moon_report&&window.__moon_report([{ offset:O, log:"timeout_error;host:"+location.host, e:e }]),e; } },e(o,n); }; } function s(e){ return function(o,n,t){ if("undefined"==typeof t)var t=!1; var r=this,i=n||function(){}; return n=function(){ try{ return i.apply(r,arguments); }catch(e){ throw e.stack&&console&&console.error&&console.error("[TryCatch]"+e.stack),h&&window.__moon_report&&window.__moon_report([{ offset:v, log:"listener_error;type:"+o+";host:"+location.host, e:e }]),e; } },i.moon_lid=x,j[x]=n,x++,e.call(r,o,n,t); }; } function c(e){ return function(o,n,t){ if("undefined"==typeof t)var t=!1; var r=this; return n=j[n.moon_lid],e.call(r,o,n,t); }; } var d,_,l,w,m,u=/MicroMessenger/i.test(navigator.userAgent),f=/MPAPP/i.test(navigator.userAgent),p=window.define,h=121261,g=0,v=2,y=4,O=9,E=10; if(window.__initCatch=function(e){ h=e.idkey,d=e.startKey||0,_=e.limit,l=e.badjsId,w=e.reportOpt||"",m=e.extInfo||{}, m.rate=m.rate||.5; },window.__moon_report=function(e,o){ var a=!1,s=""; try{ s=top.location.href; }catch(c){ a=!0; } var w=.5; if(m&&m.rate&&(w=m.rate),o&&"number"==typeof o&&(w=o),!/mp\.weixin\.qq\.com/.test(location.href)&&!/payapp\.weixin\.qq\.com/.test(location.href)||Math.random()>w||!u&&!f||top!=window&&!a&&!/mp\.weixin\.qq\.com/.test(s), t(e)&&(e=[e]),n(e)&&""!=h){ var p="",g=[],v=[],O=[],E=[]; "number"!=typeof _&&(_=1/0); for(var j=0;j_||"number"!=typeof x.offset||x.offset==y&&m&&m.network_rate&&Math.random()>=m.network_rate)){ var b=1/0==_?d:d+x.offset; g[j]="[moon]"+h+"_"+b+";"+x.log+";"+r(x.e||{})||"",v[j]=b,O[j]=1; } } for(var D=0;D0){ i("POST",location.protocol+"//mp.weixin.qq.com/mp/jsmonitor?","idkey="+E.join(";")+"&r="+Math.random()+"&lc="+g.length+p); var w=1; if(m&&m.badjs_rate&&(w=m.badjs_rate),Math.random()=10))try{ D.call(window.localStorage,e,o); }catch(n){ n.stack&&console&&console.error&&console.error("[TryCatch]"+n.stack),window.__moon_report([{ offset:E, log:"localstorage_error;"+n.toString(), e:n }]),B++,B>=3&&window.moon&&window.moon.clear&&moon.clear(); } }; } window.seajs&&p&&(window.define=function(){ for(var o,n=[],t=arguments&&arguments[0],i=0,a=arguments.length;a>i;i++){ var s=o=arguments[i]; "function"==typeof o&&(o=function(){ try{ return s.apply(this,arguments); }catch(o){ throw"string"==typeof t&&console.error("[TryCatch][DefineeErr]id:"+t),o.stack&&console&&console.error&&console.error("[TryCatch]"+o.stack), h&&window.__moon_report&&(WX_BJ_REPORT.BadJs.onError(o,{ mid:"mmbizwap:defineError" }),window.__moon_report([{ offset:g, log:"define_error;id:"+t+";", e:o }])),e(" [define_error]"+JSON.stringify(r(o))),o; } },o.toString=function(e){ return function(){ return e.toString(); }; }(arguments[i])),n.push(o); } return p.apply(this,n); }); }(),function(o){ function n(e,o,n){ return window.__DEBUGINFO?(window.__DEBUGINFO.res_list||(window.__DEBUGINFO.res_list=[]), window.__DEBUGINFO.res_list[e]?(window.__DEBUGINFO.res_list[e][o]=n,!0):!1):!1; } function t(e){ var o=new TextEncoder("utf-8").encode(e),n=crypto.subtle||crypto.webkitSubtle; return n.digest("SHA-256",o).then(function(e){ return r(e); }); } function r(e){ for(var o=[],n=new DataView(e),t=0;tr;++r)if(o.call(n,e[r],r,e)===!1)return; }else{ if("Object"!==t&&a!=e)throw"unsupport type"; if(a==e){ for(var r=e.length-1;r>=0;r--){ var s=a.key(r),c=a.getItem(s); if(o.call(n,c,s,e)===!1)return; } return; } for(var r in e)if(e.hasOwnProperty(r)&&o.call(n,e[r],r,e)===!1)return; } } } var a=o.localStorage,s=document.head||document.getElementsByTagName("head")[0],c=1,d=11,_=12,l=13,w=window.__allowLoadResFromMp?1:2,m=window.__allowLoadResFromMp?1:0,u=w+m,f=window.testenv_reshost||window.__moon_host||"res.wx.qq.com"; window.__loadAllResFromMp&&(f="mp.weixin.qq.com",w=0,u=w+m); var p=new RegExp("^(http(s)?:)?//"+f),h={ prefix:"__MOON__", loaded:[], unload:[], clearSample:!0, hit_num:0, mod_num:0, version:1003, cacheData:{ js_mod_num:0, js_hit_num:0, js_not_hit_num:0, js_expired_num:0, css_mod_num:0, css_hit_num:0, css_not_hit_num:0, css_expired_num:0 }, init:function(){ h.loaded=[],h.unload=[]; var e,n,r; if(window.no_moon_ls&&(h.clearSample=!0),a){ var s="_moon_ver_key_",c=a.getItem(s); c!=h.version&&(h.clear(),a.setItem(s,h.version)); } if((-1!=location.search.indexOf("no_moon1=1")||-1!=location.search.indexOf("no_lshttps=1"))&&h.clear(), a){ var d=1*a.getItem(h.prefix+"clean_time"),_=+new Date; if(_-d>=1296e6){ h.clear(); try{ !!a&&a.setItem(h.prefix+"clean_time",+new Date); }catch(l){} } } i(moon_map,function(i,s){ if(n=h.prefix+s,r=!!i&&i.replace(p,""),e=!!a&&a.getItem(n),version=!!a&&(a.getItem(n+"_ver")||"").replace(p,""), h.mod_num++,r&&-1!=r.indexOf(".css")?h.cacheData.css_mod_num++:r&&-1!=r.indexOf(".js")&&h.cacheData.js_mod_num++, h.clearSample||!e||r!=version)h.unload.push(r.replace(p,"")),r&&-1!=r.indexOf(".css")?e?r!=version&&h.cacheData.css_expired_num++:h.cacheData.css_not_hit_num++:r&&-1!=r.indexOf(".js")&&(e?r!=version&&h.cacheData.js_expired_num++:h.cacheData.js_not_hit_num++);else{ if("https:"==location.protocol&&window.moon_hash_map&&window.moon_hash_map[s]&&window.crypto)try{ t(e).then(function(e){ window.moon_hash_map[s]!=e&&console.log(s); }); }catch(c){} try{ var d="//# sourceURL="+s+"\n//@ sourceURL="+s; o.eval.call(o,'define("'+s+'",[],'+e+")"+d),h.hit_num++,r&&-1!=r.indexOf(".css")?h.cacheData.css_hit_num++:r&&-1!=r.indexOf(".js")&&h.cacheData.js_hit_num++; }catch(c){ h.unload.push(r.replace(p,"")); } } }),h.load(h.genUrl()); }, genUrl:function(){ var e=h.unload; if(!e||e.length<=0)return[]; if(window.__loadAllResFromMp)for(var o=0;od;++d){ /^\/(.*?)\//.test(e[d]); var l=/^\/(.*?)\//.exec(e[d]); l.length<2||!l[1]||(t=l[1],r=a[t],r?(n=r+","+e[d],n.length>1e3||s?(i.push(r+"?v="+h.version), r=location.protocol+c+e[d],a[t]=r):(r=n,a[t]=r)):(r=location.protocol+c+e[d],a[t]=r)); } for(var w in a)a.hasOwnProperty(w)&&i.push(a[w]); return i; }, load:function(e){ if(window.__wxgspeeds&&(window.__wxgspeeds.mod_num=h.mod_num,window.__wxgspeeds.hit_num=h.hit_num), !e||e.length<=0)return seajs.combo_status=seajs.COMBO_LOADED,seajs.run(),console.debug&&console.debug("[moon] load js complete, all in cache, cost time : 0ms, total count : "+h.mod_num+", hit num: "+h.hit_num), void window.__moonclientlog.push("[moon] load js complete, all in cache, cost time : 0ms, total count : "+h.mod_num+", hit num: "+h.hit_num); seajs.combo_status=seajs.COMBO_LOADING; var o=0,n=+new Date; window.__wxgspeeds&&(window.__wxgspeeds.combo_times=[],window.__wxgspeeds.combo_times.push(n)), i(e,function(t){ h.request(t,u,function(){ if(window.__wxgspeeds&&window.__wxgspeeds.combo_times.push(+new Date),o++,o==e.length){ var t=+new Date-n; window.__wxgspeeds&&(window.__wxgspeeds.mod_downloadtime=t),seajs.combo_status=seajs.COMBO_LOADED, seajs.run(),console.debug&&console.debug("[moon] load js complete, url num : "+e.length+", total mod count : "+h.mod_num+", hit num: "+h.hit_num+", use time : "+t+"ms"), window.__moonclientlog.push("[moon] load js complete, url num : "+e.length+", total mod count : "+h.mod_num+", hit num: "+h.hit_num+", use time : "+t+"ms"); } }); }); }, request:function(o,t,r){ if(o){ t=t||0,o.indexOf("mp.weixin.qq.com") -1&&((new Image).src=location.protocol+"//mp.weixin.qq.com/mp/jsmonitor?idkey=27613_32_1&r="+Math.random(), window.__moon_report([{ offset:_, log:"load_script_from_mp: "+o }],1)); var i=-1; window.__DEBUGINFO&&(__DEBUGINFO.res_list||(__DEBUGINFO.res_list=[]),__DEBUGINFO.res_list.push({ type:"js", status:"pendding", start:+new Date, end:0, url:o }),i=__DEBUGINFO.res_list.length-1),-1!=location.search.indexOf("no_lshttps=1")&&(o=o.replace("http://","https://")); var a=document.createElement("script"); a.src=o,a.type="text/javascript",a.async=!0,a.down_time=+new Date,a.onerror=function(s){ n(i,"status","error"),n(i,"end",+new Date); var _=new Error(s); if(t>=0)if(m>t){ var w=o.replace("res.wx.qq.com","mp.weixin.qq.com"); h.request(w,t,r); }else h.request(o,t,r);else window.__moon_report&&(window.__moon_report([{ offset:c, log:"load_script_error: "+o, e:_ }],1),window.WX_BJ_REPORT.BadJs.report("load_script_error",o,{ mid:"mmbizwap:Monitor", _info:_ })); if(t==m-1&&window.__moon_report([{ offset:d, log:"load_script_error: "+o, e:_ }],1),-1==t){ var u="ua: "+window.navigator.userAgent+", time="+(+new Date-a.down_time)+", load_script_error -1 : "+o; window.__moon_report([{ offset:l, log:u }],1); } window.__moonclientlog.push("moon load js error : "+o+", error -> "+_.toString()), e("moon_request_error url:"+o); },"undefined"!=typeof moon_crossorigin&&moon_crossorigin&&a.setAttribute("crossorigin",!0), a.onload=a.onreadystatechange=function(){ n(i,"status","loaded"),n(i,"end",+new Date),!a||a.readyState&&!/loaded|complete/.test(a.readyState)||(n(i,"status","200"), a.onload=a.onreadystatechange=null,"function"==typeof r&&r()); },t--,s.appendChild(a),e("moon_request url:"+o+" retry:"+t); } }, setItem:function(e,o){ !!a&&a.setItem(e,o); }, clear:function(){ a&&(i(a,function(e,o){ ~o.indexOf(h.prefix)&&a.removeItem(o); }),console.debug&&console.debug("[moon] clear")); }, idkeyReport:function(e,o,n){ n=n||1; var t=e+"_"+o+"_"+n; (new Image).src="/mp/jsmonitor?idkey="+t+"&r="+Math.random(); } }; seajs&&seajs.use&&"string"==typeof window.__moon_mainjs&&seajs.use(window.__moon_mainjs), window.moon=h; }(window),function(){ try{ Math.random()<1; }catch(e){} }(),window.moon.init(); }; e(),!!window.__moon_initcallback&&window.__moon_initcallback(),window.__wxgspeeds&&(window.__wxgspeeds.moonendtime=+new Date); } } var WX_BJ_REPORT=window.WX_BJ_REPORT||{}; !function(e){ function o(e,o,n,t,r,i){ return{ name:e||"", message:o||"", file:n||"", line:t||"", col:r||"", stack:i&&i.stack||"" }; } function n(e){ var o=t(e); return{ name:e.name, key:e.message, msg:e.message, stack:o.info, file:o.file, line:o.line, col:o.col, client_version:"", _info:e._info }; } function t(o){ o._info=o._info||""; var n=o.stack||"",t={ info:n, file:o.file||"", line:o.line||"", col:o.col||"" }; if(""==t.file){ var r=n.split(/\bat\b/); if(r&&r[1]){ var i=/(https?:\/\/[^\n]+)\:(\d+)\:(\d+)/.exec(r[1]); i&&(i[1]&&i[1]!=t.file&&(t.file&&(o._info+=" [file: "+t.file+" ]"),t.file=i[1]), i[2]&&i[2]!=t.line&&(t.line&&(o._info+=" [line: "+t.line+" ]"),t.line=i[2]),i[3]&&i[3]!=t.col&&(t.col&&(o._info+=" [col: "+t.col+" ]"), t.col=i[3])); } } return t&&t.file&&t.file.length>0&&(t.info=t.info.replace(new RegExp(t.file.split("?")[0],"gi"),"__FILE__")), e.BadJs.ignorePath&&(t.info=t.info.replace(/http(s)?\:[^:\n]*\//gi,"").replace(/\n/gi,"")), t; } if(!e.BadJs){ var r="BadjsWindowError",i=function(e,o){ for(var n in o)e[n]=o[n]; return e; }; return e.BadJs={ uin:0, mid:"", view:"wap", _cache:{}, _info:{}, _hookCallback:null, ignorePath:!0, "throw":function(e,o){ throw this.onError(e,o),e; }, onError:function(o,t){ try{ if(1==o.BADJS_EXCUTED)return; o.BADJS_EXCUTED=!0; var r=n(o); if(r.uin=this.uin,r.mid=this.mid,r.view=this.view,r.cmdb_module="mmbizwap",t&&(r=i(r,t)), r.cid&&(r.key="["+r.cid+"]:"+r.key),r._info&&(r.msg+="[object Object]"==Object.prototype.toString.call(r._info)?" || info:"+JSON.stringify(r._info):"[object String]"==Object.prototype.toString.call(r._info)?" || info:"+r._info:" || info:"+r._info), "function"==typeof this._hookCallback&&this._hookCallback(r)===!1)return; return this._send(r),e.BadJs; }catch(o){ console.error(o); } }, winErr:function(n){ n.error&&n.error.BADJS_EXCUTED||e.BadJs.onError("unhandledrejection"===n.type?o(n.type,n.reason,"","","",n.reason):o(r,n.message,n.filename,n.lineno,n.colno,n.error)); }, init:function(o,n,t){ return this.uin=o||this.uin,this.mid=n||this.mid,this.view=t||this.view,e.BadJs; }, hook:function(o){ return this._hookCallback=o,e.BadJs; }, _send:function(o){ if(!o.mid){ if("undefined"==typeof window.PAGE_MID||!window.PAGE_MID)return; o.mid=window.PAGE_MID; } o.uin||(o.uin=window.user_uin||0); var n=[o.mid,o.name,o.key].join("|"); if(!this._cache||!this._cache[n])return this._cache&&(this._cache[n]=!0),this._xhr(o), e.BadJs; }, _xhr:function(e){ var o; if(window.ActiveXObject)try{ o=new ActiveXObject("Msxml2.XMLHTTP"); }catch(n){ try{ o=new ActiveXObject("Microsoft.XMLHTTP"); }catch(t){ o=!1; } }else window.XMLHttpRequest&&(o=new XMLHttpRequest); var r=""; for(var i in e)i&&e[i]&&(r+=[i,"=",encodeURIComponent(e[i]),"&"].join("")); if(o&&o.open)o.open("POST","https://badjs.weixinbridge.com/report",!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"), o.onreadystatechange=function(){},o.send(r.slice(0,-1));else{ var a=new Image; a.src="https://badjs.weixinbridge.com/report?"+r; } }, report:function(e,n,t){ return this.onError(o(e,n),t),this; }, mark:function(e){ this._info=i(this._info,e); }, nocache:function(){ return this._cache=!1,e.BadJs; } },window.addEventListener&&window.addEventListener("error",e.BadJs.winErr),window.addEventListener&&window.addEventListener("unhandledrejection",e.BadJs.winErr), e.BadJs; } }(WX_BJ_REPORT),window.WX_BJ_REPORT=WX_BJ_REPORT,__moonf__(); }, 25);
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/125590
 
49 次点击  
分享到微博