var NEWS_FEED_VIDEO=function(e){"use strict";Date.now||(Date.now=function(){return+new Date}),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,i=function(){},o=function(){return n.apply(this instanceof i?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(i.prototype=this.prototype),o.prototype=new i,o});var t=function(e){var t=document.createElement("b");return t.innerHTML="\x3c!--[if IE "+e+"]>=0;t--)n=0!=(i=266338304&(n=(n<<6&268435455)+(i=e.charCodeAt(t))+(i<<14)))?n^i>>21:n;return n}return(""+e(document.referrer)+(new Date).getTime()+e(document.cookie)).substr(0,32)}()},o={scheme:"https:"==document.location.protocol?"https":"http",sendMessage:function(e){try{t(9)?o[e.containerID].iframe.contentWindow.postMessage(JSON.stringify(e),"*"):o[e.containerID].iframe.contentWindow.postMessage(e,"*")}catch(n){}}};function a(e){return null===e||e===undefined}var r=function(e){var t,n=[],i=document,o=i.documentElement,a=o.doScroll,r=(a?/^loaded|^c/:/^loaded|c/).test(i.readyState);function d(e){for(r=1;e=n.shift();)e()}return i.addEventListener&&i.addEventListener("DOMContentLoaded",t=function(){i.removeEventListener("DOMContentLoaded",t,!1),d()},!1),a&&i.attachEvent("onreadystatechange",t=function(){/^c/.test(i.readyState)&&(i.detachEvent("onreadystatechange",t),d())}),e=a?function(t){self!=top?r?t():n.push(t):function(){try{o.doScroll("left")}catch(n){return setTimeout(function(){e(t)},50)}t()}()}:function(e){r?e():n.push(e)}}();function d(e,t,n){var i=this;if(window.addEventListener)return e.addEventListener(t,function(e){n.call(i,e)},!1);e.attachEvent("on"+t,function(){var e=window.event;e.target=e.srcElement,n.call(i,e)})}var s=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},c={"default":s,__moduleExports:s},l="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},u="object"==typeof l&&l&&l.Object===Object&&l,p={"default":u,__moduleExports:u},m=p&&u||p,f="object"==typeof self&&self&&self.Object===Object&&self,_=m||f||Function("return this")(),v={"default":_,__moduleExports:_},h=v&&_||v,g=function(){return h.Date.now()},T={"default":g,__moduleExports:g},y=/\s/;var E=function(e){for(var t=e.length;t--&&y.test(e.charAt(t)););return t},w={"default":E,__moduleExports:E},b=w&&E||w,x=/^\s+/;var I=function(e){return e?e.slice(0,b(e)+1).replace(x,""):e},D={"default":I,__moduleExports:I},S=h.Symbol,M={"default":S,__moduleExports:S},V=M&&S||M,O=Object.prototype,F=O.hasOwnProperty,k=O.toString,H=V?V.toStringTag:undefined;var Q=function(e){var t=F.call(e,H),n=e[H];try{e[H]=undefined}catch(o){}var i=k.call(e);return t?e[H]=n:delete e[H],i},A={"default":Q,__moduleExports:Q},N=Object.prototype.toString;var B=function(e){return N.call(e)},j={"default":B,__moduleExports:B},U=A&&Q||A,C=j&&B||j,R="[object Null]",W="[object Undefined]",Y=V?V.toStringTag:undefined;var P=function(e){return null==e?e===undefined?W:R:Y&&Y in Object(e)?U(e):C(e)},z={"default":P,__moduleExports:P};var X=function(e){return null!=e&&"object"==typeof e},L={"default":X,__moduleExports:X},q=z&&P||z,J=L&&X||L,Z="[object Symbol]";var $=function(e){return"symbol"==typeof e||J(e)&&q(e)==Z},G={"default":$,__moduleExports:$},K=D&&I||D,ee=c&&s||c,te=G&&$||G,ne=NaN,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,ae=/^0o[0-7]+$/i,re=parseInt;var de=function(e){if("number"==typeof e)return e;if(te(e))return ne;if(ee(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ee(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=K(e);var n=oe.test(e);return n||ae.test(e)?re(e.slice(2),n?2:8):ie.test(e)?ne:+e},se={"default":de,__moduleExports:de},ce=T&&g||T,le=se&&de||se,ue="Expected a function",pe=Math.max,me=Math.min;var fe=function(e,t,n){var i,o,a,r,d,s,c=0,l=!1,u=!1,p=!0;if("function"!=typeof e)throw new TypeError(ue);function m(t){var n=i,a=o;return i=o=undefined,c=t,r=e.apply(a,n)}function f(e){var n=e-s;return s===undefined||n>=t||n<0||u&&e-c>=a}function _(){var e=ce();if(f(e))return v(e);d=setTimeout(_,function(e){var n=t-(e-s);return u?me(n,a-(e-c)):n}(e))}function v(e){return d=undefined,p&&i?m(e):(i=o=undefined,r)}function h(){var e=ce(),n=f(e);if(i=arguments,o=this,s=e,n){if(d===undefined)return function(e){return c=e,d=setTimeout(_,t),l?m(e):r}(s);if(u)return clearTimeout(d),d=setTimeout(_,t),m(s)}return d===undefined&&(d=setTimeout(_,t)),r}return t=le(t)||0,ee(n)&&(l=!!n.leading,a=(u="maxWait"in n)?pe(le(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),h.cancel=function(){d!==undefined&&clearTimeout(d),c=0,i=s=o=d=undefined},h.flush=function(){return d===undefined?r:v(ce())},h};function _e(){return window.innerHeight||document.documentElement.clientHeight}function ve(e,t){var n=e.getBoundingClientRect().top,i=n+e.clientHeight,a=n>=0&&n<_e(),r=i>=0&&i<_e(),d=n<0&&i>0,s=a?Math.min(e.clientHeight,_e()-n):i;s=Math.min(s,_e()),a||r||d?(o[t].isSendViewOff=!1,o[t].isSendView||(o[t].isSendView=!0,o.sendMessage({containerID:t,pv:!0,play:!0}))):(o[t].isSendView=!1,o[t].isSendViewOff||(o[t].isSendViewOff=!0,o.sendMessage({containerID:t,play:!1})))}var he=function(e,t,n){return n=n||/\{([^\{\}]*)\}/g,e.replace(n,function(e,n){var i=n.split("."),o=t;try{for(var a in i)i.hasOwnProperty(a)&&(o=o[i[a]])}catch(r){o=e}return"string"==typeof o||"number"==typeof o?o:e})},ge="info-div{\n\tdisplay: block;\n }\n.QHMV_iframe_fullScreenWrap{\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tbottom: 0;\n\tright: 0;\n\tbackground: #000;\n\tz-index: 2147483647;\n}\n.QHMV_iframe_fullScreenWrap video::-webkit-media-controls-fullscreen-button { \n display:none; \n}\n.QHMV_iframe_videoFullScreen{\n position: absolute;\n top:50%;\n left: 50%;\n max-width: 100%;\n max-height: 100%;\n transform: translate(-50%, -50%);\n cursor: pointer;\n\tz-index: 105;\n\tmargin: 0;\n\tpadding: 0;\n\toutline: none;\n\tdisplay: block;\n}\n\n.QHMV_iframe_sidebar{\n width: 367px;\n height: 78px;\n position: absolute;\n right: 30px;\n top: 80px;\n background: #F6F6F6;\n box-shadow: 0 1px 6px 0 rgba(0,0,0,0.30);\n border-radius: 3px;\n cursor: pointer;\n z-index: 106;\n}\n.QHMV_iframe_side-right,.QHMV_iframe_side-detail{\n float: left;\n}\n.QHMV_iframe_side-detail{\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 225px;\n padding-top: 4px;\n position: absolute;\n right: 0;\n}\n.QHMV_iframe_side-detail .QHMV_iframe_title{\n width: 100%;\n height: 25px;\n line-height: 25px;\n margin-bottom: 4px;\n font-size: 16px;\n color: #3F3F3F;\n font-weight: 700;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.QHMV_iframe_side-detail .QHMV_iframe_desc{\n height: 40px;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n font-size: 12px;\n padding-right: 88px;\n color: #646464;\n}\n.QHMV_iframe_side-button{\n position: absolute;\n right: 8px;\n bottom: 10px;\n width: 70px;\n height: 30px;\n line-height: 30px;\n background: #167AC6;\n border-radius: 3px;\n border-radius: 3px;\n font-size: 13px;\n text-align: center;\n color: #FFFFFF;\n \n}\n.QHMV_iframe_side-right{\n height: 68px;\n margin: 5px 8px;\n width: 120px;\n position: absolute;\n left: 0;\n overflow: hidden;\n}\n.QHMV_iframe_side-right img{\n height: 68px;\n min-width: 100%;\n}\n.QHMV_iframe_openSide{\n animation: QHMV_iframe_openAnimationRight 240ms cubic-bezier(0.175, 0.885, 0.320, 1.175) both;\n -webkit-animation: QHMV_iframe_openAnimationRight 240ms cubic-bezier(0.175, 0.885, 0.320, 1.175) both;\n}\n.QHMV_iframe_exitFullScreen{\n position: absolute;\n right: 20px;\n top: 20px;\n z-index: 1000;\n text-align: center;\n cursor: pointer;\n z-index: 106;\n}\n.QHMV_iframe_exitFullScreen img{\n height: 30px;\n}\n\n\n@keyframes QHMV_iframe_openAnimationRight {\n from {\n transform: translateX(100%);\n -webkit-transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n -webkit-transform: translateX(0);\n }\n}\n\n\n";function Te(e){if("NaN"==e||!e)return!1;var t=new Image;t.onload=t.onerror=function(){t=null},t.src=e}function ye(e,t){if(e)return function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")}(e,t)||(e.className+=" "+t),e}function Ee(e,t){if("NaN"==e||!e)return!1;(t=t||{}).adst=a(t.adst)?"__ADSIZE_TYPE__":t.adst,t.vai=a(t.vai)?"__VIDEO_ACTION_ID__":t.vai,t.vps=a(t.vps)?"__VIDEO_TIME__":t.vps,t.vtps=a(t.vtps)?"__VIDEO_DURATION__":t.vtps,t.cpx=a(t.cpx)?"__OFFSET_X__":t.cpx,t.cpy=a(t.cpy)?"__OFFSET_Y__":t.cpy,t.cs=a(t.cs)?"__EVENT_TIME_START__":t.cs,t.ce=a(t.ce)?"__EVENT_TIME_END__":t.ce,e=e.replace("__ADSIZE_TYPE__",t.adst).replace("__VIDEO_ACTION_ID__",t.vai).replace("__VIDEO_TIME__",t.vps).replace("__VIDEO_DURATION__",t.vtps).replace("__OFFSET_X__",t.cpx).replace("__OFFSET_Y__",t.cpy).replace("__EVENT_TIME_START__",t.cs).replace("__EVENT_TIME_END__",t.ce);var n=new Image;n.onload=n.onerror=function(){n=null},n.src=e}var we={};try{we={mouseOffset:{},mouseDownTime:"",mouseUpTime:"",idString:"QHMV_iframe_",options:null,init:function(e){this.options=o[e].options,a(this.options.data.vstarttk)&&(this.options.data.vstarttk=[""]),a(this.options.data.vpausetk)&&(this.options.data.vpausetk=[""]),a(this.options.data.vcontitk)&&(this.options.data.vcontitk=[""]),a(this.options.data.vexittk)&&(this.options.data.vexittk=[""]),a(this.options.data.vcomptk)&&(this.options.data.vcomptk=[""]),a(this.options.data.voptk)&&(this.options.data.voptk=[""]);var t=he('\n \n \n \n',{containerID:e,video:this.options.data.video,sideImg:this.options.data.img,title:this.options.data.title,desc:this.options.data.desc});document.body.insertAdjacentHTML("beforeend",t),this.bindEvent(this.idString,e),o.video=document.getElementById("QHMV_iframe_videoFullScreen"),this.videoEvents(o.video)},videoEvents:function(e){var t=this,n=this;o.video_replayTimes=-1,o.video_duration=this.options.data.duration,o.video_currentTime=parseInt(e.currentTime),o.video_closed=!1,d(e,"play",function(){0==o.video_currentTime||(o.video_replayTimes>0?o.video_duration=o.video_replayTimes*n.options.data.duration+o.video_currentTime:o.video_duration=o.video_currentTime,Ee(t.options.data.vcontitk[0],{adst:1,vps:o.video_currentTime,vtps:o.video_duration}))}),d(e,"playing",function(){-1==o.video_replayTimes&&Ee(t.options.data.vstarttk[0],{adst:1,vps:o.video_currentTime,vtps:o.video_duration}),0==o.video_replayTimes&&Ee(t.options.data.vcomptk[0],{adst:1,vps:o.video_currentTime,vtps:o.video_duration}),0==o.video_currentTime&&(o.video_replayTimes+=1)}),d(e,"pause",function(){if(o.video_closed)return!1;o.video_replayTimes>0?o.video_duration=o.video_replayTimes*n.options.data.duration+o.video_currentTime:o.video_duration=o.video_currentTime,Ee(t.options.data.vpausetk[0],{adst:1,vps:o.video_currentTime,vtps:o.video_duration})}),d(e,"waiting",function(){}),d(e,"timeupdate",function(){o.video_currentTime=parseInt(e.currentTime)}),d(e,"volumechange",function(){e.muted?(o.video_replayTimes>0?o.video_duration=o.video_replayTimes*n.options.data.duration+o.video_currentTime:o.video_duration=o.video_currentTime,Ee(n.options.data.voptk[0],{vai:6,adst:1,vps:o.video_currentTime,vtps:o.video_duration})):(o.video_replayTimes>0?o.video_duration=o.video_replayTimes*n.options.data.duration+o.video_currentTime:o.video_duration=o.video_currentTime,Ee(n.options.data.voptk[0],{vai:5,adst:1,vps:o.video_currentTime,vtps:o.video_duration}))})},bindEvent:function(e,t){var n=this,i=document.getElementById(e+"fullScreenWrap"),r=document.getElementById(e+"videoFullScreen"),s=document.getElementById(e+"sidebar"),c=n.options.data.clktk.join(","),l=n.options.data.curl;ye(s,"QHMV_iframe_openSide"),d(document.getElementById("QHMV_iframe_fullScreenWrap"),"mousedown",function(e){n.mouseDownTime=(new Date).getTime(),n.getOffset(e.clientX,e.clientY)}),d(document.getElementById("QHMV_iframe_fullScreenWrap"),"click",function(e){n.mouseUpTime=(new Date).getTime(),"QHMV_iframe_fullScreenWrap"===e.target.id&&(o.video_replayTimes>0?o.video_duration=o.video_replayTimes*n.options.data.duration+o.video_currentTime:o.video_duration=o.video_currentTime,Ee(n.options.data.voptk[0],{vai:1,adst:1,vps:o.video_currentTime,vtps:o.video_duration,cpx:parseInt(n.mouseOffset.x),cpy:parseInt(n.mouseOffset.y),cs:n.mouseDownTime,ce:n.mouseUpTime}))}),d(document.getElementById(e+"exitFullScreen"),"mousedown",function(e){o.video_closed=!0,n.mouseDownTime=(new Date).getTime(),n.getOffset(e.clientX,e.clientY)}),d(document.getElementById(e+"exitFullScreen"),"click",function(e){o.sendMessage({containerID:t,ouFullScreen:!0}),document.body.removeChild(i),n.options.scrollDomId?document.getElementById(n.options.scrollDomId).style.overflowY="scroll":document.body.style.overflowY="scroll",n.mouseUpTime=(new Date).getTime(),o.video_replayTimes>0?o.video_duration=o.video_replayTimes*n.options.data.duration+o.video_currentTime:o.video_duration=o.video_currentTime,Ee(n.options.data.voptk[0],{vai:4,adst:1,vps:o.video_currentTime,vtps:o.video_duration,cpx:parseInt(n.mouseOffset.x),cpy:parseInt(n.mouseOffset.y),cs:n.mouseDownTime,ce:n.mouseUpTime}),Ee(n.options.data.vexittk[0],{adst:1,vps:o.video_currentTime,vtps:o.video_duration})}),d(s,"mousedown",function(e){n.mouseDownTime=(new Date).getTime(),n.getOffset(e.clientX,e.clientY)}),d(s,"click",function(e){r.pause(),n.mouseUpTime=(new Date).getTime(),n.replaceUrl(c,l);var t=n.options.onClick;a(t)||"function"!=typeof t||t.call(null),o.video_replayTimes>0?o.video_duration=o.video_replayTimes*n.options.data.duration+o.video_currentTime:o.video_duration=o.video_currentTime,Ee(n.options.data.voptk[0],{vai:2,adst:1,vps:o.video_currentTime,vtps:o.video_duration,cpx:parseInt(n.mouseOffset.x),cpy:parseInt(n.mouseOffset.y),cs:n.mouseDownTime,ce:n.mouseUpTime})}),d(r,"mousedown",function(e){n.mouseDownTime=(new Date).getTime(),n.getOffset(e.clientX,e.clientY)}),d(r,"click",function(e){n.mouseUpTime=(new Date).getTime(),n.replaceUrl(c,l);var t=n.options.onClick;a(t)||"function"!=typeof t||t.call(null),o.video_replayTimes>0?o.video_duration=o.video_replayTimes*n.options.data.duration+o.video_currentTime:o.video_duration=o.video_currentTime,Ee(n.options.data.voptk[0],{vai:2,adst:1,vps:o.video_currentTime,vtps:o.video_duration,cpx:parseInt(n.mouseOffset.x),cpy:parseInt(n.mouseOffset.y),cs:n.mouseDownTime,ce:n.mouseUpTime})})},replaceUrl:function(e,t){var n=window.innerWidth,i=window.innerHeight;if(e)for(var o=(e=e.replace("__EVENT_TIME_START__",this.mouseDownTime).replace("__EVENT_TIME_END__",this.mouseUpTime).replace("__OFFSET_X__",parseInt(this.mouseOffset.x)).replace("__OFFSET_Y__",parseInt(this.mouseOffset.y)).replace("__ADSPACE_W__",n).replace("__ADSPACE_H__",i)).split(","),a=0;a=0||t.indexOf("#")>=0)&&(o=document.querySelector(t)),ve(o,e),n){if(d(document.getElementById(n),"scroll",fe(ve.bind(this,o,e),66)),i){var a=document.getElementById(i);d(a||window,"scroll",fe(ve.bind(this,o,e),66))}}else d(window,"scroll",fe(ve.bind(this,o,e),66))}(c,e.placeholderId,e.scrollDomId,e.extraScrollDomId)},d(window,"message",function(n){var i=t(9)?JSON.parse(n.data):n.data;if(i.containerID===c){if(i.fullScreen){try{we.init(i.containerID)}catch(xe){}e.scrollDomId?document.getElementById(e.scrollDomId).style.overflowY="hidden":document.body.style.overflowY="hidden"}if(i.clickAd){var r=e.onClick;a(r)||"function"!=typeof r||r.call(null)}i.jsReady&&(o[c].jsReady=i.jsReady)}})};if(o[c].dom=document.getElementById(e.placeholderId),o[c].dom)l();else var u=0,m=setInterval(function(){u>=50&&clearInterval(m),u++,o[c].dom=document.getElementById(e.placeholderId),o[c].dom&&(l(),clearInterval(m))},100)}})},e.store=i,e.videoStatus=function(e,t){var n=null,i=null;if(n||i)o.sendMessage({containerID:n,play:e});else var a=setInterval(function(){if(n){try{i=o[n].jsReady}catch(xe){}i&&(o.sendMessage({containerID:n,play:e}),window.clearInterval(a))}else try{n=document.getElementById(t).getElementsByTagName("iframe")[0].getAttribute("data-id")}catch(xe){}},100)},e}({});
//# sourceMappingURL=news_feed_video.js.map