try{!function(t){window.___baidu_union_||(window.___baidu_union_={}),window.___baidu_union_ds_||(window.___baidu_union_ds_={}),window._SF_&&window._SF_._global_&&window._SF_._global_._ssp&&(t=window._SF_._global_._ssp),function(){var e={name:'sojs',namespace:'',classes:{},classesCache:{},path:{},pathCache:{},noop:function(){},$sojs:function(){this.runtime='browser',this.global=t||window,this.global.sojs=this.global.sojs||this},getPath:function(t){var e=t?t.split('.'):!1,i=this.path;if(e)for(var n=0,o=e.length;o>n;n++){var r=e[n].toLowerCase();if(!i[r])break;i=i[r]}return i.pathValue},getClassPath:function(t){if(!this.pathCache[t]){this.pathCache[t]=this.getPath(t)+t.replace(/\./gi,'/')+'.js';var e=this.getPath(t),i=e.length-1;e.lastIndexOf('\\')!==i&&e.lastIndexOf('/')!==i&&(e+='/'),this.pathCache[t]=e+t.replace(/\./gi,'/')+'.js'}return this.pathCache[t]},loadDeps:function(t,e){e=e||{};var i=t.__deps,n=(t.__namespace,[]);for(var o in i)if(i.hasOwnProperty(o)&&i[o]){var r;if('string'!=typeof i[o]?(t[o]=i[o],t[o]&&t[o].__name&&(r=t[o].__full)):(r=i[o],t[o]=this.find(r)),!r||e[r])continue;e[r]=!0,t[o]?t[o].__deps&&(n=n.concat(this.loadDeps(t[o],e))):t[o]||n.push(r)}return n},fastClone:function(t){var e=function(){};e.prototype=t;var i=new e;return i},proxy:function(t,e){var i=Array.prototype.slice.apply(arguments),n=i.shift(),o='function'==typeof this?this:i.shift();return function(){var t=Array.prototype.slice.apply(arguments);return o.apply(n,t.concat(i))}},find:function(t){var e=this.classesCache[t];if(!e){var i=t.split('.');e=this.classes[i[0]];for(var n=1,o=i.length;o>n;n++){if(!e||!e[i[n]]){e=null;break}e=e[i[n]]}}return e},create:function(t,e,i,n,o,r){'string'==typeof t&&(t=this.using(t));var a=new t.__constructor(e,i,n,o,r);return a},using:function(t){var e=this.find(t);return e},define:function(t){var e,i=t.namespace;e=t.name||'__tempName',i=t.namespace||'',t.__name=e,t.__namespace=i,t.__full=i.length>1?i+'.'+e:e,t.__deps=t.deps,t.__sojs=this,t.__status=2,t.__constructor=function(t,e,i,n,o){this.__constructorSource(t,e,i,n,o)},t.__constructorSource=t[e]||this.noop,t.__staticSource=t['$'+e]||this.noop,t.__staticUpdate=function(){this.__constructor.prototype=this},t.__static=function(){this.__staticSource(),this.__staticUpdate()};for(var n,o=i.split('.'),r=o.length,a=this.classes,s=0;r>s;s++)n=o[s],n&&(a[n]=a[n]||{__status:1},a=a[n]);a[e]=a[e]||{};var c=a;if(a=a[e],!a.__name||3!==a.__status){if(!a.__status||1===a.__status)for(var d in c[e])d&&c[e].hasOwnProperty(d)&&(t[d]=c[e][d]);t.__status=3,c[e]=t,t=c[e];var h=this.loadDeps(t);if(h.length>0)throw new Error('class "'+t.name+"\" loadDeps error:"+h.join(','));t.__static()}return this.classesCache[t.___full]=t,t}};e.define(e)}();var e=t.sojs;e.define({name:'config',namespace:'djs.common',jsonpFunctionName:'___adblockplus',bfpTemplateName:'SSP_JSONP',STATIC_JSONP:'STATIC_JSONP',POS_DOMAIN:'pos.baidu.com',MESSAGE_EVENT_REGISTERED:!1,COMMON_GLOBAL:'___baidu_union_',COMMON_GLOBAL_CALLBACK:'___baidu_union_callback_',LOG_URL:'//eclick.baidu.com/se.jpg',PAGE_SEARCH_ID:'pageSearchId',AUTOID:'0',AUTO_JSONP:'AUTO_JSONP',AUTO_DC:4,AUTO_PATH:'auto_ds',AUTO_DUP_PATH:'auto_dup',IS_FULL_MATCH:'isFullMatch',ADD_ARTICLE_AD:'addArticleAd',AUTO_PATH_REG:/\/\w+\?/,DEBUG_QUERY_TAG:'DUP_DEBUG_FLAG'}),e.define({name:'log',namespace:'djs.common.utility',sendLog:function(t,e,i,n,o){if(!t||!e||!i)return'';var r='//'+t+'/'+e+'?type='+i;r+=n?'&key='+n:'',r+=o?o:'',r+='&rdm='+Math.random(),(new Image).src=r},sendEclickLog:function(t,e,i,n){this.sendLog('eclick.baidu.com',t,e,i,n)},sendDebugLog:function(t,e,i,n){this.sendLog('tpl.baidu.com:8085',t,e,i,n)}}),e.define({name:'browser',namespace:'djs.common.utility',$browser:function(){this.win=window,this.nav=window.navigator,this.checkBrowser(),this.flashPlayerVersion=this.getFlashPlayerVersion()},checkBrowser:function(){var t=this.nav.userAgent,e=window.RegExp;/msie (\d+\.\d)/i.test(t)&&(this.ie=document.documentMode||+e.$1),/chrome\/(\d+\.\d)/i.test(t)&&window.chrome&&window.chrome.csi&&(this.chrome=+e.$1),/opera\/(\d+\.\d)/i.test(t)&&(this.opera=!0),/qqbrowser|ucbrowser|ubrowser|miuibrowser|vivobrowser|oppobrowser/i.test(t)&&(this.isAdBlock=!0)},getFlashPlayerVersion:function(){var t=0;try{var e='https:'===this.win.location.protocol;if(this.chrome>=45||e)return 0;if(this.nav.plugins&&this.nav.mimeTypes.length){var i=this.nav.plugins['Shockwave Flash'];i&&i.description&&(t=i.description.replace(/([a-zA-Z]|\s)+/,'').replace(/(\s)+r/,'.')+'.0')}if(0===t&&(this.win.ActiveXObject||this.win.hasOwnProperty('ActiveXObject')))for(var n=30;n>=2;n--)try{var o=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+n);if(o){var r=o.GetVariable('$version');if(t=r.replace(/WIN/g,'').replace(/,/g,'.'),t>0)break}}catch(a){}t=parseInt(t,10)}catch(s){t=0}return t}}),e.define({name:'dom',namespace:'djs.common.utility',deps:{log:'djs.common.utility.log',browser:'djs.common.utility.browser'},$dom:function(){this.win=window,this.doc=document,this.isInIframe=this.isInIframe(this.win),this.isCrossDomain=this.isCrossDomain(this.win),this.inInCrossDomainIframe=!(!this.isInIframe||!this.isCrossDomain),this.isInIframe&&!this.isCrossDomain&&(this.win=this.win.top,this.doc=this.getDocument(this.win)),this.isInMip=this.win.MP&&this.win.MP.globalConf},g:function(t,e){return'string'==typeof t&&t.length>0?(e=e||this.win,e.document.getElementById(t)):!t.nodeName||1!==t.nodeType&&9!==t.nodeType?null:t},bind:function(t,e,i){return'string'==typeof t&&(t=this.g(t)),e=e.replace(/^on/i,'').toLowerCase(),t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent&&t.attachEvent('on'+e,i),t},unBind:function(t,e,i){return'string'==typeof t&&(t=this.g(t)),e=e.replace(/^on/i,'').toLowerCase(),t.removeEventListener?t.removeEventListener(e,i,!1):t.attachEvent&&t.detachEvent('on'+e,i),t},isWindow:function(t){try{if(t&&'object'==typeof t&&t.document&&'setInterval'in t)return!0}catch(e){return!1}return!1},isInIframe:function(t){var e=!1;return this.isWindow(t)?t!=t.top&&t!=t.parent&&(e=!0):e=!0,e},isCrossDomain:function(t){var e=!1;try{e=!t.top.location.toString()}catch(i){e=!0}return e},getDocument:function(t){return 9===t.nodeType?t:t.ownerDocument||t.document},getWindow:function(t){var e=this.getDocument(t);return e.parentWindow||e.defaultView||null},getTopElement:function(t){var e=this.isWindow(t)?t.document:this.getDocument(t);return'CSS1Compat'===e.compatMode?e.documentElement:e.body},insertScriptElement:function(t){var e=document.createElement('script');e.type='text/javascript',e.async=!0,e.src=t;var i=document.getElementsByTagName('script')[0];return i.parentNode&&i.parentNode.insertBefore(e,i),e},isValidTextElement:function(t){var e=t.nodeName.toLowerCase();switch(e){case'a':case'script':case'iframe':case'br':case'title':case'option':case'button':case'h1':case'h2':case'h3':case'h4':case'h5':case'h6':return!1;default:return!0}},loadScript:function(t,i,n){try{!t.attachEvent||t.attachEvent.toString&&t.attachEvent.toString().indexOf('[native code')<0||this.browser.opera?(this.bind(t,'error',n),this.bind(t,'load',i)):this.bind(t,'readystatechange',e.proxy(this,function(t,e,i){var n=(t.currentTarget||t.srcElement).readyState;'complete'!==n&&'loaded'!==n||e(t)},i,n))}catch(o){this.log.sendEclickLog('rs.jpg','newTwiceCheck','loadScriptError')}}}),e.define({name:'data',namespace:'djs.common.utility',defineOnce:function(t,e,i){var i=window[i]||window;return i[t]?i[t]:(i[t]=e,e)}}),e.define({name:'lang',namespace:'djs.common.utility',trim:function(t){return t.replace(/(^\s*)|(\s*$)/g,'')},getType:function(t){var e=Object.prototype.toString.call(t);return e.split(' ')[1].slice(0,-1).toLowerCase()}}),e.define({name:'cookie',namespace:'djs.common.utility',deps:{dom:'djs.common.utility.dom'},setItem:function(t,e,i,n){e=n?encodeURIComponent(e):e,this.setCookie(t,e,i)},getItem:function(t,e){for(var i=t+'=',n=document.cookie.split(';'),o=0,r=n.length;r>o;o++){var a=n[o];if(a.indexOf(i)>-1){var s=a.substring(a.indexOf(i)+i.length,a.length);return e?decodeURIComponent(s):s}}return null},removeItem:function(t){this.setCookie(t,'',-1)},setCookie:function(t,e,i){var n='',o=new Date;i&&(o.setTime(o.getTime()+i),n='; expires='+o.toGMTString()),document.cookie=t+'='+e+n+'; path=/'}}),e.define({name:'storage',namespace:'djs.common.utility',deps:{cookie:'djs.common.utility.cookie'},store:null,isAvailable:!1,prefix:'___ds_storage__',timeSpan:72e5,$storage:function(){try{this.store=window.localStorage,this.store&&this.store.removeItem&&(this.isAvailable=!0)}catch(t){}},available:function(){var t=!1;return this.store&&this.store.removeItem&&(t=!0),t},setItem:function(t,e,i,n){if(this.store){e=i?encodeURIComponent(e):e;try{this.store.setItem(t,e)}catch(o){}}else n&&this.cookie.setItem(t,e,this.timeSpan,i)},getItem:function(t,e,i){if(this.store)try{var n=this.store.getItem(t);return e&&n?decodeURIComponent(n):n}catch(o){return null}else i&&this.cookie.getItem(t,e);return null},addItem:function(t,e,i,n){e=i?encodeURIComponent(e):e;var o=this.getItem(t)||'';o+=(o&&'|')+e;try{this.setItem(t,o,n)}catch(r){}},removeItem:function(t,e){if(this.store)try{this.store.removeItem(t)}catch(i){}else e&&this.cookie.removeItem(t)},spliceItem:function(t,e,i,n){e=i?encodeURIComponent(e):e;var o=this.getItem(t,n)||'';if(o=o.replace(new RegExp(e+'\\|?','g'),'').replace(/\|$/,''))try{this.setItem(t,o,n)}catch(r){}else this.store.removeItem(t,n)},getValue:function(t,e){var i,n=this.getItem(this.prefix+t,e)||'';if(n){var o=(new Date).getTime();n=n.split('|');var r=parseInt(n[1],10)||0;r+this.timeSpan>o&&(i=parseInt(n[0],10)||0)}return i},getKey:function(t){return t?this.prefix+t:this.prefix}}),e.define({name:'style',namespace:'djs.common.utility',deps:{dom:'djs.common.utility.dom'},getClientWidth:function(t){t=t||this.dom.win;try{var e=this.dom.getTopElement(t).clientWidth;if(e||0===e)return e}catch(i){}return-1},getClientHeight:function(t){t=t||this.dom.win;try{var e=this.dom.getTopElement(t).clientHeight;if(e||0===e)return e}catch(i){}return-1},getPosition:function(t){var e={top:0,left:0},i=this.dom.getDocument(t),n=i.body,o=i.documentElement;if(t.getBoundingClientRect){var r=t.getBoundingClientRect();e.left=Math.floor(r.left)+Math.max(o.scrollLeft,n.scrollLeft),e.top=Math.floor(r.top)+Math.max(o.scrollTop,n.scrollTop),e.left-=o.clientLeft,e.top-=o.clientTop;var a=this.getStyle(n,'borderLeftWidth'),s=this.getStyle(n,'borderTopWidth'),c=parseInt(a,10),d=parseInt(s,10);e.left-=isNaN(c)?2:c,e.top-=isNaN(d)?2:d}return e},getStyle:function(t,e){if(!t)return'';var i='';i=e.indexOf('-')>-1?e.replace(/[-][^-]{1}/g,function(t){return t.charAt(1).toUpperCase()}):e.replace(/[A-Z]{1}/g,function(t){return'-'+t.charAt(0).toLowerCase()});var n,o=this.dom.getWindow(t);if(t.style[e]||t.style[i])return t.style[e]||t.style[i];if(o&&o.getComputedStyle){if(n=o.getComputedStyle(t,null))return n.getPropertyValue(e)||n.getPropertyValue(i)}else if(t.currentStyle)return n=t.currentStyle,n[e]||n[i];return''},getScrollWidth:function(t){t=t||this.dom.win;try{var e=this.dom.getTopElement(t).scrollWidth;if(e||0===e)return e}catch(i){}return-1},getScrollHeight:function(t){t=t||this.dom.win;try{var e=this.dom.getTopElement(t).scrollHeight;if(e||0===e)return e}catch(i){}return-1},getScrollTop:function(t){t=t||this.dom.win;var e=t.document;return t.pageYOffset||e.documentElement.scrollTop||e.body.scrollTop},getScrollLeft:function(t){var e=t||this.dom.win,i=this.dom.getTopElement(e);return e.pageXOffset||i.scrollLeft},canFixed:function(){var t=!0;return this.browser.ie&&(this.browser.ie<7||'BackCompat'===this.dom.doc.compatMode)&&(t=!1),t},getDebugStyle:function(t){var e=['
','BAIDU_AD
',t.clientWidth,'*',t.clientHeight,'
'].join(''),i=document.createElement('div');i.innerHTML=e;var n=t.style;n.border='1px solid #ff0000',n.boxSizing='broder-box',n.position='relative',t.appendChild(i)},onPageVisible:function(t){this.dom.bind(window,'load',t),this.dom.bind(window,'pageshow',t),document.visibilityState&&this.dom.bind(document,'visibilitychange',t)},offPageVisible:function(t){this.dom.unBind(window,'load',t),this.dom.unBind(window,'pageshow',t),document.visibilityState&&this.dom.unBind(document,'visibilitychange',t)},onPageHidden:function(t){this.dom.bind(window,'unload',t),this.dom.bind(window,'beforeunload',t),this.dom.bind(window,'pagehide',t),document.visibilityState&&this.dom.bind(document,'visibilitychange',t)},offPageHidden:function(t){this.dom.unBind(window,'unload',t),this.dom.unBind(window,'beforeunload',t),this.dom.unBind(window,'pagehide',t),document.visibilityState&&this.dom.unBind(document,'visibilitychange',t)}}),e.define({name:'random',namespace:'djs.common.utility',getNumber:function(t,e){t=t||0,e=e||1;var i=Math.floor(Math.random()*(e-t+1))+t;return i},getBool:function(t){var e=!1;t=10*(t||50);var i=this.getNumber(0,1e3);return t>i&&(e=!0),e},getString:function(t,e){for(var i='',n=this.getNumber(t,e),o=0;n>o;o++)i+=String.fromCharCode(Math.floor(26*Math.random())+97);return i},getItem:function(t){var e;if(t&&t.length>0){var i=this.getNumber(0,t.length-1);e=t[i]}return e},getStyleItem:function(){var t,e=['padding-left:0px;','padding-right:0px;','padding-top:0px;','padding-bottom:0px;','padding:0px;','margin-left:0px;','margin-right:0px;','margin-top:0px;','margin-bottom:0px;','margin:0px;','cursor:auto;','visibility:visible;','text-align:left;','zoom:1;'],i=this.getNumber(0,e.length-1);return t=e[i]}}),e.define({name:'storage',namespace:'djs.data',data:{},get:function(t){return this.data[t]},set:function(t,e){return this.data[t]=e,this}}),e.define({name:'env',namespace:'djs.business.parameter',deps:{dom:'djs.common.utility.dom',style:'djs.common.utility.style',browser:'djs.common.utility.browser'},$env:function(){this.win=this.dom.win,this.doc=this.dom.doc,this.nav=this.win.navigator,this.screen=this.win.screen},ti:{type:2,limit:60,encode:!0,value:function(){var t=this.doc.title||'';return'string'==typeof this.dom.win.articleTitle&&(t=this.dom.win.articleTitle),t=t.replace(/\'/g,'')}},utdi:{encode:!0,value:function(){var t='';return this.doc.isInMip&&(t=this.doc.win.MP.globalConf.cuid),t}},atdi:{type:1,encode:!0,value:function(){var t='';return this.doc.isInMip&&(t=this.doc.win.MP.globalConf.nid),t}},ps:{type:1,value:function(t){var e='0x0';if(t.containerInfo.containerDom){var i=this.style.getPosition(t.containerInfo.containerDom);e=i.top+'x'+i.left}return e}},drs:{value:function(){var t={uninitialized:0,loading:1,loaded:2,interactive:3,complete:4};try{return t[this.doc.readyState]}catch(e){return-1}}},pcs:{type:1,value:function(){var t=[this.style.getClientWidth(this.win),this.style.getClientHeight(this.win)];return t.join('x')}},pss:{type:1,value:function(){var t=[this.style.getScrollWidth(this.win),this.style.getScrollHeight(this.win)];return t.join('x')}},cfv:{value:function(){return this.browser.flashPlayerVersion}},cpl:{value:function(){return this.nav.plugins.length||0}},chi:{value:function(){return this.win.history.length||0}},cce:{value:function(){return this.nav.cookieEnabled||0}},cec:{type:1,value:function(){return(this.doc.characterSet?this.doc.characterSet:this.doc.charset)||''}},tlm:{value:function(){return Date.parse(this.doc.lastModified)/1e3}},par:{type:1,value:function(){var t=[this.screen.availWidth,this.screen.availHeight];return t.join('x')}},pis:{type:1,value:function(){var t=[-1,-1];return this.dom.isInIframe&&(t=[this.style.getClientWidth(window),this.style.getClientHeight(window)]),t.join('x')}},psr:{value:function(){var t=[this.screen.width,this.screen.height];return t.join('x')}},ccd:{value:function(){return this.screen.colorDepth||0}},cja:{value:function(){return this.nav.javaEnabled().toString()}},cmi:{value:function(){return this.nav.mimeTypes.length||0}},col:{value:function(){var t=this.nav.language||this.nav.browserLanguage||this.nav.systemLanguage||'';return t=t.replace(/[^a-zA-Z0-9-]/g,'')}},cdo:{value:function(){var t=this.win.orientation;return void 0===t&&(t=-1),t}},tcn:{value:function(){var t=+new Date;return Math.round(t/1e3)}}}),e.define({name:'query',namespace:'djs.business.parameter',deps:{config:'djs.common.config',storage:'djs.data.storage',dom:'djs.common.utility.dom',style:'djs.common.utility.style',browser:'djs.common.utility.browser'},$query:function(){this.win=this.dom.win,this.doc=this.dom.doc,this.nav=this.win.navigator,this.screen=this.win.screen},di:{type:1,value:function(t){return t.id}},dc:{type:1,value:function(){return 3}},dcb:{type:1,value:function(){return''}},dtm:{type:1,value:function(){return'HTML_POST'}},dpt:{value:function(){return!1}},tpr:{type:1,value:function(){var t=(new Date).getTime(),e=this.storage.get('pageFirstRequestTime');return e||(e=t,this.storage.set('pageFirstRequestTime',e)),e}},ari:{type:1,value:function(){return 2}},ant:{type:1,value:function(t){var e=0;return t.proxy&&(e=1),e}},exps:{type:1,value:function(t){var e=t.deliveryInfo.exps,i=e&&e.split(','),n='';if(i)for(var o=0,r=i.length;r>o;o++){var a=parseInt(i[o],10)||'';a&&t.proxy&&(a+=this.browser.isAdBlock?1:2),n?n+=','+a:n=a}return''+n}},prot:{type:1,value:function(t){return'https://'===t.domainInfo.protocol?'2':''}},dis:{type:1,value:function(){var t=0;this.dom.isInIframe&&(t+=1),this.dom.inInCrossDomainIframe&&(t+=2);var e=this.style.getClientWidth(),i=this.style.getClientHeight();(40>e||10>i)&&(t+=4);try{t&!0&&this.doc.referrer&&this.win.top===this.win.parent&&(t+=8)}catch(n){var o=n&&n.stack?n.stack:n,r=this.config.LOG_URL;r+='?type=remote',r+='&key=disParam',r+='&date='+(new Date).getTime(),r+='&mes='+encodeURIComponent(o),(new Image).src=r}return t}},dai:{type:1,value:function(t){return t.adInfo&&'ssp'===t.adInfo.platformType?0:t.totalCount}},dri:{type:1,value:function(t){return t.count}},ltu:{type:1,encode:!0,limit:700,value:function(){var t;return t=this.dom.inInCrossDomainIframe?document.referrer:this.dom.win.location.href,e.global.location&&e.global.location.href&&(t=e.global.location.href),t}},liu:{type:1,encode:!0,limit:700,value:function(){var t='';return this.dom.isInIframe&&(t=window.document.URL),t}},ltr:{encode:!0,limit:300,value:function(){var t='';try{t=this.win.opener?this.win.opener.document.location.href:''}catch(e){}return t||this.doc.referrer}},psi:{type:1,encode:!0,limit:700,value:function(){return window.___baidu_union_.pageSearchId||''}},coa:{type:1,encode:!0,limit:300,value:function(t){var e=[],i=t.styleOpenApi||{};for(var n in i){var o=n;'width'!==n&&'height'!==n&&'sizeType'!==n&&'apType'!==n&&'floatingState'!==n&&('cpro_w'===n&&(o='rsi0'),'cpro_h'===n&&(o='rsi1'),e.push(o+'='+encodeURIComponent(i[n])))}return e.join('&')}}}),e.define({name:'api',namespace:'djs.business.parameter',list:{clid:{key:'apdi',encode:!0},cuid:{key:'udi',encode:!0},ctkey:{key:'lcdi',encode:!0},acid:{key:'acid',encode:!0}}}),e.define({name:'cipher',namespace:'djs.business',$cipher:function(){this.mappingCache=this.mappingCache||{},this.posCache=this.posCache||{}},getKeyMapping:function(t){var e,i=t%25+1,n='key'+i;if(e=this.mappingCache[n],!e){e={};for(var o=97;122>=o;o++){var r=String.fromCharCode(o),a=o+i;a=a>122?a-26:a;var s=String.fromCharCode(a);e[r]=s}this.mappingCache[n]=e}return e},getValueMapping:function(t){var e,i=t%64+1,n='v'+i,o='abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_-.';if(e=this.mappingCache[n],!e){e={};for(var r=0;r=65?o[s-65]:o[s];e[a]=c}this.mappingCache[n]=e}return e},getUrl:function(t,e){if(0>=t)return e;e=e.replace(/\./g,'%_'),e=e.replace(/\%/g,'.');for(var i='',n=this.getKeyMapping(t),o=this.getValueMapping(t),r=e.split('&'),a={},s=0;s-1?'&':'?',t+='stamp='+Math.random(),e.src=t}}),e.define({name:'material',namespace:'djs.business',$material:function(){var t=this;this.materialFactory={},this.materialFactory.text=function(e){var i="font-size:{size:number}{unit:string};color:{defaultColor:string};font-weight:{defaultBold:string};font-style:{defaultItalic:string};text-decoration:{defaultUnderline:string};",n="{text:string}",o=/\{events\}/;if(1===e.version)n=n.replace(o,'');else if(2===e.version){var r="this.style.color='{defaultColor:string}';this.style.fontWeight='{defaultBold:string}';this.style.fontStyle='{defaultItalic:string}';this.style.textDecoration='{defaultUnderline:string}';",a="this.style.color='{hoverColor:string}';this.style.fontWeight='{hoverBold:string}';this.style.fontStyle='{hoverItalic:string}';this.style.textDecoration='{hoverUnderline:string}';",s=' onmouseover="'+a+'" onmouseout="'+r+'"';n=n.replace(o,s);for(var c=['default','hover'],d=0;d",this.materialFactory.flash=function(e){var i='';return i=0===t.isFlash()&&1===e.flag?t.createImg(e):t.createFlash(e),t.format(i,e)},this.materialFactory.rich=function(t){return t.content},this.materialFactory.url=function(t){return t.content},this.materialFactory.slide=function(e,i){for(var n="{html:string}
",o=[],r=e.materials,a=0;a')+'
',t.format(n,e)}},createImg:function(t){var e='0&&(e+=' width="'+t.width+'"'),t.imageHeight>0&&(e+=' height="'+t.height+'"'),e+' />'},createFlash:function(t){var e=(new Date).getTime(),i='BAIDU_CLB_FLASH'+e,n='BAIDU_CLB_FLASH_N'+e;t.wmode=t.wmode?'opaque':'transparent',t.width<=0&&(t.width='100%'),t.height<=0&&(t.height='100%'),'none'===t.clickTAG&&(t.clickTAG=''),t.imageClickUrl=t.clickUrl,t.hasLink||(t.clickUrl='');var o="';return'"},format:function(t,e){var i=/\{(\w+):(\w+)\}/g,n=this;return t.replace(i,function(t,i,o){var r=e[i];switch(o){case'number':r=+r||0;break;case'boolean':r=!!r;break;case'html':r=n.encodeHTML(r)}return r})},encodeHTML:function(t){var e={'"':'"','>':'>','<':'<','&':'&'};return t.replace(/["<>&]/g,function(t){return e[t]})},isFlash:function(){var t=navigator;if(t.plugins&&t.mimeTypes.length){var e=t.plugins['Shockwave Flash'];return!!e}if(window.ActiveXObject&&!window.opera)for(var i=12;i>=2;i--)try{var n=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+i);if(n)return!0}catch(o){}return!1},formatMaterial:function(t,e,i){if('string'==typeof t)return t;if(!t.type)return'';var n=this.materialFactory[t.type];if(n){var o='string'==typeof n?this.format(n,t):n(t,e);return i||'url'===t.type?o:''+o}return''}}),e.define({name:'parameter',namespace:'djs.business',deps:{envParam:'djs.business.parameter.env',queryParam:'djs.business.parameter.query',apiParam:'djs.business.parameter.api',browser:'djs.common.utility.browser',random:'djs.common.utility.random',cipher:'djs.business.cipher'},$parameter:function(){this.mappingCache=this.mappingCache||{}},setSize:function(t){var e=t.containerInfo.sizeInfo;t.parameterInfo.url='wid='+e.width+'&'+t.parameterInfo.url,t.parameterInfo.url='hei='+e.height+'&'+t.parameterInfo.url},addForge:function(t,e){if(!e)return t;for(var i=Math.floor(Math.random()*e)%6,n=0;i>n;n++){var o=e%2===0?4:3,r=Math.random().toString(36).substring(2,o)||'p',a=r+Math.ceil(10*Math.random()),s=Math.random().toString(36).slice(8);t+='&'+a+'='+s}return t},getMapping:function(t){var e,i='x'+t;if(e=this.mappingCache[i],!e){e={};for(var n=97;122>=n;n++){var o=String.fromCharCode(n),r=n+t;r=r>122?r-26:r;var a=String.fromCharCode(r);e[o]=a}for(var s=65;90>=s;s++){var o=String.fromCharCode(s),r=s+t;r=r>90?r-26:r;var a=String.fromCharCode(r);e[o]=a}this.mappingCache[i]=e}return e},encrypt:function(t,e,i){if(0>=t)return e;for(var n='',o=this.getMapping(t),r=0;r=48&&57>=s&&(a=parseInt(a,10),a=(t+a+r)%10),n+=a)}return n},getQueryArray:function(t,e){var i=[];for(var n in t)if(n&&t.hasOwnProperty(n)&&'url'!==n){var o=t[n];for(var r in o)if(r&&o.hasOwnProperty(r)){if(e&&e[r]&&(o[r]=e[r]),'exps'===r){var a=this.mergeExps(o[r],window.___baidu_union_.expId);o[r]=a}'di'!==r&&'ltu'!==r&&'psi'!==r&&i.push(r+'='+o[r])}}return e&&e.dcb&&i.push('dcb='+e.dcb),i},getParameter:function(t,i){var n={env:{},query:{},api:{},url:''},o=0;t.proxy&&(o=1);var r=t.apiInfo;if(r){var a=this.apiParam.list;for(var s in a)if(s&&a.hasOwnProperty(s)){var c=a[s];if('undefined'!=typeof r[s]){var d=c.key?c.key:s;n.api[d]=c.encode?encodeURIComponent(r[s]):r[s]}}}var h=this.envParam;for(var s in h)if(s&&h.hasOwnProperty(s)){var c=h[s];if(o&&1!==c.type)continue;if('object'==typeof c&&'function'==typeof c.value){c.value=e.proxy(h,c.value);var l;try{l=c.value(t)}catch(u){l=null}'string'==typeof l&&(c.limit&&(l=l.substring(0,c.limit)),c.encode&&(l=encodeURIComponent(l))),(l||0===l)&&(n.env[s]=l)}}var p=this.queryParam;for(var s in p)if(s&&p.hasOwnProperty(s)){var c=p[s];if(o&&1!==c.type)continue;if('object'==typeof c&&'function'==typeof c.value){c.value=e.proxy(p,c.value);var l=c.value(t);'string'==typeof l&&(c.limit&&(l=l.substring(0,c.limit)),c.encode&&(l=encodeURIComponent(l))),(l||0===l)&&(n.query[s]=l)}}for(var m=this.getQueryArray(n,i),f=m.length;f>0;f--){var g=Math.floor(Math.random()*f),y=m[f-1];m[f-1]=m[g],m[g]=y}return n.url='di='+n.query.di+'<u='+n.query.ltu+'&psi='+n.query.psi+'&'+m.join('&'),n},getEncryptedUrl:function(t,e){var i=t.domainInfo.protocol+t.domainInfo.pos,n=t.deliveryInfo,o=n.mixType||0,r=n.offset,a=n.mixOffset,s=n.gldiOffset,c=t.parameterInfo.url,d=this.random.getString(5,10);return t.proxy&&!this.browser.ie?2===o&&a&&a>-1?(i=i+'/'+d+'?'+this.cipher.getUrl(a,c),i=this.addForge(i,a),e&&(i+='&swt=1')):i+=1!==o&&'undefined'!=typeof r&&r>-1?'undefined'!=typeof s&&s>-1?'/ns?'+this.encrypt(s,c,0):'/a?'+this.encrypt(r,c,0):'/s?'+t.parameterInfo.url:i+='/s?'+t.parameterInfo.url,i},mergeExps:function(t,e){return t&&e?t+=','+e:t=t||e,t}}),e.define({name:'slot',namespace:'djs.business',deps:{dom:'djs.common.utility.dom',lang:'djs.common.utility.lang',browser:'djs.common.utility.browser'},$slot:function(){this.counter=t.counter,this.counter=this.counter||{},this.counter.slotTotalCount=this.counter.slotTotalCount||1,this.counter.slotCountIndex=this.counter.slotCountIndex||{},this.slotsMap=this.slotsMap||{}},getSlotInfo:function(t){var e={},i=t.id;e.id=i,this.counter.slotCountIndex[i]=this.counter.slotCountIndex[i]||0;var n=this.counter.slotCountIndex[i];this.counter.slotCountIndex[i]++,e.totalCount=this.counter.slotTotalCount||0,this.counter.slotTotalCount++,e.count=n,e.index=i+'_'+n;var o=t.container,r=document.getElementById(o);if(!r)return!1;e.containerInfo={},e.containerInfo.containerId=o,e.containerInfo.containerDom=r,e.deliveryInfo=t,e.adInfo=t.adInfo,e.apiInfo=t.apiInfo||null,e.adInfo=e.adInfo||{},e.adInfo.placement=e.adInfo.placement||{},e.adInfo.placement.basic=e.adInfo.placement.basic||{},e.adInfo.placement.basic.publisherDomain=e.adInfo.placement.basic.publisherDomain||{};var a=e.adInfo.placement.basic.publisherDomain;e.domainInfo={defaultValue:{pos:'pos.baidu.com',dup:'cpro.baidustatic.com'},proxy:{pos:a.pos,dup:a.dup}},e.domainInfo.pos=e.domainInfo.proxy.pos,e.domainInfo.dup=e.domainInfo.proxy.dup,e.domainInfo.protocol='https:'===this.dom.doc.location.protocol.toLowerCase()?'https://':'http://';var s=e.adInfo.placement.container,c=t.coa;return c&&'object'===this.lang.getType(c)&&s&&(e.styleOpenApi=c,s.sizeType=c.sizeType&&parseInt(c.sizeType,10)||s.sizeType,s.width=c.width&&parseInt(c.width,10)||s.width,s.height=c.height&&parseInt(c.height,10)||s.height,2!==c.apType&&3!==c.apType||(s.location=c.apType)),e},addSlotInfoToMap:function(t){this.slotsMap[t.index]={dup:t.domainInfo.proxy.dup,pos:t.domainInfo.proxy.pos,containerInfo:t.containerInfo}},getSlotInfoFromMap:function(t){return this.slotsMap[t]},getParameterInfo:function(t,i){t.adInfo&&t.adInfo.placement&&t.adInfo.placement.basic&&4!==t.adInfo.placement.basic.conBackEnv&&(this.parameter=e.using('djs.business.parameter'),t.parameterInfo=this.parameter.getParameter(t,i))}}),e.define({name:'painterFactory',namespace:'djs.business',create:function(t){var i,n,o=t.adInfo||{},r=o.placement||{},a=r.basic,s=r.container;if(o.painter)switch(o.painter=parseInt(o.painter,10),o.painter){case 1:n='djs.ui.painter.mobile.inlay';break;case 2:n='djs.ui.painter.mobile.float';break;case 3:n='djs.ui.painter.mobile.insideText';break;case 100:n='djs.ui.painter.app.inlay';break;default:n='djs.ui.painter.mobile.inlay'}else a&&2===a.flowType&&(n=1===a.rspFormat&&1===s.anchoredType?'djs.ui.painter.mobile.inlay':'djs.ui.painter.mobile.float');return i=e.using(n)}}),e.define({name:'pageSearchId',namespace:'djs.business',deps:{config:'djs.common.config',query:'djs.business.parameter.query'},pageSearchId:function(t){'object'==typeof t?(this.hasher=t.hasher,this.time=t.time,this.url=t.url,this.random=t.random,this.screen_resolution=t.screen_resolution,this.screen_orientation=t.screen_orientation,
this.canvas=t.canvas,this.ie_activex=t.ie_activex):'function'==typeof t&&(this.hasher=t)},get:function(){var t=[];t.push((new Date).getTime()),t.push(Math.random()),this.url&&t.push(this.url);try{if(t.push(navigator.userAgent),t.push(navigator.language),t.push(window.screen.colorDepth),this.screen_resolution){var e=this.getScreenResolution();'undefined'!=typeof e&&t.push(e.join('x'))}t.push((new Date).getTimezoneOffset()),t.push(this.hasSessionStorage()),t.push(this.hasLocalStorage()),t.push(this.hasIndexDb()),document.body?t.push(typeof document.body.addBehavior):t.push("undefined"),t.push(typeof window.openDatabase),t.push(navigator.cpuClass),t.push(navigator.platform),t.push(navigator.doNotTrack),this.canvas&&this.isCanvasSupported()&&t.push(this.getCanvasFingerprint())}catch(i){var n=i&&i.stack?i.stack:i,o=this.config.LOG_URL;o+='?type=fatalError',o+='&key=pageSearchId',o+='&value=navigatorParam',o+='&date='+(new Date).getTime(),o+='&mes='+encodeURIComponent(n),(new Image).src=o}return this.hasher?this.hasher(t.join('~~~'),31):this.x64hash128(t.join('~~~'),31)},x64Add:function(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var i=[0,0,0,0];return i[3]+=t[3]+e[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=t[2]+e[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=t[1]+e[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=t[0]+e[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Multiply:function(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var i=[0,0,0,0];return i[3]+=t[3]*e[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=t[2]*e[3],i[1]+=i[2]>>>16,i[2]&=65535,i[2]+=t[3]*e[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=t[1]*e[3],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=t[2]*e[2],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=t[3]*e[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Rotl:function(t,e){return e%=64,32===e?[t[1],t[0]]:32>e?[t[0]<>>32-e,t[1]<>>32-e]:(e-=32,[t[1]<>>32-e,t[0]<>>32-e])},x64LeftShift:function(t,e){return e%=64,0===e?t:32>e?[t[0]<>>32-e,t[1]<>>1]),t=this.x64Multiply(t,[4283543511,3981806797]),t=this.x64Xor(t,[0,t[0]>>>1]),t=this.x64Multiply(t,[3301882366,444984403]),t=this.x64Xor(t,[0,t[0]>>>1])},x64hash128:function(t,e){t=t||'',e=e||0;for(var i=t.length%16,n=t.length-i,o=[0,e],r=[0,e],a=[0,0],s=[0,0],c=[2277735313,289559509],d=[1291169091,658871167],h=0;n>h;h+=16)a=[255&t.charCodeAt(h+4)|(255&t.charCodeAt(h+5))<<8|(255&t.charCodeAt(h+6))<<16|(255&t.charCodeAt(h+7))<<24,255&t.charCodeAt(h)|(255&t.charCodeAt(h+1))<<8|(255&t.charCodeAt(h+2))<<16|(255&t.charCodeAt(h+3))<<24],s=[255&t.charCodeAt(h+12)|(255&t.charCodeAt(h+13))<<8|(255&t.charCodeAt(h+14))<<16|(255&t.charCodeAt(h+15))<<24,255&t.charCodeAt(h+8)|(255&t.charCodeAt(h+9))<<8|(255&t.charCodeAt(h+10))<<16|(255&t.charCodeAt(h+11))<<24],a=this.x64Multiply(a,c),a=this.x64Rotl(a,31),a=this.x64Multiply(a,d),o=this.x64Xor(o,a),o=this.x64Rotl(o,27),o=this.x64Add(o,r),o=this.x64Add(this.x64Multiply(o,[0,5]),[0,1390208809]),s=this.x64Multiply(s,d),s=this.x64Rotl(s,33),s=this.x64Multiply(s,c),r=this.x64Xor(r,s),r=this.x64Rotl(r,31),r=this.x64Add(r,o),r=this.x64Add(this.x64Multiply(r,[0,5]),[0,944331445]);switch(a=[0,0],s=[0,0],i){case 15:s=this.x64Xor(s,this.x64LeftShift([0,t.charCodeAt(h+14)],48));case 14:s=this.x64Xor(s,this.x64LeftShift([0,t.charCodeAt(h+13)],40));case 13:s=this.x64Xor(s,this.x64LeftShift([0,t.charCodeAt(h+12)],32));case 12:s=this.x64Xor(s,this.x64LeftShift([0,t.charCodeAt(h+11)],24));case 11:s=this.x64Xor(s,this.x64LeftShift([0,t.charCodeAt(h+10)],16));case 10:s=this.x64Xor(s,this.x64LeftShift([0,t.charCodeAt(h+9)],8));case 9:s=this.x64Xor(s,[0,t.charCodeAt(h+8)]),s=this.x64Multiply(s,d),s=this.x64Rotl(s,33),s=this.x64Multiply(s,c),r=this.x64Xor(r,s);case 8:a=this.x64Xor(a,this.x64LeftShift([0,t.charCodeAt(h+7)],56));case 7:a=this.x64Xor(a,this.x64LeftShift([0,t.charCodeAt(h+6)],48));case 6:a=this.x64Xor(a,this.x64LeftShift([0,t.charCodeAt(h+5)],40));case 5:a=this.x64Xor(a,this.x64LeftShift([0,t.charCodeAt(h+4)],32));case 4:a=this.x64Xor(a,this.x64LeftShift([0,t.charCodeAt(h+3)],24));case 3:a=this.x64Xor(a,this.x64LeftShift([0,t.charCodeAt(h+2)],16));case 2:a=this.x64Xor(a,this.x64LeftShift([0,t.charCodeAt(h+1)],8));case 1:a=this.x64Xor(a,[0,t.charCodeAt(h)]),a=this.x64Multiply(a,c),a=this.x64Rotl(a,31),a=this.x64Multiply(a,d),o=this.x64Xor(o,a)}return o=this.x64Xor(o,[0,t.length]),r=this.x64Xor(r,[0,t.length]),o=this.x64Add(o,r),r=this.x64Add(r,o),o=this.x64Fmix(o),r=this.x64Fmix(r),o=this.x64Add(o,r),r=this.x64Add(r,o),('00000000'+(o[0]>>>0).toString(16)).slice(-8)+('00000000'+(o[1]>>>0).toString(16)).slice(-8)+('00000000'+(r[0]>>>0).toString(16)).slice(-8)+('00000000'+(r[1]>>>0).toString(16)).slice(-8)},hasLocalStorage:function(){try{return!!window.localStorage}catch(t){return!0}},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(t){return!0}},hasIndexDb:function(){try{return!!window.indexedDB}catch(t){return!0}},isCanvasSupported:function(){var t=document.createElement('canvas');return!(!t.getContext||!t.getContext('2d'))},getScreenResolution:function(){var t;return t=this.screen_orientation?window.screen.height>window.screen.width?[window.screen.height,window.screen.width]:[window.screen.width,window.screen.height]:[window.screen.height,window.screen.width]},getCanvasFingerprint:function(){var t=document.createElement('canvas'),e=t.getContext('2d'),i='http://valve.github.io';return e.textBaseline='top',e.font='14px "Arial"',e.textBaseline='alphabetic',e.fillStyle='#f60',e.fillRect(125,1,62,20),e.fillStyle='#069',e.fillText(i,2,15),e.fillStyle='rgba(102, 204, 0, 0.7)',e.fillText(i,4,17),t.toDataURL()},getPageSearchId:function(){try{var t=e.proxy(this.query,this.query.ltu.value)()||'';return this.pageSearchId({url:t}),this.get()}catch(i){var n=i&&i.stack?i.stack:i,o=this.config.LOG_URL;o+='?type=remote',o+='&key=pageSearchId',o+='&date='+(new Date).getTime(),o+='&mes='+encodeURIComponent(n),(new Image).src=o}}}),e.define({name:'autoAds',namespace:'djs.business',deps:{config:'djs.common.config',dom:'djs.common.utility.dom',data:'djs.common.utility.data',lang:'djs.common.utility.lang',style:'djs.common.utility.style',log:'djs.common.utility.log',browser:'djs.common.utility.browser',slot:'djs.business.slot',parameter:'djs.business.parameter',query:'djs.business.parameter.query'},launch:function(t){try{if(!window.___baidu_union_.expId){window.___baidu_union_.expId='110011';var i=e.proxy(this.query,this.query.dis.value)();if(0===i){var n=this.getAutoSlotInfo(t);if(n){var o=n.domainInfo&&n.domainInfo.proxy&&n.domainInfo.proxy.dup,r=n.domainInfo&&n.domainInfo.proxy&&n.domainInfo.proxy.pos;window.___baidu_union_.autoAd={id:this.config.AUTOID,dup:o||'cpro.baidustatic.com',pos:r||'pos.baidu.com'},this.data.defineOnce('dsCallback',e.proxy(this,this.dsCallback),this.config.COMMON_GLOBAL),this.requestAutoAdsInfo(n)}var a=1e4*Math.random();100>a&&this.initPageMonitor()}}}catch(s){var c=s&&s.stack?s.stack:s,d=this.config.LOG_URL;d+='?type=remote',d+='&key=autoAds',d+='&date='+(new Date).getTime(),d+='&mes='+encodeURIComponent(c),(new Image).src=d}},getAutoSlotInfo:function(t){var e={};for(var i in t)i&&t.hasOwnProperty(i)&&(e[i]=t[i]);e.id=this.config.AUTOID;var n=this.slot.getSlotInfo(e);return n&&(n.proxy=1),n},requestAutoAdsInfo:function(t){var i={dcb:this.config.COMMON_GLOBAL_CALLBACK,dtm:this.config.AUTO_JSONP,di:this.config.AUTOID,dc:this.config.AUTO_DC};this.slot.getParameterInfo(t,i);var n=this.parameter.getEncryptedUrl(t,!1);n=this.browser.ie?n.replace(this.config.AUTO_PATH_REG,'/'+this.config.AUTO_DUP_PATH+'?'):n.replace(this.config.AUTO_PATH_REG,'/'+this.config.AUTO_PATH+'?'),'complete'===document.readyState||'interactive'===document.readyState?this.dom.insertScriptElement(n):this.dom.bind(document,'readystatechange',e.proxy(this,function(){'interactive'===document.readyState&&this.dom.insertScriptElement(n)}))},callback:function(t,e,i){try{if(i instanceof Array&&document.querySelector){var n=window.___baidu_union_.autoAd&&window.___baidu_union_.autoAd.dup;n?window.___baidu_union_.dsCallback(i,n):window.___baidu_union_.dupCallback(i)}}catch(o){var r=o&&o.stack?o.stack:o,a=this.config.LOG_URL;a+='?type=remote',a+='&key=autoDsCallback',a+='&date='+(new Date).getTime(),a+='&mes='+encodeURIComponent(r),(new Image).src=a}},dsCallback:function(t,e){for(var i=0;i1&&t.scrollHeight>window.screen.height){var i=e.length;return e[Math.ceil(i/2)]}},getLastTwoInsertPositon:function(t){var e=t&&t.children;if(e&&e.length>0){var i=e.length;return e[i-1]}},appendAutoScript:function(t,e,i,n){if(!i||!n)return!1;var o=document.createElement('div');o.id='_'+Math.random().toString(36).slice(2);var r=document.createElement('script');r.innerHTML=this.getAutoScriptSnippet(t,o.id,e),o.appendChild(r),n.insertBefore(o,i)},getAutoScriptSnippet:function(t,e,i){var n='(window.slotbyds = window.slotbyds || []).push({ id: "'+t+'", container:"'+e+'"',o='});',r=n+o;return i=window.JSON&&window.JSON.stringify&&i&&'object'==typeof i&&JSON.stringify(i),i&&(r=n+', coa:'+i+o),r},initPageMonitor:function(){var t=0,i=(new Date).getTime(),n=!0;this.dom.bind(document,'click',function(){t++}),this.style.onPageVisible(function(){n||document.visibilityState&&'visible'!==document.visibilityState||(n=!0,i=(new Date).getTime())}),this.style.onPageHidden(e.proxy(this,function(){if(n&&i&&(!document.visibilityState||'hidden'===document.visibilityState)){n=!1;var e=(new Date).getTime()-i,o=window[this.config.COMMON_GLOBAL]&&window[this.config.COMMON_GLOBAL][this.config.PAGE_SEARCH_ID],r='&psid='+o+'&time='+e+'&click='+t;this.log.sendEclickLog('rs.jpg','timeOnPage','',r),i=0,t=0}}))}}),e.define({name:'inlay',namespace:'djs.ui.painter.mobile',deps:{log:'djs.common.utility.log',dom:'djs.common.utility.dom',style:'djs.common.utility.style',browser:'djs.common.utility.browser',random:'djs.common.utility.random',parameter:'djs.business.parameter'},getClientWidth:function(){var t=-1;return t=Math.max(320,Math.min(this.dom.win.innerWidth,this.dom.win.innerHeight)),isNaN(t)&&(t=Math.min(this.style.getClientWidth(),this.style.getClientHeight())),t},getHiddenDom:function(){var t=['div','abbr','span','ins','em'],e=this.random.getItem(t),i='';this.random.getBool(20)&&(i=' id="'+this.random.getString(5,10)+'" ');var n='';this.random.getBool(20)&&(n=' class="'+this.random.getString(6,15)+'" ');var o=['display:none;','width:0px;height:0px;'],r=this.random.getItem(o);this.random.getBool(50)&&(r+=this.random.getStyleItem()),r=' style="'+r+'" ';var a='<{tagname} {idString} {classString} {styleString}>{tagname}>',s=this.template(a,{tagname:e,idString:i,classString:n,styleString:r});return s},getWrapDom:function(){var t='';this.random.getBool(30)&&(t=' id="'+this.random.getString(5,10)+'" ');var e='';this.random.getBool(60)&&(e=' style="'+this.random.getStyleItem()+'" ');var i='',n=this.template(i,{idString:t,styleString:e});return n},template:function(t,e){var i=/{(.*?)}/g;return t.replace(i,function(t,i){return e[i]||''})},getContainerWidth:function(t){var e,i=t.containerInfo.containerDom,n=t.adInfo.placement.container,o=n.sizeType;if(1===o||7===o)e=n.width;else if(2===o||3===o)e=this.getClientWidth();else{var r=i.parentElement,a=parseInt(this.style.getStyle(r,'paddingLeft'),10)||0,s=parseInt(this.style.getStyle(r,'paddingRight'),10)||0;e=r.clientWidth-a-s||window.screen.width}return Math.abs(e)},getContainerHeight:function(t){var e,i=t.containerInfo.containerDom,n=t.adInfo.placement.container,o=n.sizeType;if(1===o||3===o||6===o)e=n.height;else if(7===o||8===o){var r=i.parentElement,a=parseInt(this.style.getStyle(r,'paddingTop'),10)||0,s=parseInt(this.style.getStyle(r,'paddingBottom'),10)||0;e=r.clientHeight-a-s}else{var c=this.getContainerWidth(t);e=Math.ceil(c/n.width*n.height)}return Math.abs(e)},render:function(t){var e={width:-1,height:-1,widthScale:-1,heightScale:-1},i=t.containerInfo.containerDom;e.width=this.getContainerWidth(t),e.height=this.getContainerHeight(t),t.containerInfo.sizeInfo=e,this.parameter.setSize(t),this.random.getBool(30)&&(t.domainInfo.protocol='//');var n=this.parameter.getEncryptedUrl(t,!0),o="",r={width:e.width,height:e.height,url:n},a=this.template(o,r);if(this.random.getBool(20)&&(a=this.getHiddenDom()+a),this.random.getBool(20)&&(a+=this.getHiddenDom()),this.random.getBool(20)){for(var s='',c='',d=this.random.getNumber(1,3),h=0;d>h;h++)s+=this.getWrapDom(),c+='
';a=s+a+c}return i.innerHTML=a,this.random.getBool(30)&&i.removeAttribute&&i.removeAttribute('id'),this.random.getBool(80)&&i.removeAttribute&&i.removeAttribute('style'),window.location.href.indexOf('DUP_DEBUG_FLAG')>-1&&this.style.getDebugStyle(i),!0}}),e.define({name:'float',namespace:'djs.ui.painter.mobile',deps:{dom:'djs.common.utility.dom',style:'djs.common.utility.style',data:'djs.common.utility.data',config:'djs.common.config',parameter:'djs.business.parameter'},directDisplay:'show',upSlideAnimation:'upSlideShow',downSlideAnimation:'downSlideShow',template:function(t,e){var i=/{(.*?)}/g;return t.replace(i,function(t,i){return e[i]||''})},containerFilter:function(t){var e=t.adInfo.placement.container.location,i=t.styleOpenApi&&2===t.styleOpenApi.apType;return!(2===e&&!i)},decorateContainer:function(t,e,i){var n=t.containerInfo,o=t.adInfo.placement.container,r={opacity:.9,backgroundColor:'#000'},a=t.fillstyle||r,s=parseFloat(a.opacity),c=a.backgroundColor,d=o.location=o.location||3;2!==d&&3!==d&&(d=3);var h=0;i!==this.directDisplay&&'ontouchend'in document&&n.sizeInfo&&n.sizeInfo.height&&(h=-1*(n.sizeInfo.height+20)),d=3===d?'bottom':'top';var l=n.containerDom.style;l.cssText=['box-sizing: content-box;','position: fixed','z-index:2147483647;',d+':'+h+'px','background-color:'+c,'opacity:'+s,'text-align:center','width:100%','display:block','font-size:0','height:'+e.height+'px'].join(';')},parseCloseBtnLayoutData:function(t,e,i){var n=t.adInfo.placement.container,o='',r='',a='0',s=0;2===n.location?(o='0 0 40px 40px',a=e.height,r=i===this.directDisplay?String.fromCharCode(65087):String.fromCharCode(65088),s=-4):(o='40px 40px 0 0',a=-20,r=i===this.directDisplay?String.fromCharCode(65088):String.fromCharCode(65087),s=3);var c={domId:t.containerInfo.containerId,borderRadius:o,top:a,btnTag:r,marginTop:s};return c},closeHtml:function(t,e,i){var n=[''].join(''),o=this.parseCloseBtnLayoutData(t,e,i);return this.template(n,o)},frameHtml:function(t,e,i){var n=[''].join(''),o=this.parameter.getEncryptedUrl(t,!0),r='';i!==this.directDisplay&&(r='onload="'+this.config.COMMON_GLOBAL_CALLBACK+"floatShow('"+t.containerInfo.containerId+"','"+t.adInfo.placement.container.location+"','"+i+'\', this);"');var a={iframeId:'iframe_'+t.id,onloadDefine:r,url:o,iframeWidth:e.width,iframeHeight:e.height};return t.iframeId=a.iframeId,this.template(n,a)},closeBtnOnClickHandler:function(t,e,i){var n=e.containerDom;if(n&&n.parentNode){var o=2===i.location?'top':'bottom';'hidden'===n.getAttribute('state')?this.showAdContainer(o,n):this.hideAdContainer(o,n)}},showAdContainer:function(t,e){e.setAttribute('state','show'),e.style.transition=t+' 0.75s',e.style['-webkit-transition']=t+' 0.75s',e.style['-moz-transition']=t+' 0.75s',e.style['-o-transition']=t+' 0.75s',e.style[t]='0px';var i=e.id,n=i&&i+'_closebtn_inside',o=document.getElementById(n);'top'===t?(o.style.marginTop='-4px',o.innerText=String.fromCharCode(65087)):(o.style.marginTop='3px',o.innerText=String.fromCharCode(65088))},hideAdContainer:function(t,e){e.setAttribute('state','hidden');var i=this.style.getStyle(e,'height');i=i&&parseInt(i,10),e.style.transition=t+' 0.75s',e.style['-webkit-transition']=t+' 0.75s',e.style['-moz-transition']=t+' 0.75s',e.style['-o-transition']=t+' 0.75s',e.style[t]=-1*i+'px';var n=e.id,o=n&&n+'_closebtn_inside',r=document.getElementById(o);'top'===t?(r.style.marginTop='3px',r.innerText=String.fromCharCode(65088)):(r.style.marginTop='-4px',r.innerText=String.fromCharCode(65087))},render:function(t){var i={width:-1,height:-1},n=t.containerInfo.containerDom;if(n){var o=t.adInfo.placement.container;if(i.width=n.clientWidth,i.height=Math.ceil(i.width/o.width*o.height),i.width=Math.abs(i.width),i.height=Math.abs(i.height),t.containerInfo.sizeInfo=i,this.parameter.setSize(t),this.containerFilter(t)){var r=this.getFloatingState(t);this.decorateContainer(t,i,r);var a=this.closeHtml(t,i,r),s=this.frameHtml(t,i,r),c={id:t.id,width:i.width,height:i.height,closeBtnHtml:a,iframeHtml:s},d=["",'{closeBtnHtml}','{iframeHtml}','
'].join('');n.innerHTML=this.template(d,c),this.data.defineOnce('___baidu_union_callback_floatShow',e.proxy(this,this.showFloatAd));var h=this.dom.g(t.containerInfo.containerId+'_closebtn');return h&&this.dom.bind(h,'click',e.proxy(this,this.closeBtnOnClickHandler,t.containerInfo,t.adInfo.placement.container)),!0}}},showFloatAd:function(t,i,n){this.body=document.body,i='2'===i?'top':'bottom',this.dom.bind(this.body,'touchstart',e.proxy(this,this.touchStart)),this.dom.bind(this.body,'touchend',e.proxy(this,this.touchEnd,t,i,n))},touchStart:function(t){this.startY=t.targetTouches[0]&&t.targetTouches[0].pageY},touchEnd:function(t,e,i,n){this[i]=this[i]||!1,this.pageY=t.changedTouches[0]&&t.changedTouches[0].pageY;var o=this.pageY-this.startY;if(-10>o&&!this[i]&&n===this.upSlideAnimation||o>10&&!this[i]&&n===this.downSlideAnimation){this[i]=!0;var r=document.getElementById(e);this.showAdContainer(i,r)}},getFloatingState:function(t){return t.styleOpenApi&&t.styleOpenApi.floatingState?t.styleOpenApi.floatingState:2===t.adInfo.placement.container.location?this.upSlideAnimation:this.directDisplay}}),e.define({name:'insideText',namespace:'djs.ui.painter.mobile',deps:{config:'djs.common.config',parameter:'djs.business.parameter',browser:'djs.common.utility.browser',lang:'djs.common.utility.lang',data:'djs.common.utility.data',dom:'djs.common.utility.dom'},hashBox:{},itemIndex:0,SET_DATA_JSONP:'BAIDU_DS_MOBILE_INSIDE_TEXT',CHAR_SET:'utf-8',MAX_PAGE_AD_NUMBER:40,MAX_KEYWORD_AD_NUMBER:3,adCount:0,wordCount:{},getParam:function(){return{dcb:this.SET_DATA_JSONP,dtm:this.config.STATIC_JSONP,cec:this.CHAR_SET}},render:function(t){var i=t.containerInfo.containerDom;this.data.defineOnce(this.SET_DATA_JSONP,e.proxy(this,this.compareTextNode));var n=this.getBody(i);n&&('complete'===document.readyState?(this.insertJsonpScript(t,i),this.findTextNode(n)):this.dom.bind(document,'readystatechange',e.proxy(this,function(){'complete'===document.readyState&&(this.insertJsonpScript(t,i),this.findTextNode(n))})))},getBody:function(t){var e=t.parentNode;return e.tagName&&'body'===e.tagName.toLowerCase()?e:this.getBody(e)},insertJsonpScript:function(t,e){var i=this.parameter.getEncryptedUrl(t),n=document.createElement('script');n.src=i,n.charset=this.CHAR_SET,e.appendChild(n)},findTextNode:function(t){for(var e=t.childNodes,i=0;i0&&this.addHash(n);break;default:this.findTextNode(n)}}},addHash:function(t){var e=t.parentNode;e.innerHTML&&(this.hashBox['item_'+this.itemIndex]=e,this.itemIndex++)},compareTextNode:function(){var t=arguments[0]&&arguments[0].slots[0]&&arguments[0].slots[0].ads[0];if(t){var e=t.data&&t.data.meta;if(e&&0!==e.length)for(var i in this.hashBox){var n=this.hashBox[i];if(document.contains(n)){for(var o=n.innerHTML,r=0;r0&&n.test(e)&&this.isNotNextToAElement(i,e)&&this.isNotInElement(i,e)){var o=t.curl||'',r=''+i+'';if(this.wordCount[i]||(this.wordCount[i]=0),this.adCount'===e.substr(n,4),a=']*"+t+"[^<]*>",'i'),n=new RegExp(">[^<]*"+t+"[^>]*",'i');return!i.test(e)&&!n.test(e)}}),e.define({name:'api',namespace:'djs.ui',deps:{slot:'djs.business.slot',painterFactory:'djs.business.painterFactory',pageSearchId:'djs.business.pageSearchId',autoAds:'djs.business.autoAds',config:'djs.common.config',browser:'djs.common.utility.browser',storage:'djs.common.utility.storage',dom:'djs.common.utility.dom',data:'djs.common.utility.data',log:'djs.common.utility.log',material:'djs.business.material',query:'djs.business.parameter.query'},isCheckLoaded:!1,prScript:!1,$api:function(){t.api=t.api||[];var i=t.api;t.api=this,this.data.defineOnce(this.config.PAGE_SEARCH_ID,this.pageSearchId.getPageSearchId(),this.config.COMMON_GLOBAL),this.data.defineOnce(this.config.COMMON_GLOBAL_CALLBACK,e.proxy(this,this.commonCallback));for(var n=0,o=i.length;o>n;n++)this.push(i[n])},push:function(t){this.autoAds.launch(t);var i=this.slot.getSlotInfo(t);if(i){this.slot.addSlotInfoToMap(i),t=i.deliveryInfo;var n=t.exps;n&&n.indexOf('113000')>=0&&this.getADBlockerStatusFromCache(i,'isblockone',!0),this.launch(i),this.check(i),this.sendPVLog(),this.config.MESSAGE_EVENT_REGISTERED||(this.config.MESSAGE_EVENT_REGISTERED=!0,this.dom.bind(window,'message',e.proxy(this,this.messageHandler)))}},sendPVLog:function(){window.___baidu_union_.isPVLogSent||(window.___baidu_union_.isPVLogSent=!0,this.log.sendEclickLog('rs.jpg','pvLog'))},setProxy:function(t){var e=t.deliveryInfo.proxy;if(-1===e||'undefined'==typeof e){var i=t.proxy;if(-1===i||'undefined'==typeof i){var n=this.proxy;-1===n||'undefined'==typeof n?this.browser.isAdBlock?t.proxy=1:t.proxyCheck=1:t.proxy=n}else t.proxy=i}else t.proxy=e;return t.domainInfo.proxy&&t.domainInfo.proxy.pos||(t.proxy=0),t.proxy?(t.domainInfo.pos=t.domainInfo.proxy.pos,t.domainInfo.dup=t.domainInfo.proxy.dup):(t.domainInfo.pos=t.domainInfo.defaultValue.pos,t.domainInfo.dup=t.domainInfo.defaultValue.dup),t},launch:function(t){this.setProxy(t),this.slot.getParameterInfo(t);var e,i=this.painterFactory.create(t);i.getParam&&(e=i.getParam()),this.slot.getParameterInfo(t,e),i.render(t)},check:function(t){if(t.proxyCheck&&!t.proxy){if(!this.isCheckLoaded){this.isCheckLoaded=!0;var i=('https:'===document.location.protocol?'https:':'http:')+'//cpro.baidustatic.com/cpro/ui/pr.js';this.prScript=this.dom.insertScriptElement(i)}this.dom.loadScript(this.prScript,e.proxy(this,this.scriptCallback,'rs.jpg','newTwiceCheck','prLoad'),e.proxy(this,this.scriptCallback,'rs.jpg','newTwiceCheck','prError')),setTimeout(e.proxy(this,function(t){'object'!=typeof window.__baidu_dup_jobruner?(this.proxy=1,this.launch(t)):this.proxy=0,this.log.sendEclickLog('rs.jpg','newTwiceCheck','setTimeout'),this.setADBlockerStatusToCache('isblockone',this.proxy,!0)},t),800)}},getADBlockerStatusFromCache:function(t,e,i){var n=this.storage.getValue(e,i);'undefined'!=typeof n&&(t.proxy=n)},setADBlockerStatusToCache:function(t,e,i){var n=(new Date).getTime(),o=this.storage.getKey(t);this.storage.setItem(o,e+'|'+n,!1,i)},commonCallback:function(){arguments.length>0&&'auto'===arguments[0]&&this.autoAds.callback.apply(this,arguments)},messageHandler:function(t){try{var e=t.data,i=t.source;if(e&&e.placement&&e.placement.update&&e.queryid&&e.tuid){var n=e.tuid,o=this.slot.getSlotInfoFromMap(n);if(!o)return;var r=o.containerInfo.containerDom,a=e.placement.complement_type||0;this.unBiddingDeliveryBackUp(e,o,r),this.backCollapse(e,n,a,r),this.debugShieldedMonitor(n,o,r)}e&&1===e.type&&i&&i.parent===window&&this.adClose(t,e)}catch(s){var c=s.stack?s.stack:s;this.log.sendEclickLog('se.jpg','remote','messageEventListener','&mes='+c)}},unBiddingDeliveryBackUp:function(t,e,i){var n=t.pdb_deliv||{},o=t.order_deliv||{},r=t.rtb_deliv||{},a=n.deliv_des||{},s=a._html||'',c=s.type||{};if(s.height=e.containerInfo.sizeInfo.height||s.height,s.width=e.containerInfo.sizeInfo.width||s.width,o&&'0'!==o.deliv_id&&'0'===t.noadx);else if(r&&'0'!==r.deliv_id&&'0'===t.noadx);else if(n&&a&&s){var d=this.material.formatMaterial(s,t);if('rich'===c||'slide'===c){var h=document.createElement('iframe');h.width=s.width,h.height=s.height,h.scrolling='no',h.style.cssText='border:0;vertical-align:bottom;margin:0;overflow:hidden;',i.innerHTML='',i.appendChild(h),d.indexOf('')<0&&(d=''+d);var l=h.contentWindow.document;l.open(),l.write(d),l.body&&(l.body.style.backgroundColor='transparent')}else if('url'===c){var u=i.getElementsByTagName('iframe');u&&u.length>0&&(u[0].src=d)}else i.innerHTML=d}},backCollapse:function(t,e,i,n){if(7===i){var o=t.noadx;('3'!==o&&'0'!==o||0!==e.indexOf('u')&&t.pdbDelivery&&'0'===t.pdbDelivery.deliv_id&&t.rtbDelivery&&'0'===t.rtbDelivery.deliv_id&&t.orderDelivery&&'0'===t.orderDelivery.deliv_id)&&(n.innerHTML='',n.style.height='0')}},debugShieldedMonitor:function(t,i,n){var o=e.proxy(this.query,this.query.dis.value)(),r=o?e.proxy(this.query,this.query.ltu.value)():window.location.href;if(r.indexOf(this.config.DEBUG_QUERY_TAG)>-1){var a='&tuid='+t+'&dupDomain='+i.dup+'&posDomain='+i.pos+'&dis='+o+'&topLocaion='+encodeURIComponent(r);n.offsetWidth||n.offsetHeight?this.log.sendDebugLog('antiShield/adStatus','success','',a):this.log.sendDebugLog('antiShield/adStatus','error','containerBlock',a)}},adClose:function(t,e){var i=t.origin||t.originalEvent.origin,n=i&&i.split('//')[1],o=e.tuid,r=o&&this.slot.getSlotInfoFromMap(o);if(r&&n&&(n===this.config.POS_DOMAIN||n===r.pos)){var a=r.containerInfo.containerDom;a&&a.parentNode.removeChild(a)}},scriptCallback:function(t,e,i,n){this.proxy='prLoad'===n?0:1,this.log.sendEclickLog(e,i,n),this.setADBlockerStatusToCache('isblockone',this.proxy,!0)}})}(window.__delivery_global_=window.__delivery_global_||{})}catch(e){var err=e&&e.stack?e.stack:e;(new Image).src="//eclick.baidu.com/se.jpg?type=remote&date=0228&mes="+encodeURIComponent(err)}