text: !function(e,n){"function"==typeof define&&define.amd?define("widget/logo",[],n):e.logo=n()}("undefined"!=typeof self?self:this,function(){function e(){}function n(){var e=null;try{e=window.baidu&&window.baidu.mobads&&window.baidu.mobads.Sdk||window.parent&&parent.baidu&&parent.baidu.mobads&&parent.baidu.mobads.Sdk}catch(n){}return e}function t(e,n){var t=document.createElement("div");t.innerHTML=n;for(var a=document.createDocumentFragment();t.childNodes.length>0;)a.appendChild(t.childNodes[0]);e.appendChild(a)}function a(e,n,t){e.addEventListener?e.addEventListener(n,t,!1):e.attachEvent&&e.attachEvent("on"+n,t)}function i(e){return e.stopPropagation?e.stopPropagation():window.event.cancelBubble=!0,e.preventDefault&&e.preventDefault(),!1}function o(e){var n=null,t=[];for(n in e)e.hasOwnProperty(n)&&t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")}function d(e){e=e||{};var n=(e.logoUrl||"javascript:void(0)",document.getElementById(e.containerId||"container")),a=document.getElementById(e.feedbackParentId||"container"),i=!e.hideClose&&a,o=e.closeDirect,d=e.trackingInfo&&e.trackingInfo.dspid;if(9!==d){var l=e.deviceType>1?" logo-mobile-container":"",u=['<div class="logo-container'+l+'">','<span class="logo-link"></span>',c(i),"</div>"].join("");if(t(n,u),i){var v=r(a.clientWidth,a.clientHeight);t(a,v),s(e.trackingInfo,o)}}}function c(e){return e?['<div class="gap"></div>','<a href="javascript:;" id="logo-close-btn"></a>'].join(""):""}function r(e,n){var t=n-250>0?30:0,a=320;320>e&&e>159?a=160:160>e&&(a=80);var i=160>a?"feedback-container fd-small":"feedback-container",o=l(e,n);return['<div id="feedback-container" class="'+i+'">','<div id="reason-content" class="reason-content" data-reason-num="'+o.length+'" style="width:'+a+"px;padding-top:"+t+'px;">','<div class="intro">反馈意见：</div>',o.join(""),'<a class="fb-btn-cancel" href="javascript:;">返回</a>',"</div>",'<div id="thx-content" class="thx-content">',"<h5>感谢您的反馈！</h5>","<p>您的反馈已记录，我们将努力改善您的浏览体验。</p>","</div>","</div>"].join("")}function l(e,n){function t(){var e=parseInt(3*Math.random(),10);return[a[e],a[3]]}var a=['<a href="javascript:;" data-value="1" class="reason-item">视觉干扰</a>','<a href="javascript:;" data-value="2" class="reason-item">内容不宜</a>','<a href="javascript:;" data-value="3" class="reason-item">不感兴趣</a>','<a href="javascript:;" data-value="0" class="reason-item">其他原因</a>'];return 160>e&&106>n?[]:e>=80&&n>=106&&160>e&&168>n?t():e>=160&&n>=76&&320>e&&106>n?t():a}function s(e,t){var o=document.getElementById("logo-close-btn"),d=document.getElementById("feedback-container"),c=document.getElementById("reason-content"),r=document.getElementById("thx-content");a(o,"click",function(a){var o=n();return o&&t?(o.onAdPlayEnd(),void u(e,0)):(0===+c.getAttribute("data-reason-num")&&(c.style.display="none",u(e,0)),d.style.display="block",i(a))}),a(d,"click",function(t){t=t||window.event;var a=t.target||t.srcElement;if(a&&a.getAttribute)return null!=a.getAttribute("data-value")&&(u(e,a.getAttribute("data-value")),c.style.display="none",r.style.display="block",setTimeout(function(){r.style.display="none"},2e3),setTimeout(function(){var e=n();e&&e.onAdPlayEnd()},4e3)),"fb-btn-cancel"===a.className&&(d.style.display="none"),i(t)})}function u(n,t){var a="https://eclick.baidu.com/close_feedback.jpg?";n=n||{},n.reasonid=t,n._=(new Date).getTime(),a+=o(n);var i=document.createElement("img");i.onerror=e,i.src=a}return{init:d}});