!function(t,n){function e(t,n){return f.cleanObj.toString.call(t).slice(8,-1)===n}function o(t,n){for(var e,o,i=t.split(":").pop().split("/"),s=f;e=i.shift();)"bdbox"!==e&&(o=e,i.length&&(s=s[e]=s[e]||{}));var u=l[t]={exports:{}},c=f.isFunction(n)?n.apply(u,[r,u.exports,u,f]):n;c&&(u.exports=c),s[o]=u.exports
}function r(t){var n=l[t];if(n)return n.exports;throw"module "+t+" is undefined"}function i(){h.forEach(function(t){t()}),h.length=0,m=!0}function s(t,n,e){if("object"==typeof t){var o,r,i=u(t);if(e=e||t,"array"===i||"arguments"===i||"nodelist"===i){for(o=0,r=t.length;r>o;o++)if(n.call(e,t[o],o,t)===!1)return
}else for(o in t)if(t.hasOwnProperty(o)&&n.call(e,t[o],o,t)===!1)return}}function u(t){var n;return null==t?n=String(t):(n=Object.prototype.toString.call(t).toLowerCase(),n=n.substring(8,n.length-1)),n}var c=+new Date,a=(c+"").slice(-3),f={isBox:/ baiduboxapp\//i.test(navigator.userAgent),getId:function(){return a++
},emptyArr:[],emptyFn:function(){},cleanObj:{},byId:function(t){return f.isString(t)?n.getElementById(t):t},toArray:function(t){return f.emptyArr.slice.call(t)},$:function(t,e){return e=e&&1===e.nodeType?e:n,f.toArray(e.querySelectorAll(t))}};"Function,String,Array,Number,RegExp".replace(/[^, ]+/g,function(t){f["is"+t]=function(n){return e(n,t)
}}),f.isBoolean=function(t){return t===!0||t===!1},f.isObject=function(t){return"object"==typeof t},f.isUndefined=function(t){return void 0===t},f.isWindow=function(t){return null!=t&&t==t.window},f.isPlainObject=function(t){return f.isObject(t)&&!f.isWindow(t)&&Object.getPrototypeOf(t)==Object.prototype
};var l={};f.define=o;var p=function(t,n,e){for(var o,r,i=t.split("."),s=e||p;o=i.shift();)"Box"!==o&&(r=o,i.length&&(s=s[o]=s[o]||{}));return s[r]=n||{},s[r]},h=[],m=!1;if(p.init=function(t){return"function"!=typeof t?this:(m?t():h.push(t),this)},"complete,loaded,interactive".indexOf(n.readyState)>-1&&n.body?i():n.addEventListener("DOMContentLoaded",i,!1),o("common:bdbox/utils/getVersion",function(n,e,o){var r=function(){var n=0;
if(t.baiduboxapp_version)n=t.baiduboxapp_version;else{var e,o=navigator.userAgent;(e=/([\d+.]+)_(?:diordna|enohpi)_/.exec(o))?(e=e[1].split("."),n=e.reverse().join(".")):(e=/baiduboxapp\/([\d+.]+)/.exec(o))&&(n=e[1])}return r=function(){return n},n};o.exports=r}),o("common:bdbox/utils/version_compare",function(t,n,e){var o=function(t,n){n+="",t+="";
for(var e=t.split("."),o=n.split("."),r=0,i=Math.max(e.length,o.length);i>r;r++){if(e[r]&&!o[r]&&parseInt(e[r])>0||parseInt(e[r])>parseInt(o[r]))return 1;if(o[r]&&!e[r]&&parseInt(o[r])>0||parseInt(e[r])<parseInt(o[r]))return-1}return 0};e.exports=o}),o("common:bdbox/utils/jsonToQuery",function(t,n,e,o){e.exports=function(t){if(o.isString(t))return t;
var n=[];for(var e in t)n.push(e+"="+t[e]);return n.join("&")}}),o("common:bdbox/io/loadJS",function(e,o,r,i){function s(e,o,r){var s,a,f,l=n.createElement("script");i.isString(e)?(s=e,i.isFunction(o)&&(r=o,o=null)):(s=e.url,o=e.data,r=e.success,a=e.error||i.emptyFn,f=e.timeout),i.isObject(o)&&(o=c(o)),o&&(s+=(-1===s.indexOf("?")?"?":"&")+o),s=s.replace(/[&?]{1,2}/,"?");
var p;/=\?/.test(s)&&(p="_box_jsonp"+i.getId(),s=s.replace(/=\?/,"="+p));var h=u();f=f||2e4,l.type="text/javascript",l.src=s;var m,d=!0,v=function(){p&&delete t[p],m&&clearTimeout(m),l.onload=l.onreadystatechange=l.onerror=null,l=null},g=function(){!l||l.readyState&&!/loaded|complete/.test(l.readyState)||(v(),d&&i.isFunction(r)&&r.apply(null,i.toArray(arguments)),d=!1)
},b=function(t){v(),d&&a(t),d=!1};p&&(t[p]=g),m=setTimeout(function(){v(),d&&a("timeout"),d=!1},f),l.onload=l.onreadystatechange=l.onerror=g,l.onerror=b,h.appendChild(l)}function u(){return n.head||n.getElementsByTagName("head")[0]||n.documentElement}var c=e("common:bdbox/utils/jsonToQuery");i.emptyFn,r.exports=s
}),o("common:bdbox/moplus",function(t,n,e,o){var r=t("common:bdbox/utils/jsonToQuery"),i=t("common:bdbox/io/loadJS"),s=t("common:bdbox/utils/version_compare"),u="com.baidu.searchbox",c="http://127.0.0.1:6259/",a="http://127.0.0.1:40310/",f="inapp_boxserver",l=500,p=null,h="__moplus_host__",m=function(t,n,e){this.curHost=e||"",this.newHost=a,this.oldHost=c,this.MCMDF=n||f,this._infoFuncs=[],this._verFuncs=[],this.minVersion=t?t:0,this.pkgName=u
};m.prototype={constructor:m,setMcmdf:function(t){return this.MCMDF=t,this},setHost:function(t){return this.curHost=t,this.setStorage(h,t),this},getHost:function(){return this.getStorage(h)?(this.curHost=this.getStorage(h),this.curHost):void 0},setStorage:function(t,n){sessionStorage.setItem(t,n)},getStorage:function(t){var n=sessionStorage.getItem(t);
return n},api:function(t,n,e,s){if(!t)throw"Moplus.api need an action";o.isFunction(n)&&(s=e,e=n,n={});var u=t+(~t.indexOf("?")?"&":"?")+r(n);if(~u.indexOf("mcmdf")||(u+="&mcmdf="+this.MCMDF),this.getHost()){u=this.curHost+u;var c={url:u,timeout:s};o.isFunction(e)?(c.url+="&callback=?",c.success=e,c.error=function(){e({error:33})
},i(c)):i(c)}else{var a=this.newHost+u,f=this.oldHost+u;o.isFunction(e)&&(a+="&callback=?",f+="&callback=?");var l={url:a,timeout:s},p={url:f,timeout:s},c={newData:l,oldData:p,success:e};this.request(c)}return this},getInfo:function(t,n){if(p)return t(p);if(this._infoFuncs.push(t),!(this._infoFuncs.length>1)){var e=this,o=function(t,n){n||(p=t);
var o;for(n&&(t={error:33});o=e._infoFuncs.shift();)o(t)};if(this.getHost()){var r={url:this.curHost+"getsearchboxinfo?mcmdf="+this.MCMDF+"&callback=?",success:o,error:function(){o(null,!0)},timeout:n};i(r)}else{var s={url:this.newHost+"getsearchboxinfo?mcmdf="+this.MCMDF+"&callback=?",timeout:n},u={url:this.oldHost+"getsearchboxinfo?mcmdf="+this.MCMDF+"&callback=?",timeout:n},c={newData:s,oldData:u,success:o,error:function(){o(null,!0)
}};this.request(c)}return this}},getHVersion:function(t,n){this._verFuncs.push(t);var e=this;if(!(this._verFuncs.length>1)){var o=function(t){var n;for(t=e.parseInfo(t);n=e._verFuncs.shift();)n(t)};return this.getInfo(o,n),this}},parseInfo:function(t,n){t=t||p,n=n||this.minVersion;var e=t.package_infos;
if(!e||0===e.length)return!1;var o=u,r={offic:{name:u,version:0},oem:{version:0}};return e.forEach(function(t){var e=t.version_name,i=t.package_name;s(e,n)>=0&&(i===o?1===s(e,r.offic.version)&&(r.offic={version:e,name:u}):1===s(e,r.oem.version)&&(r.oem={version:e,name:i}))}),0===r.oem.version&&0===r.offic.version?!1:0!==r.offic.version?r.offic:0!==r.oem.version?r.oem:void 0
},sendIntent:function(t,n,e){if(t&&o.isString(t))if(/^http/.test(t)||(t="sendintent?mcmdf="+this.MCMDF+"&callback=?&intent="+encodeURIComponent(t)),this.getHost()){var r={url:this.curHost+t,timeout:e};o.isFunction(n)&&(r.success=n,r.error=function(){n({error:33})}),i(r)}else{var s=this;this.getHVersion(function(r){if(r&&r.version){var u={url:s.curHost+t,timeout:e};
o.isFunction(n)&&(u.success=n,u.error=function(){n({error:33})}),i(u)}})}return this},request:function(t){if(t&&"object"==typeof t){var n,e,r=this,s=t.newData,u=t.oldData,c=t.success,a=t.error;return s.success=function(t){"success"!==n&&(e&&clearTimeout(e),n="success",r.setHost(r.newHost),o.isFunction(c)&&c(t))
},s.error=function(){"error"===n&&(o.isFunction(a)?a():o.isFunction(c)&&c({error:33})),n="error"},u.success=function(t){"success"!==n&&("error"===n?(n="success",r.setHost(r.oldHost),o.isFunction(c)&&c(t)):e=setTimeout(function(){n="success",r.setHost(r.oldHost),o.isFunction(c)&&c(t)},l))},u.error=function(){"error"===n&&(o.isFunction(a)?a():o.isFunction(c)&&c({error:33})),n="error"
},i(s),i(u),this}}},e.exports=function(t,n){return new m(t,n)},e.exports.Moplus=m}),f.version=f.utils.getVersion(),f.version_compare=f.utils.version_compare,f.each=s,f.type=u,f.canI=function(t,n,e){return f.version_compare(f.version,t)>=0?f.isFunction(n)&&n():f.isFunction(e)&&e(),f},s(f,function(t,n){p[n]=t
}),t.Box&&t.Box.$)for(var d in p)t.Box[d]=t.Box[d]||p[d];else t.Box=p}(window,document);