!function(t){var e={};function r(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=1)}([,function(t,e,r){t.exports=r(2)},function(t,e,r){"use strict";function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(){if(window.crystalsdk={url:"https://mi.ssp.qq.com/ssp/sdk/get_ads",env:{pretest:"https://test-mi.ssp.qq.com/ssp/sdk/get_ads",test:"https://test-mi.ssp.qq.com/ssp/sdk/get_ads"},locReportUrl:{},otherReportUrl:{},locClickUrl:{},otherClickReportUrl:{},ajax:function(t){(t=t||{}).data=t.data||{},t.type=t.type||"txt",t.method=(t.method||"GET").toUpperCase(),"json"===t.type?t.data=JSON.stringify(t.data):t.data=function(t){var e=[];for(var r in t)"[object Object]"===Object.prototype.toString.call(t[r])?e.push(encodeURIComponent(r)+"="+encodeURIComponent(JSON.stringify(t[r]))):e.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e.push("v="+Math.floor(1e4*Math.random()+500)),e.join("&")}(t.data);var e=null;(e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObjcet("Microsoft.XMLHTTP")).onreadystatechange=function(){if(4==e.readyState){var r=e.status;if(r>=200&&r<300){var o="",s=e.getResponseHeader("Content-type");o=-1!==s.indexOf("xml")&&e.responseXML?e.responseXML:"application/json"===s?JSON.parse(e.responseText):e.responseText,t.success&&t.success(o)}else t.error&&t.error(r)}},"GET"==t.method?(e.open(t.method,t.url+"?"+t.data,!0),e.withCredentials=!0,e.send(null)):(e.open(t.method,t.url,!0),"json"===t.type?e.setRequestHeader("Content-Type","application/json; charset=UTF-8"):e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.withCredentials=!0,e.send(t.data))},getAd:function(t,e,r,s,n,c){n||(n=""),c||(c="");var l=crystalsdk.url;t.env&&crystalsdk.env[t.env]&&(l=crystalsdk.env[t.env]),crystalsdk.ajax({url:l,method:"POST",data:t,success:function(l){var i;l=(l=l.replace(/\r\n/g,"")).replace(/\n/g,"");var a=(l=JSON.parse(l)).data[t.posid].list[0].ssp_ext;crystalsdk.locReportUrl[e]=a.imp_url?a.imp_url:[],crystalsdk.otherReportUrl[e]=a.imp_trackers?a.imp_trackers:[],crystalsdk.locClickUrl[e]=a.click_url?a.click_url:"",crystalsdk.otherClickReportUrl[e]=a.click_trackers?a.click_trackers:[],crystalsdk.render((o(i={emptyReport:a.empty_order_trackers?a.empty_order_trackers:[],imgUrl:a.imp_url?l.data[t.posid].list[0].img:"",report:crystalsdk.locReportUrl[e],otherReport:crystalsdk.otherReportUrl[e],clickUrl:crystalsdk.locClickUrl[e]},"otherClickReport_"+e,crystalsdk.otherClickReportUrl[e]),o(i,"customized_js_snippet",a.customized_js_snippet?a.customized_js_snippet:""),o(i,"html_snippet",a.html_snippet),i),e,r,s,n,c)},error:function(){document.getElementById(e).style.display="none",""!==c&&c()}})},render:function(t,e,r,o,s,n){var c=document.getElementById(e);if(""!==t.html_snippet)t.html_snippet=t.html_snippet.replace("[id]",e),c.innerHTML=t.html_snippet,crystalsdk.report(t.report),crystalsdk.report(t.otherReport),""!==s&&s();else if(""!==t.imgUrl){var l=document.createElement("div");l.style.position="relative";var i=document.createElement("div");i.setAttribute("parentId",e);var a=document.createElement("img");a.style.display="block",a.style.width="100%";var d=document.createElement("div");d.style.width="29px",d.style.height="16px",d.style.position="absolute",d.style.bottom="0",d.style.zIndex="10",d.style.background='url("https://ra.gtimg.com/web/res/icon/leftbottom.png") no-repeat',a.onload=function(){c.style.width=r+"px",c.style.overflow="hidden",crystalsdk.report(t.report),crystalsdk.report(t.otherReport),i.appendChild(a),i.appendChild(d),l.appendChild(i),c.appendChild(l)},a.error=function(){document.getElementById(i.getAttribute("parentId")).style.display="none"},a.src=t.imgUrl,""!==t.clickUrl&&(l.style.cursor="pointer",l.setAttribute("clickUrl",t.clickUrl),l.setAttribute("clickReport",JSON.stringify(t["clickReport_"+e])),l.setAttribute("otherClickReport",JSON.stringify(t["otherClickReport_"+e])),l.addEventListener("click",crystalsdk.onImgClick)),""!==s&&s()}else if(""!==t.customized_js_snippet){var p="
"+t.customized_js_snippet+"",u=document.createElement("iframe");u.style.border="0",u.style.width=r+"px",u.style.height=o+"px",c.appendChild(u),u.contentWindow.document.write(p),u.contentWindow.document.onclick=function(){t.clickUrl&&crystalsdk.report(t.clickUrl),t["clickReport_"+e]&&t["clickReport_"+e].forEach(function(t){crystalsdk.report(t)}),t["otherClickReport_"+e]&&t["otherClickReport_"+e].forEach(function(t){crystalsdk.report(t)})},crystalsdk.report(t.report),crystalsdk.report(t.otherReport),""!==s&&s()}else crystalsdk.report(t.emptyReport),c.style.display="none",""!==n&&n()},navToUrl:function(t,e){e&&"_self"===e?location.href=crystalsdk.locClickUrl[t]:window.open(crystalsdk.locClickUrl[t]),crystalsdk.report(crystalsdk.otherClickReportUrl[t])},onImgClick:function(t){window.open(t.currentTarget.getAttribute("clickUrl"));var e=JSON.parse(t.currentTarget.getAttribute("otherClickReport"));crystalsdk.report(e)},report:function(t){if("[object Array]"===Object.prototype.toString.call(t)){if(t.length<=0)return;for(var e=0;e