Files
deepdata/my_ops/markitdown_parser/index_files/index-5e016520_g4-m.js
沃巴蒂 ff22ed3a8b feat(deepdata): 引入修改密码、文件预览组件与清洗算子增强,deepflow 改名为 deep-flow
本次同步 09-12 至 09-28 的代码变更,主要内容:

新增功能
- 修改密码:后端新增 ChangePasswordRequest DTO 与UserController/UserService
  对应接口,前端新增 ChangePasswordDialog 并在 Header 接入入口
- 文件预览组件重构:file-preview 目录拆分出 VideoPreview(支持 blobUrl 直传)、
  ImagePreview、AudioPreview,index.tsx 统一调度各类型预览器
- 新增 my_ops 算子模块:markitdown_parser、mineru_pdf_parser、text_quality_evaluator
- 新增 tools/minio-file-server MinIO 文件服务

功能增强
- 数据清洗:cleaning_task_service/scheduler/routes 重构,
  data_juicer_executor 与 wrapper 增强,OperatorTable/LogsTable/TaskDetail 同步调整
- 数据标注:annotation sync.py、project.py 接口与schema 更新
- 数据采集、算子市场、首页与菜单路由相关页面调整
- DataJuicer 算子接入(useOperatorOperations、dj_ops_schema)

结构调整
- deepflow/ 更名为 deep-flow/(419 个文件重命名)
- 新增 helm 部署编排、GitHub Actions 之外的自建镜像构建脚本

未纳入本次提交
- scripts-backup/、runtime/python-executor-backup/、components_backup/(备份目录)
- *.backup*、__pycache__ 产物
- zh_core_web_sm-3.8.0-py3-none-any.whl(46MB 构建产物)
- DataX/(内嵌独立仓库,远程亦未收录其源码)
2026-10-03 22:44:56 +08:00

