9a7eb8933a59b91fdc2bbf099be783aa04aa18832c7180d00dee46eadb2ec750

Source Code:

!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i}),n.d(t,"f",function(){return o}),n.d(t,"e",function(){return r}),n.d(t,"d",function(){return a}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return l}),n.d(t,"b",function(){return d}),n.d(t,"c",function(){return h}),n.d(t,"g",function(){return f});var i=window||e,o=window?window.navigator:{},r=window?window.location:{},a=window?window.document:{},s=Array.prototype,u=Object.prototype,c=s.slice,l=u.toString,d=(u.hasOwnProperty,s.forEach,s.indexOf,Array.isArray,"https:"===a.location.protocol?"https://":"http://"),h={log:function(){f.showLog&&window.console&&window.console.log.apply(window.console,arguments)},error:function(){f.showLog&&window.console&&window.console.error.apply(window.console,arguments)}},f={imp:!0,hashtag:!1,touch:!1,bot:!0,showLog:!0,dataCollect:!1,pathCaseSensitive:!0,exposure:!1,setGuid:!1,visualTrack:!1,scheme:d,elementThreshold:50,host:"ma.logsss.com",visualConfigHost:"dap.logsss.com",guidConfigHost:"id-generator.logsss.com",failReTryTime:3,impCtrlDua:6e4,visual_track_config:[]}}).call(t,n(2))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=/^(\.br\.|\.co\.|\.com\.|\.org\.|\.edu\.|\.net\.)/,r={getItem:function(e){for(var t=e+"=",n=i.d.cookie.split(";"),o=0;o<n.length;o++){for(var r=n[o];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}return null},setItem:function(e,t,n,o,r,a){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;var s="";if(n){switch(i.i.call(n)){case"[object Number]":var u=(new Date).getTime();s=n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; expires="+new Date(u+1e3*n).toUTCString();break;case"[object String]":s="; expires="+n;break;case"[object Date]":s="; expires="+n.toUTCString()}r=r?"; domain="+r:"",o=o?"; path="+o:"",a=a?"; secure"+o:"",i.d.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+s+r+o+a}},removeItem:function(e,t,n){var o=!1;return this.hasItem(e)&&(o=!0,i.d.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:"")),o},hasItem:function(e){var t=!1;return e&&(t=new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(i.d.cookie||"")),t},keys:function(){var e=i.d.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/);return e.forEach(function(e,t,n){n[t]=decodeURIComponent(e)}),e}},a={getItem:r.getItem,hasItem:r.hasItem,keys:r.keys,setItem:function(e,t,n,i,a,s){if("string"==typeof a)r.setItem(e,t,n,i,a,s);else for(var u=0;u<a.length;u++)if(!o.test(a[u])){r.setItem(e,t,n,i,a[u],s);break}},removeItem:function(e,t,n){if("string"==typeof n)r.removeItem(e,t,n);else for(var i=0;i<n.length;i++)if(!o.test(n[i])){r.removeItem(e,t,n[i]);break}}},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return s(e,null,[{key:"get",value:function(e){try{return i.a.localStorage?this._readFromLocalStorage(e):this._readFromCookie(e)}catch(e){return i.c.log(e),null}}},{key:"set",value:function(e,t,n){n||(n=864e5);try{i.a.localStorage?this._setInLocalStorage(e,t,n):this._setInCookie(e,t,n)}catch(e){i.c.log(e)}}},{key:"removeItem",value:function(e){try{return i.a.localStorage?this.removeInLocalStorage(e):this.removeInCookie(e)}catch(e){return i.c.log(e),null}}},{key:"_readFromLocalStorage",value:function(e){var t=i.a.localStorage.getItem(e);if(t){var n=JSON.parse(t);if(n.expiredAt&&n.expiredAt>=+Date.now())return n.value}return null}},{key:"_readFromCookie",value:function(e){return a.getItem(e)}},{key:"_setInLocalStorage",value:function(e,t,n){var o=JSON.stringify({expiredAt:Date.now()+n,value:t});i.a.localStorage.setItem(e,o)}},{key:"_setInCookie",value:function(e,t,n){a.setItem(e,t,n/1e3,"/",i.a.location.hostname)}},{key:"removeInCookie",value:function(e){a.removeItem(e,"/",i.a.location.hostname)}},{key:"removeInLocalStorage",value:function(e){i.a.localStorage.removeItem(e)}}]),e}();function c(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-axxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)})}i.a.GlobalegrowLocalStore=u;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function d(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];i.d.addEventListener?e.addEventListener(t,n,o):i.d.attachEvent?(t="on"+t,e.attachEvent(t,function(){var t=i.a.event;t.currentTarget=e,t.target=t.srcElement,n.call(e,t)})):e["on"+t]=n}function h(){var e=function(e){var t=e.length;return t>1&&"/"===e.charAt(t-1)?e.slice(0,t-1):e}(i.e.pathname);if(i.a.gds.hashtag){var t=i.e.hash;-1!==t.indexOf("?")?e+=t.split("?")[0]:e+=t}return i.a.gds&&i.a.gds.pathCaseSensitive?e:e.toLowerCase()}function f(){var e=c(),t=function(){var e=i.a.name?i.a.name:i.a.self.name;if(e&&i.a.nameStorage){var t=e.split(/[:?]/);3===t.length&&"nameStorage"===t[0]&&(e=t[1])}return e}();t&&"grcw"===t&&(t="grcw-inner-iframe"),i.a.grSource={name:t,id:e}}function p(){var e=i.f.userAgent;if(!i.a.ActiveXObject)return!1;var t=e.indexOf("MSIE");if(t>0){var n=e.indexOf(".",t),o=e.substring(t+5,n);return parseInt(o,10)}if(e.indexOf("Trident/")>0){var r=e.indexOf("rv:");return parseInt(e.substring(r+3,e.indexOf(".",r)),10)}var a=e.indexOf("Edge/");return a>0?parseInt(e.substring(a+5,e.indexOf(".",a)),10):void 0}function g(e,t,n){var o,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"GET",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(i.a.XMLHttpRequest){if(o=new i.a.XMLHttpRequest,"GET"===r&&"{}"!==JSON.stringify(a))for(var s in a){var u=[];if(a.hasOwnProperty(s)){var c=a[s];u.push(s+"="+c)}e+="?"+u.join("&")}o.open(r,e,!0),"POST"===r&&o.setRequestHeader("Content-Type","application/json"),o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<300||304===o.status?"function"==typeof t&&t(o):"function"==typeof n&&n(o))};var l=v(a);o.send(l)}else if(i.a.XDomainRequest){o=new i.a.XDomainRequest,"http:"===i.e.protocol&&(e=e.replace("https://","http://")),o.open(r,e),"POST"===r&&o.setRequestHeader&&o.setRequestHeader("Content-Type","application/json"),o.onload=function(){"function"==typeof t&&t(o)},o.onerror=function(){"function"==typeof n&&n(o)},o.onprogress=function(){return{}},o.ontimeout=function(){return{}};var d=v(a);o.send(d)}}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="";try{t=JSON.stringify(e)}catch(e){}return t}function m(e,t){for(var n in t)e[n]=t[n];return e}function y(e){return e&&"string"==typeof e&&e.constructor===String}function b(e,t){return null!=Array.prototype.indexOf?e.indexOf(t):(e.forEach(function(e,n,i){if(e===t)return n}),-1)}function k(e){var t="",n=e.childNodes;if(!n)return t;for(var i=0;i<n.length;i++){var o=n[i],r="";3===o.nodeType&&(null!=o.textContent?r=o.textContent.trim():null!=o.data&&(r=o.data.trim()),r.length>0&&(t+=r+" "))}return(t=t.replace(/[\n \t]+/g," ").trim()).length>0&&t.length<50?t:void 0}function w(e,t){return e.hasAttribute?e.hasAttribute(t):!!e[t]}function _(e){var t=e||i.d.referrer,n=i.a.gds;return n&&n.pathCaseSensitive?t:t.toLowerCase()}function S(){var e=i.a.location.search;return e.length>1&&"?"===e.charAt(0)?e=e.slice(1):i.a.gds.hashtag&&i.a.location.hash.indexOf("?")&&(e=i.a.location.hash.split("?")[1]),i.a.gds&&i.a.gds.pathCaseSensitive?e:e.toLowerCase()}function I(){var e="pc",t=window.location.host||window.gds.accountId;return/^([a-z]{1,}-m\.|m-[a-z]{1,}\.|m\.|loginm\.|userm\.|orderm\.|cartm\.)/i.test(t)&&(e="m"),e}function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ubcd",t="-1";try{t=i.d.querySelector("meta[name='GLOBEL:"+e+"']").getAttribute("content")}catch(i){if(window.TrackData&&window.TrackData.common){var n=window.TrackData.common;"ubcd"===e&&n.d&&(t=n.d),"dc"===e&&n.dc&&(t=n.dc)}}return t}function O(){return a.getItem("od")}function T(){var e="";try{e=i.d.querySelector("meta[name='GLOBEL:ubci']").getAttribute("content")}catch(t){e=""}return""===e?a.getItem("AKAM_CLIENTID")||"":a.getItem(e)}function C(){return a.hasItem("WEBF-user_id")?a.getItem("WEBF-user_id"):a.hasItem("guid")?a.getItem("guid"):""}function E(){var e=i.a.location.hostname.split(".");return e.length>=3?["."+e.slice(-2).join("."),"."+e.slice(-3).join(".")]:[i.a.location.hostname]}function P(e){var t=a.getItem("gb_pf")||"";if(""!==t)try{t=JSON.parse(t)}catch(e){t={}}else t={};return t[e]||""}function j(e,t){var n=a.getItem("gb_pf")||"";if(""!==n)try{n=JSON.parse(n)}catch(e){n={}}else n={};n[e]=t,a.setItem("gb_pf",JSON.stringify(n),"Session","/",E())}function N(){var e=E(),t=i.d.referrer,n=i.e.href||"";t=t.slice(0,255),n=n.slice(0,255);var o=P("lp"),r=P("rp");if(t){var a=t.split("/");a=a[2]?a[2]:"";for(var s=!1,u=0;u<e.length;u++)if(-1!==a.indexOf(e[u])){s=!0;break}if(!s)return j("lp",n),j("rp",t),{rp:t,lp:n}}return o&&r&&""!==t?{lp:o,rp:r}:(j("rp",t="originalurl"),j("lp",n),{rp:t,lp:n})}var D=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var A=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.launcher=t,this.observer=n,this.sender=i,this.gruser=o,this.send=this.sender.send}return D(e,[{key:"set",value:function(){throw new Error("这是一个接口方法")}},{key:"pageChange",value:function(){this.reset()}},{key:"reset",value:function(){}},{key:"buildMessage",value:function(){}}]),e}();var L=function(e){function t(e,n,i,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,i,o))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,A),t}();var M=function(e){function t(e,n,i,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,i,o))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,A),t}();var R=function(e){function t(e,n,i,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,i,o))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,A),t}();var V=function(e){function t(e,n,i,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,i,o))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,A),t}();var G=function(e){function t(e,n,i,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,i,o))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,A),t}(),B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var H=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultOptions=i.g,this.options=m({},this.defaultOptions),this.started=!1,this.ready=!1,this.tryCount=0,this.tryGuidCount=0,this._setup(),this.identityWindow(),this.commond_stack=[],this.version="2.0.0",this.circleHost=("https:"===i.d.location.protocol?"https://":"http://")+"glsdk.logsss.com",this.endpoint="/events"}return q(e,[{key:"_setup",value:function(){this.app={},this.people={},this.page={},this.evar={},this.system={}}},{key:"pushToStack",value:function(){this.commond_stack.push.apply(this.commond_stack,arguments)}},{key:"setTrackerScheme",value:function(e){if(e&&y(e)){var t=e.toLocaleLowerCase();"http"!==t&&"https"!==t||(this.options.scheme=e+"://")}}},{key:"setZone",value:function(e){e&&"string"==typeof e&&e.trim().length>0&&(this.options.zone=e)}},{key:"setTrackerHost",value:function(e){e&&(this.options.host=e)}},{key:"setAccountId",value:function(e){this.options.accountId=e}},{key:"setImp",value:function(e){this.options.imp=e}},{key:"setSampling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4,t=arguments[1];t||(t=this.defaultSamplingFunc),this.options.sampling=!0,this.options.sampling_ratio=e,this.options.sampling_func=t}},{key:"setImpCtrlDua",value:function(e){this.options.impCtrlDua="number"==typeof e?e:void 0}},{key:"pathCaseSensitive",value:function(e){this.options.pathCaseSensitive=!!e}},{key:"trackBot",value:function(e){this.options.bot=e}},{key:"enableHT",value:function(e){this.options.hashtag=e}},{key:"enableTouch",value:function(e){this.options.touch=e}},{key:"enableExposure",value:function(e){window.gds.exposure=e,this.options.exposure=e}},{key:"enableVisualTrack",value:function(e){window.gds.visualTrack=e,this.options.visualTrack=e}},{key:"enableSetGuid",value:function(e){window.gds.setGuid=e,this.options.setGuid=e}},{key:"dataCollect",value:function(e){this.options.dataCollect=e}},{key:"defaultSamplingFunc",value:function(){throw new Error("这是一个接口方法")}},{key:"setUserId",value:function(e){e&&e.length<=1e3&&this.people&&this.people.setId(""+e)}},{key:"clearUserId",value:function(){this.people&&this.people.clearUserId()}},{key:"setPageGroup",value:function(e){this.page.setName(e)}},{key:"track",value:function(){this.system.track.apply(this.system,arguments)}},{key:"setAppId",value:function(e){e&&(this.options.appId=e)}},{key:"getVisitUserId",value:function(){return this.user.vid()}},{key:"addRealTimeMessageCallBack",value:function(e,t){this.sender.addRealTimeMessageCallBack(e,t)}},{key:"config",value:function(e){var t={imp:"setImp",hashtag:"enableHT",touch:"enableTouch",bot:"trackBot",dataCollect:"dataCollect",pathCaseSensitive:"pathCaseSensitive",scheme:"setTrackerScheme",host:"setTrackerHost",sampling:"setSampling",zone:"setZone",origin:"setOrigin",impCtrlDua:"setImpCtrlDua",exposure:"enableExposure",visualTrack:"enableVisualTrack",setGuid:"enableSetGuid"};for(var n in e){var o=e[n];n in t&&(n=t[n]),"object"===(void 0===o?"undefined":B(o))?this.apply.apply(this,[n].concat(i.h.call(o))):this.apply(n,o)}var r=[];for(var a in this.options)i.a.gds[a]=this.options[a],r.push(i.a.gds[a]);return r}},{key:"init",value:function(e,t,n){var o,r=["app","people","page","evar","system"];if(e&&y(e)&&0!==e.trim().length){this.setAccountId(e),y(t)&&null!==t.trim()?this.setAppId(t):(o=t)&&"object"==(void 0===o?"undefined":l(o))&&o.constructor===Object&&(n=t),i.a.gds={origin:this.circleHost,version:this.version},this.config(n);for(var a=0;a<r.length;a++){var s=r[a];this[s]=this.initDimensions(s)}this.afterInitialize(),this.ready=!0}}},{key:"afterInitialize",value:function(){throw new Error("这是一个接口方法")}},{key:"apply",value:function(){var e=arguments[0],t=arguments.length>=2?i.h.call(arguments,1):[];if(y(e))try{if(-1===e.indexOf(".")){if(this[e])return this[e].apply(this,t);throw new Error("没有找到 "+e+" 方法")}var n=e.split(".");if(this[n[0]]&&n[0][n[1]])return this[n[0]][n[1]].apply(this.arg[0],t);throw new Error("没有找到 "+e+" 方法")}catch(e){console.log("err:",e)}}},{key:"setOrigin",value:function(e){e&&(this.options.origin=e)}},{key:"set",value:function(e,t){this.options[e]=t}},{key:"setGUIdByVid",value:function(){var e=this,t=this.user;if(t&&""===t.uid()&&this.options.scheme&&this.options.host&&this.options.setGuid&&this.options.guidConfigHost){var n=this.options.scheme+this.options.guidConfigHost+"/id_generator/get_id_by_cookie_id/v1";setTimeout(function(){var i={cookie_id:t.vid()};g(n,e.setGUIdByVidSuccessCallback(),e.setGUIdByVidFailCallback(),"GET",i)},5)}}},{key:"setGUIdByVidSuccessCallback",value:function(){var e=this;return function(t){var n;if(200===t.status&&t.response)try{0===(n=JSON.parse(t.response)).code&&n.data&&n.data.id&&(e.tryGuidCount=0,e.user.setGuid(n.data.id))}catch(e){}}}},{key:"setGUIdByVidFailCallback",value:function(){var e=this;return function(t){if(e.tryGuidCount>=e.options.failReTryTime)return!1;console.log(t),e.tryGuidCount++,e.setGUIdByVid()}}},{key:"getVisualTarckConfig",value:function(){var e={domain:this.options.scheme+i.a.location.host,page:h()};this.options.visualTrack&&this.options.scheme&&this.options.visualConfigHost&&g(this.options.scheme+this.options.visualConfigHost+"/datav/pick/search",this.getVisualTarckConfigSuccessCallback(),this.getVisualTarckConfigFailCallback(),"POST",e)}},{key:"getVisualTarckConfigSuccessCallback",value:function(){var e=this;return function(t){var n;if(200===t.status&&t.response)try{0===(n=JSON.parse(t.response)).code&&(e.tryCount=0,i.a.gds.visual_track_config.data=n.data,i.a.gds.visual_track_config.domain=n.domain,i.a.gds.visual_track_config.page=n.page)}catch(e){}}}},{key:"getVisualTarckConfigFailCallback",value:function(){var e=this;return function(t){if(e.tryCount>=e.options.failReTryTime)return!1;console.log(t),e.tryCount++,e.getVisualTarckConfig()}}},{key:"send",value:function(){if(!this.started)try{this.ready&&this.verify()&&this.connect()}catch(e){console.log(e)}finally{this.started=!0;for(var e=this.commond_stack,t=0;t<e.length;t++){var n=e[t];this.apply.apply(this,n)}}}},{key:"verify",value:function(){return!!i.a._gds_hybrid||-1===b(["","localhost","127.0.0.1"],i.a.location.hostname)}},{key:"initSystemConfig",value:function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(this.apply.apply(this,i))}return t}},{key:"identityWindow",value:function(){return f()}},{key:"beforeConnect",value:function(){throw new Error("这是一个接口方法")}},{key:"connect",value:function(){if(i.a.navigator.userAgent.toLowerCase().match(/(bot|crawler|spider|scrapy|jiankongbao|slurp|transcoder|networkbench|oneapm)/i)){if(!this.options.bot)return!1;i.a.gds.imp=!1,this.options.isBot=!0}this.beforeConnect(),this.getVisualTarckConfig(),this.setGUIdByVid(),this.sender.connect({isBot:!!this.options.isBot})}},{key:"callback",value:function(){var e=this;return function(){return e.observer.observe()}}},{key:"initDimensions",value:function(e){switch(e){case"people":return new L(this,this.observer,this.sender,this.user);case"app":return new M(this,this.observer,this.sender,this.user);case"page":return new R(this,this.observer,this.sender,this.user);case"evar":return new V(this,this.observer,this.sender,this.user);case"system":return new G(this,this.observer,this.sender,this.user)}}}]),e}();var U=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.userId=null,this.sessionId="",this.lastSessionId="",this.cookie=a,this.guid=c,this.cookieDomain(),this.isHybrid=!1},J=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var X=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.duration10year=31536e4,e.duration30min=1800,e.duration15min=900,e.duration1min=60,e.grcookieDomain="",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,U),J(t,[{key:"cookieDomain",value:function(){if(!this.grcookieDomain){var e=i.a.location.hostname.split(".");e.length>=3?this.grcookieDomain=["."+e.slice(-2).join("."),"."+e.slice(-3).join(".")]:this.grcookieDomain=[i.a.location.hostname]}return this.grcookieDomain}},{key:"vid",value:function(){return this.userId?this.userId:(this.userId=this.cookie.getItem("globalegrow_user_id")||this.cookie.getItem("gb_vid"),this.cookie.removeItem("globalegrow_user_id","/",this.cookieDomain()),this.userId?this.cookie.setItem("gb_vid",this.userId,this.duration10year,"/",this.cookieDomain()):(this.userId=this.guid(),this.cookie.setItem("gb_vid",this.userId,this.duration10year,"/",this.cookieDomain())),this.userId)}},{key:"uid",value:function(){return this.guserid?this.guserid:(this.guserid=this.cookie.getItem("gb_guid"),this.guserid?this.cookie.setItem("gb_guid",this.guserid,this.duration10year,"/",this.cookieDomain()):this.guserid="",this.guserid)}},{key:"hasSid",value:function(){var e=Date.now();if(this.sessionId&&this.lastUpdated&&e-this.lastUpdated<1e3*this.duration30min)return!0;var t=this.currentSessionId(),n=t[0],i=t[1];return n&&(!this.lastSessionId||i===this.lastSessionId)}},{key:"sid",value:function(){var e=this.currentSessionId();this.sessionId=e[0];var t=e[1],n=Date.now();return this.sessionId&&this.lastUpdated&&n-this.lastUpdated<this.duration1min?this.sessionId:(this.sessionId||(this.sessionId=this.guid(),t=!1),this.updateSessionId(this.sessionId,t),this.sessionId)}},{key:"getCs1",value:function(){return this.cookie.getItem(window.gds.accountId+"_gr_cs1")}},{key:"last_sent_sid_with_cs1",value:function(){return this.cookie.getItem(window.gds.accountId+"_gr_last_sent_sid_with_cs1")}},{key:"last_sent_cs1",value:function(){return this.cookie.getItem(window.gds.accountId+"_gr_last_sent_cs1")}},{key:"currentSessionId",value:function(e){e||(e=i.a.gds.accountId);var t=this.cookie.getItem(e+"_gb_sid")||"",n="true"===this.cookie.getItem(e+"_gb_sid_"+t);if(t&&t.indexOf("_")>=0){var o=t.split("_");t=o[0],n="true"===(n=o[1]),this.updateSessionId(t,n)}return t&&"null"===t&&(t="",n=!1),[t,n]}},{key:"updateSessionId",value:function(e,t,n){e?(n||(n=i.a.gds.accountId),this.lastUpdated=Date.now(),this.lastSessionId=e,this.updateSessionIdSendStatus(e,t,n),this.cookie.setItem(n+"_gb_sid",e,this.duration30min,"/",this.cookieDomain())):(console.log("sid 不能为空"),this.sessionId=this.guid(),this.updateSessionId(this.sessionId,t,n))}},{key:"updateSessionIdSendStatus",value:function(e,t,n){null==n&&(n=i.a.gds.accountId);for(var o=this.cookie.keys(),r=0;r<o.length;r++){var a=o[r];if(a.match(/.*_gb_sid_/)&&a.slice(a.lastIndexOf("_")+1)!==t){this.cookie.removeItem(a,"/",this.cookieDomain());break}a.match(/globalegrow_session_id/)&&this.cookie.removeItem(a,"/",this.cookieDomain())}return this.cookie.setItem(n+"_gb_sid_"+e,t,this.duration30min,"/",this.cookieDomain())}},{key:"isSendNewVisit",value:function(){var e=!1;return this.cookie.getItem("globalegrow_user_id")||this.cookie.getItem("gb_vid")||(e=!0),e}},{key:"getSidSendSuccess",value:function(e){return e||(e=i.a.gds.accountId),!0===this.currentSessionId(e)[1]}},{key:"setGioId",value:function(e){e&&this.cookie.setItem("gb_vid",e,this.duration10year,"/",this.cookieDomain())}},{key:"setGuid",value:function(e){e&&this.cookie.setItem("gb_guid",e,this.duration10year,"/",this.cookieDomain())}},{key:"resetUserId",value:function(){this.userId&&this.cookie.setItem("gb_vid",this.userId,this.duration10year,"/",this.cookieDomain())}}]),t}(),F=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();p();var z=/(^| )(clear|clearfix|active|hover|enabled|hidden|display|focus|disabled|ng-|chook-)[^\. ]*/g,Q=function(){function e(t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.node=t,this.name=t.tagName.toLowerCase(),w(t,"id")&&(this.id=t.getAttribute("id")),this.isIgnore=w(t,"chook-ignore")||w(t,"data-chook-ignore"),w(t,"href")){var i=t.getAttribute("href");i&&i.indexOf("javascript")&&(this.href=i.slice(0,320))}w(t,"data-chook-info")&&(this.grObj=t.getAttribute("data-chook-info")),w(t,"data-chook-idx")&&(this.grIdx=parseInt(t.getAttribute("data-chook-idx")));var o=function(e){return(p()||NaN)<8?e.className:e.getAttribute("class")}(t);(n=o?o.replace(z,"").trim():"").length>0&&(this.klass=n.split(/\s+/).sort())}return F(e,[{key:"path",value:function(){var e="";e="/"+this.name;(this.id&&/^[\w|-]+$/.test(this.id)&&(e+="#"+this.id),this.klass)&&this.klass.forEach(function(t){e+="."+t});return e}},{key:"hasObj",value:function(){return null!=this.grObj}},{key:"hasIdx",value:function(){return null!=this.grIdx}},{key:"isContainer",value:function(){return w(this.node,"data-chook-container")}}]),e}(),W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var K=["TR","LI","DL"],Y=["A","BUTTON"],Z=["I","SPAN","EM","SVG","FONT"],ee=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return $(e,[{key:"path",value:function(e){var t,n,o,r,a,s,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c="",l={},d=[],h=!1,f=0,p=[],g=!1,v=!1;if(e===i.d)return{isIgnore:!0};for(t=new Q(e);"html"!==t.name&&"body"!==t.name&&e&&e.tagName;)l={x:t.path()||"",h:t.href||"",v:this.containerElemContent(t.node)||"",attr:[]},p.push(l.x),t.isIgnore&&(h=!0),!g&&t.hasObj()&&(g=!0,n=t.grObj),v||(t.hasIdx()?(v=!0,o=t.grIdx):(a=t.path(),-1===a.indexOf("/li")&&-1===a.indexOf("/dl")&&-1===a.indexOf("/tr")||(v=!0,o=this.index(t.node)))),u&&""!==c&&(-1!==b(Y,t.node.tagName)||t.isContainer())&&(g?l.obj=n:w(t.node.parentNode,"data-chook-info")&&(l.obj=t.node.parentNode.getAttribute("data-chook-info")),l.x=f,d.push(l)),c=t.path()+c,f++,e=t.node.parentNode,t=new Q(e),1===f&&(r=t.node);p.reverse();for(var m=0;m<d.length;m++)(s=d[m]).x=p.slice(0,f-s.x).join(""),s.idx=0,v&&(s.idx=o),g&&(s.obj=n);var y={xpath:c,containerMessage:d,isIgnore:h};return g&&(y.obj=n),v&&(y.idx=o),r&&(y.pnode=r),y}},{key:"index",value:function(e){for(var t,n,i=e;i&&"BODY"!==i&&-1===b(K,i.tagName);)i=i.parentNode;if(i){t=1,n=i.parentNode.childNodes;for(var o=0;o<n.length;o++){var r=n[o];if(r.tagName===i.tagName){if(w(r,"data-chook-idx")&&(t=parseInt(r.getAttribute("data-chook-idx"))),r===i)return t;t++}}}}},{key:"isLeaf",value:function(e){var t;if(e.hasChildNodes()&&"svg"!==e.tagName){t=e.childNodes;for(var n=0;n<t.length;n++)if(1===t[n].nodeType)return!1}return!0}},{key:"isParentOfLeaf",value:function(e){if(!e.childNodes)return!1;if("svg"===e.tagName)return!1;for(var t=e.childNodes,n=0;n<t.length;n++)if(!this.isLeaf(t[n]))return!1;return!0}},{key:"depthInside",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e.hasChildNodes()){if(t<n)return!1;for(var i=e.childNodes,o=0;o<i.length;o++){var r=i[o];if(1===r.nodeType&&!this.depthInside(r,t,n+1))return!1}}return t>=n}},{key:"onlyContainsChildren",value:function(e,t){if(0===!e.children.length)return!1;for(var n=e.children,i=0;i<n.length;i++){if(-1===b(t,n[i].tagName))return!1}return!0}},{key:"containerElemContent",value:function(e){var t;if(w(e,"data-chook-title")&&e.getAttribute("data-chook-title").length>0)return e.getAttribute("data-chook-title");if(w(e,"title")&&e.title.length>0)return e.getAttribute("title");if("BUTTON"===e.tagName){if(e.name.length>0)return e.name;if(this.onlyContainsChildren(e,Z)&&null!=e.textContent&&(t=e.textContent.replace(/[\n \t]+/g," ").trim()).length>0&&t.length<50)return t}else if("A"===e.tagName){if(this.onlyContainsChildren(e,Z)&&null!=e.textContent){if((t=e.textContent.replace(/[\n \t]+/g," ").trim()).length>0)return t<=50?t:t.slice(0,50)}else if(w(e,"href")&&e.getAttribute("href").length>0)return e.getAttribute("href")}else if("LABEL"===e.tagName&&null!=e.textContent&&(t=e.textContent.replace(/[\n \t]+/g," ").trim()).length>0&&t.length<50)return t}},{key:"isDOM",value:function(e){return"HTMLElement"in i.a?e&&e instanceof HTMLElement:!(!e||"object"!=(void 0===e?"undefined":W(e))||1!==e.nodeType||!e.nodeName)}}]),e}(),te=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var ne=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,ee),te(t,[{key:"user",value:function(){return new X}}]),t}()),ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var re=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sendVisitTimeout=0,this.user=t,this.callback=n,this.isBot=!1,this.IEVersion=p(),this.typeListReceivedValid=[],this.XDomainRequestArray=[],this.XMLHttpRequestArray=[],this.xhrData=[],this.isbuffer=!0}return oe(e,[{key:"setUrlMap",value:function(e){this.urlMap=this.getUrlMap(e)}},{key:"getUrlMap",value:function(e){var t="";return{pv:t=e.zone&&"api.growingio.com"===e.host?e.scheme+"api-"+e.zone+".growingio.com":e.scheme+e.host,action:t,cstm:t,pvar:t,ppl:t,evar:t,gif:i.b+"s.logsss.com/_ubc.gif"}}},{key:"connect",value:function(e){this.isBot=e.isBot,"function"==typeof this.callback&&this.callback(this.user,this.send)}},{key:"send",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"action";if(!window.gds.dataCollect&&!window.grBlind)try{if(t="pv"===n&&2===e.length?e[0].s:"",i.a.XMLHttpRequest&&!this.isBot&&"gif"!==n&&(this.xhrData=e.concat(this.xhrData).slice(0,50),e=this.xhrData.splice(0,10)),this.sendRemote(JSON.stringify(e),n,t),this.typeListReceivedValid.length>=0&&this.setRealTimeMessageCallBack){for(var o=[],r=0;r<e.length;r++){var a,s=e[r],u=s.t;[].indexOf.call(this.typeListReceivedValid,u)>=0&&(a=this.setRealTimeMessageCallBack(s)),o.push(a)}return o}}catch(e){i.c.log(e)}}},{key:"sendRemote",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.urlMap[t];if(i.a.grWaitTime=Date.now()+1e3,""!==o&&(this.sendVisitTimeout+=1e3),i.a.XMLHttpRequest&&!this.isBot&&"gif"!==t){var a=new i.a.XMLHttpRequest;if("withCredentials"in a)return a.open("POST",r+"?stm="+Date.now(),!0),a.onreadystatechange=function(){if(4===a.readyState)if(""!==o&&(n.sendVisitTimeout-=1e3),n.removeAjax(a),i.a.grWaitTime=Date.now()+10,200===a.status)o&&""!==o&&n.user.updateSessionIdSendStatus(o,!0);else try{n.xhrData=JSON.parse(e).concat(n.xhrData)}catch(e){i.c.log(e)}},a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),"undefined"==typeof ArrayBuffer||null===ArrayBuffer||this.isbuffer?a.send(e):a.send(e.buffer),void this.XMLHttpRequestArray.push(a)}if(void 0!==i.a.XDomainRequest&&!this.isBot&&"gif"!==t){var s=new i.a.XDomainRequest;return r="http:"===document.location.protocol?r.replace("https://","http://"):r,s.open("POST",r+"?stm="+Date.now()),s.onload=function(){n.removeXDR(s,o),n.xhrData.splice(0,10),""!==o&&n.user.updateSessionIdSendStatus(!0,o)},s.onerror=function(){n.removeXDR(s,o)},s.onprogress=function(){},s.ontimeout=function(){},s.send(e),void this.XDomainRequestArray.push(s)}r="http:"===document.location.protocol?r.replace("https://","http://"):r;var u="";if("gif"===t)try{var c=JSON.parse(e);for(var l in c)"object"===ie(c[l])&&(c[l]=JSON.stringify(c[l])),u+="&"+encodeURIComponent(l)+"="+encodeURIComponent(c[l]);u=r+(u=u.replace("&","?"))+"&stm="+ +Date.now()}catch(e){i.c.log(e)}else u=r+"?data="+e+"&stm="+ +Date.now();u.length<=2036&&this.imgSend(u,o)}},{key:"removeAjax",value:function(e){var t=this.XMLHttpRequestArray.indexOf(e);-1!==t&&this.XMLHttpRequestArray.splice(t,1)}},{key:"removeXDR",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.XDomainRequestArray.indexOf(e);-1!==n&&this.XDomainRequestArray.splice(n,1),i.a.grWaitTime=Date.now()+10,""!==t&&(this.sendVisitTimeout-=300)}},{key:"imgSend",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=document.createElement("img");i.width=1,i.height=1,i.onload=function(){e.imgSendClear(i,n),""!==n&&e.user.updateSessionIdSendStatus(!0,n)},i.onerror=i.onabort=function(){e.imgSendClear(i,n)},i.src=t,this.XDomainRequestArray.push(i)}},{key:"imgSendClear",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e.onload=null,e.onerror=null,e.onabort=null,this.removeXDR(e,t)}}]),e}(),ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var ue=function(){function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sender=t,this.gruser=n,this.launcher=i,this.properties={},this.messages=[],this.defaultOptions={sendVisit:!0,addPreProps:!1,useNewTime:!0,gioId:!1}}return se(e,[{key:"replaceProps",value:function(e){e&&(this.properties=e)}},{key:"reduceProps",value:function(e){if(e){var t=[];for(var n in e)this.properties[n]=e[n],t.push(e[n]);return t}}},{key:"sendPV",value:function(e,t){var n,i=this;if(t||(t=function(){return{}}),this.sender.sendVisitTimeout&&this.sender.sendVisitTimeout>0)setTimeout(function(){return i.sendPV(e,t)},this.sender.sendVisitTimeout);else{if(this.messages=[],this.options=this.defaultOptions,e)for(var o in e)this.options[o]=e[o];if(this.options.addPreProps||this.options.gioId)for(var r in this.preProperties)(n=this.properties)[r]||(n[r]=this.preProperties[r]);this.options.useNewTime&&(this.pageLoaded=Date.now()),this.pageLoaded&&(this.pageLoaded=Date.now()),(this.options.gioId||this.options.sendVisit&&this.gruser.isSendNewVisit())&&this.messages.push(this._buildVisitMessage()),this.options.gioId||this.messages.push(this._buildPageMessage());var a=window.name,s=void 0;if(""!==a)try{var u=JSON.parse(a);s=u.bigdata,delete u.bigdata;var c=JSON.stringify(u);window.name="{}"===c?"":c}catch(e){if(-1!==a.indexOf("#########globalegrow-bigdata##########")){var l=a.split("#########globalegrow-bigdata##########"),d=l.splice(1,1);if(window.name=l.join("#########globalegrow-bigdata##########"),d.length>0)try{d=d[0],s=JSON.parse(d)}catch(e){}}}s&&"object"===(void 0===s?"undefined":ae(s))&&this.messages.push(s);var h=GlobalegrowLocalStore._readFromLocalStorage("globalegrow_bigdata");h&&(this.messages.push(JSON.parse(h)),GlobalegrowLocalStore.removeInLocalStorage("globalegrow_bigdata")),this.sender.send(this.messages,"pv"),this.preProperties=this.properties,this.properties={},this.options.gioId&&(this.options.gioId=!1),t(this)}}},{key:"setPageGroup",value:function(e,t){var n=this;if(!e)return!1;this.reduceProps({pg:e}),this.pageLoaded&&Date.now()-this.pageLoaded<4e3&&this.launcher.started&&setTimeout(function(){n.sendPV({sendVisit:!1,addPreProps:!0,useNewTime:!1},t)})}},{key:"setDeferSendWithPage",value:function(e,t,n){if(t)return!1;e&&(this.reduceProps(e),t(this)&&this.sendPV({addPreProps:!0,useNewTime:!1},n))}},{key:"_buildPageMessage",value:function(){var e,t,n,i=N(),o={et:"page",ak:window.gds.accountId,av:window.gds.version,dt:I()||"pc",vid:this.gruser.vid(),sid:this.gruser.sid(),oi:T(),uid:C(),cid:O()||this.gruser.vid(),guid:this.gruser.uid(),sh:window.screen.height,sw:window.screen.width,ti:document.title.slice(0,255),tm:this.pageLoaded,lp:i.lp||"",rp:i.rp||"",wt:(e=(new Date).getTime(),t=P("wt")||e,n=(new Date).getTime()-t,j("wt",e),n||0),ptm:0,pt:window.location.protocol.substring(0,window.location.protocol.length-1),d:window.location.host||window.gds.accountId,p:h(),l:null!=navigator.language?navigator.language.toLowerCase():void 0,rf:_(),dc:x(),cc:x("dc")},r=S();if(o.q=r.length>0?r:"",o.e=[{x:"",v:"",h:"",idx:0,attr:[]}],o.appId=window.gds.appId,this.properties)for(var a in this.properties)o[a]=this.properties[a];return o}},{key:"_buildVisitMessage",value:function(){var e=N(),t={et:"visit",ak:window.gds.accountId,av:window.gds.version,sh:window.screen.height,sw:window.screen.width,dt:I()||"pc",vid:this.gruser.vid(),sid:this.gruser.sid(),guid:this.gruser.uid(),oi:T(),uid:C(),cid:O()||this.gruser.vid(),lp:e.lp||"",rp:e.rp||"",wt:0,tm:Date.now(),ptm:0,d:window.location.host||window.gds.accountId,p:h(),rf:_(),l:null!=navigator.language?navigator.language.toLowerCase():void 0,pt:window.location.protocol.substring(0,window.location.protocol.length-1),isfirst:"Y",dc:x(),cc:x("dc")},n=S();return t.q=n.length>0?n:"",t.e=[{x:"",v:"",h:"",idx:0,attr:[]}],t.appId=window.gds.appId,t}},{key:"sendPVOnSidChanged",value:function(){var e=this.gruser.currentSessionId()[0];this.gruser.lastSessionId!==e&&(e||(e=this.gruser.guid(),this.gruser.resetUserId()),this.gruser.updateSessionId(e,!1),this.sendPV({sendVisit:!0,useNewTime:!0}))}}]),e}(),ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var de="/static/glsdk_plugins.js?v=1.2.13",he=["view-model","heatmap-model","metrics-model","vtrack-model","vtrack-view-model","vtrack-close-model","vtrack-pick-model"],fe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.allowOrigin=window.gds.origin,this.bindEvents(),this.glsdkPluginsLoaded=!1,this.loadGlsdkPlugins()}return le(e,[{key:"bindEvents",value:function(){var e=this;d(window,"message",function(t){var n=t.data,i=n.model;if(n.ai===window.gds.accountId&&e.isSdkEvent(i))switch(i){case"view-model":e.drawHeatmap("stop"),e.initMetrics("stop");break;case"heatmap-model":e.drawHeatmap("start",n);break;case"metrics-model":e.initMetrics("start",n);break;case"vtrack-model":e.initVtrack("start",n);break;case"vtrack-view-model":e.initVtrack("stop");break;case"vtrack-close-model":e.removeSelectedEle();break;case"vtrack-pick-model":e.initPickRule()}}),d(window,"beforeunload",function(t){var n;e.canPostRegisterMessage()&&(n={circleMode:"page-unload",url:i.a.location.toString(),ak:i.a.gds.accountId,sna:i.a.grSource.name,sid:i.a.grSource.id,dc:x(),cc:x("dc"),tna:"",fsna:"sdk",tArr:[i.a.grSource.id]},i.a.parent.postMessage(n,"*"))})}},{key:"isSdkEvent",value:function(e){return-1!==b(he,e)}},{key:"loadGlsdkPlugins",value:function(){this.glsdkPluginsLoaded=!1;for(var e=document.getElementsByTagName("script"),t=0;t<e.length;t++){var n=e[t].getAttribute("src");if(null!=n&&-1!==n.indexOf(de)){this.glsdkPluginsLoaded=!0;break}}if(!this.glsdkPluginsLoaded){var i=document.createElement("script");i.type="text/javascript",i.charset="UTF-8",i.src=this.allowOrigin+de,document.head.appendChild(i)}}},{key:"drawHeatmap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.glsdkPluginsLoaded||this.loadGlsdkPlugins(),this.glsdkPluginsLoaded&&"object"===ce(i.a.glsdkmap)&&null!==i.a.glsdkmap)try{if(i.a.glsdkmap.destroyHeatmap(),"start"===e)t.data.forEach(function(e){i.a.glsdkmap.parseNode(e)}),i.a.glsdkmap.loadHeatmap()}catch(e){console.log(e)}}},{key:"canPostRegisterMessage",value:function(){return i.a.parent&&"function"==typeof i.a.parent.postMessage&&i.a.self!==i.a.top&&i.a.self!==i.a.parent}},{key:"initVtrack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.glsdkPluginsLoaded||this.loadGlsdkPlugins(),this.glsdkPluginsLoaded&&"object"===ce(i.a.glsdkvtrack)&&null!==i.a.glsdkvtrack&&(i.a.glsdkvtrack.destroyVtrak(),"start"===e))try{var n=t.data;i.a.glsdkvtrack.initVtrack(n)}catch(e){console.log(e)}}},{key:"removeSelectedEle",value:function(){i.a.glsdkvtrack.removeCoveredEle()}},{key:"initPickRule",value:function(){i.a.glsdkvtrack.initPickRuleMode()}},{key:"initMetrics",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.glsdkPluginsLoaded||this.loadGlsdkPlugins(),this.glsdkPluginsLoaded&&"object"===ce(i.a.glsdkmetrics)&&null!==i.a.glsdkmetrics)try{i.a.glsdkmetrics.destroyMetrics(),"start"===e&&i.a.glsdkmetrics.initMetrics(t.data)}catch(e){console.log(e)}}}]),e}(),pe=("https:"===document.location.protocol?"https://":"http://")+"dap.logsss.com/heatmap/subcribe",ge="www.gearbest.com",ve="/",me="https://uidesign.gbtcdn.com/GB/image/promotion/20181206_6427/680x312a.jpg?imbypass=true";function ye(){}function be(){}var ke=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var we=[".js_lazyimg",".js_gbexp_lazy",".js_lazy",".js_lazySliderImg",".js_gdexp_lazy",".js-lazyload",".js-buyerShowImgLazyLoad",".js_load_ingimg"];var _e=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=[],this.timer=null,this.sender=t}return ke(e,[{key:"add",value:function(e){this.options.push(e)}},{key:"cleanAll",value:function(){this.options=[]}},{key:"start",value:function(){var e=this;this.timer=setTimeout(function(){var t=[];if(e.options.length>0){e.options.forEach(function(e){t=t.concat(e.e)});var n=e.options.length;e.options[n-1].e=t,e.sender.send([e.options[n-1]]),e.cleanAll()}e.start()},500)}},{key:"executeImmediately",value:function(){this.sender.send(this.options),this.stop()}},{key:"stop",value:function(){this.timer=null,this.options=[]}}]),e}(),Se=n(3),Ie=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var xe=["zaful","rosegal","dresslily","gearbest","rosewholesale"],Oe=["TEXTAREA","HTML","BODY"],Te=["button","submit"],Ce=["A","BUTTON","INPUT","IMG"],Ee=["I","SPAN","EM","SVG","FONT"],Pe=["radio","checkbox"],je=["A","BUTTON"],Ne=null,De=[],Ae=3,Le=null,Me={},Re=0,Ve=!1,Ge={tspan:1,text:1,g:1,rect:1,path:1,defs:1,clipPath:1,desc:1,title:1},Be=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sender=t,this.gruser=n,this.launcher=i,this.TreeMirror=o,this.content={},this.messagingObserver=null,this.pageService=new ue(this.sender,this.gruser,this.launcher),this.imgExposure=new _e(this.sender),this.timer=null,this.currentData=null}return Ie(e,[{key:"sendPageCallback",value:function(){var e=this;return function(t){e.pageLoaded=t.pageLoaded,e.prevPageAttrs=m({},t.preProperties),e.lastActionTime=Date.now()}}},{key:"setPageGroup",value:function(e){var t=this;return this.pageService.setPageGroup(e,function(n){t.sendPageCallback()(n),t.messagingObserver&&t.messagingObserver.sendPageCallback({pg:e})})}},{key:"setDeferSendWithPage",value:function(e,t){t&&this.pageService.setDeferSendWithPage(e,t,this.sendPageCallback())}},{key:"setPSForActionMessage",value:function(e){this.prevPageAttrs.pg&&(e.pg=this.prevPageAttrs.pg)}},{key:"registerDomObserver",value:function(){var e=this;if(i.a.gds.imp){Ne&&Ne.disconnect();var t={initialize:function(t){var n=[],o={u:e.gruser.vid(),s:e.gruser.sid(),t:"imp",tm:Date.now(),ptm:e.pageLoaded,d:i.a.location.host||i.a.gds.accountId,p:e.currentPath};e.currentQuery.length>0&&(o.q=e.currentQuery);var r=e.gruser.getCs1();r&&(o.cs1=r),e.setPSForActionMessage(o),t.forEach(function(i){"use"!==i.tagName&&(n=n.concat(e.getLeafNodes(i,t.length)))}),o.e=n,e.sender.send([o])},applyChanged:function(t){var n,o,r=[];t.length>0&&!document.body.className.match(/\bgds-entrytext\b/)&&(e.gruser.hasSid()||e.pageService.sendPV({sendVisit:!1,addPreProps:!0,useNewTime:!1},e.sendPageCallback()),o={u:e.gruser.vid(),s:e.gruser.sid(),t:Ne.snapshoting?"snap":"imp",tm:Date.now(),ptm:e.pageLoaded,d:i.a.location.host||i.a.gds.accountId,p:e.currentPath},(n=e.gruser.getCs1())&&(o.cs1=n),e.currentQuery.length>0&&(o.q=e.currentQuery),e.setPSForActionMessage(o),t.forEach(function(n){"use"!==n.tagName&&(r=r.concat(e.getLeafNodes(n,t.length)))}),o.e=r,r.length>0&&e.sendPolicy(o))}};this.TreeMirror&&(this.client=Ne=new this.TreeMirror.client(document.body,t))}}},{key:"sendPolicy",value:function(e){var t=this;De.push(e),Ae<0?this.sendQueue():(this.queueTimeout&&clearTimeout(this.queueTimeout),this.queueTimeout=setTimeout(function(){t.sendQueue()},3e3),this.checkingBlance())}},{key:"deregisterDomObserver",value:function(){Ne&&Ne.disconnect()}},{key:"idle",value:function(){if(this.lastSentTime=this.lastSentTime||Date.now(),this.lastSentTime)return(Date.now()-this.lastSentTime)/De.length>300}},{key:"checkingBlance",value:function(){return this.idle()?Ae--:void 0}},{key:"sendQueue",value:function(){De.length>0&&Date.now()-this.lastActionTime<12e4&&this.sender.send(De),this.queueTimeout=null,this.lastSentTime=Date.now(),De=[],Ae=3}},{key:"getLeafNodes",value:function(e,t){var n,i,o=this,r=[],a=!0;if(e.leaf&&1===e.nodeType){null==((i=e.attributes)?i.href:void 0)&&null==e.text&&null==e.obj||(n=this.nodeMessage(e,!0),t>1&&(n.idx=e.idx),r.push(n))}else{if(0===e.childNodes.length&&-1!==b(Ce,e.tagName))return!1;var s=e.childNodes;Array.prototype.forEach.call(s,function(e,t,n){e.leaf||(a=!1),"use"!==e.tagName&&(r=r.concat(o.getLeafNodes(e,n.childNodes.length)))});var u=(i=e.attributes)?i.any:void 0;if(-1!==b(je,e.tagName)||a&&(u||e.text)){if(!e.text){var c=e.dom;e.text=c?this.info.containerElemContent(c):k(e)}n=this.nodeMessage(e,!0),r.push(n)}"SPAN"===e.tagName&&(s=e.childNodes,Array.prototype.forEach.call(s,function(t,i,a){if("svg"===t.tagName){var s=t.childNodes;Array.prototype.forEach.call(s,function(t){1===t.nodeType&&"use"===t.tagName&&w(t,"xlink:href")&&(n=o.nodeMessage(e,!0),r.push(n))})}}))}return r}},{key:"nodeMessage",value:function(e){var t={x:e.path,v:e.text};"A"===e.tagName&&e.text&&0===e.text.length&&(t.v=void 0),e.text&&e.text.length>50&&(t.v="A"===e.tagName?e.text.slice(0,50):void 0),e.attributes&&e.attributes.href&&0!==e.attributes.href.indexOf("javascript")&&(t.h=e.attributes.href.slice(0,320),delete e.attributes.href),e.idx&&(t.idx=e.idx),e.obj&&(t.obj=e.obj),this.appendMessageAttrs(Ne,t,e)}},{key:"appendEventAttrs",value:function(){throw new Error("这是一个接口方法")}},{key:"appendMessageAttrs",value:function(){throw new Error("这是一个接口方法")}},{key:"registerEventListener",value:function(){var e={click:"click",change:"change",submit:"submit",snapshot:"snapshot",load:"exposure"},t=this,n=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!0):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},o=function(e){e.which>1||Le===Date.now()||(Le=Date.now(),Me={time:Le,target:e.target||e.srcElement,x:s("x",e),y:s("y",e)},Re=setTimeout(function(){e={target:Me.target,type:"click"},u(e)},600))},r=function(e){var t=Math.abs(s("x",e)-Me.x),n=Math.abs(s("y",e)-Me.y);(t>10||n)&&clearTimeout(Re)},a=function(e){Date.now()-Me.time<1e3&&clearTimeout(Re)},s=function(e,t){return(Ve?t.touches[0]:t)["page"+e.toUpperCase()]},u=function(n){var o,r;if(!document.body.className.match(/\bgds-entrytext\b/)){for(t.lastActionTime=Date.now(),o=n.target||n.srcElement;o&&Ge[o.tagName]&&o.parentNode;)o=o.parentNode;if((r=t.info.path(o,!0)).isIgnore)return!1;i.a.gds.impCtrlDua&&(i.a.grImpCtrl=Date.now());var a=o.tagName;if("click"===n.type){if(-1!==b(Oe,a))return;if("INPUT"===a&&-1!==b(Te,o.type))return;if(-1===b(Ce,a)&&!t.info.depthInside(o,4))return}t.gruser.hasSid()?"click"===n.type&&t.pageService.sendPVOnSidChanged():t.pageService.sendPV({sendVisit:!0,addPreProps:!0,useNewTime:!0},t.sendPageCallback());var s=N(),u={};u.et=e[n.type],u.vid=t.gruser.vid(),u.sid=t.gruser.sid(),u.oi=T(),u.uid=C(),u.cid=O()||t.gruser.vid(),u.guid=t.gruser.uid(),u.tm=Date.now(),u.dt=I()||"pc",u.ak=window.gds.accountId,u.av=window.gds.version,u.sh=window.screen.height,u.ti=document.title.slice(0,255),u.sw=window.screen.width,u.lp=s.lp||"",u.rp=s.rp||"",u.wt=0,u.ptm=t.pageLoaded,u.d=i.a.location.host||i.a.gds.accountId,u.p=t.currentPath,u.l=null!=i.f.language?i.f.language.toLowerCase():void 0,u.q=t.currentQuery.length>0?t.currentQuery:"",u.pt=window.location.protocol.substring(0,window.location.protocol.length-1),u.rf=_(),u.dc=x(),u.cc=x("dc"),t.setPSForActionMessage(u);var c="snapshot"===n.type,l="load"===n.type;c&&(n.type="click");var d=t.compute(n.type,o);if(t.appendElemAttrs(d,c,o,r),d.x=r.xpath,r.obj&&(d.obj=r.obj),d.idx=0,r.idx?d.idx=r.idx:-1===d.x.indexOf("dl")&&-1===d.x.indexOf("tr")&&-1===d.x.indexOf("li")||(d.idx=t.info.index(o)),0===r.containerMessage.length||l?u.e=[d]:-1!==b(je,r.pnode.tagName)&&t.info.onlyContainsChildren(r.pnode,Ee)?u.e=r.containerMessage:u.e=[d].concat(r.containerMessage),u.e&&u.e.length>0)for(var h=u.e,f=0;f<h.length;f++)h[f].idx||(h[f].idx=0);if(l){var p=n.target.attributes,v=[];for(var m in p){var y=p[m].name;/^data-logsss-/.test(y)&&v.push(n.target.getAttribute(y))}u.e[0].attr=v,Object(Se.a)(u,n),t.imgExposure.add(u)}else Object(Se.a)(u,n),c?t.snapshotCallback(n,u):(t.currentData=u,t.timer=setTimeout(function(){t.currentData=null,t.sender.send([u])},5));!function(e,t){if("click"===t.type&&e.d===ge&&e.p===ve&&t.target.src&&t.target.src===me){var n={name:"Double-Twelve"};n.domain=e.d,n.page=e.vid,g(pe,ye,be,"POST",n)}}(u,n)}};for(var c in e)"load"!==c&&n(document,c,u);n(document,"scroll",function(e){i.a.gds.impCtrlDua&&(i.a.grImpCtrl=Date.now())}),i.a.gds.touch&&function(){var e,t,s,u=i.f.userAgent,c=/chrome/i.exec(u),l=/android/i.exec(u);(Ve="ontouchstart"in i.a&&c&&!l)?(e=["touchstart"],t=["touchmove"],s=["touchend","touchcancel"]):(e=["mousedown"],t=["mousemove"],s=["mouseup","mouseleave"]),e.forEach(function(e){n(document,e,o)}),t.forEach(function(e){n(document,e,r)});var d=[];s.forEach(function(e){d.push(n(document,e,a))})}(),i.a.gds.exposure&&(!function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.querySelectorAll(we.join(","));if(n.length>0)for(var i=function(i){var o=n[i];document.addEventListener?o.addEventListener("load",e,t):document.attachEvent&&o.attachEvent("onload",function(){var t=window.event;t.currentTarget=o,t.target=t.srcElement,e.call(o,t)})},o=0;o<n.length;o++)i(o)}(u),this.imgExposure.start())}},{key:"snapshotCallback",value:function(){throw new Error("这是一个接口方法")}},{key:"exposureCallback",value:function(e,t){throw new Error("这是一个接口方法")}},{key:"appendElemAttrs",value:function(){throw new Error("这是一个接口方法")}},{key:"checkJumpByATage",value:function(e){var t=!0;if(e.e||e.e.length>0){var n=e.e,i=/^a(\.|#|$)/,o=n[0].x.split("/");n.forEach(function(e){var n=o[o.length-1];if(i.test(n)&&e.h&&(-1!==e.h.indexOf("http://")||-1!==e.h.indexOf("https://"))){var r=e.h.match(/^http(s)?:\/\/.*?(\.(com|net|cn|org))/);r=r?r[0]:"";for(var a=!1,s=0;s<xe.length;s++)if(new RegExp(xe[s]).test(r)){a=!0;break}t=a}})}return t}},{key:"compute",value:function(e,t){var n=this,i={h:"",v:"",attr:[]},o=t.tagName;if("IMG"===o)t.src&&t.src.length>0&&-1===t.src.indexOf("data:image")&&(i.h=t.src);else if(w(t,"href")){var r=t.getAttribute("href");r&&0!==r.indexOf("javascript")&&(i.h=r.slice(0,320))}if(w(t,"data-chook-title")&&t.getAttribute("data-chook-title").length>0?i.v=t.getAttribute("data-chook-title"):w(t,"title")&&t.getAttribute("title").length>0&&(i.v=t.getAttribute("title")),"click"===e)if(this.info.isLeaf(t))switch(o){case"IMG":if(t.alt&&!i.v){i.v=t.alt;break}if(i.h){var a=i.h.split("?")[0].split("/");a.length>0&&(i.v=a[a.length-1]);break}case"INPUT":-1!==b(Te,t.type)&&(i.v=t.value);break;case"svg":var s=t.childNodes;Array.prototype.forEach.call(s,function(e){1===e.nodeType&&"use"===e.tagName&&w(e,"xlink:href")&&(i.v=e.getAttribute("xlink:href"))});break;default:var u="";t.textContent?u=t.textContent.replace(/[\n \t]+/g," ").trim():t.innerText&&(u=t.innerText.replace(/[\n \t]+/g," ").trim()),u.length>0&&(u.length<50?i.v=u:"A"===o&&(i.v=u.slice(0,50)))}else if(-1!==b(je,o)){var c=this.info.containerElemContent(t);if(this.info.isParentOfLeaf(t)&&!this.info.onlyContainsChildren(t,Ee)){var l=k(t);l===c?i.v=c:(i.v=l||c,i.obj=c||"")}else i.v=c}else this.info.isParentOfLeaf(t)&&(i.v=k(t));else if("change"===e){var d;if("TEXTAREA"!==o)if("INPUT"===o)if(-1!==b(Pe,t.type)){i.v=t.value;var h=t.parentNode;if("LABEL"===h.tagName)d=h;else{if("BODY"!==h.tagName)if("LABEL"===(h=h.parentNode).tagName)d=h;else if(t.id){var f=h.getElementsByTagName("label");Array.prototype.forEach.call(f,function(e){d=e})}if(null!=d){var p=this.info.containerElemContent(d);p&&p.length>0&&(i.v=p+" ("+t.checked+")")}}}else"password"!==t.type&&(i.v=t.value);else"SELECT"===o&&(i.v=t.value,1===t.selectedOptions.length&&t.selectedOptions[0]&&(i.v=t.selectedOptions[0].label))}else if("submit"===e){var g=t.getElementsByTagName("input");Array.prototype.forEach.call(g,function(e){("search"===e.type||"text"===e.type&&("q"===e.id||-1!==e.id.indexOf("search")||-1!==e.className.indexOf("search")&&"q"===e.name||-1!==e.name.indexOf("search")))&&(i.x=n.info.path(e),i.v=e.value.trim())})}return i}},{key:"bindEvent",value:function(){var e=this,t={};return this.canPostRegisterMessage()&&(t={circleMode:"page-load",url:i.a.location.toString(),ak:i.a.gds.accountId,sna:i.a.grSource.name,sid:i.a.grSource.id,dc:x(),cc:x("dc"),tna:"",fsna:"sdk",tArr:[i.a.grSource.id]},a.getItem("gb_pipeline")&&(t=Object.assign({},t,{pipeline:a.getItem("gb_pipeline")})),i.a.parent.postMessage(t,"*")),d(i.a,"message",function(t){try{var n=t.data,o=n.model||n.circleMode;if(i.a.self===i.a.top||n.ai!==i.a.gds.accountId)return!1;switch(o){case"gbdata-register-SDK-heatmap":case"gbdata-register-SDK-vtrack":e.registerGlsdkHandler()}}catch(e){console.log(e)}})}},{key:"registerGlsdkHandler",value:function(){if(!this.messagingObserver)try{this.messagingObserver=new fe}catch(e){console.log(e)}}},{key:"canPostRegisterMessage",value:function(){return i.a.parent&&"function"==typeof i.a.parent.postMessage&&i.a.self!==i.a.top&&i.a.self!==i.a.parent}},{key:"observe",value:function(){var e=this;if(this.currentPath=h(),this.currentQuery=S(),this.pageService.sendPV({},this.sendPageCallback()),this.bindEvent(),document.addEventListener)"interactive"===document.readyState||"complete"===document.readyState?this.domLoadedHandler():d(document,"DOMContentLoaded",function(){e.domLoadedHandler()});else if(document.attachEvent){d(document,"onreadystatechange",function(){e.domLoadedHandler()});var t=!1;try{t=null===i.a.frameElement}catch(e){console.log(e)}if(document.documentElement.doScroll&&t){!function t(){try{document.documentElement.doScroll("left")}catch(e){setTimeout(t,1)}return e.domLoadedHandler()}()}}d(i.a,"load",function(){e.queueTimeout&&e.sendQueue()}),d(i.a,"beforeunload",function(t){if(clearTimeout(e.timer),e.currentData){var n=void 0;if(console.log(e.checkJumpByATage(e.currentData)),e.checkJumpByATage(e.currentData)){var i=window.name||"{}";try{(n=JSON.parse(i)).bigdata=e.currentData,window.name=JSON.stringify(n)}catch(t){window.name+="#########globalegrow-bigdata##########"+JSON.stringify(e.currentData)}}else GlobalegrowLocalStore._setInLocalStorage("globalegrow_bigdata",JSON.stringify(e.currentData),2592e6)}e.queueTimeout&&e.sendQueue()}),d(i.a,"unload",function(){})}},{key:"domLoadedHandler",value:function(){var e=this;this.domLoadedHandler.done||(this.domLoadedHandler.done=!0,this.registerEventListener(),null!=this.TreeMirror&&i.a.gds.imp&&(this.initServerImpSetting(),i.a.gds.impCtrlDua&&(i.a.grImpCtrl=Date.now()),setTimeout(function(){e.registerDomObserver()},1500)))}}]),e}(),qe=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var He=function(e){function t(e,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,i,o));return r.info=ne,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Be),qe(t,[{key:"snapshotCallback",value:function(){}},{key:"appendMessageAttrs",value:function(e,t){return t}},{key:"initServerImpSetting",value:function(){}},{key:"appendElemAttrs",value:function(e){return e}}]),t}(),Ue=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var Je=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.user=ne.user(),e.sender=new re(e.user,e.callback()),e.observer=new He(e.sender,e.user,e,null),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,H),Ue(t,[{key:"afterInitialize",value:function(){}},{key:"defaultSamplingFunc",value:function(){var e=this.user.vid(),t=i.a.gds.sampling_ratio;return 0===parseInt(e.slice(-2),16)%t}},{key:"beforeConnect",value:function(){this.sender.setUrlMap(this.options)}}]),t}();!function(){var e=arguments,t=i.a.globalegrowbigdatasdk2018;if(i.a._gr_support_circle_pop_out=!0,!i.a._disable_js_gds&&("boolean"!=typeof i.a.webViewRequestSend||i.a.webViewRequestSend||!i.a._gds_ios||i.a._gds_bridge)){if(i.a.globalegrowSdkInstalled)return i.c.log("globalegrowSdkInstalled:","重复加载global SDK"),!1;var n=new Je;i.a.globalegrowSdkInstalled=!0;var o=i.a[t];(o&&o.q?o.q:[]).forEach(function(e){n.apply.apply(n,e)});var r=function(){var e=arguments.length>=1?i.h.call(arguments,0):[];return n.apply.apply(n,e),e};r.push=function(){return e.length>1?n.apply.apply(n,e):n.apply.apply(n,e[0])},r.track=function(){var e=r.system;return e.track.apply(e,arguments)},r.platform="web",i.a.globalegrowArray=i.a.globalegrowArray||[],i.a.globalegrowArray.push(r),i.a[t]=function(){for(var e=i.a.globalegrowArray,t=[],n=0;n<e.length;n++){var o,r=arguments[0];"init"===r||"send"===r?"web"===e[n].platform&&(o=e[n].apply(null,arguments)):o=e[n].apply(null,arguments),t.push(o)}return i.c.log("array:",t),t},i.a._gds={push:function(){for(var e=[],t=i.a.globalegrowArray,n=0;n<t.length;n++){var o=t[n].push.apply(t[n],arguments);e.push(o)}return e},track:function(){for(var e=[],t=i.a.globalegrowArray,n=0;n<t.length;n++){var o=t[n].track.apply(t[n],arguments);e.push(o)}return e}}}}()},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(module,__webpack_exports__,__webpack_require__){"use strict";function visualInfo(e,t){if(window.gds&&window.gds.visual_track_config&&window.gds.visual_track_config.domain===("https"===e.pt?"https://":"http://")+e.d&&window.gds.visual_track_config.page===e.p&&window.gds.visual_track_config.data&&window.gds.visual_track_config.data.length>0)for(var n=window.gds.elementThreshold||50,i=window.gds.visual_track_config.data||[],o=t.target,r=0;r<i.length;r++){var a=i[r];if(a.xpath&&""!==a.xpath&&e.et===a.eventName)for(var s=document.querySelectorAll(a.xpath),u=0;u<s.length;u++)if(u<=n&&o===s[u]){setOptions(a.ruleProList,e.e[0]);break}}}function setOptions(e,t){for(var n={},i=0;i<e.length;i++){var o=e[i];switch(o.ruleType){case 1:n[o.shortName]=getElementAttr(o.pickRule);break;case 2:n[o.shortName]=getGlobalVar(o.pickRule);break;default:n[o.shortName]=""}}t.attr=n}function getGlobalVar(rule){var value=null;try{value=eval(rule)}catch(e){value=""}return value}function getElementAttr(e){var t="";if("string"!=typeof e)return t;if(""!==e)try{var n=document.querySelector(e);t=null===n?"":"string"==typeof n.textContent?n.textContent:n.innerText,n&&""==t&&(t=n.value?n.value:"")}catch(e){}return t}__webpack_exports__.a=visualInfo}]);