28 lines
143 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
define('modules/pc/static/index',['@baidu/inject-js','@baidu/search-api','modules/pc/static/page/main-page.module','modules/pc/static/services/peak-style/peak-style.service','modules/pc/static/services/head-gradient/head-gradient.service','modules/pc/static/services/isui-head-fixed/isui-head-fixed.service','modules/pc/static/services/outline-safari/outline-safari.service','modules/pc/static/services/utils/utils.service','modules/pc/static/services/hydrate/hydrate.service','modules/pc/static/services/spy-cache/spy-cache.service','modules/pc/static/services/perf-log/perf-log.service','modules/pc/static/services/right-fixed/right-fixed.service','modules/pc/static/services/right-ceiling/right-ceiling.service','modules/pc/static/services/right-ai-accompanies-ceiling/right-ceiling.service','modules/pc/static/services/quit-dialog/quit-dialog.service','modules/pc/static/services/shortcut-key/shortcut-key.service','modules/pc/static/services/select-search/select-search.service','modules/pc/static/services/search-tag-fixed/search-tag-fixed.service','modules/pc/static/services/recommend/recommend.service','modules/pc/static/services/increase/increase.service','modules/pc/static/services/head-hidden-toggle/head-hidden-toggle.service','modules/pc/static/services/card-click-hijack/card-click-hijack.service','modules/pc/static/services/load-more/results-page-context','modules/pc/static/services/load-more/page-load-more.service'],(function(e,i,s,c,r,a,v,t,d,h,g,l,o,n,f,u,p,m,y,k,x,j,q,b){;}));
;define('modules/pc/static/services/head-hidden-toggle/head-hidden-toggle.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api'],(function(e,t,a,n){;"use strict";var i=function(){function e(e){this.document=e,this.initToggleHead()}return e.prototype.initToggleHead=function(){var e=this;bds&&bds.event&&bds.event.on("card.toggleHead",(function(t){var a=e.document.getElementById("wrapper");if(a){var n=t&&t.data&&"hide"===t.data.status;a.classList.toggle("head-hidden",!!n)}}))},e=t.__decorate([a.injectable,t.__param(0,a.inject(n.index_pc.DOCUMENT_TOKEN)),t.__metadata("design:paramtypes",[Document])],e)}(),d=Object.freeze({__proto__:null,HeadHiddenToggle:i});e.EslModuleExport48=d;Object.keys(d).forEach(function(item){e[item]=d[item]})}));
;define('modules/pc/static/services/head-gradient/head-gradient.service',['exports','head-script/pc/static/index','@baidu/inject-js','modules/pc/static/services/peak-style/peak-style.service','@baidu/search-api'],(function(t,e,n,a,i){;"use strict";var r=function(){function t(t,e,n){var a=this;this._styleText="",this.useStyle=!0,this.styleTpl={direction:"bottom",distance:[15,32,50,70]},this.node=t.getElementById("head"),this.peakStyle=n;var r=/MSIE[^;]+;/.exec(e.userAgent)||[],o=parseInt(r[0]?r[0].replace(/(MSIE|;)/g,""):"10",10);this.canIWork=o>=10,i.index_pc.event.on("pz.headgradient",(function(t){var e,n=(e=t.data).target,i=e.defer;a.peakStyle.get("isHit")&&a.gradientAnimate(n,i)}))}return t.prototype.styleText=function(){return this._styleText},t.prototype.setStyleText=function(t){this.canIWork&&(this._styleText=t,this.node.style.background=this.useStyle?this.styleText():"")},t.prototype.dataToStyle=function(t){var e,n=(e=this.styleTpl).direction,a=e.distance,i=t.map((function(t,e){return"rgba(".concat(t.map((function(t,e){return 3===e?t:Math.round(t)})).join(", "),") ").concat(a[e]?a[e]+"px":"")}));return"linear-gradient(to ".concat(n,", ").concat(i.join(", "),")")},t.prototype.styleToData=function(t){return(t.match(/rgba\([^\)]+/g)||[]).map((function(t){return t.replace("rgba(","").split(",").map((function(t){return parseFloat(t)}))}))},t.prototype.initStyle=function(t){var n=t.split(",").map((function(t){return parseInt(t,10)}));return[1,.85,.6,0,0].map((function(t){return e.__spreadArray(e.__spreadArray([],e.__read(n),!1),[t],!1)}))},t.prototype.gradientAnimate=function(t,e){var n=this;if(this.canIWork){var a,i=this.styleToData(this.styleText()),r=i.map((function(e,n){var a=t[n]||e;return e.map((function(t,e){return(a[e]||0===a[e]?a[e]:t)-t}))})),o=0,s=0,c=function(t){void 0===t&&(t=0);var p=a?t-a:0;o+=p,a=t;var u=e&&p<e?p/e:1;s+=u,i=i.map((function(t,e){return t.map((function(t,n){return t+r[e][n]*u}))})),n.setStyleText(n.dataToStyle(i)),o<e&&s<1&&window.requestAnimationFrame&&window.requestAnimationFrame(c)};c()}},t.prototype.updated=function(){var t=this.peakStyle.get("isHit"),e=this.peakStyle.get("color"),n=t&&e?this.dataToStyle(this.initStyle(e)):"";this.setStyleText(n)},t.prototype.show=function(){this.useStyle=!0,this.setStyleText(this.styleText())},t.prototype.hide=function(){this.useStyle=!1,this.setStyleText(this.styleText())},t=e.__decorate([n.injectable,e.__param(0,n.inject(i.index_pc.DOCUMENT_TOKEN)),e.__param(1,n.inject(i.index_pc.NAVIGATOR_TOKEN)),e.__param(2,n.inject(a.PeakStyle)),e.__metadata("design:paramtypes",[Document,Navigator,a.PeakStyle])],t)}(),o=Object.freeze({__proto__:null,HeadGradient:r});t.EslModuleExport43=o;Object.keys(o).forEach(function(item){t[item]=o[item]}),t.HeadGradient=r}));
;define('modules/pc/static/services/quit-dialog/quit-dialog.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api'],(function(n,t,i,c){;"use strict";var s=function(){function n(n){this.log=n,this.renderDOM(),this.bindEvent()}return n.prototype.renderDOM=function(){$("body").append('\n <div class="search-quit-dialog-wrap new-pmd">\n <div class="mask"></div>\n <div class="popup-box">\n <div class="head">\n <div class="title">您确定要退出吗?</div>\n <span class="iconfont dialog-close">&#xe610;</span>\n </div>\n <div class="body">\n 退出后,个人中心、账号设置、意见反馈等功能将无法使用。\n </div>\n <div class="bottom">\n <button class="c-btn exit">退出</button>\n <button class="c-gap-left-large c-btn c-btn-primary confirm">保持登录</button>\n </div>\n </div>\n </div>\n ')},n.prototype.bindEvent=function(){var n=this,t=$(".search-quit-dialog-wrap"),i=$(".search-quit-dialog-wrap .dialog-close"),c=$(".search-quit-dialog-wrap .exit"),s=$(".search-quit-dialog-wrap .confirm");i.on("click",(function(){t.hide(),n.log.send({rsv_ct:"5",rsv_cst:"2"})})),c.on("click",(function(){t.hide(),n.log.send({rsv_ct:"5",rsv_cst:"3"}),location.href="http://passport.baidu.com/?logout&tpl=mn&u="})),s.on("click",(function(){t.hide(),n.log.send({rsv_ct:"5",rsv_cst:"4"})}))},n=t.__decorate([i.injectable,t.__param(0,i.inject(c.index_pc.Log)),t.__metadata("design:paramtypes",[c.index_pc.Log])],n)}(),o=Object.freeze({__proto__:null,QuitDialog:s});n.EslModuleExport57=o;Object.keys(o).forEach(function(item){n[item]=o[item]})}));
;define('modules/pc/static/services/peak-style/peak-style.service',['exports','head-script/pc/static/index','@baidu/inject-js'],(function(t,e,a){;"use strict";var n=function(){function t(){this.data={}}return t.prototype.updated=function(){this.data=e.getInitData("peak-style-data")||{}},t.prototype.get=function(t){return this.data[t]},t=e.__decorate([a.injectable,e.__metadata("design:paramtypes",[])],t)}(),i=Object.freeze({__proto__:null,PeakStyle:n});t.EslModuleExport42=i;Object.keys(i).forEach(function(item){t[item]=i[item]}),t.PeakStyle=n}));
;define('modules/pc/static/services/increase/increase.service',['require','exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api'],(function(e,i,t,n,o){;"use strict";var r=function(){function i(e,i,t,n){var o=this;this.invokeService=e,this.query=i,this.sampleService=t,this.require=n,this.pos=[1,2,3,4,5,6,7,8,9,10,16,17],this.tipbox=null,this.isClick=!1,this.invokeService.isIPad()&&this.sampleService.hitSample("pc_recommend_invoke")&&(bds&&bds.util&&(bds.util.increaseService=this),this.getInvokeInfo(),$("body").on("click","div[data-invoke-info]",(function(e){var i=$(e.target).data("invoke-info");o.invokeApp(i?+i.posid:null)})),window.addEventListener("click",(function(){o.isClick=!0})))}return i.prototype.getInvokeInfo=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,i=this;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.invokeService.init()];case 1:return t.sent(),e={invoke_info:this.pos.reduce((function(e,t){return e["pos_".concat(t)]=[{url:"",query:i.query.get("query")}],e}),{})},[4,this.invokeService.getInvokeInfos(e)];case 2:return t.sent(),[4,this.getTipbox()];case 3:return t.sent(),this.showTipBox(),this.showBanner(),[2]}}))}))},i.prototype.execInvoke=function(e){return this.invokeService.execInvoke(e)},i.prototype.isIPad=function(){return this.invokeService.isIPad()},i.prototype.canInvoke=function(e){return this.isIPad()&&this.invokeService.hitMcp(e)&&this.invokeService.canInvoke(e)},i.prototype.invokeApp=function(e){null!==e&&this.canInvoke(e)&&this.invokeService.execInvoke(e)},i.prototype.isInteract=function(){return this.isClick||window.screenTop>0},i.prototype.showTipBox=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,i,n,o,r=this;return t.__generator(this,(function(t){if(e=this.invokeService.getOneInvokeInfo(8),i=parseInt(localStorage.getItem("mcpTipBoxShowTime")||"0",10),(new Date).getTime()>i&&this.invokeService.hitMcp(8)&&e&&e.ext)try{n=JSON.parse(e.ext),o=+n.waitTime||3,setTimeout((function(){r.isInteract()||r.tipbox.showTipBox(n)}),1e3*o)}catch(c){}return[2]}))}))},i.prototype.showBanner=function(){var e=document.querySelector(".bds-lead-ipad"),i=this.invokeService.getOneInvokeInfo(10);if(e&&i&&i.ext)try{var t=JSON.parse(i.ext);this.tipbox.showBanner(t)}catch(n){}},i.prototype.getTipbox=function(){return t.__awaiter(this,void 0,void 0,(function(){var i=this;return t.__generator(this,(function(t){return this.tipbox?[2,Promise.resolve()]:[2,new Promise((function(t){new Promise((function(i,t){e(['ipad/pc/static/tipbox'],i,t)})).then((function(e){i.tipbox=e(),t("")}))}))]}))}))},i=t.__decorate([n.injectable,t.__param(3,n.inject(o.index_pc.REQUIRE_TOKEN)),t.__metadata("design:paramtypes",[o.index_pc.MCPInvokeService,o.index_pc.Query,o.index_pc.Sample,Function])],i)}(),c=Object.freeze({__proto__:null,IncreaseService:r});i.EslModuleExport63=c;Object.keys(c).forEach(function(item){i[item]=c[item]})}));
;define('modules/pc/static/services/isui-head-fixed/isui-head-fixed.service',['exports','head-script/pc/static/index','@baidu/inject-js','modules/pc/static/services/peak-style/peak-style.service','modules/pc/static/services/head-gradient/head-gradient.service','@baidu/search-api'],(function(e,t,i,s,o,n){;"use strict";var a=function(){function e(e,t,i){this.node=e.querySelector("#head"),this.peakStyle=t,this.headGradient=i,this.DOWN_POS=0,this.time=0,this.timeoutId=null,this.originTop=window.pageYOffset||e.documentElement.scrollTop,this.getDownPos(),this.scrollHandler(),window.addEventListener?window.addEventListener("scroll",this.scrollHandler.bind(this)):window.attachEvent("onscroll",this.scrollHandler.bind(this))}return e.prototype.hasClass=function(e){return!!this.node&&this.node.className.split(" ").some((function(t){return t.trim()===e}))},e.prototype.addClass=function(e){if(!this.hasClass(e)&&this.node){var t=this.node.className+" ".concat(e);this.node.className=t.trim()}},e.prototype.removeClass=function(e){if(this.hasClass(e)&&this.node){var t=new RegExp(e,"g"),i=this.node.className.replace(t,"");this.node.className=i.trim()}},e.prototype.scrollHandler=function(){var e=this,t=this.DOWN_POS||0;document.querySelector(".aging-tools-gap")&&(t=96),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.timeoutId=window.setTimeout((function(){var i=window.pageYOffset||document.documentElement.scrollTop,s=e.peakStyle.get("isHit");e.timeoutId=window.setTimeout((function(){i<t+40?(e.removeClass("s_down"),s&&(e.removeClass("peak-down"),e.headGradient.show())):(e.addClass("s_down"),s&&(e.addClass("peak-down"),e.headGradient.hide()))}),0)}),this.time||0)},e.prototype.getDownPos=function(){var e=document.querySelector(".c-onlyshow-toppic");this.DOWN_POS=e?.88*e.offsetHeight:0},e.prototype.updated=function(){this.getDownPos(),this.originTop=window.pageYOffset||document.documentElement.scrollTop,this.time=this.peakStyle.get("isHit")?0:50},e=t.__decorate([i.injectable,t.__param(0,i.inject(n.index_pc.DOCUMENT_TOKEN)),t.__param(1,i.inject(s.PeakStyle)),t.__param(2,i.inject(o.HeadGradient)),t.__metadata("design:paramtypes",[Document,s.PeakStyle,o.HeadGradient])],e)}(),d=Object.freeze({__proto__:null,IsuiHeadFixed:a});e.EslModuleExport44=d;Object.keys(d).forEach(function(item){e[item]=d[item]})}));
;define('modules/pc/static/services/card-click-hijack/card-click-hijack.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api'],(function(t,e,i,c){;"use strict";var n=".click-area-exp-no-click",r=function(){function t(t){this.container=null,this.document=t,this.container=this.document.getElementById("wrapper"),this.initClickHijack()}return t.prototype.initClickHijack=function(){var t=this,i=this.container;i&&(i.addEventListener("mousedown",(function(i){var c,r=i.target;if(!r.closest(n)&&!r.closest("a")){var a=t.getTitle(r);if(a){r.classList.add("OP_LOG_LINK");var l=a.getAttribute("href"),o=null===(c=a.textContent)||void 0===c?void 0:c.trim();if(l){var s={};try{s=JSON.parse(r.getAttribute("data-click")||"{}")}catch(i){}r.setAttribute("data-click",JSON.stringify(e.__assign({url:l,title:o},s)))}}}})),i.addEventListener("click",(function(e){var i,c=e.target;if(!(null===(i=window.getSelection())||void 0===i?void 0:i.toString())&&!c.closest(n)&&!c.closest("a")){var r=t.getTitle(c);r&&r.click()}})))},t.prototype.getTitle=function(t){if(!t.closest('.c-container[tpl="www_index"], .c-container[tpl="www_text"], .c-container[tpl="www_struct"]'))return null;if(!!!t.closest(".click-area-exp-block"))return null;var e=t.closest(".click-area-exp-container");return e&&e.querySelector(".click-area-exp-title a")},t=e.__decorate([i.injectable,e.__param(0,i.inject(c.index_pc.DOCUMENT_TOKEN)),e.__metadata("design:paramtypes",[Document])],t)}(),a=Object.freeze({__proto__:null,CardClickHijack:r});t.EslModuleExport51=a;Object.keys(a).forEach(function(item){t[item]=a[item]})}));
;define('modules/pc/static/services/utils/utils.service',['exports','head-script/pc/static/index','@baidu/inject-js'],(function(t,e,i){;"use strict";var n=function(){function t(){this.ua=navigator.userAgent}return t.prototype.isIPad=function(){var t=this.ua;return/macintosh|mac os x/i.test(t)&&window.screen.height>window.screen.width&&!t.match(/(iPhone\sOS)\s([\d_]+)/)||t.match(/(iPad).*OS\s([\d_]+)/)},t.prototype.isIE=function(){var t=this.ua;return/(MSIE \d+)|Trident\/\d+/.test(t)},t=e.__decorate([i.injectable,e.__metadata("design:paramtypes",[])],t)}(),r=Object.freeze({__proto__:null,UtilsService:n});t.EslModuleExport46=r;Object.keys(r).forEach(function(item){t[item]=r[item]})}));
;define('@baidu/www-api',['exports','@baidu/search-api'],(function(e,n){;"use strict";var i=Object.freeze({__proto__:null,AlaLog:n.index_pc.AlaLog,AladdinUtils:n.index_pc.AladdinUtils,CodeCover:n.index_pc.CodeCover,DOCUMENT:n.index_pc.DOCUMENT_TOKEN,Device:n.index_pc.Device,EVENT_TYPE:n.index_pc.EVENT_TYPE,EventEmitter:n.index_pc.EventEmitter,HttpsDomain:n.index_pc.HttpsDomain,InvokeService:n.index_pc.InvokeService,LOCAL_STORAGE:n.index_pc.LOCAL_STORAGE_TOKEN,Log:n.index_pc.Log,Login:n.index_pc.Login,MCPInvokeService:n.index_pc.MCPInvokeService,MidLog:n.index_pc.MidLog,NAVIGATOR:n.index_pc.NAVIGATOR_TOKEN,PERFORMANCE:n.index_pc.PERFORMANCE_TOKEN,Query:n.index_pc.Query,SCOPE_TOKEN:n.index_pc.SCOPE_TOKEN,Sample:n.index_pc.Sample,SanOption:n.index_pc.SanOption,SanOptionProvider:n.index_pc.SanOptionProvider,Scope:n.index_pc.Scope,TtsInteract:n.index_pc.TtsInteract,UbcLog:n.index_pc.UbcLog,User:n.index_pc.User,WebbInstance:n.index_pc.WebbInstance,XPath:n.index_pc.XPath,event:n.index_pc.event});e.EslModuleExport40=i;Object.keys(i).forEach(function(item){e[item]=i[item]})}));
;define('modules/pc/static/services/outline-safari/outline-safari.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api'],(function(t,e,i,n){;"use strict";var a="data-tabindex-click",s="no-outline-while-click",r=function(){function t(t,e){var i=this;this.hasHidden=!1,this.visiableChangeTimeout=0;var n,a=e.userAgent.toLocaleLowerCase();(/safari/.test(n=a)&&!/chrome/.test(n)&&!/chromium/.test(n)||function(t){var e=/chrome\/([\d.]+)/.exec(t);return!!e&&parseInt(e[1].split(".")[0],10)<=90}(a))&&(t.addEventListener("focus",(function(t){return i.focus(t)}),!0),t.addEventListener("blur",(function(t){return i.blur(t)}),!0),t.addEventListener("mousedown",(function(t){return i.mouseDown(t)}),!0),t.addEventListener("visibilitychange",(function(){return i.visibilityChange()}),!0))}return t.prototype.blur=function(t){var e=t.target;e.hasAttribute("tabindex")&&(e.hasAttribute(a)||this.hasHidden)&&(e.classList.contains(s)&&e.classList.remove(s),e.removeAttribute(a))},t.prototype.focus=function(t){var e=t.target;e.hasAttribute("tabindex")&&(e.hasAttribute(a)||this.hasHidden)&&(e.classList.contains(s)||e.classList.add(s))},t.prototype.mouseDown=function(t){t.composedPath&&t.composedPath().filter((function(t){return t.hasAttribute&&t.hasAttribute("tabindex")})).forEach((function(t){return t.setAttribute(a,"")}))},t.prototype.visibilityChange=function(){var t=this;"hidden"===document.visibilityState?this.hasHidden=!0:(window.clearTimeout(this.visiableChangeTimeout),this.visiableChangeTimeout=window.setTimeout((function(){t.hasHidden=!1}),700))},t=e.__decorate([i.injectable,e.__param(0,i.inject(n.index_pc.DOCUMENT_TOKEN)),e.__param(1,i.inject(n.index_pc.NAVIGATOR_TOKEN)),e.__metadata("design:paramtypes",[Document,Navigator])],t)}(),o=Object.freeze({__proto__:null,OutlineSafari:r});t.EslModuleExport45=o;Object.keys(o).forEach(function(item){t[item]=o[item]})}));
;define('modules/pc/static/services/spy-cache/spy-cache.service',['exports','head-script/pc/static/index','@baidu/inject-js','spy-client/dist/spy-local-cache','@baidu/search-api'],(function(e,t,a,o,n){;"use strict";var c=function(){function e(e){var t=this;this.query=e,this.spyCache=new o({maxRecordLen:150,onFlush:c.getFlushFun(),storage:"localstorage",key:"SpyLocalCache",compress:"no"}),window.onbeforeunload=function(){t.spyCache.save()}}var c;return c=e,e.getFlushFun=function(){return function(e){var t,a,o,n;e.length&&(t=e,a=bds.comm.ishome?"1_79":"1_87",o="https://sp1.baidu.com/5b1ZeDe5KgQFm2e88IuM_a/mwb2.gif?pid="+a+"&type=except&group=localcache",n=JSON.stringify({pid:a,type:"except",group:"localcache",ts:Date.now(),lid:t[0].qid,info:{msg:"webb sdk localcache",pageUrl:location.href,log:JSON.stringify(t)}}),navigator.sendBeacon&&navigator.sendBeacon(o,n)||$.ajax({method:"POST",contentType:"application/json; charset=utf-8",dataType:"json",xhrFields:{withCredentials:!0},url:o,data:n}))}},e.prototype.sendLog=function(e){var a=this.query.get("qid")||bds.comm.qid||bds.comm.queryId;this.spyCache.addLog(t.__assign(t.__assign({},e),{url:window.location.href,lid:a}))},e=c=t.__decorate([a.injectable,t.__metadata("design:paramtypes",[n.index_pc.Query])],e)}(),i=Object.freeze({__proto__:null,SpyCacheService:c});e.EslModuleExport52=i;Object.keys(i).forEach(function(item){e[item]=i[item]}),e.SpyCacheService=c}));
;define('modules/pc/static/services/perf-log/perf-log.service',['exports','head-script/pc/static/index','@baidu/inject-js','modules/pc/static/services/spy-cache/spy-cache.service','@baidu/search-api'],(function(e,t,n,i,o){;"use strict";var a=!!bds.comm.ishome,r=function(){function e(e,t,n,i,o){/msie [6-8]\b/.test(o.userAgent.toLowerCase())||(this.wwwWebb=t.getInstance("1_87"),this.query=e,this.spyCacheService=n,!a&&this.sendFsLog(i),a=!0)}return e.prototype.sendFsLog=function(e){var t=this,n=this.query.get("qid");this.wwwWebb.updateOption({lid:n}),window.addEventListener("load",(function(){var e=t.getPfTime();"1"===t.query.get("alwaysMonitor")&&(e.alwaysMonitor=1),t.wwwWebb.sendPfLog(e,{env:"pc"},{group:"fs",saveLocal:!0}),t.spyCacheService.sendLog({pid:bds.comm.ishome?"1_79":"1_87",lid:n,group:"fs",info:e})}))},e.prototype.sendAsyncLog=function(){var e=this.query.get("qid");this.wwwWebb.updateOption({lid:e});var t=cacheItem.log,n={cusReq:1===t.frcache?1:t.ntime,req:t.ntime,domTime:t.domtime,waitTime:t.waittime};this.wwwWebb.sendPfLog(n,{env:"pc"},{group:"async",saveLocal:!0})},e.prototype.getPfTime=function(){var e={},t=window.performance.timing,n=t.navigationStart||t.fetchStart;if(e.dns=t.domainLookupEnd-t.domainLookupStart,e.tcp=t.connectEnd-t.connectStart,e.req=t.responseStart-t.requestStart,e.resp=t.responseEnd-t.responseStart,e.dom=t.domContentLoadedEventStart-t.domLoading,e.domReady=t.domContentLoadedEventStart-n,e.timingLoad=t.loadEventStart-t.domLoading,e.timingLoaded=t.loadEventStart-n,e.timingAll=t.loadEventEnd-n,performance.getEntriesByType){var i=performance.getEntriesByType("paint");i&&i.length&&i.forEach((function(t){var n=t.name,i=t.duration,o=t.startTime,a=Math.ceil(i+o);"first-paint"===n&&(e.timingFP=a),"first-contentful-paint"===n&&(e.timingFCP=a)}))}return e},e=t.__decorate([n.injectable,t.__param(3,n.inject(o.index_pc.PERF_SYNC_DATA_TOKEN)),t.__param(4,n.inject(o.index_pc.NAVIGATOR_TOKEN)),t.__metadata("design:paramtypes",[o.index_pc.Query,o.index_pc.WebbInstance,i.SpyCacheService,Object,Navigator])],e)}(),s=Object.freeze({__proto__:null,PerfLog:r});e.EslModuleExport53=s;Object.keys(s).forEach(function(item){e[item]=s[item]})}));
;define('modules/pc/static/services/search-tag-fixed/search-tag-fixed.service',['exports','head-script/pc/static/index','@baidu/inject-js','cosmic/toast'],(function(t,e,o,n){;"use strict";var s=n["default"],l=function(){function t(){this.searchTag=$("#searchTag"),s.baseTop=120,0!==this.searchTag.length&&(this.searchTag.length>0&&(s.baseTop=150),this.headWrap=$("#head"),this.scroll(),this.scrollFunc=this.throttle(this.scroll.bind(this),50),window.addEventListener?window.addEventListener("scroll",this.scrollFunc):window.attachEvent("scroll",this.scrollFunc))}return t.prototype.scroll=function(){var t=this.searchTag,e=this.headWrap,o=document.documentElement.scrollTop||document.body.scrollTop;o>38?(null==t||t.addClass("tag-fixed"),null==e||e.addClass("no-box-shadow")):o<=0&&(null==t||t.removeClass("tag-fixed"),null==e||e.removeClass("no-box-shadow"))},t.prototype.throttle=function(t,e){var o,n,s=this,l=0,r=0,a=function(){r=+new Date,l=0,t.call(o,n)};return function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];var d=+new Date,h=e-(d-r);o=s,n=c,h<=0||h>e?(l&&(clearTimeout(l),l=0),r=d,t.call(o,c)):l||(l=window.setTimeout(a,h))}},t.prototype.destroy=function(){var t=this;this.scrollFunc&&(window.removeEventListener?window.removeEventListener("scroll",(function(){return t.scrollFunc})):window.detachEvent("scroll",this.scrollFunc))},t=e.__decorate([o.injectable,e.__metadata("design:paramtypes",[])],t)}(),r=Object.freeze({__proto__:null,SearchTagFixed:l});t.EslModuleExport61=r;Object.keys(r).forEach(function(item){t[item]=r[item]})}));
;define('modules/pc/static/services/right-ceiling/right-ceiling.service',['exports','head-script/pc/static/index','@baidu/search-api','@baidu/inject-js'],(function(t,i,e,s){;"use strict";var n=function(){function t(t){this.NO_TAG_OFFSET=28,this.MIN_FIXED_HEIGHT=26,this.SCROLL_Y_OFFSET=42,this.WINDOW_MARGIN=8,this.AI_ACCOMPANIES_CEILING_HEIGHT=55,this.query=t,this.observer=null;var i=$("#head").height(),e=$("#page").height()||0,s=$("#foot").height()||0;this.headHeight=i||70,this.bottomHeight=e+s+30,this.screenHeight=screen.height,this.wrapHeight=$("#content_right").height()||0,this.fixedHeight=0,this.adFixedHeight=0,this.isNoFixed=!1,this.offsetTop=0;var a=$("#searchTag");this.tagHeight=a.length>0&&a.outerHeight()||0,this.hasTag=this.tagHeight>0,this.fixedClass=this.hasTag?"right-ceiling-has-tag":"right-ceiling",this.adLength=$("#con-right-bottom").children().length,this.TAG_OFFSET=110,this.HAS_TAG_HEIGHT=140,this.NO_TAG_HEIGHT=90,this.fixedClassTop=this.hasTag?this.HAS_TAG_HEIGHT:this.NO_TAG_HEIGHT,this.hasAIAccompaniesCard=$('#content_right [tpl="ai_accompanies"]').length>0,this.aiContainer=null,this.query.get("topicPn")||n.activeInstance||(n.activeInstance=this,this.init())}var n;return n=t,t.prototype.init=function(){this.setScrollData(),this.scrollFunc=this.scrollFixed.bind(this),this.resizeFunc=this.onResize.bind(this),$(window).on("scroll",this.scrollFunc),$(window).on("resize",this.resizeFunc),this.observeContentRightChanges(),this.hasAIAccompaniesCard&&this.observeAIAccompanies()},t.prototype.observeAIAccompanies=function(){var t=this,i=$('#content_right [tpl="ai_accompanies"]').find("#ai-accompanies-container");if(this.aiContainer=i.length?i:null,this.aiContainer){this.aiContainer.on("aiAccompaniesCeiling",(function(){setTimeout((function(){t.setScrollData(),t.scrollFixed()}),50)})),this.aiContainer.on("aiAccompaniesCancelCeiling",(function(){t.setScrollData(),t.scrollFixed()})),this.aiContainer.on("aiAccompaniesFinish",(function(){setTimeout((function(){t.setScrollData(),t.scrollFixed()}),20)}))}},t.prototype.observeContentRightChanges=function(){var t=$("#content_right").get(0);if(window.ResizeObserver){var i=new window.ResizeObserver(this.resizeObserverCb.bind(this));null==i||i.observe(t)}else{var e=new window.MutationObserver(this.mutationObserverCb.bind(this));null==e||e.observe(t,{attributes:!0,childList:!0,subtree:!0})}},t.prototype.onResize=function(){var t=this;this.screenHeight=screen.height,this.setScrollData();var i=$("#con-ceiling-wrapper");this.isNoFixed&&i.hasClass(this.fixedClass)&&(i.removeClass(this.fixedClass),i.css("transform",""),setTimeout((function(){t.setScrollData()}),50))},t.prototype.resizeObserverCb=function(){var t=$("#con-ceiling-wrapper");if(!($("#fb_baidu_right_dialog").height()||0)){var i=$("#content_right").height()||0;t.hasClass(this.fixedClass)?i+=t.height()||0:this.wrapHeight!==i&&(this.setScrollData(),this.wrapHeight=i)}},t.prototype.mutationObserverCb=function(t){var e,s,n=$("#con-ceiling-wrapper");if(!($("#fb_baidu_right_dialog").height()||0))try{for(var a=i.__values(t),o=a.next();!o.done;o=a.next()){var h=o.value,r=h.target&&h.target.className||"",c=r.indexOf("button")>-1||r.indexOf("c-icon")>-1;if("childList"===h.type&&!c){var l=$("#content_right").height()||0;if(n.hasClass(this.fixedClass))return void(l+=n.height()||0);this.wrapHeight!==l&&(this.setScrollData(),this.wrapHeight=l)}}}catch(g){e={error:g}}finally{try{o&&!o.done&&(s=a["return"])&&s.call(a)}finally{if(e)throw e.error}}},t.prototype.setScrollData=function(){var t;$("#con-ceiling-wrapper").hasClass(this.fixedClass)||(this.offsetTop=this.getOffsetTop());var i=($(window).scrollTop()||0)>0?this.SCROLL_Y_OFFSET:0,e=this.hasTag?this.TAG_OFFSET-i:this.NO_TAG_OFFSET;this.fixedHeight=Math.max(this.offsetTop-this.headHeight-e,this.MIN_FIXED_HEIGHT);var s=(null===(t=$("#con-right-bottom").offset())||void 0===t?void 0:t.top)||0,n=$("#con-right-bottom").height()||0;this.adFixedHeight=s+n-this.headHeight;var a=this.getCeilingWrapperFullHeight(),o=($(window).height()||0)<=this.headHeight+this.tagHeight+this.bottomHeight+a+this.WINDOW_MARGIN;this.isNoFixed=o},t.prototype.getCeilingWrapperFullHeight=function(){var t=document.querySelector("#con-ceiling-wrapper");if(!t)return 0;var i=0;return Array.from(t.children).forEach((function(t){var e=getComputedStyle(t);i+=t.offsetHeight+parseFloat(e.marginBottom)})),i},t.prototype.getOffsetTop=function(){var t;return(null===(t=$("#con-ceiling-wrapper").offset())||void 0===t?void 0:t.top)||0},t.prototype.scrollFixed=function(){var t=this;if(!this.isNoFixed){var i=this.fixedClass,e=$(window).scrollTop()||0,s=$(window).scrollLeft()||0,n=$("#con-ceiling-wrapper"),a=$("#con-right-bottom").height()||0,o=n.hasClass(i),h=this.AI_ACCOMPANIES_CEILING_HEIGHT,r=this.adLength&&a?this.adFixedHeight:this.fixedHeight;this.hasAIAccompaniesCard&&(r-=h);var c=e>=r;c&&!o&&(n.addClass(i),this.hasAIAccompaniesCard&&n.css("top","".concat(h+this.fixedClassTop,"px"))),this.hasAIAccompaniesCard&&o&&n.css("top","".concat(h+this.fixedClassTop,"px"));var l=this.hasTag&&this.fixedHeight===this.MIN_FIXED_HEIGHT;(l&&e<=0||!l&&!c)&&o&&(n.removeClass(i),n.css("transform",""),this.hasAIAccompaniesCard&&n.css("top",""),setTimeout((function(){t.setScrollData()}),50)),c&&n.css("transform","translateX(".concat(-s,"px)"))}},t.prototype.destroy=function(){this.scrollFunc&&$(window).off("scroll",this.scrollFunc),this.resizeFunc&&$(window).off("resize",this.resizeFunc),this.observer&&this.observer.disconnect(),this.aiContainer&&(this.aiContainer.off("aiAccompaniesCeiling"),this.aiContainer.off("aiAccompaniesCancelCeiling"),this.aiContainer=null),n.activeInstance===this&&(n.activeInstance=null)},t.activeInstance=null,t=n=i.__decorate([s.injectable,i.__metadata("design:paramtypes",[e.index_pc.Query])],t)}(),a=Object.freeze({__proto__:null,RightCeiling:n});t.EslModuleExport55=a;Object.keys(a).forEach(function(item){t[item]=a[item]})}));
;define('modules/pc/static/services/shortcut-key/shortcut-key.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api'],(function(t,e,i,o){;"use strict";var s=function(){function t(t){navigator.userAgent.indexOf("iPad")>-1||(this.log=t,this.toastDuration=5e3,this.isShowToast=!0,this.punctuationKey=[8,106,107,109,110,186,187,188,189,190,192,219,220,221,222],this.searchToastDom=$(".search-keyboard-toast"),this.bindEvent())}return t.prototype.bindEvent=function(){var t=this;document.addEventListener("keydown",(function(e){var i,o,s,n=e.keyCode,a=e.ctrlKey||e.metaKey,r=t.searchToastDom;if(!(a||e.altKey||e.shiftKey||(r&&r.length>0&&"none"===r[0].style.display&&(t.isShowToast=!0),t.currentHasFocus()||t.hasMask())))if(t.isContentEditKey(n))t.showToast();else if(t.isShortcutKey(n)){e.preventDefault(),t.hideToast(!0);var h=$("#kw"),c=null===(i=h.val())||void 0===i?void 0:i.toString().length;h.click(),null===(s=(o=h[0]).setSelectionRange)||void 0===s||s.call(o,c,c),h.focus(),t.log.send({rsv_ct:"7",rsv_cst:"2"})}})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&t.hideToast(!0)})),$("#kw").focus((function(){t.hideToast(!0),t.isShowToast=!0})),$(".right-icon").on("click",(function(){t.hideToast(!0),t.isShowToast=!0}))},t.prototype.currentHasFocus=function(){var t,e=$("input"),i=$("textarea"),o=!1;e.each((function(){return this!==document.activeElement||(o=!0,!1)})),o||i.each((function(){return this!==document.activeElement||(o=!0,!1)}));var s=$(".soutu-layer");return s.length>0&&"none"!==(null===(t=s[0])||void 0===t?void 0:t.style.display)&&(o=!0),o},t.prototype.showToast=function(){var t=this;this.isShowToast&&(this.searchToastDom&&this.searchToastDom.fadeIn(300),this.log.send({rsv_ct:"7",rsv_cst:"1"})),this.isShowToast=!1,this.keyTimer&&clearTimeout(this.keyTimer),this.toastTimer&&clearTimeout(this.toastTimer),this.keyTimer=setTimeout((function(){t.toastTimer=setTimeout((function(){t.hideToast(),t.isShowToast=!0}),t.toastDuration)}),500)},t.prototype.hideToast=function(t){void 0===t&&(t=!1),t?this.searchToastDom&&this.searchToastDom.hide():this.searchToastDom&&this.searchToastDom.fadeOut(300)},t.prototype.hasMask=function(){var t;return!!this.handleCurrentMaskIsShow(".search-quit-dialog-wrap",!0)||($(".pop-mask").length>0&&"none"!==(null===(t=$(".pop-mask")[0])||void 0===t?void 0:t.style.display)||(!!this.handleCurrentMaskIsShow("#_voice_mask")||(!!this.handleCurrentMaskIsShow(".bdlayer-shadow")||(!!this.handleCurrentMaskIsShow(".fb-mask")||!!this.handleCurrentMaskIsShow(".fb-baidu-wizard")))))},t.prototype.handleCurrentMaskIsShow=function(t,e){var i;return void 0===e&&(e=!1),e?"block"===(null===(i=$(t)[0])||void 0===i?void 0:i.style.display):$(t)[0]},t.prototype.isContentEditKey=function(t){var e=navigator.userAgent;return!(!e.includes("Opera")&&!e.includes("Firefox")||59!==t)||!!(this.punctuationKey.includes(t)||this.isNumberKey(t)||this.isLetterKey(t))},t.prototype.isNumberKey=function(t){return t>=48&&t<=57||t>=96&&t<=105},t.prototype.isLetterKey=function(t){return t>=65&&t<=90},t.prototype.isShortcutKey=function(t){return 191===t||111===t},t=e.__decorate([i.injectable,e.__param(0,i.inject(o.index_pc.Log)),e.__metadata("design:paramtypes",[o.index_pc.Log])],t)}(),n=Object.freeze({__proto__:null,ShortcutKey:s});t.EslModuleExport58=n;Object.keys(n).forEach(function(item){t[item]=n[item]})}));
;define('head-script/pc/static/page-log/ubc-log',['require','exports','head-script/pc/static/index','modules/pc/static/services/load-more/results-page-context'],(function(e,t,n,r){;"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t["default"]=e,Object.freeze(t)}var o=null,a={version:"2.0",page:bds.comm.ishome?"home":"a",from:"search",queryParams:{appname:"pcsearch"},useSendBeacon:1};function u(){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(n){switch(n.label){case 0:return o?[3,2]:[4,new Promise((function(t,n){e(["@baidu/ubc-report-sdk/dist/ubc-web-sdk.umd.min"],(function(e){t(i(e))}),n)}))];case 1:t=n.sent(),o=t["default"],n.label=2;case 2:return[2]}}))}))}function c(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,u()];case 1:return n.sent(),t="".concat(e,".init"),o(t,e,a),[2]}}))}))}function s(e,t,r,i){return void 0===i&&(i={}),n.__awaiter(this,void 0,void 0,(function(){return n.__generator(this,(function(a){switch(a.label){case 0:return[4,c(e)];case 1:return a.sent(),o("".concat(String(e),".event"),{type:t,value:r,ext:n.__assign({qid:bds.comm.qid||"",rsv_dl:(u="rsv_dl","undefined"!=typeof window&&window.location&&window.location.href&&new URL(window.location.href).searchParams.get(u)||"")},i)}),[2]}var u}))}))}function l(e,t,n){void 0===n&&(n={}),s(e,"click",t,n)}function d(e,t){return n.__awaiter(this,void 0,void 0,(function(){var r,i;return n.__generator(this,(function(n){switch(n.label){case 0:return r=document.getElementById("kw"),i=r instanceof HTMLInputElement?r.value:"",[4,s(e,"click","search_kuang",{pos:t,query:i})];case 1:return n.sent(),[2]}}))}))}function _(e,t){var i=(null==t?void 0:t.area)||"",o=(null==e?void 0:e.getAttribute("srcid"))||"",a=(null==e?void 0:e.getAttribute("id"))||"",u=r.getPageContextFromElement(e),c=u.pageNum,s=(null==e?void 0:e.clientHeight)||0,l=u.pn,d=0;a&&c&&(d="RIGHT"===i?Number(a):+a-l);var _=(null==e?void 0:e.firstElementChild)||null,f=_?_.getAttribute("card-show-log"):null,v={};try{f&&(v=JSON.parse(f))}catch(g){v={}}return n.__assign(n.__assign({pn:l,srcid:o,page_num:c+"",height:s+"",abs_pos:a,relative_pos:d+""},t),v)}function f(e,t,i){var o;return void 0===i&&(i="ala"),n.__awaiter(this,void 0,void 0,(function(){var a,u,c,l,d,f,v;return n.__generator(this,(function(g){switch(g.label){case 0:return a={},u={},c=!1,l=[],null==t||t.forEach((function(e){e.card_extra.isSubEl?(u=function(e){var t=null==e?void 0:e.getAttribute("sub-show-log"),n=null;try{t&&(n=JSON.parse(t))}catch(r){return null}return n}(e.el),a=_(e.card_extra.cardEl,e.card_extra),c=!0,u&&l.push(n.__assign(n.__assign({},a),{sub_valueinfo:n.__assign({},u),isSubEl:undefined,cardEl:undefined}))):(a=_(e.el,e.card_extra),l.push(a))})),c&&!l.length?[2]:(d=t&&t[0],f=(null===(o=null==d?void 0:d.card_extra)||void 0===o?void 0:o.cardEl)||(null==d?void 0:d.el),v=r.getPageContextFromElement(f),[4,s(e,"show",c?"subcard":"cardresult",{query:v.query||bds.comm.query||"",qid:v.qid||bds.comm.qid||"",card_type:i,valueInfo:l})]);case 1:return g.sent(),[2]}}))}))}var v=Object.freeze({__proto__:null,sendCardLog:f,sendClickLog:l,sendIptLog:d,sendShowLog:function(e,t,n){void 0===n&&(n={}),s(e,"show",t,n)},sendUbcLog:s});t.EslModuleExport37=v;Object.keys(v).forEach(function(item){t[item]=v[item]}),t.sendCardLog=f,t.sendClickLog=l,t.sendIptLog=d,t.sendUbcLog=s}));
;define('modules/pc/static/services/right-fixed/right-fixed.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api'],(function(t,e,i,o){;"use strict";var r=function(){function t(t){this.query=t,this.criticalHeight=0;var e=$("#head").height();this.headHeight=e?e+16:86,this.data=null,this.query.get("topicPn")&&this.init()}return t.prototype.init=function(){this.data=this.getScrollData(),this.criticalHeight=this.data.criticalHeight,this.scrollStatus(),this.scrollFunc=this.scrollStatus.bind(this,"scroll"),window.addEventListener("scroll",this.scrollFunc)},t.prototype.getScrollData=function(){var t=$(".content_right_inner"),e=this.getScrollTop(),i=($("#foot").height()||0)+($("#page").height()||0)+this.headHeight+32,o=t[0]?t[0].getBoundingClientRect().top:0;return{right:t,bodyTop:e,frameHeight:i,criticalHeight:o+e-this.headHeight}},t.prototype.scrollStatus=function(t){var e=this.data,i=e.right,o=this.getDocHeight(),r=t?this.getScrollTop():e.bodyTop,h=e.right.height()-50,s=$(".result-op[tpl=search_topic_publisher]").height()||0,c=$(window).height()||0;!t&&s<100&&(h+=176),r>this.criticalHeight&&c-this.headHeight>h&&o-r-e.frameHeight>h?(i.addClass("right-fixed"),t&&i.css({bottom:"",top:""})):o-r-e.frameHeight<=h?(t||i.addClass("right-fixed"),i.attr("style")||i.css({bottom:88,top:"auto"})):t&&i.removeClass("right-fixed")},t.prototype.getDocHeight=function(){return document.documentElement.offsetHeight||document.body.offsetHeight||0},t.prototype.getScrollTop=function(){return document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.destroy=function(){this.scrollFunc&&window.removeEventListener("scroll",this.scrollFunc)},t=e.__decorate([i.injectable,e.__metadata("design:paramtypes",[o.index_pc.Query])],t)}(),h=Object.freeze({__proto__:null,RightFixed:r});t.EslModuleExport54=h;Object.keys(h).forEach(function(item){t[item]=h[item]})}));
;define('@baidu/inject-js',['exports','head-script/pc/static/index'],(function(e,t){;"use strict";function n(e,t){Reflect.defineMetadata("design:paramtypes",e,t)}function r(e,t,n){var r="design:paramtokens:"+t;Reflect.defineMetadata(r,e,n)}function i(e){for(var t=Reflect.getMetadata("design:paramtypes",e)||[],n=[],r=0;r<t.length;r++){var i=Reflect.getMetadata("design:paramtokens:"+r,e);n.push(i||t[r])}return n}var s=function(){function e(){this._keys=[],this._values=[]}return e.prototype.set=function(e,t){for(var n=0;n<this._keys.length;n++)if(this._keys[n]===e)return void(this._values[n]=t);this._keys.push(e),this._values.push(t)},e.prototype.get=function(e){for(var t=0;t<this._keys.length;t++)if(this._keys[t]===e)return this._values[t]},e.prototype.has=function(e){return function(e,t){for(var n=0,r=e;n<r.length;n++)if(r[n]===t)return!0;return!1}(this._keys,e)},e.prototype.clear=function(){this._keys=[],this._values=[]},e.prototype.keys=function(){return this._keys},e.prototype.values=function(){return this._values},e}();function o(e,t){var n=(e.get(t)||0)-1;return e.set(t,n),n}var a=function(){function e(){this.inDegrees=new s,this.adj=new s}return e.prototype.addEdge=function(e,t){var n,r,i,s=this.adj.get(e)||[];s.push(t),this.adj.set(e,s),n=this.inDegrees,r=t,i=(n.get(r)||0)+1,n.set(r,i)},e.prototype.addVertex=function(e){this.adj.has(e)||this.adj.set(e,[])},e.prototype.popAll=function(){for(var e=[],t=[],n=0,r=this.adj.keys();n<r.length;n++){var i=r[n];this.inDegrees.get(i)||e.push(i)}for(;e.length;){var s=e.shift();t.push(s);for(var a=0,c=this.adj.get(s)||[];a<c.length;a++){var u=c[a];o(this.inDegrees,u)||e.push(u)}}return this.inDegrees.clear(),this.adj.clear(),t},e}(),c=function(){function e(e){this.services=[],this.graph=new a,this.childContainers=[],this.parent=e,this.providers=new s,this.providerClasses=new s}return e.prototype.createChildContainer=function(){var t=new e(this);return this.childContainers.push(t),t},e.prototype.getOrCreateProvider=function(e){var n=this,r=this.providers.get(e);if(r)return r;var i=this.providerClasses.get(e);if(!i){if(!this.parent)throw new Error("provider for "+e+" not found");return this.parent.getOrCreateProvider(e)}this.graph.addVertex(e);var s=i.dependencies().map((function(t){return n.providerClasses.has(t)&&n.graph.addEdge(e,t),n.create(t,e)}));return r=new(i.bind.apply(i,t.__spreadArrays([void 0],s))),this.providers.set(e,r),r},e.prototype.create=function(e,t){void 0===t&&(t=null);var n=this.getOrCreateProvider(e).create(this,t);return this.services.push(n),n},e.prototype.addService=function(e){var n=function(e){return function(){function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.instance=null,this.args=e}return n.prototype.create=function(){return this.instance||(this.instance=new(e.bind.apply(e,t.__spreadArrays([void 0],this.args)))),this.instance},n.prototype.destroy=function(){this.instance&&"function"==typeof this.instance.destroy&&this.instance.destroy()},n.dependencies=function(){return i(e)},n}()}(e);return this.addProvider(e,n)},e.prototype.addFactory=function(e,t,r){n(r,t);var s,o=(s=t,function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.instance=null,this.args=e}return e.prototype.create=function(){return this.instance||(this.instance=s.apply(void 0,this.args)),this.instance},e.prototype.destroy=function(){"function"==typeof this.instance.destroy&&this.instance.destroy()},e.dependencies=function(){return i(s)},e}());return this.addProvider(e,o)},e.prototype.addValue=function(e,t){var n=function(e){return function(){function t(){}return t.prototype.create=function(){return e},t.dependencies=function(){return[]},t}()}(t);return this.addProvider(e,n)},e.prototype.addProvider=function(e,t){if("function"!=typeof(n=t)||"function"!=typeof n.prototype.create)throw new Error('invalid provider for "'+e+'"');var n;t.dependencies||(t.dependencies=function(){return i(t)}),this.providerClasses.set(e,t)},e.prototype.getTokens=function(){return this.providerClasses.keys()},e.prototype.getServices=function(){return this.services.slice()},e.prototype.destroy=function(){for(var e=0,t=this.childContainers;e<t.length;e++){t[e].destroy()}for(var n=0,r=this.graph.popAll();n<r.length;n++){var i=r[n],s=this.providers.get(i);s&&"function"==typeof s.destroy&&s.destroy()}this.providers.clear(),this.services=[]},e}();function u(e){}function p(e){return function(t,n,i){n===undefined&&r(e,i,t)}}var d=0,h=function(){this.__id__=++d};function f(){return new h}var v=Object.freeze({__proto__:null,Container:c,createInjectToken:f,getDependencies:i,inject:p,injectable:u,setDependencies:n,setNthDependency:r}),y=Object.freeze({__proto__:null,Container:c,createInjectToken:f,getDependencies:i,inject:p,injectable:u,setDependencies:n,setNthDependency:r});e.Container=c,e.EslModuleExport39=y;Object.keys(y).forEach(function(item){e[item]=y[item]}),e.createInjectToken=f,e.esm5=v,e.getDependencies=i,e.inject=p,e.injectable=u}));
;define('modules/pc/static/services/right-ai-accompanies-ceiling/right-ceiling.service',['exports','head-script/pc/static/index','@baidu/search-api','@baidu/inject-js'],(function(i,t,e,s){;"use strict";var o=function(){function i(i){this.TAG_OFFSET=118,this.NO_TAG_OFFSET=28,this.MIN_FIXED_HEIGHT=26,this.SCROLL_Y_OFFSET=42,this.WINDOW_MARGIN=8,this.TPL_NAME="ai_accompanies",this.PSEUDO_CLASS="right-ceiling-with-pseudo",this.FIXED_DIFF_HEIGHT=14,this.query=i,this.observer=null,this.fixedBox=null,this.aiAccompaniesCard=null,this.fixedBoxHeight=0;var t=$("#head").height(),e=$("#page").height()||0,s=$("#foot").height()||0;this.headHeight=t||70,this.bottomHeight=e+s+30,this.screenHeight=screen.height,this.wrapHeight=$("#content_right").height()||0,this.fixedHeight=0,this.adFixedHeight=0,this.isNoFixed=!1,this.offsetTop=0;var o=$("#searchTag");this.tagHeight=o.length>0&&o.outerHeight()||0,this.hasTag=this.tagHeight>0,this.fixedClass=this.hasTag?"right-ai-accompanies-ceiling-has-tag":"right-ai-accompanies-ceiling",this.aiAccompaniesContainer=null,this.adLength=$("#con-right-bottom").children().length,this.pcAIAccompaniesAllCeiling=window.bds.comm.pcAIAccompaniesAllCeiling,this.query.get("topicPn")||this.init()}return i.prototype.init=function(){var i=this.returnAIAccompanies();i&&(this.aiAccompaniesCard=i,this.observeAICard(),this.setScrollData(),this.scrollFunc=this.scrollFixed.bind(this),this.resizeFunc=this.onResize.bind(this),$(window).on("scroll",this.scrollFunc),$(window).on("resize",this.resizeFunc),this.observeContentRightChanges())},i.prototype.observeAICard=function(){this.aiAccompaniesContainer=this.aiAccompaniesCard.find("#ai-accompanies-container"),this.aiAccompaniesCard.on("aiAccompaniesFinish",this.handleAIEvent.bind(this)),this.fixedBox=this.isCeilingEnabled()?this.aiAccompaniesCard.find("#ai-accompanies-container"):this.aiAccompaniesCard.find("#ai-accompanies-btn-fixed-container")},i.prototype.isCeilingEnabled=function(){return 1===this.pcAIAccompaniesAllCeiling},i.prototype.handleAIEvent=function(){var i=this;setTimeout((function(){i.setScrollData(),i.scrollFixed()}),20)},i.prototype.returnAIAccompanies=function(){var i=$('#content_right [tpl="'.concat(this.TPL_NAME,'"]'));return i.length>0?i:null},i.prototype.observeContentRightChanges=function(){var i=$("#content_right").get(0);if(window.ResizeObserver){var t=new window.ResizeObserver(this.resizeObserverCb.bind(this));null==t||t.observe(i)}else{var e=new window.MutationObserver(this.mutationObserverCb.bind(this));null==e||e.observe(i,{attributes:!0,childList:!0,subtree:!0})}},i.prototype.getCardWidth=function(){var i;return null===(i=this.aiAccompaniesCard)||void 0===i?void 0:i.width()},i.prototype.onResize=function(){var i=this;this.screenHeight=screen.height;var t=this.fixedBox.hasClass(this.fixedClass);if(t){var e=this.fixedBox.innerHeight()||0;if(this.fixedBoxHeight!==e){this.fixedBoxHeight=e;var s=this.fixedBox.next('[data-placeholder="true"]');s.length>0&&s.css("height","".concat(e,"px"))}}this.setScrollData(),this.fixedBox.css("width",this.getCardWidth()),this.isNoFixed&&t&&(this.fixedBox.removeClass(this.fixedClass),this.removeClassCb(this.fixedBox),setTimeout((function(){i.setScrollData()}),50))},i.prototype.resizeObserverCb=function(){if(!($("#fb_baidu_right_dialog").height()||0)){var i=$("#content_right").height()||0;this.fixedBox.hasClass(this.fixedClass)?i+=this.fixedBox.height()||0:this.wrapHeight!==i&&(this.setScrollData(),this.wrapHeight=i)}},i.prototype.mutationObserverCb=function(i){var e,s;if(!($("#fb_baidu_right_dialog").height()||0))try{for(var o=t.__values(i),h=o.next();!h.done;h=o.next()){var n=h.value,a=n.target&&n.target.className||"",r=a.indexOf("button")>-1||a.indexOf("c-icon")>-1;if("childList"===n.type&&!r){var c=$("#content_right").height()||0;if(this.fixedBox.hasClass(this.fixedClass))return void(c+=this.fixedBox.height()||0);this.wrapHeight!==c&&(this.setScrollData(),this.wrapHeight=c)}}}catch(d){e={error:d}}finally{try{h&&!h.done&&(s=o["return"])&&s.call(o)}finally{if(e)throw e.error}}},i.prototype.setScrollData=function(){this.fixedBox.hasClass(this.fixedClass)||(this.offsetTop=this.getOffsetTop());var i=($(window).scrollTop()||0)>0?this.SCROLL_Y_OFFSET:0,t=this.hasTag?this.TAG_OFFSET-i:this.NO_TAG_OFFSET;this.fixedHeight=Math.max(this.offsetTop-this.headHeight-t+this.FIXED_DIFF_HEIGHT,this.MIN_FIXED_HEIGHT);var e=this.fixedBox.outerHeight(!0)||0,s=($(window).height()||0)<=this.headHeight+this.tagHeight+this.bottomHeight+e+this.WINDOW_MARGIN;this.isNoFixed=s},i.prototype.getOffsetTop=function(){var i;return(null===(i=this.fixedBox.offset())||void 0===i?void 0:i.top)||0},i.prototype.addClassCb=function(i){var t=this;requestAnimationFrame((function(){t.aiAccompaniesContainer.trigger("aiAccompaniesCeiling")})),i.addClass(this.PSEUDO_CLASS).css({"z-index":2,"background-color":"#fff"})},i.prototype.removeClassCb=function(i){i.removeClass(this.PSEUDO_CLASS).css({"z-index":"","background-color":"",transform:""}),this.aiAccompaniesContainer.trigger("aiAccompaniesCancelCeiling")},i.prototype.scrollFixed=function(){var i,t=this;if(!this.isNoFixed){var e=this.fixedClass,s=$(window).scrollTop()||0,o=$(window).scrollLeft()||0,h=$("#con-right-bottom").height()||0,n=(null===(i=$("#con-right-bottom").offset())||void 0===i?void 0:i.top)||0,a=this.fixedBox.hasClass(e),r=this.adLength&&h,c=s>=(r?n+h-this.headHeight:this.fixedHeight);c&&!a&&(r?setTimeout((function(){t.fixedBox.addClass(e).css("width",t.getCardWidth())}),20):this.fixedBox.addClass(e).css("width",this.getCardWidth()),this.addClassCb(this.fixedBox));var d=this.hasTag&&this.fixedHeight===this.MIN_FIXED_HEIGHT;(d&&s<=0||!d&&!c)&&a&&(this.fixedBox.removeClass(e),this.removeClassCb(this.fixedBox),setTimeout((function(){t.setScrollData()}),50)),c&&this.fixedBox.css("transform","translateX(".concat(-o,"px)"))}},i.prototype.destroy=function(){this.scrollFunc&&$(window).off("scroll",this.scrollFunc),this.resizeFunc&&$(window).off("resize",this.resizeFunc),this.observer&&this.observer.disconnect(),this.aiAccompaniesContainer&&($(this.aiAccompaniesContainer).off("aiAccompaniesFinish"),this.aiAccompaniesContainer=null)},i=t.__decorate([s.injectable,t.__metadata("design:paramtypes",[e.index_pc.Query])],i)}(),h=Object.freeze({__proto__:null,RightAIAccompaniesCeiling:o});i.EslModuleExport56=h;Object.keys(h).forEach(function(item){i[item]=h[item]})}));
;define('modules/pc/static/services/select-search/select-search.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api','head-script/pc/static/page-log/ubc-log','cosmic/toast'],(function(e,t,n,o,c,s){;"use strict";var i=s["default"],a=function(){function e(e,t){var n=this;this.IS_SELECT_AI_GUIDE="is_select_ai_guide",this.onWrapperMousedown=function(){n.hideNode()},this.onContentLeftMouseup=function(e){setTimeout((function(){n.mouseupAction(e)}))},this.onContentRightMouseup=function(e){setTimeout((function(){n.mouseupAction(e)}))};var o=this;o.document=e,o.logServe=t,o.selectTips=undefined,$("#wrapper").on("mousedown",this.onWrapperMousedown),$("#content_left").on("mouseup",this.onContentLeftMouseup),$("#content_right").on("mouseup",this.onContentRightMouseup),this.addSelectStyle(),this.monitorQQSelectPanel()}return e.prototype.escapeHtml=function(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")},e.prototype.monitorQQSelectPanel=function(){/qqbrowser/i.test(navigator.userAgent)&&(this.qqPanelMousedownHandler=function(e){var t;if(e.target.closest("#qbSelectWordPanel")){var n="https://sp1.baidu.com/5b1ZeDe5KgQFm2e88IuM_a/mwb2.gif?"+["pid=1_87","lid="+(null===(t=window.bds.comm)||void 0===t?void 0:t.qid),"ts="+Date.now(),"type=count","group=third-party-intrusion","info="+encodeURIComponent(JSON.stringify({qqSelectPanleClk:1})),"dim="+encodeURIComponent(JSON.stringify({})),"extra="+encodeURIComponent(JSON.stringify({}))].join("&");navigator.sendBeacon&&navigator.sendBeacon(n)||((new Image).src=n)}},document.addEventListener("mousedown",this.qqPanelMousedownHandler,!0))},e.prototype.addSelectStyle=function(){if(!document.querySelector("#selection-style")){var e=document.createElement("style");e.id="selection-style",e.textContent="#content_left::selection,#content_right::selection{background:#4E6EF24C;}#content_left::-moz-selection,#content_right::-moz-selection{background:#4E6EF24C;}",document.head.appendChild(e)}},e.prototype.addSelectGuide=function(){var e=this;try{if("true"===localStorage.getItem(this.IS_SELECT_AI_GUIDE))return}catch(o){return}if(!$("#con-at").get(0)&&!$("#top-ad").get(0)){var t=$("#content_left");if($("#1").length||t.length){var n=$('\n <div class="select-search-ai-guide">\n <div class="selected-search-guide-title">\n 划选文本唤起更多功能\n <i class="selected-search-guide-close-icon">&#xe696;</i>\n </div>\n <img\n class="selected-search-guide-img"\n src="'.concat("https://psstatic.cdn.bcebos.com/basics/aichat/selected-search-guide-img_1755153246000.png",'"\n alt=""\n />\n </div>')).css({position:"absolute",left:"calc(100% + 30px)"});t.css("position","relative").append(n),$(".selected-search-guide-close-icon").on("click",(function(){e.closeGuide("close_clk")}));try{localStorage.setItem(this.IS_SELECT_AI_GUIDE,"true")}catch(c){}setTimeout((function(){e.closeGuide("show_5s")}),5e3),this.sendGuideLog("show","choose_pop_guide")}}},e.prototype.closeGuide=function(e){var t=$(".select-search-ai-guide");t.length&&t.is(":visible")&&(t.hide(),this.sendGuideLog("click","choose_pop_guide_close",e))},e.prototype.mouseupAction=function(e){try{var t=this.getSelectionContent(),n=t.selectedText,o=t.rangePos,c=this.calculateStr(n),s={top:e.pageY,left:e.pageX};this.selectSearchShow(n,o,c,e.target,s)}catch(i){console.error(i)}},e.prototype.calculateStr=function(e){for(var t=e.length,n=0,o=0;o<t;o++){if((n=null!==e.charAt(o).match(/[^\x00-\xff]/gi)?n+2:n+1)>76)break}return n},e.prototype.getSelectionContent=function(){var e={},t=window.getSelection(),n={},o="";return t&&0!==t.rangeCount&&(n=(e=t.getRangeAt(0))&&e.getBoundingClientRect(),o=t.toString()),{rangePos:n,selectedText:o}},e.prototype.selectSearchShow=function(e,t,n,o,c){e&&e.length>0&&58923!==e.charCodeAt(0)&&(this.closeGuide("choose_word"),this.calculatePopupPosition(e,t,o,c))},e.prototype.calculatePopupPosition=function(e,n,o,c){var s,i=this,a=document.body.scrollTop||document.documentElement.scrollTop;this.updateSearchDom(e);var r=$(".selected-search-box"),l="2",d=n.top+a-10-32,u=document.body.scrollLeft||document.documentElement.scrollLeft,p="RIGHT",h=document.getElementById("content_left"),m=h&&h.getBoundingClientRect().left||0;n.height<25&&n.right-m<555&&(p="LEFT"),d=(s=t.__read(this.setLeftAndTop(c,a,n),2))[0],u=s[1],u=this.adjustLeftWithinContainer(u,r.outerWidth()||0),d=this.adjustTopShowAll(d,a),r.css({display:"block",top:d,left:u}),r.on("mousedown",(function(e){e.stopPropagation()})),r.off("click").on("click",(function(t){t.stopPropagation();var n=t.target;n.classList.contains("selected-ai-search-item")||n.classList.contains("selected-search-box-ai-icon")?i.sendSelectLog("click",p,e,l,"问AI"):i.sendSelectLog("click",p,e,l,"搜索")})),this.addCopyBtnEvent(e,p,l),this.selectTips=r,this.sendLog(o,e,p,l)},e.prototype.setLeftAndTop=function(e,t,n){var o=0,c=document.body.scrollLeft||document.documentElement.scrollLeft;o=e.top-(t+n.top+n.height/2)>0?n.bottom+t+7:n.top+t-40-10;var s=$(".selected-search-box").outerWidth()||0;return[o,c+=n.left+n.width/2-s/2]},e.prototype.adjustLeftWithinContainer=function(e,t){var n=document.body.scrollLeft||document.documentElement.scrollLeft,o=document.getElementById("content_left"),c=document.getElementById("content_right"),s=e;if(o&&c){var i=o.getBoundingClientRect().left+n,a=c.getBoundingClientRect().right+n;s=Math.max(i,Math.min(e,a-t))}return s},e.prototype.adjustTopShowAll=function(e,t){var n=e,o=e-t;return o<70&&(n+=70-o),n},e.prototype.addCopyBtnEvent=function(e,n,o){var c=this,s=$(".selected-search-box .select-search-copy-container");s.length&&s.off("click").on("click",(function(s){return t.__awaiter(c,void 0,void 0,(function(){var c;return t.__generator(this,(function(t){switch(t.label){case 0:return s.stopPropagation(),s.preventDefault(),this.sendSelectLog("click",n,e,o,"复制"),[4,this.copyToClipboard(e)];case 1:return c=t.sent(),this.hideNode(),c?i.success({message:"复制成功",duration:3e3}):i.error({message:"复制失败,请重试",duration:3e3}),[2]}}))}))}))},e.prototype.copyToClipboard=function(e){if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(e).then((function(){return!0}))["catch"]((function(){return!1}));try{var t=document.createElement("textarea");t.value=e,t.style.position="absolute",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t),t.select(),t.setSelectionRange(0,e.length);var n=document.execCommand("copy");return document.body.removeChild(t),Promise.resolve(n)}catch(o){return Promise.resolve(!1)}},e.prototype.updateSearchDom=function(e){var n="1"===t.BDSInstance.comm.degradeAiBox,o=(t.BDSInstance.comm.sampleval||[]).includes("ASK_AI_SELECT_REVERSE");if($(".selected-search-box").length)$(".selected-sample-search-item").eq(0).attr("href","//www.baidu.com/s?rsv_dl=selectedsearch&wd=".concat(encodeURIComponent(e.slice(0,100)))),$(".selected-ai-search-item").attr("href",this.getJumpUrl(e.slice(0,1e3)));else{var c=encodeURIComponent(e.slice(0,100)),s=o?'\n <a target="_blank"\n class="\n selected-sample-search-item\n selected-ai-search-item '.concat(n?"selected-ai-search-item-degrade":"",'\n "\n href="').concat(this.getJumpUrl(e.slice(0,1e3)),'">\n <img\n class="selected-search-box-ai-icon"\n src="//psstatic.cdn.bcebos.com/basics/aichat/new_wen_bar_1768502225000.svg"\n alt=""\n >\n <div class="selected-search-box-ai-text">问文心</div>\n </a>'):"",i=$('\n <div class="new-pmd selected-search-box selected-sample-search-box" style="display:none;">\n <div class="selected-sample-search-content">\n <a target="_blank"\n class="selected-sample-search-item"\n href="//www.baidu.com/s?rsv_dl=selectedsearch&wd='.concat(c,'">\n <i class="c-icon">&#xe6a7;</i>\n <div class="selected-sample-search-box-item-text">\n 搜索\n </div>\n </a>\n <a class="selected-sample-search-item select-search-copy-container">\n <i class="select-search-copy">&#xe6c2;</i>\n <div class="selected-sample-search-box-item-text">\n 复制\n </div>\n </a>\n ').concat(s,"\n </div>\n </div>"));$("#wrapper_wrapper").append(i)}},e.prototype.getJumpUrl=function(e){var t=new URL("https://chat.baidu.com/search");return t.searchParams.set("word",e),t.searchParams.set("extParams",JSON.stringify({enter_type:"a_choosecontent",sa:"re_dl_choosecontent"})),t.toString()},e.prototype.sendLog=function(e,t,n,o){this.sendSelectLog("show",n,t,o);for(var c=e;"BODY"!==c.tagName&&!c.getAttribute("tpl")&&c.parentElement;){c=c.parentElement}var s={fm:"behs",txt_l:t.length,action_name:"selectSearchShow",r_index:c&&c.id?c.id:""};this.logServe&&this.logServe.send(s)},e.prototype.hideNode=function(){var e=$(".selected-search-box");e.length&&e.hide(),this.selectTips=undefined},e.prototype.destroy=function(){var e=$(".selected-search-box");e.length&&e.remove(),this.selectTips=undefined,$("#wrapper").off("mousedown",this.onWrapperMousedown),$("#content_left").off("mouseup",this.onContentLeftMouseup),$("#content_right").off("mouseup",this.onContentRightMouseup),this.qqPanelMousedownHandler&&(document.removeEventListener("mousedown",this.qqPanelMousedownHandler,!0),this.qqPanelMousedownHandler=undefined)},e.prototype.sendSelectLog=function(e,n,o,s,i){c.sendUbcLog(19052,e,"choose_text_pop",t.__assign({area:n,content:o,style_type:s},i?{button_text:i}:{}))},e.prototype.sendGuideLog=function(e,t,n){n?c.sendUbcLog(19052,e,t,{close_type:n}):c.sendUbcLog(19052,e,t)},e=t.__decorate([t.__param(0,n.inject(o.index_pc.DOCUMENT_TOKEN)),t.__metadata("design:paramtypes",[Document,o.index_pc.Log])],e)}(),r=Object.freeze({__proto__:null,SelectSearch:a});e.EslModuleExport59=r;Object.keys(r).forEach(function(item){e[item]=r[item]})}));
;define('modules/pc/static/services/load-more/results-page-context',['exports','head-script/pc/static/index','@baidu/inject-js'],(function(t,e,n){;"use strict";var r="page-bd",o=n.createInjectToken();function u(t,e){var n=Number(t)||1,r=Number(e)||10,o=(n-1)*r;return{pageNum:n,pageSize:r,pn:o,resultStartIndex:o+1}}function a(t){return t.replace(/<\\\/script>/gi,"<\/script>")}function i(t){if(!t)return null;try{return JSON.parse(a(t.trim()))}catch(e){return null}}function s(t){if(!t)return null;var e=t.match(/Object\.assign\(\s*originInitData\s*,\s*(\{[\s\S]*\})\s*\)/);return e?i(e[1]):null}function c(t,e){if(!t||!t.length)return $();var n=t.filter(e);return n.length?n:t.find(e)}function l(t){return i(c(t,"#async-data").text())||{}}function g(t){var e=c(t,"#init-data-content");return s(e.html()||e.text())||{}}function d(t){var n=u(t.pageNum,t.pageSize),o=t.chunkId||"chunk-".concat(n.pageNum);t.chunkRoot.setAttribute("rank",String(n.pageNum)),t.chunkRoot.setAttribute("data-qid",t.qid||""),t.chunkRoot.classList.contains(r)||"wrapper_wrapper"===t.chunkRoot.id||t.chunkRoot.classList.add(r);var a=e.__assign({chunkId:o,chunkRoot:t.chunkRoot,queryData:t.queryData||{},qid:t.qid||"",query:t.query||"",querySign:t.querySign,nextLink:t.nextLink},n);return function(t,e){if(Object.keys(e).length&&!t.querySelector("[data-for=query]")){var n=document.createElement("script");n.type="application/json",n.setAttribute("data-for","query"),n.textContent=JSON.stringify(e),t.insertBefore(n,t.firstChild)}}(t.chunkRoot,a.queryData),a}function p(t,e){var n=g(t),r=l(t),o=n.commContent||{},u=n["query-data"]||{};return d({chunkRoot:e.chunkRoot,pageNum:Number(o.pageNum)||e.fallbackPageNum,pageSize:Number(o.pageSize)||e.fallbackPageSize||10,queryData:u,qid:o.qid||r.queryId||"",query:o.query||u.query||"",querySign:r.querySign,nextLink:e.nextLink})}function y(t){var n,r,o=e.BDSInstance.comm||{},u=i(null===(n=document.getElementById("async-data"))||void 0===n?void 0:n.textContent)||{},a=i($(t).find("[data-for=query]").first().html())||{};return d({chunkRoot:t,pageNum:Number(o.pageNum)||1,pageSize:Number(o.pageSize)||10,queryData:a,qid:o.qid||o.queryId||"",query:o.query||"",querySign:u.querySign,nextLink:(null===(r=document.getElementById("page"))||void 0===r?void 0:r.getAttribute("data-next-link"))||$("#page .rightArrow").closest("a").attr("href")||""})}var m=function(){function t(){this.contexts=new WeakMap,this.roots=new Set}return t.prototype.register=function(t,e){this.roots.add(t),this.contexts.set(t,e)},t.prototype.unregister=function(t){this.roots["delete"](t),this.contexts["delete"](t)},t.prototype.clear=function(){var t=this;this.roots.forEach((function(e){return t.contexts["delete"](e)})),this.roots.clear()},t.prototype.getByRoot=function(t){return this.contexts.get(t)},t.prototype.getByElement=function(t){for(var e=t;e;){if(this.roots.has(e))return this.contexts.get(e);e=e.parentElement}return undefined},t.prototype.list=function(){var t=this;return Array.from(this.roots).map((function(e){return t.contexts.get(e)})).filter(Boolean)},t}(),f=new m;function h(t,e){void 0===e&&(e=f);var n=e.getByElement(t),r="undefined"!=typeof bds&&bds.comm?bds.comm:{},o=(null==n?void 0:n.pageNum)||Number(r.pageNum)||1,u=(null==n?void 0:n.pageSize)||Number(r.pageSize)||10,a=n?n.pn:(o-1)*u;return{qid:(null==n?void 0:n.qid)||r.qid||r.queryId||"",query:(null==n?void 0:n.query)||r.query||"",querySign:null==n?void 0:n.querySign,pageNum:o,pageSize:u,pn:a,resultStartIndex:(null==n?void 0:n.resultStartIndex)||a+1,chunkId:null==n?void 0:n.chunkId,fromChunk:!!n}}var q=Object.freeze({__proto__:null,CHUNK_ROOT_CLASS:r,RESULTS_PAGE_CONTEXT_TOKEN:o,ResultsPageContextRegistry:m,computePageOffsets:u,createFirstScreenResultsPageContext:y,createResultsPageContext:d,createResultsPageContextFromResponse:p,getPageContextFromElement:h,getResultsPageContextByElement:function(t,e){return e.getByElement(t)},parseAsyncDataFromContent:l,parseInitDataAssignPayload:s,parseInitDataFromContent:g,parseJsonScriptText:i,resultsPageContextRegistry:f,unescapeInitDataJson:a});t.CHUNK_ROOT_CLASS=r,t.EslModuleExport49=q;Object.keys(q).forEach(function(item){t[item]=q[item]}),t.RESULTS_PAGE_CONTEXT_TOKEN=o,t.ResultsPageContextRegistry=m,t.createFirstScreenResultsPageContext=y,t.createResultsPageContextFromResponse=p,t.getPageContextFromElement=h,t.parseInitDataFromContent=g,t.resultsPageContextRegistry=f}));
;define('modules/pc/static/services/hydrate/hydrate.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/ala-util/ala','san','@baidu/search-api'],(function(t,e,r,n,i,o){;"use strict";function a(t,e){void 0===e&&(e={}),window._spySendError&&window._spySendError(t,e)}function c(t){return function(e){if(e)return t.create.call(t,e)}}var s=function(){function t(t,e,r){this.moleList=[],this.moduleIdList=[],this.container=e,this.require=r,this.scope=t,this.resultEle=$("#wrapper_wrapper").get(0);var n=t.querySelectorAll(".result-op[m-name],.result-wise[m-name],.result-molecule[m-name],.result[m-name]");this.execute(n)}return t.prototype.initData=function(t,e){var r=(null==e?void 0:e.querySelector("#".concat(t)))||(null==e?void 0:e.querySelector('[id="'.concat(t,'"]')))||document.getElementById(t);if(!r)return null;try{return JSON.parse(r.textContent)}catch(n){return null}},t.prototype.execute=function(t){var e=this;t.forEach((function(t){"atom"===$(t).attr("m-runtime")?e.hydrateAtom(t):setTimeout((function(){e.hydratePcModule(t)}),100)}))},t.prototype.hydrateAtom=function(t){var e=this,r=$(t),n=r.attr("m-name"),i=r.attr("m-path"),o=r.attr("m-selector"),a=r.children().get(0);if("0"===(r.attr("m-render-status")||"0")){var s=Date.now();if(n&&i&&a){var d={};d[n]=i.replace(/\.js$/,""),bds.amd.addPaths(d),this.require([n],(function(t){e.require(["pure-atom-entry"],(function(r){r.init(t["default"]||t,{dataSelector:"m-data-".concat(o),selector:"[atom-root-".concat(o,"]"),startTime:s,name:o,inject:c(e.container.createChildContainer()),resolve:function(){}})}))}))}}},t.prototype.hydratePcModule=function(t){var s=this,d=this.container,u=$(t),l=u.attr("m-name"),p=u.attr("m-path"),h=u.attr("m-selector"),m=u.children().get(0),f=this.initData("m-data-".concat(h),this.scope.getRoot()[0]);if("0"===(u.attr("m-render-status")||"0")){if(l&&m){if(p){e.getInitData("staticUrl").replace("/static","");var y={};y[l]=p,bds.amd.addPaths(y)}this.moduleIdList.push(l),this.require([l],(function(t){if((t=t["default"]||t).prototype&&!t.prototype.error&&(t.prototype.error=function(t,e,r){var n;a(t,{info:{dom:null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.classList,errorInfo:r},dim:{card:u.attr("tpl"),srcid:u.attr("srcid")}})}),"render-only"===t.ssr)n.hydrateCardInfo.set({env:"pc",inject:c(d)}),i.hydrateComponent(t,{el:m}),u.attr("m-render-status","1");else{o.index_pc.SanOptionProvider.setElement(m),o.index_pc.SanOptionProvider.setData(f);var l=t;l.prototype.__inject=c(d),l.prototype.__container=d;var p=r.getDependencies(l),h=[];p.forEach((function(t){h.push(d.create(t))})),p.length||h.push({el:m,data:f});var y=new(l.bind.apply(l,e.__spreadArray([void 0],e.__read(h),!1)));s.moleList.push(y),u.attr("m-render-status","1")}}))}}},t.prototype.clearModule=function(){var t=/(aladdin-san|mirror-san)\//,e=[];this.moduleIdList=this.moduleIdList.filter((function(r){return!t.test(r)||(e.push(r),!1)})),window.require.clearModule(e)},t.prototype.destroy=function(){try{this.moleList.forEach((function(t){t.detached&&t.detached()}))}catch(t){console.error(t),a(t)}this.clearModule()},t}(),d=function(){function t(t,e){this.scope=t,this.require=e}return t.prototype.create=function(t){return this.instance=new s(this.scope,t,this.require),this.instance},t.prototype.destroy=function(){var t;null===(t=this.instance)||void 0===t||t.destroy()},t=e.__decorate([r.injectable,e.__param(0,r.inject(o.index_pc.SCOPE_TOKEN)),e.__param(1,r.inject(o.index_pc.REQUIRE_TOKEN)),e.__metadata("design:paramtypes",[o.index_pc.Scope,Function])],t)}(),u=Object.freeze({__proto__:null,HydrateProvider:d,HydrateService:s});t.EslModuleExport47=u;Object.keys(u).forEach(function(item){t[item]=u[item]}),t.HydrateProvider=d,t.HydrateService=s,t.send=function(t,e){return void 0===e&&(e="except"),window._spySend&&window._spySend(t,e)}}));
;define('modules/pc/static/page/main-page.module',['require','exports','@baidu/inject-js','@baidu/search-api','head-script/pc/static/index','modules/pc/static/services/hydrate/hydrate.service','modules/pc/static/services/load-more/results-page-context','modules/pc/static/services/load-more/page-load-more.service'],(function(e,t,i,a,r,n,o,s){;"use strict";function c(e,t){var i=[],r=!1;e.forEach((function(e){"@baidu/search-api"!==e.module?t.require([e.module],(function(a){var n=a[e.exportedName];t.container.addService(n),e.create&&(r?t.container.create(n):i.push(n))})):(e.apiList||[]).forEach((function(e){var i=a.SearchApi[e.name];t.container.addService(i),e.create&&t.container.create(i)}))})),i.forEach((function(e){t.container.create(e)})),r=!0}var d=[{module:"@baidu/search-api",apiList:[{name:"Log"},{name:"MidLog"},{name:"UbcLog"}]}],l=[{module:"@baidu/search-api",apiList:[{name:"AlaLog",create:!0},{name:"Login",create:!0},{name:"MCPInvokeService",create:!0}]},{module:"modules/pc/static/services/perf-log/perf-log.service",exportedName:"PerfLog",create:!0},{module:"modules/pc/static/services/right-fixed/right-fixed.service",exportedName:"RightFixed",create:!0},{module:"modules/pc/static/services/right-ceiling/right-ceiling.service",exportedName:"RightCeiling",create:!0},{module:"modules/pc/static/services/right-ai-accompanies-ceiling/right-ceiling.service",exportedName:"RightAIAccompaniesCeiling",create:!0},{module:"modules/pc/static/services/quit-dialog/quit-dialog.service",exportedName:"QuitDialog",create:!0},{module:"modules/pc/static/services/shortcut-key/shortcut-key.service",exportedName:"ShortcutKey",create:!0},{module:"modules/pc/static/services/select-search/select-search.service",exportedName:"SelectSearch",create:!0},{module:"modules/pc/static/services/search-tag-fixed/search-tag-fixed.service",exportedName:"SearchTagFixed",create:!0},{module:"modules/pc/static/services/recommend/recommend.service",exportedName:"RecommendService",create:!0},{module:"modules/pc/static/services/increase/increase.service",exportedName:"IncreaseService",create:!0}],u=function(){function e(e){this.root=e.root,this.resultsPageContextRegistry=e.resultsPageContextRegistry,this.container=e.container,this.container.addFactory(a.index_pc.SCOPE_TOKEN,a.index_pc.scopeFactory({root:e.root}),[]);var t=e.resultsPageContext||o.createFirstScreenResultsPageContext(e.root);(this.resultsPageContextRegistry.register(e.root,t),this.container.addValue(o.RESULTS_PAGE_CONTEXT_TOKEN,t),e.isLoadMore)&&(this.container.addService(a.index_pc.Query),this.container.create(a.index_pc.Query).updatedFromScope(this.container.create(a.index_pc.SCOPE_TOKEN)),c(d,{container:this.container,require:e.require}));this.container.addProvider(n.HydrateService,n.HydrateProvider),this.container.create(n.HydrateService),c(l,{container:this.container,require:e.require})}return e.prototype.asyncConfirm=function(){},e.prototype.destroy=function(){this.resultsPageContextRegistry.unregister(this.root),this.container.destroy()},e}(),h=function(){function e(e,t,i,a){this.results=[],this.ttsInteract=null,this.container=e,this.resultsPageContextRegistry=t,this.root=document.body,this.require=a}return e.prototype.addResult=function(e,t,i){var r;void 0===i&&(i=!1);var n=0===this.results.length,o=this.container.createChildContainer(),s=new u({root:e,container:o,require:this.require,resultsPageContext:t,resultsPageContextRegistry:this.resultsPageContextRegistry,isLoadMore:i});this.results.push(s),n?(o.addService(a.index_pc.TtsInteract),this.ttsInteract=o.create(a.index_pc.TtsInteract)):null===(r=this.ttsInteract)||void 0===r||r.appendItems(e)},e.prototype.destroyResult=function(){var e=this.results.pop();null==e||e.destroy()},e.prototype.destroyAllResults=function(){for(;this.results.length;)this.destroyResult();this.ttsInteract=null},e=r.__decorate([i.injectable,r.__metadata("design:paramtypes",[i.Container,o.ResultsPageContextRegistry,a.index_pc.Scope,Function])],e)}(),p=function(){function e(e,t){this.scope=e,this.require=t}return e.prototype.create=function(e,t){return this.results=this.results||new h(e,t,this.scope,this.require),this.results},e.prototype.destroyResult=function(){this.results&&this.results.destroyResult()},e.prototype.destroyAllResults=function(){this.results&&this.results.destroyAllResults()},e=r.__decorate([i.injectable,r.__param(0,i.inject(a.index_pc.SCOPE_TOKEN)),r.__param(1,i.inject(a.index_pc.REQUIRE_TOKEN)),r.__metadata("design:paramtypes",[a.index_pc.Scope,Function])],e)}(),m=[{module:"modules/pc/static/services/head-hidden-toggle/head-hidden-toggle.service",exportedName:"HeadHiddenToggle",create:!0},{module:"modules/pc/static/services/card-click-hijack/card-click-hijack.service",exportedName:"CardClickHijack",create:!0},{module:"modules/pc/static/services/load-more/page-load-more.service",exportedName:"PageLoadMoreService",create:!0},{module:"modules/pc/static/services/peak-style/peak-style.service",exportedName:"PeakStyle",create:!0},{module:"modules/pc/static/services/head-gradient/head-gradient.service",exportedName:"HeadGradient",create:!0},{module:"modules/pc/static/services/isui-head-fixed/isui-head-fixed.service",exportedName:"IsuiHeadFixed",create:!0},{module:"modules/pc/static/services/outline-safari/outline-safari.service",exportedName:"OutlineSafari",create:!0},{module:"modules/pc/static/services/utils/utils.service",exportedName:"UtilsService"},{module:"modules/pc/static/services/spy-cache/spy-cache.service",exportedName:"SpyCacheService"}],v=4,g=[],f=[],y=[],b="http://tag.baidu.com";bds.util&&bds.util.domain&&bds.util.domain.get&&(b=bds.util.domain.get("http://tag.baidu.com"));var x=null,_=null,S=!1,C=null,w=0;function R(e){S=!1,0===e.code&&$(y).each((function(){var t,i,a=this.getAttribute("data_key"),r=this.getAttribute("hint-type");(_=e.data[a])&&(x=$(this),!r&&_.vstar&&_.vstar.hint&&_.vstar.hint.length>0&&(x.html(""),function(e,t){var i=$("<span>",{"class":"c-vline"}),a=$("<a>",{target:"_blank",onclick:"return false",href:"#"}),r=JSON.stringify({hint:[{vlevel:e}]});a.attr("hint-data",r),a.addClass("vstar c-icon c-icon-v"+e),t&&a.attr({href:t,onclick:""});x.append(i),x.append(a),L(_.vstar,"vstar")}(_.vstar.hint[0].vlevel,_.vstar.url)),_.medical&&(x.html(""),t=$("<span>",{"class":"c-vline"}),(i=$("<a>",{target:"_blank",onclick:"return false",href:"#"})).addClass("c-icon c-icon-med"),x.append(t),x.append(i),L(_.medical,"medical")),"baozhang-v"===r&&_.brand&&(x.html(""),function(e){var t=$("<span>",{"class":"c-vline"}),i=$("<a>",{target:"_blank",onclick:"return false",href:"#"});i.addClass("c-icon c-icon-R"),e&&i.attr({href:e,onclick:""});x.append(t),x.append(i),L(_.brand,"baozhang-v")}(_.brand.url)),_.aviation&&(x.html(""),function(){var e=$("<span>",{"class":"c-vline"}),t=$("<a>",{target:"_blank",onclick:"return false",href:"#"});t.addClass("c-icon c-icon-air"),x.append(e),x.append(t),L(_.aviation,"aviation")}()))}))}function L(e,t,i){var a=e.hint,r="over",n=e.url,o=e.webIMUrl,s="aviation"===t;if(e&&a){var c="<div class='c-tip-info hitcon'>";if(-1!==t.indexOf("newBao")?(c="<h3 class='opui-honourCard4-new-bao-title'>"+e.label+"</h3>",c+=$.format('<div class="c-tip-info opui-honourCard4-new-bao-style">#{0}',e.text)):"vstar"!==t&&"baozhang"!==t&&"baozhang-v"!==t&&"chengqi"!==t&&"baozhang-v-auth"!==t||(c="<div class='c-tip-cer hitcon'>"),s&&e.label&&(c+='<div class="f13 c-gap-bottom-large c-color-text aviation-title">'+e.label+":</div>"),a.length>0){c+="<ul>";for(var d=0;d<a.length;d++)""!==a[d]?(c+="<li ",a[d].icon?c+="class='c-tip-item-i'><img src='"+a[d].icon+"' class='c-customicon c-gap-icon-right-small c-tip-item-icon' />":c+=">",c+=N(a[d].txt),c+="</li>"):r="none";c+="</ul>"}c+="</div>";var l=!1,u=!1;"baozhang-v"===t||"baozhang-v-auth"===t?l=!0:"chengqi"===t&&(u=!0);var h=["c-tip-con"],p="baozhang-v"===t||"aviation"===t,m="custom"===t;"baozhang-v"===t&&h.push("baozhang-r-tip"),s&&h.push("aviation-wrap-tip"),m&&h.push("custom-wrap-tip");var v=new bds.se.tip({target:x,mode:r,align:"auto",content:c,arrow:{has:p?0:1,offset:39,r:l,c:u,excursion:{x:4}},offset:{x:10,y:25},wrapClass:h.join(" ")});v.onShow=function(){if(window.A.use("honourCard4",(function(){})),-1!==t.indexOf("newBao"))i&&$(i).attr("hint-type")&&(t=$(i).attr("hint-type")),window.ns_c({hintUrl:x.attr("data_key"),hintTpl:t,hintId:"safe:1"});else{var r=a[0].vlevel,s=a[0].unfixedInfo;window.ns_c({hintUrl:x.attr("data_key"),hintTpl:t,hintId:r}),c.includes("ecard")&&setTimeout((function(){window.A.use("honourCard4",(function(){var i=$(v.getDom()).find(".c-trust-ecard4"),c=0;"baozhang"===t&&(c=a[0].bzAppliCounts);var d={compName:e.label,vLevel:r,centerPageUrl:n};s&&(d.unfixedInfo=s),o&&(d.webIMUrl=o),t&&(d.type=t),c&&(d.bzAppliCounts=c),e.brandName&&(d.brandName=e.brandName),e.brandLogo&&(d.brandLogo=e.brandLogo),e.brandScope&&(d.brandScope=e.brandScope),e.brandRelation&&(d.brandRelation=e.brandRelation),e.authBrandName&&(d.authBrandName=e.authBrandName),e.authBizScope&&(d.authBizScope=e.authBizScope),e.authBizType&&(d.authBizType=e.authBizType),window.A.ui.honourCard4(i,d)}))}),0)}setTimeout((function(){-1!==t.indexOf("newBao")?$(".opui-honourCard4-new-bao-style",this.dom).each((function(){$("a",this).each((function(e){this.onmousedown=function(){window.ns_c({hintUrl:n,hintTpl:t,title:this.innerHTML,pos:e})}}))})):$("li",this.dom).each((function(){$("a",this).each((function(e){this.onmousedown=function(){window.ns_c({hintUrl:n,hintTpl:t,title:this.innerHTML,pos:e})}}))}))}),0)}}}function N(e){var t=e;return t=(t=(t=(t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")).replace("[/url]","</a>").replace(/\[url ([^\s]*)\]/,"<a href='$1' target='_blank'>")).replace(/\[img ([^\s]*)\]/,"<img src='$1' />")).replace(/\[ecard (-?[\d]{0,3})\]/,"<div class='c-trust-ecard4' value='$1'></div>")}function P(t){g=[],y=[],f=[];var i=$(t);i.find(".c-trust").each((function(){var e=$(this),t=this.getAttribute("data_key"),i=this.getAttribute("hint-type");0===e.parent(".c-icons-inner").length&&e.wrap("<span class='c-icons-outer'><span class='c-icons-inner'></span></span>"),"baozhang-v"===i?-1===$.inArray(t,f)&&f.push(this.getAttribute("data_key")):-1===$.inArray(t,g)&&g.push(this.getAttribute("data_key")),-1===$.inArray(this,y)&&y.push(this)})),new Promise((function(t,i){e(['plugins/bzPopper'],t,i)})).then((function(e){return e.EslModuleExport32})).then((function(e){i.find(".c-trust-as").each((function(){var t=$(this).attr("data-bao"),i="2"===$(this).attr("data-baostatus");t&&i?($(this).off("mouseenter"),$(this).on("mouseenter",(function(){var i=$(this),a=i.find("i"),r={target:a.length?a[0]:i[0],from:e.preset.PS,trigger:"hover",contentData:t,isLogin:bds.comm.isUserLogin,extra:{expStage:e.preset.EXP_STAGE_1}};e.showUp(r)}))):(_=$.parseJSON($(this).attr("hint-data")))&&!$(this).attr("render")&&(x=$(this),L(_,$(this).attr("hint-type"),this),$(this).attr("render","render"))})),g.length<1&&f.length<1||(S&&w<g.length+f.length&&(S=!1,C&&C.abort()),S||(g.length>0&&(C=$.getJSON(b+"/?urls="+g.join(",")+"&sid="+bds.comm.sid+"&qid="+bds.comm.qid+"&v="+v+"&callback=?",R)),f.length>0&&(C=$.getJSON(b+"/?urls="+f.join(",")+"&sid="+bds.comm.sid+"&qid="+bds.comm.qid+" &tag=asyncZ&v="+v+"&callback=?",R)),S=!0),w=g.length+f.length)}))}var E=".result-op[m-name],.result-wise[m-name],.result-molecule[m-name],.result[m-name]",k=function(){function e(e){void 0===e&&(e=!1),this.container=new i.Container,this.require=window.require,this.resultsPageContextRegistry=o.resultsPageContextRegistry,this.isLoadMore=!1,this.container.addValue(a.index_pc.DOCUMENT_TOKEN,document),this.container.addValue(a.index_pc.PERFORMANCE_TOKEN,window.performance),this.container.addValue(a.index_pc.LOCAL_STORAGE_TOKEN,window.localStorage),this.container.addValue(a.index_pc.NAVIGATOR_TOKEN,window.navigator),this.container.addValue(a.index_pc.REQUIRE_TOKEN,this.require),this.container.addProvider(a.index_pc.SanOption,a.index_pc.SanOptionProvider),this.container.addValue(a.index_pc.PERF_SYNC_DATA_TOKEN,window.__perf_www_datas),this.container.addValue(a.index_pc.WebbConfig,a.index_pc.webbConfigValue),this.container.addFactory(a.index_pc.SCOPE_TOKEN,a.index_pc.scopeFactory({root:document.body}),[]),this.container.addProvider(h,p),c(function(e){return r.__spreadArray([{module:"@baidu/search-api",apiList:[{name:"Log"},{name:"MidLog"},{name:"UbcLog"},{name:"AlaLog"},{name:"Cookie"},{name:"WebbInstance"},{name:"Query",create:!0},{name:"Device",create:!0},{name:"CodeCover",create:!0},{name:"Sample",create:!0},{name:"HttpsDomain"},{name:"User",create:!0},{name:"Conf",create:!0},{name:"EventEmitter"},{name:"InvokeService"},{name:"XPath"},{name:"AladdinUtils"},{name:"Login"}]}],r.__read(e?[]:m),!1)}(e),{require:this.require,container:this.container}),this.isSingleCard=e,this.initLoadMoreService(),this.init(),this.container.addProvider(n.HydrateService,n.HydrateProvider),this.hydrateService=this.container.create(n.HydrateService)}return e.prototype.resetScrollForLoadMoreResultPage=function(){this.isLoadMore&&!r.BDSInstance.comm.ishome&&"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual")},e.prototype.resolveIsLoadMore=function(){var e=r.BDSInstance.comm||{},t=e.sampleVariable||{},i=e.nodeSample||[];return"1"===t.PC_RESULT_LOAD_MORE||i.indexOf("PC_RESULT_LOAD_MORE")>-1},e.prototype.initLoadMoreService=function(){var e;if(!r.BDSInstance.comm.ishome&&!this.isSingleCard){this.isLoadMore=this.resolveIsLoadMore();var t=r.BDSInstance.comm||{},i=Number(t.pageNum)||1,a=Number(t.totalPageNum)||0,n=Number(t.pageSize)||0;this.container.create(s.PageLoadMoreService).init({current:i,total:a,pageSize:n,isLoadMore:this.isLoadMore,nextLink:(null===(e=document.getElementById("page"))||void 0===e?void 0:e.getAttribute("data-next-link"))||""})}},e.prototype.init=function(){if(!r.BDSInstance.comm.ishome&&(this.resetScrollForLoadMoreResultPage(),this.updated(),!this.isSingleCard)){var e=this.isLoadMore?document.querySelector('#content_left > .page-bd[rank="1"]'):null;this.addResult(e||document.getElementById("wrapper_wrapper"))}this.addPartHydrateListener(),this.addAppendResultRootListener()},e.prototype.updated=function(){this.container.getServices().forEach((function(e){"function"==typeof e.updated&&e.updated()}))},e.prototype.destroyResult=function(){this.container.getOrCreateProvider(h).destroyAllResults(),this.resultsPageContextRegistry.clear()},e.prototype.destoryTopResult=function(){this.container.getOrCreateProvider(n.HydrateService).destroy()},e.prototype.addResult=function(e,t){this.container.getOrCreateProvider(h).create(this.container,this.resultsPageContextRegistry).addResult(e,t,this.isLoadMore)},e.prototype.addPartHydrateListener=function(){var e=this;r.eventBus.topResult.remove.on((function(){e.destoryTopResult()})),r.eventBus.app.partHydrate.on((function(t){if($(t).is(E))e.hydrateService.execute([t]);else{var i=null==t?void 0:t.querySelectorAll(E);i&&i.length&&e.hydrateService.execute(i)}}))},e.prototype.addAppendResultRootListener=function(){var e=this;document.addEventListener("appendResultRoot",(function(t){var i=t.detail,a=i&&(i.root||i);if(a&&!e.isSingleCard){var r=i.resultsPageContext;e.addResult(a,r),e.isLoadMore&&function(e){P(e)}(a);var n=window.antiSpam;n&&"function"==typeof n.bindChunkClickData&&n.bindChunkClickData(a);var o=window.__getCardLogManager;"function"==typeof o&&o().observeChunk(a)}}))},e}(),O=Object.freeze({__proto__:null,MainPageModule:k});t.EslModuleExport38=O;Object.keys(O).forEach(function(item){t[item]=O[item]}),t.registerTrust=function(){r.BDSInstance.lifecycle.onSwapEnd((function(){P(document)}))}}));
;define('modules/pc/static/services/load-more/page-load-more.service',['exports','head-script/pc/static/index','@baidu/inject-js','modules/pc/static/services/load-more/results-page-context'],(function(t,e,n,i){;"use strict";var r=1e3;function o(t,n,i){var r=!1!==(null==i?void 0:i.encode),o=[];return Object.entries(t).forEach((function(t){var n=e.__read(t,2),i=n[0],a=n[1];if(!function(t){return""===t||"undefined"===t||"null"===t||null===t||t===undefined}(a)){var s=r?encodeURIComponent(i):i,c=r?encodeURIComponent(String(a)):String(a);o.push("".concat(s,"=").concat(c))}})),o.join(n)}function a(t){var n={},i=t.includes("?")?t.split("?")[1]:t;return i?((i.includes("&")?i.split("&"):[i]).forEach((function(t){var i=t;i.includes("=")||(i+="=");var r=e.__read(i.split("="),2),o=r[0],a=r[1],s=void 0===a?"":a;n[o]=decodeURIComponent(s.replace(/\+/g," "))})),n):n}function s(t,e){var n=t.filter(e);return n.length?n:t.find(e)}function c(t,e,n){var i=e.find('script:not([src], [type="application/json"])').addBack('script:not([src], [type="application/json"])'),r=0,o=$.globalEval;$.globalEval=function(t){window.currentScriptElem=i[r],r++;try{o.apply($,arguments)}catch(e){window.console&&console.error&&(console.error(t),console.error(e)),window._spySendError&&window._spySendError(e)}},"insertBefore"===n?e.insertBefore(t):"insertAfter"===n?e.insertAfter(t):t.append(e),window.currentScriptElem=null,$.globalEval=o}var d='script[id="ecomScript"]',l="style.ecom-style";function u(t){var n=e.__assign({},t);return null!=n.wd&&(n.wd=String(n.wd).slice(0,r)),o(n,"&",{encode:!0}).replace(/'/g,"%27")}function p(){var t,e,n;return(null===(t=window.__globalVariables)||void 0===t?void 0:t.sessionId)||(null===(n=null===(e=window.bds)||void 0===e?void 0:e.comm)||void 0===n?void 0:n.sessionId)||""}function h(t){var e=window.__ckLog;if("function"!=typeof e)return"";try{return e(null==t?"":String(t))||""}catch(n){return""}}function f(t,n){var i={ie:"utf-8",csq:n.seq,pstg:20,mod:2,newMode:1,isbd:e.BDSInstance.comm.supportis?1:"",cqid:n.qid,istc:n.istc,ver:n.ver||e.BDSInstance.comm.baiduis_verify,chk:null==n.chk?0:n.chk,isid:p(),f4s:1,_ck:h(t.envParams.wd)};e.BDSInstance.comm.SyncSample&&(i.SyncSample=e.BDSInstance.comm.SyncSample);var r,a="".concat(t.path,"?").concat(o(i,"&",{encode:!1}));return a+="&".concat(u(t.envParams)),e.BDSInstance.comm.indexSid&&(a+="&rsv_isid=".concat(e.BDSInstance.comm.indexSid)),a+="&isnop=".concat((Number(null===(r=window.__globalVariables)||void 0===r?void 0:r.preload_cnt)||0)<=1?0:1)}function g(t){var e,n=s(t,"#async-data");if(!n.length)return 0;try{return null!==(e=(JSON.parse(n.text().trim())||{}).chk)&&void 0!==e?e:0}catch(i){return 0}}function m(t){try{return(i.parseInitDataFromContent(t).commContent||{}).baiduis_verify||""}catch(e){return""}}function v(t,e){return!!e&&t>=e}var w=function(){function t(){this.state={current:1,isLoadMore:!1,isLoading:!1,isEnd:!1,loadMoreError:!1},this.stateListener=null,this.viewportHandler=null,this.viewportRafId=0,this.pageEl=null,this.confirmSeq=0,this.total=0,this.pageSize=0,this.nextLink="",this.generation=0,this.pendingXhr=null,this.swapResetBound=!1,this.initialized=!1}return t.prototype.init=function(t){this.generation++,this.abortPending();var n=Number(t.current)||1,i=Number(t.total)||0;this.total=i,this.pageSize=Number(t.pageSize)||0,this.nextLink=v(n,i)?"":t.nextLink||"",this.state=e.__assign(e.__assign({},this.state),{current:n,isLoadMore:!!t.isLoadMore,isEnd:v(n,i)||!this.nextLink,isLoading:!1,loadMoreError:!1}),this.initialized=!0,this.emit(),this.state.isLoadMore&&(this.pageEl=document.getElementById("page"),this.bindViewportTracking(),this.bindSwapReset(),this.maybeLoadMoreFromViewport())},t.prototype.bindSwapReset=function(){var t=this,n=e.BDSInstance.lifecycle;!this.swapResetBound&&n&&"function"==typeof n.onSwapBegin&&(this.swapResetBound=!0,n.onSwapBegin((function(){t.generation++,t.abortPending(),t.nextLink="",t.state.isLoading=!1,t.initialized=!1})))},t.prototype.abortPending=function(){var t=this.pendingXhr;this.pendingXhr=null,t&&"function"==typeof t.abort&&t.abort()},t.prototype.bindViewportTracking=function(){var t=this;if(!this.viewportHandler){this.viewportHandler=function(){t.viewportRafId||("function"!=typeof window.requestAnimationFrame?t.handleViewportChange():t.viewportRafId=window.requestAnimationFrame((function(){t.viewportRafId=0,t.handleViewportChange()})))};var e=this.viewportHandler;window.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",e),window.addEventListener("scrollend",e);var n=window.visualViewport;n&&(n.addEventListener("resize",e),n.addEventListener("scroll",e)),this.updateVisiblePage()}},t.prototype.handleViewportChange=function(){this.updateVisiblePage(),this.maybeLoadMoreFromViewport()},t.prototype.maybeLoadMoreFromViewport=function(){if(this.state.isLoadMore&&!this.state.isLoading&&!this.state.isEnd&&!this.state.loadMoreError){var t=this.pageEl||document.getElementById("page");if(t){this.pageEl=t;var e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight||0;e.top<n+105&&e.bottom>0&&this.loadNextPage(!1)}}},t.prototype.updateVisiblePage=function(){var t=document.querySelectorAll("#content_left > .page-bd[rank]"),e=window.innerHeight||document.documentElement.clientHeight,n=null,i=0;t.forEach((function(t){var r=Number(t.getAttribute("rank"));if(r){var o=t.getBoundingClientRect();o.top<e&&o.bottom>0&&r>i&&(i=r,n=t)}})),n&&t.forEach((function(t){t===n?t.setAttribute("current","true"):t.removeAttribute("current")}))},t.prototype.setStateListener=function(t){this.stateListener=t,this.initialized&&t(e.__assign({},this.state))},t.prototype.loadNextPage=function(t){var n=this;void 0===t&&(t=!0);var i=function(t){if(!t)return null;var n=t.startsWith("/s?")?t:t.startsWith(location.origin)?t.slice(location.origin.length):t,i=e.__read(n.split("?"),2),r=i[0],s=i[1],c=a(void 0===s?"":s),d=a(location.search),l={ie:"utf-8",newi:e.BDSInstance.comm.newindex?1:"",sid:d.sid?encodeURIComponent(String(d.sid)):"",tnp:d.tnp?encodeURIComponent(String(d.tnp)):"",mod:1,newMode:1,isbd:e.BDSInstance.comm.supportis?1:"",isid:p(),rsv_id:e.BDSInstance.comm.indexSid||"",_ss:1,f4s:1,csor:0};e.BDSInstance.comm.SyncSample&&(l.SyncSample=e.BDSInstance.comm.SyncSample);var h=e.__assign({},c);h.bs||(h.bs=e.BDSInstance.comm.cur_query||h.wd||"");var f={is_referer:"".concat(location.protocol,"//").concat(location.host).concat(location.pathname).concat(location.search),is_xhr:"1"};e.BDSInstance.comm.cur_disp_query&&(f.is_pbs=encodeURIComponent(e.BDSInstance.comm.cur_disp_query));var g=o(l,"&",{encode:!1});g+="&".concat(u(h));var m="".concat(r,"?").concat(g);return{url:"".concat(m,"&_cr1=").concat(function(t){if("string"!=typeof t)return 0;for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);return e}(m)),headers:f,path:r,envParams:h}}(this.nextLink);if(this.state.isLoadMore&&i&&!this.state.isLoading&&!this.state.isEnd&&(!this.state.loadMoreError||t)){this.setState({isLoading:!0,loadMoreError:!1});var r=+new Date,s=this.generation,c=$.ajax({url:i.url,type:"GET",dataType:"html",headers:i.headers});this.pendingXhr=c,c.done((function(t){if(s===n.generation){var e=n.appendNextPage(t);e&&n.sendLoadMoreConfirm(i,e,+new Date-r)}})).fail((function(t,e,i){s===n.generation&&n.setState({isLoading:!1,loadMoreError:!0})})).always((function(){n.pendingXhr===c&&(n.pendingXhr=null),s===n.generation&&(n.setState({isLoading:!1}),n.maybeLoadMoreFromViewport())}))}},t.prototype.appendNextPage=function(t){var n=$(t),r=function(t){return s(t,"#content_left")}(n),o=$("#content_left");if(!r.length||!o.length)return this.setState({loadMoreError:!0}),null;var a=this.state.current+1,u=$('<div class="page-bd"></div>');u.attr("rank",String(a)),c(o,u),function(t,e){var n=s(t,"#content_style").find(l);n.length&&!e.find(l).length&&e.append(n)}(n,u),c(u,function(t){var n=t.children(),i=[];return n.each((function(t,n){var r=n;r.classList.contains("page-bd")?i.push.apply(i,e.__spreadArray([],e.__read(Array.from(r.children)),!1)):i.push(r)})),$(i)}(r)),function(t,e){var n=s(t,d);n.length&&!e.find(d).length&&c(e,n)}(n,u),function(t,e){var n=s(t,"#rs_new");n.length&&c(e,n)}(n,u);var p=v(a,this.total)?"":n.find("#page").attr("data-next-link")||n.find("#page .rightArrow").closest("a").attr("href")||"",h=u.get(0),f=i.createResultsPageContextFromResponse(n,{chunkRoot:h,fallbackPageNum:a,fallbackPageSize:this.pageSize,nextLink:p});return this.nextLink=p,this.setState({current:a,isEnd:v(a,this.total)||!p,loadMoreError:!1}),document.dispatchEvent(new CustomEvent("appendResultRoot",{detail:{root:h,resultsPageContext:f}})),{qid:f.qid||"",chk:g(n),ver:m(n)}},t.prototype.sendLoadMoreConfirm=function(t,e,n){this.confirmSeq++;var i=f(t,{qid:e.qid,chk:e.chk,ver:e.ver,seq:this.confirmSeq,istc:n});$.ajax({url:i,type:"GET",headers:t.headers}).fail((function(t){console.warn("load more confirm ajax error",t)}))},t.prototype.setState=function(t){var n=this;Object.keys(t).every((function(e){return n.state[e]===t[e]}))||(this.state=e.__assign(e.__assign({},this.state),t),this.emit())},t.prototype.emit=function(){this.stateListener&&this.stateListener(e.__assign({},this.state))},t=e.__decorate([n.injectable],t)}(),S=Object.freeze({__proto__:null,PageLoadMoreService:w});t.EslModuleExport50=S;Object.keys(S).forEach(function(item){t[item]=S[item]}),t.PageLoadMoreService=w}));
;define('modules/pc/static/services/recommend/recommend.service',['exports','head-script/pc/static/index','@baidu/inject-js','@baidu/search-api','head-script/pc/static/page-log/ubc-log','modules/pc/static/services/load-more/results-page-context'],(function(t,e,o,n,r,i){;"use strict";e.BDSInstance.comm.recommends={},e.BDSInstance.comm.recommends.recommWidth=0;var a=null,s=null,c=null,p=null,m={originalTop:null,headDom:null,topDom:null,topGap:null},d=!1,l=function(){function t(t){this._default={disable:!1,target:"",arrowOffset_s:-54,arrowOffset_l:-151,container_s:276,container_l:368,startOpacity:.3,endOpacity:1},this.op=$.extend({},this._default,t),this.id=this.op.target.attr("id");var o=e.getInitData("async-rec-flag");o&&"object"==typeof o&&(this.disable=0===o[this.id]),t.target.closest("[aftclk-hide]").length&&(this.disable=!0),this.init()}return t.prototype.init=function(){var t=this;a&&a.id===this.id||(!0===this.disable&&this.setCacheData("[NO DATA]"),this.doWhat((function(){d||(d=!0,t.createRecommDom()),t.createArrowDom(),t.delay=setTimeout((function(){var e=t.op.arrowDom.find(".rrecom-btn");"none"===e.css("display")&&e.show(),t.moveArrow((function(){e.addClass("rrecom-btn-hover"),t.showRecommDom()}))}),100)})))},t.prototype.dispose=function(){a=null,s&&s.remove(),c&&c.remove(),d=!1,$(window).off("resize.recommend container_resize.recommend scroll.recommend")},t.prototype.createArrowDom=function(){var t=this,e=this.op.target.find(".rrecom-btn-parent");if(e.length)this.op.arrowDom=e;else{var o=['<span class="rrecom-btn-parent rrecom-btn-s">','<span class="rrecom-btn">',"<span></span>","</span>","</span>"].join("");this.op.arrowDom=$(o),this.op.arrowDom.on("click",".rrecom-btn",(function(){t.hideRecommDom()})),this.op.target.css({position:"relative"}).append(this.op.arrowDom)}},t.prototype.resetArrow=function(){this.op.arrowDom.css({right:this.op.arrowOffset_s}).removeClass("rrecom-btn-click rrecom-btn-moving").find(".rrecom-btn").stop().hide().removeClass("rrecom-btn-hover")},t.prototype.setArrowPos=function(){a&&("l"===e.BDSInstance.comm.containerSize?a.op.arrowDom.css("right",this.op.arrowOffset_l):a.op.arrowDom.css("right",this.op.arrowOffset_s))},t.prototype.moveArrow=function(t){var o=this,n={opacity:this.op.endOpacity,right:null};"l"===e.BDSInstance.comm.containerSize?n.right=this.op.arrowOffset_l:n.right=this.op.arrowOffset_s,this.op.arrowDom.stop().addClass("rrecom-btn-moving rrecom-btn-click").animate(n,0,(function(){a&&a!==o&&a.resetArrow(),t()}))},t.prototype.log=function(t){var e={},o=this.op.target.attr("data-click"),n=this.op.target.attr("srcid"),r=this.op.target.attr("tpl"),i=this.op.target.attr("mu");if(n&&(e.rsv_srcid=n),r&&(e.rsv_tpl=r),i&&(e.mu=i),o&&$.extend(e,$.parseJSON(o)),e.p1&&!e.p5&&(e.p5=e.p1),e.p5&&!e.p1&&(e.p1=e.p5),!e.p1&&!e.p5)for(var a=$("#content_left").get(0).children,s=1,c=0,p=a.length;c<p;c++)if(1===a[c].nodeType&&a[c].className&&/\bresult(-op)?\b/.test(a[c].className)){if(a[c]===this.op.target.get(0)){e.p1=s,e.p5=s;break}s++}e.fm="beha";var m=this.op.target.find(".t>a").eq(0);return e.rsv_re_fcurl=m.length?m.attr("href"):i,e.rsv_re_fcurl=e.rsv_re_fcurl||"",e.rsv_re_fcurl=encodeURIComponent(e.rsv_re_fcurl),window.c($.extend(e,t))},t.prototype.getLeftP=function(){var t=this.op.target.attr("data-click"),e=$.parseJSON(t)||{};return e.p1&&!e.p5&&(e.p5=e.p1),e.p5&&!e.p1&&(e.p1=e.p5),e.p5||e.p1||(e.p1=1,e.p5=1),{p1:e.p1,p5:e.p5}},t.prototype.s_log=function(){this.log({rsv_re_fc:2})},t.prototype.setCacheData=function(t){e.BDSInstance.comm.recommends[this.id]=t},t.prototype.getCacheData=function(){return e.BDSInstance.comm.recommends[this.id]},t.prototype.doWhat=function(t){var e=this.getCacheData();"[NO DATA]"!==e&&(e?t():this.getRemoteData(t))},t.prototype.getJsonp=function(t){var o=this.op.target.find(".t>a").eq(0),n=(o.length?o.attr("href"):this.op.target.attr("mu"))||"",r=n&&/.*url=([^&]*).*/.exec(n),i=e.BDSInstance.comm.query,a=this.op.target.attr("class")||"";if((!a||!a.includes("c-group-"))&&r&&r.length&&r.length>0&&r[1]){n=r[1];var s="//pcrec.baidu.com/link?url="+encodeURIComponent(n)+"&query="+encodeURIComponent(i);return $.ajax({url:s,dataType:"jsonp",jsonp:"cb",data:{data_name:t,ie:"utf-8",oe:"utf-8",format:"json",t:Date.parse(new Date)}})}},t.prototype.getRemoteData=function(t){var e=this;$.when(this.getJsonp("recommend_common_merger_online")).then((function(o){o&&o.data&&o.data.length&&o.data[0]?(o.data[0].hintData&&(e.asynClkRcmd(o.data[0].hintData),e.sendShowLog(o.data[0].hintData[0]||{})),(o.data[0].extData||o.data[0].tplData)&&(e.setCacheData(o.data),t())):e.setCacheData("[NO DATA]")}))},t.prototype.asynClkRcmd=function(t){t=t[0]||{};var o=$("#wrapper_wrapper");if(t&&t.linkInfo){var n=this.op.target.find(".c-recommend"),r=n.find(".recommend-line");if(r&&r.length&&(r.remove(),n.append(this.buildRcmdDom(t))),!n||!n.length){var i=$('<div class="new-pmd"></div>'),a=$('<div class="c-gap-top-xsmall c-recommend"></div>'),s='<div class="recommend-tip cos-space-mb-xs">'+(t.tip||"为您推荐:")+"</div>";a.append(s),o.find(".c-recommend").hide(),a.append(this.buildRcmdDom(t)),i.append(a),this.op.target.append(i),this.isIPad()&&e.BDSInstance.comm.sampleval.includes("pc_recommend_invoke")&&$(i).on("click","a",(function(t){t.stopPropagation(),t.preventDefault();var o=t.currentTarget,n=$(o).attr("invoke-index"),r=location.origin+$(o).attr("href");e.eventBus.recommend.invoke.emit({pos:12,index:+n,link:r})}))}}},t.prototype.sendShowLog=function(t){var e=[];t.linkInfo&&t.linkInfo.length>0&&e.push(t.linkInfo),t.linkInfo2&&t.linkInfo2.length>0&&e.push(t.linkInfo2);var o=[];e.forEach((function(t,e){t.forEach((function(t,n){o.push({item:t.txt,h_pos:n+1+"",v_pos:e+1+""})}))}));var n=$("#wrapper_wrapper .c-recommend").filter((function(t,e){return"none"!==$(e).css("display")})).first(),a=n?n.closest("[tpl]"):"",s=a&&a.attr("srcid")||"",c=a&&+(null==a?void 0:a.attr("id"))||null,p=a.clientHeight||0,m=i.getPageContextFromElement(a&&a.get&&a.get(0)||n.get(0)),d=m.pageSize||10,l=m.pageNum,h=0;c&&l&&(h=c-d*(l-1));var f={query:m.query||bds.comm.query||"",qid:m.qid||bds.comm.qid||"",card_type:"aftclk",valueInfo:[{relative_pos:h+"",show_ts:Date.now()+"",pn:m.pn,srcid:s,area:"LEFT",page_num:l+"",height:p,abs_pos:c,iteminfo:o,item_cnt:o.length}]};r.sendUbcLog(19083,"show","",f)},t.prototype.getClkExtParams=function(t,e,o,n){var r=Object.assign({},t);return r.clk_info.item=e,r.clk_info.h_pos=1+o,r.clk_info.v_pos=n,r.clk_info=JSON.stringify(r.clk_info),JSON.stringify(r)},t.prototype.buildRcmdDom=function(t){var o='<div class="recommend-line recommend-line-height-new recommend-no-wrap recommend-line-one">',n=t.linkInfo,r=t.linkInfo2,a=encodeURIComponent(e.BDSInstance.comm.query),s=[],c=0,p='<span class="aftclk-icon"></span>',m=i.getPageContextFromElement(this.op.target&&this.op.target[0]),d=m.pageSize||0,l=m.pageNum,h=0;this.id&&l&&d&&(h=this.id-d*(l-1));for(var f={rsv_click_type:"aftclk",clk_info:{page_tab:"a",area:"LEFT",page_num:l,relative_pos:h}},u=0,g=n.length;u<g;u++){var v=n[u].txt,_="c-gap-left";0===u&&(_="");var w="wd="+encodeURIComponent(n[u].wd)+"&rsv_dl="+n[u].sa+"&bs="+a,x=this.buildURL(w);s.push({url:x,query:v});var b=this.getClkExtParams(f,v,u,1);o+='<a class="recommend-item-a '+(_?_+"-middle":_)+'" href="'+x+'" invoke-index="'+e.escapeHTML(c+"")+'" title="'+e.escapeHTML(v)+'" target=_blank data-click="'+e.escapeHTML(b)+'">'+p+e.escapeHTML(v)+"</a>",c++}if(o+="</div>",r){o+='<div class="recommend-line recommend-line-height-new recommend-no-wrap c-gap-top-middle recommend-line-one">';for(u=0,g=r.length;u<g;u++){v=r[u].txt,_="c-gap-left";0===u&&(_="");w="wd="+encodeURIComponent(r[u].wd)+"&rsv_dl="+r[u].sa+"&bs="+a,x=this.buildURL(w);s.push({url:x,query:v});b=this.getClkExtParams(f,v,u,2);o+='<a class="'+_+'-middle recommend-item-a" href="'+x+'" invoke-index="'+e.escapeHTML(c+"")+'" title="'+e.escapeHTML(v)+'" target=_blank data-click="'+e.escapeHTML(b)+'">'+p+e.escapeHTML(v)+"</a>"}o+="</div>"}return this.isIPad()&&e.BDSInstance.comm.sampleval.includes("pc_recommend_invoke")&&e.eventBus.recommend.update.emit({link:s,pos:12}),o},t.prototype.buildURL=function(t){var o={tn:e.BDSInstance.comm.tn,rsv_idx:""},n=$("#form").find("input[name=rsv_idx]"),r="";for(var i in o.rsv_idx=n.length?n.val():"",o)o.hasOwnProperty(i)&&o[i]&&(r+=i+"="+encodeURIComponent(o[i])+"&");return"/s?"+r+t},t.prototype.renderTpl=function(t,o){var n=this;if(!t||!o)return"";var r={right_recommends_merge:function(t){var r="",i=0;(t=t||o).card&&!t.card.length&&(t.card=[t.card]);for(var a=0,s=t.card.length;a<s;a++){var c=t.card[a];if((i+=parseInt(c.shownums||0,10))>12)break;r+=p(c,a+1)}return r;function p(o,r){var i="</div>",a="",s=o.shownums,c={rsv_srcid:t.StdStg||0};o.list&&!o.list.length&&(o.list=[o.list]),a+=$.format('<div class="cr-content" data-click=\'#{2}\'><div class="cr-title c-clearfix"><span title="#{0}">#{1}</span></div>',o.subtitle,o.subtitle,$.stringify(c)),a+='<div class="rrecom-panel">';for(var p=n.op.target.find(".t>a").eq(0),m=p.length?p.attr("href"):n.op.target.attr("mu"),d=0,l=o.list.length;d<l;d++){var h=o.list[d],f={rsv_re_ename:h.name,rsv_re_uri:h.uri,rsv_re_fcpoi:r+"-"+(d+1),rsv_clk_url:m},u=n.buildURL(h.params+"&euri="+(h.uri||""));if(d===s)break;d%4==0&&(a+='<div class="c-row c-gap-top">'),e.BDSInstance.util&&e.BDSInstance.util.domain&&e.BDSInstance.util.domain.get&&(h.img=e.BDSInstance.util.domain.get(h.img)),a+=$.format('<div class="c-span4#{5} rrecom-item" data-click=\'#{6}\'><div class="rrecom-p"><a target="_blank" href="#{0}"><img class="c-img c-img4 rrecom-img" src="#{1}"></a></div><div class="c-gap-top-small"><a target="_blank" title="#{2}" href="#{3}">#{4}</a></div>',u,h.img,h.name,u,$.subByte(h.name,20),(d+1)%4==0?" c-span-last rrecom-item-rowLast":(d+1)%4==3?" rrecom-item-s":"",$.stringify(f),h.attrpic),a+=i,(d+1)%4!=0&&d!==l-1||(a+=i)}return a+=i,a+=i}}};return r[t]?r[t]():void 0},t.prototype.render=function(t){for(var e="",o=0;o<t.length;o++)e+=this.renderTpl(t[o].extData.tplt,t[o].tplData);var n=this.getLeftP();n.fm="alxr",s.attr("data-click",JSON.stringify(n)).find(".rrecom-content").eq(0).empty().append(e),this.setRecommPosition()},t.prototype.createRecommDom=function(){var t=['<div style="position:fixed;left:-1px;background:#fff;border:1px solid #eee;z-index:103" class="result-op xpath-log" data-click=\'{"fm":"alxr","p1":1,"p5":1}\'>','<div class="rrecom-ajax-loading c-loading"></div>','<div class="rrecom-container">','<a href="javascript:;" class="rrecom-btn-close" data-click=\'{"rsv_re_fc":4,"fm":"beha"}\'></a>','<div class="rrecom-content"></div>',"</div>","</div>"].join(""),o=["<style>",".rrecom-btn-close,.rrecom-btn span{background:url(".concat("https://pss.bdstatic.com/r/www/cache/static/protocol/https/modules/pc/static/services/recommend/rrecom_icon-020f453fb12a6b19.png",") no-repeat;}"),".rrecom-btn-close{display:inline-block;width:13px;height:13px;position:absolute;top:26px;right:10px;background-position:0 -20px;}",".rrecom-btn-parent{z-index:104;position:absolute;right:-37px;top:50%;margin-top:-50px;height:59px;width:40px;cursor:default;padding:20px 0px;}",".rrecom-btn{display:none;background-color:#fff;padding:20px 5px;position:absolute;right:10px;width:20px;height:19px;border:1px solid transparent;}",".rrecom-btn-hover{right:-1px;border:1px solid #eee;border-right:1px solid #fff;z-index:104;box-shadow:0px 2px 0px rgba(0,0,0,0.072);-webkit-box-shadow:0px 2px 0px rgba(0,0,0,0.072);-moz-box-shadow:0px 2px 0px rgba(0,0,0,0.072);-o-box-shadow:0px 2px 0px rgba(0,0,0,0.072);}",".rrecom-btn span{cursor:pointer;background-position:0 0;width:20px;height:19px;position:absolute;top:50%;left:50%;margin:-10px 0 0 -10px;}",".rrecom-container{width:368px;padding-top:43px;overflow:hidden;background-color:#fff;}",".pc-fresh-wrapper{.rrecom-container{width:var(--right-container-width);}}",".rrecom-ajax-loading{position:absolute;left:50%;margin-left:-25px;top:50px;display:none;}",".rrecom-content{margin-left:17px;}",".rrecom-content .cr-content{width:100%;margin-bottom:28px;}",".pc-fresh-wrapper{.rrecom_content_s{width:var(--right-container-width);}}",".rrecom_content_s{padding-left:0px;width:276px;}",".rrecom_content_s .rrecom-item-rowLast{display:none}",".rrecom_content_s .rrecom-item-s{margin-right:0;}",".rrecom-panel{text-align:center;}","</style>"].join("");s=$(t),c=$(o),p=s.find(".rrecom-ajax-loading"),this.setRecommSize(),$("body").append(c).append(s.hide()),this.bindRecommEvent(),$(window).trigger("container_resize.recommend",e.BDSInstance.comm.containerSize);var n=$("#foot");"static"===n.css("position")&&n.css({position:"relative","z-index":104})},t.prototype.setRecommSize=function(){var t=$("#content_right"),o=$("#wrapper_wrapper"),n=$("body"),r=$(window),i=t.offset(),a=n.width(),c={h:r.height()},p=r.scrollTop();o.prevAll().each((function(){if("div"===this.nodeName.toLowerCase()){var t=parseInt($(this).css("margin-bottom"),10);return m.topGap=isNaN(t)?0:t,!1}})),m.topDom=o,m.headDom=$("#head");var d={top:m.topDom.offset().top-m.topGap},l=m.headDom.offset().top-p+56;s.height(c.h),e.BDSInstance.comm.recommends.recommWidth=a-i.left-2,s.css({width:a-i.left-2,top:p<=d.top-l?d.top:l,position:p<=d.top-l?"absolute":"fixed",left:i.left})},t.prototype.setRecommPosition=function(){this.setRecommTop(),this.setRecommLeft()},t.prototype.setRecommTop=function(){var t=$(window).scrollTop(),e={top:m.topDom.offset().top-m.topGap},o=m.headDom.offset().top-t+56;s.css({top:t<=e.top-o?e.top:o,position:t<=e.top-o?"absolute":"fixed"}).find(".rrecom-container").css({"margin-top":"0px"}),m.originalTop=t<e.top-o?e.top-o:t},t.prototype.setRecommLeft=function(){if("fixed"===s.css("position")){var t=$("#content_right").offset().left,e=$(window).scrollLeft();s.css("left",parseInt(t,10)-e)}},t.prototype.bindRecommEvent=function(){var t=this;s.find(".rrecom-btn-close").eq(0).on("click",(function(){t.hideRecommDom()})),$(window).on("scroll.recommend",(function(){var t={top:m.topDom.offset().top-m.topGap},e=m.headDom.offset().top+m.headDom.outerHeight(),o=$(this);if(s&&"none"!==s.css("display")){var n=o.scrollTop(),r=o.scrollLeft();n<=t.top-(e-=n)?"fixed"===s.css("position")&&(s.css("position","absolute"),s.css("top",t.top)):"absolute"===s.css("position")&&(s.css("position","fixed"),s.css("top",e));var i=s.find(".rrecom-container");if(m.originalTop<n){var a=Math.min(s.height()-i.height()-82-75,0);i.css({"margin-top":Math.max(m.originalTop-n,a)})}else i.css({"margin-top":"0px"});if(r){var c=$("#content_right").offset().left;"fixed"===s.css("position")?s.css("left",parseInt(c,10)-r):s.css("left",parseInt(c,10))}}})).on("resize.recommend",(function(){t.setRecommSize(),t.setArrowPos()})).on("container_resize.recommend",(function(e,o){var n=s.find(".rrecom-container");"s"!==o||n.hasClass("rrecom_content_s")?"l"===o&&(n.removeClass("rrecom_content_s"),n.find(".rrecom-content").css("width",t.op.container_l-17+"px")):(n.addClass("rrecom_content_s"),n.find(".rrecom-content").css("width",t.op.container_s-17+"px"))}))},t.prototype.hideRecommDom=function(){s.find(".rrecom-container").animate({width:"0px"},200,(function(){s.hide()})),a&&window.clearTimeout(a.delay.overArrow),a&&a.resetArrow(),a=null},t.prototype.showRecommDom=function(){if("none"===s.css("display")){s.css({opacity:.3}).show().animate({opacity:1},100);var t=s.find(".rrecom-container"),o=e.BDSInstance.comm.recommends.recommWidth;t.css({width:0}).animate({width:o+"px"},200)}s.find(".rrecom_content_s").length>0?s.find(".rrecom-content").css("width",this.op.container_s-17+"px"):s.find(".rrecom-content").css("width",this.op.container_l-17+"px"),a=this,this.render(this.getCacheData())},t.prototype.showLoading=function(){p.show()},t.prototype.hideLoading=function(){p.hide()},t.prototype.isIPad=function(){var t=navigator.userAgent;return/macintosh|mac os x/i.test(t)&&window.screen.height>window.screen.width&&!/(iPhone\sOS)\s([\d_]+)/.exec(t)||/(iPad).*OS\s([\d_]+)/.exec(t)},t}();e.BDSInstance.lifecycle.onSwapBegin((function(){a&&a.hideRecommDom(),a=null,d=!1,m=null}));var h=function(){function t(t){var o=this;this.invokeService=t,e.eventBus.recommend.update.on((function(t){o.updateLink(t.pos,t.link)})),e.eventBus.recommend.invoke.on((function(t){o.execInvoke(t)}))}return t.prototype.execInvoke=function(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){return this.invokeService.isIPad()&&this.invokeService.hitMcp(t.pos)&&this.invokeService.canInvoke(t.pos)?this.invokeService.execInvoke(t.pos,{},t.index):window.open(t.link,"_blank"),[2]}))}))},t.prototype.updateLink=function(t,o){return e.__awaiter(this,void 0,void 0,(function(){var n,r;return e.__generator(this,(function(e){switch(e.label){case 0:return this.invokeService.isIPad()?[4,this.invokeService.init()]:[3,3];case 1:return e.sent(),n=location.origin,r=o.map((function(t){return{url:"".concat(n).concat(t.url),query:t.query}})),[4,this.invokeService.getInvokeInfo(t,r)];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},t=e.__decorate([o.injectable,e.__metadata("design:paramtypes",[n.index_pc.MCPInvokeService])],t)}();e.BDSInstance.lifecycle.onSwapEnd((function(){bds.comm.upn&&bds.comm.upn.ie&&6===bds.comm.upn.ie||$(document).on("click","#content_left .result .t>a, #content_left .result-op .t>a, .op-se-listen-recommend",(function(t){if(!t.ctrlKey&&"0"===bds.comm.urlRecFlag){var e=$(this).closest(".result, .result-op");new l({target:e})}}))}),{once:!0});var f=Object.freeze({__proto__:null,RecommendService:h});t.EslModuleExport62=f;Object.keys(f).forEach(function(item){t[item]=f[item]})}));
;define('@baidu/search-api',['exports','@baidu/webb','@baidu/codeCover','@baidu/ubc-report-sdk/dist/ubc-web-sdk.umd.min','head-script/pc/static/index','@baidu/inject-js'],(function(t,e,n,r,o,s){;"use strict";function i(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(n){if("default"!==n&&!(n in t)){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}))})),Object.freeze(t)}var a={},c=o.getAugmentedNamespace(s.esm5),u=o.getAugmentedNamespace(o.tslib_es6);!function(t){Object.defineProperty(t,"__esModule",{value:!0});var o=c,s=u,i=n,a=r;function p(t){return t&&"object"==typeof t&&"default"in t?t:{"default":t}}var d=p(e),l=p(i),h=p(a),f=o.createInjectToken(),m=o.createInjectToken(),g=o.createInjectToken(),v=o.createInjectToken(),y=o.createInjectToken();function _(t,e){if(t)return t.__scope__?t===e:_(t.parentElement||t.parentNode,e)}o.createInjectToken();var b=function(){function t(){this.root=[]}return t.prototype.getRoot=function(){return this.root},t.prototype.setRoot=function(t){var e=[];"string"==typeof t?Array.prototype.forEach.call(document.querySelectorAll(t),(function(t){e.push(t)})):e=Array.isArray(t)?t:[t],this.root.forEach((function(t){t&&(t.__scope__=null)})),this.root=e,this.root.forEach((function(t){t.__scope__=!0}))},t.prototype.querySelectorAll=function(t,e){void 0===e&&(e=!1);var n=[];return this.root.forEach((function(r){Array.prototype.forEach.call(r.querySelectorAll(t),(function(t){!0===_(t,r)&&n.push(t)})),e&&r.parentElement&&Array.prototype.forEach.call(r.parentElement.querySelectorAll(t),(function(t){t===r&&n.push(t)}))})),n},t.prototype.querySelector=function(t,e){void 0===e&&(e=!1);var n=this.querySelectorAll(t,e);return n.length>0?n[0]:null},t.prototype.forEach=function(t,e){return this.root.forEach(t,e)},t.prototype.inThisScope=function(t){return this.root.some((function(e){return _(t,e)}))},t}(),I=o.createInjectToken();function w(t,e){void 0===e&&(e=document);var n=t.slice(1);if(void 0!==window.__initData__&&window.__initData__&&window.__initData__[n])return window.__initData__[n];var r=e.querySelectorAll(t),o={};if(!r.length)return console.warn("[extract: ".concat(t,"] NO DATA FOUND")),o;try{for(var s=0,i=r.length;s<i;s++){var a=r[s].innerHTML.replace(/<>/g,">"),c=JSON.parse(a);Object.assign(o,c)}}catch(e){console.warn("[extract: ".concat(t,"] PARSE DATA ERROR: ").concat(e.stack))}return o}var k,S,E,x,T=function(t){function e(){return t.call(this,{})||this}return s.__extends(e,t),e.prototype.updated=function(){var t=w("#query-data");this.updateQueryData(t)},e.prototype.updatedFromScope=function(t){var e=w("[data-for=query]",t);this.updateQueryData(e)},e.prototype.updateQueryData=function(t){this.update(this.unifyPropsWithWise(t))},e.prototype.unifyPropsWithWise=function(t){return Object.entries({lid:"qid"}).forEach((function(e){var n=e[0],r=e[1];t[r]&&(t[n]=t[r])})),t},s.__decorate([o.injectable,s.__metadata("design:paramtypes",[])],e)}(function(){function t(t){this.data=t||{}}return t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t){this.data=t},t.prototype.update=function(t){this.data=Object.assign(this.data,t)},t}()),C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data={},e.sampleval=[],e}return s.__extends(e,t),e.prototype.updated=function(){this.data=w("#sample-data"),Object.keys(this.data).length||(this.data={sid:"",sampleval:[]}),this.setSids(this.data.sid),this.setVariables(this.data.sampleval)},e.prototype.hitSample=function(t){return this.sampleval.indexOf(t)>-1},e.prototype.get=function(t){return this.data[t]},e.prototype.getValue=function(t){return this.hitSample(t)?t:void 0},e.prototype.getValues=function(){return this.get("sampleval")},e.prototype.hitValue=function(t,e){return this.hitSample(e||"")},e.prototype.setVariables=function(t){t&&(this.sampleval=t)},s.__decorate([o.injectable],e)}(function(){function t(){this.sids=[]}return t.prototype.getSids=function(){return this.sids},t.prototype.hitSid=function(t){return this.sids.indexOf(t+"")>-1},t.prototype.setSids=function(t){t&&(this.sids="string"==typeof t?t.split("_"):t)},t}()),P=function(){function t(t,e,n){this.queryServ=t,this.document=e,this.sampleServ=n}return t.prototype.send=function(t,e){return void 0===e&&(e="sclick"),"nsclick"===e?window.ns_c(t):this.sclick(t)},t.prototype.sclick=function(t){var e=this.queryServ,n=this.document,r=bds.comm,o=t.p1;if("alop"===t.fm&&!("rsv_xpath"in t)&&!n.getElementById(o))return"";o&&!("p5"in t)&&(t.p5=o);var s={q:e.get("queryEnc"),rsv_sid:this.sampleServ.get("sid"),cid:e.get("cid"),qid:e.get("qid"),rsv_tn:e.get("tn"),rsv_iorr:r.resultPage||0,rsv_ssl:"https:"===n.location.protocol?1:0,path:n.location.href,rsv_did:r.did||"",t:+new Date},i=e.get("inter");i&&(s.rsv_inter=i),r.seinfo&&r.seinfo.rsv_pstg&&(s.rsv_pstg=r.seinfo.rsv_pstg);var a=r.cftime;a&&0!=a&&(s.rsv_cftime=a);var c=r.indexSid;c&&(s.rsv_isid=c);var u=r.lastVoiceQuery;u&&(s.rsv_lavo=encodeURIComponent(u)),t=Object.assign(t,s);var p=this.normalized(t,e.get("ubsurl"));return(new Image).src=p,p},t.prototype.normalized=function(t,e){var n=[];for(var r in t)switch(r){case"title":var o=t[r].replace(/<[^<>]+>/g,"");o&&o.length>100&&(o=o.substring(0,100)),n.push("".concat(r,"=").concat(encodeURIComponent(o)));break;case"mu":case"url":case"path":n.push("".concat(r,"=").concat(escape(t[r])));break;default:n.push("".concat(r,"=").concat(t[r]))}return"".concat(e,"?").concat(n.join("&"))},s.__decorate([o.injectable,s.__param(1,o.inject(f)),s.__metadata("design:paramtypes",[T,Document,C])],t)}(),A=function(){function t(t,e){this.userLogDataOuterKeys=t,this.pageCommInfo=e||{}}return t.prototype.handleUserLogData=function(t){return t.extra&&t.extra.length>1e3&&(t.extra=t.extra.slice(0,1e3)),t.hasOwnProperty("tcreq4log")&&0!==t.tcreq4log&&1!==t.tcreq4log&&(t.tcreq4log=void 0),t},t.prototype.makeClickInfo=function(t,e){var n=Object.assign({srcid:e.srcid,tplname:e.tplname+(e.lego_id?"|"+e.lego_id:""),type:"o",t:+new Date},t,this.pageCommInfo.pd?{tab_se:"1",pd:this.pageCommInfo.pd}:{});if(this.userLogDataOuterKeys.forEach((function(t){n[t]&&(n[t]=void 0)})),e.is_group&&e.group_id){n.group_id=e.group_id;var r=this.pageCommInfo.sigmaConf;r&&r.isMax&&(n.group_mtype="1",n.group_bz_mcid=r.bzMaxMcid)}return JSON.stringify(n)},t}(),O=["src"],j=function(t){function e(e){var n=t.call(this,O)||this;return n.log=e,n}return s.__extends(e,t),e.prototype.send=function(t,e){t=this.handleUserLogData(t);var n=this.makeLogData(t,e);this.sendLog(n)},e.prototype.sendLog=function(t){this.log.send(t)},e.prototype.makeLogData=function(t,e){return{fm:t.fm||"alop",clk_info:this.makeClickInfo(t,e),p1:e.order,rsv_tpl:e.tplname,rsv_srcid:e.srcid}},s.__decorate([o.injectable,s.__metadata("design:paramtypes",[P])],e)}(A),L=function(){function t(){}return t.setElement=function(e){t.el=e},t.setData=function(e){t.data=e},t.prototype.create=function(){return{el:t.el,data:t.data}},t}(),N=function(t){function e(e){return t.call(this,e)||this}return s.__extends(e,t),s.__decorate([o.injectable,s.__param(0,o.inject(f)),s.__metadata("design:paramtypes",[Document])],e)}(function(){function t(t){this.document=t}return t.prototype.set=function(t,e,n){if(void 0===n&&(n={}),!t)return!1;if("string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e)return console.error("type of value must be string | number | boolean"),!1;var r=e+"",o=n.expires;"number"==typeof o&&(o=new Date(Date.now()+o).toUTCString());var s=[this.encode(t)+"="+this.encode(r,n.raw),o?"; expires="+o:"",n.path?"; path="+n.path:"; path=/",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("");return this.document.cookie=s,!0},t.prototype.get=function(t,e){if(!t)return null;var n=this.document.cookie.match(new RegExp("(^| )"+t+"=([^;]*)(;|$)"));return n&&n[2]?this.decode(n[2],e):null},t.prototype.clear=function(t){return!!t&&(this.document.cookie=t+"=;expires=Fri, 02-Jan-1970 00:00:00 GMT",!0)},t.prototype.encode=function(t,e){return e?t:encodeURIComponent(t)},t.prototype.decode=function(t,e){return e?t:decodeURIComponent(t)},t}()),q=function(){function t(){this.data={osid:"",tanet:""}}return t.prototype.updated=function(){this.data=w("#device-data")},t.prototype.get=function(t){return this.data[t]},s.__decorate([o.injectable],t)}(),U=function(t){function e(){var e=w("#httpsdomain-data");return t.call(this,e)||this}return s.__extends(e,t),e.prototype.get=function(t){return t?(this.compatIndexAsyncLogic(),this.handleUrl(t)):""},e.prototype.compatIndexAsyncLogic=function(){"{}"===JSON.stringify(this.data)&&(this.data=w("#httpsdomain-data"))},s.__decorate([o.injectable,s.__metadata("design:paramtypes",[])],e)}(function(){function t(t){this.data=t||{}}return t.prototype.set=function(t,e){this.data[t]=e},t.prototype.handleUrl=function(t){var e=t.match(/^(http[s]?:\/\/)?([^\/]+)(.*)/),n=e&&this.data[e[2]];return n?n+e[3]:t},t}()),R=function(){function t(){var t={pid:"19_103",lid:this.getLid(),et_comm:{sample:.5,sampleType:"eachreq"}},e=new d["default"](t);this.cv=new l["default"](e.send.bind(e))}return t.prototype.updated=function(){this.cv.init()},t.prototype.send=function(t,e,n){void 0===e&&(e=0);var r=n?{stack:(new Error).stack}:"";this.cv.send(t,e,r)},t.prototype.getLid=function(){var t=document.getElementById("query-data")||document.querySelectorAll("[data-for=query]")[0],e=t&&JSON.parse(t.innerHTML);return(null==e?void 0:e.lid)||(null==e?void 0:e.qid)},s.__decorate([o.injectable,s.__metadata("design:paramtypes",[])],t)}(),D=function(){function t(t){this.log=t}return t.prototype.send=function(t){var e={rsv_ct:t.ct,rsv_cst:t.cst};t.clk_extra&&(e.rsv_clk_extra=t.clk_extra),this.log.send(e)},s.__decorate([o.injectable,s.__metadata("design:paramtypes",[P])],t)}(),M="data-ucfg",B="ubc-show",F="data-uclk",K="wuji-id",V=function(t){function e(e,n){return t.call(this,e,n)||this}return s.__extends(e,t),e.prototype.getBrowserName=function(){return"pc"},e.prototype.getUbcExtParams=function(t,e,n){var r={tplname:n.getAttribute("tpl"),srcid:n.getAttribute("srcid")};n.getAttribute(K)&&(r.tplname="".concat(r.tplname,"|").concat(n.getAttribute(K)));for(var o=!1,s=[],i=t;i&&i!==n;){try{var a=JSON.parse(i.getAttribute(e));a&&s.push(a)}catch(t){}i.hasAttribute("ubc-clk")&&(o=!0),i=i.parentElement}if(e!==F||o)return s.reverse().forEach((function(t){return Object.assign(r,t)})),r},s.__decorate([o.injectable,s.__param(0,o.inject(I)),s.__metadata("design:paramtypes",[b,T])],e)}(function(){function t(t,e,n){this.scope=t,this.query=e,this.pageComm=n,this.observer=null,window.IntersectionObserver&&1!==this.query.get("disableResultLog")&&(this.initObserver(),this.attach())}return t.prototype.send=function(t,e){var n=this;return new Promise((function(r){if(1!==n.query.get("disableResultLog")){var o=e.ubcId,i=e.config,a=s.__assign({version:"2.0"},i);h["default"]("".concat(o,".init"),o,a),h["default"]("".concat(o,".config"),a);var c=n.getBrowserName(),u="pc"===c;t.ext=s.__assign({qid:u?n.query.get("qid"):n.query.get("lid"),browser:c},t.ext),u||n.injectSuperParams(t),h["default"]("".concat(o,".event"),s.__assign(s.__assign({},t),{useSendBeacon:1}),r)}else r("disableLog")}))},t.prototype.sendLog=function(t,e){if(!this.pageComm||1!==this.pageComm.get("disableResultLog")){var n=e.tplname,r=e.order,o=e.lego_id,i=e.srcid,a="pc"===this.getBrowserName()?this.scope.querySelector('[tpl="'.concat(n,'"][id="').concat(r,'"]')+(o?"[".concat(K,'="').concat(o,'"]'):"")):this.scope.querySelector('[tpl="'.concat(n,'"][order="').concat(r,'"]')+(o?'[legoid="'.concat(o,'"]'):""));if(!a)return Promise.reject();var c=this.getCardUcfg(a);return c?(t.ext=s.__assign({tplname:o?"".concat(n,"|").concat(o):n,srcid:i},t.ext),this.send(t,c)):Promise.reject()}},t.prototype.registerObserver=function(t){var e=this;this.observer&&t&&(t.querySelectorAll("[".concat(B,"]")).forEach((function(t){e.observer.observe(t)})),t.hasAttribute(B)&&this.observer.observe(t))},t.prototype.injectSuperParams=function(t){if(t.ext){t.ext.sfrom&&(t.source=t.ext.sfrom),t.ext.module&&(t.value=t.ext.module),t.ext.pos_id&&(t.pos_id=t.ext.pos_id),t.ext.ev_l_t&&(t.ev_l_t=t.ext.ev_l_t);var e=t.ext,n=e.xfrom,r=e.qid,o=e.srcid,s=t.source;t.ext.sessionid=[n?"xr[".concat(n,"]"):"",s?"sr[".concat(s,"]"):"",r?"lid[".concat(r,"]"):"",o?"si[".concat(o,"]"):""].filter((function(t){return!!t})).join("_")}},t.prototype.initObserver=function(){var t=this;this.observer=new IntersectionObserver((function(e){e.forEach((function(e){var n=e.intersectionRatio,r=e.target;if(!(n<=0)){t.observer.unobserve(r);var o=t.getCardWrapper(r);if(o){var s=t.getCardUcfg(o),i=t.getUbcExtParams(r,"data-ushow",o);s&&i&&setTimeout((function(){t.send({type:"show",ext:i},s)}))}}}))}))},t.prototype.attach=function(){var t=this,e="pc"===this.getBrowserName()?".result-op":".results>.c-result",n=this.scope.querySelectorAll(e),r="pc"===this.getBrowserName();n&&n.forEach((function(e){var n=r?e.children&&e.children[0]:e,o=n&&t.getCardUcfg(n);o&&(e.addEventListener("click",(function(n){var r=t.getUbcExtParams(n.target,F,e);r&&t.send({type:"click",ext:r},o)})),t.registerObserver(e))}))},t.prototype.getCardUcfg=function(t){var e=t.getAttribute(M);if(!e){var n=t.querySelector("[".concat(M,"]"));if(!n)return null;e=n.getAttribute(M)}try{return JSON.parse(e)}catch(t){return null}},t.prototype.getCardWrapper=function(t){for(var e=t,n="pc"===this.getBrowserName()?"srcid":"new_srcid";e&&(!e.hasAttribute("tpl")||!e.hasAttribute(n));)e=e.parentElement;return e},t}()),z=function(){function t(){this.data={}}return t.prototype.updated=function(t){this.data=t||w("#user-data")},t.prototype.get=function(t){return this.data[t]},t.prototype.isUserLogin=function(){return!!this.data.isLogin},t.prototype.getUserInfo=function(){return this.data.isLogin?{uid:!0,uname:this.data.username,displayname:this.data.displayname}:null},t.prototype.getLoginUrlPrefix=function(){return"https://passport.baidu.com/v2/?login&tpl=mn&u="},s.__decorate([o.injectable],t)}(),W=function(t){for(var e=[],n=t.previousSibling;n;)n.tagName===t.tagName&&e.push(n),n=n.previousSibling;return e.length},H=function(){function t(){}return t.prototype.getXpath=function(t){for(var e=function(t,e){for(var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;t&&!n.call(t,"[srcid]")&&t.parentElement;)t=t.parentElement;return t}(t),n=[];t&&t!==e;){var r=W(t),o="".concat(t.nodeName.toLowerCase()).concat(r>0?r+1:""),s=t.getAttribute("data-module");s=s?"(".concat(s,")"):"",n.push("".concat(o).concat(s)),t=t.parentNode}return n.reverse().join("-")},s.__decorate([o.injectable],t)}(),J=o.createInjectToken(),G=function(){function t(t){this.require=t}return t.prototype.fetch=function(){var t=this;return new Promise((function(e){t.require(["@baidu/utils"],(function(t){e(t({isHttps:"https:"===location.protocol}))}))}))},s.__decorate([o.injectable,s.__param(0,o.inject(J)),s.__metadata("design:paramtypes",[Function])],t)}(),Q=function(){function t(){}return t.prototype.updated=function(){this.data=w("#conf-data")},t.prototype.get=function(t){return this.data[t]},s.__decorate([o.injectable],t)}(),Y=(k={},S=function(t,e){return new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".+")+"$").test(e)},E=function(t){var e=t.match(/(.+)\.(.+)/);return e&&e[1]&&e[2]?{prod:e[1],name:e[2]}:null},{on:function(t,e){var n=E(t);if(!n)return!1;k[n.name]=k[n.name]||[],k[n.name].push({prod:n.prod,callback:e})},off:function(t,e){var n=E(t);if(!n)return!1;for(var r=k[n.name]||[],o=0;o<r.length;){var s=r[o];e===s.callback&&S(n.prod,s.prod)?r.splice(o,1):o++}},trigger:function(t,e){var n=this,r=E(t);if(!r)return!1;var o=k[r.name]||[],s={data:e,eventId:t};o.forEach((function(t){try{S(t.prod,r.prod)&&t.callback.call(n,s)}catch(t){}}))}});t.EVENT_TYPE=void 0,(x=t.EVENT_TYPE||(t.EVENT_TYPE={})).OPEN_RESULT_TTS="result.open_tts",x.CLOSE_RESULT_TTS="result.close_tts",x.CLOSE_AGING_TOOLS="aging-tools.close",x.CHANGE_HEAD_GRADIENT="pz.headgradient",x.BAIKAN_START_RENDER="baikan:startRender",x.BAIKAN_UPDATE_RENDER="baikan:updateRender",x.BAIKAN_STOP_RENDER="baikan:stopRender",x.BAIKAN_BLOCK_RENDER_FINISHED="baikan:blockRenderFinished",x.BAIKAN_ENTRY_RENDER_FINISHED="baikan:entryRenderFinished",x.BAIKAN_CLEAR_RENDER="baikan:clearRender";var X=["baikan"],Z=function(){function t(){this.events={},this.stickyEvents=new Set,this.customEventType=[],this.lastStickyArgs=new Map,this.event=Y}return t.prototype.on=function(t,e){return this.customEventType.includes(t)?(this.events[t]||(this.events[t]=[]),this.events[t].push(e),this.stickyEvents.has(t)&&this.lastStickyArgs.has(t)&&e.apply(void 0,this.lastStickyArgs.get(t)),this):this.event.on(t,e)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this.customEventType.includes(t)){var r=this.events[t];return r&&r.length>0&&r.forEach((function(t){return t.apply(void 0,e)})),this.stickyEvents.has(t)?(this.lastStickyArgs.set(t,e),!0):r&&r.length>0}return this.event.trigger(t,e[0])},t.prototype.off=function(t,e){if(this.customEventType.includes(t)){var n=this.events[t];if(!n||0===n.length)return this;if(void 0===e)delete this.events[t];else{var r=n.indexOf(e);r>-1&&n.splice(r,1)}return this}if(e)return this.event.off(t,e)},t.prototype.addEventType=function(t,e){var n=this;t&&X.includes(e)&&(Array.isArray(t)?t:[t]).forEach((function(t){var e,r;if("string"==typeof t)n.customEventType.push(t);else{var o=(e=t).eventName,s=void 0!==(r=e.isSticky)&&r;o&&(n.customEventType.push(o),s&&n.stickyEvents.add(o))}}))},t.prototype.removeEventType=function(t){t&&(this.customEventType=this.customEventType.filter((function(e){return e!==t})))},s.__decorate([o.injectable,s.__metadata("design:paramtypes",[])],t)}(),tt=function(){function t(){}return t.prototype.invoke=function(){},t.prototype.getControlByPos=function(){},t.prototype.getLogData=function(){return{}},t.prototype.sendLog=function(){},t.prototype.renderPopup=function(){},t}(),et=function(){function t(){this.setInvokeCookie=function(){},this.ivkBox=new tt}return t.prototype.getInvokeConf=function(){},s.__decorate([o.injectable],t)}();var nt=function(){function t(t,e){this.stat=!1,this.passv3={},this.maketext="",this.subpro="",this.user=t,this.require=e,this.loginCallback=function(){window.document.location.reload(!0)}}return t.prototype.open=function(t,e){this.stat?this.passBackSet(t):this.loadUniLoginWrapper(t,e)},t.prototype.setSubpro=function(t){this.subpro=t},t.prototype.setMakeText=function(t){this.maketext=t},t.prototype.loadUniLoginWrapper=function(t,e){var n,r=this;(n="".concat(location.protocol).concat("//passport.baidu.com/passApi/js/uni_login_wrapper.js?cdnversion=").concat((new Date).getTime()),new Promise((function(t,e){var r=document.createElement("script");r.src=n,r.async=!0,r.onload=function(){t()},r.onerror=function(){e(new Error("Script load error for ".concat(n)))},document.head.appendChild(r)}))).then((function(){r.initPassSdk(e),r.stat=!0,r.passBackSet(t)}))["catch"]((function(t){console.error("[passport] Passport login wrapper load error:",t)}))},t.prototype.passBackSet=function(t){this.passv3.setSubpro(this.subpro),this.passv3.setMakeText(this.maketext),this.loginCallback=t||function(){window.document.location.reload(!0)},this.passv3.show()},t.prototype.asyncLoginCallback=function(t){this.user.updated(t),function(t){var e,n;!function(t){for(var e=Array.from(document.querySelectorAll("#u .lb")),n=0;n<e.length;n++){var r=e[n];r.parentNode&&r.parentNode.removeChild(r)}}(),e='<a href="https://www.baidu.com/my/index" id="user" class="username">\n <span class="s-top-img-wrapper"><img src="'.concat(t.userPortrait,'"/></span>\n <span class="s-top-username">').concat(t.user,"</span>\n </a>"),(n=document.querySelector("#u"))&&("string"==typeof e?n.insertAdjacentHTML("beforeend",e):n.appendChild(e))}(t),this.require(["nu-instant-search"],(function(t){t.initNuIstanctSearchEvents()})),this.loginCallback(t)},t.prototype.successCallback=function(t){this.passv3.hide(),bds.comm.username=t.username,this.asyncLoginCallback(t)},t.prototype.initPassSdk=function(t){var e=this,n=window.passport;this.passv3=n.pop.init({apiOpt:{loginType:1,product:"mn",u:window.document.location.href,safeFlag:0,qrcode:2,staticPage:"".concat(location.protocol,"//www.baidu.com/cache/user/html/v3Jump.html"),sms:5,logParams:Object.assign({},t)},cache:!1,tangram:!0,loginVersion:"v5",composeTemplate:1,authsite:["qzone","tsina","weixin"],authsiteCfg:{act:"implicit",display:"popup",jumpUrl:"".concat(location.protocol,"//www.baidu.com/cache/user/html/xd.html"),onBindSuccess:function(t,n){var r=decodeURIComponent(n.passport_uname||n.displayname),o={user:r,username:r,displayname:decodeURIComponent(n.displayname),isLogin:"1",userPortrait:"",stoken:""};return e.successCallback(o),!1}},onLoginSuccess:function(t){t.returnValue=!1;var n="",r="",o="",s="";t&&t.rsp&&t.rsp.data&&(n=t.rsp.data.userName||t.rsp.data.mail||t.rsp.data.phoneNumber||t.rsp.data.user&&t.rsp.data.user.username,r=t.rsp.data.user&&t.rsp.data.user.portraitUrl,o=t.rsp.data.session&&t.rsp.data.session.stoken,s=t.rsp.data.displayname?t.rsp.data.displayname:n);var i={user:n,username:n,displayname:s,isLogin:"1",userPortrait:r,stoken:o};e.successCallback(i)},onHide:function(){e.setSubpro(""),e.setMakeText("")}})},s.__decorate([o.injectable,s.__param(1,o.inject(J)),s.__metadata("design:paramtypes",[z,Function])],t)}(),rt=function(){function t(t){this.require=t,this.mcp=null,this.pos2InvokeInfo=new Map}return t.prototype.isIPad=function(){var t=navigator.userAgent;return/macintosh|mac os x/i.test(t)&&window.screen.height>window.screen.width&&!t.match(/(iPhone\sOS)\s([\d_]+)/)||t.match(/(iPad).*OS\s([\d_]+)/)},t.prototype.init=function(){return s.__awaiter(this,void 0,void 0,(function(){var t;return s.__generator(this,(function(e){switch(e.label){case 0:return this.isIPad()?this.mcp?[2]:(t=this,[4,this.getMCP()]):[2];case 1:return t.mcp=e.sent(),this.mcp?(this.mcp.setCommonParams({app:"wise",scene:"ipad",from:""}),[2]):[2]}}))}))},t.prototype.canInvoke=function(t){if(!this.mcp)return!1;var e=this.getKey(t);return!this.mcp.getExitInfo(e).isExit},t.prototype.hitMcp=function(t){if(!this.isIPad())return!1;if(!this.mcp)return!1;var e=this.getKey(t);if(!this.pos2InvokeInfo.has(e))return!1;var n=this.pos2InvokeInfo.get(e).action_rule;return!(!n||!n["".concat(e)])&&this.mcp.hitMcp(n["".concat(e)])},t.prototype.execInvoke=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n=0),s.__awaiter(this,void 0,void 0,(function(){var r,o,i,a,c;return s.__generator(this,(function(s){switch(s.label){case 0:if(!this.isIPad())return[2];if(!this.mcp)return[2];if(r=this.getKey(t),!this.pos2InvokeInfo.has(r))return[2];o=this.pos2InvokeInfo.get(r),i=o.log_id,a=this.mcp.replaceStubs(o,e),c=a.action_rule["".concat(r)][n],s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.mcp.execInvoke(r,c,i)];case 2:case 3:return s.sent(),[3,4];case 4:return[2]}}))}))},t.prototype.getInvokeInfo=function(t,e){return s.__awaiter(this,void 0,void 0,(function(){var n,r,o,i;return s.__generator(this,(function(s){switch(s.label){case 0:return this.isIPad()&&this.mcp?(n=this.getKey(t),r={invoke_info:(i={},i["".concat(n)]=null!=e?e:[{}],i)},[4,this.mcp.getInvokeInfo(r)]):[2];case 1:return o=s.sent(),this.pos2InvokeInfo.set(n,o),[2]}}))}))},t.prototype.getInvokeInfos=function(t){return s.__awaiter(this,void 0,void 0,(function(){var e,n=this;return s.__generator(this,(function(r){switch(r.label){case 0:return this.isIPad()&&this.mcp?[4,this.mcp.getInvokeInfo(t)]:[2];case 1:return e=r.sent(),Object.keys(e.action_rule).forEach((function(t){var r;n.pos2InvokeInfo.set(t,{global_conf:e.global_conf,log_id:e.log_id,action_rule:(r={},r["".concat(t)]=e.action_rule[t],r)})})),[2]}}))}))},t.prototype.getOneInvokeInfo=function(t,e){void 0===e&&(e=0);var n=this.getKey(t);return this.pos2InvokeInfo.has(n)?this.pos2InvokeInfo.get(n).action_rule[n][e]:null},t.prototype.getKey=function(t){return"pos_".concat(t)},t.prototype.getMCP=function(){var t=this;return new Promise((function(e){t.require(["@baidu/mcp-sdk/dist/apm/index"],(function(t){e(t)}))}))},s.__decorate([o.injectable,s.__param(0,o.inject(J)),s.__metadata("design:paramtypes",[Function])],t)}(),ot=function(){function t(t,e,n,r,o){var s=this;this.observer=null,this.idList=[],this.pendingItems=[],this.document=document,this.ls=t,this.logServe=e,this.require=n,this.contentRight=$("#content_right"),this.sampleServ=r,this.userInfo=o,this.UPS=window.UPS,this.shouldBlockTts()?($("body").removeClass("open-result-tts"),localStorage.setItem("set_result_tts","close")):(this.initAClick(!0),this.require(["@baidu/pc-tts-player"],(function(t){var e,n=null===(e=s.contentRight.offset())||void 0===e?void 0:e.left,r=n?"".concat(n,"px"):"870px";$("#result_tts_player").remove(),$("body").append('<div id="result_tts_player"></div>');var o=new t.TtsPlayer({uiOptions:{rootSelector:"#result_tts_player",bottom:"10px",left:r,smallWidth:1216},coreOptions:{editFunc:function(t,e){s.editVoiceList(t,e)},voiceList:s.getVoiceList()},logOptions:{logFrom:"searchlist",clickTid:"11546",showTid:"11545",durationTid:"11549",sid:s.sampleServ.get("sid")}});s.player=o,s.initTtsPlayer(o)})))}return t.prototype.shouldBlockTts=function(){var t=navigator.userAgent,e=Boolean(t.match(/(iPad)/))||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,n=t.indexOf("compatible")>-1&&t.indexOf("MSIE")>-1||document.documentMode;return e||n},t.prototype.getTtsStatus=function(){return"open"===this.ls.getItem("set_result_tts")},t.prototype.initAClick=function(t){var e=this;if(this.getTtsStatus()){$("set-result-tts").css({display:"none"}),$("body").addClass("open-result-tts");var n=$(".open-result-tts").find('[has-tts="true"]').find("a"),r=function(){$(e).parents('[has-tts="true"]').addClass("news-readed")};t?n.on("click",r):n.off("click",r)}else $("set-result-tts").css({display:"inline-block"})},t.prototype.initTtsPlayer=function(t){var e=this;try{var n=$("#content_left"),r=this.collectTtsItems(n);if(t.addItems(r),this.flushPendingItems(),$("body").hasClass("open-result-tts")){var o={rsv_ct:"2",rsv_cst:"4",rsv_clk_extra:"{nums: ".concat(this.idList.length,"}")};this.logServe.send(o)}t.render(),t.hide();var s="",i=function(n){var r=$(n.currentTarget).parent().attr("data-tts-source-type"),o=$(n.currentTarget).parent().attr("data-tts-id");o="baijiahao"===r?"news_".concat(o):o,t.core.curPlayItem&&o===t.core.curPlayItem.id?t["continue"]():(t.playItem(o),s="news"!==o.split("_")[0]?o:o.split("_")[1]),e.playUI(n.currentTarget),$(n.currentTarget).parents('[has-tts="true"]').addClass("news-reading"),t.show(),e.logServe.send({rsv_ct:"2",rsv_cst:"5"}),Y.trigger("result.play_tts",null),Y.trigger("aging-tools.close",null),n.stopPropagation()},a=function(n){t.pause(),e.pauseUI(n.currentTarget),$(n.currentTarget).parents('[has-tts="true"]').removeClass("news-reading").addClass("news-readed"),e.logServe.send({rsv_ct:"2",rsv_cst:"6"}),n.stopPropagation()},c=function(){$(".play-tts").off("click").on("click",i),$(".pause-tts").off("click").on("click",a)};c();var u=function(){return t.hide()};$(".bdpfmenu .set-close-result-tts").on("click",u);var p=function(t){return"news"!==t.split("_")[0]?t:t.split("_")[1]};t.init().then((function(){t.events.on("startPlay",(function(n){Y.trigger("result.play_tts",null);var r=p(n.curPlayItem.id),o=".tts[data-tts-id=".concat(r,"]");e.playUI($(o).children(".play-tts")),$(o).parents('[has-tts="true"]').addClass("news-reading");var i=0;if(n.lastPlayItem){var a=p(n.lastPlayItem.id),c=".tts[data-tts-id=".concat(a,"]");$(c).parents('[has-tts="true"]').removeClass("news-reading").addClass("news-readed"),i=e.idList.indexOf(n.lastPlayItem.id)}var u=e.idList.indexOf(r);if($(o).parents('[has-tts="true"]').hasClass("news-readed")&&i<u&&s!==r){for(var d=u++,l=e.idList[d],h=".tts[data-tts-id=".concat(l,"]");$(h).parents('[has-tts="true"]').hasClass("news-readed");)d=u++,l=e.idList[d],h=".tts[data-tts-id=".concat(l,"]");t.playNext()}Y.trigger("aging-tools.close",null)})),t.events.on("pause",(function(t){var n=p(t.id),r=".tts[data-tts-id=".concat(n,"]");e.pauseUI($(r).children(".pause-tts")),$(r).parents('[has-tts="true"]').hasClass("news-reading")&&$(r).parents('[has-tts="true"]').removeClass("news-reading").addClass("news-readed")})),t.events.on("play",(function(t){var n=p(t.id),r=".tts[data-tts-id=".concat(n,"]");e.playUI($(r).children(".play-tts")),$(r).parents('[has-tts="true"]').addClass("news-reading"),Y.trigger("result.play_tts",null),Y.trigger("aging-tools.close",null)})),t.events.on("clickTitle",(function(t){var e=p(t.id),n=".tts[data-tts-id=".concat(e,"]");""!==$(n).attr("data-url")&&window.open($(n).attr("data-url"),"_blank")})),t.events.on("error",(function(n){var r=n.data.id?p(n.data.id):"",o=".tts[data-tts-id=".concat(r,"]");e.playUI($(o).children(".play-tts")),$(o).parents('[has-tts="true"]').addClass("news-reading"),"loadError"===n.errorType||"unknownError"===n.errorType?e.toast("该篇暂无法播报"):"netWorkError"===n.errorType&&e.toast("网络异常,请您稍后再试"),$(o).parents('[has-tts="true"]').hasClass("news-reading")&&$(o).parents('[has-tts="true"]').removeClass("news-reading").addClass("news-readed");var s=e.idList.indexOf(r);-1!==s&&s!==e.idList.length-1?setTimeout((function(){return t.playItem(e.idList[s+1])}),2e3):(-1===s?t.pause():t.hide(),e.pauseUI($(o).children(".pause-tts")))})),t.events.on("playEnd",(function(t){var n=p(t.id);e.idList.indexOf(n)===e.idList.length-1&&e.toast("内容已读完,感谢收听")}))}));var d=this.debounce(this.resizeForDebounce(t),100),l=this.debounce(this.scrollForDebounce(t),100),h=this.debounce(c,100);$(window).on("resize",(function(){return d()})),$(window).on("scroll",(function(){return l()})),Y.on("result.close_tts",(function(){t.hide(),e.initAClick(!1)})),Y.on("result.open_tts",(function(){return e.initAClick(!0)})),this.observer=function(t,e,n){var r=$("#wrapper_wrapper")[0];if(!r)return null;n=n||{childList:!0,subtree:!0};var o=new MutationObserver((function(){return h()}));return o.observe(r,n),o}(),Y.on("tts.close",u),$(window).on("swap_begin",u)}catch(t){console.error(t)}},t.prototype.collectTtsItems=function(t){var e=this,n=[];return t.find(".tts").each((function(t,r){var o=$(r),s=o.attr("data-tts-id"),i=o.attr("data-ext");if("baijiahao"===o.attr("data-tts-source-type")){var a="news_".concat(s);n.push({id:a,requestUrl:"https://mbd.baidu.com/newspage/api/getttsurllist",requestParams:{nids:[a]}})}else n.push({id:s,requestUrl:"https://www.baidu.com/pctts/report/report_audio_land_page",requestParams:{ext:i,ext_id:s}});e.idList.push(s)})),n},t.prototype.appendItems=function(t){var e;if(t){var n=this.collectTtsItems($(t));n.length&&(this.player?this.player.addItems(n):(e=this.pendingItems).push.apply(e,n))}},t.prototype.flushPendingItems=function(){this.pendingItems.length&&this.player&&(this.player.addItems(this.pendingItems),this.pendingItems=[])},t.prototype.scrollForDebounce=function(t){var e=this;return this.getTtsStatus()?function(){var n,r=null===(n=e.contentRight.offset())||void 0===n?void 0:n.left,o=$(window).scrollLeft(),s=r?"".concat(r-o,"px"):"870px";t.editPosition({left:s})}:function(){}},t.prototype.resizeForDebounce=function(t){var e=this;return this.getTtsStatus()?function(){var n,r=null===(n=e.contentRight.offset())||void 0===n?void 0:n.left,o=$(window).scrollLeft(),s=r?"".concat(r-o,"px"):"870px";t.editPosition({left:s})}:function(){}},t.prototype.getVoiceList=function(){var t=this.userInfo.get("isLogin");+t&&this.UPS.get("ttsTone")&&(this.UPS.set("ttsTone","4100"),this.UPS.save(),this.ls.setItem("ttsTone","4100")),this.ls.getItem("ttsTone")||this.ls.setItem("ttsTone","4100");var e=(+t&&this.UPS.get("ttsTone")?this.UPS.get("ttsTone"):this.ls.getItem("ttsTone")).split("-");return[{displayName:"成熟女声",onlineId:"4100",displayIndex:"1",coverImg:"https://b.bdstatic.com/searchbox/icms/searchbox/img/cheng_girl.png",isSelected:!1,speakerId:"gezi"},{displayName:"成熟男声",onlineId:"4003",displayIndex:"2",coverImg:"https://b.bdstatic.com/searchbox/icms/searchbox/img/cheng_boy.png",isSelected:!1,speakerId:"duxiaoyao"},{displayName:"磁性男声",onlineId:"4106",displayIndex:"3",coverImg:"https://b.bdstatic.com/searchbox/icms/searchbox/img/ci_boy.png",isSelected:!1,speakerId:"wangyige"},{displayName:"年轻女声",onlineId:"4118",displayIndex:"4",coverImg:"https://b.bdstatic.com/searchbox/icms/searchbox/img/young_girl.png",isSelected:!1,speakerId:"duxiaolu"},{displayName:"情感男声",onlineId:"4115",displayIndex:"5",coverImg:"https://b.bdstatic.com/searchbox/icms/searchbox/img/young_boy.png",isSelected:!1,speakerId:"duxiaoxian"}].map((function(t){return e.includes(t.onlineId)&&(t.isSelected=!0),t}))},t.prototype.editVoiceList=function(t,e){var n=t.join("-");+this.userInfo.get("isLogin")&&(this.UPS.set("ttsTone",n),this.UPS.save("ttsTone",n)),this.ls.setItem("ttsTone",n),this.UPS.get("ttsTone")!==n&&this.ls.getItem("ttsTone")!==n||e()},t.prototype.debounce=function(t,e){var n=this,r="";return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];clearTimeout(r),r=setTimeout((function(){t.apply(n,o)}),e)}},t.prototype.playUI=function(t){$(".play-tts").css({display:"block"}),$(t).css({display:"none"}),$(".pause-tts").css({display:"none"}),$(t).next().css({display:"block"})},t.prototype.pauseUI=function(t){$(t).css({display:"none"}),$(t).prev().css({display:"block"})},t.prototype.toast=function(t){$("body").append('<div class="toast-for-result"><span></span></div>'),$(".toast-for-result").fadeIn(300).find("span").text(t),setTimeout((function(){$(".toast-for-result").fadeOut(300),$(".toast-for-result").remove()}),2e3)},t.prototype.destroy=function(){$("#result_tts_player").remove(),this.observer&&this.observer.disconnect(),this.idList=[],this.pendingItems=[]},s.__decorate([s.__param(0,o.inject(m)),s.__param(2,o.inject(J)),s.__metadata("design:paramtypes",[Storage,P,Function,C,z])],t)}(),st=function(){},it=function(){function t(t,e,n){this.query=n,this.instances=[];var r=JSON.parse(JSON.stringify(t.config)),o=this.query.get("alwaysMonitor");if(-1!==e.cookie.indexOf("webbtest=1")||"1"===o)for(var s in r)for(var i in r[s])r[s][i].sample=1;this.instanceConfig=r}return t.prototype.getInstance=function(t,e){if(this.instances[t])return this.instances[t];var n={pid:t,lid:this.query.get("qid")},r=e||this.instanceConfig[t];if(!r)return null;for(var o in r)n[o]=r[o];return this.instances[t]=new d["default"](n),this.instances[t]},s.__decorate([o.injectable,s.__param(1,o.inject(f)),s.__metadata("design:paramtypes",[st,Document,T])],t)}();t.AlaLog=j,t.AladdinUtils=G,t.CodeCover=R,t.Conf=Q,t.Cookie=N,t.DOCUMENT_TOKEN=f,t.Device=q,t.EventEmitter=Z,t.HttpsDomain=U,t.InvokeService=et,t.LOCAL_STORAGE_TOKEN=m,t.Log=P,t.Login=nt,t.MCPInvokeService=rt,t.MidLog=D,t.NAVIGATOR_TOKEN=v,t.PERFORMANCE_TOKEN=g,t.PERF_SYNC_DATA_TOKEN=y,t.Query=T,t.REQUIRE_TOKEN=J,t.SCOPE_TOKEN=I,t.Sample=C,t.SanOption=function(){},t.SanOptionProvider=L,t.Scope=b,t.TtsInteract=ot,t.UbcLog=V,t.User=z,t.WebbConfig=st,t.WebbInstance=it,t.XPath=H,t.event=Y,t.scopeFactory=function(t){var e=new b;return e.setRoot(t.root),function(){return e}},t.webbConfigValue={config:{"1_3":{et_js:{sample:.1},et_comm:{sample:.1},pf_comm:{sample:.01}},"1_87":{et_js:{sample:.1},et_comm:{sample:.1},pf_comm:{sample:.001}},"19_103":{et_js:{sample:.01},et_comm:{sample:.01},pf_comm:{sample:.01}},"1_79":{et_js:{sample:.1},et_comm:{sample:.1},pf_comm:{sample:.001}}}}}(a);var p=i({__proto__:null,"default":o.getDefaultExportFromCjs(a)},[a]),d=i({__proto__:null},[a]);t.EslModuleExport41=d;Object.keys(d).forEach(function(item){t[item]=d[item]}),t.SearchApi=p,t.index_pc=a}));
/**__BOOTSTRAP_REQUIRE__**/;