From acdf515306d4014d2036ad6a8ea42880d1404c2c Mon Sep 17 00:00:00 2001 From: shengyonggen Date: Sun, 24 Apr 2022 18:56:44 +0800 Subject: [PATCH] Release 1.22.4 --- CHANGELOG.md | 6 + core/sensorsdata.amd.min.js | 10 +- core/sensorsdata.es6.min.js | 2 +- core/sensorsdata.min.js | 10 +- core/sensorsdata.mtp.min.js | 8 +- heatmap.min.js | 2 +- package.json | 2 +- plugins/aes-encryption.js | 9 + product/heatmap.full.js | 2 +- product/sensorsdata.amd.full.js | 576 +++++++++++++++++++------------- product/sensorsdata.es6.full.js | 576 +++++++++++++++++++------------- product/sensorsdata.full.js | 576 +++++++++++++++++++------------- product/sensorsdata.mtp.full.js | 312 ++++++++++------- sensorsdata.amd.min.js | 10 +- sensorsdata.es6.min.js | 2 +- sensorsdata.min.js | 10 +- version.js | 2 +- vtrack.min.js | 2 +- 18 files changed, 1266 insertions(+), 851 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54d10774..e3e914d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.22.4 (2022-04-24) +1. 修复 + - 修复 `Deeplink` 匹配不到参数的问题 + - 修复当 `localstorage` 被打满时报错的问题 + - 批量发送优化 + ## 1.22.3 (2022-04-15) 1. 新增 - `ID-Mapping 3.0` 新增 `loginwithkey` 接口,删除 `loginIDKey` 配置 diff --git a/core/sensorsdata.amd.min.js b/core/sensorsdata.amd.min.js index 1bac81f2..301007d9 100644 --- a/core/sensorsdata.amd.min.js +++ b/core/sensorsdata.amd.min.js @@ -1,5 +1,5 @@ -!function(e,t){"function"==typeof define&&"object"==typeof define.amd&&define.amd&&define(t)}(this,function(){function e(t){return"function"==typeof t||!(!t||"object"!=typeof t)&&e(t.listener)}function t(){this._events={}}function r(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function n(e){e=e||"";for(var t={},n=e.substring(1),i=n.split("&"),a=0;a Invalid URL");var r=e.split("#"),n=r[0],i=r.slice(1).join("#");t=this._regex.exec(n);for(var a in this._fields)"undefined"!=typeof t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new t(e)}function l(e){var t={},r=function(){var e;try{return e=new URL("http://modernizr.com/"),"http://modernizr.com/"===e.href}catch(t){return!1}};if("function"==typeof window.URL&&r())t=new URL(e),t.searchParams||(t.searchParams=function(){var e=n(t.search);return{get:function(t){return e[t]}}}());else{i(e)||(e=String(e)),e=a(e);var o=/^https?:\/\/.+/;if(o.test(e)===!1)return void ur.log("Invalid URL");var l=s(e);t.hash=l._values.Fragment,t.host=l._values.Host?l._values.Host+(l._values.Port?":"+l._values.Port:""):"",t.href=l._values.URL,t.password=l._values.Password,t.pathname=l._values.Path,t.port=l._values.Port,t.search=l._values.QueryString?"?"+l._values.QueryString:"",t.username=l._values.Username,t.hostname=l._values.Hostname,t.protocol=l._values.Protocol?l._values.Protocol+":":"",t.origin=l._values.Origin?l._values.Origin+(l._values.Port?":"+l._values.Port:""):"",t.searchParams=function(){var e=n("?"+l._values.QueryString);return{get:function(t){return e[t]}}}()}return t}function c(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function u(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),c(e)&&e.getRandomValues){var t=new Uint32Array(1),r=e.getRandomValues(t)[0],n=Math.pow(2,32);return r/n}}return pr(1e19)/1e19}function p(e){return!(!e||1!==e.nodeType)}function d(e){return void 0===e}function _(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function f(e){return Array.isArray&&_(f)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function g(e){return new _r(e)}function h(e,t,r,n){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation,e._getPath=i._getPath),e}function a(e,t,r,n){var a=function(a){if(a=a||i(window.event)){a.target=a.srcElement;var s,o,l=!0;return"function"==typeof r&&(s=r(a)),o=t.call(e,a),"beforeunload"!==n?(!1!==s&&!1!==o||(l=!1),l):void 0}};return a}i._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||g(e.target).getParents()},i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};var s=function(e,t,r){if(void 0===n&&"click"===t&&(n=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=i._getPath,r.call(this,e)},n);else{var s="on"+t,o=e[s];e[s]=a(e,r,o,t)}};s.apply(null,arguments)}function v(e){var t="pushState"in window.history?"popstate":"hashchange";h(window,t,e)}function y(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){ur.log(t)}}}function w(e,t,r){if(null==e)return!1;if(gr&&e.forEach===gr)e.forEach(t,r);else if(f(e))for(var n=0,i=e.length;n=200&&n.status<300||304==n.status?e.success(t(n.responseText)):e.error(t(n.responseText),n.status),n.onreadystatechange=null,n.onload=null)}catch(r){n.onreadystatechange=null,n.onload=null}},n.open(e.type,e.url,!0);try{e.credentials&&(n.withCredentials=!0),c(e.header)&&w(e.header,function(e,t){n.setRequestHeader&&n.setRequestHeader(t,e)}),e.data&&(e.cors||n.setRequestHeader&&n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?n.setRequestHeader&&n.setRequestHeader("Content-type","application/json; charset=UTF-8"):n.setRequestHeader&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(o){ur.log(o)}n.send(e.data||null)}function k(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(w(e,function(e,n,i){r.push(t(e,n,i))}),r)}function P(e){var t=[];try{t=k(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function N(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function $(e,t){t=t||window;var r=!1,n=!0,i=t.document,a=i.documentElement,s=i.addEventListener,o=s?"addEventListener":"attachEvent",l=s?"removeEventListener":"detachEvent",c=s?"":"on",u=function(n){"readystatechange"==n.type&&"complete"!=i.readyState||(("load"==n.type?t:i)[l](c+n.type,u,!1),!r&&(r=!0)&&e.call(t,n.type||n))},p=function(){try{a.doScroll("left")}catch(e){return void setTimeout(p,50)}u("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!s&&a.doScroll){try{n=!t.frameElement}catch(d){ur.log(d)}n&&p()}i[o](c+"DOMContentLoaded",u,!1),i[o](c+"readystatechange",u,!1),t[o](c+"load",u,!1)}}function j(e){return w(Array.prototype.slice.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])}),e}function C(e){var t=e;try{t=decodeURI(e)}catch(r){t=e}return t}function A(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",r=t.length-1,n={},i=0;for(i=0;i=2&&!/^(\d+\.)+\d+$/.test(n))for(var a="."+i.splice(i.length-1,1);i.length>0;)if(a="."+i.splice(i.length-1,1)+a,document.cookie=t+"=true; path=/; domain="+a,document.cookie.indexOf(t+"=true")!==-1){var s=new Date;return s.setTime(s.getTime()-1e3),document.cookie=t+"=true; expires="+s.toGMTString()+"; path=/; SameSite=Lax; domain="+a,a}return""}function U(e){function t(e,t){e=a(e);var r;if("body"===e)return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var n=e.split(":nth-of-type");if(!n[0]||!n[1])return null;var i=n[0],s=n[1].match(/\(([0-9]+)\)/);if(!s||!s[1])return null;var o=Number(s[1]);if(!(p(t)&&t.children&&t.children.length>0))return null;for(var l=t.children,c=0;c0)return null}return r?r:null}function r(e){var i,a=n.shift();if(!a)return e;try{i=t(a,e)}catch(s){ur.log(s)}return i&&p(i)?r(i):null}if(!i(e))return null;var n=e.split(">"),s=null;return s=r(),s&&p(s)?s:null}function H(e,t){var r="",n="";return e.textContent?r=a(e.textContent):e.innerText&&(r=a(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),n=r||"","input"!==t&&"INPUT"!==t||(n=e.value||""),n}function J(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=l(e).hostname}catch(n){ur.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function B(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function R(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=r(e);var n="[\\?&]"+t+"=([^&#]*)",i=new RegExp(n),a=i.exec(e);return null===a||a&&"string"!=typeof a[1]&&a[1].length?"":r(a[1])}function M(e){var t={},r=e.split("?"),i=r[1]||"";return i&&(t=n("?"+i)),t}function q(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function K(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(q()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function V(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function F(e){return i(e)?(e=a(e),C(e)):C(location.href)}function z(e){return i(e)?(e=a(e),C(e)):C(location.pathname)}function W(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function X(e,t){if("string"==typeof t)return W(e,t);if(f(t)){for(var r=!1,n=0;n0)for(var a=e.split(""),s=0;st)for(i=r+i;l=n*i+o,lt;)i=i/2+o;i=n*i+o}return i}function G(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var n=0;n41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function le(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function ce(e){if(!c(e)||!i(e.callbackName))return ur.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;e.success=_(e.success)?e.success:function(){},e.error=_(e.error)?e.error:function(){},e.data=e.data||"";var t=document.createElement("script"),r=document.getElementsByTagName("head")[0],n=null,a=!1;if(r.appendChild(t),se(e.timeout)&&(n=setTimeout(function(){return!a&&(e.error("timeout"),window[e.callbackName]=function(){ur.log("call jsonp error")},n=null,r.removeChild(t),void(a=!0))},e.timeout)),window[e.callbackName]=function(){clearTimeout(n),n=null,e.success.apply(null,arguments),window[e.callbackName]=function(){ur.log("call jsonp error")},r.removeChild(t)},e.url.indexOf("?")>-1?e.url+="&callbackName="+e.callbackName:e.url+="?callbackName="+e.callbackName,c(e.data)){var s=[];w(e.data,function(e,t){s.push(t+"="+e)}),e.data=s.join("&"),e.url+="&"+e.data}t.onerror=function(i){return!a&&(window[e.callbackName]=function(){ur.log("call jsonp error")},clearTimeout(n),n=null,r.removeChild(t),e.error(i),void(a=!0))},t.src=e.url}function ue(e){var t={visibleHandler:_(e.visible)?e.visible:function(){},hiddenHandler:_(e.hidden)?e.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;h(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else h(window,"focus",this.visibleHandler),h(window,"blur",this.hiddenHandler)}};t.init()}function pe(e){e=S({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&(t=document.createElement("link"),t.rel="stylesheet",t.href=e.url),"js"===e.type&&(t=document.createElement("script"),t.async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function de(){return Date.now&&_(Date.now)?Date.now():(new Date).getTime()}function _e(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function fe(e,t){e=String(e),t="number"==typeof t?t:13;for(var r=126,n=e.split(""),i=0,a=n.length;it?(s&&(clearTimeout(s),s=null),o=c,a=e.apply(n,i),s||(n=i=null)):s||r.trailing===!1||(s=setTimeout(l,u)),a}}function Se(e){var t=[];return null==e?t:(w(e,function(e){t[t.length]=e}),t)}function be(e){return e?e.toArray?e.toArray():f(e)||ee(e)?Array.prototype.slice.call(e):Se(e):[]}function ke(e){for(var t,r=[],n={},i=0;ilr.para.datasend_timeout&&(lr.para.datasend_timeout=lr.para.callback_timeout),lr.para.heatmap&&lr.para.heatmap.collect_tags&&c(lr.para.heatmap.collect_tags)&&w(lr.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&lr.heatmap.otherTags.push(t)}),lr.para.heatmap&&"default"===lr.para.heatmap.clickmap&&lr.heatmap.initUnlimitedTags()}function Ge(e){var t={};for(var r in e)t[r]=e[r];lr.store._state.identities=t,lr.store.save()}function Qe(){lr._t=lr._t||1*new Date,lr.lib_version=Tr,lr.is_first_visitor=!1,lr.source_channel_standard=Or}function et(){if(Sr.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){lr.log("enableLocalLog error: "+e.message)}}function tt(){Sr.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")}function rt(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&Wr[t]?Wr[t].apply(Wr,r):void("function"==typeof t?t.apply(lr,r):lr.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0]))}function nt(e,t){return i(e)?c(window.SensorsDataWebJSSDKPlugin)&&c(window.SensorsDataWebJSSDKPlugin[e])&&_(window.SensorsDataWebJSSDKPlugin[e].init)?(window.SensorsDataWebJSSDKPlugin[e].init(lr,t),window.SensorsDataWebJSSDKPlugin[e]):c(lr.modules)&&c(lr.modules[e])&&_(lr.modules[e].init)?(lr.modules[e].init(lr,t),lr.modules[e]):void lr.log(e+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+e+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"):(lr.log("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1)}function it(e,t,r){Vr.check({event:e,properties:t})&&Vr.send({type:"track",event:e,properties:t},r)}function at(e,t){return!!Vr.check({bindKey:e,bindValue:t})&&(lr.store._state.identities[e]=t,lr.store.save(),void Vr.send({type:"track_id_bind",event:"$BindID",properties:{}}))}function st(e,t){if(!Vr.check({unbindKey:e,bindValue:t}))return!1;if(c(lr.store._state.identities)&&lr.store._state.identities.hasOwnProperty(e)&&lr.store._state.identities[e]===t){var r=lr.store.getUnionId().login_id;r&&e+"+"+t===r&&(lr.store._state.distinct_id=lr.store._state.first_id,lr.store._state.first_id="",lr.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete lr.store._state.identities[e],lr.store.save())}var n={};n[e]=t,Vr.send({identities:n,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function ot(e,t,r){function n(e,t,r){function n(e){function n(){a||(a=!0,location.href=i.href)}e.stopPropagation(),e.preventDefault();var a=!1;setTimeout(n,1e3),lr.track(t,r,n)}e=e||{};var i=null;return e.ele&&(i=e.ele),e.event&&(i=e.target?e.target:e.event.target),r=r||{},!(!i||"object"!=typeof i)&&(!i.href||/^javascript/.test(i.href)||i.target||i.download||i.onclick?(lr.track(t,r),!1):(e.event&&n(e.event),void(e.ele&&Ve(e.ele,"click",function(e){n(e)}))))}"object"==typeof e&&e.tagName?n({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&n(e,t,r)}function lt(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void Ve(e,"click",function(n){ -function i(){a||(a=!0,location.href=e.href)}n.preventDefault();var a=!1;setTimeout(i,1e3),lr.track(t,r,i)}))}function ct(e,t,r){Vr.check({item_type:e,item_id:t,properties:r})&&Vr.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function ut(e,t){Vr.check({item_type:e,item_id:t})&&Vr.sendItem({type:"item_delete",item_type:e,item_id:t})}function pt(e,t){Vr.check({propertiesMust:e})&&Vr.send({type:"profile_set",properties:e},t)}function dt(e,t){Vr.check({propertiesMust:e})&&Vr.send({type:"profile_set_once",properties:e},t)}function _t(e,t){Vr.check({propertiesMust:e})&&(w(e,function(t,r){i(t)?e[r]=[t]:f(t)?e[r]=t:(delete e[r],lr.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),re(e)||Vr.send({type:"profile_append",properties:e},t))}function ft(e,t){function r(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}var n=e;i(e)&&(e={},e[n]=1),Vr.check({propertiesMust:e})&&(r(e)?Vr.send({type:"profile_increment",properties:e},t):lr.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"))}function gt(e){Vr.send({type:"profile_delete"},e),Br.set("distinct_id",dr()),Br.set("first_id","")}function ht(e,t){var r=e,n={};i(e)&&(e=[],e.push(r)),f(e)?(w(e,function(e){i(e)?n[e]=!0:lr.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),Vr.send({type:"profile_unset",properties:n},t)):lr.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")}function mt(e,t){function r(e){lr.store._state.identities.$identity_anonymous_id=e,lr.store.save()}"number"==typeof e&&(e=String(e));var n=Br.getFirstId();if("undefined"==typeof e){var i=dr();n?Br.set("first_id",i):Br.set("distinct_id",i),r(i)}else Vr.check({distinct_id:e})&&(t===!0?n?Br.set("first_id",e):Br.set("distinct_id",e):n?Br.change("first_id",e):Br.change("distinct_id",e),r(e))}function vt(e,t,r,n){var i=Br.getFirstId()||Br.getDistinctId();Br.set("distinct_id",e),Vr.send({original_id:i,distinct_id:lr.store.getDistinctId(),type:"track_signup",event:t,properties:r},n)}function yt(e,t,r,n){"number"==typeof e&&(e=String(e)),Vr.check({distinct_id:e,event:t,properties:r})&&vt(e,t,r,n)}function wt(e){Vr.check({properties:e})?S(Lr.currentProps,e):lr.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function St(e){Br.clearAllProps(e)}function bt(e){var t;if(f(e)&&e.length>0)for(t=0;t-1?e.config.send_type:lr.para.send_type,"beacon"===r&&oe()===!1&&(r="image"),"ajax"===r&&le()===!1&&(r="image"),r}function Lt(e){var t=Et(e);switch(t){case"image":return new en(e);case"ajax":return new tn(e);case"beacon":return new rn(e);default:return new en(e)}}function Ut(e){var t=Lt(e),r=t.start;return t.start=function(){var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},lr.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},lr.para.datasend_timeout-lr.para.callback_timeout)},t.isEnd=function(){this.received||(this.received=!0,this.end())},t}function Ht(){this.sendingData=0,this.sendingItemKeys=[]}function Jt(e){var t=location.href,r=window.history.pushState,n=window.history.replaceState;_(window.history.pushState)&&(window.history.pushState=function(){r.apply(window.history,arguments),e(t),t=location.href}),_(window.history.replaceState)&&(window.history.replaceState=function(){n.apply(window.history,arguments),e(t),t=location.href});var i;i=window.document.documentMode?"hashchange":r?"popstate":"hashchange",h(window,i,function(){e(t),t=location.href})}function Bt(e){var t=null,n=new RegExp(e+"=([^&#]+)");try{var i=JSON.parse(window.name);w(i,function(r,n){e===n&&(t=decodeURIComponent(r))})}catch(a){t=null}if(null===t){var s=location.href.match(n);s&&s[0]&&s[1]&&(t=r(s[1]))}return t}function Rt(e){function t(){var e=[];r.touch_app_bridge||e.push(lr.debug.defineMode("1")),c(lr.para.app_js_bridge)||(e.push(lr.debug.defineMode("2")),r.verify_success=!1),c(lr.para.heatmap)&&"default"==lr.para.heatmap.clickmap||e.push(lr.debug.defineMode("3")),"fail"===r.verify_success&&e.push(lr.debug.defineMode("4"));var t={callType:"app_alert",data:e};SensorsData_App_Visual_Bridge&&SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info?SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info(JSON.stringify(t)):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.sensorsdataNativeTracker&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage(JSON.stringify(t))}var r=lr.bridge.bridge_info;if(c(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode===!0||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode()))if(c(lr.para.heatmap)&&"default"==lr.para.heatmap.clickmap)if(c(lr.para.app_js_bridge)&&"success"===r.verify_success)if(e)sa_jssdk_app_define_mode(lr,e);else{var n=location.protocol,i=["http:","https:"];n=G(i,n)>-1?n:"https:",pe({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_app_define_mode&&sa_jssdk_app_define_mode(lr,e)},0)},error:function(){},type:"js",url:n+"//static.sensorsdata.cn/sdk/"+lr.lib_version+"/vapph5define.min.js"})}else t();else t()}function Mt(){lr.para.is_track_single_page&&fn.on("switch",function(e){var t=function(t){t=t||{},e!==location.href&&(Lr.pageProp.referrer=F(e),lr.quick("autoTrack",S({$url:F(),$referrer:F(e)},t)))};if("boolean"==typeof lr.para.is_track_single_page)t();else if("function"==typeof lr.para.is_track_single_page){var r=lr.para.is_track_single_page();c(r)?t(r):r===!0&&t()}})}function qt(){lr._q&&f(lr._q)&&lr._q.length>0&&w(lr._q,function(e){lr[e[0]].apply(lr,Array.prototype.slice.call(e[1]))}),c(lr.para.heatmap)&&(zr.initHeatmap(),zr.initScrollmap())}function Kt(){lr.readyState.setState(3),new lr.JSBridge({type:"visualized",app_call_js:function(){Rt("undefined"!=typeof sa_jssdk_app_define_mode?!0:!1)}}),Rt(!1),lr.bridge.app_js_bridge_v1(),Lr.initPage(),Mt(),lr.para.batch_send&&(Ve(window,"onpagehide"in window?"pagehide":"unload",function(){lr.batchSend.clearPendingStatus()}),lr.batchSend.batchInterval()),lr.store.init(),lr.vtrackBase.init(),lr.readyState.setState(4),qt()}function Vt(){hn.isSeachHasKeyword()?hn.hasKeywordHandle():window.parent!==self&&mn.isSearchHasKeyword()?mn.verifyVtrackMode():hn.isStorageHasKeyword()?hn.storageHasKeywordHandle():window.parent!==self&&mn.isStorageHasKeyword()?mn.verifyVtrackMode():(Kt(),mn.notifyUser())}function Ft(){w(vn,function(e){var t=lr[e];lr[e]=function(){if(lr.readyState.state<3)return f(lr._q)||(lr._q=[]),lr._q.push([e,arguments]),!1;{if(lr.readyState.getState())return t.apply(lr,arguments);try{console.error("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}catch(r){lr.log(r)}}}})}function zt(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function Wt(e,t,r){var n=null;try{n=JSON.parse(JSON.stringify(e))}catch(i){Pe(i)}this.getOriginalData=function(){return n},this.getPosition=function(){return t},this.cancelationToken=new zt,this.sensors=r}function Xt(e){if(!c(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}function Zt(e){e&&e.dataStage&&Sn.registerStageImplementation(e.dataStage)}function Yt(e){e.kit=Qr,e.saEvent=Vr,this.dataStage=Kr}function Gt(e){return c(e)?(w(e,function(t,r){if(f(t)){var n=[];w(t,function(e){i(e)?n.push(e):Pe("\u60a8\u7684\u6570\u636e-",r,t,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),e[r]=n}i(t)||se(t)||D(t)||te(t)||f(t)||_(t)||"$option"===r||(Pe("\u60a8\u7684\u6570\u636e-",r,t,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete e[r])}),e):e}function Qt(e,t){return se(t)&&e.length>t?(Pe("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function er(e){var t=["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"];c(e)&&w(t,function(t,r){t in e&&(r<3?(delete e[t],Pe("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):Pe("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d"))})}function tr(e){var t=["$element_selector","$element_path"],r=["sensorsdata_app_visual_properties"];c(e)&&w(e,function(n,a){if(c(n))tr(e[a]);else if(i(n)){if(G(r,a)>-1)return;e[a]=Qt(n,G(t,a)>-1?1024:$r.max_string_length)}})}function rr(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function nr(e){if("item_type"in e){var t=e.item_type,r=function(t){return t||delete e.item_type,!0};We({item_type:t},r)}if("item_id"in e){var n=e.item_id,i=function(t,r,n){return t||"string"!==n||delete e.item_id,!0};We({item_id:n},i)}}function ir(e){w(e,function(t,r){var n=function(t,n,i){return t||"keyLength"===i||delete e[r],!0};We({propertyKey:r},n)})}function ar(e){var t=e.properties;c(t)?(Gt(t),er(t),rr(e),ir(t),tr(t)):"properties"in e&&(e.properties={}),me(e),nr(e)}function sr(){this.dataStage=bn}function or(e){e&&(ur.setup(Pe),lr._=S(Nr,Gr),lr.ee=gn,lr.sendState=nn,lr.events=new lr._.EventEmitterSa,lr.batchSend=an,lr.bridge=sn,lr.JSBridge=on,lr.store=Br,lr.vtrackBase=ln,lr.unlimitedDiv=cn,lr.customProp=un,lr.vtrackcollect=pn,lr.vapph5collect=_n,lr.heatmap=zr,lr.detectMode=Vt,lr.registerFeature=Zt,Zt(new Yt(lr)),Zt(new sr(lr)));var t=e?Zr:yn;for(var r in t)lr[r]=t[r]}var lr={};(function(){function e(n,i){function a(e,t){try{e()}catch(r){t&&t()}}function s(e){if(null!=s[e])return s[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=s("json-stringify")&&s("date-serialization")&&s("json-parse");else if("date-serialization"==e){if(t=s("json-stringify")&&w){var r=i.stringify;a(function(){t='"-271821-04-20T00:00:00.000Z"'==r(new p((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==r(new p(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new p((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==r(new p((-1)))})}}else{var n,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var r=i.stringify,u="function"==typeof r;u&&((n=function(){return 1}).toJSON=n,a(function(){u="0"===r(0)&&"0"===r(new l)&&'""'==r(new c)&&r(v)===h&&r(h)===h&&r()===h&&"1"===r(n)&&"[1]"==r([n])&&"[null]"==r([h])&&"null"==r(null)&&"[null,null,null]"==r([h,v,null])&&r({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==o&&"1"===r(null,n)&&"[\n 1,\n 2\n]"==r([1,2],null,1)},function(){u=!1})),t=u}if("json-parse"==e){var d,_=i.parse;"function"==typeof _&&a(function(){0!==_("0")||_(!1)||(n=_(o),d=5==n.a.length&&1===n.a[0],d&&(a(function(){d=!_('"\t"')}),d&&a(function(){d=1!==_("01")}),d&&a(function(){d=1!==_("1.")})))},function(){d=!1}),t=d}}return s[e]=!!t}function o(e){return T(this)}n||(n=r.Object()),i||(i=r.Object());var l=n.Number||r.Number,c=n.String||r.String,u=n.Object||r.Object,p=n.Date||r.Date,d=n.SyntaxError||r.SyntaxError,_=n.TypeError||r.TypeError,f=n.Math||r.Math,g=n.JSON||r.JSON;if("object"==typeof g&&g)return i.stringify=g.stringify,i.parse=g.parse,i.runInContext=e,i;var h,m=u.prototype,v=m.toString,y=m.hasOwnProperty,w=new p((-0xc782b5b800cec));if(a(function(){w=w.getUTCFullYear()==-109252&&0===w.getUTCMonth()&&1===w.getUTCDate()&&10==w.getUTCHours()&&37==w.getUTCMinutes()&&6==w.getUTCSeconds()&&708==w.getUTCMilliseconds()}),s["bug-string-char-index"]=s["date-serialization"]=s.json=s["json-stringify"]=s["json-parse"]=null,!s("json")){var S="[object Function]",b="[object Date]",k="[object Number]",P="[object String]",N="[object Array]",$="[object Boolean]",j=s("bug-string-char-index"),C=function(e,r){var n,i,a,s=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n;for(a in i)y.call(i,a)&&s++;return n=i=null,s?C=function(e,t){var r,n,i=v.call(e)==S;for(r in e)i&&"prototype"==r||!y.call(e,r)||(n="constructor"===r)||t(r);(n||y.call(e,r="constructor"))&&t(r)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],C=function(e,r){var n,a,s=v.call(e)==S,o=!s&&"function"!=typeof e.constructor&&t[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(n in e)s&&"prototype"==n||!o.call(e,n)||r(n);for(a=i.length;n=i[--a];)o.call(e,n)&&r(n)}),C(e,r)};if(!s("json-stringify")&&!s("date-serialization")){var A={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},D="000000",O=function(e,t){return(D+(t||0)).slice(-e)},T=function(e){var t,r,n,i,a,s,o,l,c;if(w)t=function(e){r=e.getUTCFullYear(),n=e.getUTCMonth(),i=e.getUTCDate(),s=e.getUTCHours(),o=e.getUTCMinutes(),l=e.getUTCSeconds(),c=e.getUTCMilliseconds()};else{var u=f.floor,p=[0,31,59,90,120,151,181,212,243,273,304,334],d=function(e,t){return p[t]+365*(e-1970)+u((e-1969+(t=+(t>1)))/4)-u((e-1901+t)/100)+u((e-1601+t)/400)};t=function(e){for(i=u(e/864e5),r=u(i/365.2425)+1970-1;d(r+1,0)<=i;r++);for(n=u((i-d(r,0))/30.42);d(r,n+1)<=i;n++);i=1+i-d(r,n),a=(e%864e5+864e5)%864e5,s=u(a/36e5)%24,o=u(a/6e4)%60,l=u(a/1e3)%60,c=a%1e3}}return(T=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+O(6,r<0?-r:r):O(4,r))+"-"+O(2,n+1)+"-"+O(2,i)+"T"+O(2,s)+":"+O(2,o)+":"+O(2,l)+"."+O(3,c)+"Z",r=n=i=s=o=l=c=null):e=null,e})(e)};if(s("json-stringify")&&!s("date-serialization")){var x=i.stringify;i.stringify=function(e,t,r){var n=p.prototype.toJSON;p.prototype.toJSON=o;var i=x(e,t,r);return p.prototype.toJSON=n,i}}else{var I="\\u00",E=function(e){var t=e.charCodeAt(0),r=A[t];return r?r:I+O(2,t.toString(16))},L=/[\x00-\x1f\x22\x5c]/g,U=function(e){return L.lastIndex=0,'"'+(L.test(e)?e.replace(L,E):e)+'"'},H=function(e,t,r,n,i,s,o){var l,c,u,d,f,g,m,y,w;if(a(function(){l=t[e]}),"object"==typeof l&&l&&(l.getUTCFullYear&&v.call(l)==b&&l.toJSON===p.prototype.toJSON?l=T(l):"function"==typeof l.toJSON&&(l=l.toJSON(e))),r&&(l=r.call(t,e,l)),l==h)return l===h?l:"null";switch(c=typeof l,"object"==c&&(u=v.call(l)),u||c){case"boolean":case $:return""+l;case"number":case k:return l>-1/0&&l<1/0?""+l:"null";case"string":case P:return U(""+l)}if("object"==typeof l){for(m=o.length;m--;)if(o[m]===l)throw _();if(o.push(l),d=[],y=s,s+=i,u==N){for(g=0,m=l.length;g0)for(n>10&&(n=10),i="";i.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||q();e+=R("0x"+a.slice(t,J));break;default:q()}else{if(34==i)break;for(i=a.charCodeAt(J),t=J;i>=32&&92!=i&&34!=i;)i=a.charCodeAt(++J);e+=a.slice(t,J)}if(34==a.charCodeAt(J))return J++,e;q();default:if(t=J,45==i&&(n=!0,i=a.charCodeAt(++J)),i>=48&&i<=57){for(48==i&&(i=a.charCodeAt(J+1),i>=48&&i<=57)&&q(),n=!1;J=48&&i<=57);J++);if(46==a.charCodeAt(J)){for(r=++J;r57));r++);r==J&&q(),J=r}if(i=a.charCodeAt(J),101==i||69==i){for(i=a.charCodeAt(++J),43!=i&&45!=i||J++,r=J;r57));r++);r==J&&q(),J=r}return+a.slice(t,J)}n&&q();var o=a.slice(J,J+4);if("true"==o)return J+=4,!0;if("fals"==o&&101==a.charCodeAt(J+4))return J+=5,!1;if("null"==o)return J+=4,null;q()}return"$"},V=function(e){var t,r;if("$"==e&&q(),"string"==typeof e){if("@"==(j?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=K(),"]"!=e;)r?","==e?(e=K(),"]"==e&&q()):q():r=!0,","==e&&q(),t.push(V(e));return t}if("{"==e){for(t={};e=K(),"}"!=e;)r?","==e?(e=K(),"}"==e&&q()):q():r=!0,","!=e&&"string"==typeof e&&"@"==(j?e.charAt(0):e[0])&&":"==K()||q(),t[e.slice(1)]=V(K());return t}q()}return e},F=function(e,t,r){var n=z(e,t,r);n===h?delete e[t]:e[t]=n},z=function(e,t,r){var n,i=e[t];if("object"==typeof i&&i)if(v.call(i)==N)for(n=i.length;n--;)F(v,C,i,n,r);else C(i,function(e){F(i,e,r)});return r.call(e,t,i)};i.parse=function(e,t){var r,n;return J=0,B=""+e,r=V(K()),"$"!=K()&&q(),J=B=null,t&&v.call(t)==S?z((n={},n[""]=r,n),"",t):r}}}return i.runInContext=e,i}var t={"function":!0,object:!0},r=t[typeof window]&&window||this,n=r.JSON,i=r.JSON3,a=!1,s=e(r,r.JSON3={noConflict:function(){return a||(a=!0,r.JSON=n,r.JSON3=i,n=i=null),s}});r.JSON={parse:s.parse,stringify:s.stringify}}).call(window),function(e,t){t(e)}(window,function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=function(e){var t=function(t){return e(String(t).replace(/[\t\n\f\r ]+/g,""))};return t.original=e,t}(e.atob)}else{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,n,i,a,s="",o=0,l=e.length%3;o255||(i=e.charCodeAt(o++))>255||(a=e.charCodeAt(o++))>255)return"";t=n<<16|i<<8|a,s+=r.charAt(t>>18&63)+r.charAt(t>>12&63)+r.charAt(t>>6&63)+r.charAt(63&t)}return l?s.slice(0,l-3)+"===".substring(l):s},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!n.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,i,a,s="",o=0;o>16&255):64===a?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return s}}}),function(){String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)})}(),t.prototype.on=function(t,r){if(!t||!r)return!1;if(!e(r))throw new Error("listener must be a function");this._events[t]=this._events[t]||[];var n="object"==typeof r;return this._events[t].push(n?r:{listener:r,once:!1}),this},t.prototype.prepend=function(t,r){if(!t||!r)return!1;if(!e(r))throw new Error("listener must be a function");this._events[t]=this._events[t]||[];var n="object"==typeof r;return this._events[t].unshift(n?r:{listener:r,once:!1}),this},t.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},t.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},t.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var n=0,i=r.length;n=4&&(a=e(a,i),i=[]);return i.length>0&&(a=e(a,i)),a.toString(16)};return function(){var n=String(screen.height*screen.width);n=n&&/\d{5,}/.test(n)?n.toString(16):String(31242*u()).replace(".","").slice(0,8);var i=e()+"-"+t()+"-"+r()+"-"+n+"-"+e();return i?i:(String(u())+String(u())+String(u())).slice(2,15)}}(),_r=function(e){this.ele=e},fr=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};_r.prototype={addClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")===-1&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1},attr:function(e,t){return"string"==typeof e&&d(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument,r=t.documentElement;return{top:e.top+window.pageYOffset-r.clientTop,left:e.left+window.pageXOffset-r.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),g(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!f(r))return null;for(var n=r.length-1;n>=0;n--){var i=r[n];if(t=i.style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return fr((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return fr(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return e=e&&11!==e.nodeType?e:null,g(e)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return g(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return g(e);return g(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),n=[],i=0;i0&&(e=e.concat($r.source_channel),e=ke(e)),w(e,function(e){t=R(location.href,e),t.length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=Lr.campaignParams(),n={},i={};return w(r,function(r,a,s){(" "+Or+" ").indexOf(" "+a+" ")!==-1?n[e+a]=s[a]:i[t+a]=s[a]}),{$utms:n,otherUtms:i}},properties:function(){var e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,r={$timezone_offset:(new Date).getTimezoneOffset(),$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$viewport_height:e,$viewport_width:t,$lib:"js",$lib_version:Tr};return r},currentProps:{},register:function(e){S(Lr.currentProps,e)}},Ur={get:function(e){return vr.get(e)},set:function(e,t,r,n){var i="";if(n="undefined"==typeof n?$r.cross_subdomain:n){var a=Oe(location.href);"url\u89e3\u6790\u5931\u8d25"===a&&(a=""),i=a?"; domain="+a:""}return vr.set(e,t,r,n,$r.set_cookie_samesite,$r.is_secure_cookie,i)},remove:function(e,t){return t="undefined"==typeof t?$r.cross_subdomain:t,vr.remove(e,t)},isSupport:function(e,t){return e=e||"sajssdk_2015_cookie_access_test",t=t||"1",vr.isSupport(e,t)}};Ur.getNewUser=ze;var Hr={data:{},get:function(e){var t=this.data[e];return void 0===t?null:void 0!==t._expirationTimestamp_?(new Date).getTime()>t._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var n,i=new Date;n="s"===String(r).slice(-1)?i.getTime()+1e3*Number(String(r).slice(0,-1)):i.getTime()+24*r*60*60*1e3,t={value:t,_expirationTimestamp_:n}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+$r.sdk_id+e}},Jr={checkIsAddSign:function(e){"track"===e.type&&(ze()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=Ur.get("sensorsdata2015jssdkcross"+lr.para.sdk_id);r=$e(r);var n={};null!=r&&ae(r)&&(n=JSON.parse(r),n.$device_id&&(t=n.$device_id)),t=t||e,lr.para.cross_subdomain===!0?lr.store.set("$device_id",t):(n.$device_id=t,n=JSON.stringify(n),lr.para.encrypt_cookie&&(n=je(n)),Ur.set("sensorsdata2015jssdkcross"+lr.para.sdk_id,n,null,!0)),lr.para.is_track_device_id&&(Lr.currentProps.$device_id=t)},storeInitCheck:function(){if(lr.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};Ur.isSupport()?Ur.set(Fe("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):Hr.set(Hr.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else ze()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=Lr.pageProp.url_domain,t={};""===e&&(e="url\u89e3\u6790\u5931\u8d25");var r=Je(document.referrer,!0);if(lr.para.preset_properties.search_keyword_baidu?Le(document.referrer)&&(!xe()||c(r)&&r.active?lr.store._state&&lr.store._state.props&&(lr.store._state.props.$search_keyword_id&&delete lr.store._state.props.$search_keyword_id,lr.store._state.props.$search_keyword_id_type&&delete lr.store._state.props.$search_keyword_id_type,lr.store._state.props.$search_keyword_id_hash&&delete lr.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=Er.id(),t.$search_keyword_id_type=Er.type(),t.$search_keyword_id_hash=Y(t.$search_keyword_id))):lr.store._state&&lr.store._state.props&&(lr.store._state.props.$search_keyword_id&&delete lr.store._state.props.$search_keyword_id,lr.store._state.props.$search_keyword_id_type&&delete lr.store._state.props.$search_keyword_id_type,lr.store._state.props.$search_keyword_id_hash&&delete lr.store._state.props.$search_keyword_id_hash),lr.store.save(),w(lr.para.preset_properties,function(r,n){if(n.indexOf("latest_")===-1)return!1;if(n=n.slice(7),r){if("wx_ad_click_id"===n&&"not_collect"===r)return!1;if("utm"!==n&&"url\u89e3\u6790\u5931\u8d25"===e)"wx_ad_click_id"===n?(t._latest_wx_ad_click_id="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_hash_key="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_callbacks="url\u7684domain\u89e3\u6790\u5931\u8d25"):t["$latest_"+n]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(Le(document.referrer))switch(n){case"traffic_source_type":t.$latest_traffic_source_type=Re();break;case"referrer":t.$latest_referrer=Lr.pageProp.referrer;break;case"search_keyword":Je()?t.$latest_search_keyword=Je():c(lr.store._state)&&c(lr.store._state.props)&&lr.store._state.props.$latest_search_keyword&&delete lr.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=F();break;case"wx_ad_click_id":var i=Be(location.href);t._latest_wx_ad_click_id=i.click_id,t._latest_wx_ad_hash_key=i.hash_key,t._latest_wx_ad_callbacks=i.callbacks}}else if("utm"===n&&lr.store._state&&lr.store._state.props)for(var a in lr.store._state.props)(0===a.indexOf("$latest_utm")||0===a.indexOf("_latest_")&&a.indexOf("_latest_wx_ad_")<0)&&delete lr.store._state.props[a];else if(lr.store._state&&lr.store._state.props&&"$latest_"+n in lr.store._state.props)delete lr.store._state.props["$latest_"+n];else if("wx_ad_click_id"==n&&lr.store._state&&lr.store._state.props&&r===!1){var s=["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"];w(s,function(e){e in lr.store._state.props&&delete lr.store._state.props[e]})}}),lr.register(t),lr.para.preset_properties.latest_utm){var n=Lr.campaignParamsStandard("$latest_","_latest_"),i=n.$utms,a=n.otherUtms;re(i)||lr.register(i),re(a)||lr.register(a)}}},Br={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={};e=e||this._state;var r=e._first_id||e.first_id,n=e._distinct_id||e.distinct_id;return r&&n?(t.login_id=n,t.anonymous_id=r):t.anonymous_id=n,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==lr.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=Ur.get("sensorsdata2015session");e=$e(e);var t=null;null!==e&&"object"==typeof(t=he(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&lr.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;S(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;j(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};r=t?e:S(this._state.props||{},e);for(var n in r)"string"==typeof r[n]&&(r[n]=r[n].slice(0,lr.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};j(t,e),this.set("props",t)},clearAllProps:function(e){this._sessionState={};var t;if(f(e)&&e.length>0)for(t=0;t$r.max_id_length)},keyLength:function(e){return!(!i(e)||e.length>$r.max_key_length)},stringLength:function(e){return!(!i(e)||e.length>$r.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(G(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(G(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=Br._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(G(this.bindReservedNames,e)>-1)}},qr={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Id"),_(Rr[r])&&Rr[r](t),"idLength"===r)||e}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="eventName"),_(Rr[r])&&Rr[r](t)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="Property key"),_(Rr[r])&&Rr[r](t)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(e,t,r){return e||(t="Property Value",_(Rr[r])&&Rr[r](t)),!0}},properties:function(e){return c(e)?w(e,function(e,t){We({propertyKey:t});var r=function(e,r,n){return e||(r=t+"'s Value",_(Rr[n])&&Rr[n](r)),!0};We({propertyValue:e},r)}):Mr.voidZero(e)&&Pe("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return void 0!==e&&c(e)&&!re(e)?this.properties.call(this,e):Pe("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_type"),_(Rr[r])&&Rr[r](t)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_id"),_(Rr[r])&&Rr[r](t)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="login_id_key"),_(Rr[r])&&Rr[r](t),"keyLength"===r)||e}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),_(Rr[r])&&Rr[r](t),"keyLength"===r)||e}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),_(Rr[r])&&Rr[r](t),"keyLength"===r)||e}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Value"),_(Rr[r])&&Rr[r](t),"idLength"===r)||e}},check:function(e,t,r){var n=this[e];if(_(n))return n.call(this,t);if(!n)return!1;for(var i=0;i-1)return n;if("area"===i&&"map"===a.tagName.toLowerCase()&&g(a).prev().tagName&&"img"===g(a).prev().tagName.toLowerCase())return g(a).prev();if("div"===i&&lr.para.heatmap.collect_tags.div&&r.isDivLevelValid(n)){var o=lr.para.heatmap&&lr.para.heatmap.collect_tags&&lr.para.heatmap.collect_tags.div&&lr.para.heatmap.collect_tags.div.max_level||1;if(o>1||r.isCollectableDiv(n))return n}if(r.isStyleTag(i)&&lr.para.heatmap.collect_tags.div){var l=r.getCollectableParent(n);if(l&&r.isDivLevelValid(l))return l}var c=r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)});return c||null},getDivLevels:function(e,t){var r=zr.getElementPath(e,!0,t),n=r.split(" > "),i=0;return w(n,function(e){"div"===e&&i++}),i},isDivLevelValid:function(e){for(var t=lr.para.heatmap&&lr.para.heatmap.collect_tags&&lr.para.heatmap.collect_tags.div&&lr.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),n=r.length-1;n>=0;n--)if(zr.getDivLevels(r[n],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var n=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){n.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){n.unshift(e.tagName.toLowerCase());break}if(e===document.body){n.unshift("body");break}n.unshift(e.tagName.toLowerCase()),e=e.parentNode}return n.join(" > ")},getClosestLi:function(e){var t=function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null};return t(e,"li")},getElementPosition:function(e,t,r){function n(e){var t=e.parentNode;if(!t)return"";var r=g(e).getSameTypeSiblings(),n=r.length;if(1===n)return 0;for(var i=0,a=e;g(a).previousElementSibling().ele;a=g(a).previousElementSibling().ele,i++);return i}var i=lr.heatmap.getClosestLi(e);if(!i)return null;var a=e.tagName.toLowerCase(),s=i.getElementsByTagName(a),o=s.length,l=[];if(o>1){for(var c=0;c1)return G(l,e)}return n(i)},setNotice:function(e){lr.is_heatmap_render_mode=!0,lr.para.heatmap||(lr.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(lr.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),lr.para.heatmap_url||(lr.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+lr.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,n=e.parentNode.children,i=0;i "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=Te({target:e});r.$element_selector=t?t:"",r.$element_path=lr.heatmap.getElementPath(e,lr.para.heatmap&&"not_use_id"===lr.para.heatmap.element_selector);var n=lr.heatmap.getElementPosition(e,r.$element_path,lr.para.heatmap&&"not_use_id"===lr.para.heatmap.element_selector);return se(n)&&(r.$element_position=n),r},getPointerEventProp:function(e,t){function r(){var e=document.body.scrollLeft||document.documentElement.scrollLeft||0,t=document.body.scrollTop||document.documentElement.scrollTop||0;return{scrollLeft:e,scrollTop:t}}function n(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function i(e){return Number(Number(e).toFixed(3))}function a(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+n(t).targetEleX||0,s=e.pageY||e.clientY+r().scrollTop||e.offsetY+n(t).targetEleY||0;return{$page_x:i(a),$page_y:i(s)}}return e?a(e):{}},start:function(e,t,r,n,i){var a=c(n)?n:{},s=_(i)?i:_(n)?n:void 0;if(lr.para.heatmap&&lr.para.heatmap.collect_element&&!lr.para.heatmap.collect_element(t))return!1;var o=this.getEleDetail(t);if(lr.para.heatmap&&lr.para.heatmap.custom_property){var l=lr.para.heatmap.custom_property(t);c(l)&&(o=S(o,l))}o=S(o,this.getPointerEventProp(e,t),a),"a"===r&&lr.para.heatmap&&lr.para.heatmap.isTrackLink===!0?lr.trackLink({event:e,target:t},"$WebClick",o):lr.track("$WebClick",o,s)},hasElement:function(e,t){var r;if(e.event){var n=e.event;r=n.path||n._getPath&&n._getPath()}else e.element&&(r=g(e.element).getParents());if(r&&f(r)&&r.length>0)for(var i=0;i-1)&&(!t||lr.para.heatmap&&lr.para.heatmap.collect_tags&&lr.para.heatmap.collect_tags.div?!!(c(lr.para.heatmap)&&c(lr.para.heatmap.collect_tags)&&c(lr.para.heatmap.collect_tags.div)&&f(lr.para.heatmap.collect_tags.div.ignore_tags)&&G(lr.para.heatmap.collect_tags.div.ignore_tags,e)>-1):G(n,e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(n,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(a){lr.log(a)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,n=r?r.tagName.toLowerCase():"";if("body"===n)return!1;var i=lr.para&&lr.para.heatmap&&lr.para.heatmap.collect_tags&&lr.para.heatmap.collect_tags.div&&lr.para.heatmap.collect_tags.div.max_level;if(n&&"div"===n&&(i>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(n,t))return this.getCollectableParent(r,t)}catch(a){lr.log(a)}return!1},listenUrlChange:function(e){e(),lr.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!c(lr.para.heatmap)||"default"!==lr.para.heatmap.scroll_notice_map)return!1;var e=!0;lr.para.scrollmap&&_(lr.para.scrollmap.collect_url)&&this.listenUrlChange(function(){e=!!lr.para.scrollmap.collect_url()});var t=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t},r=t({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,n=new Date,i=n-this.current_time;(i>lr.para.heatmap.scroll_delay_time&&r-e.$viewport_position!==0||t)&&(e.$url=F(),e.$title=document.title,e.$url_path=z(),e.event_duration=Math.min(lr.para.heatmap.scroll_event_duration,parseInt(i)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,lr.track("$WebStay",e)),this.current_time=n}});r.current_time=new Date,Ve(window,"scroll",function(){return!!e&&void r.go()}),Ve(window,"unload",function(){return!!e&&void r.go("notime")})},initHeatmap:function(){var e=this,t=!0;return!(!c(lr.para.heatmap)||"default"!==lr.para.heatmap.clickmap)&&(_(lr.para.heatmap.collect_url)&&this.listenUrlChange(function(){t=!!lr.para.heatmap.collect_url()}),"all"===lr.para.heatmap.collect_elements?lr.para.heatmap.collect_elements="all":lr.para.heatmap.collect_elements="interact",void("all"===lr.para.heatmap.collect_elements?Ve(document,"click",function(r){if(!t)return!1;var n=r||window.event;if(!n)return!1;var i=n.target||n.srcElement;if("object"!=typeof i)return!1;if("string"!=typeof i.tagName)return!1;var a=i.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!i||!i.parentNode||!i.parentNode.children)return!1;var s=i.parentNode.tagName.toLowerCase();"a"===s||"button"===s?e.start(n,i.parentNode,s):e.start(n,i,a)}):Ve(document,"click",function(r){if(!t)return!1;var n=r||window.event;if(!n)return!1;var i=n.target||n.srcElement,a=lr.heatmap.getTargetElement(i,r);a?e.start(n,a,a.tagName.toLowerCase()):p(i)&&"div"===i.tagName.toLowerCase()&&c(lr.para.heatmap)&&lr.para.heatmap.get_vtrack_config&&lr.unlimitedDiv.events.length>0&&lr.unlimitedDiv.isTargetEle(i)&&e.start(n,i,i.tagName.toLowerCase(),{$lib_method:"vtrack"})})))}},Wr={setOnlineState:function(e){if(e===!0&&c(lr.para.jsapp)&&"function"==typeof lr.para.jsapp.getData){lr.para.jsapp.isOnline=!0;var t=lr.para.jsapp.getData();f(t)&&t.length>0&&w(t,function(e){ae(e)&&lr.sendState.realtimeSend(JSON.parse(e))})}else lr.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return Lr.campaignParams()},getStayTime:function(){return(new Date-lr._t)/1e3},setProfileLocal:function(e){if(!wr.isSupport())return lr.setProfile(e),!1;if(!c(e)||re(e))return!1;var t=lr.store.readObjectVal("sensorsdata_2015_jssdk_profile"),r=!1;if(c(t)&&!re(t)){for(var n in e)!(n in t&&t[n]!==e[n])&&n in t||(t[n]=e[n],r=!0);r&&(lr.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),lr.setProfile(e))}else lr.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),lr.setProfile(e)},setInitReferrer:function(){var e=Ue();lr.setOnceProfile({_init_referrer:e,_init_referrer_host:Lr.pageProp.referrer_host})},setSessionReferrer:function(){var e=Ue();lr.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:Lr.pageProp.referrer_host})},setDefaultAttr:function(){Lr.register({_current_url:location.href,_referrer:Ue(),_referring_host:Lr.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase(),i=e.parentNode.tagName.toLowerCase(),a=lr.para.heatmap&&lr.para.heatmap.track_attr?lr.para.heatmap.track_attr:["data-sensors-click"];"button"===n||"a"===n||"a"===i||"button"===i||"input"===n||"textarea"===n||X(e,a)||zr.start(null,e,n,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase();zr.start(null,e,n,t,r)}},autoTrackSinglePage:function(e,t){function r(){var e=Lr.campaignParams(),t={};return w(e,function(e,r,n){(" "+lr.source_channel_standard+" ").indexOf(" "+r+" ")!==-1?t["$"+r]=n[r]:t[r]=n[r]}),t}function n(e,t){lr.track("$pageview",S({$referrer:a,$url:F(),$url_path:z(),$title:document.title},e,r()),t),a=F()}var a;a=this.autoTrackIsUsed?Lr.pageProp.url:Lr.pageProp.referrer,e=c(e)?e:{};var s=!e.not_set_profile;if(e.not_set_profile&&delete e.not_set_profile,n(e,t),this.autoTrackSinglePage=n,lr.is_first_visitor&&s){var o={};lr.para.preset_properties.search_keyword_baidu&&Le(document.referrer)&&xe()&&(o.$search_keyword_id=Er.id(),o.$search_keyword_id_type=Er.type(),o.$search_keyword_id_hash=Y(o.$search_keyword_id)),lr.setOnceProfile(S({$first_visit_time:new Date,$first_referrer:Ue(),$first_browser_language:i(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Re(),$first_search_keyword:Je()},r(),o)),lr.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=c(e)?e:{},this.autoTrack(S(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=c(e)?e:{};var r=Lr.campaignParams(),n={};w(r,function(e,t,r){(" "+lr.source_channel_standard+" ").indexOf(" "+t+" ")!==-1?n["$"+t]=r[t]:n[t]=r[t]});var a=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var s=location.href;if(lr.para.is_single_page&&v(function(){var r=Ue(s,!0);lr.track("$pageview",S({$referrer:r,$url:F(),$url_path:z(),$title:document.title},n,e),t),s=F()}),lr.track("$pageview",S({$referrer:Ue(null,!0),$url:F(),$url_path:z(),$title:document.title},n,e),t),lr.is_first_visitor&&a){var o={};lr.para.preset_properties.search_keyword_baidu&&Le(document.referrer)&&xe()&&(o.$search_keyword_id=Er.id(),o.$search_keyword_id_type=Er.type(),o.$search_keyword_id_hash=Y(o.$search_keyword_id)),lr.setOnceProfile(S({$first_visit_time:new Date,$first_referrer:Ue(null,!0),$first_browser_language:i(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Re(),$first_search_keyword:Je()},n,o)),lr.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return re(lr.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":lr.store._state._first_id||lr.store._state.first_id||lr.store._state._distinct_id||lr.store._state.distinct_id},setPlugin:function(e){return!!c(e)&&void w(e,function(e,t){_(e)&&(c(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[t]?e(window.SensorsDataWebJSSDKPlugin[t]):lr.log(t+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+t+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"))})},useModulePlugin:function(){lr.use.apply(lr,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}},Xr={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}},Zr={__proto__:null,addReferrerHost:Xe,addPropsHook:Ze,initPara:Ye,setInitVar:Qe,enableLocalLog:et,disableLocalLog:tt,quick:rt,use:nt,track:it,bind:at,unbind:st,trackLink:ot,trackLinks:lt,setItem:ct,deleteItem:ut,setProfile:pt,setOnceProfile:dt,appendProfile:_t,incrementProfile:ft,deleteProfile:gt,unsetProfile:ht,identify:mt,trackSignup:yt,registerPage:wt,clearAllRegister:St,clearPageRegister:bt,register:kt,registerOnce:Pt,registerSession:Nt,registerSessionOnce:$t,login:Ct,loginWithKey:At,logout:Dt,getPresetProperties:Ot,iOSWebClickPolyfill:Tt,readyState:Xr,para_default:jr,log:Pe,debug:Dr,IDENTITY_KEY:Ir},Yr=function(){this._events=[],this.pendingEvents=[]};Yr.prototype={emit:function(e){var t=[].slice.call(arguments,1);w(this._events,function(r){r.type===e&&r.callback.apply(r.context,t)}),this.pendingEvents.push({type:e,data:t}),this.pendingEvents.length>20?this.pendingEvents.shift():null},on:function(e,t,r,n){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),n=n!==!1,this.pendingEvents.length>0&&n&&w(this.pendingEvents,function(n){n.type===e&&t.apply(r,n.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var Gr={__proto__:null,parseSuperProperties:Ce,searchConfigData:Ae,strip_empty_properties:De,getCurrentDomain:Oe,getEleInfo:Te,isBaiduTraffic:xe, -getReferrerEqid:Ie,getReferrerEqidType:Ee,getBaiduKeyword:Er,isReferralTraffic:Le,getReferrer:Ue,getKeywordFromReferrer:Je,getWxAdIdFromUrl:Be,getReferSearchEngine:He,getSourceFromReferrer:Re,info:Lr,ajax:Ke,getElementContent:qe,cookie:Ur,addEvent:Ve,EventEmitterSa:Yr,encrypt:je,decryptIfNeeded:$e},Qr={};Qr.buildData=function(e){var t={identities:{},distinct_id:lr.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(lr.lib_version)},properties:{}};return c(e)&&c(e.identities)&&!re(e.identities)?S(t.identities,e.identities):S(t.identities,Br._state.identities),c(e)&&c(e.properties)&&!re(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),S(t,lr.store.getUnionId(),e),Kr.stage.process("addCustomProps",t),c(e.properties)&&!re(e.properties)&&S(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=S({},Lr.properties(),Br.getProps(),Br.getSessionProps(),Lr.currentProps,t.properties),lr.para.preset_properties.latest_referrer&&!i(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),lr.para.preset_properties.latest_search_keyword&&!i(t.properties.$latest_search_keyword)&&(lr.para.preset_properties.search_keyword_baidu&&i(t.properties.$search_keyword_id)&&se(t.properties.$search_keyword_id_hash)&&i(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),lr.para.preset_properties.latest_traffic_source_type&&!i(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),lr.para.preset_properties.latest_landing_page&&!i(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===lr.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id,delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):lr.para.preset_properties.latest_wx_ad_click_id&&!i(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),i(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=F())),t.properties.$time&&D(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,lr.vtrackBase.addCustomProps(t),Ce(t),Jr.checkIsAddSign(t),Jr.checkIsFirstTime(t),lr.addReferrerHost(t),lr.addPropsHook(t),Kr.stage.process("formatData",t),t},Qr.sendData=function(e,t){var r=Ae(e.properties);lr.para.debug_mode===!0?(lr.log(e),lr.saEvent.debugPath(JSON.stringify(e),t)):lr.sendState.getSendCall(e,r,t)},Qr.encodeTrackData=function(e){var t=N(e),r="crc="+Z(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)};var en=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,lr.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=xt(e.server_url,e.data)};en.prototype.start=function(){var e=this;lr.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},en.prototype.lastClear=function(){var e=V();void 0!==e.ie?this.img.src="about:blank":this.img.src=""};var tn=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=It(e.data)};tn.prototype.start=function(){var e=this;Ke({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:lr.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var rn=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=It(e.data)};rn.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var nn={};nn.getSendCall=function(e,t,r){if(lr.is_heatmap_render_mode)return!1;if(lr.readyState.state<3)return lr.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(u()).slice(2,5)+String(u()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var n=e;e=JSON.stringify(e);var i={data:n,config:t,callback:r};return lr.events.tempAdd("send",n),!lr.para.app_js_bridge&&lr.para.batch_send&&localStorage.length<200?(lr.log(n),lr.batchSend.add(i.data),!1):("item_set"===n.type||"item_delete"===n.type?this.prepareServerUrl(i):lr.bridge.dataSend(i,this,r),void lr.log(n))},nn.prepareServerUrl=function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(f(lr.para.server_url)&&lr.para.server_url.length)for(var t=0;t0&&--this.sendingData,f(e)&&e.length>0&&w(e,function(e){wr.remove(e)})},send:function(e){var t,r=this;return i(lr.para.server_url)&&""!==lr.para.server_url||f(lr.para.server_url)&&lr.para.server_url.length?(t=f(lr.para.server_url)?lr.para.server_url[0]:lr.para.server_url,void Ke({url:t,type:"POST",data:"data_list="+encodeURIComponent(N(JSON.stringify(e.vals))),credentials:!1,timeout:lr.para.batch_send.datasend_timeout,cors:!0,success:function(){r.remove(e.keys),r.removePendingItems(e.keys)},error:function(){r.sendingData>0&&--r.sendingData,r.removePendingItems(e.keys)}})):void lr.log("\u5f53\u524d server_url \u4e3a\u7a7a\u6216\u4e0d\u6b63\u786e\uff0c\u53ea\u5728\u63a7\u5236\u53f0\u6253\u5370\u65e5\u5fd7\uff0cnetwork \u4e2d\u4e0d\u4f1a\u53d1\u6570\u636e\uff0c\u8bf7\u914d\u7f6e\u6b63\u786e\u7684 server_url\uff01")},appendPendingItems:function(e){if(f(e)!==!1){this.sendingItemKeys=ke(this.sendingItemKeys.concat(e));try{var t=this.getPendingItems(),r=ke(t.concat(e));lr.store.saveObjectVal("sawebjssdk-sendingitems",r)}catch(n){}}},removePendingItems:function(e){if(f(e)!==!1){this.sendingItemKeys.length&&(this.sendingItemKeys=I(this.sendingItemKeys,function(t){return G(e,t)===-1}));try{var t=this.getPendingItems(),r=I(t,function(t){return G(e,t)===-1});lr.store.saveObjectVal("sawebjssdk-sendingitems",r)}catch(n){}}},getPendingItems:function(){return lr.store.readObjectVal("sawebjssdk-sendingitems")||[]},sendPrepare:function(e){this.appendPendingItems(e.keys);var t=e.vals,r=t.length;r>0&&this.send({keys:e.keys,vals:t})},sendStrategy:function(){if(document.hasFocus()===!1)return!1;var e=this.readStore();e.keys.length>0&&0===this.sendingData&&(this.sendingData=1,this.sendPrepare(e))},batchInterval:function(){var e=this;setInterval(function(){e.sendStrategy()},lr.para.batch_send.send_interval)},readStore:function(){for(var e=[],t=[],r=null,n=(new Date).getTime(),i=localStorage.length,a=this.getPendingItems(),s=0;s-1)continue;r=lr.store.readObjectVal(o),r?r&&c(r)?(r._flush_time=n,e.push(o),t.push(r)):(localStorage.removeItem(o),lr.log("localStorage-\u6570\u636eparse\u5f02\u5e38"+r)):(localStorage.removeItem(o),lr.log("localStorage-\u6570\u636e\u53d6\u503c\u5f02\u5e38"+r))}}return{keys:e,vals:t}},writeStore:function(e){var t=String(u()).slice(2,5)+String(u()).slice(2,5)+String((new Date).getTime()).slice(3);lr.store.saveObjectVal("sawebjssdk-"+t,e)}};var an=new Ht,sn={bridge_info:{touch_app_bridge:!1,verify_success:!1,platform:""},is_verify_success:!1,initPara:function(){var e={is_send:!0,white_list:[],is_mui:!1};"object"==typeof lr.para.app_js_bridge?lr.para.app_js_bridge=S({},e,lr.para.app_js_bridge):lr.para.use_app_track===!0||lr.para.app_js_bridge===!0||"only"===lr.para.use_app_track?(lr.para.use_app_track_is_send!==!1&&"only"!==lr.para.use_app_track||(e.is_send=!1),lr.para.app_js_bridge=S({},e)):"mui"===lr.para.use_app_track&&(e.is_mui=!0,lr.para.app_js_bridge=S({},e)),lr.para.app_js_bridge.is_send===!1&&lr.log("\u8bbe\u7f6e\u4e86 is_send:false,\u5982\u679c\u6253\u901a\u5931\u8d25\uff0c\u6570\u636e\u5c06\u88ab\u4e22\u5f03\uff01")},initState:function(){function e(e){function t(e){var t={hostname:"",project:""};try{t.hostname=l(e).hostname,t.project=l(e).searchParams.get("project")||"default"}catch(r){lr.log(r)}return t}var r=t(e),n=t(lr.para.server_url);if(r.hostname===n.hostname&&r.project===n.project)return!0;if(lr.para.app_js_bridge.white_list.length>0)for(var i=0;i"),r=a(t.pop());if("div"!==r.slice(0,3))return!1}return!0},ln.configIsMatchNew=function(e,t){if(i(e.$element_selector)&&i(t.element_selector)){if("element_selector"===t.element_field&&"equal"===t["function"])return e.$element_selector===t.element_selector;if("element_selector"===t.element_field&&"contain"===t["function"])return e.$element_selector.indexOf(t.element_selector)>-1}if(i(e.$element_path)&&i(t.element_path)){if("element_path"===t.element_field&&"equal"===t["function"])return e.$element_path===t.element_path;if("element_path"===t.element_field&&"contain"===t["function"])return e.$element_path.indexOf(t.element_path)>-1}return!1},ln.configIsMatch=function(e,t){return(!t.limit_element_content||t.element_content===e.$element_content)&&((!t.limit_element_position||t.element_position===String(e.$element_position))&&(t.element_field&&t["function"]?ln.configIsMatchNew(e,t):ln.configIsMatchOldVersion(e,t)))},ln.configIsMatchOldVersion=function(e,t){if(!t.element_path)return!1;if(void 0!==e.$element_position){if(t.element_path!==e.$element_path)return!1}else if(lr.vtrackBase.isDiv({element_path:t.element_path})){if(e.$element_path.indexOf(t.element_path)<0)return!1}else if(t.element_path!==e.$element_path)return!1;return!0},ln.filterConfig=function(e,t,r){var n=[];if(!r){var i=ln.initUrl();if(!i)return[];r=i.page_url}return"$WebClick"===e.event&&w(t,function(t){c(t)&&("webclick"===t.event_type||"appclick"===t.event_type)&&c(t.event)&&t.event.url_host===r.host&&t.event.url_path===r.pathname&&ln.configIsMatch(e.properties,t.event)&&n.push(t)}),n},ln.getPropElInLi=function(e,t){if(!(e&&p(e)&&i(t)))return null;if("li"!==e.tagName.toLowerCase())return null;var r,n=lr.heatmap.getDomSelector(e);if(n){r=n+t;var a=U(r);return a?a:null}return lr.log("----custom---\u83b7\u53d6\u540c\u7ea7\u5c5e\u6027\u5143\u7d20\u5931\u8d25\uff0cselector\u4fe1\u606f\u5f02\u5e38",n,t),null},ln.getProp=function(e,t){if(!c(e))return!1;if(!(i(e.name)&&e.name.length>0))return lr.log("----vcustom----\u5c5e\u6027\u540d\u4e0d\u5408\u6cd5,\u5c5e\u6027\u629b\u5f03",e.name),!1;var r,n,a={};if("content"===e.method){var s;if(i(e.element_selector)&&e.element_selector.length>0)s=U(e.element_selector);else{if(!t||!i(e.list_selector))return lr.log("----vcustom----\u5c5e\u6027\u914d\u7f6e\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var o=U(t.properties.$element_selector);if(!o)return lr.log("----vcustom----\u70b9\u51fb\u5143\u7d20\u83b7\u53d6\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var l=lr.heatmap.getClosestLi(o);s=ln.getPropElInLi(l,e.list_selector)}if(!s||!p(s))return lr.log("----vcustom----\u5c5e\u6027\u5143\u7d20\u83b7\u53d6\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;if("input"===s.tagName.toLowerCase())r=s.value||"";else if("select"===s.tagName.toLowerCase()){var u=s.selectedIndex;se(u)&&p(s[u])&&(r=qe(s[u],"select"))}else r=qe(s,s.tagName.toLowerCase());if(e.regular){try{n=new RegExp(e.regular).exec(r)}catch(d){return lr.log("----vcustom----\u6b63\u5219\u5904\u7406\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1}if(null===n)return lr.log("----vcustom----\u5c5e\u6027\u89c4\u5219\u5904\u7406\uff0c\u672a\u5339\u914d\u5230\u7ed3\u679c,\u5c5e\u6027\u629b\u5f03",e.name),!1;if(!f(n)||!i(n[0]))return lr.log("----vcustom----\u6b63\u5219\u5904\u7406\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name,n),!1;r=n[0]}if("STRING"===e.type)a[e.name]=r;else if("NUMBER"===e.type){if(r.length<1)return lr.log("----vcustom----\u672a\u83b7\u53d6\u5230\u6570\u5b57\u5185\u5bb9\uff0c\u5c5e\u6027\u629b\u5f03",e.name,r),!1;if(isNaN(Number(r)))return lr.log("----vcustom----\u6570\u5b57\u7c7b\u578b\u5c5e\u6027\u8f6c\u6362\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name,r),!1;a[e.name]=Number(r)}return a}return lr.log("----vcustom----\u5c5e\u6027\u4e0d\u652f\u6301\u6b64\u83b7\u53d6\u65b9\u5f0f",e.name,e.method),!1},ln.getAssignConfigs=function(e,t){var r=ln.initUrl();if(!r||!r.page_url)return[];if(!c(t))return[];var n=[];return t.events=t.events||t.eventList,f(t.events)&&t.events.length>0?(w(t.events,function(t){c(t)&&c(t.event)&&t.event.url_host===r.page_url.host&&t.event.url_path===r.page_url.pathname&&e(t)&&n.push(t)}),n):[]},ln.addCustomProps=function(e){if("success"===lr.bridge.bridge_info.verify_success){var t=lr.vapph5collect.customProp.geth5Props(JSON.parse(JSON.stringify(e)));c(t)&&!re(t)&&(e.properties=S(e.properties,t))}var r=lr.vtrackcollect.customProp.getVtrackProps(JSON.parse(JSON.stringify(e)));return c(r)&&!re(r)&&(e.properties=S(e.properties,r)),e},ln.init=function(){lr.vtrackcollect.init(),"success"===lr.bridge.bridge_info.verify_success&&lr.vapph5collect.init()};var cn={events:[],init:function(e){this.filterWebClickEvents(e)},filterWebClickEvents:function(e){this.events=lr.vtrackcollect.getAssignConfigs(function(e){return!(!c(e)||e.event.unlimited_div!==!0||"webclick"!==e.event_type)},e)},isTargetEle:function(e){var t=lr.heatmap.getEleDetail(e);if(!c(t)||!i(t.$element_path))return!1;for(var r=0;r0)},e),this.events.length?this.configSwitch=!0:this.configSwitch=!1},getVtrackProps:function(e){var t={};return this.collectAble()?("$WebClick"===e.event&&(t=this.clickCustomPropMaker(e,this.events)),t):{}},clickCustomPropMaker:function(e,t,r){var n=this;r=r||this.filterConfig(e,t,lr.vtrackcollect.url_info.page_url);var i={};return r.length?(w(r,function(t){f(t.properties)&&t.properties.length>0&&w(t.properties,function(t){var r=n.getProp(t,e);c(r)&&S(i,r)})}),i):{}},getProp:ln.getProp,getPropElInLi:ln.getPropElInLi,filterConfig:ln.filterConfig},pn={unlimitedDiv:cn,config:{},storageEnable:!0,storage_name:"webjssdkvtrackcollect",para:{session_time:18e5,timeout:5e3,update_interval:18e5},url_info:{},timer:null,update_time:null,customProp:un,initUrl:function(){var e=ln.initUrl();if(e){var t;try{t=new s(lr.para.server_url),t._values.Path="/config/visualized/Web.conf",e.api_url=t.getUrl()}catch(r){return lr.log("----vtrackcollect---API\u5730\u5740\u89e3\u6790\u5f02\u5e38",r),!1}this.url_info=e}return e},init:function(){if(!c(lr.para.heatmap)||!lr.para.heatmap.get_vtrack_config)return!1;if(wr.isSupport()||(this.storageEnable=!1),!this.initUrl())return lr.log("----vtrackcustom----\u521d\u59cb\u5316\u5931\u8d25\uff0curl\u4fe1\u606f\u89e3\u6790\u5931\u8d25"),!1;if(this.storageEnable){var e=lr.store.readObjectVal(this.storage_name);if(c(e)&&c(e.data))if(this.serverUrlIsSame(e.serverUrl)){this.config=e.data,this.update_time=e.updateTime,this.updateConfig(e.data);var t=(new Date).getTime(),r=t-this.update_time;if(se(r)&&r>0&&r0&&r0&&w(a.properties,function(r){if(c(r))if(r.h5===!1)f(t.sensorsdata_app_visual_properties)||(t.sensorsdata_app_visual_properties=[]),t.sensorsdata_app_visual_properties.push(r);else{var i=n.getProp(r,e);c(i)&&(t=S(t,i))}}),i(a.event_name)&&r.push(a.event_name))}),c(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode===!0||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode())&&(t.sensorsdata_web_visual_eventName=r)}return t.sensorsdata_app_visual_properties&&(t.sensorsdata_app_visual_properties=N(JSON.stringify(t.sensorsdata_app_visual_properties))),t},initAppGetPropsBridge:function(){var e=this;return new lr.JSBridge({type:"getJSVisualProperties",app_call_js:function(t){var r={};try{t=JSON.parse(P(t))}catch(n){lr.log("getJSVisualProperties data parse error!")}if(c(t)){var i=t.sensorsdata_js_visual_properties,a=e.initUrl();a&&(a=a.page_url,f(i)&&i.length>0&&w(i,function(t){if(c(t)&&t.url_host===a.host&&t.url_path===a.pathname&&t.h5){var n=e.getProp(t);c(n)&&(r=S(r,n))}}))}var s=lr.bridge.bridge_info.platform;if("android"===s){var o={callType:"getJSVisualProperties",data:r};c(t)&&t.message_id&&(o.message_id=t.message_id),c(window.SensorsData_APP_New_H5_Bridge)&&_(SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app)?SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app(JSON.stringify(o)):c(window.SensorsData_APP_JS_Bridge)&&_(SensorsData_APP_JS_Bridge.sensorsdata_js_call_app)&&SensorsData_APP_JS_Bridge.sensorsdata_js_call_app(JSON.stringify(o))}return r}})}},_n={events:[],customProp:dn,getAssignConfigs:ln.getAssignConfigs,initUrl:ln.initUrl,init:function(){if(this.initUrl()){var e=this.getConfigFromApp();e&&this.updateConfigs(e),this.customProp.init(),this.initAppUpdateConfigBridge()}},initAppUpdateConfigBridge:function(){var e=this;return new lr.JSBridge({type:"updateH5VisualConfig",app_call_js:function(t){if(t){try{t=JSON.parse(P(t))}catch(r){return void lr.log("updateH5VisualConfig result parse error\uff01")}e.updateConfigs(t)}}})},getConfigFromApp:function(){var e=new lr.JSBridge({type:"sensorsdata_get_app_visual_config"}),t=e.getAppData();if(t)try{t=JSON.parse(P(t))}catch(r){t=null,lr.log("getAppVisualConfig result parse error\uff01")}return t},updateConfigs:function(e){this.events=this.filterConfigs(e),this.customProp.updateEvents(this.events)},filterConfigs:function(e){return this.getAssignConfigs(function(e){return!(!c(e)||e.h5===!1)},e)}},fn=new t,gn={};gn.spa=fn,gn.initSystemEvent=function(){Jt(function(e){fn.emit("switch",e)})};var hn={getOriginalUrl:function(){function e(e){var t=e.split("&"),r=["sa-request-id","sa-request-type","sa-request-url"],n=[];return w(t,function(e){r.indexOf(e.split("=")[0])<0&&n.push(e)}),n.join("&")}var t=location.protocol+"//"+location.host+location.pathname,r="",n="";if(location.search){var i=e(location.search.slice(1));i&&(r="?"+i)}if(location.hash&&(n=location.hash,location.hash.indexOf("?")>-1)){var a=location.hash.split("?"),s=e(a[1]);s&&(n=a[0]+"?"+s)}return decodeURI(t+r+n)},isSeachHasKeyword:function(){return null!==Bt("sa-request-id")&&("string"==typeof sessionStorage.getItem("sensors-visual-mode")&&sessionStorage.removeItem("sensors-visual-mode"),!0)},hasKeywordHandle:function(){var e=Bt("sa-request-id"),t=Bt("sa-request-type"),r=Bt("sa-request-url");zr.setNotice(r),Sr.isSupport()&&(null!==r&&sessionStorage.setItem("sensors_heatmap_url",r),sessionStorage.setItem("sensors_heatmap_id",e),null!==t?"1"===t||"2"===t||"3"===t?sessionStorage.setItem("sensors_heatmap_type",t):t=null:t=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),this.isReady(e,t,this.getOriginalUrl())},isReady:function(e,t,r){lr.para.heatmap_url?pe({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(lr,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(lr.heatmap_version&&lr.heatmap_version===lr.lib_version||console.log("heatmap.js\u4e0esensorsdata.js\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669!")))},0)},error:function(){},type:"js",url:lr.para.heatmap_url}):lr.log("\u6ca1\u6709\u6307\u5b9aheatmap_url\u7684\u8def\u5f84")},isStorageHasKeyword:function(){return Sr.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")},storageHasKeywordHandle:function(){zr.setNotice(),hn.isReady(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),this.getOriginalUrl()); -}},mn={isStorageHasKeyword:function(){return Sr.isSupport()&&"string"==typeof sessionStorage.getItem("sensors-visual-mode")},isSearchHasKeyword:function(){return(Bt("sa-visual-mode")===!0||"true"===Bt("sa-visual-mode"))&&("string"==typeof sessionStorage.getItem("sensors_heatmap_id")&&sessionStorage.removeItem("sensors_heatmap_id"),!0)},loadVtrack:function(){pe({success:function(){},error:function(){},type:"js",url:lr.para.vtrack_url?lr.para.vtrack_url:location.protocol+"//static.sensorsdata.cn/sdk/"+lr.lib_version+"/vtrack.min.js"})},messageListener:function(e){function t(e){return ne(e)?_e(e):(lr.log("\u53ef\u89c6\u5316\u6a21\u5f0f\u68c0\u6d4b URL \u5931\u8d25"),!1)}if("sa-fe"!==e.data.source)return!1;if("v-track-mode"===e.data.type){if(e.data.data&&e.data.data.isVtrack)if(Sr.isSupport()&&sessionStorage.setItem("sensors-visual-mode","true"),e.data.data.userURL&&location.href.match(/sa-visual-mode=true/)){var r=t(e.data.data.userURL);r&&(window.location.href=r)}else mn.loadVtrack();window.removeEventListener("message",mn.messageListener,!1)}},removeMessageHandle:function(){window.removeEventListener&&window.removeEventListener("message",mn.messageListener,!1)},verifyVtrackMode:function(){window.addEventListener&&window.addEventListener("message",mn.messageListener,!1),mn.postMessage()},postMessage:function(){window.parent&&window.parent.postMessage&&window.parent.postMessage({source:"sa-web-sdk",type:"v-is-vtrack",data:{sdkversion:"1.22.3"}},"*")},notifyUser:function(){var e=function(t){return"sa-fe"===t.data.source&&void("v-track-mode"===t.data.type&&(t.data.data&&t.data.data.isVtrack&&alert("\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\uff0c\u8bf7\u5347\u7ea7\u90e8\u7f72\u795e\u7b56\u6570\u636e\u6cbb\u7406"),window.removeEventListener("message",e,!1)))};window.addEventListener&&window.addEventListener("message",e,!1),mn.postMessage()}},vn=["setItem","deleteItem","getAppStatus","track","quick","register","registerPage","registerOnce","trackSignup","setProfile","setOnceProfile","appendProfile","incrementProfile","deleteProfile","unsetProfile","identify","login","logout","trackLink","clearAllRegister","clearPageRegister"],yn={track:function(e,t,r){},quick:function(e,t,r,n){},register:function(e){},registerPage:function(e){},registerOnce:function(e){},clearAllRegister:function(e){},trackSignup:function(e,t,r,n){},setProfile:function(e,t){},setOnceProfile:function(e,t){},appendProfile:function(e,t){},incrementProfile:function(e,t){},deleteProfile:function(e){},unsetProfile:function(e,t){},identify:function(e,t){},login:function(e,t){},logout:function(e){},trackLink:function(e,t,r){},deleteItem:function(e,t){},setItem:function(e,t,r){},getAppStatus:function(e){},clearPageRegister:function(e){}};Xt.prototype.process=function(e,t){if(!(e&&e in this.processDef))return void Pe("process ["+e+"] is not supported");var r=this.registeredInterceptors[e];if(r&&f(r)&&r.length>0)for(var n={current:0,total:r.length},i=new Wt(t,n,lr),a=0;a=n.length:n.push(a);break;default:n.splice(i,0,a)}}}};var wn={addCustomProps:null,formatData:null},Sn=new Xt(wn),bn={init:function(){},interceptor:{formatData:{priority:0,entry:function(e){return ar(e),e}}}},kn=window.sensors_data_pre_config,Pn=!!c(kn)&&kn.is_compliance_enabled;lr.init=function(e){return!(lr.readyState&&lr.readyState.state&&lr.readyState.state>=2)&&(Pn&&or(!0),lr.ee.initSystemEvent(),lr.setInitVar(),lr.readyState.setState(2),lr.initPara(e),lr.bridge.supportAppCallJs(),lr.detectMode(),void lr.iOSWebClickPolyfill())},Pn?or(!1):(or(!0),Ft());var Nn=lr;try{lr.modules={},"string"==typeof window.sensorsDataAnalytic201505?(lr.para=window[sensorsDataAnalytic201505].para,lr._q=window[sensorsDataAnalytic201505]._q,window[sensorsDataAnalytic201505]=lr,window.sensorsDataAnalytic201505=lr,lr.init()):"undefined"==typeof window.sensorsDataAnalytic201505?window.sensorsDataAnalytic201505=lr:Nn=window.sensorsDataAnalytic201505}catch($n){if("object"==typeof console&&console.log)try{console.log($n)}catch(jn){lr.log(jn)}}var Cn=Nn;return Cn}); \ No newline at end of file +!function(e,t){"function"==typeof define&&"object"==typeof define.amd&&define.amd&&define(t)}(this,function(){function e(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function t(){return Date.now&&e(Date.now)?Date.now():(new Date).getTime()}function r(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function n(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),r(e)&&e.getRandomValues){var t=new Uint32Array(1),n=e.getRandomValues(t)[0],i=Math.pow(2,32);return n/i}}return _r(1e19)/1e19}function i(e){var t=null;try{t=JSON.parse(e)}catch(r){}return t}function a(e,t){this.lockGetPrefix=e||"lock-get-prefix",this.lockSetPrefix=t||"lock-set-prefix"}function s(e){return"function"==typeof e||!(!e||"object"!=typeof e)&&s(e.listener)}function l(){this._events={}}function c(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function u(e){e=e||"";for(var t={},r=e.substring(1),n=r.split("&"),i=0;i Invalid URL");var r=e.split("#"),n=r[0],i=r.slice(1).join("#");t=this._regex.exec(n);for(var a in this._fields)"undefined"!=typeof t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new t(e)}function f(e){var t={},r=function(){var e;try{return e=new URL("http://modernizr.com/"),"http://modernizr.com/"===e.href}catch(t){return!1}};if("function"==typeof window.URL&&r())t=new URL(e),t.searchParams||(t.searchParams=function(){var e=u(t.search);return{get:function(t){return e[t]}}}());else{p(e)||(e=String(e)),e=d(e);var n=/^https?:\/\/.+/;if(n.test(e)===!1)return void pr.log("Invalid URL");var i=_(e);t.hash=i._values.Fragment,t.host=i._values.Host?i._values.Host+(i._values.Port?":"+i._values.Port:""):"",t.href=i._values.URL,t.password=i._values.Password,t.pathname=i._values.Path,t.port=i._values.Port,t.search=i._values.QueryString?"?"+i._values.QueryString:"",t.username=i._values.Username,t.hostname=i._values.Hostname,t.protocol=i._values.Protocol?i._values.Protocol+":":"",t.origin=i._values.Origin?i._values.Origin+(i._values.Port?":"+i._values.Port:""):"",t.searchParams=function(){var e=u("?"+i._values.QueryString);return{get:function(t){return e[t]}}}()}return t}function g(e){return!(!e||1!==e.nodeType)}function h(e){return void 0===e}function v(t){return Array.isArray&&e(v)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function y(e){return new gr(e)}function w(e,t,r,n){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation,e._getPath=i._getPath),e}function a(e,t,r,n){var a=function(a){if(a=a||i(window.event)){a.target=a.srcElement;var s,o,l=!0;return"function"==typeof r&&(s=r(a)),o=t.call(e,a),"beforeunload"!==n?(!1!==s&&!1!==o||(l=!1),l):void 0}};return a}i._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||y(e.target).getParents()},i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};var s=function(e,t,r){if(void 0===n&&"click"===t&&(n=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=i._getPath,r.call(this,e)},n);else{var s="on"+t,o=e[s];e[s]=a(e,r,o,t)}};s.apply(null,arguments)}function b(e){var t="pushState"in window.history?"popstate":"hashchange";w(window,t,e)}function S(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){pr.log(t)}}}function k(e,t,r){if(null==e)return!1;if(mr&&e.forEach===mr)e.forEach(t,r);else if(v(e))for(var n=0,i=e.length;n=200&&i.status<300||304==i.status?e.success(t(i.responseText)):e.error(t(i.responseText),i.status),i.onreadystatechange=null,i.onload=null)}catch(r){i.onreadystatechange=null,i.onload=null}},i.open(e.type,e.url,!0);try{e.credentials&&(i.withCredentials=!0),r(e.header)&&k(e.header,function(e,t){i.setRequestHeader&&i.setRequestHeader(t,e)}),e.data&&(e.cors||i.setRequestHeader&&i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?i.setRequestHeader&&i.setRequestHeader("Content-type","application/json; charset=UTF-8"):i.setRequestHeader&&i.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(l){pr.log(l)}i.send(e.data||null)}function $(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(k(e,function(e,n,i){r.push(t(e,n,i))}),r)}function C(e){var t=[];try{t=$(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function j(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function O(e,t){t=t||window;var r=!1,n=!0,i=t.document,a=i.documentElement,s=i.addEventListener,o=s?"addEventListener":"attachEvent",l=s?"removeEventListener":"detachEvent",c=s?"":"on",u=function(n){"readystatechange"==n.type&&"complete"!=i.readyState||(("load"==n.type?t:i)[l](c+n.type,u,!1),!r&&(r=!0)&&e.call(t,n.type||n))},p=function(){try{a.doScroll("left")}catch(e){return void setTimeout(p,50)}u("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!s&&a.doScroll){try{n=!t.frameElement}catch(d){pr.log(d)}n&&p()}i[o](c+"DOMContentLoaded",u,!1),i[o](c+"readystatechange",u,!1),t[o](c+"load",u,!1)}}function T(e){return k(Array.prototype.slice.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])}),e}function A(e){var t=e;try{t=decodeURI(e)}catch(r){t=e}return t}function D(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",r=t.length-1,n={},i=0;for(i=0;i=2&&!/^(\d+\.)+\d+$/.test(n))for(var a="."+i.splice(i.length-1,1);i.length>0;)if(a="."+i.splice(i.length-1,1)+a,document.cookie=t+"=true; path=/; domain="+a,document.cookie.indexOf(t+"=true")!==-1){var s=new Date;return s.setTime(s.getTime()-1e3),document.cookie=t+"=true; expires="+s.toGMTString()+"; path=/; SameSite=Lax; domain="+a,a}return""}function B(e){function t(e,t){e=d(e);var r;if("body"===e)return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var n=e.split(":nth-of-type");if(!n[0]||!n[1])return null;var i=n[0],a=n[1].match(/\(([0-9]+)\)/);if(!a||!a[1])return null;var s=Number(a[1]);if(!(g(t)&&t.children&&t.children.length>0))return null;for(var o=t.children,l=0;l0)return null}return r?r:null}function r(e){var i,a=n.shift();if(!a)return e;try{i=t(a,e)}catch(s){pr.log(s)}return i&&g(i)?r(i):null}if(!p(e))return null;var n=e.split(">"),i=null;return i=r(),i&&g(i)?i:null}function R(e,t){var r="",n="";return e.textContent?r=d(e.textContent):e.innerText&&(r=d(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),n=r||"","input"!==t&&"INPUT"!==t||(n=e.value||""),n}function M(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=f(e).hostname}catch(n){pr.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function V(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function K(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=c(e);var r="[\\?&]"+t+"=([^&#]*)",n=new RegExp(r),i=n.exec(e);return null===i||i&&"string"!=typeof i[1]&&i[1].length?"":c(i[1])}function q(e){var t={},r=e.split("?"),n=r[1]||"";return n&&(t=u("?"+n)),t}function F(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function z(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(F()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function W(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function X(e){return p(e)?(e=d(e),A(e)):A(location.href)}function Z(e){return p(e)?(e=d(e),A(e)):A(location.pathname)}function Y(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function G(e,t){if("string"==typeof t)return Y(e,t);if(v(t)){for(var r=!1,n=0;n0)for(var a=e.split(""),s=0;st)for(i=r+i;l=n*i+o,lt;)i=i/2+o;i=n*i+o}return i}function te(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var n=0;n41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function pe(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function de(t){if(!r(t)||!p(t.callbackName))return pr.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;t.success=e(t.success)?t.success:function(){},t.error=e(t.error)?t.error:function(){},t.data=t.data||"";var n=document.createElement("script"),i=document.getElementsByTagName("head")[0],a=null,s=!1;if(i.appendChild(n),ce(t.timeout)&&(a=setTimeout(function(){return!s&&(t.error("timeout"),window[t.callbackName]=function(){pr.log("call jsonp error")},a=null,i.removeChild(n),void(s=!0))},t.timeout)),window[t.callbackName]=function(){clearTimeout(a),a=null,t.success.apply(null,arguments),window[t.callbackName]=function(){pr.log("call jsonp error")},i.removeChild(n)},t.url.indexOf("?")>-1?t.url+="&callbackName="+t.callbackName:t.url+="?callbackName="+t.callbackName,r(t.data)){var o=[];k(t.data,function(e,t){o.push(t+"="+e)}),t.data=o.join("&"),t.url+="&"+t.data}n.onerror=function(e){return!s&&(window[t.callbackName]=function(){pr.log("call jsonp error")},clearTimeout(a),a=null,i.removeChild(n),t.error(e),void(s=!0))},n.src=t.url}function _e(t){var r={visibleHandler:e(t.visible)?t.visible:function(){},hiddenHandler:e(t.hidden)?t.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;w(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else w(window,"focus",this.visibleHandler),w(window,"blur",this.hiddenHandler)}};r.init()}function fe(e){e=P({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&(t=document.createElement("link"),t.rel="stylesheet",t.href=e.url),"js"===e.type&&(t=document.createElement("script"),t.async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function ge(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function he(e,t){e=String(e),t="number"==typeof t?t:13;for(var r=126,n=e.split(""),i=0,a=n.length;ir?(o&&(clearTimeout(o),o=null),l=u,s=e.apply(i,a),o||(i=a=null)):o||n.trailing===!1||(o=setTimeout(c,p)),s}}function Se(e){var t=[];return null==e?t:(k(e,function(e){t[t.length]=e}),t)}function ke(e){return e?e.toArray?e.toArray():v(e)||ne(e)?Array.prototype.slice.call(e):Se(e):[]}function Pe(e){for(var t,r=[],n={},i=0;icr.para.datasend_timeout&&(cr.para.datasend_timeout=cr.para.callback_timeout),cr.para.heatmap&&cr.para.heatmap.collect_tags&&r(cr.para.heatmap.collect_tags)&&k(cr.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&cr.heatmap.otherTags.push(t)}),cr.para.heatmap&&"default"===cr.para.heatmap.clickmap&&cr.heatmap.initUnlimitedTags()}function Qe(e){var t={};for(var r in e)t[r]=e[r];cr.store._state.identities=t,cr.store.save()}function et(){cr._t=cr._t||1*new Date,cr.lib_version=xr,cr.is_first_visitor=!1,cr.source_channel_standard=Dr}function tt(){if(Sr.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){cr.log("enableLocalLog error: "+e.message)}}function rt(){Sr.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")}function nt(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&Xr[t]?Xr[t].apply(Xr,r):void("function"==typeof t?t.apply(cr,r):cr.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0]))}function it(t,n){return p(t)?r(window.SensorsDataWebJSSDKPlugin)&&r(window.SensorsDataWebJSSDKPlugin[t])&&e(window.SensorsDataWebJSSDKPlugin[t].init)?(window.SensorsDataWebJSSDKPlugin[t].init(cr,n),window.SensorsDataWebJSSDKPlugin[t]):r(cr.modules)&&r(cr.modules[t])&&e(cr.modules[t].init)?(cr.modules[t].init(cr,n),cr.modules[t]):void cr.log(t+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+t+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"):(cr.log("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1)}function at(e,t,r){Fr.check({event:e,properties:t})&&Fr.send({type:"track",event:e,properties:t},r)}function st(e,t){return!!Fr.check({bindKey:e,bindValue:t})&&(cr.store._state.identities[e]=t,cr.store.save(),void Fr.send({type:"track_id_bind",event:"$BindID",properties:{}}))}function ot(e,t){if(!Fr.check({unbindKey:e,bindValue:t}))return!1;if(r(cr.store._state.identities)&&cr.store._state.identities.hasOwnProperty(e)&&cr.store._state.identities[e]===t){var n=cr.store.getUnionId().login_id;n&&e+"+"+t===n&&(cr.store._state.distinct_id=cr.store._state.first_id,cr.store._state.first_id="",cr.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete cr.store._state.identities[e],cr.store.save())}var i={};i[e]=t,Fr.send({identities:i,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function lt(e,t,r){function n(e,t,r){function n(e){function n(){a||(a=!0,location.href=i.href)}e.stopPropagation(),e.preventDefault();var a=!1;setTimeout(n,1e3),cr.track(t,r,n)}e=e||{};var i=null;return e.ele&&(i=e.ele),e.event&&(i=e.target?e.target:e.event.target),r=r||{},!(!i||"object"!=typeof i)&&(!i.href||/^javascript/.test(i.href)||i.target||i.download||i.onclick?(cr.track(t,r),!1):(e.event&&n(e.event),void(e.ele&&Fe(e.ele,"click",function(e){n(e)}))))}"object"==typeof e&&e.tagName?n({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&n(e,t,r)}function ct(e,t,r){return r=r||{}, +!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void Fe(e,"click",function(n){function i(){a||(a=!0,location.href=e.href)}n.preventDefault();var a=!1;setTimeout(i,1e3),cr.track(t,r,i)}))}function ut(e,t,r){Fr.check({item_type:e,item_id:t,properties:r})&&Fr.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function pt(e,t){Fr.check({item_type:e,item_id:t})&&Fr.sendItem({type:"item_delete",item_type:e,item_id:t})}function dt(e,t){Fr.check({propertiesMust:e})&&Fr.send({type:"profile_set",properties:e},t)}function _t(e,t){Fr.check({propertiesMust:e})&&Fr.send({type:"profile_set_once",properties:e},t)}function ft(e,t){Fr.check({propertiesMust:e})&&(k(e,function(t,r){p(t)?e[r]=[t]:v(t)?e[r]=t:(delete e[r],cr.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),ae(e)||Fr.send({type:"profile_append",properties:e},t))}function gt(e,t){function r(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}var n=e;p(e)&&(e={},e[n]=1),Fr.check({propertiesMust:e})&&(r(e)?Fr.send({type:"profile_increment",properties:e},t):cr.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"))}function ht(e){Fr.send({type:"profile_delete"},e),Rr.set("distinct_id",fr()),Rr.set("first_id","")}function mt(e,t){var r=e,n={};p(e)&&(e=[],e.push(r)),v(e)?(k(e,function(e){p(e)?n[e]=!0:cr.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),Fr.send({type:"profile_unset",properties:n},t)):cr.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")}function vt(e,t){function r(e){cr.store._state.identities.$identity_anonymous_id=e,cr.store.save()}"number"==typeof e&&(e=String(e));var n=Rr.getFirstId();if("undefined"==typeof e){var i=fr();n?Rr.set("first_id",i):Rr.set("distinct_id",i),r(i)}else Fr.check({distinct_id:e})&&(t===!0?n?Rr.set("first_id",e):Rr.set("distinct_id",e):n?Rr.change("first_id",e):Rr.change("distinct_id",e),r(e))}function yt(e,t,r,n){var i=Rr.getFirstId()||Rr.getDistinctId();Rr.set("distinct_id",e),Fr.send({original_id:i,distinct_id:cr.store.getDistinctId(),type:"track_signup",event:t,properties:r},n)}function wt(e,t,r,n){"number"==typeof e&&(e=String(e)),Fr.check({distinct_id:e,event:t,properties:r})&&yt(e,t,r,n)}function bt(e){Fr.check({properties:e})?P(Ur.currentProps,e):cr.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function St(e){Rr.clearAllProps(e)}function kt(e){var t;if(v(e)&&e.length>0)for(t=0;t-1?e.config.send_type:cr.para.send_type,"beacon"===r&&ue()===!1&&(r="image"),"ajax"===r&&pe()===!1&&(r="image"),r}function Ut(e){var t=Lt(e);switch(t){case"image":return new tn(e);case"ajax":return new rn(e);case"beacon":return new nn(e);default:return new tn(e)}}function Jt(e){var t=Ut(e),r=t.start;return t.start=function(){var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},cr.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},cr.para.datasend_timeout-cr.para.callback_timeout)},t.isEnd=function(){this.received||(this.received=!0,this.end())},t}function Ht(){this.sendTimeStamp=0,this.timer=null,this.serverUrl="",this.hasTabStorage=!1,this.recycle()}function Bt(t){var r=location.href,n=window.history.pushState,i=window.history.replaceState;e(window.history.pushState)&&(window.history.pushState=function(){n.apply(window.history,arguments),t(r),r=location.href}),e(window.history.replaceState)&&(window.history.replaceState=function(){i.apply(window.history,arguments),t(r),r=location.href});var a;a=window.document.documentMode?"hashchange":n?"popstate":"hashchange",w(window,a,function(){t(r),r=location.href})}function Rt(e){var t=null,r=new RegExp(e+"=([^&#]+)");try{var n=JSON.parse(window.name);k(n,function(r,n){e===n&&(t=decodeURIComponent(r))})}catch(i){t=null}if(null===t){var a=location.href.match(r);a&&a[0]&&a[1]&&(t=c(a[1]))}return t}function Mt(e){function t(){var e=[];n.touch_app_bridge||e.push(cr.debug.defineMode("1")),r(cr.para.app_js_bridge)||(e.push(cr.debug.defineMode("2")),n.verify_success=!1),r(cr.para.heatmap)&&"default"==cr.para.heatmap.clickmap||e.push(cr.debug.defineMode("3")),"fail"===n.verify_success&&e.push(cr.debug.defineMode("4"));var t={callType:"app_alert",data:e};SensorsData_App_Visual_Bridge&&SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info?SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info(JSON.stringify(t)):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.sensorsdataNativeTracker&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage(JSON.stringify(t))}var n=cr.bridge.bridge_info;if(r(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode===!0||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode()))if(r(cr.para.heatmap)&&"default"==cr.para.heatmap.clickmap)if(r(cr.para.app_js_bridge)&&"success"===n.verify_success)if(e)sa_jssdk_app_define_mode(cr,e);else{var i=location.protocol,a=["http:","https:"];i=te(a,i)>-1?i:"https:",fe({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_app_define_mode&&sa_jssdk_app_define_mode(cr,e)},0)},error:function(){},type:"js",url:i+"//static.sensorsdata.cn/sdk/"+cr.lib_version+"/vapph5define.min.js"})}else t();else t()}function Vt(){cr.para.is_track_single_page&&mn.on("switch",function(e){var t=function(t){t=t||{},e!==location.href&&(Ur.pageProp.referrer=X(e),cr.quick("autoTrack",P({$url:X(),$referrer:X(e)},t)))};if("boolean"==typeof cr.para.is_track_single_page)t();else if("function"==typeof cr.para.is_track_single_page){var n=cr.para.is_track_single_page();r(n)?t(n):n===!0&&t()}})}function Kt(){cr._q&&v(cr._q)&&cr._q.length>0&&k(cr._q,function(e){cr[e[0]].apply(cr,Array.prototype.slice.call(e[1]))}),r(cr.para.heatmap)&&(Wr.initHeatmap(),Wr.initScrollmap())}function qt(){cr.readyState.setState(3),new cr.JSBridge({type:"visualized",app_call_js:function(){Mt("undefined"!=typeof sa_jssdk_app_define_mode?!0:!1)}}),Mt(!1),cr.bridge.app_js_bridge_v1(),Ur.initPage(),Vt(),cr.para.batch_send&&cr.batchSend.batchInterval(),cr.store.init(),cr.vtrackBase.init(),cr.readyState.setState(4),Kt()}function Ft(){yn.isSeachHasKeyword()?yn.hasKeywordHandle():window.parent!==self&&wn.isSearchHasKeyword()?wn.verifyVtrackMode():yn.isStorageHasKeyword()?yn.storageHasKeywordHandle():window.parent!==self&&wn.isStorageHasKeyword()?wn.verifyVtrackMode():(qt(),wn.notifyUser())}function zt(){k(bn,function(e){var t=cr[e];cr[e]=function(){if(cr.readyState.state<3)return v(cr._q)||(cr._q=[]),cr._q.push([e,arguments]),!1;{if(cr.readyState.getState())return t.apply(cr,arguments);try{console.error("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}catch(r){cr.log(r)}}}})}function Wt(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function Xt(e,t,r){var n=null;try{n=JSON.parse(JSON.stringify(e))}catch(i){Ne(i)}this.getOriginalData=function(){return n},this.getPosition=function(){return t},this.cancelationToken=new Wt,this.sensors=r}function Zt(e){if(!r(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}function Yt(e){e&&e.dataStage&&Pn.registerStageImplementation(e.dataStage)}function Gt(e){e.kit=en,e.saEvent=Fr,this.dataStage=qr}function Qt(t){return r(t)?(k(t,function(r,n){if(v(r)){var i=[];k(r,function(e){p(e)?i.push(e):Ne("\u60a8\u7684\u6570\u636e-",n,r,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),t[n]=i}p(r)||ce(r)||x(r)||ie(r)||v(r)||e(r)||"$option"===n||(Ne("\u60a8\u7684\u6570\u636e-",n,r,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete t[n])}),t):t}function er(e,t){return ce(t)&&e.length>t?(Ne("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function tr(e){var t=["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"];r(e)&&k(t,function(t,r){t in e&&(r<3?(delete e[t],Ne("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):Ne("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d"))})}function rr(e){var t=["$element_selector","$element_path"],n=["sensorsdata_app_visual_properties"];r(e)&&k(e,function(i,a){if(r(i))rr(e[a]);else if(p(i)){if(te(n,a)>-1)return;e[a]=er(i,te(t,a)>-1?1024:Cr.max_string_length)}})}function nr(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function ir(e){if("item_type"in e){var t=e.item_type,r=function(t){return t||delete e.item_type,!0};Xe({item_type:t},r)}if("item_id"in e){var n=e.item_id,i=function(t,r,n){return t||"string"!==n||delete e.item_id,!0};Xe({item_id:n},i)}}function ar(e){k(e,function(t,r){var n=function(t,n,i){return t||"keyLength"===i||delete e[r],!0};Xe({propertyKey:r},n)})}function sr(e){var t=e.properties;r(t)?(Qt(t),tr(t),nr(e),ar(t),rr(t)):"properties"in e&&(e.properties={}),ve(e),ir(e)}function or(){this.dataStage=Nn}function lr(e){e&&(pr.setup(Ne),cr._=P($r,Qr),cr.ee=vn,cr.sendState=an,cr.events=new cr._.EventEmitterSa,cr.batchSend=ln,cr.bridge=cn,cr.JSBridge=un,cr.store=Rr,cr.vtrackBase=pn,cr.unlimitedDiv=dn,cr.customProp=_n,cr.vtrackcollect=fn,cr.vapph5collect=hn,cr.heatmap=Wr,cr.detectMode=Ft,cr.registerFeature=Yt,Yt(new Gt(cr)),Yt(new or(cr)));var t=e?Yr:Sn;for(var r in t)cr[r]=t[r]}var cr={};(function(){function e(n,i){function a(e,t){try{e()}catch(r){t&&t()}}function s(e){if(null!=s[e])return s[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=s("json-stringify")&&s("date-serialization")&&s("json-parse");else if("date-serialization"==e){if(t=s("json-stringify")&&w){var r=i.stringify;a(function(){t='"-271821-04-20T00:00:00.000Z"'==r(new p((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==r(new p(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new p((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==r(new p((-1)))})}}else{var n,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var r=i.stringify,u="function"==typeof r;u&&((n=function(){return 1}).toJSON=n,a(function(){u="0"===r(0)&&"0"===r(new l)&&'""'==r(new c)&&r(v)===h&&r(h)===h&&r()===h&&"1"===r(n)&&"[1]"==r([n])&&"[null]"==r([h])&&"null"==r(null)&&"[null,null,null]"==r([h,v,null])&&r({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==o&&"1"===r(null,n)&&"[\n 1,\n 2\n]"==r([1,2],null,1)},function(){u=!1})),t=u}if("json-parse"==e){var d,_=i.parse;"function"==typeof _&&a(function(){0!==_("0")||_(!1)||(n=_(o),d=5==n.a.length&&1===n.a[0],d&&(a(function(){d=!_('"\t"')}),d&&a(function(){d=1!==_("01")}),d&&a(function(){d=1!==_("1.")})))},function(){d=!1}),t=d}}return s[e]=!!t}function o(e){return D(this)}n||(n=r.Object()),i||(i=r.Object());var l=n.Number||r.Number,c=n.String||r.String,u=n.Object||r.Object,p=n.Date||r.Date,d=n.SyntaxError||r.SyntaxError,_=n.TypeError||r.TypeError,f=n.Math||r.Math,g=n.JSON||r.JSON;if("object"==typeof g&&g)return i.stringify=g.stringify,i.parse=g.parse,i.runInContext=e,i;var h,m=u.prototype,v=m.toString,y=m.hasOwnProperty,w=new p((-0xc782b5b800cec));if(a(function(){w=w.getUTCFullYear()==-109252&&0===w.getUTCMonth()&&1===w.getUTCDate()&&10==w.getUTCHours()&&37==w.getUTCMinutes()&&6==w.getUTCSeconds()&&708==w.getUTCMilliseconds()}),s["bug-string-char-index"]=s["date-serialization"]=s.json=s["json-stringify"]=s["json-parse"]=null,!s("json")){var b="[object Function]",S="[object Date]",k="[object Number]",P="[object String]",N="[object Array]",$="[object Boolean]",C=s("bug-string-char-index"),j=function(e,r){var n,i,a,s=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n;for(a in i)y.call(i,a)&&s++;return n=i=null,s?j=function(e,t){var r,n,i=v.call(e)==b;for(r in e)i&&"prototype"==r||!y.call(e,r)||(n="constructor"===r)||t(r);(n||y.call(e,r="constructor"))&&t(r)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],j=function(e,r){var n,a,s=v.call(e)==b,o=!s&&"function"!=typeof e.constructor&&t[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(n in e)s&&"prototype"==n||!o.call(e,n)||r(n);for(a=i.length;n=i[--a];)o.call(e,n)&&r(n)}),j(e,r)};if(!s("json-stringify")&&!s("date-serialization")){var O={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},T="000000",A=function(e,t){return(T+(t||0)).slice(-e)},D=function(e){var t,r,n,i,a,s,o,l,c;if(w)t=function(e){r=e.getUTCFullYear(),n=e.getUTCMonth(),i=e.getUTCDate(),s=e.getUTCHours(),o=e.getUTCMinutes(),l=e.getUTCSeconds(),c=e.getUTCMilliseconds()};else{var u=f.floor,p=[0,31,59,90,120,151,181,212,243,273,304,334],d=function(e,t){return p[t]+365*(e-1970)+u((e-1969+(t=+(t>1)))/4)-u((e-1901+t)/100)+u((e-1601+t)/400)};t=function(e){for(i=u(e/864e5),r=u(i/365.2425)+1970-1;d(r+1,0)<=i;r++);for(n=u((i-d(r,0))/30.42);d(r,n+1)<=i;n++);i=1+i-d(r,n),a=(e%864e5+864e5)%864e5,s=u(a/36e5)%24,o=u(a/6e4)%60,l=u(a/1e3)%60,c=a%1e3}}return(D=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+A(6,r<0?-r:r):A(4,r))+"-"+A(2,n+1)+"-"+A(2,i)+"T"+A(2,s)+":"+A(2,o)+":"+A(2,l)+"."+A(3,c)+"Z",r=n=i=s=o=l=c=null):e=null,e})(e)};if(s("json-stringify")&&!s("date-serialization")){var x=i.stringify;i.stringify=function(e,t,r){var n=p.prototype.toJSON;p.prototype.toJSON=o;var i=x(e,t,r);return p.prototype.toJSON=n,i}}else{var I="\\u00",E=function(e){var t=e.charCodeAt(0),r=O[t];return r?r:I+A(2,t.toString(16))},L=/[\x00-\x1f\x22\x5c]/g,U=function(e){return L.lastIndex=0,'"'+(L.test(e)?e.replace(L,E):e)+'"'},J=function(e,t,r,n,i,s,o){var l,c,u,d,f,g,m,y,w;if(a(function(){l=t[e]}),"object"==typeof l&&l&&(l.getUTCFullYear&&v.call(l)==S&&l.toJSON===p.prototype.toJSON?l=D(l):"function"==typeof l.toJSON&&(l=l.toJSON(e))),r&&(l=r.call(t,e,l)),l==h)return l===h?l:"null";switch(c=typeof l,"object"==c&&(u=v.call(l)),u||c){case"boolean":case $:return""+l;case"number":case k:return l>-1/0&&l<1/0?""+l:"null";case"string":case P:return U(""+l)}if("object"==typeof l){for(m=o.length;m--;)if(o[m]===l)throw _();if(o.push(l),d=[],y=s,s+=i,u==N){for(g=0,m=l.length;g0)for(n>10&&(n=10),i="";i.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||V();e+=R("0x"+a.slice(t,H));break;default:V()}else{if(34==i)break;for(i=a.charCodeAt(H),t=H;i>=32&&92!=i&&34!=i;)i=a.charCodeAt(++H);e+=a.slice(t,H)}if(34==a.charCodeAt(H))return H++,e;V();default:if(t=H,45==i&&(n=!0,i=a.charCodeAt(++H)),i>=48&&i<=57){for(48==i&&(i=a.charCodeAt(H+1),i>=48&&i<=57)&&V(),n=!1;H=48&&i<=57);H++);if(46==a.charCodeAt(H)){for(r=++H;r57));r++);r==H&&V(),H=r}if(i=a.charCodeAt(H),101==i||69==i){for(i=a.charCodeAt(++H),43!=i&&45!=i||H++,r=H;r57));r++);r==H&&V(),H=r}return+a.slice(t,H)}n&&V();var o=a.slice(H,H+4);if("true"==o)return H+=4,!0;if("fals"==o&&101==a.charCodeAt(H+4))return H+=5,!1;if("null"==o)return H+=4,null;V()}return"$"},q=function(e){var t,r;if("$"==e&&V(),"string"==typeof e){if("@"==(C?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=K(),"]"!=e;)r?","==e?(e=K(),"]"==e&&V()):V():r=!0,","==e&&V(),t.push(q(e));return t}if("{"==e){for(t={};e=K(),"}"!=e;)r?","==e?(e=K(),"}"==e&&V()):V():r=!0,","!=e&&"string"==typeof e&&"@"==(C?e.charAt(0):e[0])&&":"==K()||V(),t[e.slice(1)]=q(K());return t}V()}return e},F=function(e,t,r){var n=z(e,t,r);n===h?delete e[t]:e[t]=n},z=function(e,t,r){var n,i=e[t];if("object"==typeof i&&i)if(v.call(i)==N)for(n=i.length;n--;)F(v,j,i,n,r);else j(i,function(e){F(i,e,r)});return r.call(e,t,i)};i.parse=function(e,t){var r,n;return H=0,B=""+e,r=q(K()),"$"!=K()&&V(),H=B=null,t&&v.call(t)==b?z((n={},n[""]=r,n),"",t):r}}}return i.runInContext=e,i}var t={"function":!0,object:!0},r=t[typeof window]&&window||this,n=r.JSON,i=r.JSON3,a=!1,s=e(r,r.JSON3={noConflict:function(){return a||(a=!0,r.JSON=n,r.JSON3=i,n=i=null),s}});r.JSON={parse:s.parse,stringify:s.stringify}}).call(window),function(e,t){t(e)}(window,function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=function(e){var t=function(t){return e(String(t).replace(/[\t\n\f\r ]+/g,""))};return t.original=e,t}(e.atob)}else{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,n,i,a,s="",o=0,l=e.length%3;o255||(i=e.charCodeAt(o++))>255||(a=e.charCodeAt(o++))>255)return"";t=n<<16|i<<8|a,s+=r.charAt(t>>18&63)+r.charAt(t>>12&63)+r.charAt(t>>6&63)+r.charAt(63&t)}return l?s.slice(0,l-3)+"===".substring(l):s},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!n.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,i,a,s="",o=0;o>16&255):64===a?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return s}}}),function(){String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)})}();var ur,pr={setup:function(e){ur=e},log:function(){(ur||console&&console.log||function(){}).apply(null,arguments)}},dr={get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t;try{t=JSON.parse(dr.get(e))||null}catch(r){pr.log(r)}return t},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(r){pr.log(r)}},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__local_store_support__",r="testIsSupportStorage";dr.set(t,r),dr.get(t)!==r&&(e=!1),dr.remove(t)}catch(n){e=!1}return e}},_r=function(){function e(){return r=(9301*r+49297)%233280,r/233280}var t=new Date,r=t.getTime();return function(t){return Math.ceil(e()*t)}}();a.prototype.get=function(e,r,a,s){if(!e)throw new Error("key is must");r=r||1e4,a=a||1e3,s=s||function(){};var o=this.lockGetPrefix+e,l=dr.get(o),c=String(n());return l&&(l=i(l)||{randomNum:0,expireTime:0},l.expireTime>t())?s(null):(dr.set(o,JSON.stringify({randomNum:c,expireTime:t()+r})),void setTimeout(function(){l=i(dr.get(o))||{randomNum:0,expireTime:0},l&&l.randomNum===c?(s(dr.get(e)),dr.remove(e),dr.remove(o)):s(null)},a))},a.prototype.set=function(e,r,a,s,o){if(!e||!r)throw new Error("key and val is must");a=a||1e4,s=s||1e3,o=o||function(){};var l=this.lockSetPrefix+e,c=dr.get(l),u=String(n());return c&&(c=i(c)||{randomNum:0,expireTime:0},c.expireTime>t())?o({status:"fail",reason:"This key is locked"}):(dr.set(l,JSON.stringify({randomNum:u,expireTime:t()+a})),void setTimeout(function(){c=i(dr.get(l))||{randomNum:0,expireTime:0},c.randomNum===u?dr.set(e,r)&&o({status:"success"}):o({status:"fail",reason:"This key is locked"})},s))},l.prototype.on=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].push(r?t:{listener:t,once:!1}),this},l.prototype.prepend=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].unshift(r?t:{listener:t,once:!1}),this},l.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},l.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},l.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var n=0,i=r.length;n=4&&(a=e(a,i),i=[]);return i.length>0&&(a=e(a,i)),a.toString(16)};return function(){var i=String(screen.height*screen.width);i=i&&/\d{5,}/.test(i)?i.toString(16):String(31242*n()).replace(".","").slice(0,8);var a=e()+"-"+t()+"-"+r()+"-"+i+"-"+e();return a?a:(String(n())+String(n())+String(n())).slice(2,15)}}(),gr=function(e){this.ele=e},hr=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};gr.prototype={addClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")===-1&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1},attr:function(e,t){return"string"==typeof e&&h(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument,r=t.documentElement;return{top:e.top+window.pageYOffset-r.clientTop,left:e.left+window.pageXOffset-r.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),y(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!v(r))return null;for(var n=r.length-1;n>=0;n--){var i=r[n];if(t=i.style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return hr((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return hr(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return e=e&&11!==e.nodeType?e:null,y(e)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return y(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return y(e);return y(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),n=[],i=0;i0&&(e=e.concat(Cr.source_channel),e=Pe(e)),k(e,function(e){t=K(location.href,e),t.length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=Ur.campaignParams(),n={},i={};return k(r,function(r,a,s){(" "+Dr+" ").indexOf(" "+a+" ")!==-1?n[e+a]=s[a]:i[t+a]=s[a]}),{$utms:n,otherUtms:i}},properties:function(){var e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,r={$timezone_offset:(new Date).getTimezoneOffset(),$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$viewport_height:e,$viewport_width:t,$lib:"js",$lib_version:xr};return r},currentProps:{},register:function(e){P(Ur.currentProps,e)}},Jr={get:function(e){return wr.get(e)},set:function(e,t,r,n){var i="";if(n="undefined"==typeof n?Cr.cross_subdomain:n){var a=De(location.href);"url\u89e3\u6790\u5931\u8d25"===a&&(a=""),i=a?"; domain="+a:""}return wr.set(e,t,r,n,Cr.set_cookie_samesite,Cr.is_secure_cookie,i)},remove:function(e,t){return t="undefined"==typeof t?Cr.cross_subdomain:t,wr.remove(e,t)},isSupport:function(e,t){return e=e||"sajssdk_2015_cookie_access_test",t=t||"1",wr.isSupport(e,t)}};Jr.getNewUser=We;var Hr={data:{},get:function(e){var t=this.data[e];return void 0===t?null:void 0!==t._expirationTimestamp_?(new Date).getTime()>t._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var n,i=new Date;n="s"===String(r).slice(-1)?i.getTime()+1e3*Number(String(r).slice(0,-1)):i.getTime()+24*r*60*60*1e3,t={value:t,_expirationTimestamp_:n}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+Cr.sdk_id+e}},Br={checkIsAddSign:function(e){"track"===e.type&&(We()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=Jr.get("sensorsdata2015jssdkcross"+cr.para.sdk_id);r=Ce(r);var n={};null!=r&&le(r)&&(n=JSON.parse(r),n.$device_id&&(t=n.$device_id)),t=t||e,cr.para.cross_subdomain===!0?cr.store.set("$device_id",t):(n.$device_id=t,n=JSON.stringify(n),cr.para.encrypt_cookie&&(n=je(n)),Jr.set("sensorsdata2015jssdkcross"+cr.para.sdk_id,n,null,!0)),cr.para.is_track_device_id&&(Ur.currentProps.$device_id=t)},storeInitCheck:function(){if(cr.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};Jr.isSupport()?Jr.set(ze("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):Hr.set(Hr.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else We()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=Ur.pageProp.url_domain,t={};""===e&&(e="url\u89e3\u6790\u5931\u8d25");var n=Be(document.referrer,!0);if(cr.para.preset_properties.search_keyword_baidu?Ue(document.referrer)&&(!Ie()||r(n)&&n.active?cr.store._state&&cr.store._state.props&&(cr.store._state.props.$search_keyword_id&&delete cr.store._state.props.$search_keyword_id,cr.store._state.props.$search_keyword_id_type&&delete cr.store._state.props.$search_keyword_id_type,cr.store._state.props.$search_keyword_id_hash&&delete cr.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=Lr.id(),t.$search_keyword_id_type=Lr.type(),t.$search_keyword_id_hash=ee(t.$search_keyword_id))):cr.store._state&&cr.store._state.props&&(cr.store._state.props.$search_keyword_id&&delete cr.store._state.props.$search_keyword_id,cr.store._state.props.$search_keyword_id_type&&delete cr.store._state.props.$search_keyword_id_type,cr.store._state.props.$search_keyword_id_hash&&delete cr.store._state.props.$search_keyword_id_hash),cr.store.save(),k(cr.para.preset_properties,function(n,i){if(i.indexOf("latest_")===-1)return!1;if(i=i.slice(7),n){if("wx_ad_click_id"===i&&"not_collect"===n)return!1;if("utm"!==i&&"url\u89e3\u6790\u5931\u8d25"===e)"wx_ad_click_id"===i?(t._latest_wx_ad_click_id="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_hash_key="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_callbacks="url\u7684domain\u89e3\u6790\u5931\u8d25"):t["$latest_"+i]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(Ue(document.referrer))switch(i){case"traffic_source_type":t.$latest_traffic_source_type=Me();break;case"referrer":t.$latest_referrer=Ur.pageProp.referrer;break;case"search_keyword":Be()?t.$latest_search_keyword=Be():r(cr.store._state)&&r(cr.store._state.props)&&cr.store._state.props.$latest_search_keyword&&delete cr.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=X();break;case"wx_ad_click_id":var a=Re(location.href);t._latest_wx_ad_click_id=a.click_id,t._latest_wx_ad_hash_key=a.hash_key,t._latest_wx_ad_callbacks=a.callbacks}}else if("utm"===i&&cr.store._state&&cr.store._state.props)for(var s in cr.store._state.props)(0===s.indexOf("$latest_utm")||0===s.indexOf("_latest_")&&s.indexOf("_latest_wx_ad_")<0)&&delete cr.store._state.props[s];else if(cr.store._state&&cr.store._state.props&&"$latest_"+i in cr.store._state.props)delete cr.store._state.props["$latest_"+i];else if("wx_ad_click_id"==i&&cr.store._state&&cr.store._state.props&&n===!1){var o=["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"];k(o,function(e){e in cr.store._state.props&&delete cr.store._state.props[e]})}}),cr.register(t),cr.para.preset_properties.latest_utm){var i=Ur.campaignParamsStandard("$latest_","_latest_"),a=i.$utms,s=i.otherUtms;ae(a)||cr.register(a),ae(s)||cr.register(s)}}},Rr={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={};e=e||this._state;var r=e._first_id||e.first_id,n=e._distinct_id||e.distinct_id;return r&&n?(t.login_id=n,t.anonymous_id=r):t.anonymous_id=n,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==cr.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=Jr.get("sensorsdata2015session");e=Ce(e);var t=null;null!==e&&"object"==typeof(t=i(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&cr.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;P(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;T(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};r=t?e:P(this._state.props||{},e);for(var n in r)"string"==typeof r[n]&&(r[n]=r[n].slice(0,cr.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};T(t,e),this.set("props",t)},clearAllProps:function(e){this._sessionState={};var t;if(v(e)&&e.length>0)for(t=0;tCr.max_id_length)},keyLength:function(e){return!(!p(e)||e.length>Cr.max_key_length)},stringLength:function(e){return!(!p(e)||e.length>Cr.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(te(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(te(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=Rr._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(te(this.bindReservedNames,e)>-1)}},Kr={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Id"),e(Mr[n])&&Mr[n](r),"idLength"===n)||t}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="eventName"),e(Mr[n])&&Mr[n](r)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="Property key"),e(Mr[n])&&Mr[n](r)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(t,r,n){return t||(r="Property Value",e(Mr[n])&&Mr[n](r)),!0}},properties:function(t){return r(t)?k(t,function(t,r){Xe({propertyKey:r});var n=function(t,n,i){return t||(n=r+"'s Value",e(Mr[i])&&Mr[i](n)),!0};Xe({propertyValue:t},n)}):Vr.voidZero(t)&&Ne("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return void 0!==e&&r(e)&&!ae(e)?this.properties.call(this,e):Ne("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="item_type"),e(Mr[n])&&Mr[n](r)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="item_id"),e(Mr[n])&&Mr[n](r)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="login_id_key"),e(Mr[n])&&Mr[n](r),"keyLength"===n)||t}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Key"),e(Mr[n])&&Mr[n](r),"keyLength"===n)||t}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Key"),e(Mr[n])&&Mr[n](r),"keyLength"===n)||t}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Value"),e(Mr[n])&&Mr[n](r),"idLength"===n)||t}},check:function(t,r,n){var i=this[t];if(e(i))return i.call(this,r);if(!i)return!1;for(var a=0;a-1)return n;if("area"===i&&"map"===a.tagName.toLowerCase()&&y(a).prev().tagName&&"img"===y(a).prev().tagName.toLowerCase())return y(a).prev();if("div"===i&&cr.para.heatmap.collect_tags.div&&r.isDivLevelValid(n)){var o=cr.para.heatmap&&cr.para.heatmap.collect_tags&&cr.para.heatmap.collect_tags.div&&cr.para.heatmap.collect_tags.div.max_level||1;if(o>1||r.isCollectableDiv(n))return n}if(r.isStyleTag(i)&&cr.para.heatmap.collect_tags.div){var l=r.getCollectableParent(n);if(l&&r.isDivLevelValid(l))return l}var c=r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)});return c||null},getDivLevels:function(e,t){var r=Wr.getElementPath(e,!0,t),n=r.split(" > "),i=0;return k(n,function(e){"div"===e&&i++}),i},isDivLevelValid:function(e){for(var t=cr.para.heatmap&&cr.para.heatmap.collect_tags&&cr.para.heatmap.collect_tags.div&&cr.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),n=r.length-1;n>=0;n--)if(Wr.getDivLevels(r[n],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var n=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){n.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){n.unshift(e.tagName.toLowerCase());break}if(e===document.body){n.unshift("body");break}n.unshift(e.tagName.toLowerCase()),e=e.parentNode}return n.join(" > ")},getClosestLi:function(e){var t=function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null};return t(e,"li")},getElementPosition:function(e,t,r){function n(e){var t=e.parentNode;if(!t)return"";var r=y(e).getSameTypeSiblings(),n=r.length;if(1===n)return 0;for(var i=0,a=e;y(a).previousElementSibling().ele;a=y(a).previousElementSibling().ele,i++);return i}var i=cr.heatmap.getClosestLi(e);if(!i)return null;var a=e.tagName.toLowerCase(),s=i.getElementsByTagName(a),o=s.length,l=[];if(o>1){for(var c=0;c1)return te(l,e)}return n(i)},setNotice:function(e){cr.is_heatmap_render_mode=!0,cr.para.heatmap||(cr.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(cr.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),cr.para.heatmap_url||(cr.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+cr.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,n=e.parentNode.children,i=0;i "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=xe({target:e});r.$element_selector=t?t:"",r.$element_path=cr.heatmap.getElementPath(e,cr.para.heatmap&&"not_use_id"===cr.para.heatmap.element_selector);var n=cr.heatmap.getElementPosition(e,r.$element_path,cr.para.heatmap&&"not_use_id"===cr.para.heatmap.element_selector);return ce(n)&&(r.$element_position=n),r},getPointerEventProp:function(e,t){function r(){var e=document.body.scrollLeft||document.documentElement.scrollLeft||0,t=document.body.scrollTop||document.documentElement.scrollTop||0;return{scrollLeft:e,scrollTop:t}}function n(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function i(e){return Number(Number(e).toFixed(3))}function a(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+n(t).targetEleX||0,s=e.pageY||e.clientY+r().scrollTop||e.offsetY+n(t).targetEleY||0;return{$page_x:i(a),$page_y:i(s)}}return e?a(e):{}},start:function(t,n,i,a,s){var o=r(a)?a:{},l=e(s)?s:e(a)?a:void 0;if(cr.para.heatmap&&cr.para.heatmap.collect_element&&!cr.para.heatmap.collect_element(n))return!1;var c=this.getEleDetail(n);if(cr.para.heatmap&&cr.para.heatmap.custom_property){var u=cr.para.heatmap.custom_property(n);r(u)&&(c=P(c,u))}c=P(c,this.getPointerEventProp(t,n),o),"a"===i&&cr.para.heatmap&&cr.para.heatmap.isTrackLink===!0?cr.trackLink({event:t,target:n},"$WebClick",c):cr.track("$WebClick",c,l)},hasElement:function(e,t){var r;if(e.event){var n=e.event;r=n.path||n._getPath&&n._getPath()}else e.element&&(r=y(e.element).getParents());if(r&&v(r)&&r.length>0)for(var i=0;i-1)&&(!t||cr.para.heatmap&&cr.para.heatmap.collect_tags&&cr.para.heatmap.collect_tags.div?!!(r(cr.para.heatmap)&&r(cr.para.heatmap.collect_tags)&&r(cr.para.heatmap.collect_tags.div)&&v(cr.para.heatmap.collect_tags.div.ignore_tags)&&te(cr.para.heatmap.collect_tags.div.ignore_tags,e)>-1):te(i,e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(n,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(a){cr.log(a)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,n=r?r.tagName.toLowerCase():"";if("body"===n)return!1;var i=cr.para&&cr.para.heatmap&&cr.para.heatmap.collect_tags&&cr.para.heatmap.collect_tags.div&&cr.para.heatmap.collect_tags.div.max_level;if(n&&"div"===n&&(i>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(n,t))return this.getCollectableParent(r,t)}catch(a){cr.log(a)}return!1},listenUrlChange:function(e){e(),cr.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!r(cr.para.heatmap)||"default"!==cr.para.heatmap.scroll_notice_map)return!1;var t=!0;cr.para.scrollmap&&e(cr.para.scrollmap.collect_url)&&this.listenUrlChange(function(){t=!!cr.para.scrollmap.collect_url()});var n=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t},i=n({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,n=new Date,i=n-this.current_time;(i>cr.para.heatmap.scroll_delay_time&&r-e.$viewport_position!==0||t)&&(e.$url=X(),e.$title=document.title,e.$url_path=Z(),e.event_duration=Math.min(cr.para.heatmap.scroll_event_duration,parseInt(i)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,cr.track("$WebStay",e)),this.current_time=n}});i.current_time=new Date,Fe(window,"scroll",function(){return!!t&&void i.go()}),Fe(window,"unload",function(){return!!t&&void i.go("notime")})},initHeatmap:function(){var t=this,n=!0;return!(!r(cr.para.heatmap)||"default"!==cr.para.heatmap.clickmap)&&(e(cr.para.heatmap.collect_url)&&this.listenUrlChange(function(){n=!!cr.para.heatmap.collect_url()}),"all"===cr.para.heatmap.collect_elements?cr.para.heatmap.collect_elements="all":cr.para.heatmap.collect_elements="interact",void("all"===cr.para.heatmap.collect_elements?Fe(document,"click",function(e){if(!n)return!1;var r=e||window.event;if(!r)return!1;var i=r.target||r.srcElement;if("object"!=typeof i)return!1;if("string"!=typeof i.tagName)return!1;var a=i.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!i||!i.parentNode||!i.parentNode.children)return!1;var s=i.parentNode.tagName.toLowerCase();"a"===s||"button"===s?t.start(r,i.parentNode,s):t.start(r,i,a)}):Fe(document,"click",function(e){if(!n)return!1;var i=e||window.event;if(!i)return!1;var a=i.target||i.srcElement,s=cr.heatmap.getTargetElement(a,e);s?t.start(i,s,s.tagName.toLowerCase()):g(a)&&"div"===a.tagName.toLowerCase()&&r(cr.para.heatmap)&&cr.para.heatmap.get_vtrack_config&&cr.unlimitedDiv.events.length>0&&cr.unlimitedDiv.isTargetEle(a)&&t.start(i,a,a.tagName.toLowerCase(),{$lib_method:"vtrack"})})))}},Xr={setOnlineState:function(e){if(e===!0&&r(cr.para.jsapp)&&"function"==typeof cr.para.jsapp.getData){cr.para.jsapp.isOnline=!0;var t=cr.para.jsapp.getData();v(t)&&t.length>0&&k(t,function(e){le(e)&&cr.sendState.realtimeSend(JSON.parse(e))})}else cr.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return Ur.campaignParams()},getStayTime:function(){return(new Date-cr._t)/1e3},setProfileLocal:function(e){if(!dr.isSupport())return cr.setProfile(e),!1;if(!r(e)||ae(e))return!1;var t=cr.store.readObjectVal("sensorsdata_2015_jssdk_profile"),n=!1;if(r(t)&&!ae(t)){for(var i in e)!(i in t&&t[i]!==e[i])&&i in t||(t[i]=e[i],n=!0);n&&(cr.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),cr.setProfile(e))}else cr.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),cr.setProfile(e)},setInitReferrer:function(){var e=Je();cr.setOnceProfile({_init_referrer:e,_init_referrer_host:Ur.pageProp.referrer_host})},setSessionReferrer:function(){var e=Je();cr.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:Ur.pageProp.referrer_host})},setDefaultAttr:function(){Ur.register({_current_url:location.href,_referrer:Je(),_referring_host:Ur.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase(),i=e.parentNode.tagName.toLowerCase(),a=cr.para.heatmap&&cr.para.heatmap.track_attr?cr.para.heatmap.track_attr:["data-sensors-click"];"button"===n||"a"===n||"a"===i||"button"===i||"input"===n||"textarea"===n||G(e,a)||Wr.start(null,e,n,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase();Wr.start(null,e,n,t,r)}},autoTrackSinglePage:function(e,t){function n(){var e=Ur.campaignParams(),t={};return k(e,function(e,r,n){(" "+cr.source_channel_standard+" ").indexOf(" "+r+" ")!==-1?t["$"+r]=n[r]:t[r]=n[r]}),t}function i(e,t){cr.track("$pageview",P({$referrer:a,$url:X(),$url_path:Z(),$title:document.title},e,n()),t),a=X()}var a;a=this.autoTrackIsUsed?Ur.pageProp.url:Ur.pageProp.referrer,e=r(e)?e:{};var s=!e.not_set_profile;if(e.not_set_profile&&delete e.not_set_profile,i(e,t),this.autoTrackSinglePage=i,cr.is_first_visitor&&s){var o={};cr.para.preset_properties.search_keyword_baidu&&Ue(document.referrer)&&Ie()&&(o.$search_keyword_id=Lr.id(),o.$search_keyword_id_type=Lr.type(),o.$search_keyword_id_hash=ee(o.$search_keyword_id)),cr.setOnceProfile(P({$first_visit_time:new Date,$first_referrer:Je(),$first_browser_language:p(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Me(),$first_search_keyword:Be()},n(),o)),cr.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=r(e)?e:{},this.autoTrack(P(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=r(e)?e:{};var n=Ur.campaignParams(),i={};k(n,function(e,t,r){(" "+cr.source_channel_standard+" ").indexOf(" "+t+" ")!==-1?i["$"+t]=r[t]:i[t]=r[t]});var a=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var s=location.href;if(cr.para.is_single_page&&b(function(){var r=Je(s,!0);cr.track("$pageview",P({$referrer:r,$url:X(),$url_path:Z(),$title:document.title},i,e),t),s=X()}),cr.track("$pageview",P({$referrer:Je(null,!0),$url:X(),$url_path:Z(),$title:document.title},i,e),t),cr.is_first_visitor&&a){var o={};cr.para.preset_properties.search_keyword_baidu&&Ue(document.referrer)&&Ie()&&(o.$search_keyword_id=Lr.id(),o.$search_keyword_id_type=Lr.type(),o.$search_keyword_id_hash=ee(o.$search_keyword_id)),cr.setOnceProfile(P({$first_visit_time:new Date,$first_referrer:Je(null,!0),$first_browser_language:p(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Me(),$first_search_keyword:Be()},i,o)),cr.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return ae(cr.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":cr.store._state._first_id||cr.store._state.first_id||cr.store._state._distinct_id||cr.store._state.distinct_id},setPlugin:function(t){return!!r(t)&&void k(t,function(t,n){e(t)&&(r(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[n]?t(window.SensorsDataWebJSSDKPlugin[n]):cr.log(n+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+n+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"))})},useModulePlugin:function(){cr.use.apply(cr,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}},Zr={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}},Yr={__proto__:null,addReferrerHost:Ze,addPropsHook:Ye,initPara:Ge,setInitVar:et,enableLocalLog:tt,disableLocalLog:rt,quick:nt,use:it,track:at,bind:st,unbind:ot,trackLink:lt,trackLinks:ct,setItem:ut,deleteItem:pt, +setProfile:dt,setOnceProfile:_t,appendProfile:ft,incrementProfile:gt,deleteProfile:ht,unsetProfile:mt,identify:vt,trackSignup:wt,registerPage:bt,clearAllRegister:St,clearPageRegister:kt,register:Pt,registerOnce:Nt,registerSession:$t,registerSessionOnce:Ct,login:Ot,loginWithKey:Tt,logout:At,getPresetProperties:Dt,iOSWebClickPolyfill:xt,readyState:Zr,para_default:jr,log:Ne,debug:Ar,IDENTITY_KEY:Er},Gr=function(){this._events=[],this.pendingEvents=[]};Gr.prototype={emit:function(e){var t=[].slice.call(arguments,1);k(this._events,function(r){r.type===e&&r.callback.apply(r.context,t)}),this.pendingEvents.push({type:e,data:t}),this.pendingEvents.length>20?this.pendingEvents.shift():null},on:function(e,t,r,n){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),n=n!==!1,this.pendingEvents.length>0&&n&&k(this.pendingEvents,function(n){n.type===e&&t.apply(r,n.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var Qr={__proto__:null,parseSuperProperties:Oe,searchConfigData:Te,strip_empty_properties:Ae,getCurrentDomain:De,getEleInfo:xe,isBaiduTraffic:Ie,getReferrerEqid:Ee,getReferrerEqidType:Le,getBaiduKeyword:Lr,isReferralTraffic:Ue,getReferrer:Je,getKeywordFromReferrer:Be,getWxAdIdFromUrl:Re,getReferSearchEngine:He,getSourceFromReferrer:Me,info:Ur,ajax:qe,getElementContent:Ke,cookie:Jr,addEvent:Fe,EventEmitterSa:Gr,encrypt:je,decryptIfNeeded:Ce},en={};en.buildData=function(e){var t={identities:{},distinct_id:cr.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(cr.lib_version)},properties:{}};return r(e)&&r(e.identities)&&!ae(e.identities)?P(t.identities,e.identities):P(t.identities,Rr._state.identities),r(e)&&r(e.properties)&&!ae(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),P(t,cr.store.getUnionId(),e),qr.stage.process("addCustomProps",t),r(e.properties)&&!ae(e.properties)&&P(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=P({},Ur.properties(),Rr.getProps(),Rr.getSessionProps(),Ur.currentProps,t.properties),cr.para.preset_properties.latest_referrer&&!p(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),cr.para.preset_properties.latest_search_keyword&&!p(t.properties.$latest_search_keyword)&&(cr.para.preset_properties.search_keyword_baidu&&p(t.properties.$search_keyword_id)&&ce(t.properties.$search_keyword_id_hash)&&p(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),cr.para.preset_properties.latest_traffic_source_type&&!p(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),cr.para.preset_properties.latest_landing_page&&!p(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===cr.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id,delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):cr.para.preset_properties.latest_wx_ad_click_id&&!p(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),p(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=X())),t.properties.$time&&x(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,cr.vtrackBase.addCustomProps(t),Oe(t),Br.checkIsAddSign(t),Br.checkIsFirstTime(t),cr.addReferrerHost(t),cr.addPropsHook(t),qr.stage.process("formatData",t),t},en.sendData=function(e,t){var r=Te(e.properties);cr.para.debug_mode===!0?(cr.log(e),cr.saEvent.debugPath(JSON.stringify(e),t)):cr.sendState.getSendCall(e,r,t)},en.encodeTrackData=function(e){var t=j(e),r="crc="+Q(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)};var tn=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,cr.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=It(e.server_url,e.data)};tn.prototype.start=function(){var e=this;cr.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},tn.prototype.lastClear=function(){var e=W();void 0!==e.ie?this.img.src="about:blank":this.img.src=""};var rn=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=Et(e.data)};rn.prototype.start=function(){var e=this;qe({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:cr.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var nn=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=Et(e.data)};nn.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var an={};an.getSendCall=function(e,t,r){if(cr.is_heatmap_render_mode)return!1;if(cr.readyState.state<3)return cr.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(n()).slice(2,5)+String(n()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var i=e;e=JSON.stringify(e);var a={data:i,config:t,callback:r};return cr.events.tempAdd("send",i),!cr.para.app_js_bridge&&cr.para.batch_send&&localStorage.length<100?(cr.log(i),cr.batchSend.add(a.data),!1):("item_set"===i.type||"item_delete"===i.type?this.prepareServerUrl(a):cr.bridge.dataSend(a,this,r),void cr.log(i))},an.prepareServerUrl=function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(v(cr.para.server_url)&&cr.para.server_url.length)for(var t=0;t-1&&r.splice(a,1),dr.remove(e[n])}dr.set(this.tabKey,JSON.stringify(this.generateTabStorageVal(r)))}},add:function(e){var r=sn+String(n()),a=dr.get(this.tabKey);null===a?(this.tabKey=on+String(n()),a=this.generateTabStorageVal()):a=i(a)||this.generateTabStorageVal(),a.data.push(r),a.expireTime=t()+2*cr.para.batch_send.send_interval,dr.set(this.tabKey,JSON.stringify(a)),cr.store.saveObjectVal(r,e),"track_signup"!==e.type&&"$pageview"!==e.event||this.sendImmediately()},generateTabStorage:function(){this.tabKey=on+String(n()),dr.set(this.tabKey,JSON.stringify(this.generateTabStorageVal()))},generateTabStorageVal:function(e){return e=e||[],{data:e,expireTime:t()+2*cr.para.batch_send.send_interval,serverUrl:this.serverUrl}},sendImmediately:function(){this.send()},recycle:function(){for(var e={},r=1e4,n="sajssdk-lock-get-",s=0;sc.expireTime&&this.serverUrl===c.serverUrl){var p=new a(n);p.get(o,r,1e3,function(e){if(e){null===dr.get(l.tabKey)&&l.generateTabStorage();var t=i(e)||l.generateTabStorageVal();dr.set(l.tabKey,JSON.stringify(l.generateTabStorageVal((i(dr.get(l.tabKey))||this.generateTabStorageVal()).data.concat(t.data))))}})}}else if(0===o.indexOf(n)){var d=i(dr.get(o))||{expireTime:0};t()-d.expireTime>r&&dr.remove(o)}}for(var _=0;_0)for(var i=0;i"),r=d(t.pop());if("div"!==r.slice(0,3))return!1}return!0},pn.configIsMatchNew=function(e,t){if(p(e.$element_selector)&&p(t.element_selector)){if("element_selector"===t.element_field&&"equal"===t["function"])return e.$element_selector===t.element_selector;if("element_selector"===t.element_field&&"contain"===t["function"])return e.$element_selector.indexOf(t.element_selector)>-1}if(p(e.$element_path)&&p(t.element_path)){if("element_path"===t.element_field&&"equal"===t["function"])return e.$element_path===t.element_path;if("element_path"===t.element_field&&"contain"===t["function"])return e.$element_path.indexOf(t.element_path)>-1}return!1},pn.configIsMatch=function(e,t){return(!t.limit_element_content||t.element_content===e.$element_content)&&((!t.limit_element_position||t.element_position===String(e.$element_position))&&(t.element_field&&t["function"]?pn.configIsMatchNew(e,t):pn.configIsMatchOldVersion(e,t)))},pn.configIsMatchOldVersion=function(e,t){if(!t.element_path)return!1;if(void 0!==e.$element_position){if(t.element_path!==e.$element_path)return!1}else if(cr.vtrackBase.isDiv({element_path:t.element_path})){if(e.$element_path.indexOf(t.element_path)<0)return!1}else if(t.element_path!==e.$element_path)return!1;return!0},pn.filterConfig=function(e,t,n){var i=[];if(!n){var a=pn.initUrl();if(!a)return[];n=a.page_url}return"$WebClick"===e.event&&k(t,function(t){r(t)&&("webclick"===t.event_type||"appclick"===t.event_type)&&r(t.event)&&t.event.url_host===n.host&&t.event.url_path===n.pathname&&pn.configIsMatch(e.properties,t.event)&&i.push(t)}),i},pn.getPropElInLi=function(e,t){if(!(e&&g(e)&&p(t)))return null;if("li"!==e.tagName.toLowerCase())return null;var r,n=cr.heatmap.getDomSelector(e);if(n){r=n+t;var i=B(r);return i?i:null}return cr.log("----custom---\u83b7\u53d6\u540c\u7ea7\u5c5e\u6027\u5143\u7d20\u5931\u8d25\uff0cselector\u4fe1\u606f\u5f02\u5e38",n,t),null},pn.getProp=function(e,t){if(!r(e))return!1;if(!(p(e.name)&&e.name.length>0))return cr.log("----vcustom----\u5c5e\u6027\u540d\u4e0d\u5408\u6cd5,\u5c5e\u6027\u629b\u5f03",e.name),!1;var n,i,a={};if("content"===e.method){var s;if(p(e.element_selector)&&e.element_selector.length>0)s=B(e.element_selector);else{if(!t||!p(e.list_selector))return cr.log("----vcustom----\u5c5e\u6027\u914d\u7f6e\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var o=B(t.properties.$element_selector);if(!o)return cr.log("----vcustom----\u70b9\u51fb\u5143\u7d20\u83b7\u53d6\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var l=cr.heatmap.getClosestLi(o);s=pn.getPropElInLi(l,e.list_selector)}if(!s||!g(s))return cr.log("----vcustom----\u5c5e\u6027\u5143\u7d20\u83b7\u53d6\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;if("input"===s.tagName.toLowerCase())n=s.value||"";else if("select"===s.tagName.toLowerCase()){var c=s.selectedIndex;ce(c)&&g(s[c])&&(n=Ke(s[c],"select"))}else n=Ke(s,s.tagName.toLowerCase());if(e.regular){try{i=new RegExp(e.regular).exec(n)}catch(u){return cr.log("----vcustom----\u6b63\u5219\u5904\u7406\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1}if(null===i)return cr.log("----vcustom----\u5c5e\u6027\u89c4\u5219\u5904\u7406\uff0c\u672a\u5339\u914d\u5230\u7ed3\u679c,\u5c5e\u6027\u629b\u5f03",e.name),!1;if(!v(i)||!p(i[0]))return cr.log("----vcustom----\u6b63\u5219\u5904\u7406\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name,i),!1;n=i[0]}if("STRING"===e.type)a[e.name]=n;else if("NUMBER"===e.type){if(n.length<1)return cr.log("----vcustom----\u672a\u83b7\u53d6\u5230\u6570\u5b57\u5185\u5bb9\uff0c\u5c5e\u6027\u629b\u5f03",e.name,n),!1;if(isNaN(Number(n)))return cr.log("----vcustom----\u6570\u5b57\u7c7b\u578b\u5c5e\u6027\u8f6c\u6362\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name,n),!1;a[e.name]=Number(n)}return a}return cr.log("----vcustom----\u5c5e\u6027\u4e0d\u652f\u6301\u6b64\u83b7\u53d6\u65b9\u5f0f",e.name,e.method),!1},pn.getAssignConfigs=function(e,t){var n=pn.initUrl();if(!n||!n.page_url)return[];if(!r(t))return[];var i=[];return t.events=t.events||t.eventList,v(t.events)&&t.events.length>0?(k(t.events,function(t){r(t)&&r(t.event)&&t.event.url_host===n.page_url.host&&t.event.url_path===n.page_url.pathname&&e(t)&&i.push(t)}),i):[]},pn.addCustomProps=function(e){if("success"===cr.bridge.bridge_info.verify_success){var t=cr.vapph5collect.customProp.geth5Props(JSON.parse(JSON.stringify(e)));r(t)&&!ae(t)&&(e.properties=P(e.properties,t))}var n=cr.vtrackcollect.customProp.getVtrackProps(JSON.parse(JSON.stringify(e)));return r(n)&&!ae(n)&&(e.properties=P(e.properties,n)),e},pn.init=function(){cr.vtrackcollect.init(),"success"===cr.bridge.bridge_info.verify_success&&cr.vapph5collect.init()};var dn={events:[],init:function(e){this.filterWebClickEvents(e)},filterWebClickEvents:function(e){this.events=cr.vtrackcollect.getAssignConfigs(function(e){return!(!r(e)||e.event.unlimited_div!==!0||"webclick"!==e.event_type)},e)},isTargetEle:function(e){var t=cr.heatmap.getEleDetail(e);if(!r(t)||!p(t.$element_path))return!1;for(var n=0;n0)},e),this.events.length?this.configSwitch=!0:this.configSwitch=!1},getVtrackProps:function(e){var t={};return this.collectAble()?("$WebClick"===e.event&&(t=this.clickCustomPropMaker(e,this.events)),t):{}},clickCustomPropMaker:function(e,t,n){var i=this;n=n||this.filterConfig(e,t,cr.vtrackcollect.url_info.page_url);var a={};return n.length?(k(n,function(t){v(t.properties)&&t.properties.length>0&&k(t.properties,function(t){var n=i.getProp(t,e);r(n)&&P(a,n)})}),a):{}},getProp:pn.getProp,getPropElInLi:pn.getPropElInLi,filterConfig:pn.filterConfig},fn={unlimitedDiv:dn,config:{},storageEnable:!0,storage_name:"webjssdkvtrackcollect",para:{session_time:18e5,timeout:5e3,update_interval:18e5},url_info:{},timer:null,update_time:null,customProp:_n,initUrl:function(){var e=pn.initUrl();if(e){var t;try{t=new _(cr.para.server_url),t._values.Path="/config/visualized/Web.conf",e.api_url=t.getUrl()}catch(r){return cr.log("----vtrackcollect---API\u5730\u5740\u89e3\u6790\u5f02\u5e38",r),!1}this.url_info=e}return e},init:function(){if(!r(cr.para.heatmap)||!cr.para.heatmap.get_vtrack_config)return!1;if(dr.isSupport()||(this.storageEnable=!1),!this.initUrl())return cr.log("----vtrackcustom----\u521d\u59cb\u5316\u5931\u8d25\uff0curl\u4fe1\u606f\u89e3\u6790\u5931\u8d25"),!1;if(this.storageEnable){var e=cr.store.readObjectVal(this.storage_name);if(r(e)&&r(e.data))if(this.serverUrlIsSame(e.serverUrl)){this.config=e.data,this.update_time=e.updateTime,this.updateConfig(e.data);var t=(new Date).getTime(),n=t-this.update_time;if(ce(n)&&n>0&&n0&&r0&&k(a.properties,function(n){if(r(n))if(n.h5===!1)v(t.sensorsdata_app_visual_properties)||(t.sensorsdata_app_visual_properties=[]),t.sensorsdata_app_visual_properties.push(n);else{var a=i.getProp(n,e);r(a)&&(t=P(t,a))}}),p(a.event_name)&&n.push(a.event_name))}),r(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode===!0||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode())&&(t.sensorsdata_web_visual_eventName=n)}return t.sensorsdata_app_visual_properties&&(t.sensorsdata_app_visual_properties=j(JSON.stringify(t.sensorsdata_app_visual_properties))),t},initAppGetPropsBridge:function(){var t=this;return new cr.JSBridge({type:"getJSVisualProperties",app_call_js:function(n){var i={};try{n=JSON.parse(C(n))}catch(a){cr.log("getJSVisualProperties data parse error!")}if(r(n)){var s=n.sensorsdata_js_visual_properties,o=t.initUrl();o&&(o=o.page_url,v(s)&&s.length>0&&k(s,function(e){if(r(e)&&e.url_host===o.host&&e.url_path===o.pathname&&e.h5){var n=t.getProp(e);r(n)&&(i=P(i,n))}}))}var l=cr.bridge.bridge_info.platform;if("android"===l){var c={callType:"getJSVisualProperties",data:i};r(n)&&n.message_id&&(c.message_id=n.message_id),r(window.SensorsData_APP_New_H5_Bridge)&&e(SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app)?SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app(JSON.stringify(c)):r(window.SensorsData_APP_JS_Bridge)&&e(SensorsData_APP_JS_Bridge.sensorsdata_js_call_app)&&SensorsData_APP_JS_Bridge.sensorsdata_js_call_app(JSON.stringify(c))}return i}})}},hn={events:[],customProp:gn,getAssignConfigs:pn.getAssignConfigs,initUrl:pn.initUrl,init:function(){if(this.initUrl()){var e=this.getConfigFromApp();e&&this.updateConfigs(e),this.customProp.init(),this.initAppUpdateConfigBridge()}},initAppUpdateConfigBridge:function(){var e=this;return new cr.JSBridge({type:"updateH5VisualConfig",app_call_js:function(t){if(t){try{t=JSON.parse(C(t))}catch(r){return void cr.log("updateH5VisualConfig result parse error\uff01")}e.updateConfigs(t)}}})},getConfigFromApp:function(){var e=new cr.JSBridge({type:"sensorsdata_get_app_visual_config"}),t=e.getAppData();if(t)try{t=JSON.parse(C(t))}catch(r){t=null,cr.log("getAppVisualConfig result parse error\uff01")}return t},updateConfigs:function(e){this.events=this.filterConfigs(e),this.customProp.updateEvents(this.events)},filterConfigs:function(e){return this.getAssignConfigs(function(e){return!(!r(e)||e.h5===!1)},e)}},mn=new l,vn={};vn.spa=mn,vn.initSystemEvent=function(){Bt(function(e){mn.emit("switch",e)})};var yn={getOriginalUrl:function(){function e(e){var t=e.split("&"),r=["sa-request-id","sa-request-type","sa-request-url"],n=[];return k(t,function(e){r.indexOf(e.split("=")[0])<0&&n.push(e); +}),n.join("&")}var t=location.protocol+"//"+location.host+location.pathname,r="",n="";if(location.search){var i=e(location.search.slice(1));i&&(r="?"+i)}if(location.hash&&(n=location.hash,location.hash.indexOf("?")>-1)){var a=location.hash.split("?"),s=e(a[1]);s&&(n=a[0]+"?"+s)}return decodeURI(t+r+n)},isSeachHasKeyword:function(){return null!==Rt("sa-request-id")&&("string"==typeof sessionStorage.getItem("sensors-visual-mode")&&sessionStorage.removeItem("sensors-visual-mode"),!0)},hasKeywordHandle:function(){var e=Rt("sa-request-id"),t=Rt("sa-request-type"),r=Rt("sa-request-url");Wr.setNotice(r),Sr.isSupport()&&(null!==r&&sessionStorage.setItem("sensors_heatmap_url",r),sessionStorage.setItem("sensors_heatmap_id",e),null!==t?"1"===t||"2"===t||"3"===t?sessionStorage.setItem("sensors_heatmap_type",t):t=null:t=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),this.isReady(e,t,this.getOriginalUrl())},isReady:function(e,t,r){cr.para.heatmap_url?fe({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(cr,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(cr.heatmap_version&&cr.heatmap_version===cr.lib_version||console.log("heatmap.js\u4e0esensorsdata.js\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669!")))},0)},error:function(){},type:"js",url:cr.para.heatmap_url}):cr.log("\u6ca1\u6709\u6307\u5b9aheatmap_url\u7684\u8def\u5f84")},isStorageHasKeyword:function(){return Sr.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")},storageHasKeywordHandle:function(){Wr.setNotice(),yn.isReady(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),this.getOriginalUrl())}},wn={isStorageHasKeyword:function(){return Sr.isSupport()&&"string"==typeof sessionStorage.getItem("sensors-visual-mode")},isSearchHasKeyword:function(){return(Rt("sa-visual-mode")===!0||"true"===Rt("sa-visual-mode"))&&("string"==typeof sessionStorage.getItem("sensors_heatmap_id")&&sessionStorage.removeItem("sensors_heatmap_id"),!0)},loadVtrack:function(){fe({success:function(){},error:function(){},type:"js",url:cr.para.vtrack_url?cr.para.vtrack_url:location.protocol+"//static.sensorsdata.cn/sdk/"+cr.lib_version+"/vtrack.min.js"})},messageListener:function(e){function t(e){return se(e)?ge(e):(cr.log("\u53ef\u89c6\u5316\u6a21\u5f0f\u68c0\u6d4b URL \u5931\u8d25"),!1)}if("sa-fe"!==e.data.source)return!1;if("v-track-mode"===e.data.type){if(e.data.data&&e.data.data.isVtrack)if(Sr.isSupport()&&sessionStorage.setItem("sensors-visual-mode","true"),e.data.data.userURL&&location.href.match(/sa-visual-mode=true/)){var r=t(e.data.data.userURL);r&&(window.location.href=r)}else wn.loadVtrack();window.removeEventListener("message",wn.messageListener,!1)}},removeMessageHandle:function(){window.removeEventListener&&window.removeEventListener("message",wn.messageListener,!1)},verifyVtrackMode:function(){window.addEventListener&&window.addEventListener("message",wn.messageListener,!1),wn.postMessage()},postMessage:function(){window.parent&&window.parent.postMessage&&window.parent.postMessage({source:"sa-web-sdk",type:"v-is-vtrack",data:{sdkversion:"1.22.4"}},"*")},notifyUser:function(){var e=function(t){return"sa-fe"===t.data.source&&void("v-track-mode"===t.data.type&&(t.data.data&&t.data.data.isVtrack&&alert("\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\uff0c\u8bf7\u5347\u7ea7\u90e8\u7f72\u795e\u7b56\u6570\u636e\u6cbb\u7406"),window.removeEventListener("message",e,!1)))};window.addEventListener&&window.addEventListener("message",e,!1),wn.postMessage()}},bn=["setItem","deleteItem","getAppStatus","track","quick","register","registerPage","registerOnce","trackSignup","setProfile","setOnceProfile","appendProfile","incrementProfile","deleteProfile","unsetProfile","identify","login","logout","trackLink","clearAllRegister","clearPageRegister"],Sn={track:function(e,t,r){},quick:function(e,t,r,n){},register:function(e){},registerPage:function(e){},registerOnce:function(e){},clearAllRegister:function(e){},trackSignup:function(e,t,r,n){},setProfile:function(e,t){},setOnceProfile:function(e,t){},appendProfile:function(e,t){},incrementProfile:function(e,t){},deleteProfile:function(e){},unsetProfile:function(e,t){},identify:function(e,t){},login:function(e,t){},logout:function(e){},trackLink:function(e,t,r){},deleteItem:function(e,t){},setItem:function(e,t,r){},getAppStatus:function(e){},clearPageRegister:function(e){}};Zt.prototype.process=function(e,t){if(!(e&&e in this.processDef))return void Ne("process ["+e+"] is not supported");var r=this.registeredInterceptors[e];if(r&&v(r)&&r.length>0)for(var n={current:0,total:r.length},i=new Xt(t,n,cr),a=0;a=a.length:a.push(o);break;default:a.splice(s,0,o)}}}};var kn={addCustomProps:null,formatData:null},Pn=new Zt(kn),Nn={init:function(){},interceptor:{formatData:{priority:0,entry:function(e){return sr(e),e}}}},$n=window.sensors_data_pre_config,Cn=!!r($n)&&$n.is_compliance_enabled;cr.init=function(e){return!(cr.readyState&&cr.readyState.state&&cr.readyState.state>=2)&&(Cn&&lr(!0),cr.ee.initSystemEvent(),cr.setInitVar(),cr.readyState.setState(2),cr.initPara(e),cr.bridge.supportAppCallJs(),cr.detectMode(),void cr.iOSWebClickPolyfill())},Cn?lr(!1):(lr(!0),zt());var jn=cr;try{cr.modules={},"string"==typeof window.sensorsDataAnalytic201505?(cr.para=window[sensorsDataAnalytic201505].para,cr._q=window[sensorsDataAnalytic201505]._q,window[sensorsDataAnalytic201505]=cr,window.sensorsDataAnalytic201505=cr,cr.init()):"undefined"==typeof window.sensorsDataAnalytic201505?window.sensorsDataAnalytic201505=cr:jn=window.sensorsDataAnalytic201505}catch(On){if("object"==typeof console&&console.log)try{console.log(On)}catch(Tn){cr.log(Tn)}}var An=jn;return An}); \ No newline at end of file diff --git a/core/sensorsdata.es6.min.js b/core/sensorsdata.es6.min.js index 93a592f5..1937b7f7 100644 --- a/core/sensorsdata.es6.min.js +++ b/core/sensorsdata.es6.min.js @@ -1 +1 @@ -var logFn,sd={};function isValidListener(e){return"function"==typeof e||!(!e||"object"!=typeof e)&&isValidListener(e.listener)}function EventEmitter(){this._events={}}function _decodeURIComponent(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function getURLSearchParams(e){for(var t={},r=(e=e||"").substring(1).split("&"),s=0;s1)))/4)-l((e-1901+t)/100)+l((e-1601+t)/400)};t=function(e){for(i=l(e/864e5),r=l(i/365.2425)+1970-1;f(r+1,0)<=i;r++);for(s=l((i-f(r,0))/30.42);f(r,s+1)<=i;s++);i=1+i-f(r,s),a=l((n=(e%864e5+864e5)%864e5)/36e5)%24,o=l(n/6e4)%60,d=l(n/1e3)%60,c=n%1e3}}return(P=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+k(6,r<0?-r:r):k(4,r))+"-"+k(2,s+1)+"-"+k(2,i)+"T"+k(2,a)+":"+k(2,o)+":"+k(2,d)+"."+k(3,c)+"Z",r=s=i=a=o=d=c=null):e=null,e})(e)};if(y("json-stringify")&&!y("date-serialization")){function O(e){return P(this)}var j=s.stringify;s.stringify=function(e,t,r){var s=d.prototype.toJSON;d.prototype.toJSON=O;var i=j(e,t,r);return d.prototype.toJSON=s,i}}else{var E=function(e){var t=e.charCodeAt(0),r=w[t];return r||"\\u00"+k(2,t.toString(16))},N=/[\x00-\x1f\x22\x5c]/g,A=function(e){return N.lastIndex=0,'"'+(N.test(e)?e.replace(N,E):e)+'"'},C=function(e,t,r,s,i,n,a){var o,c,u,p,g,h,v,y,S;if(m(function(){o=t[e]}),"object"==typeof o&&o&&(o.getUTCFullYear&&"[object Date]"==_.call(o)&&o.toJSON===d.prototype.toJSON?o=P(o):"function"==typeof o.toJSON&&(o=o.toJSON(e))),r&&(o=r.call(t,e,o)),o==f)return o===f?o:"null";switch("object"==(c=typeof o)&&(u=_.call(o)),u||c){case"boolean":case"[object Boolean]":return""+o;case"number":case"[object Number]":return o>-1/0&&o<1/0?""+o:"null";case"string":case"[object String]":return A(""+o)}if("object"==typeof o){for(v=a.length;v--;)if(a[v]===o)throw l();if(a.push(o),p=[],y=n,n+=i,"[object Array]"==u){for(h=0,v=o.length;h0)for(s>10&&(s=10),i="";i.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||L();e+=$("0x"+n.slice(t,D));break;default:L()}else{if(34==i)break;for(i=n.charCodeAt(D),t=D;i>=32&&92!=i&&34!=i;)i=n.charCodeAt(++D);e+=n.slice(t,D)}if(34==n.charCodeAt(D))return D++,e;L();default:if(t=D,45==i&&(s=!0,i=n.charCodeAt(++D)),i>=48&&i<=57){for(48==i&&(i=n.charCodeAt(D+1))>=48&&i<=57&&L(),s=!1;D=48&&i<=57;D++);if(46==n.charCodeAt(D)){for(r=++D;r57);r++);r==D&&L(),D=r}if(101==(i=n.charCodeAt(D))||69==i){for(43!=(i=n.charCodeAt(++D))&&45!=i||D++,r=D;r57);r++);r==D&&L(),D=r}return+n.slice(t,D)}s&&L();var o=n.slice(D,D+4);if("true"==o)return D+=4,!0;if("fals"==o&&101==n.charCodeAt(D+4))return D+=5,!1;if("null"==o)return D+=4,null;L()}return"$"},U=function(e){var t,r;if("$"==e&&L(),"string"==typeof e){if("@"==(S?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];"]"!=(e=T());)r?","==e?"]"==(e=T())&&L():L():r=!0,","==e&&L(),t.push(U(e));return t}if("{"==e){for(t={};"}"!=(e=T());)r?","==e?"}"==(e=T())&&L():L():r=!0,","!=e&&"string"==typeof e&&"@"==(S?e.charAt(0):e[0])&&":"==T()||L(),t[e.slice(1)]=U(T());return t}L()}return e},R=function(e,t,r){var s=B(e,t,r);s===f?delete e[t]:e[t]=s},B=function(e,t,r){var s,i=e[t];if("object"==typeof i&&i)if("[object Array]"==_.call(i))for(s=i.length;s--;)R(_,b,i);else b(i,function(e){R(i,e,r)});return r.call(e,t,i)};s.parse=function(e,t){var r,s;return D=0,I=""+e,r=U(T()),"$"!=T()&&L(),D=I=null,t&&"[object Function]"==_.call(t)?B(((s={})[""]=r,s),"",t):r}}}return s.runInContext=a,s}(t,t.JSON3={noConflict:function(){return i||(i=!0,t.JSON=r,t.JSON3=s,r=s=null),n}});t.JSON={parse:n.parse,stringify:n.stringify}}).call(window),function(e){if(e.atob)try{e.atob(" ")}catch(n){e.atob=(t=e.atob,(r=function(e){return t(String(e).replace(/[\t\n\f\r ]+/g,""))}).original=t,r)}else{var t,r,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,r,i,n,a="",o=0,d=e.length%3;o255||(i=e.charCodeAt(o++))>255||(n=e.charCodeAt(o++))>255)return"";a+=s.charAt((t=r<<16|i<<8|n)>>18&63)+s.charAt(t>>12&63)+s.charAt(t>>6&63)+s.charAt(63&t)}return d?a.slice(0,d-3)+"===".substring(d):a},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!i.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,r,n,a="",o=0;o>16&255):64===n?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return a}}}(window),String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)}),EventEmitter.prototype.on=function(e,t){if(!e||!t)return!1;if(!isValidListener(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].push(r?t:{listener:t,once:!1}),this},EventEmitter.prototype.prepend=function(e,t){if(!e||!t)return!1;if(!isValidListener(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].unshift(r?t:{listener:t,once:!1}),this},EventEmitter.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},EventEmitter.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},EventEmitter.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var s=0,i=r.length;s Invalid URL");var r=e.split("#"),s=r[0],i=r.slice(1).join("#");for(var n in t=this._regex.exec(s),this._fields)"undefined"!=typeof t[this._fields[n]]&&(this._values[n]=t[this._fields[n]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new t(e)}function _URL(e){var t,r={};if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(e){return!1}}())(r=new URL(e)).searchParams||(r.searchParams=(t=getURLSearchParams(r.search),{get:function(e){return t[e]}}));else{isString(e)||(e=String(e)),e=trim(e);if(!1===/^https?:\/\/.+/.test(e))return void logger.log("Invalid URL");var s=urlParse(e);r.hash=s._values.Fragment,r.host=s._values.Host?s._values.Host+(s._values.Port?":"+s._values.Port:""):"",r.href=s._values.URL,r.password=s._values.Password,r.pathname=s._values.Path,r.port=s._values.Port,r.search=s._values.QueryString?"?"+s._values.QueryString:"",r.username=s._values.Username,r.hostname=s._values.Hostname,r.protocol=s._values.Protocol?s._values.Protocol+":":"",r.origin=s._values.Origin?s._values.Origin+(s._values.Port?":"+s._values.Port:""):"",r.searchParams=function(){var e=getURLSearchParams("?"+s._values.QueryString);return{get:function(t){return e[t]}}}()}return r}function isObject(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}var getRandomBasic=function(){var e=(new Date).getTime();return function(t){return Math.ceil((e=(9301*e+49297)%233280)/233280*t)}}();function getRandom(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),isObject(e)&&e.getRandomValues){var t=new Uint32Array(1);return e.getRandomValues(t)[0]/Math.pow(2,32)}}return getRandomBasic(1e19)/1e19}var UUID=function(){var e=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)};return function(){var t=String(screen.height*screen.width);t=t&&/\d{5,}/.test(t)?t.toString(16):String(31242*getRandom()).replace(".","").slice(0,8);var r=e()+"-"+getRandom().toString(16).replace(".","")+"-"+function(){var e,t,r=navigator.userAgent,s=[],i=0;function n(e,t){var r,i=0;for(r=0;r=4&&(i=n(i,s),s=[]);return s.length>0&&(i=n(i,s)),i.toString(16)}()+"-"+t+"-"+e();return r||(String(getRandom())+String(getRandom())+String(getRandom())).slice(2,15)}}();function isElement(e){return!(!e||1!==e.nodeType)}function isUndefined(e){return void 0===e}function isFunction(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function isArray(e){return Array.isArray&&isFunction(isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function ry(e){return new DomElementInfo(e)}var DomElementInfo=function(e){this.ele=e},siblings=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};function addEvent(e,t,r,s){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation,e._getPath=i._getPath),e}i._getPath=function(){return this.path||this.composedPath&&this.composedPath()||ry(this.target).getParents()},i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};(function(e,t,r){if(s===undefined&&"click"===t&&(s=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=i._getPath,r.call(this,e)},s);else{var n="on"+t,a=e[n];e[n]=function(e,t,r,s){return function(n){if(!(n=n||i(window.event)))return undefined;n.target=n.srcElement;var a,o,d=!0;return"function"==typeof r&&(a=r(n)),o=t.call(e,n),"beforeunload"!==s?(!1!==a&&!1!==o||(d=!1),d):void 0}}(e,r,a,t)}}).apply(null,arguments)}function addHashEvent(e){var t="pushState"in window.history?"popstate":"hashchange";addEvent(window,t,e)}function xhr(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){logger.log(t)}}}DomElementInfo.prototype={addClass:function(e){return-1===(" "+this.ele.className+" ").indexOf(" "+e+" ")&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return-1!==t.indexOf(" "+e+" ")&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){return-1!==(" "+this.ele.className+" ").indexOf(" "+e+" ")},attr:function(e,t){return"string"==typeof e&&isUndefined(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument.documentElement;return{top:e.top+window.pageYOffset-t.clientTop,left:e.left+window.pageXOffset-t.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),ry(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!isArray(r))return null;for(var s=r.length-1;s>=0;s--){if(t=r[s].style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return siblings((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return siblings(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return ry(e=e&&11!==e.nodeType?e:null)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return ry(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return ry(e);return ry(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),s=[],i=0;i=200&&r.status<300||304==r.status?e.success(t(r.responseText)):e.error(t(r.responseText),r.status),r.onreadystatechange=null,r.onload=null)}catch(s){r.onreadystatechange=null,r.onload=null}},r.open(e.type,e.url,!0);try{e.credentials&&(r.withCredentials=!0),isObject(e.header)&&each(e.header,function(e,t){r.setRequestHeader&&r.setRequestHeader(t,e)}),e.data&&(e.cors||r.setRequestHeader&&r.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?r.setRequestHeader&&r.setRequestHeader("Content-type","application/json; charset=UTF-8"):r.setRequestHeader&&r.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(a){logger.log(a)}r.send(e.data||null)}function map(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(each(e,function(e,s,i){r.push(t(e,s,i))}),r)}function base64Decode(e){var t=[];try{t=map(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function base64Encode(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function bindReady(e,t){t=t||window;var r=!1,s=!0,i=t.document,n=i.documentElement,a=i.addEventListener,o=a?"addEventListener":"attachEvent",d=a?"removeEventListener":"detachEvent",c=a?"":"on",l=function(s){"readystatechange"==s.type&&"complete"!=i.readyState||(("load"==s.type?t:i)[d](c+s.type,l,!1),!r&&(r=!0)&&e.call(t,s.type||s))},u=function(){try{n.doScroll("left")}catch(e){return void setTimeout(u,50)}l("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!a&&n.doScroll){try{s=!t.frameElement}catch(p){logger.log(p)}s&&u()}i[o](c+"DOMContentLoaded",l,!1),i[o](c+"readystatechange",l,!1),t[o](c+"load",l,!1)}}var cookie={get:function(e){for(var t=e+"=",r=document.cookie.split(";"),s=0;s=2&&!/^(\d+\.)+\d+$/.test(r))for(var i="."+s.splice(s.length-1,1);s.length>0;)if(i="."+s.splice(s.length-1,1)+i,document.cookie=t+"=true; path=/; domain="+i,-1!==document.cookie.indexOf(t+"=true")){var n=new Date;return n.setTime(n.getTime()-1e3),document.cookie=t+"=true; expires="+n.toGMTString()+"; path=/; SameSite=Lax; domain="+i,i}return""}function getDomBySelector(e){if(!isString(e))return null;var t,r=e.split(">");return(t=function s(e){var t,i=r.shift();if(!i)return e;try{t=function(e,t){var r;if("body"===(e=trim(e)))return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var s=e.split(":nth-of-type");if(!s[0]||!s[1])return null;var i=s[0],n=s[1].match(/\(([0-9]+)\)/);if(!n||!n[1])return null;var a=Number(n[1]);if(!(isElement(t)&&t.children&&t.children.length>0))return null;for(var o=t.children,d=0;d0)return null}return r||null}(i,e)}catch(n){logger.log(n)}return t&&isElement(t)?s(t):null}())&&isElement(t)?t:null}function getElementContent(e,t){var r="",s="";return e.textContent?r=trim(e.textContent):e.innerText&&(r=trim(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),s=r||"","input"!==t&&"INPUT"!==t||(s=e.value||""),s}function getHostname(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=_URL(e).hostname}catch(s){logger.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function getIOSVersion(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function getQueryParam(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=_decodeURIComponent(e);var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":_decodeURIComponent(r[1])}function getQueryParamsFromUrl(e){var t={},r=e.split("?")[1]||"";return r&&(t=getURLSearchParams("?"+r)),t}function mediaQueriesSupported(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function getScreenOrientation(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(mediaQueriesSupported()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function getUA(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function getURL(e){return isString(e)?_decodeURI(e=trim(e)):_decodeURI(location.href)}function getURLPath(e){return isString(e)?_decodeURI(e=trim(e)):_decodeURI(location.pathname)}function hasAttribute(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function hasAttributes(e,t){if("string"==typeof t)return hasAttribute(e,t);if(isArray(t)){for(var r=!1,s=0;s0)for(var i=e.split(""),n=0;nt)for(s=r+s;(o=31*s+a)t;)s=s/2+a;s=31*s+a}return s}function indexOf(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var s=0;s41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function isSupportCors(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function jsonp(e){if(!isObject(e)||!isString(e.callbackName))return logger.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;e.success=isFunction(e.success)?e.success:function(){},e.error=isFunction(e.error)?e.error:function(){},e.data=e.data||"";var t=document.createElement("script"),r=document.getElementsByTagName("head")[0],s=null,i=!1;if(r.appendChild(t),isNumber(e.timeout)&&(s=setTimeout(function(){if(i)return!1;e.error("timeout"),window[e.callbackName]=function(){logger.log("call jsonp error")},s=null,r.removeChild(t),i=!0},e.timeout)),window[e.callbackName]=function(){clearTimeout(s),s=null,e.success.apply(null,arguments),window[e.callbackName]=function(){logger.log("call jsonp error")},r.removeChild(t)},e.url.indexOf("?")>-1?e.url+="&callbackName="+e.callbackName:e.url+="?callbackName="+e.callbackName,isObject(e.data)){var n=[];each(e.data,function(e,t){n.push(t+"="+e)}),e.data=n.join("&"),e.url+="&"+e.data}t.onerror=function(n){if(i)return!1;window[e.callbackName]=function(){logger.log("call jsonp error")},clearTimeout(s),s=null,r.removeChild(t),e.error(n),i=!0},t.src=e.url}function listenPageState(e){({visibleHandler:isFunction(e.visible)?e.visible:function(){},hiddenHandler:isFunction(e.hidden)?e.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;addEvent(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else addEvent(window,"focus",this.visibleHandler),addEvent(window,"blur",this.hiddenHandler)}}).init()}function loadScript(e){e=extend({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&((t=document.createElement("link")).rel="stylesheet",t.href=e.url),"js"===e.type&&((t=document.createElement("script")).async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}var _localStorage={get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t;try{t=JSON.parse(_localStorage.get(e))||null}catch(r){logger.log(r)}return t},set:function(e,t){window.localStorage.setItem(e,t)},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__local_store_support__",r="testIsSupportStorage";_localStorage.set(t,r),_localStorage.get(t)!==r&&(e=!1),_localStorage.remove(t)}catch(s){e=!1}return e}};function now(){return Date.now&&isFunction(Date.now)?Date.now():(new Date).getTime()}function removeScriptProtocol(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function rot13obfs(e,t){t="number"==typeof t?t:13;for(var r=(e=String(e)).split(""),s=0,i=r.length;st?(a&&(clearTimeout(a),a=null),o=c,n=e.apply(s,i),a||(s=i=null)):a||!1===r.trailing||(a=setTimeout(d,l)),n}}function values(e){var t=[];return null==e?t:(each(e,function(e){t[t.length]=e}),t)}function toArray(e){return e?e.toArray?e.toArray():isArray(e)||isArguments(e)?Array.prototype.slice.call(e):values(e):[]}function unique(e){for(var t,r=[],s={},i=0;i0&&(e=unique(e=e.concat(sdPara.source_channel))),each(e,function(e){(t=getQueryParam(location.href,e)).length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=pageInfo.campaignParams(),s={},i={};return each(r,function(r,n,a){-1!==(" "+source_channel_standard+" ").indexOf(" "+n+" ")?s[e+n]=a[n]:i[t+n]=a[n]}),{$utms:s,otherUtms:i}},properties:function(){var e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;return{$timezone_offset:(new Date).getTimezoneOffset(),$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$viewport_height:e,$viewport_width:t,$lib:"js",$lib_version:sdkversion_placeholder}},currentProps:{},register:function(e){extend(pageInfo.currentProps,e)}};function getSourceFromReferrer(){function e(e,t){for(var r=0;rt._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var s=new Date;t={value:t,_expirationTimestamp_:"s"===String(r).slice(-1)?s.getTime()+1e3*Number(String(r).slice(0,-1)):s.getTime()+24*r*60*60*1e3}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+sdPara.sdk_id+e}},saNewUser={checkIsAddSign:function(e){"track"===e.type&&(isNewUser()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=cookie$1.get("sensorsdata2015jssdkcross"+sd.para.sdk_id),s={};null!=(r=decryptIfNeeded(r))&&isJSONString(r)&&(s=JSON.parse(r)).$device_id&&(t=s.$device_id),t=t||e,!0===sd.para.cross_subdomain?sd.store.set("$device_id",t):(s.$device_id=t,s=JSON.stringify(s),sd.para.encrypt_cookie&&(s=encrypt(s)),cookie$1.set("sensorsdata2015jssdkcross"+sd.para.sdk_id,s,null,!0)),sd.para.is_track_device_id&&(pageInfo.currentProps.$device_id=t)},storeInitCheck:function(){if(sd.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};cookie$1.isSupport()?cookie$1.set(getNewUserFlagKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):memory.set(memory.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else isNewUser()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=pageInfo.pageProp.url_domain,t={};""===e&&(e="url\u89e3\u6790\u5931\u8d25");var r=getKeywordFromReferrer(document.referrer,!0);if(sd.para.preset_properties.search_keyword_baidu?isReferralTraffic(document.referrer)&&(!isBaiduTraffic()||isObject(r)&&r.active?sd.store._state&&sd.store._state.props&&(sd.store._state.props.$search_keyword_id&&delete sd.store._state.props.$search_keyword_id,sd.store._state.props.$search_keyword_id_type&&delete sd.store._state.props.$search_keyword_id_type,sd.store._state.props.$search_keyword_id_hash&&delete sd.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=getBaiduKeyword.id(),t.$search_keyword_id_type=getBaiduKeyword.type(),t.$search_keyword_id_hash=hashCode53(t.$search_keyword_id))):sd.store._state&&sd.store._state.props&&(sd.store._state.props.$search_keyword_id&&delete sd.store._state.props.$search_keyword_id,sd.store._state.props.$search_keyword_id_type&&delete sd.store._state.props.$search_keyword_id_type,sd.store._state.props.$search_keyword_id_hash&&delete sd.store._state.props.$search_keyword_id_hash),sd.store.save(),each(sd.para.preset_properties,function(r,s){if(-1===s.indexOf("latest_"))return!1;if(s=s.slice(7),r){if("wx_ad_click_id"===s&&"not_collect"===r)return!1;if("utm"!==s&&"url\u89e3\u6790\u5931\u8d25"===e)"wx_ad_click_id"===s?(t._latest_wx_ad_click_id="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_hash_key="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_callbacks="url\u7684domain\u89e3\u6790\u5931\u8d25"):t["$latest_"+s]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(isReferralTraffic(document.referrer))switch(s){case"traffic_source_type":t.$latest_traffic_source_type=getSourceFromReferrer();break;case"referrer":t.$latest_referrer=pageInfo.pageProp.referrer;break;case"search_keyword":getKeywordFromReferrer()?t.$latest_search_keyword=getKeywordFromReferrer():isObject(sd.store._state)&&isObject(sd.store._state.props)&&sd.store._state.props.$latest_search_keyword&&delete sd.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=getURL();break;case"wx_ad_click_id":var i=getWxAdIdFromUrl(location.href);t._latest_wx_ad_click_id=i.click_id,t._latest_wx_ad_hash_key=i.hash_key,t._latest_wx_ad_callbacks=i.callbacks}}else if("utm"===s&&sd.store._state&&sd.store._state.props)for(var n in sd.store._state.props)(0===n.indexOf("$latest_utm")||0===n.indexOf("_latest_")&&n.indexOf("_latest_wx_ad_")<0)&&delete sd.store._state.props[n];else if(sd.store._state&&sd.store._state.props&&"$latest_"+s in sd.store._state.props)delete sd.store._state.props["$latest_"+s];else if("wx_ad_click_id"==s&&sd.store._state&&sd.store._state.props&&!1===r){each(["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"],function(e){e in sd.store._state.props&&delete sd.store._state.props[e]})}}),sd.register(t),sd.para.preset_properties.latest_utm){var s=pageInfo.campaignParamsStandard("$latest_","_latest_"),i=s.$utms,n=s.otherUtms;isEmptyObject(i)||sd.register(i),isEmptyObject(n)||sd.register(n)}}},store={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={},r=(e=e||this._state)._first_id||e.first_id,s=e._distinct_id||e.distinct_id;return r&&s?(t.login_id=s,t.anonymous_id=r):t.anonymous_id=s,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==sd.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=cookie$1.get("sensorsdata2015session"),t=null;null!==(e=decryptIfNeeded(e))&&"object"==typeof(t=safeJSONParse(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&sd.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;extend(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;coverExtend(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};for(var s in r=t?e:extend(this._state.props||{},e))"string"==typeof r[s]&&(r[s]=r[s].slice(0,sd.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};coverExtend(t,e),this.set("props",t)},clearAllProps:function(e){var t;if(this._sessionState={},isArray(e)&&e.length>0)for(t=0;tsdPara.max_id_length)},keyLength:function(e){return!(!isString(e)||e.length>sdPara.max_key_length)},stringLength:function(e){return!(!isString(e)||e.length>sdPara.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(indexOf(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(indexOf(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=store._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(indexOf(this.bindReservedNames,e)>-1)}},checkOption={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Id"),isFunction(checkLog[r])&&checkLog[r](t),"idLength"===r)||e}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="eventName"),isFunction(checkLog[r])&&checkLog[r](t)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="Property key"),isFunction(checkLog[r])&&checkLog[r](t)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(e,t,r){return e||("Property Value",isFunction(checkLog[r])&&checkLog[r]("Property Value")),!0}},properties:function(e){return isObject(e)?each(e,function(e,t){check({propertyKey:t});check({propertyValue:e},function(e,r,s){return e||(r=t+"'s Value",isFunction(checkLog[s])&&checkLog[s](r)),!0})}):ruleOption.voidZero(e)&&sdLog("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return e!==undefined&&isObject(e)&&!isEmptyObject(e)?this.properties.call(this,e):sdLog("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_type"),isFunction(checkLog[r])&&checkLog[r](t)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_id"),isFunction(checkLog[r])&&checkLog[r](t)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="login_id_key"),isFunction(checkLog[r])&&checkLog[r](t),"keyLength"===r)||e}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),isFunction(checkLog[r])&&checkLog[r](t),"keyLength"===r)||e}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),isFunction(checkLog[r])&&checkLog[r](t),"keyLength"===r)||e}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Value"),isFunction(checkLog[r])&&checkLog[r](t),"idLength"===r)||e}},check:function(e,t,r){var s=this[e];if(isFunction(s))return s.call(this,t);if(!s)return!1;for(var i=0;i-1)return s;if("area"===i&&"map"===n.tagName.toLowerCase()&&ry(n).prev().tagName&&"img"===ry(n).prev().tagName.toLowerCase())return ry(n).prev();if("div"===i&&sd.para.heatmap.collect_tags.div&&r.isDivLevelValid(s)&&((sd.para.heatmap&&sd.para.heatmap.collect_tags&&sd.para.heatmap.collect_tags.div&&sd.para.heatmap.collect_tags.div.max_level||1)>1||r.isCollectableDiv(s)))return s;if(r.isStyleTag(i)&&sd.para.heatmap.collect_tags.div){var o=r.getCollectableParent(s);if(o&&r.isDivLevelValid(o))return o}return r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)})||null},getDivLevels:function(e,t){var r=heatmap.getElementPath(e,!0,t).split(" > "),s=0;return each(r,function(e){"div"===e&&s++}),s},isDivLevelValid:function(e){for(var t=sd.para.heatmap&&sd.para.heatmap.collect_tags&&sd.para.heatmap.collect_tags.div&&sd.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),s=r.length-1;s>=0;s--)if(heatmap.getDivLevels(r[s],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var s=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){s.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){s.unshift(e.tagName.toLowerCase());break}if(e===document.body){s.unshift("body");break}s.unshift(e.tagName.toLowerCase()),e=e.parentNode}return s.join(" > ")},getClosestLi:function(e){return function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null}(e,"li")},getElementPosition:function(e,t,r){var s=sd.heatmap.getClosestLi(e);if(!s)return null;var i=e.tagName.toLowerCase(),n=s.getElementsByTagName(i),a=n.length,o=[];if(a>1){for(var d=0;d1)return indexOf(o,e)}return function(e){if(!e.parentNode)return"";if(1===ry(e).getSameTypeSiblings().length)return 0;for(var t=0,r=e;ry(r).previousElementSibling().ele;r=ry(r).previousElementSibling().ele,t++);return t}(s)},setNotice:function(e){sd.is_heatmap_render_mode=!0,sd.para.heatmap||(sd.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(sd.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),sd.para.heatmap_url||(sd.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+sd.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,s=e.parentNode.children,i=0;i "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=getEleInfo({target:e});r.$element_selector=t||"",r.$element_path=sd.heatmap.getElementPath(e,sd.para.heatmap&&"not_use_id"===sd.para.heatmap.element_selector);var s=sd.heatmap.getElementPosition(e,r.$element_path,sd.para.heatmap&&"not_use_id"===sd.para.heatmap.element_selector);return isNumber(s)&&(r.$element_position=s),r},getPointerEventProp:function(e,t){if(!e)return{};function r(){return{scrollLeft:document.body.scrollLeft||document.documentElement.scrollLeft||0,scrollTop:document.body.scrollTop||document.documentElement.scrollTop||0}}function s(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function i(e){return Number(Number(e).toFixed(3))}return function(e){var n=e.pageX||e.clientX+r().scrollLeft||e.offsetX+s(t).targetEleX||0,a=e.pageY||e.clientY+r().scrollTop||e.offsetY+s(t).targetEleY||0;return{$page_x:i(n),$page_y:i(a)}}(e)},start:function(e,t,r,s,i){var n=isObject(s)?s:{},a=isFunction(i)?i:isFunction(s)?s:undefined;if(sd.para.heatmap&&sd.para.heatmap.collect_element&&!sd.para.heatmap.collect_element(t))return!1;var o=this.getEleDetail(t);if(sd.para.heatmap&&sd.para.heatmap.custom_property){var d=sd.para.heatmap.custom_property(t);isObject(d)&&(o=extend(o,d))}o=extend(o,this.getPointerEventProp(e,t),n),"a"===r&&sd.para.heatmap&&!0===sd.para.heatmap.isTrackLink?sd.trackLink({event:e,target:t},"$WebClick",o):sd.track("$WebClick",o,a)},hasElement:function(e,t){var r;if(e.event){var s=e.event;r=s.path||s._getPath&&s._getPath()}else e.element&&(r=ry(e.element).getParents());if(r&&isArray(r)&&r.length>0)for(var i=0;i-1)&&(!t||sd.para.heatmap&&sd.para.heatmap.collect_tags&&sd.para.heatmap.collect_tags.div?!!(isObject(sd.para.heatmap)&&isObject(sd.para.heatmap.collect_tags)&&isObject(sd.para.heatmap.collect_tags.div)&&isArray(sd.para.heatmap.collect_tags.div.ignore_tags)&&indexOf(sd.para.heatmap.collect_tags.div.ignore_tags,e)>-1):indexOf(["mark","/mark","strong","b","em","i","u","abbr","ins","del","s","sup"],e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(s,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(n){sd.log(n)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,s=r?r.tagName.toLowerCase():"";if("body"===s)return!1;var i=sd.para&&sd.para.heatmap&&sd.para.heatmap.collect_tags&&sd.para.heatmap.collect_tags.div&&sd.para.heatmap.collect_tags.div.max_level;if(s&&"div"===s&&(i>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(s,t))return this.getCollectableParent(r,t)}catch(n){sd.log(n)}return!1},listenUrlChange:function(e){e(),sd.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!isObject(sd.para.heatmap)||"default"!==sd.para.heatmap.scroll_notice_map)return!1;var e=!0;sd.para.scrollmap&&isFunction(sd.para.scrollmap.collect_url)&&this.listenUrlChange(function(){e=!!sd.para.scrollmap.collect_url()});var t=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t}({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,s=new Date,i=s-this.current_time;(i>sd.para.heatmap.scroll_delay_time&&r-e.$viewport_position!=0||t)&&(e.$url=getURL(),e.$title=document.title,e.$url_path=getURLPath(),e.event_duration=Math.min(sd.para.heatmap.scroll_event_duration,parseInt(i)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,sd.track("$WebStay",e)),this.current_time=s}});t.current_time=new Date,addEvent$1(window,"scroll",function(){if(!e)return!1;t.go()}),addEvent$1(window,"unload",function(){if(!e)return!1;t.go("notime")})},initHeatmap:function(){var e=this,t=!0;if(!isObject(sd.para.heatmap)||"default"!==sd.para.heatmap.clickmap)return!1;isFunction(sd.para.heatmap.collect_url)&&this.listenUrlChange(function(){t=!!sd.para.heatmap.collect_url()}),"all"===sd.para.heatmap.collect_elements?sd.para.heatmap.collect_elements="all":sd.para.heatmap.collect_elements="interact","all"===sd.para.heatmap.collect_elements?addEvent$1(document,"click",function(r){if(!t)return!1;var s=r||window.event;if(!s)return!1;var i=s.target||s.srcElement;if("object"!=typeof i)return!1;if("string"!=typeof i.tagName)return!1;var n=i.tagName.toLowerCase();if("body"===n||"html"===n)return!1;if(!i||!i.parentNode||!i.parentNode.children)return!1;var a=i.parentNode.tagName.toLowerCase();"a"===a||"button"===a?e.start(s,i.parentNode,a):e.start(s,i,n)}):addEvent$1(document,"click",function(r){if(!t)return!1;var s=r||window.event;if(!s)return!1;var i=s.target||s.srcElement,n=sd.heatmap.getTargetElement(i,r);n?e.start(s,n,n.tagName.toLowerCase()):isElement(i)&&"div"===i.tagName.toLowerCase()&&isObject(sd.para.heatmap)&&sd.para.heatmap.get_vtrack_config&&sd.unlimitedDiv.events.length>0&&sd.unlimitedDiv.isTargetEle(i)&&e.start(s,i,i.tagName.toLowerCase(),{$lib_method:"vtrack"})})}},commonWays={setOnlineState:function(e){if(!0===e&&isObject(sd.para.jsapp)&&"function"==typeof sd.para.jsapp.getData){sd.para.jsapp.isOnline=!0;var t=sd.para.jsapp.getData();isArray(t)&&t.length>0&&each(t,function(e){isJSONString(e)&&sd.sendState.realtimeSend(JSON.parse(e))})}else sd.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return pageInfo.campaignParams()},getStayTime:function(){return(new Date-sd._t)/1e3},setProfileLocal:function(e){if(!_localStorage.isSupport())return sd.setProfile(e),!1;if(!isObject(e)||isEmptyObject(e))return!1;var t=sd.store.readObjectVal("sensorsdata_2015_jssdk_profile"),r=!1;if(isObject(t)&&!isEmptyObject(t)){for(var s in e)!(s in t&&t[s]!==e[s])&&s in t||(t[s]=e[s],r=!0);r&&(sd.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),sd.setProfile(e))}else sd.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),sd.setProfile(e)},setInitReferrer:function(){var e=getReferrer();sd.setOnceProfile({_init_referrer:e,_init_referrer_host:pageInfo.pageProp.referrer_host})},setSessionReferrer:function(){var e=getReferrer();sd.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:pageInfo.pageProp.referrer_host})},setDefaultAttr:function(){pageInfo.register({_current_url:location.href,_referrer:getReferrer(),_referring_host:pageInfo.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var s=e.tagName.toLowerCase(),i=e.parentNode.tagName.toLowerCase(),n=sd.para.heatmap&&sd.para.heatmap.track_attr?sd.para.heatmap.track_attr:["data-sensors-click"];"button"===s||"a"===s||"a"===i||"button"===i||"input"===s||"textarea"===s||hasAttributes(e,n)||heatmap.start(null,e,s,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var s=e.tagName.toLowerCase();heatmap.start(null,e,s,t,r)}},autoTrackSinglePage:function(e,t){var r;function s(){var e=pageInfo.campaignParams(),t={};return each(e,function(e,r,s){-1!==(" "+sd.source_channel_standard+" ").indexOf(" "+r+" ")?t["$"+r]=s[r]:t[r]=s[r]}),t}r=this.autoTrackIsUsed?pageInfo.pageProp.url:pageInfo.pageProp.referrer;var i=!(e=isObject(e)?e:{}).not_set_profile;function n(e,t){sd.track("$pageview",extend({$referrer:r,$url:getURL(),$url_path:getURLPath(),$title:document.title},e,s()),t),r=getURL()}if(e.not_set_profile&&delete e.not_set_profile,n(e,t),this.autoTrackSinglePage=n,sd.is_first_visitor&&i){var a={};sd.para.preset_properties.search_keyword_baidu&&isReferralTraffic(document.referrer)&&isBaiduTraffic()&&(a.$search_keyword_id=getBaiduKeyword.id(),a.$search_keyword_id_type=getBaiduKeyword.type(),a.$search_keyword_id_hash=hashCode53(a.$search_keyword_id)),sd.setOnceProfile(extend({$first_visit_time:new Date,$first_referrer:getReferrer(),$first_browser_language:isString(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:getSourceFromReferrer(),$first_search_keyword:getKeywordFromReferrer()},s(),a)),sd.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=isObject(e)?e:{},this.autoTrack(extend(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=isObject(e)?e:{};var r=pageInfo.campaignParams(),s={};each(r,function(e,t,r){-1!==(" "+sd.source_channel_standard+" ").indexOf(" "+t+" ")?s["$"+t]=r[t]:s[t]=r[t]});var i=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var n=location.href;if(sd.para.is_single_page&&addHashEvent(function(){var r=getReferrer(n,!0);sd.track("$pageview",extend({$referrer:r,$url:getURL(),$url_path:getURLPath(),$title:document.title},s,e),t),n=getURL()}),sd.track("$pageview",extend({$referrer:getReferrer(null,!0),$url:getURL(),$url_path:getURLPath(),$title:document.title},s,e),t),sd.is_first_visitor&&i){var a={};sd.para.preset_properties.search_keyword_baidu&&isReferralTraffic(document.referrer)&&isBaiduTraffic()&&(a.$search_keyword_id=getBaiduKeyword.id(),a.$search_keyword_id_type=getBaiduKeyword.type(),a.$search_keyword_id_hash=hashCode53(a.$search_keyword_id)),sd.setOnceProfile(extend({$first_visit_time:new Date,$first_referrer:getReferrer(null,!0),$first_browser_language:isString(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:getSourceFromReferrer(),$first_search_keyword:getKeywordFromReferrer()},s,a)),sd.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return isEmptyObject(sd.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":sd.store._state._first_id||sd.store._state.first_id||sd.store._state._distinct_id||sd.store._state.distinct_id},setPlugin:function(e){if(!isObject(e))return!1;each(e,function(e,t){isFunction(e)&&(isObject(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[t]?e(window.SensorsDataWebJSSDKPlugin[t]):sd.log(t+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+t+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"))})},useModulePlugin:function(){sd.use.apply(sd,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}};function addReferrerHost(e){var t=!e.type||"profile"!==e.type.slice(0,7);isObject(e.properties)&&(e.properties.$first_referrer&&(e.properties.$first_referrer_host=getHostname(e.properties.$first_referrer,"\u53d6\u503c\u5f02\u5e38")),t&&("$referrer"in e.properties&&(e.properties.$referrer_host=""===e.properties.$referrer?"":getHostname(e.properties.$referrer,"\u53d6\u503c\u5f02\u5e38")),sd.para.preset_properties.latest_referrer&&sd.para.preset_properties.latest_referrer_host&&(e.properties.$latest_referrer_host=""===e.properties.$latest_referrer?"":getHostname(e.properties.$latest_referrer,"\u53d6\u503c\u5f02\u5e38"))))}function addPropsHook(e){var t=!e.type||"profile"!==e.type.slice(0,7),r=sd.para.preset_properties&&t;r&&sd.para.preset_properties.url&&"undefined"==typeof e.properties.$url&&(e.properties.$url=getURL()),r&&sd.para.preset_properties.title&&"undefined"==typeof e.properties.$title&&(e.properties.$title=document.title)}function initPara(e){extend(sdPara,e||sd.para||{}),sd.para=sdPara;var t,r={};if(isObject(sd.para.is_track_latest))for(var s in sd.para.is_track_latest)r["latest_"+s]=sd.para.is_track_latest[s];for(t in sd.para.preset_properties=extend({},sd.para_default.preset_properties,r,sd.para.preset_properties||{}),sd.para_default)void 0===sd.para[t]&&(sd.para[t]=sd.para_default[t]);"string"==typeof sd.para.server_url&&(sd.para.server_url=trim(sd.para.server_url),sd.para.server_url&&("://"===sd.para.server_url.slice(0,3)?sd.para.server_url=location.protocol.slice(0,-1)+sd.para.server_url:"//"===sd.para.server_url.slice(0,2)?sd.para.server_url=location.protocol+sd.para.server_url:"http"!==sd.para.server_url.slice(0,4)&&(sd.para.server_url=""))),"string"!=typeof sd.para.web_url||"://"!==sd.para.web_url.slice(0,3)&&"//"!==sd.para.web_url.slice(0,2)||("://"===sd.para.web_url.slice(0,3)?sd.para.web_url=location.protocol.slice(0,-1)+sd.para.web_url:sd.para.web_url=location.protocol+sd.para.web_url),"image"!==sd.para.send_type&&"ajax"!==sd.para.send_type&&"beacon"!==sd.para.send_type&&(sd.para.send_type="image"),sd.debug.protocol.serverUrl(),sd.bridge.initPara(),sd.bridge.initState();var i={datasend_timeout:6e3,send_interval:6e3};_localStorage.isSupport()&&isSupportCors()&&"object"==typeof localStorage?!0===sd.para.batch_send?sd.para.batch_send=extend({},i):"object"==typeof sd.para.batch_send&&(sd.para.batch_send=extend({},i,sd.para.batch_send)):sd.para.batch_send=!1;var n=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],a=["www.baidu.","m.baidu.","m.sm.cn","so.com","sogou.com","youdao.com","google.","yahoo.com/","bing.com/","ask.com/"],o=["weibo.com","renren.com","kaixin001.com","douban.com","qzone.qq.com","zhihu.com","tieba.baidu.com","weixin.qq.com"],d={baidu:["wd","word","kw","keyword"],google:"q",bing:"q",yahoo:"p",sogou:["query","keyword"],so:"q",sm:"q"};"object"==typeof sd.para.source_type&&(sd.para.source_type.utm=isArray(sd.para.source_type.utm)?sd.para.source_type.utm.concat(n):n,sd.para.source_type.search=isArray(sd.para.source_type.search)?sd.para.source_type.search.concat(a):a,sd.para.source_type.social=isArray(sd.para.source_type.social)?sd.para.source_type.social.concat(o):o,sd.para.source_type.keyword=isObject(sd.para.source_type.keyword)?extend(d,sd.para.source_type.keyword):d);var c=["mark","/mark","strong","b","em","i","u","abbr","ins","del","s","sup"];if(sd.para.heatmap&&!isObject(sd.para.heatmap)&&(sd.para.heatmap={}),isObject(sd.para.heatmap)){sd.para.heatmap.clickmap=sd.para.heatmap.clickmap||"default",sd.para.heatmap.scroll_notice_map=sd.para.heatmap.scroll_notice_map||"default",sd.para.heatmap.scroll_delay_time=sd.para.heatmap.scroll_delay_time||4e3,sd.para.heatmap.scroll_event_duration=sd.para.heatmap.scroll_event_duration||18e3,sd.para.heatmap.renderRefreshTime=sd.para.heatmap.renderRefreshTime||1e3,sd.para.heatmap.loadTimeout=sd.para.heatmap.loadTimeout||1e3,!0!==sd.para.heatmap.get_vtrack_config&&(sd.para.heatmap.get_vtrack_config=!1);var l=isArray(sd.para.heatmap.track_attr)?filter(sd.para.heatmap.track_attr,function(e){return e&&"string"==typeof e}):[];if(l.push("data-sensors-click"),sd.para.heatmap.track_attr=l,isObject(sd.para.heatmap.collect_tags))if(!0===sd.para.heatmap.collect_tags.div)sd.para.heatmap.collect_tags.div={ignore_tags:c,max_level:1};else if(isObject(sd.para.heatmap.collect_tags.div)){if(sd.para.heatmap.collect_tags.div.ignore_tags?isArray(sd.para.heatmap.collect_tags.div.ignore_tags)||(sd.log("ignore_tags \u53c2\u6570\u5fc5\u987b\u662f\u6570\u7ec4\u683c\u5f0f"),sd.para.heatmap.collect_tags.div.ignore_tags=c):sd.para.heatmap.collect_tags.div.ignore_tags=c,sd.para.heatmap.collect_tags.div.max_level){-1===indexOf([1,2,3],sd.para.heatmap.collect_tags.div.max_level)&&(sd.para.heatmap.collect_tags.div.max_level=1)}}else sd.para.heatmap.collect_tags.div=!1;else sd.para.heatmap.collect_tags={div:!1}}if(isArray(sd.para.server_url)&&sd.para.server_url.length)for(t=0;tsd.para.datasend_timeout&&(sd.para.datasend_timeout=sd.para.callback_timeout),sd.para.heatmap&&sd.para.heatmap.collect_tags&&isObject(sd.para.heatmap.collect_tags)&&each(sd.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&sd.heatmap.otherTags.push(t)}),sd.para.heatmap&&"default"===sd.para.heatmap.clickmap&&sd.heatmap.initUnlimitedTags()}var readyState={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}};function resetIdentities(e){var t={};for(var r in e)t[r]=e[r];sd.store._state.identities=t,sd.store.save()}function setInitVar(){sd._t=sd._t||1*new Date,sd.lib_version=sdkversion_placeholder,sd.is_first_visitor=!1,sd.source_channel_standard=source_channel_standard}function enableLocalLog(){if(_sessionStorage.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){sd.log("enableLocalLog error: "+e.message)}}function disableLocalLog(){_sessionStorage.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")}function quick(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);if("string"==typeof t&&commonWays[t])return commonWays[t].apply(commonWays,r);"function"==typeof t?t.apply(sd,r):sd.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0])}function use(e,t){return isString(e)?isObject(window.SensorsDataWebJSSDKPlugin)&&isObject(window.SensorsDataWebJSSDKPlugin[e])&&isFunction(window.SensorsDataWebJSSDKPlugin[e].init)?(window.SensorsDataWebJSSDKPlugin[e].init(sd,t),window.SensorsDataWebJSSDKPlugin[e]):isObject(sd.modules)&&isObject(sd.modules[e])&&isFunction(sd.modules[e].init)?(sd.modules[e].init(sd,t),sd.modules[e]):void sd.log(e+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+e+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"):(sd.log("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1)}function track(e,t,r){saEvent.check({event:e,properties:t})&&saEvent.send({type:"track",event:e,properties:t},r)}function bind(e,t){if(!saEvent.check({bindKey:e,bindValue:t}))return!1;sd.store._state.identities[e]=t,sd.store.save(),saEvent.send({type:"track_id_bind",event:"$BindID",properties:{}})}function unbind(e,t){if(!saEvent.check({unbindKey:e,bindValue:t}))return!1;if(isObject(sd.store._state.identities)&&sd.store._state.identities.hasOwnProperty(e)&&sd.store._state.identities[e]===t){var r=sd.store.getUnionId().login_id;r&&e+"+"+t===r&&(sd.store._state.distinct_id=sd.store._state.first_id,sd.store._state.first_id="",sd.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete sd.store._state.identities[e],sd.store.save())}var s={};s[e]=t,saEvent.send({identities:s,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function trackLink(e,t,r){function s(e,t,r){var s=null;if((e=e||{}).ele&&(s=e.ele),e.event&&(s=e.target?e.target:e.event.target),r=r||{},!s||"object"!=typeof s)return!1;if(!s.href||/^javascript/.test(s.href)||s.target||s.download||s.onclick)return sd.track(t,r),!1;function i(e){e.stopPropagation(),e.preventDefault();var i=!1;function n(){i||(i=!0,location.href=s.href)}setTimeout(n,1e3),sd.track(t,r,n)}e.event&&i(e.event),e.ele&&addEvent$1(e.ele,"click",function(e){i(e)})}"object"==typeof e&&e.tagName?s({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&s(e,t,r)}function trackLinks(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void addEvent$1(e,"click",function(s){s.preventDefault();var i=!1;function n(){i||(i=!0,location.href=e.href)}setTimeout(n,1e3),sd.track(t,r,n)}))}function setItem(e,t,r){saEvent.check({item_type:e,item_id:t,properties:r})&&saEvent.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function deleteItem(e,t){saEvent.check({item_type:e,item_id:t})&&saEvent.sendItem({type:"item_delete",item_type:e,item_id:t})}function setProfile(e,t){saEvent.check({propertiesMust:e})&&saEvent.send({type:"profile_set",properties:e},t)}function setOnceProfile(e,t){saEvent.check({propertiesMust:e})&&saEvent.send({type:"profile_set_once",properties:e},t)}function appendProfile(e,t){saEvent.check({propertiesMust:e})&&(each(e,function(t,r){isString(t)?e[r]=[t]:isArray(t)?e[r]=t:(delete e[r],sd.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),isEmptyObject(e)||saEvent.send({type:"profile_append",properties:e},t))}function incrementProfile(e,t){var r=e;isString(e)&&((e={})[r]=1),saEvent.check({propertiesMust:e})&&(!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}(e)?sd.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"):saEvent.send({type:"profile_increment",properties:e},t))}function deleteProfile(e){saEvent.send({type:"profile_delete"},e),store.set("distinct_id",UUID()),store.set("first_id","")}function unsetProfile(e,t){var r=e,s={};isString(e)&&(e=[]).push(r),isArray(e)?(each(e,function(e){isString(e)?s[e]=!0:sd.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),saEvent.send({type:"profile_unset",properties:s},t)):sd.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")}function identify(e,t){function r(e){sd.store._state.identities.$identity_anonymous_id=e,sd.store.save()}"number"==typeof e&&(e=String(e));var s=store.getFirstId();if(void 0===e){var i=UUID();s?store.set("first_id",i):store.set("distinct_id",i),r(i)}else saEvent.check({distinct_id:e})&&(!0===t?s?store.set("first_id",e):store.set("distinct_id",e):s?store.change("first_id",e):store.change("distinct_id",e),r(e))}function sendSignup(e,t,r,s){var i=store.getFirstId()||store.getDistinctId();store.set("distinct_id",e),saEvent.send({original_id:i,distinct_id:sd.store.getDistinctId(),type:"track_signup",event:t,properties:r},s)}function trackSignup(e,t,r,s){"number"==typeof e&&(e=String(e)),saEvent.check({distinct_id:e,event:t,properties:r})&&sendSignup(e,t,r,s)}function registerPage(e){saEvent.check({properties:e})?extend(pageInfo.currentProps,e):sd.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function clearAllRegister(e){store.clearAllProps(e)}function clearPageRegister(e){var t;if(isArray(e)&&e.length>0)for(t=0;t20&&this.pendingEvents.shift()},on:function(e,t,r,s){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),s=!1!==s,this.pendingEvents.length>0&&s&&each(this.pendingEvents,function(s){s.type===e&&t.apply(r,s.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var common={__proto__:null,parseSuperProperties:parseSuperProperties,searchConfigData:searchConfigData,strip_empty_properties:strip_empty_properties,getCurrentDomain:getCurrentDomain,getEleInfo:getEleInfo,isBaiduTraffic:isBaiduTraffic,getReferrerEqid:getReferrerEqid,getReferrerEqidType:getReferrerEqidType,getBaiduKeyword:getBaiduKeyword,isReferralTraffic:isReferralTraffic,getReferrer:getReferrer,getKeywordFromReferrer:getKeywordFromReferrer,getWxAdIdFromUrl:getWxAdIdFromUrl,getReferSearchEngine:getReferSearchEngine,getSourceFromReferrer:getSourceFromReferrer,info:pageInfo,ajax:ajax$1,getElementContent:getElementContent$1,cookie:cookie$1,addEvent:addEvent$1,EventEmitterSa:EventEmitterSa,encrypt:encrypt,decryptIfNeeded:decryptIfNeeded},kit={};function getSendUrl(e,t){var r=kit.encodeTrackData(t);return-1!==e.indexOf("?")?e+"&"+r:e+"?"+r}function getSendData(e){return kit.encodeTrackData(e)}kit.buildData=function(e){var t={identities:{},distinct_id:sd.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(sd.lib_version)},properties:{}};return isObject(e)&&isObject(e.identities)&&!isEmptyObject(e.identities)?extend(t.identities,e.identities):extend(t.identities,store._state.identities),isObject(e)&&isObject(e.properties)&&!isEmptyObject(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),extend(t,sd.store.getUnionId(),e),dataStageImpl.stage.process("addCustomProps",t),isObject(e.properties)&&!isEmptyObject(e.properties)&&extend(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=extend({},pageInfo.properties(),store.getProps(),store.getSessionProps(),pageInfo.currentProps,t.properties),sd.para.preset_properties.latest_referrer&&!isString(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),sd.para.preset_properties.latest_search_keyword&&!isString(t.properties.$latest_search_keyword)&&(sd.para.preset_properties.search_keyword_baidu&&isString(t.properties.$search_keyword_id)&&isNumber(t.properties.$search_keyword_id_hash)&&isString(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),sd.para.preset_properties.latest_traffic_source_type&&!isString(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),sd.para.preset_properties.latest_landing_page&&!isString(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===sd.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id,delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):sd.para.preset_properties.latest_wx_ad_click_id&&!isString(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),isString(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=getURL())),t.properties.$time&&isDate(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,sd.vtrackBase.addCustomProps(t),parseSuperProperties(t),saNewUser.checkIsAddSign(t),saNewUser.checkIsFirstTime(t),sd.addReferrerHost(t),sd.addPropsHook(t),dataStageImpl.stage.process("formatData",t),t},kit.sendData=function(e,t){var r=searchConfigData(e.properties);!0===sd.para.debug_mode?(sd.log(e),sd.saEvent.debugPath(JSON.stringify(e),t)):sd.sendState.getSendCall(e,r,t)},kit.encodeTrackData=function(e){var t=base64Encode(e),r="crc="+hashCode(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)};var ImageSender=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,sd.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=getSendUrl(e.server_url,e.data)};ImageSender.prototype.start=function(){var e=this;sd.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},ImageSender.prototype.lastClear=function(){getUA().ie!==undefined?this.img.src="about:blank":this.img.src=""};var AjaxSender=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=getSendData(e.data)};AjaxSender.prototype.start=function(){var e=this;ajax$1({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:sd.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var BeaconSender=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=getSendData(e.data)};function getSendType(e){var t=["image","ajax","beacon"],r=t[0];return"beacon"===(r=e.config&&indexOf(t,e.config.send_type)>-1?e.config.send_type:sd.para.send_type)&&!1===isSupportBeaconSend()&&(r="image"),"ajax"===r&&!1===isSupportCors()&&(r="image"),r}function getSender(e){switch(getSendType(e)){case"image":return new ImageSender(e);case"ajax":return new AjaxSender(e);case"beacon":return new BeaconSender(e);default:return new ImageSender(e)}}function getRealtimeInstance(e){var t=getSender(e),r=t.start;return t.start=function(){var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},sd.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},sd.para.datasend_timeout-sd.para.callback_timeout)},t.isEnd=function(){this.received||(this.received=!0,this.end())},t}BeaconSender.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var sendState={};function BatchSend(){this.sendingData=0,this.sendingItemKeys=[]}sendState.getSendCall=function(e,t,r){if(sd.is_heatmap_render_mode)return!1;if(sd.readyState.state<3)return sd.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(getRandom()).slice(2,5)+String(getRandom()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var s=e;e=JSON.stringify(e);var i={data:s,config:t,callback:r};if(sd.events.tempAdd("send",s),!sd.para.app_js_bridge&&sd.para.batch_send&&localStorage.length<200)return sd.log(s),sd.batchSend.add(i.data),!1;"item_set"===s.type||"item_delete"===s.type?this.prepareServerUrl(i):sd.bridge.dataSend(i,this,r),sd.log(s)},sendState.prepareServerUrl=function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(isArray(sd.para.server_url)&&sd.para.server_url.length)for(var t=0;t0&&--this.sendingData,isArray(e)&&e.length>0&&each(e,function(e){_localStorage.remove(e)})},send:function(e){var t=this;isString(sd.para.server_url)&&""!==sd.para.server_url||isArray(sd.para.server_url)&&sd.para.server_url.length?ajax$1({url:isArray(sd.para.server_url)?sd.para.server_url[0]:sd.para.server_url,type:"POST",data:"data_list="+encodeURIComponent(base64Encode(JSON.stringify(e.vals))),credentials:!1,timeout:sd.para.batch_send.datasend_timeout,cors:!0,success:function(){t.remove(e.keys),t.removePendingItems(e.keys)},error:function(){t.sendingData>0&&--t.sendingData,t.removePendingItems(e.keys)}}):sd.log("\u5f53\u524d server_url \u4e3a\u7a7a\u6216\u4e0d\u6b63\u786e\uff0c\u53ea\u5728\u63a7\u5236\u53f0\u6253\u5370\u65e5\u5fd7\uff0cnetwork \u4e2d\u4e0d\u4f1a\u53d1\u6570\u636e\uff0c\u8bf7\u914d\u7f6e\u6b63\u786e\u7684 server_url\uff01")},appendPendingItems:function(e){if(!1!==isArray(e)){this.sendingItemKeys=unique(this.sendingItemKeys.concat(e));try{var t=unique(this.getPendingItems().concat(e));sd.store.saveObjectVal("sawebjssdk-sendingitems",t)}catch(r){}}},removePendingItems:function(e){if(!1!==isArray(e)){this.sendingItemKeys.length&&(this.sendingItemKeys=filter(this.sendingItemKeys,function(t){return-1===indexOf(e,t)}));try{var t=filter(this.getPendingItems(),function(t){return-1===indexOf(e,t)});sd.store.saveObjectVal("sawebjssdk-sendingitems",t)}catch(r){}}},getPendingItems:function(){return sd.store.readObjectVal("sawebjssdk-sendingitems")||[]},sendPrepare:function(e){this.appendPendingItems(e.keys);var t=e.vals;t.length>0&&this.send({keys:e.keys,vals:t})},sendStrategy:function(){if(!1===document.hasFocus())return!1;var e=this.readStore();e.keys.length>0&&0===this.sendingData&&(this.sendingData=1,this.sendPrepare(e))},batchInterval:function(){var e=this;setInterval(function(){e.sendStrategy()},sd.para.batch_send.send_interval)},readStore:function(){for(var e=[],t=[],r=null,s=(new Date).getTime(),i=localStorage.length,n=this.getPendingItems(),a=0;a-1)continue;(r=sd.store.readObjectVal(o))?r&&isObject(r)?(r._flush_time=s,e.push(o),t.push(r)):(localStorage.removeItem(o),sd.log("localStorage-\u6570\u636eparse\u5f02\u5e38"+r)):(localStorage.removeItem(o),sd.log("localStorage-\u6570\u636e\u53d6\u503c\u5f02\u5e38"+r))}}return{keys:e,vals:t}},writeStore:function(e){var t=String(getRandom()).slice(2,5)+String(getRandom()).slice(2,5)+String((new Date).getTime()).slice(3);sd.store.saveObjectVal("sawebjssdk-"+t,e)}};var batchSend=new BatchSend,bridge={bridge_info:{touch_app_bridge:!1,verify_success:!1,platform:""},is_verify_success:!1,initPara:function(){var e={is_send:!0,white_list:[],is_mui:!1};"object"==typeof sd.para.app_js_bridge?sd.para.app_js_bridge=extend({},e,sd.para.app_js_bridge):!0===sd.para.use_app_track||!0===sd.para.app_js_bridge||"only"===sd.para.use_app_track?(!1!==sd.para.use_app_track_is_send&&"only"!==sd.para.use_app_track||(e.is_send=!1),sd.para.app_js_bridge=extend({},e)):"mui"===sd.para.use_app_track&&(e.is_mui=!0,sd.para.app_js_bridge=extend({},e)),!1===sd.para.app_js_bridge.is_send&&sd.log("\u8bbe\u7f6e\u4e86 is_send:false,\u5982\u679c\u6253\u901a\u5931\u8d25\uff0c\u6570\u636e\u5c06\u88ab\u4e22\u5f03\uff01")},initState:function(){function e(e){function t(e){var t={hostname:"",project:""};try{t.hostname=_URL(e).hostname,t.project=_URL(e).searchParams.get("project")||"default"}catch(r){sd.log(r)}return t}var r=t(e),s=t(sd.para.server_url);if(r.hostname===s.hostname&&r.project===s.project)return!0;if(sd.para.app_js_bridge.white_list.length>0)for(var i=0;i").pop()).slice(0,3))return!1;return!0},configIsMatchNew:function(e,t){if(isString(e.$element_selector)&&isString(t.element_selector)){if("element_selector"===t.element_field&&"equal"===t["function"])return e.$element_selector===t.element_selector;if("element_selector"===t.element_field&&"contain"===t["function"])return e.$element_selector.indexOf(t.element_selector)>-1}if(isString(e.$element_path)&&isString(t.element_path)){if("element_path"===t.element_field&&"equal"===t["function"])return e.$element_path===t.element_path;if("element_path"===t.element_field&&"contain"===t["function"])return e.$element_path.indexOf(t.element_path)>-1}return!1},configIsMatch:function(e,t){return(!t.limit_element_content||t.element_content===e.$element_content)&&((!t.limit_element_position||t.element_position===String(e.$element_position))&&(t.element_field&&t["function"]?vtrackBase.configIsMatchNew(e,t):vtrackBase.configIsMatchOldVersion(e,t)))},configIsMatchOldVersion:function(e,t){if(!t.element_path)return!1;if(e.$element_position!==undefined){if(t.element_path!==e.$element_path)return!1}else if(sd.vtrackBase.isDiv({element_path:t.element_path})){if(e.$element_path.indexOf(t.element_path)<0)return!1}else if(t.element_path!==e.$element_path)return!1;return!0},filterConfig:function(e,t,r){var s=[];if(!r){var i=vtrackBase.initUrl();if(!i)return[];r=i.page_url}return"$WebClick"===e.event&&each(t,function(t){isObject(t)&&("webclick"===t.event_type||"appclick"===t.event_type)&&isObject(t.event)&&t.event.url_host===r.host&&t.event.url_path===r.pathname&&vtrackBase.configIsMatch(e.properties,t.event)&&s.push(t)}),s},getPropElInLi:function(e,t){if(!(e&&isElement(e)&&isString(t)))return null;if("li"!==e.tagName.toLowerCase())return null;var r=sd.heatmap.getDomSelector(e);if(r){var s=getDomBySelector(r+t);return s||null}return sd.log("----custom---\u83b7\u53d6\u540c\u7ea7\u5c5e\u6027\u5143\u7d20\u5931\u8d25\uff0cselector\u4fe1\u606f\u5f02\u5e38",r,t),null},getProp:function(e,t){if(!isObject(e))return!1;if(!(isString(e.name)&&e.name.length>0))return sd.log("----vcustom----\u5c5e\u6027\u540d\u4e0d\u5408\u6cd5,\u5c5e\u6027\u629b\u5f03",e.name),!1;var r,s,i={};if("content"===e.method){var n;if(isString(e.element_selector)&&e.element_selector.length>0)n=getDomBySelector(e.element_selector);else{if(!t||!isString(e.list_selector))return sd.log("----vcustom----\u5c5e\u6027\u914d\u7f6e\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var a=getDomBySelector(t.properties.$element_selector);if(!a)return sd.log("----vcustom----\u70b9\u51fb\u5143\u7d20\u83b7\u53d6\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var o=sd.heatmap.getClosestLi(a);n=vtrackBase.getPropElInLi(o,e.list_selector)}if(!n||!isElement(n))return sd.log("----vcustom----\u5c5e\u6027\u5143\u7d20\u83b7\u53d6\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;if("input"===n.tagName.toLowerCase())r=n.value||"";else if("select"===n.tagName.toLowerCase()){var d=n.selectedIndex;isNumber(d)&&isElement(n[d])&&(r=getElementContent$1(n[d],"select"))}else r=getElementContent$1(n,n.tagName.toLowerCase());if(e.regular){try{s=new RegExp(e.regular).exec(r)}catch(c){return sd.log("----vcustom----\u6b63\u5219\u5904\u7406\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1}if(null===s)return sd.log("----vcustom----\u5c5e\u6027\u89c4\u5219\u5904\u7406\uff0c\u672a\u5339\u914d\u5230\u7ed3\u679c,\u5c5e\u6027\u629b\u5f03",e.name),!1;if(!isArray(s)||!isString(s[0]))return sd.log("----vcustom----\u6b63\u5219\u5904\u7406\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name,s),!1;r=s[0]}if("STRING"===e.type)i[e.name]=r;else if("NUMBER"===e.type){if(r.length<1)return sd.log("----vcustom----\u672a\u83b7\u53d6\u5230\u6570\u5b57\u5185\u5bb9\uff0c\u5c5e\u6027\u629b\u5f03",e.name,r),!1;if(isNaN(Number(r)))return sd.log("----vcustom----\u6570\u5b57\u7c7b\u578b\u5c5e\u6027\u8f6c\u6362\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name,r),!1;i[e.name]=Number(r)}return i}return sd.log("----vcustom----\u5c5e\u6027\u4e0d\u652f\u6301\u6b64\u83b7\u53d6\u65b9\u5f0f",e.name,e.method),!1},getAssignConfigs:function(e,t){var r=vtrackBase.initUrl();if(!r||!r.page_url)return[];if(!isObject(t))return[];var s=[];return t.events=t.events||t.eventList,isArray(t.events)&&t.events.length>0?(each(t.events,function(t){isObject(t)&&isObject(t.event)&&t.event.url_host===r.page_url.host&&t.event.url_path===r.page_url.pathname&&e(t)&&s.push(t)}),s):[]},addCustomProps:function(e){if("success"===sd.bridge.bridge_info.verify_success){var t=sd.vapph5collect.customProp.geth5Props(JSON.parse(JSON.stringify(e)));isObject(t)&&!isEmptyObject(t)&&(e.properties=extend(e.properties,t))}var r=sd.vtrackcollect.customProp.getVtrackProps(JSON.parse(JSON.stringify(e)));return isObject(r)&&!isEmptyObject(r)&&(e.properties=extend(e.properties,r)),e},init:function(){sd.vtrackcollect.init(),"success"===sd.bridge.bridge_info.verify_success&&sd.vapph5collect.init()}},unlimitedDiv={events:[],init:function(e){this.filterWebClickEvents(e)},filterWebClickEvents:function(e){this.events=sd.vtrackcollect.getAssignConfigs(function(e){return!(!isObject(e)||!0!==e.event.unlimited_div||"webclick"!==e.event_type)},e)},isTargetEle:function(e){var t=sd.heatmap.getEleDetail(e);if(!isObject(t)||!isString(t.$element_path))return!1;for(var r=0;r0)},e),this.events.length?this.configSwitch=!0:this.configSwitch=!1},getVtrackProps:function(e){var t={};return this.collectAble()?("$WebClick"===e.event&&(t=this.clickCustomPropMaker(e,this.events)),t):{}},clickCustomPropMaker:function(e,t,r){var s=this;r=r||this.filterConfig(e,t,sd.vtrackcollect.url_info.page_url);var i={};return r.length?(each(r,function(t){isArray(t.properties)&&t.properties.length>0&&each(t.properties,function(t){var r=s.getProp(t,e);isObject(r)&&extend(i,r)})}),i):{}},getProp:vtrackBase.getProp,getPropElInLi:vtrackBase.getPropElInLi,filterConfig:vtrackBase.filterConfig},vtrackcollect={unlimitedDiv:unlimitedDiv,config:{},storageEnable:!0,storage_name:"webjssdkvtrackcollect",para:{session_time:18e5,timeout:5e3,update_interval:18e5},url_info:{},timer:null,update_time:null,customProp:customProp,initUrl:function(){var e=vtrackBase.initUrl();if(e){var t;try{(t=new urlParse(sd.para.server_url))._values.Path="/config/visualized/Web.conf",e.api_url=t.getUrl()}catch(r){return sd.log("----vtrackcollect---API\u5730\u5740\u89e3\u6790\u5f02\u5e38",r),!1}this.url_info=e}return e},init:function(){if(!isObject(sd.para.heatmap)||!sd.para.heatmap.get_vtrack_config)return!1;if(_localStorage.isSupport()||(this.storageEnable=!1),!this.initUrl())return sd.log("----vtrackcustom----\u521d\u59cb\u5316\u5931\u8d25\uff0curl\u4fe1\u606f\u89e3\u6790\u5931\u8d25"),!1;if(this.storageEnable){var e=sd.store.readObjectVal(this.storage_name);if(isObject(e)&&isObject(e.data))if(this.serverUrlIsSame(e.serverUrl)){this.config=e.data,this.update_time=e.updateTime,this.updateConfig(e.data);var t=(new Date).getTime()-this.update_time;if(isNumber(t)&&t>0&&t0&&t0&&each(i.properties,function(r){if(isObject(r))if(!1===r.h5)isArray(t.sensorsdata_app_visual_properties)||(t.sensorsdata_app_visual_properties=[]),t.sensorsdata_app_visual_properties.push(r);else{var i=s.getProp(r,e);isObject(i)&&(t=extend(t,i))}}),isString(i.event_name)&&r.push(i.event_name))}),isObject(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(!0===window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode())&&(t.sensorsdata_web_visual_eventName=r)}return t.sensorsdata_app_visual_properties&&(t.sensorsdata_app_visual_properties=base64Encode(JSON.stringify(t.sensorsdata_app_visual_properties))),t},initAppGetPropsBridge:function(){var e=this;return new sd.JSBridge({type:"getJSVisualProperties",app_call_js:function(t){var r={};try{t=JSON.parse(base64Decode(t))}catch(a){sd.log("getJSVisualProperties data parse error!")}if(isObject(t)){var s=t.sensorsdata_js_visual_properties,i=e.initUrl();i&&(i=i.page_url,isArray(s)&&s.length>0&&each(s,function(t){if(isObject(t)&&t.url_host===i.host&&t.url_path===i.pathname&&t.h5){var s=e.getProp(t);isObject(s)&&(r=extend(r,s))}}))}if("android"===sd.bridge.bridge_info.platform){var n={callType:"getJSVisualProperties",data:r};isObject(t)&&t.message_id&&(n.message_id=t.message_id),isObject(window.SensorsData_APP_New_H5_Bridge)&&isFunction(SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app)?SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app(JSON.stringify(n)):isObject(window.SensorsData_APP_JS_Bridge)&&isFunction(SensorsData_APP_JS_Bridge.sensorsdata_js_call_app)&&SensorsData_APP_JS_Bridge.sensorsdata_js_call_app(JSON.stringify(n))}return r}})}},vapph5collect={events:[],customProp:vapph5CustomProp,getAssignConfigs:vtrackBase.getAssignConfigs,initUrl:vtrackBase.initUrl,init:function(){if(this.initUrl()){var e=this.getConfigFromApp();e&&this.updateConfigs(e),this.customProp.init(),this.initAppUpdateConfigBridge()}},initAppUpdateConfigBridge:function(){var e=this;return new sd.JSBridge({type:"updateH5VisualConfig",app_call_js:function(t){if(t){try{t=JSON.parse(base64Decode(t))}catch(r){return void sd.log("updateH5VisualConfig result parse error\uff01")}e.updateConfigs(t)}}})},getConfigFromApp:function(){var e=new sd.JSBridge({type:"sensorsdata_get_app_visual_config"}).getAppData();if(e)try{e=JSON.parse(base64Decode(e))}catch(t){e=null,sd.log("getAppVisualConfig result parse error\uff01")}return e},updateConfigs:function(e){this.events=this.filterConfigs(e),this.customProp.updateEvents(this.events)},filterConfigs:function(e){return this.getAssignConfigs(function(e){return!(!isObject(e)||!1===e.h5)},e)}};function addSinglePageEvent(e){var t,r=location.href,s=window.history.pushState,i=window.history.replaceState;isFunction(window.history.pushState)&&(window.history.pushState=function(){s.apply(window.history,arguments),e(r),r=location.href}),isFunction(window.history.replaceState)&&(window.history.replaceState=function(){i.apply(window.history,arguments),e(r),r=location.href}),t=window.document.documentMode?"hashchange":s?"popstate":"hashchange",addEvent(window,t,function(){e(r),r=location.href})}var spa=new EventEmitter,ee={};function getFlagValue(e){var t=null,r=new RegExp(e+"=([^&#]+)");try{each(JSON.parse(window.name),function(r,s){e===s&&(t=decodeURIComponent(r))})}catch(i){t=null}if(null===t){var s=location.href.match(r);s&&s[0]&&s[1]&&(t=_decodeURIComponent(s[1]))}return t}ee.spa=spa,ee.initSystemEvent=function(){addSinglePageEvent(function(e){spa.emit("switch",e)})};var heatmapMode={getOriginalUrl:function(){var e=location.protocol+"//"+location.host+location.pathname,t="",r="";function s(e){var t=e.split("&"),r=["sa-request-id","sa-request-type","sa-request-url"],s=[];return each(t,function(e){r.indexOf(e.split("=")[0])<0&&s.push(e)}),s.join("&")}if(location.search){var i=s(location.search.slice(1));i&&(t="?"+i)}if(location.hash&&(r=location.hash,location.hash.indexOf("?")>-1)){var n=location.hash.split("?"),a=s(n[1]);a&&(r=n[0]+"?"+a)}return decodeURI(e+t+r)},isSeachHasKeyword:function(){return null!==getFlagValue("sa-request-id")&&("string"==typeof sessionStorage.getItem("sensors-visual-mode")&&sessionStorage.removeItem("sensors-visual-mode"),!0)},hasKeywordHandle:function(){var e=getFlagValue("sa-request-id"),t=getFlagValue("sa-request-type"),r=getFlagValue("sa-request-url");heatmap.setNotice(r),_sessionStorage.isSupport()&&(null!==r&&sessionStorage.setItem("sensors_heatmap_url",r),sessionStorage.setItem("sensors_heatmap_id",e),null!==t?"1"===t||"2"===t||"3"===t?sessionStorage.setItem("sensors_heatmap_type",t):t=null:t=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),this.isReady(e,t,this.getOriginalUrl())},isReady:function(e,t,r){sd.para.heatmap_url?loadScript({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(sd,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(sd.heatmap_version&&sd.heatmap_version===sd.lib_version||console.log("heatmap.js\u4e0esensorsdata.js\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669!")))},0)},error:function(){},type:"js",url:sd.para.heatmap_url}):sd.log("\u6ca1\u6709\u6307\u5b9aheatmap_url\u7684\u8def\u5f84")},isStorageHasKeyword:function(){return _sessionStorage.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")},storageHasKeywordHandle:function(){heatmap.setNotice(),heatmapMode.isReady(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),this.getOriginalUrl())}},vtrackMode={isStorageHasKeyword:function(){return _sessionStorage.isSupport()&&"string"==typeof sessionStorage.getItem("sensors-visual-mode")},isSearchHasKeyword:function(){return(!0===getFlagValue("sa-visual-mode")||"true"===getFlagValue("sa-visual-mode"))&&("string"==typeof sessionStorage.getItem("sensors_heatmap_id")&&sessionStorage.removeItem("sensors_heatmap_id"),!0)},loadVtrack:function(){loadScript({success:function(){},error:function(){},type:"js",url:sd.para.vtrack_url?sd.para.vtrack_url:location.protocol+"//static.sensorsdata.cn/sdk/"+sd.lib_version+"/vtrack.min.js"})},messageListener:function(e){if("sa-fe"!==e.data.source)return!1;if("v-track-mode"===e.data.type){if(e.data.data&&e.data.data.isVtrack)if(_sessionStorage.isSupport()&&sessionStorage.setItem("sensors-visual-mode","true"),e.data.data.userURL&&location.href.match(/sa-visual-mode=true/)){var t=isHttpUrl(r=e.data.data.userURL)?removeScriptProtocol(r):(sd.log("\u53ef\u89c6\u5316\u6a21\u5f0f\u68c0\u6d4b URL \u5931\u8d25"),!1);t&&(window.location.href=t)}else vtrackMode.loadVtrack();window.removeEventListener("message",vtrackMode.messageListener,!1)}var r},removeMessageHandle:function(){window.removeEventListener&&window.removeEventListener("message",vtrackMode.messageListener,!1)},verifyVtrackMode:function(){window.addEventListener&&window.addEventListener("message",vtrackMode.messageListener,!1),vtrackMode.postMessage()},postMessage:function(){window.parent&&window.parent.postMessage&&window.parent.postMessage({source:"sa-web-sdk",type:"v-is-vtrack",data:{sdkversion:"1.22.3"}},"*")},notifyUser:function(){var e=function(t){if("sa-fe"!==t.data.source)return!1;"v-track-mode"===t.data.type&&(t.data.data&&t.data.data.isVtrack&&alert("\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\uff0c\u8bf7\u5347\u7ea7\u90e8\u7f72\u795e\u7b56\u6570\u636e\u6cbb\u7406"),window.removeEventListener("message",e,!1))};window.addEventListener&&window.addEventListener("message",e,!1),vtrackMode.postMessage()}};function defineMode(e){var t=sd.bridge.bridge_info;function r(){var e=[];t.touch_app_bridge||e.push(sd.debug.defineMode("1")),isObject(sd.para.app_js_bridge)||(e.push(sd.debug.defineMode("2")),t.verify_success=!1),isObject(sd.para.heatmap)&&"default"==sd.para.heatmap.clickmap||e.push(sd.debug.defineMode("3")),"fail"===t.verify_success&&e.push(sd.debug.defineMode("4"));var r={callType:"app_alert",data:e};SensorsData_App_Visual_Bridge&&SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info?SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info(JSON.stringify(r)):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.sensorsdataNativeTracker&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage(JSON.stringify(r))}if(isObject(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(!0===window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode()))if(isObject(sd.para.heatmap)&&"default"==sd.para.heatmap.clickmap)if(isObject(sd.para.app_js_bridge)&&"success"===t.verify_success)if(e)sa_jssdk_app_define_mode(sd,e);else{var s=location.protocol;loadScript({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_app_define_mode&&sa_jssdk_app_define_mode(sd,e)},0)},error:function(){},type:"js",url:(s=indexOf(["http:","https:"],s)>-1?s:"https:")+"//static.sensorsdata.cn/sdk/"+sd.lib_version+"/vapph5define.min.js"})}else r();else r()}function listenSinglePage(){sd.para.is_track_single_page&&spa.on("switch",function(e){var t=function(t){t=t||{},e!==location.href&&(pageInfo.pageProp.referrer=getURL(e),sd.quick("autoTrack",extend({$url:getURL(),$referrer:getURL(e)},t)))};if("boolean"==typeof sd.para.is_track_single_page)t();else if("function"==typeof sd.para.is_track_single_page){var r=sd.para.is_track_single_page();isObject(r)?t(r):!0===r&&t()}})}function enterFullTrack(){sd._q&&isArray(sd._q)&&sd._q.length>0&&each(sd._q,function(e){sd[e[0]].apply(sd,Array.prototype.slice.call(e[1]))}),isObject(sd.para.heatmap)&&(heatmap.initHeatmap(),heatmap.initScrollmap())}function trackMode(){sd.readyState.setState(3),new sd.JSBridge({type:"visualized",app_call_js:function(){"undefined"!=typeof sa_jssdk_app_define_mode?defineMode(!0):defineMode(!1)}}),defineMode(!1),sd.bridge.app_js_bridge_v1(),pageInfo.initPage(),listenSinglePage(),sd.para.batch_send&&(addEvent$1(window,"onpagehide"in window?"pagehide":"unload",function(){sd.batchSend.clearPendingStatus()}),sd.batchSend.batchInterval()),sd.store.init(),sd.vtrackBase.init(),sd.readyState.setState(4),enterFullTrack()}function detectMode(){heatmapMode.isSeachHasKeyword()?heatmapMode.hasKeywordHandle():window.parent!==self&&vtrackMode.isSearchHasKeyword()?vtrackMode.verifyVtrackMode():heatmapMode.isStorageHasKeyword()?heatmapMode.storageHasKeywordHandle():window.parent!==self&&vtrackMode.isStorageHasKeyword()?vtrackMode.verifyVtrackMode():(trackMode(),vtrackMode.notifyUser())}var methods=["setItem","deleteItem","getAppStatus","track","quick","register","registerPage","registerOnce","trackSignup","setProfile","setOnceProfile","appendProfile","incrementProfile","deleteProfile","unsetProfile","identify","login","logout","trackLink","clearAllRegister","clearPageRegister"];function checkState(){each(methods,function(e){var t=sd[e];sd[e]=function(){if(sd.readyState.state<3)return isArray(sd._q)||(sd._q=[]),sd._q.push([e,arguments]),!1;if(sd.readyState.getState())return t.apply(sd,arguments);try{console.error("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}catch(r){sd.log(r)}}})}var saEmpty={track:function(e,t,r){},quick:function(e,t,r,s){},register:function(e){},registerPage:function(e){},registerOnce:function(e){},clearAllRegister:function(e){},trackSignup:function(e,t,r,s){},setProfile:function(e,t){},setOnceProfile:function(e,t){},appendProfile:function(e,t){},incrementProfile:function(e,t){},deleteProfile:function(e){},unsetProfile:function(e,t){},identify:function(e,t){},login:function(e,t){},logout:function(e){},trackLink:function(e,t,r){},deleteItem:function(e,t){},setItem:function(e,t,r){},getAppStatus:function(e){},clearPageRegister:function(e){}};function CancelationToken(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function InterceptorContext(e,t,r){var s=null;try{s=JSON.parse(JSON.stringify(e))}catch(i){sdLog(i)}this.getOriginalData=function(){return s},this.getPosition=function(){return t},this.cancelationToken=new CancelationToken,this.sensors=r}function Stage(e){if(!isObject(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}Stage.prototype.process=function(e,t){if(e&&e in this.processDef){var r=this.registeredInterceptors[e];if(r&&isArray(r)&&r.length>0)for(var s={current:0,total:r.length},i=new InterceptorContext(t,s,sd),n=0;n=s.length:s.push(n);break;default:s.splice(i,0,n)}}}};var processDef={addCustomProps:null,formatData:null},dataStage=new Stage(processDef);function registerFeature(e){e&&e.dataStage&&dataStage.registerStageImplementation(e.dataStage)}function CoreFeature(e){e.kit=kit,e.saEvent=saEvent,this.dataStage=dataStageImpl}function strip_sa_properties(e){return isObject(e)?(each(e,function(t,r){if(isArray(t)){var s=[];each(t,function(e){isString(e)?s.push(e):sdLog("\u60a8\u7684\u6570\u636e-",r,t,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),e[r]=s}isString(t)||isNumber(t)||isDate(t)||isBoolean(t)||isArray(t)||isFunction(t)||"$option"===r||(sdLog("\u60a8\u7684\u6570\u636e-",r,t,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete e[r])}),e):e}function formatString(e,t){return isNumber(t)&&e.length>t?(sdLog("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function filterReservedProperties(e){isObject(e)&&each(["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"],function(t,r){t in e&&(r<3?(delete e[t],sdLog("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):sdLog("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d"))})}function searchObjString(e){var t=["$element_selector","$element_path"],r=["sensorsdata_app_visual_properties"];isObject(e)&&each(e,function(s,i){if(isObject(s))searchObjString(e[i]);else if(isString(s)){if(indexOf(r,i)>-1)return;e[i]=formatString(s,indexOf(t,i)>-1?1024:sdPara.max_string_length)}})}function searchZZAppStyle(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function formatItem(e){if("item_type"in e){check({item_type:e.item_type},function(t){return t||delete e.item_type,!0})}if("item_id"in e){check({item_id:e.item_id},function(t,r,s){return t||"string"!==s||delete e.item_id,!0})}}function formatProperties(e){each(e,function(t,r){check({propertyKey:r},function(t,s,i){return t||"keyLength"===i||delete e[r],!0})})}function formatData(e){var t=e.properties;isObject(t)?(strip_sa_properties(t),filterReservedProperties(t),searchZZAppStyle(e),formatProperties(t),searchObjString(t)):"properties"in e&&(e.properties={}),searchObjDate(e),formatItem(e)}var dataStageImpl$1={init:function(){},interceptor:{formatData:{priority:0,entry:function(e){return formatData(e),e}}}};function DataFormatFeature(){this.dataStage=dataStageImpl$1}var preCfg=window.sensors_data_pre_config,is_compliance_enabled=!!isObject(preCfg)&&preCfg.is_compliance_enabled;function implementCore(e){e&&(logger.setup(sdLog),sd._=extend(W,common),sd.ee=ee,sd.sendState=sendState,sd.events=new sd._.EventEmitterSa,sd.batchSend=batchSend,sd.bridge=bridge,sd.JSBridge=JSBridge,sd.store=store,sd.vtrackBase=vtrackBase,sd.unlimitedDiv=unlimitedDiv,sd.customProp=customProp,sd.vtrackcollect=vtrackcollect,sd.vapph5collect=vapph5collect,sd.heatmap=heatmap,sd.detectMode=detectMode,sd.registerFeature=registerFeature,registerFeature(new CoreFeature(sd)),registerFeature(new DataFormatFeature(sd)));var t=e?functions:saEmpty;for(var r in t)sd[r]=t[r]}sd.init=function(e){if(sd.readyState&&sd.readyState.state&&sd.readyState.state>=2)return!1;is_compliance_enabled&&implementCore(!0),sd.ee.initSystemEvent(),sd.setInitVar(),sd.readyState.setState(2),sd.initPara(e),sd.bridge.supportAppCallJs(),sd.detectMode(),sd.iOSWebClickPolyfill()},is_compliance_enabled?implementCore(!1):(implementCore(!0),checkState());var _sd=sd;try{sd.modules={},"string"==typeof window.sensorsDataAnalytic201505?(sd.para=window[sensorsDataAnalytic201505].para,sd._q=window[sensorsDataAnalytic201505]._q,window[sensorsDataAnalytic201505]=sd,window.sensorsDataAnalytic201505=sd,sd.init()):"undefined"==typeof window.sensorsDataAnalytic201505?window.sensorsDataAnalytic201505=sd:_sd=window.sensorsDataAnalytic201505}catch(err){if("object"==typeof console&&console.log)try{console.log(err)}catch(e){sd.log(e)}}var _sd$1=_sd;export default _sd$1; \ No newline at end of file +var logFn,sd={};function isFunction(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function now(){return Date.now&&isFunction(Date.now)?Date.now():(new Date).getTime()}(function(){var e={"function":!0,object:!0},t=e[typeof window]&&window||this;var r=t.JSON,s=t.JSON3,i=!1,a=function n(r,s){r||(r=t.Object()),s||(s=t.Object());var i=r.Number||t.Number,a=r.String||t.String,o=r.Object||t.Object,d=r.Date||t.Date,c=r.SyntaxError||t.SyntaxError,l=r.TypeError||t.TypeError,u=r.Math||t.Math,p=r.JSON||t.JSON;if("object"==typeof p&&p)return s.stringify=p.stringify,s.parse=p.parse,s.runInContext=n,s;var f,g=o.prototype,_=g.toString,h=g.hasOwnProperty;function m(e,t){try{e()}catch(r){t&&t()}}var v=new d(-0xc782b5b800cec);function y(e){if(null!=y[e])return y[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=y("json-stringify")&&y("date-serialization")&&y("json-parse");else if("date-serialization"==e){if(t=y("json-stringify")&&v){var r=s.stringify;m(function(){t='"-271821-04-20T00:00:00.000Z"'==r(new d(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==r(new d(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new d(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==r(new d(-1))})}}else{var n,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var c="function"==typeof(r=s.stringify);c&&((n=function(){return 1}).toJSON=n,m(function(){c="0"===r(0)&&"0"===r(new i)&&'""'==r(new a)&&r(_)===f&&r(f)===f&&r()===f&&"1"===r(n)&&"[1]"==r([n])&&"[null]"==r([f])&&"null"==r(null)&&"[null,null,null]"==r([f,_,null])&&r({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==o&&"1"===r(null,n)&&"[\n 1,\n 2\n]"==r([1,2],null,1)},function(){c=!1})),t=c}if("json-parse"==e){var l,u=s.parse;"function"==typeof u&&m(function(){0!==u("0")||u(!1)||(n=u(o),(l=5==n.a.length&&1===n.a[0])&&(m(function(){l=!u('"\t"')}),l&&m(function(){l=1!==u("01")}),l&&m(function(){l=1!==u("1.")})))},function(){l=!1}),t=l}}return y[e]=!!t}if(m(function(){v=-109252==v.getUTCFullYear()&&0===v.getUTCMonth()&&1===v.getUTCDate()&&10==v.getUTCHours()&&37==v.getUTCMinutes()&&6==v.getUTCSeconds()&&708==v.getUTCMilliseconds()}),y["bug-string-char-index"]=y["date-serialization"]=y.json=y["json-stringify"]=y["json-parse"]=null,!y("json")){var S=y("bug-string-char-index"),b=function(t,r){var s,i,a,n=0;for(a in(s=function(){this.valueOf=0}).prototype.valueOf=0,i=new s)h.call(i,a)&&n++;return s=i=null,n?b=function(e,t){var r,s,i="[object Function]"==_.call(e);for(r in e)i&&"prototype"==r||!h.call(e,r)||(s="constructor"===r)||t(r);(s||h.call(e,r="constructor"))&&t(r)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],b=function(t,r){var s,a,n="[object Function]"==_.call(t),o=!n&&"function"!=typeof t.constructor&&e[typeof t.hasOwnProperty]&&t.hasOwnProperty||h;for(s in t)n&&"prototype"==s||!o.call(t,s)||r(s);for(a=i.length;s=i[--a];)o.call(t,s)&&r(s)}),b(t,r)};if(!y("json-stringify")&&!y("date-serialization")){var w={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},k=function(e,t){return("000000"+(t||0)).slice(-e)},P=function(e){var t,r,s,i,a,n,o,d,c;if(v)t=function(e){r=e.getUTCFullYear(),s=e.getUTCMonth(),i=e.getUTCDate(),n=e.getUTCHours(),o=e.getUTCMinutes(),d=e.getUTCSeconds(),c=e.getUTCMilliseconds()};else{var l=u.floor,p=[0,31,59,90,120,151,181,212,243,273,304,334],f=function(e,t){return p[t]+365*(e-1970)+l((e-1969+(t=+(t>1)))/4)-l((e-1901+t)/100)+l((e-1601+t)/400)};t=function(e){for(i=l(e/864e5),r=l(i/365.2425)+1970-1;f(r+1,0)<=i;r++);for(s=l((i-f(r,0))/30.42);f(r,s+1)<=i;s++);i=1+i-f(r,s),n=l((a=(e%864e5+864e5)%864e5)/36e5)%24,o=l(a/6e4)%60,d=l(a/1e3)%60,c=a%1e3}}return(P=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+k(6,r<0?-r:r):k(4,r))+"-"+k(2,s+1)+"-"+k(2,i)+"T"+k(2,n)+":"+k(2,o)+":"+k(2,d)+"."+k(3,c)+"Z",r=s=i=n=o=d=c=null):e=null,e})(e)};if(y("json-stringify")&&!y("date-serialization")){function O(e){return P(this)}var j=s.stringify;s.stringify=function(e,t,r){var s=d.prototype.toJSON;d.prototype.toJSON=O;var i=j(e,t,r);return d.prototype.toJSON=s,i}}else{var N=function(e){var t=e.charCodeAt(0),r=w[t];return r||"\\u00"+k(2,t.toString(16))},E=/[\x00-\x1f\x22\x5c]/g,C=function(e){return E.lastIndex=0,'"'+(E.test(e)?e.replace(E,N):e)+'"'},A=function(e,t,r,s,i,a,n){var o,c,u,p,g,h,v,y,S;if(m(function(){o=t[e]}),"object"==typeof o&&o&&(o.getUTCFullYear&&"[object Date]"==_.call(o)&&o.toJSON===d.prototype.toJSON?o=P(o):"function"==typeof o.toJSON&&(o=o.toJSON(e))),r&&(o=r.call(t,e,o)),o==f)return o===f?o:"null";switch("object"==(c=typeof o)&&(u=_.call(o)),u||c){case"boolean":case"[object Boolean]":return""+o;case"number":case"[object Number]":return o>-1/0&&o<1/0?""+o:"null";case"string":case"[object String]":return C(""+o)}if("object"==typeof o){for(v=n.length;v--;)if(n[v]===o)throw l();if(n.push(o),p=[],y=a,a+=i,"[object Array]"==u){for(h=0,v=o.length;h0)for(s>10&&(s=10),i="";i.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||I();e+=$("0x"+a.slice(t,D));break;default:I()}else{if(34==i)break;for(i=a.charCodeAt(D),t=D;i>=32&&92!=i&&34!=i;)i=a.charCodeAt(++D);e+=a.slice(t,D)}if(34==a.charCodeAt(D))return D++,e;I();default:if(t=D,45==i&&(s=!0,i=a.charCodeAt(++D)),i>=48&&i<=57){for(48==i&&(i=a.charCodeAt(D+1))>=48&&i<=57&&I(),s=!1;D=48&&i<=57;D++);if(46==a.charCodeAt(D)){for(r=++D;r57);r++);r==D&&I(),D=r}if(101==(i=a.charCodeAt(D))||69==i){for(43!=(i=a.charCodeAt(++D))&&45!=i||D++,r=D;r57);r++);r==D&&I(),D=r}return+a.slice(t,D)}s&&I();var o=a.slice(D,D+4);if("true"==o)return D+=4,!0;if("fals"==o&&101==a.charCodeAt(D+4))return D+=5,!1;if("null"==o)return D+=4,null;I()}return"$"},U=function(e){var t,r;if("$"==e&&I(),"string"==typeof e){if("@"==(S?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];"]"!=(e=L());)r?","==e?"]"==(e=L())&&I():I():r=!0,","==e&&I(),t.push(U(e));return t}if("{"==e){for(t={};"}"!=(e=L());)r?","==e?"}"==(e=L())&&I():I():r=!0,","!=e&&"string"==typeof e&&"@"==(S?e.charAt(0):e[0])&&":"==L()||I(),t[e.slice(1)]=U(L());return t}I()}return e},R=function(e,t,r){var s=B(e,t,r);s===f?delete e[t]:e[t]=s},B=function(e,t,r){var s,i=e[t];if("object"==typeof i&&i)if("[object Array]"==_.call(i))for(s=i.length;s--;)R(_,b,i);else b(i,function(e){R(i,e,r)});return r.call(e,t,i)};s.parse=function(e,t){var r,s;return D=0,x=""+e,r=U(L()),"$"!=L()&&I(),D=x=null,t&&"[object Function]"==_.call(t)?B(((s={})[""]=r,s),"",t):r}}}return s.runInContext=n,s}(t,t.JSON3={noConflict:function(){return i||(i=!0,t.JSON=r,t.JSON3=s,r=s=null),a}});t.JSON={parse:a.parse,stringify:a.stringify}}).call(window),function(e){if(e.atob)try{e.atob(" ")}catch(a){e.atob=(t=e.atob,(r=function(e){return t(String(e).replace(/[\t\n\f\r ]+/g,""))}).original=t,r)}else{var t,r,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,r,i,a,n="",o=0,d=e.length%3;o255||(i=e.charCodeAt(o++))>255||(a=e.charCodeAt(o++))>255)return"";n+=s.charAt((t=r<<16|i<<8|a)>>18&63)+s.charAt(t>>12&63)+s.charAt(t>>6&63)+s.charAt(63&t)}return d?n.slice(0,d-3)+"===".substring(d):n},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!i.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,r,a,n="",o=0;o>16&255):64===a?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return n}}}(window),String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)});var logger={setup:function(e){logFn=e},log:function(){(logFn||console&&console.log||function(){}).apply(null,arguments)}},_localStorage={get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t;try{t=JSON.parse(_localStorage.get(e))||null}catch(r){logger.log(r)}return t},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(r){logger.log(r)}},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__local_store_support__",r="testIsSupportStorage";_localStorage.set(t,r),_localStorage.get(t)!==r&&(e=!1),_localStorage.remove(t)}catch(s){e=!1}return e}};function isObject(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}var getRandomBasic=function(){var e=(new Date).getTime();return function(t){return Math.ceil((e=(9301*e+49297)%233280)/233280*t)}}();function getRandom(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),isObject(e)&&e.getRandomValues){var t=new Uint32Array(1);return e.getRandomValues(t)[0]/Math.pow(2,32)}}return getRandomBasic(1e19)/1e19}function safeJSONParse(e){var t=null;try{t=JSON.parse(e)}catch(r){}return t}function ConcurrentStorage(e,t){this.lockGetPrefix=e||"lock-get-prefix",this.lockSetPrefix=t||"lock-set-prefix"}function isValidListener(e){return"function"==typeof e||!(!e||"object"!=typeof e)&&isValidListener(e.listener)}function EventEmitter(){this._events={}}function _decodeURIComponent(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function getURLSearchParams(e){for(var t={},r=(e=e||"").substring(1).split("&"),s=0;s Invalid URL");var r=e.split("#"),s=r[0],i=r.slice(1).join("#");for(var a in t=this._regex.exec(s),this._fields)"undefined"!=typeof t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new t(e)}function _URL(e){var t,r={};if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(e){return!1}}())(r=new URL(e)).searchParams||(r.searchParams=(t=getURLSearchParams(r.search),{get:function(e){return t[e]}}));else{isString(e)||(e=String(e)),e=trim(e);if(!1===/^https?:\/\/.+/.test(e))return void logger.log("Invalid URL");var s=urlParse(e);r.hash=s._values.Fragment,r.host=s._values.Host?s._values.Host+(s._values.Port?":"+s._values.Port:""):"",r.href=s._values.URL,r.password=s._values.Password,r.pathname=s._values.Path,r.port=s._values.Port,r.search=s._values.QueryString?"?"+s._values.QueryString:"",r.username=s._values.Username,r.hostname=s._values.Hostname,r.protocol=s._values.Protocol?s._values.Protocol+":":"",r.origin=s._values.Origin?s._values.Origin+(s._values.Port?":"+s._values.Port:""):"",r.searchParams=function(){var e=getURLSearchParams("?"+s._values.QueryString);return{get:function(t){return e[t]}}}()}return r}ConcurrentStorage.prototype.get=function(e,t,r,s){if(!e)throw new Error("key is must");t=t||1e4,r=r||1e3,s=s||function(){};var i=this.lockGetPrefix+e,a=_localStorage.get(i),n=String(getRandom());if(a&&(a=safeJSONParse(a)||{randomNum:0,expireTime:0}).expireTime>now())return s(null);_localStorage.set(i,JSON.stringify({randomNum:n,expireTime:now()+t})),setTimeout(function(){(a=safeJSONParse(_localStorage.get(i))||{randomNum:0,expireTime:0})&&a.randomNum===n?(s(_localStorage.get(e)),_localStorage.remove(e),_localStorage.remove(i)):s(null)},r)},ConcurrentStorage.prototype.set=function(e,t,r,s,i){if(!e||!t)throw new Error("key and val is must");r=r||1e4,s=s||1e3,i=i||function(){};var a=this.lockSetPrefix+e,n=_localStorage.get(a),o=String(getRandom());if(n&&(n=safeJSONParse(n)||{randomNum:0,expireTime:0}).expireTime>now())return i({status:"fail",reason:"This key is locked"});_localStorage.set(a,JSON.stringify({randomNum:o,expireTime:now()+r})),setTimeout(function(){(n=safeJSONParse(_localStorage.get(a))||{randomNum:0,expireTime:0}).randomNum===o?_localStorage.set(e,t)&&i({status:"success"}):i({status:"fail",reason:"This key is locked"})},s)},EventEmitter.prototype.on=function(e,t){if(!e||!t)return!1;if(!isValidListener(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].push(r?t:{listener:t,once:!1}),this},EventEmitter.prototype.prepend=function(e,t){if(!e||!t)return!1;if(!isValidListener(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].unshift(r?t:{listener:t,once:!1}),this},EventEmitter.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},EventEmitter.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},EventEmitter.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var s=0,i=r.length;s=4&&(i=a(i,s),s=[]);return s.length>0&&(i=a(i,s)),i.toString(16)}()+"-"+t+"-"+e();return r||(String(getRandom())+String(getRandom())+String(getRandom())).slice(2,15)}}();function isElement(e){return!(!e||1!==e.nodeType)}function isUndefined(e){return void 0===e}function isArray(e){return Array.isArray&&isFunction(isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function ry(e){return new DomElementInfo(e)}var DomElementInfo=function(e){this.ele=e},siblings=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};function addEvent(e,t,r,s){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation,e._getPath=i._getPath),e}i._getPath=function(){return this.path||this.composedPath&&this.composedPath()||ry(this.target).getParents()},i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};(function(e,t,r){if(s===undefined&&"click"===t&&(s=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=i._getPath,r.call(this,e)},s);else{var a="on"+t,n=e[a];e[a]=function(e,t,r,s){return function(a){if(!(a=a||i(window.event)))return undefined;a.target=a.srcElement;var n,o,d=!0;return"function"==typeof r&&(n=r(a)),o=t.call(e,a),"beforeunload"!==s?(!1!==n&&!1!==o||(d=!1),d):void 0}}(e,r,n,t)}}).apply(null,arguments)}function addHashEvent(e){var t="pushState"in window.history?"popstate":"hashchange";addEvent(window,t,e)}function xhr(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){logger.log(t)}}}DomElementInfo.prototype={addClass:function(e){return-1===(" "+this.ele.className+" ").indexOf(" "+e+" ")&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return-1!==t.indexOf(" "+e+" ")&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){return-1!==(" "+this.ele.className+" ").indexOf(" "+e+" ")},attr:function(e,t){return"string"==typeof e&&isUndefined(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument.documentElement;return{top:e.top+window.pageYOffset-t.clientTop,left:e.left+window.pageXOffset-t.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),ry(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!isArray(r))return null;for(var s=r.length-1;s>=0;s--){if(t=r[s].style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return siblings((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return siblings(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return ry(e=e&&11!==e.nodeType?e:null)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return ry(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return ry(e);return ry(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),s=[],i=0;i=200&&r.status<300||304==r.status?e.success(t(r.responseText)):e.error(t(r.responseText),r.status),r.onreadystatechange=null,r.onload=null)}catch(s){r.onreadystatechange=null,r.onload=null}},r.open(e.type,e.url,!0);try{e.credentials&&(r.withCredentials=!0),isObject(e.header)&&each(e.header,function(e,t){r.setRequestHeader&&r.setRequestHeader(t,e)}),e.data&&(e.cors||r.setRequestHeader&&r.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?r.setRequestHeader&&r.setRequestHeader("Content-type","application/json; charset=UTF-8"):r.setRequestHeader&&r.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(n){logger.log(n)}r.send(e.data||null)}function map(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(each(e,function(e,s,i){r.push(t(e,s,i))}),r)}function base64Decode(e){var t=[];try{t=map(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function base64Encode(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function bindReady(e,t){t=t||window;var r=!1,s=!0,i=t.document,a=i.documentElement,n=i.addEventListener,o=n?"addEventListener":"attachEvent",d=n?"removeEventListener":"detachEvent",c=n?"":"on",l=function(s){"readystatechange"==s.type&&"complete"!=i.readyState||(("load"==s.type?t:i)[d](c+s.type,l,!1),!r&&(r=!0)&&e.call(t,s.type||s))},u=function(){try{a.doScroll("left")}catch(e){return void setTimeout(u,50)}l("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!n&&a.doScroll){try{s=!t.frameElement}catch(p){logger.log(p)}s&&u()}i[o](c+"DOMContentLoaded",l,!1),i[o](c+"readystatechange",l,!1),t[o](c+"load",l,!1)}}var cookie={get:function(e){for(var t=e+"=",r=document.cookie.split(";"),s=0;s=2&&!/^(\d+\.)+\d+$/.test(r))for(var i="."+s.splice(s.length-1,1);s.length>0;)if(i="."+s.splice(s.length-1,1)+i,document.cookie=t+"=true; path=/; domain="+i,-1!==document.cookie.indexOf(t+"=true")){var a=new Date;return a.setTime(a.getTime()-1e3),document.cookie=t+"=true; expires="+a.toGMTString()+"; path=/; SameSite=Lax; domain="+i,i}return""}function getDomBySelector(e){if(!isString(e))return null;var t,r=e.split(">");return(t=function s(e){var t,i=r.shift();if(!i)return e;try{t=function(e,t){var r;if("body"===(e=trim(e)))return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var s=e.split(":nth-of-type");if(!s[0]||!s[1])return null;var i=s[0],a=s[1].match(/\(([0-9]+)\)/);if(!a||!a[1])return null;var n=Number(a[1]);if(!(isElement(t)&&t.children&&t.children.length>0))return null;for(var o=t.children,d=0;d0)return null}return r||null}(i,e)}catch(a){logger.log(a)}return t&&isElement(t)?s(t):null}())&&isElement(t)?t:null}function getElementContent(e,t){var r="",s="";return e.textContent?r=trim(e.textContent):e.innerText&&(r=trim(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),s=r||"","input"!==t&&"INPUT"!==t||(s=e.value||""),s}function getHostname(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=_URL(e).hostname}catch(s){logger.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function getIOSVersion(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function getQueryParam(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=_decodeURIComponent(e);var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":_decodeURIComponent(r[1])}function getQueryParamsFromUrl(e){var t={},r=e.split("?")[1]||"";return r&&(t=getURLSearchParams("?"+r)),t}function mediaQueriesSupported(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function getScreenOrientation(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(mediaQueriesSupported()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function getUA(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function getURL(e){return isString(e)?_decodeURI(e=trim(e)):_decodeURI(location.href)}function getURLPath(e){return isString(e)?_decodeURI(e=trim(e)):_decodeURI(location.pathname)}function hasAttribute(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function hasAttributes(e,t){if("string"==typeof t)return hasAttribute(e,t);if(isArray(t)){for(var r=!1,s=0;s0)for(var i=e.split(""),a=0;at)for(s=r+s;(o=31*s+n)t;)s=s/2+n;s=31*s+n}return s}function indexOf(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var s=0;s41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function isSupportCors(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function jsonp(e){if(!isObject(e)||!isString(e.callbackName))return logger.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;e.success=isFunction(e.success)?e.success:function(){},e.error=isFunction(e.error)?e.error:function(){},e.data=e.data||"";var t=document.createElement("script"),r=document.getElementsByTagName("head")[0],s=null,i=!1;if(r.appendChild(t),isNumber(e.timeout)&&(s=setTimeout(function(){if(i)return!1;e.error("timeout"),window[e.callbackName]=function(){logger.log("call jsonp error")},s=null,r.removeChild(t),i=!0},e.timeout)),window[e.callbackName]=function(){clearTimeout(s),s=null,e.success.apply(null,arguments),window[e.callbackName]=function(){logger.log("call jsonp error")},r.removeChild(t)},e.url.indexOf("?")>-1?e.url+="&callbackName="+e.callbackName:e.url+="?callbackName="+e.callbackName,isObject(e.data)){var a=[];each(e.data,function(e,t){a.push(t+"="+e)}),e.data=a.join("&"),e.url+="&"+e.data}t.onerror=function(a){if(i)return!1;window[e.callbackName]=function(){logger.log("call jsonp error")},clearTimeout(s),s=null,r.removeChild(t),e.error(a),i=!0},t.src=e.url}function listenPageState(e){({visibleHandler:isFunction(e.visible)?e.visible:function(){},hiddenHandler:isFunction(e.hidden)?e.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;addEvent(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else addEvent(window,"focus",this.visibleHandler),addEvent(window,"blur",this.hiddenHandler)}}).init()}function loadScript(e){e=extend({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&((t=document.createElement("link")).rel="stylesheet",t.href=e.url),"js"===e.type&&((t=document.createElement("script")).async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function removeScriptProtocol(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function rot13obfs(e,t){t="number"==typeof t?t:13;for(var r=(e=String(e)).split(""),s=0,i=r.length;st?(n&&(clearTimeout(n),n=null),o=c,a=e.apply(s,i),n||(s=i=null)):n||!1===r.trailing||(n=setTimeout(d,l)),a}}function values(e){var t=[];return null==e?t:(each(e,function(e){t[t.length]=e}),t)}function toArray(e){return e?e.toArray?e.toArray():isArray(e)||isArguments(e)?Array.prototype.slice.call(e):values(e):[]}function unique(e){for(var t,r=[],s={},i=0;i0&&(e=unique(e=e.concat(sdPara.source_channel))),each(e,function(e){(t=getQueryParam(location.href,e)).length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=pageInfo.campaignParams(),s={},i={};return each(r,function(r,a,n){-1!==(" "+source_channel_standard+" ").indexOf(" "+a+" ")?s[e+a]=n[a]:i[t+a]=n[a]}),{$utms:s,otherUtms:i}},properties:function(){var e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;return{$timezone_offset:(new Date).getTimezoneOffset(),$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$viewport_height:e,$viewport_width:t,$lib:"js",$lib_version:sdkversion_placeholder}},currentProps:{},register:function(e){extend(pageInfo.currentProps,e)}};function getSourceFromReferrer(){function e(e,t){for(var r=0;rt._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var s=new Date;t={value:t,_expirationTimestamp_:"s"===String(r).slice(-1)?s.getTime()+1e3*Number(String(r).slice(0,-1)):s.getTime()+24*r*60*60*1e3}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+sdPara.sdk_id+e}},saNewUser={checkIsAddSign:function(e){"track"===e.type&&(isNewUser()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=cookie$1.get("sensorsdata2015jssdkcross"+sd.para.sdk_id),s={};null!=(r=decryptIfNeeded(r))&&isJSONString(r)&&(s=JSON.parse(r)).$device_id&&(t=s.$device_id),t=t||e,!0===sd.para.cross_subdomain?sd.store.set("$device_id",t):(s.$device_id=t,s=JSON.stringify(s),sd.para.encrypt_cookie&&(s=encrypt(s)),cookie$1.set("sensorsdata2015jssdkcross"+sd.para.sdk_id,s,null,!0)),sd.para.is_track_device_id&&(pageInfo.currentProps.$device_id=t)},storeInitCheck:function(){if(sd.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};cookie$1.isSupport()?cookie$1.set(getNewUserFlagKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):memory.set(memory.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else isNewUser()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=pageInfo.pageProp.url_domain,t={};""===e&&(e="url\u89e3\u6790\u5931\u8d25");var r=getKeywordFromReferrer(document.referrer,!0);if(sd.para.preset_properties.search_keyword_baidu?isReferralTraffic(document.referrer)&&(!isBaiduTraffic()||isObject(r)&&r.active?sd.store._state&&sd.store._state.props&&(sd.store._state.props.$search_keyword_id&&delete sd.store._state.props.$search_keyword_id,sd.store._state.props.$search_keyword_id_type&&delete sd.store._state.props.$search_keyword_id_type,sd.store._state.props.$search_keyword_id_hash&&delete sd.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=getBaiduKeyword.id(),t.$search_keyword_id_type=getBaiduKeyword.type(),t.$search_keyword_id_hash=hashCode53(t.$search_keyword_id))):sd.store._state&&sd.store._state.props&&(sd.store._state.props.$search_keyword_id&&delete sd.store._state.props.$search_keyword_id,sd.store._state.props.$search_keyword_id_type&&delete sd.store._state.props.$search_keyword_id_type,sd.store._state.props.$search_keyword_id_hash&&delete sd.store._state.props.$search_keyword_id_hash),sd.store.save(),each(sd.para.preset_properties,function(r,s){if(-1===s.indexOf("latest_"))return!1;if(s=s.slice(7),r){if("wx_ad_click_id"===s&&"not_collect"===r)return!1;if("utm"!==s&&"url\u89e3\u6790\u5931\u8d25"===e)"wx_ad_click_id"===s?(t._latest_wx_ad_click_id="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_hash_key="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_callbacks="url\u7684domain\u89e3\u6790\u5931\u8d25"):t["$latest_"+s]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(isReferralTraffic(document.referrer))switch(s){case"traffic_source_type":t.$latest_traffic_source_type=getSourceFromReferrer();break;case"referrer":t.$latest_referrer=pageInfo.pageProp.referrer;break;case"search_keyword":getKeywordFromReferrer()?t.$latest_search_keyword=getKeywordFromReferrer():isObject(sd.store._state)&&isObject(sd.store._state.props)&&sd.store._state.props.$latest_search_keyword&&delete sd.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=getURL();break;case"wx_ad_click_id":var i=getWxAdIdFromUrl(location.href);t._latest_wx_ad_click_id=i.click_id,t._latest_wx_ad_hash_key=i.hash_key,t._latest_wx_ad_callbacks=i.callbacks}}else if("utm"===s&&sd.store._state&&sd.store._state.props)for(var a in sd.store._state.props)(0===a.indexOf("$latest_utm")||0===a.indexOf("_latest_")&&a.indexOf("_latest_wx_ad_")<0)&&delete sd.store._state.props[a];else if(sd.store._state&&sd.store._state.props&&"$latest_"+s in sd.store._state.props)delete sd.store._state.props["$latest_"+s];else if("wx_ad_click_id"==s&&sd.store._state&&sd.store._state.props&&!1===r){each(["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"],function(e){e in sd.store._state.props&&delete sd.store._state.props[e]})}}),sd.register(t),sd.para.preset_properties.latest_utm){var s=pageInfo.campaignParamsStandard("$latest_","_latest_"),i=s.$utms,a=s.otherUtms;isEmptyObject(i)||sd.register(i),isEmptyObject(a)||sd.register(a)}}},store={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={},r=(e=e||this._state)._first_id||e.first_id,s=e._distinct_id||e.distinct_id;return r&&s?(t.login_id=s,t.anonymous_id=r):t.anonymous_id=s,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==sd.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=cookie$1.get("sensorsdata2015session"),t=null;null!==(e=decryptIfNeeded(e))&&"object"==typeof(t=safeJSONParse(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&sd.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;extend(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;coverExtend(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};for(var s in r=t?e:extend(this._state.props||{},e))"string"==typeof r[s]&&(r[s]=r[s].slice(0,sd.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};coverExtend(t,e),this.set("props",t)},clearAllProps:function(e){var t;if(this._sessionState={},isArray(e)&&e.length>0)for(t=0;tsdPara.max_id_length)},keyLength:function(e){return!(!isString(e)||e.length>sdPara.max_key_length)},stringLength:function(e){return!(!isString(e)||e.length>sdPara.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(indexOf(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(indexOf(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=store._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(indexOf(this.bindReservedNames,e)>-1)}},checkOption={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Id"),isFunction(checkLog[r])&&checkLog[r](t),"idLength"===r)||e}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="eventName"),isFunction(checkLog[r])&&checkLog[r](t)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="Property key"),isFunction(checkLog[r])&&checkLog[r](t)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(e,t,r){return e||("Property Value",isFunction(checkLog[r])&&checkLog[r]("Property Value")),!0}},properties:function(e){return isObject(e)?each(e,function(e,t){check({propertyKey:t});check({propertyValue:e},function(e,r,s){return e||(r=t+"'s Value",isFunction(checkLog[s])&&checkLog[s](r)),!0})}):ruleOption.voidZero(e)&&sdLog("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return e!==undefined&&isObject(e)&&!isEmptyObject(e)?this.properties.call(this,e):sdLog("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_type"),isFunction(checkLog[r])&&checkLog[r](t)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_id"),isFunction(checkLog[r])&&checkLog[r](t)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="login_id_key"),isFunction(checkLog[r])&&checkLog[r](t),"keyLength"===r)||e}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),isFunction(checkLog[r])&&checkLog[r](t),"keyLength"===r)||e}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),isFunction(checkLog[r])&&checkLog[r](t),"keyLength"===r)||e}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Value"),isFunction(checkLog[r])&&checkLog[r](t),"idLength"===r)||e}},check:function(e,t,r){var s=this[e];if(isFunction(s))return s.call(this,t);if(!s)return!1;for(var i=0;i-1)return s;if("area"===i&&"map"===a.tagName.toLowerCase()&&ry(a).prev().tagName&&"img"===ry(a).prev().tagName.toLowerCase())return ry(a).prev();if("div"===i&&sd.para.heatmap.collect_tags.div&&r.isDivLevelValid(s)&&((sd.para.heatmap&&sd.para.heatmap.collect_tags&&sd.para.heatmap.collect_tags.div&&sd.para.heatmap.collect_tags.div.max_level||1)>1||r.isCollectableDiv(s)))return s;if(r.isStyleTag(i)&&sd.para.heatmap.collect_tags.div){var o=r.getCollectableParent(s);if(o&&r.isDivLevelValid(o))return o}return r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)})||null},getDivLevels:function(e,t){var r=heatmap.getElementPath(e,!0,t).split(" > "),s=0;return each(r,function(e){"div"===e&&s++}),s},isDivLevelValid:function(e){for(var t=sd.para.heatmap&&sd.para.heatmap.collect_tags&&sd.para.heatmap.collect_tags.div&&sd.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),s=r.length-1;s>=0;s--)if(heatmap.getDivLevels(r[s],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var s=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){s.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){s.unshift(e.tagName.toLowerCase());break}if(e===document.body){s.unshift("body");break}s.unshift(e.tagName.toLowerCase()),e=e.parentNode}return s.join(" > ")},getClosestLi:function(e){return function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null}(e,"li")},getElementPosition:function(e,t,r){var s=sd.heatmap.getClosestLi(e);if(!s)return null;var i=e.tagName.toLowerCase(),a=s.getElementsByTagName(i),n=a.length,o=[];if(n>1){for(var d=0;d1)return indexOf(o,e)}return function(e){if(!e.parentNode)return"";if(1===ry(e).getSameTypeSiblings().length)return 0;for(var t=0,r=e;ry(r).previousElementSibling().ele;r=ry(r).previousElementSibling().ele,t++);return t}(s)},setNotice:function(e){sd.is_heatmap_render_mode=!0,sd.para.heatmap||(sd.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(sd.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),sd.para.heatmap_url||(sd.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+sd.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,s=e.parentNode.children,i=0;i "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=getEleInfo({target:e});r.$element_selector=t||"",r.$element_path=sd.heatmap.getElementPath(e,sd.para.heatmap&&"not_use_id"===sd.para.heatmap.element_selector);var s=sd.heatmap.getElementPosition(e,r.$element_path,sd.para.heatmap&&"not_use_id"===sd.para.heatmap.element_selector);return isNumber(s)&&(r.$element_position=s),r},getPointerEventProp:function(e,t){if(!e)return{};function r(){return{scrollLeft:document.body.scrollLeft||document.documentElement.scrollLeft||0,scrollTop:document.body.scrollTop||document.documentElement.scrollTop||0}}function s(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function i(e){return Number(Number(e).toFixed(3))}return function(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+s(t).targetEleX||0,n=e.pageY||e.clientY+r().scrollTop||e.offsetY+s(t).targetEleY||0;return{$page_x:i(a),$page_y:i(n)}}(e)},start:function(e,t,r,s,i){var a=isObject(s)?s:{},n=isFunction(i)?i:isFunction(s)?s:undefined;if(sd.para.heatmap&&sd.para.heatmap.collect_element&&!sd.para.heatmap.collect_element(t))return!1;var o=this.getEleDetail(t);if(sd.para.heatmap&&sd.para.heatmap.custom_property){var d=sd.para.heatmap.custom_property(t);isObject(d)&&(o=extend(o,d))}o=extend(o,this.getPointerEventProp(e,t),a),"a"===r&&sd.para.heatmap&&!0===sd.para.heatmap.isTrackLink?sd.trackLink({event:e,target:t},"$WebClick",o):sd.track("$WebClick",o,n)},hasElement:function(e,t){var r;if(e.event){var s=e.event;r=s.path||s._getPath&&s._getPath()}else e.element&&(r=ry(e.element).getParents());if(r&&isArray(r)&&r.length>0)for(var i=0;i-1)&&(!t||sd.para.heatmap&&sd.para.heatmap.collect_tags&&sd.para.heatmap.collect_tags.div?!!(isObject(sd.para.heatmap)&&isObject(sd.para.heatmap.collect_tags)&&isObject(sd.para.heatmap.collect_tags.div)&&isArray(sd.para.heatmap.collect_tags.div.ignore_tags)&&indexOf(sd.para.heatmap.collect_tags.div.ignore_tags,e)>-1):indexOf(["mark","/mark","strong","b","em","i","u","abbr","ins","del","s","sup"],e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(s,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(a){sd.log(a)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,s=r?r.tagName.toLowerCase():"";if("body"===s)return!1;var i=sd.para&&sd.para.heatmap&&sd.para.heatmap.collect_tags&&sd.para.heatmap.collect_tags.div&&sd.para.heatmap.collect_tags.div.max_level;if(s&&"div"===s&&(i>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(s,t))return this.getCollectableParent(r,t)}catch(a){sd.log(a)}return!1},listenUrlChange:function(e){e(),sd.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!isObject(sd.para.heatmap)||"default"!==sd.para.heatmap.scroll_notice_map)return!1;var e=!0;sd.para.scrollmap&&isFunction(sd.para.scrollmap.collect_url)&&this.listenUrlChange(function(){e=!!sd.para.scrollmap.collect_url()});var t=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t}({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,s=new Date,i=s-this.current_time;(i>sd.para.heatmap.scroll_delay_time&&r-e.$viewport_position!=0||t)&&(e.$url=getURL(),e.$title=document.title,e.$url_path=getURLPath(),e.event_duration=Math.min(sd.para.heatmap.scroll_event_duration,parseInt(i)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,sd.track("$WebStay",e)),this.current_time=s}});t.current_time=new Date,addEvent$1(window,"scroll",function(){if(!e)return!1;t.go()}),addEvent$1(window,"unload",function(){if(!e)return!1;t.go("notime")})},initHeatmap:function(){var e=this,t=!0;if(!isObject(sd.para.heatmap)||"default"!==sd.para.heatmap.clickmap)return!1;isFunction(sd.para.heatmap.collect_url)&&this.listenUrlChange(function(){t=!!sd.para.heatmap.collect_url()}),"all"===sd.para.heatmap.collect_elements?sd.para.heatmap.collect_elements="all":sd.para.heatmap.collect_elements="interact","all"===sd.para.heatmap.collect_elements?addEvent$1(document,"click",function(r){if(!t)return!1;var s=r||window.event;if(!s)return!1;var i=s.target||s.srcElement;if("object"!=typeof i)return!1;if("string"!=typeof i.tagName)return!1;var a=i.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!i||!i.parentNode||!i.parentNode.children)return!1;var n=i.parentNode.tagName.toLowerCase();"a"===n||"button"===n?e.start(s,i.parentNode,n):e.start(s,i,a)}):addEvent$1(document,"click",function(r){if(!t)return!1;var s=r||window.event;if(!s)return!1;var i=s.target||s.srcElement,a=sd.heatmap.getTargetElement(i,r);a?e.start(s,a,a.tagName.toLowerCase()):isElement(i)&&"div"===i.tagName.toLowerCase()&&isObject(sd.para.heatmap)&&sd.para.heatmap.get_vtrack_config&&sd.unlimitedDiv.events.length>0&&sd.unlimitedDiv.isTargetEle(i)&&e.start(s,i,i.tagName.toLowerCase(),{$lib_method:"vtrack"})})}},commonWays={setOnlineState:function(e){if(!0===e&&isObject(sd.para.jsapp)&&"function"==typeof sd.para.jsapp.getData){sd.para.jsapp.isOnline=!0;var t=sd.para.jsapp.getData();isArray(t)&&t.length>0&&each(t,function(e){isJSONString(e)&&sd.sendState.realtimeSend(JSON.parse(e))})}else sd.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return pageInfo.campaignParams()},getStayTime:function(){return(new Date-sd._t)/1e3},setProfileLocal:function(e){if(!_localStorage.isSupport())return sd.setProfile(e),!1;if(!isObject(e)||isEmptyObject(e))return!1;var t=sd.store.readObjectVal("sensorsdata_2015_jssdk_profile"),r=!1;if(isObject(t)&&!isEmptyObject(t)){for(var s in e)!(s in t&&t[s]!==e[s])&&s in t||(t[s]=e[s],r=!0);r&&(sd.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),sd.setProfile(e))}else sd.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),sd.setProfile(e)},setInitReferrer:function(){var e=getReferrer();sd.setOnceProfile({_init_referrer:e,_init_referrer_host:pageInfo.pageProp.referrer_host})},setSessionReferrer:function(){var e=getReferrer();sd.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:pageInfo.pageProp.referrer_host})},setDefaultAttr:function(){pageInfo.register({_current_url:location.href,_referrer:getReferrer(),_referring_host:pageInfo.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var s=e.tagName.toLowerCase(),i=e.parentNode.tagName.toLowerCase(),a=sd.para.heatmap&&sd.para.heatmap.track_attr?sd.para.heatmap.track_attr:["data-sensors-click"];"button"===s||"a"===s||"a"===i||"button"===i||"input"===s||"textarea"===s||hasAttributes(e,a)||heatmap.start(null,e,s,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var s=e.tagName.toLowerCase();heatmap.start(null,e,s,t,r)}},autoTrackSinglePage:function(e,t){var r;function s(){var e=pageInfo.campaignParams(),t={};return each(e,function(e,r,s){-1!==(" "+sd.source_channel_standard+" ").indexOf(" "+r+" ")?t["$"+r]=s[r]:t[r]=s[r]}),t}r=this.autoTrackIsUsed?pageInfo.pageProp.url:pageInfo.pageProp.referrer;var i=!(e=isObject(e)?e:{}).not_set_profile;function a(e,t){sd.track("$pageview",extend({$referrer:r,$url:getURL(),$url_path:getURLPath(),$title:document.title},e,s()),t),r=getURL()}if(e.not_set_profile&&delete e.not_set_profile,a(e,t),this.autoTrackSinglePage=a,sd.is_first_visitor&&i){var n={};sd.para.preset_properties.search_keyword_baidu&&isReferralTraffic(document.referrer)&&isBaiduTraffic()&&(n.$search_keyword_id=getBaiduKeyword.id(),n.$search_keyword_id_type=getBaiduKeyword.type(),n.$search_keyword_id_hash=hashCode53(n.$search_keyword_id)),sd.setOnceProfile(extend({$first_visit_time:new Date,$first_referrer:getReferrer(),$first_browser_language:isString(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:getSourceFromReferrer(),$first_search_keyword:getKeywordFromReferrer()},s(),n)),sd.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=isObject(e)?e:{},this.autoTrack(extend(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=isObject(e)?e:{};var r=pageInfo.campaignParams(),s={};each(r,function(e,t,r){-1!==(" "+sd.source_channel_standard+" ").indexOf(" "+t+" ")?s["$"+t]=r[t]:s[t]=r[t]});var i=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var a=location.href;if(sd.para.is_single_page&&addHashEvent(function(){var r=getReferrer(a,!0);sd.track("$pageview",extend({$referrer:r,$url:getURL(),$url_path:getURLPath(),$title:document.title},s,e),t),a=getURL()}),sd.track("$pageview",extend({$referrer:getReferrer(null,!0),$url:getURL(),$url_path:getURLPath(),$title:document.title},s,e),t),sd.is_first_visitor&&i){var n={};sd.para.preset_properties.search_keyword_baidu&&isReferralTraffic(document.referrer)&&isBaiduTraffic()&&(n.$search_keyword_id=getBaiduKeyword.id(),n.$search_keyword_id_type=getBaiduKeyword.type(),n.$search_keyword_id_hash=hashCode53(n.$search_keyword_id)),sd.setOnceProfile(extend({$first_visit_time:new Date,$first_referrer:getReferrer(null,!0),$first_browser_language:isString(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:getSourceFromReferrer(),$first_search_keyword:getKeywordFromReferrer()},s,n)),sd.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return isEmptyObject(sd.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":sd.store._state._first_id||sd.store._state.first_id||sd.store._state._distinct_id||sd.store._state.distinct_id},setPlugin:function(e){if(!isObject(e))return!1;each(e,function(e,t){isFunction(e)&&(isObject(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[t]?e(window.SensorsDataWebJSSDKPlugin[t]):sd.log(t+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+t+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"))})},useModulePlugin:function(){sd.use.apply(sd,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}};function addReferrerHost(e){var t=!e.type||"profile"!==e.type.slice(0,7);isObject(e.properties)&&(e.properties.$first_referrer&&(e.properties.$first_referrer_host=getHostname(e.properties.$first_referrer,"\u53d6\u503c\u5f02\u5e38")),t&&("$referrer"in e.properties&&(e.properties.$referrer_host=""===e.properties.$referrer?"":getHostname(e.properties.$referrer,"\u53d6\u503c\u5f02\u5e38")),sd.para.preset_properties.latest_referrer&&sd.para.preset_properties.latest_referrer_host&&(e.properties.$latest_referrer_host=""===e.properties.$latest_referrer?"":getHostname(e.properties.$latest_referrer,"\u53d6\u503c\u5f02\u5e38"))))}function addPropsHook(e){var t=!e.type||"profile"!==e.type.slice(0,7),r=sd.para.preset_properties&&t;r&&sd.para.preset_properties.url&&"undefined"==typeof e.properties.$url&&(e.properties.$url=getURL()),r&&sd.para.preset_properties.title&&"undefined"==typeof e.properties.$title&&(e.properties.$title=document.title)}function initPara(e){extend(sdPara,e||sd.para||{}),sd.para=sdPara;var t,r={};if(isObject(sd.para.is_track_latest))for(var s in sd.para.is_track_latest)r["latest_"+s]=sd.para.is_track_latest[s];for(t in sd.para.preset_properties=extend({},sd.para_default.preset_properties,r,sd.para.preset_properties||{}),sd.para_default)void 0===sd.para[t]&&(sd.para[t]=sd.para_default[t]);"string"==typeof sd.para.server_url&&(sd.para.server_url=trim(sd.para.server_url),sd.para.server_url&&("://"===sd.para.server_url.slice(0,3)?sd.para.server_url=location.protocol.slice(0,-1)+sd.para.server_url:"//"===sd.para.server_url.slice(0,2)?sd.para.server_url=location.protocol+sd.para.server_url:"http"!==sd.para.server_url.slice(0,4)&&(sd.para.server_url=""))),"string"!=typeof sd.para.web_url||"://"!==sd.para.web_url.slice(0,3)&&"//"!==sd.para.web_url.slice(0,2)||("://"===sd.para.web_url.slice(0,3)?sd.para.web_url=location.protocol.slice(0,-1)+sd.para.web_url:sd.para.web_url=location.protocol+sd.para.web_url),"image"!==sd.para.send_type&&"ajax"!==sd.para.send_type&&"beacon"!==sd.para.send_type&&(sd.para.send_type="image"),sd.debug.protocol.serverUrl(),sd.bridge.initPara(),sd.bridge.initState();var i={datasend_timeout:6e3,send_interval:6e3};_localStorage.isSupport()&&isSupportCors()&&"object"==typeof localStorage?!0===sd.para.batch_send?sd.para.batch_send=extend({},i):"object"==typeof sd.para.batch_send&&(sd.para.batch_send=extend({},i,sd.para.batch_send)):sd.para.batch_send=!1;var a=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],n=["www.baidu.","m.baidu.","m.sm.cn","so.com","sogou.com","youdao.com","google.","yahoo.com/","bing.com/","ask.com/"],o=["weibo.com","renren.com","kaixin001.com","douban.com","qzone.qq.com","zhihu.com","tieba.baidu.com","weixin.qq.com"],d={baidu:["wd","word","kw","keyword"],google:"q",bing:"q",yahoo:"p",sogou:["query","keyword"],so:"q",sm:"q"};"object"==typeof sd.para.source_type&&(sd.para.source_type.utm=isArray(sd.para.source_type.utm)?sd.para.source_type.utm.concat(a):a,sd.para.source_type.search=isArray(sd.para.source_type.search)?sd.para.source_type.search.concat(n):n,sd.para.source_type.social=isArray(sd.para.source_type.social)?sd.para.source_type.social.concat(o):o,sd.para.source_type.keyword=isObject(sd.para.source_type.keyword)?extend(d,sd.para.source_type.keyword):d);var c=["mark","/mark","strong","b","em","i","u","abbr","ins","del","s","sup"];if(sd.para.heatmap&&!isObject(sd.para.heatmap)&&(sd.para.heatmap={}),isObject(sd.para.heatmap)){sd.para.heatmap.clickmap=sd.para.heatmap.clickmap||"default",sd.para.heatmap.scroll_notice_map=sd.para.heatmap.scroll_notice_map||"default",sd.para.heatmap.scroll_delay_time=sd.para.heatmap.scroll_delay_time||4e3,sd.para.heatmap.scroll_event_duration=sd.para.heatmap.scroll_event_duration||18e3,sd.para.heatmap.renderRefreshTime=sd.para.heatmap.renderRefreshTime||1e3,sd.para.heatmap.loadTimeout=sd.para.heatmap.loadTimeout||1e3,!0!==sd.para.heatmap.get_vtrack_config&&(sd.para.heatmap.get_vtrack_config=!1);var l=isArray(sd.para.heatmap.track_attr)?filter(sd.para.heatmap.track_attr,function(e){return e&&"string"==typeof e}):[];if(l.push("data-sensors-click"),sd.para.heatmap.track_attr=l,isObject(sd.para.heatmap.collect_tags))if(!0===sd.para.heatmap.collect_tags.div)sd.para.heatmap.collect_tags.div={ignore_tags:c,max_level:1};else if(isObject(sd.para.heatmap.collect_tags.div)){if(sd.para.heatmap.collect_tags.div.ignore_tags?isArray(sd.para.heatmap.collect_tags.div.ignore_tags)||(sd.log("ignore_tags \u53c2\u6570\u5fc5\u987b\u662f\u6570\u7ec4\u683c\u5f0f"),sd.para.heatmap.collect_tags.div.ignore_tags=c):sd.para.heatmap.collect_tags.div.ignore_tags=c,sd.para.heatmap.collect_tags.div.max_level){-1===indexOf([1,2,3],sd.para.heatmap.collect_tags.div.max_level)&&(sd.para.heatmap.collect_tags.div.max_level=1)}}else sd.para.heatmap.collect_tags.div=!1;else sd.para.heatmap.collect_tags={div:!1}}if(isArray(sd.para.server_url)&&sd.para.server_url.length)for(t=0;tsd.para.datasend_timeout&&(sd.para.datasend_timeout=sd.para.callback_timeout),sd.para.heatmap&&sd.para.heatmap.collect_tags&&isObject(sd.para.heatmap.collect_tags)&&each(sd.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&sd.heatmap.otherTags.push(t)}),sd.para.heatmap&&"default"===sd.para.heatmap.clickmap&&sd.heatmap.initUnlimitedTags()}var readyState={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}};function resetIdentities(e){var t={};for(var r in e)t[r]=e[r];sd.store._state.identities=t,sd.store.save()}function setInitVar(){sd._t=sd._t||1*new Date,sd.lib_version=sdkversion_placeholder,sd.is_first_visitor=!1,sd.source_channel_standard=source_channel_standard}function enableLocalLog(){if(_sessionStorage.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){sd.log("enableLocalLog error: "+e.message)}}function disableLocalLog(){_sessionStorage.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")}function quick(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);if("string"==typeof t&&commonWays[t])return commonWays[t].apply(commonWays,r);"function"==typeof t?t.apply(sd,r):sd.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0])}function use(e,t){return isString(e)?isObject(window.SensorsDataWebJSSDKPlugin)&&isObject(window.SensorsDataWebJSSDKPlugin[e])&&isFunction(window.SensorsDataWebJSSDKPlugin[e].init)?(window.SensorsDataWebJSSDKPlugin[e].init(sd,t),window.SensorsDataWebJSSDKPlugin[e]):isObject(sd.modules)&&isObject(sd.modules[e])&&isFunction(sd.modules[e].init)?(sd.modules[e].init(sd,t),sd.modules[e]):void sd.log(e+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+e+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"):(sd.log("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1)}function track(e,t,r){saEvent.check({event:e,properties:t})&&saEvent.send({type:"track",event:e,properties:t},r)}function bind(e,t){if(!saEvent.check({bindKey:e,bindValue:t}))return!1;sd.store._state.identities[e]=t,sd.store.save(),saEvent.send({type:"track_id_bind",event:"$BindID",properties:{}})}function unbind(e,t){if(!saEvent.check({unbindKey:e,bindValue:t}))return!1;if(isObject(sd.store._state.identities)&&sd.store._state.identities.hasOwnProperty(e)&&sd.store._state.identities[e]===t){var r=sd.store.getUnionId().login_id;r&&e+"+"+t===r&&(sd.store._state.distinct_id=sd.store._state.first_id,sd.store._state.first_id="",sd.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete sd.store._state.identities[e],sd.store.save())}var s={};s[e]=t,saEvent.send({identities:s,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function trackLink(e,t,r){function s(e,t,r){var s=null;if((e=e||{}).ele&&(s=e.ele),e.event&&(s=e.target?e.target:e.event.target),r=r||{},!s||"object"!=typeof s)return!1;if(!s.href||/^javascript/.test(s.href)||s.target||s.download||s.onclick)return sd.track(t,r),!1;function i(e){e.stopPropagation(),e.preventDefault();var i=!1;function a(){i||(i=!0,location.href=s.href)}setTimeout(a,1e3),sd.track(t,r,a)}e.event&&i(e.event),e.ele&&addEvent$1(e.ele,"click",function(e){i(e)})}"object"==typeof e&&e.tagName?s({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&s(e,t,r)}function trackLinks(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void addEvent$1(e,"click",function(s){s.preventDefault();var i=!1;function a(){i||(i=!0,location.href=e.href)}setTimeout(a,1e3),sd.track(t,r,a)}))}function setItem(e,t,r){saEvent.check({item_type:e,item_id:t,properties:r})&&saEvent.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function deleteItem(e,t){saEvent.check({item_type:e,item_id:t})&&saEvent.sendItem({type:"item_delete",item_type:e,item_id:t})}function setProfile(e,t){saEvent.check({propertiesMust:e})&&saEvent.send({type:"profile_set",properties:e},t)}function setOnceProfile(e,t){saEvent.check({propertiesMust:e})&&saEvent.send({type:"profile_set_once",properties:e},t)}function appendProfile(e,t){saEvent.check({propertiesMust:e})&&(each(e,function(t,r){isString(t)?e[r]=[t]:isArray(t)?e[r]=t:(delete e[r],sd.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),isEmptyObject(e)||saEvent.send({type:"profile_append",properties:e},t))}function incrementProfile(e,t){var r=e;isString(e)&&((e={})[r]=1),saEvent.check({propertiesMust:e})&&(!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}(e)?sd.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"):saEvent.send({type:"profile_increment",properties:e},t))}function deleteProfile(e){saEvent.send({type:"profile_delete"},e),store.set("distinct_id",UUID()),store.set("first_id","")}function unsetProfile(e,t){var r=e,s={};isString(e)&&(e=[]).push(r),isArray(e)?(each(e,function(e){isString(e)?s[e]=!0:sd.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),saEvent.send({type:"profile_unset",properties:s},t)):sd.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")}function identify(e,t){function r(e){sd.store._state.identities.$identity_anonymous_id=e,sd.store.save()}"number"==typeof e&&(e=String(e));var s=store.getFirstId();if(void 0===e){var i=UUID();s?store.set("first_id",i):store.set("distinct_id",i),r(i)}else saEvent.check({distinct_id:e})&&(!0===t?s?store.set("first_id",e):store.set("distinct_id",e):s?store.change("first_id",e):store.change("distinct_id",e),r(e))}function sendSignup(e,t,r,s){var i=store.getFirstId()||store.getDistinctId();store.set("distinct_id",e),saEvent.send({original_id:i,distinct_id:sd.store.getDistinctId(),type:"track_signup",event:t,properties:r},s)}function trackSignup(e,t,r,s){"number"==typeof e&&(e=String(e)),saEvent.check({distinct_id:e,event:t,properties:r})&&sendSignup(e,t,r,s)}function registerPage(e){saEvent.check({properties:e})?extend(pageInfo.currentProps,e):sd.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function clearAllRegister(e){store.clearAllProps(e)}function clearPageRegister(e){var t;if(isArray(e)&&e.length>0)for(t=0;t20&&this.pendingEvents.shift()},on:function(e,t,r,s){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),s=!1!==s,this.pendingEvents.length>0&&s&&each(this.pendingEvents,function(s){s.type===e&&t.apply(r,s.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var common={__proto__:null,parseSuperProperties:parseSuperProperties,searchConfigData:searchConfigData,strip_empty_properties:strip_empty_properties,getCurrentDomain:getCurrentDomain,getEleInfo:getEleInfo,isBaiduTraffic:isBaiduTraffic,getReferrerEqid:getReferrerEqid,getReferrerEqidType:getReferrerEqidType,getBaiduKeyword:getBaiduKeyword,isReferralTraffic:isReferralTraffic,getReferrer:getReferrer,getKeywordFromReferrer:getKeywordFromReferrer,getWxAdIdFromUrl:getWxAdIdFromUrl,getReferSearchEngine:getReferSearchEngine,getSourceFromReferrer:getSourceFromReferrer,info:pageInfo,ajax:ajax$1,getElementContent:getElementContent$1,cookie:cookie$1,addEvent:addEvent$1,EventEmitterSa:EventEmitterSa,encrypt:encrypt,decryptIfNeeded:decryptIfNeeded},kit={};function getSendUrl(e,t){var r=kit.encodeTrackData(t);return-1!==e.indexOf("?")?e+"&"+r:e+"?"+r}function getSendData(e){return kit.encodeTrackData(e)}kit.buildData=function(e){var t={identities:{},distinct_id:sd.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(sd.lib_version)},properties:{}};return isObject(e)&&isObject(e.identities)&&!isEmptyObject(e.identities)?extend(t.identities,e.identities):extend(t.identities,store._state.identities),isObject(e)&&isObject(e.properties)&&!isEmptyObject(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),extend(t,sd.store.getUnionId(),e),dataStageImpl.stage.process("addCustomProps",t),isObject(e.properties)&&!isEmptyObject(e.properties)&&extend(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=extend({},pageInfo.properties(),store.getProps(),store.getSessionProps(),pageInfo.currentProps,t.properties),sd.para.preset_properties.latest_referrer&&!isString(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),sd.para.preset_properties.latest_search_keyword&&!isString(t.properties.$latest_search_keyword)&&(sd.para.preset_properties.search_keyword_baidu&&isString(t.properties.$search_keyword_id)&&isNumber(t.properties.$search_keyword_id_hash)&&isString(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),sd.para.preset_properties.latest_traffic_source_type&&!isString(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),sd.para.preset_properties.latest_landing_page&&!isString(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===sd.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id,delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):sd.para.preset_properties.latest_wx_ad_click_id&&!isString(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),isString(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=getURL())),t.properties.$time&&isDate(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,sd.vtrackBase.addCustomProps(t),parseSuperProperties(t),saNewUser.checkIsAddSign(t),saNewUser.checkIsFirstTime(t),sd.addReferrerHost(t),sd.addPropsHook(t),dataStageImpl.stage.process("formatData",t),t},kit.sendData=function(e,t){var r=searchConfigData(e.properties);!0===sd.para.debug_mode?(sd.log(e),sd.saEvent.debugPath(JSON.stringify(e),t)):sd.sendState.getSendCall(e,r,t)},kit.encodeTrackData=function(e){var t=base64Encode(e),r="crc="+hashCode(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)};var ImageSender=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,sd.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=getSendUrl(e.server_url,e.data)};ImageSender.prototype.start=function(){var e=this;sd.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},ImageSender.prototype.lastClear=function(){getUA().ie!==undefined?this.img.src="about:blank":this.img.src=""};var AjaxSender=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=getSendData(e.data)};AjaxSender.prototype.start=function(){var e=this;ajax$1({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:sd.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var BeaconSender=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=getSendData(e.data)};function getSendType(e){var t=["image","ajax","beacon"],r=t[0];return"beacon"===(r=e.config&&indexOf(t,e.config.send_type)>-1?e.config.send_type:sd.para.send_type)&&!1===isSupportBeaconSend()&&(r="image"),"ajax"===r&&!1===isSupportCors()&&(r="image"),r}function getSender(e){switch(getSendType(e)){case"image":return new ImageSender(e);case"ajax":return new AjaxSender(e);case"beacon":return new BeaconSender(e);default:return new ImageSender(e)}}function getRealtimeInstance(e){var t=getSender(e),r=t.start;return t.start=function(){var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},sd.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},sd.para.datasend_timeout-sd.para.callback_timeout)},t.isEnd=function(){this.received||(this.received=!0,this.end())},t}BeaconSender.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var sendState={getSendCall:function(e,t,r){if(sd.is_heatmap_render_mode)return!1;if(sd.readyState.state<3)return sd.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(getRandom()).slice(2,5)+String(getRandom()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var s=e;e=JSON.stringify(e);var i={data:s,config:t,callback:r};if(sd.events.tempAdd("send",s),!sd.para.app_js_bridge&&sd.para.batch_send&&localStorage.length<100)return sd.log(s),sd.batchSend.add(i.data),!1;"item_set"===s.type||"item_delete"===s.type?this.prepareServerUrl(i):sd.bridge.dataSend(i,this,r),sd.log(s)},prepareServerUrl:function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(isArray(sd.para.server_url)&&sd.para.server_url.length)for(var t=0;t-1&&r.splice(i,1),_localStorage.remove(e[s])}_localStorage.set(this.tabKey,JSON.stringify(this.generateTabStorageVal(r)))}},add:function(e){var t=dataStoragePrefix+String(getRandom()),r=_localStorage.get(this.tabKey);null===r?(this.tabKey=tabStoragePrefix+String(getRandom()),r=this.generateTabStorageVal()):r=safeJSONParse(r)||this.generateTabStorageVal(),r.data.push(t),r.expireTime=now()+2*sd.para.batch_send.send_interval,_localStorage.set(this.tabKey,JSON.stringify(r)),sd.store.saveObjectVal(t,e),"track_signup"!==e.type&&"$pageview"!==e.event||this.sendImmediately()},generateTabStorage:function(){this.tabKey=tabStoragePrefix+String(getRandom()),_localStorage.set(this.tabKey,JSON.stringify(this.generateTabStorageVal()))},generateTabStorageVal:function(e){return{data:e=e||[],expireTime:now()+2*sd.para.batch_send.send_interval,serverUrl:this.serverUrl}},sendImmediately:function(){this.send()},recycle:function(){for(var e={},t=0;ti.expireTime&&this.serverUrl===i.serverUrl)new ConcurrentStorage("sajssdk-lock-get-").get(r,1e4,1e3,function(e){if(e){null===_localStorage.get(s.tabKey)&&s.generateTabStorage();var t=safeJSONParse(e)||s.generateTabStorageVal();_localStorage.set(s.tabKey,JSON.stringify(s.generateTabStorageVal((safeJSONParse(_localStorage.get(s.tabKey))||this.generateTabStorageVal()).data.concat(t.data))))}})}else if(0===r.indexOf("sajssdk-lock-get-")){var n=safeJSONParse(_localStorage.get(r))||{expireTime:0};now()-n.expireTime>1e4&&_localStorage.remove(r)}}for(var o=0;o0)for(var i=0;i").pop()).slice(0,3))return!1;return!0},configIsMatchNew:function(e,t){if(isString(e.$element_selector)&&isString(t.element_selector)){if("element_selector"===t.element_field&&"equal"===t["function"])return e.$element_selector===t.element_selector;if("element_selector"===t.element_field&&"contain"===t["function"])return e.$element_selector.indexOf(t.element_selector)>-1}if(isString(e.$element_path)&&isString(t.element_path)){if("element_path"===t.element_field&&"equal"===t["function"])return e.$element_path===t.element_path;if("element_path"===t.element_field&&"contain"===t["function"])return e.$element_path.indexOf(t.element_path)>-1}return!1},configIsMatch:function(e,t){return(!t.limit_element_content||t.element_content===e.$element_content)&&((!t.limit_element_position||t.element_position===String(e.$element_position))&&(t.element_field&&t["function"]?vtrackBase.configIsMatchNew(e,t):vtrackBase.configIsMatchOldVersion(e,t)))},configIsMatchOldVersion:function(e,t){if(!t.element_path)return!1;if(e.$element_position!==undefined){if(t.element_path!==e.$element_path)return!1}else if(sd.vtrackBase.isDiv({element_path:t.element_path})){if(e.$element_path.indexOf(t.element_path)<0)return!1}else if(t.element_path!==e.$element_path)return!1;return!0},filterConfig:function(e,t,r){var s=[];if(!r){var i=vtrackBase.initUrl();if(!i)return[];r=i.page_url}return"$WebClick"===e.event&&each(t,function(t){isObject(t)&&("webclick"===t.event_type||"appclick"===t.event_type)&&isObject(t.event)&&t.event.url_host===r.host&&t.event.url_path===r.pathname&&vtrackBase.configIsMatch(e.properties,t.event)&&s.push(t)}),s},getPropElInLi:function(e,t){if(!(e&&isElement(e)&&isString(t)))return null;if("li"!==e.tagName.toLowerCase())return null;var r=sd.heatmap.getDomSelector(e);if(r){var s=getDomBySelector(r+t);return s||null}return sd.log("----custom---\u83b7\u53d6\u540c\u7ea7\u5c5e\u6027\u5143\u7d20\u5931\u8d25\uff0cselector\u4fe1\u606f\u5f02\u5e38",r,t),null},getProp:function(e,t){if(!isObject(e))return!1;if(!(isString(e.name)&&e.name.length>0))return sd.log("----vcustom----\u5c5e\u6027\u540d\u4e0d\u5408\u6cd5,\u5c5e\u6027\u629b\u5f03",e.name),!1;var r,s,i={};if("content"===e.method){var a;if(isString(e.element_selector)&&e.element_selector.length>0)a=getDomBySelector(e.element_selector);else{if(!t||!isString(e.list_selector))return sd.log("----vcustom----\u5c5e\u6027\u914d\u7f6e\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var n=getDomBySelector(t.properties.$element_selector);if(!n)return sd.log("----vcustom----\u70b9\u51fb\u5143\u7d20\u83b7\u53d6\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var o=sd.heatmap.getClosestLi(n);a=vtrackBase.getPropElInLi(o,e.list_selector)}if(!a||!isElement(a))return sd.log("----vcustom----\u5c5e\u6027\u5143\u7d20\u83b7\u53d6\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;if("input"===a.tagName.toLowerCase())r=a.value||"";else if("select"===a.tagName.toLowerCase()){var d=a.selectedIndex;isNumber(d)&&isElement(a[d])&&(r=getElementContent$1(a[d],"select"))}else r=getElementContent$1(a,a.tagName.toLowerCase());if(e.regular){try{s=new RegExp(e.regular).exec(r)}catch(c){return sd.log("----vcustom----\u6b63\u5219\u5904\u7406\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1}if(null===s)return sd.log("----vcustom----\u5c5e\u6027\u89c4\u5219\u5904\u7406\uff0c\u672a\u5339\u914d\u5230\u7ed3\u679c,\u5c5e\u6027\u629b\u5f03",e.name),!1;if(!isArray(s)||!isString(s[0]))return sd.log("----vcustom----\u6b63\u5219\u5904\u7406\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name,s),!1;r=s[0]}if("STRING"===e.type)i[e.name]=r;else if("NUMBER"===e.type){if(r.length<1)return sd.log("----vcustom----\u672a\u83b7\u53d6\u5230\u6570\u5b57\u5185\u5bb9\uff0c\u5c5e\u6027\u629b\u5f03",e.name,r),!1;if(isNaN(Number(r)))return sd.log("----vcustom----\u6570\u5b57\u7c7b\u578b\u5c5e\u6027\u8f6c\u6362\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name,r),!1;i[e.name]=Number(r)}return i}return sd.log("----vcustom----\u5c5e\u6027\u4e0d\u652f\u6301\u6b64\u83b7\u53d6\u65b9\u5f0f",e.name,e.method),!1},getAssignConfigs:function(e,t){var r=vtrackBase.initUrl();if(!r||!r.page_url)return[];if(!isObject(t))return[];var s=[];return t.events=t.events||t.eventList,isArray(t.events)&&t.events.length>0?(each(t.events,function(t){isObject(t)&&isObject(t.event)&&t.event.url_host===r.page_url.host&&t.event.url_path===r.page_url.pathname&&e(t)&&s.push(t)}),s):[]},addCustomProps:function(e){if("success"===sd.bridge.bridge_info.verify_success){var t=sd.vapph5collect.customProp.geth5Props(JSON.parse(JSON.stringify(e)));isObject(t)&&!isEmptyObject(t)&&(e.properties=extend(e.properties,t))}var r=sd.vtrackcollect.customProp.getVtrackProps(JSON.parse(JSON.stringify(e)));return isObject(r)&&!isEmptyObject(r)&&(e.properties=extend(e.properties,r)),e},init:function(){sd.vtrackcollect.init(),"success"===sd.bridge.bridge_info.verify_success&&sd.vapph5collect.init()}},unlimitedDiv={events:[],init:function(e){this.filterWebClickEvents(e)},filterWebClickEvents:function(e){this.events=sd.vtrackcollect.getAssignConfigs(function(e){return!(!isObject(e)||!0!==e.event.unlimited_div||"webclick"!==e.event_type)},e)},isTargetEle:function(e){var t=sd.heatmap.getEleDetail(e);if(!isObject(t)||!isString(t.$element_path))return!1;for(var r=0;r0)},e),this.events.length?this.configSwitch=!0:this.configSwitch=!1},getVtrackProps:function(e){var t={};return this.collectAble()?("$WebClick"===e.event&&(t=this.clickCustomPropMaker(e,this.events)),t):{}},clickCustomPropMaker:function(e,t,r){var s=this;r=r||this.filterConfig(e,t,sd.vtrackcollect.url_info.page_url);var i={};return r.length?(each(r,function(t){isArray(t.properties)&&t.properties.length>0&&each(t.properties,function(t){var r=s.getProp(t,e);isObject(r)&&extend(i,r)})}),i):{}},getProp:vtrackBase.getProp,getPropElInLi:vtrackBase.getPropElInLi,filterConfig:vtrackBase.filterConfig},vtrackcollect={unlimitedDiv:unlimitedDiv,config:{},storageEnable:!0,storage_name:"webjssdkvtrackcollect",para:{session_time:18e5,timeout:5e3,update_interval:18e5},url_info:{},timer:null,update_time:null,customProp:customProp,initUrl:function(){var e=vtrackBase.initUrl();if(e){var t;try{(t=new urlParse(sd.para.server_url))._values.Path="/config/visualized/Web.conf",e.api_url=t.getUrl()}catch(r){return sd.log("----vtrackcollect---API\u5730\u5740\u89e3\u6790\u5f02\u5e38",r),!1}this.url_info=e}return e},init:function(){if(!isObject(sd.para.heatmap)||!sd.para.heatmap.get_vtrack_config)return!1;if(_localStorage.isSupport()||(this.storageEnable=!1),!this.initUrl())return sd.log("----vtrackcustom----\u521d\u59cb\u5316\u5931\u8d25\uff0curl\u4fe1\u606f\u89e3\u6790\u5931\u8d25"),!1;if(this.storageEnable){var e=sd.store.readObjectVal(this.storage_name);if(isObject(e)&&isObject(e.data))if(this.serverUrlIsSame(e.serverUrl)){this.config=e.data,this.update_time=e.updateTime,this.updateConfig(e.data);var t=(new Date).getTime()-this.update_time;if(isNumber(t)&&t>0&&t0&&t0&&each(i.properties,function(r){if(isObject(r))if(!1===r.h5)isArray(t.sensorsdata_app_visual_properties)||(t.sensorsdata_app_visual_properties=[]),t.sensorsdata_app_visual_properties.push(r);else{var i=s.getProp(r,e);isObject(i)&&(t=extend(t,i))}}),isString(i.event_name)&&r.push(i.event_name))}),isObject(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(!0===window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode())&&(t.sensorsdata_web_visual_eventName=r)}return t.sensorsdata_app_visual_properties&&(t.sensorsdata_app_visual_properties=base64Encode(JSON.stringify(t.sensorsdata_app_visual_properties))),t},initAppGetPropsBridge:function(){var e=this;return new sd.JSBridge({type:"getJSVisualProperties",app_call_js:function(t){var r={};try{t=JSON.parse(base64Decode(t))}catch(n){sd.log("getJSVisualProperties data parse error!")}if(isObject(t)){var s=t.sensorsdata_js_visual_properties,i=e.initUrl();i&&(i=i.page_url,isArray(s)&&s.length>0&&each(s,function(t){if(isObject(t)&&t.url_host===i.host&&t.url_path===i.pathname&&t.h5){var s=e.getProp(t);isObject(s)&&(r=extend(r,s))}}))}if("android"===sd.bridge.bridge_info.platform){var a={callType:"getJSVisualProperties",data:r};isObject(t)&&t.message_id&&(a.message_id=t.message_id),isObject(window.SensorsData_APP_New_H5_Bridge)&&isFunction(SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app)?SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app(JSON.stringify(a)):isObject(window.SensorsData_APP_JS_Bridge)&&isFunction(SensorsData_APP_JS_Bridge.sensorsdata_js_call_app)&&SensorsData_APP_JS_Bridge.sensorsdata_js_call_app(JSON.stringify(a))}return r}})}},vapph5collect={events:[],customProp:vapph5CustomProp,getAssignConfigs:vtrackBase.getAssignConfigs,initUrl:vtrackBase.initUrl,init:function(){if(this.initUrl()){var e=this.getConfigFromApp();e&&this.updateConfigs(e),this.customProp.init(),this.initAppUpdateConfigBridge()}},initAppUpdateConfigBridge:function(){var e=this;return new sd.JSBridge({type:"updateH5VisualConfig",app_call_js:function(t){if(t){try{t=JSON.parse(base64Decode(t))}catch(r){return void sd.log("updateH5VisualConfig result parse error\uff01")}e.updateConfigs(t)}}})},getConfigFromApp:function(){var e=new sd.JSBridge({type:"sensorsdata_get_app_visual_config"}).getAppData();if(e)try{e=JSON.parse(base64Decode(e))}catch(t){e=null,sd.log("getAppVisualConfig result parse error\uff01")}return e},updateConfigs:function(e){this.events=this.filterConfigs(e),this.customProp.updateEvents(this.events)},filterConfigs:function(e){return this.getAssignConfigs(function(e){return!(!isObject(e)||!1===e.h5)},e)}};function addSinglePageEvent(e){var t,r=location.href,s=window.history.pushState,i=window.history.replaceState;isFunction(window.history.pushState)&&(window.history.pushState=function(){s.apply(window.history,arguments),e(r),r=location.href}),isFunction(window.history.replaceState)&&(window.history.replaceState=function(){i.apply(window.history,arguments),e(r),r=location.href}),t=window.document.documentMode?"hashchange":s?"popstate":"hashchange",addEvent(window,t,function(){e(r),r=location.href})}var spa=new EventEmitter,ee={};function getFlagValue(e){var t=null,r=new RegExp(e+"=([^&#]+)");try{each(JSON.parse(window.name),function(r,s){e===s&&(t=decodeURIComponent(r))})}catch(i){t=null}if(null===t){var s=location.href.match(r);s&&s[0]&&s[1]&&(t=_decodeURIComponent(s[1]))}return t}ee.spa=spa,ee.initSystemEvent=function(){addSinglePageEvent(function(e){spa.emit("switch",e)})};var heatmapMode={getOriginalUrl:function(){var e=location.protocol+"//"+location.host+location.pathname,t="",r="";function s(e){var t=e.split("&"),r=["sa-request-id","sa-request-type","sa-request-url"],s=[];return each(t,function(e){r.indexOf(e.split("=")[0])<0&&s.push(e)}),s.join("&")}if(location.search){var i=s(location.search.slice(1));i&&(t="?"+i)}if(location.hash&&(r=location.hash,location.hash.indexOf("?")>-1)){var a=location.hash.split("?"),n=s(a[1]);n&&(r=a[0]+"?"+n)}return decodeURI(e+t+r)},isSeachHasKeyword:function(){return null!==getFlagValue("sa-request-id")&&("string"==typeof sessionStorage.getItem("sensors-visual-mode")&&sessionStorage.removeItem("sensors-visual-mode"),!0)},hasKeywordHandle:function(){var e=getFlagValue("sa-request-id"),t=getFlagValue("sa-request-type"),r=getFlagValue("sa-request-url");heatmap.setNotice(r),_sessionStorage.isSupport()&&(null!==r&&sessionStorage.setItem("sensors_heatmap_url",r),sessionStorage.setItem("sensors_heatmap_id",e),null!==t?"1"===t||"2"===t||"3"===t?sessionStorage.setItem("sensors_heatmap_type",t):t=null:t=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),this.isReady(e,t,this.getOriginalUrl())},isReady:function(e,t,r){sd.para.heatmap_url?loadScript({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(sd,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(sd.heatmap_version&&sd.heatmap_version===sd.lib_version||console.log("heatmap.js\u4e0esensorsdata.js\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669!")))},0)},error:function(){},type:"js",url:sd.para.heatmap_url}):sd.log("\u6ca1\u6709\u6307\u5b9aheatmap_url\u7684\u8def\u5f84")},isStorageHasKeyword:function(){return _sessionStorage.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")},storageHasKeywordHandle:function(){heatmap.setNotice(),heatmapMode.isReady(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),this.getOriginalUrl())}},vtrackMode={isStorageHasKeyword:function(){return _sessionStorage.isSupport()&&"string"==typeof sessionStorage.getItem("sensors-visual-mode")},isSearchHasKeyword:function(){return(!0===getFlagValue("sa-visual-mode")||"true"===getFlagValue("sa-visual-mode"))&&("string"==typeof sessionStorage.getItem("sensors_heatmap_id")&&sessionStorage.removeItem("sensors_heatmap_id"),!0)},loadVtrack:function(){loadScript({success:function(){},error:function(){},type:"js",url:sd.para.vtrack_url?sd.para.vtrack_url:location.protocol+"//static.sensorsdata.cn/sdk/"+sd.lib_version+"/vtrack.min.js"})},messageListener:function(e){if("sa-fe"!==e.data.source)return!1;if("v-track-mode"===e.data.type){if(e.data.data&&e.data.data.isVtrack)if(_sessionStorage.isSupport()&&sessionStorage.setItem("sensors-visual-mode","true"),e.data.data.userURL&&location.href.match(/sa-visual-mode=true/)){var t=isHttpUrl(r=e.data.data.userURL)?removeScriptProtocol(r):(sd.log("\u53ef\u89c6\u5316\u6a21\u5f0f\u68c0\u6d4b URL \u5931\u8d25"),!1);t&&(window.location.href=t)}else vtrackMode.loadVtrack();window.removeEventListener("message",vtrackMode.messageListener,!1)}var r},removeMessageHandle:function(){window.removeEventListener&&window.removeEventListener("message",vtrackMode.messageListener,!1)},verifyVtrackMode:function(){window.addEventListener&&window.addEventListener("message",vtrackMode.messageListener,!1),vtrackMode.postMessage()},postMessage:function(){window.parent&&window.parent.postMessage&&window.parent.postMessage({source:"sa-web-sdk",type:"v-is-vtrack",data:{sdkversion:"1.22.4"}},"*")},notifyUser:function(){var e=function(t){if("sa-fe"!==t.data.source)return!1;"v-track-mode"===t.data.type&&(t.data.data&&t.data.data.isVtrack&&alert("\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\uff0c\u8bf7\u5347\u7ea7\u90e8\u7f72\u795e\u7b56\u6570\u636e\u6cbb\u7406"),window.removeEventListener("message",e,!1))};window.addEventListener&&window.addEventListener("message",e,!1),vtrackMode.postMessage()}};function defineMode(e){var t=sd.bridge.bridge_info;function r(){var e=[];t.touch_app_bridge||e.push(sd.debug.defineMode("1")),isObject(sd.para.app_js_bridge)||(e.push(sd.debug.defineMode("2")),t.verify_success=!1),isObject(sd.para.heatmap)&&"default"==sd.para.heatmap.clickmap||e.push(sd.debug.defineMode("3")),"fail"===t.verify_success&&e.push(sd.debug.defineMode("4"));var r={callType:"app_alert",data:e};SensorsData_App_Visual_Bridge&&SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info?SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info(JSON.stringify(r)):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.sensorsdataNativeTracker&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage(JSON.stringify(r))}if(isObject(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(!0===window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode()))if(isObject(sd.para.heatmap)&&"default"==sd.para.heatmap.clickmap)if(isObject(sd.para.app_js_bridge)&&"success"===t.verify_success)if(e)sa_jssdk_app_define_mode(sd,e);else{var s=location.protocol;loadScript({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_app_define_mode&&sa_jssdk_app_define_mode(sd,e)},0)},error:function(){},type:"js",url:(s=indexOf(["http:","https:"],s)>-1?s:"https:")+"//static.sensorsdata.cn/sdk/"+sd.lib_version+"/vapph5define.min.js"})}else r();else r()}function listenSinglePage(){sd.para.is_track_single_page&&spa.on("switch",function(e){var t=function(t){t=t||{},e!==location.href&&(pageInfo.pageProp.referrer=getURL(e),sd.quick("autoTrack",extend({$url:getURL(),$referrer:getURL(e)},t)))};if("boolean"==typeof sd.para.is_track_single_page)t();else if("function"==typeof sd.para.is_track_single_page){var r=sd.para.is_track_single_page();isObject(r)?t(r):!0===r&&t()}})}function enterFullTrack(){sd._q&&isArray(sd._q)&&sd._q.length>0&&each(sd._q,function(e){sd[e[0]].apply(sd,Array.prototype.slice.call(e[1]))}),isObject(sd.para.heatmap)&&(heatmap.initHeatmap(),heatmap.initScrollmap())}function trackMode(){sd.readyState.setState(3),new sd.JSBridge({type:"visualized",app_call_js:function(){"undefined"!=typeof sa_jssdk_app_define_mode?defineMode(!0):defineMode(!1)}}),defineMode(!1),sd.bridge.app_js_bridge_v1(),pageInfo.initPage(),listenSinglePage(),sd.para.batch_send&&sd.batchSend.batchInterval(),sd.store.init(),sd.vtrackBase.init(),sd.readyState.setState(4),enterFullTrack()}function detectMode(){heatmapMode.isSeachHasKeyword()?heatmapMode.hasKeywordHandle():window.parent!==self&&vtrackMode.isSearchHasKeyword()?vtrackMode.verifyVtrackMode():heatmapMode.isStorageHasKeyword()?heatmapMode.storageHasKeywordHandle():window.parent!==self&&vtrackMode.isStorageHasKeyword()?vtrackMode.verifyVtrackMode():(trackMode(),vtrackMode.notifyUser())}var methods=["setItem","deleteItem","getAppStatus","track","quick","register","registerPage","registerOnce","trackSignup","setProfile","setOnceProfile","appendProfile","incrementProfile","deleteProfile","unsetProfile","identify","login","logout","trackLink","clearAllRegister","clearPageRegister"];function checkState(){each(methods,function(e){var t=sd[e];sd[e]=function(){if(sd.readyState.state<3)return isArray(sd._q)||(sd._q=[]),sd._q.push([e,arguments]),!1;if(sd.readyState.getState())return t.apply(sd,arguments);try{console.error("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}catch(r){sd.log(r)}}})}var saEmpty={track:function(e,t,r){},quick:function(e,t,r,s){},register:function(e){},registerPage:function(e){},registerOnce:function(e){},clearAllRegister:function(e){},trackSignup:function(e,t,r,s){},setProfile:function(e,t){},setOnceProfile:function(e,t){},appendProfile:function(e,t){},incrementProfile:function(e,t){},deleteProfile:function(e){},unsetProfile:function(e,t){},identify:function(e,t){},login:function(e,t){},logout:function(e){},trackLink:function(e,t,r){},deleteItem:function(e,t){},setItem:function(e,t,r){},getAppStatus:function(e){},clearPageRegister:function(e){}};function CancelationToken(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function InterceptorContext(e,t,r){var s=null;try{s=JSON.parse(JSON.stringify(e))}catch(i){sdLog(i)}this.getOriginalData=function(){return s},this.getPosition=function(){return t},this.cancelationToken=new CancelationToken,this.sensors=r}function Stage(e){if(!isObject(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}Stage.prototype.process=function(e,t){if(e&&e in this.processDef){var r=this.registeredInterceptors[e];if(r&&isArray(r)&&r.length>0)for(var s={current:0,total:r.length},i=new InterceptorContext(t,s,sd),a=0;a=s.length:s.push(a);break;default:s.splice(i,0,a)}}}};var processDef={addCustomProps:null,formatData:null},dataStage=new Stage(processDef);function registerFeature(e){e&&e.dataStage&&dataStage.registerStageImplementation(e.dataStage)}function CoreFeature(e){e.kit=kit,e.saEvent=saEvent,this.dataStage=dataStageImpl}function strip_sa_properties(e){return isObject(e)?(each(e,function(t,r){if(isArray(t)){var s=[];each(t,function(e){isString(e)?s.push(e):sdLog("\u60a8\u7684\u6570\u636e-",r,t,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),e[r]=s}isString(t)||isNumber(t)||isDate(t)||isBoolean(t)||isArray(t)||isFunction(t)||"$option"===r||(sdLog("\u60a8\u7684\u6570\u636e-",r,t,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete e[r])}),e):e}function formatString(e,t){return isNumber(t)&&e.length>t?(sdLog("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function filterReservedProperties(e){isObject(e)&&each(["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"],function(t,r){t in e&&(r<3?(delete e[t],sdLog("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):sdLog("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d"))})}function searchObjString(e){var t=["$element_selector","$element_path"],r=["sensorsdata_app_visual_properties"];isObject(e)&&each(e,function(s,i){if(isObject(s))searchObjString(e[i]);else if(isString(s)){if(indexOf(r,i)>-1)return;e[i]=formatString(s,indexOf(t,i)>-1?1024:sdPara.max_string_length)}})}function searchZZAppStyle(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function formatItem(e){if("item_type"in e){check({item_type:e.item_type},function(t){return t||delete e.item_type,!0})}if("item_id"in e){check({item_id:e.item_id},function(t,r,s){return t||"string"!==s||delete e.item_id,!0})}}function formatProperties(e){each(e,function(t,r){check({propertyKey:r},function(t,s,i){return t||"keyLength"===i||delete e[r],!0})})}function formatData(e){var t=e.properties;isObject(t)?(strip_sa_properties(t),filterReservedProperties(t),searchZZAppStyle(e),formatProperties(t),searchObjString(t)):"properties"in e&&(e.properties={}),searchObjDate(e),formatItem(e)}var dataStageImpl$1={init:function(){},interceptor:{formatData:{priority:0,entry:function(e){return formatData(e),e}}}};function DataFormatFeature(){this.dataStage=dataStageImpl$1}var preCfg=window.sensors_data_pre_config,is_compliance_enabled=!!isObject(preCfg)&&preCfg.is_compliance_enabled;function implementCore(e){e&&(logger.setup(sdLog),sd._=extend(W,common),sd.ee=ee,sd.sendState=sendState,sd.events=new sd._.EventEmitterSa,sd.batchSend=batchSend,sd.bridge=bridge,sd.JSBridge=JSBridge,sd.store=store,sd.vtrackBase=vtrackBase,sd.unlimitedDiv=unlimitedDiv,sd.customProp=customProp,sd.vtrackcollect=vtrackcollect,sd.vapph5collect=vapph5collect,sd.heatmap=heatmap,sd.detectMode=detectMode,sd.registerFeature=registerFeature,registerFeature(new CoreFeature(sd)),registerFeature(new DataFormatFeature(sd)));var t=e?functions:saEmpty;for(var r in t)sd[r]=t[r]}sd.init=function(e){if(sd.readyState&&sd.readyState.state&&sd.readyState.state>=2)return!1;is_compliance_enabled&&implementCore(!0),sd.ee.initSystemEvent(),sd.setInitVar(),sd.readyState.setState(2),sd.initPara(e),sd.bridge.supportAppCallJs(),sd.detectMode(),sd.iOSWebClickPolyfill()},is_compliance_enabled?implementCore(!1):(implementCore(!0),checkState());var _sd=sd;try{sd.modules={},"string"==typeof window.sensorsDataAnalytic201505?(sd.para=window[sensorsDataAnalytic201505].para,sd._q=window[sensorsDataAnalytic201505]._q,window[sensorsDataAnalytic201505]=sd,window.sensorsDataAnalytic201505=sd,sd.init()):"undefined"==typeof window.sensorsDataAnalytic201505?window.sensorsDataAnalytic201505=sd:_sd=window.sensorsDataAnalytic201505}catch(err){if("object"==typeof console&&console.log)try{console.log(err)}catch(e){sd.log(e)}}var _sd$1=_sd;export default _sd$1; \ No newline at end of file diff --git a/core/sensorsdata.min.js b/core/sensorsdata.min.js index 1a118c51..a658ec89 100644 --- a/core/sensorsdata.min.js +++ b/core/sensorsdata.min.js @@ -1,5 +1,5 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():t()}(this,function(){function e(t){return"function"==typeof t||!(!t||"object"!=typeof t)&&e(t.listener)}function t(){this._events={}}function r(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function n(e){e=e||"";for(var t={},n=e.substring(1),i=n.split("&"),a=0;a Invalid URL");var r=e.split("#"),n=r[0],i=r.slice(1).join("#");t=this._regex.exec(n);for(var a in this._fields)"undefined"!=typeof t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new t(e)}function l(e){var t={},r=function(){var e;try{return e=new URL("http://modernizr.com/"),"http://modernizr.com/"===e.href}catch(t){return!1}};if("function"==typeof window.URL&&r())t=new URL(e),t.searchParams||(t.searchParams=function(){var e=n(t.search);return{get:function(t){return e[t]}}}());else{i(e)||(e=String(e)),e=a(e);var o=/^https?:\/\/.+/;if(o.test(e)===!1)return void ur.log("Invalid URL");var l=s(e);t.hash=l._values.Fragment,t.host=l._values.Host?l._values.Host+(l._values.Port?":"+l._values.Port:""):"",t.href=l._values.URL,t.password=l._values.Password,t.pathname=l._values.Path,t.port=l._values.Port,t.search=l._values.QueryString?"?"+l._values.QueryString:"",t.username=l._values.Username,t.hostname=l._values.Hostname,t.protocol=l._values.Protocol?l._values.Protocol+":":"",t.origin=l._values.Origin?l._values.Origin+(l._values.Port?":"+l._values.Port:""):"",t.searchParams=function(){var e=n("?"+l._values.QueryString);return{get:function(t){return e[t]}}}()}return t}function c(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function u(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),c(e)&&e.getRandomValues){var t=new Uint32Array(1),r=e.getRandomValues(t)[0],n=Math.pow(2,32);return r/n}}return pr(1e19)/1e19}function p(e){return!(!e||1!==e.nodeType)}function d(e){return void 0===e}function _(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function f(e){return Array.isArray&&_(f)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function g(e){return new _r(e)}function h(e,t,r,n){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation,e._getPath=i._getPath),e}function a(e,t,r,n){var a=function(a){if(a=a||i(window.event)){a.target=a.srcElement;var s,o,l=!0;return"function"==typeof r&&(s=r(a)),o=t.call(e,a),"beforeunload"!==n?(!1!==s&&!1!==o||(l=!1),l):void 0}};return a}i._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||g(e.target).getParents()},i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};var s=function(e,t,r){if(void 0===n&&"click"===t&&(n=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=i._getPath,r.call(this,e)},n);else{var s="on"+t,o=e[s];e[s]=a(e,r,o,t)}};s.apply(null,arguments)}function v(e){var t="pushState"in window.history?"popstate":"hashchange";h(window,t,e)}function y(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){ur.log(t)}}}function w(e,t,r){if(null==e)return!1;if(gr&&e.forEach===gr)e.forEach(t,r);else if(f(e))for(var n=0,i=e.length;n=200&&n.status<300||304==n.status?e.success(t(n.responseText)):e.error(t(n.responseText),n.status),n.onreadystatechange=null,n.onload=null)}catch(r){n.onreadystatechange=null,n.onload=null}},n.open(e.type,e.url,!0);try{e.credentials&&(n.withCredentials=!0),c(e.header)&&w(e.header,function(e,t){n.setRequestHeader&&n.setRequestHeader(t,e)}),e.data&&(e.cors||n.setRequestHeader&&n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?n.setRequestHeader&&n.setRequestHeader("Content-type","application/json; charset=UTF-8"):n.setRequestHeader&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(o){ur.log(o)}n.send(e.data||null)}function k(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(w(e,function(e,n,i){r.push(t(e,n,i))}),r)}function P(e){var t=[];try{t=k(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function N(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function $(e,t){t=t||window;var r=!1,n=!0,i=t.document,a=i.documentElement,s=i.addEventListener,o=s?"addEventListener":"attachEvent",l=s?"removeEventListener":"detachEvent",c=s?"":"on",u=function(n){"readystatechange"==n.type&&"complete"!=i.readyState||(("load"==n.type?t:i)[l](c+n.type,u,!1),!r&&(r=!0)&&e.call(t,n.type||n))},p=function(){try{a.doScroll("left")}catch(e){return void setTimeout(p,50)}u("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!s&&a.doScroll){try{n=!t.frameElement}catch(d){ur.log(d)}n&&p()}i[o](c+"DOMContentLoaded",u,!1),i[o](c+"readystatechange",u,!1),t[o](c+"load",u,!1)}}function j(e){return w(Array.prototype.slice.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])}),e}function C(e){var t=e;try{t=decodeURI(e)}catch(r){t=e}return t}function A(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",r=t.length-1,n={},i=0;for(i=0;i=2&&!/^(\d+\.)+\d+$/.test(n))for(var a="."+i.splice(i.length-1,1);i.length>0;)if(a="."+i.splice(i.length-1,1)+a,document.cookie=t+"=true; path=/; domain="+a,document.cookie.indexOf(t+"=true")!==-1){var s=new Date;return s.setTime(s.getTime()-1e3),document.cookie=t+"=true; expires="+s.toGMTString()+"; path=/; SameSite=Lax; domain="+a,a}return""}function U(e){function t(e,t){e=a(e);var r;if("body"===e)return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var n=e.split(":nth-of-type");if(!n[0]||!n[1])return null;var i=n[0],s=n[1].match(/\(([0-9]+)\)/);if(!s||!s[1])return null;var o=Number(s[1]);if(!(p(t)&&t.children&&t.children.length>0))return null;for(var l=t.children,c=0;c0)return null}return r?r:null}function r(e){var i,a=n.shift();if(!a)return e;try{i=t(a,e)}catch(s){ur.log(s)}return i&&p(i)?r(i):null}if(!i(e))return null;var n=e.split(">"),s=null;return s=r(),s&&p(s)?s:null}function H(e,t){var r="",n="";return e.textContent?r=a(e.textContent):e.innerText&&(r=a(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),n=r||"","input"!==t&&"INPUT"!==t||(n=e.value||""),n}function J(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=l(e).hostname}catch(n){ur.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function B(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function R(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=r(e);var n="[\\?&]"+t+"=([^&#]*)",i=new RegExp(n),a=i.exec(e);return null===a||a&&"string"!=typeof a[1]&&a[1].length?"":r(a[1])}function M(e){var t={},r=e.split("?"),i=r[1]||"";return i&&(t=n("?"+i)),t}function q(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function K(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(q()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function V(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function F(e){return i(e)?(e=a(e),C(e)):C(location.href)}function z(e){return i(e)?(e=a(e),C(e)):C(location.pathname)}function W(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function X(e,t){if("string"==typeof t)return W(e,t);if(f(t)){for(var r=!1,n=0;n0)for(var a=e.split(""),s=0;st)for(i=r+i;l=n*i+o,lt;)i=i/2+o;i=n*i+o}return i}function G(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var n=0;n41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function le(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function ce(e){if(!c(e)||!i(e.callbackName))return ur.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;e.success=_(e.success)?e.success:function(){},e.error=_(e.error)?e.error:function(){},e.data=e.data||"";var t=document.createElement("script"),r=document.getElementsByTagName("head")[0],n=null,a=!1;if(r.appendChild(t),se(e.timeout)&&(n=setTimeout(function(){return!a&&(e.error("timeout"),window[e.callbackName]=function(){ur.log("call jsonp error")},n=null,r.removeChild(t),void(a=!0))},e.timeout)),window[e.callbackName]=function(){clearTimeout(n),n=null,e.success.apply(null,arguments),window[e.callbackName]=function(){ur.log("call jsonp error")},r.removeChild(t)},e.url.indexOf("?")>-1?e.url+="&callbackName="+e.callbackName:e.url+="?callbackName="+e.callbackName,c(e.data)){var s=[];w(e.data,function(e,t){s.push(t+"="+e)}),e.data=s.join("&"),e.url+="&"+e.data}t.onerror=function(i){return!a&&(window[e.callbackName]=function(){ur.log("call jsonp error")},clearTimeout(n),n=null,r.removeChild(t),e.error(i),void(a=!0))},t.src=e.url}function ue(e){var t={visibleHandler:_(e.visible)?e.visible:function(){},hiddenHandler:_(e.hidden)?e.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;h(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else h(window,"focus",this.visibleHandler),h(window,"blur",this.hiddenHandler)}};t.init()}function pe(e){e=b({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&(t=document.createElement("link"),t.rel="stylesheet",t.href=e.url),"js"===e.type&&(t=document.createElement("script"),t.async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function de(){return Date.now&&_(Date.now)?Date.now():(new Date).getTime()}function _e(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function fe(e,t){e=String(e),t="number"==typeof t?t:13;for(var r=126,n=e.split(""),i=0,a=n.length;it?(s&&(clearTimeout(s),s=null),o=c,a=e.apply(n,i),s||(n=i=null)):s||r.trailing===!1||(s=setTimeout(l,u)),a}}function be(e){var t=[];return null==e?t:(w(e,function(e){t[t.length]=e}),t)}function Se(e){return e?e.toArray?e.toArray():f(e)||ee(e)?Array.prototype.slice.call(e):be(e):[]}function ke(e){for(var t,r=[],n={},i=0;ilr.para.datasend_timeout&&(lr.para.datasend_timeout=lr.para.callback_timeout),lr.para.heatmap&&lr.para.heatmap.collect_tags&&c(lr.para.heatmap.collect_tags)&&w(lr.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&lr.heatmap.otherTags.push(t)}),lr.para.heatmap&&"default"===lr.para.heatmap.clickmap&&lr.heatmap.initUnlimitedTags()}function Ge(e){var t={};for(var r in e)t[r]=e[r];lr.store._state.identities=t,lr.store.save()}function Qe(){lr._t=lr._t||1*new Date,lr.lib_version=Tr,lr.is_first_visitor=!1,lr.source_channel_standard=Or}function et(){if(br.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){lr.log("enableLocalLog error: "+e.message)}}function tt(){br.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")}function rt(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&Wr[t]?Wr[t].apply(Wr,r):void("function"==typeof t?t.apply(lr,r):lr.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0]))}function nt(e,t){return i(e)?c(window.SensorsDataWebJSSDKPlugin)&&c(window.SensorsDataWebJSSDKPlugin[e])&&_(window.SensorsDataWebJSSDKPlugin[e].init)?(window.SensorsDataWebJSSDKPlugin[e].init(lr,t),window.SensorsDataWebJSSDKPlugin[e]):c(lr.modules)&&c(lr.modules[e])&&_(lr.modules[e].init)?(lr.modules[e].init(lr,t),lr.modules[e]):void lr.log(e+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+e+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"):(lr.log("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1)}function it(e,t,r){Vr.check({event:e,properties:t})&&Vr.send({type:"track",event:e,properties:t},r)}function at(e,t){return!!Vr.check({bindKey:e,bindValue:t})&&(lr.store._state.identities[e]=t,lr.store.save(),void Vr.send({type:"track_id_bind",event:"$BindID",properties:{}}))}function st(e,t){if(!Vr.check({unbindKey:e,bindValue:t}))return!1;if(c(lr.store._state.identities)&&lr.store._state.identities.hasOwnProperty(e)&&lr.store._state.identities[e]===t){var r=lr.store.getUnionId().login_id;r&&e+"+"+t===r&&(lr.store._state.distinct_id=lr.store._state.first_id,lr.store._state.first_id="",lr.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete lr.store._state.identities[e],lr.store.save())}var n={};n[e]=t,Vr.send({identities:n,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function ot(e,t,r){function n(e,t,r){function n(e){function n(){a||(a=!0,location.href=i.href)}e.stopPropagation(),e.preventDefault();var a=!1;setTimeout(n,1e3),lr.track(t,r,n)}e=e||{};var i=null;return e.ele&&(i=e.ele),e.event&&(i=e.target?e.target:e.event.target),r=r||{},!(!i||"object"!=typeof i)&&(!i.href||/^javascript/.test(i.href)||i.target||i.download||i.onclick?(lr.track(t,r),!1):(e.event&&n(e.event),void(e.ele&&Ve(e.ele,"click",function(e){n(e)}))))}"object"==typeof e&&e.tagName?n({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&n(e,t,r)}function lt(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void Ve(e,"click",function(n){function i(){ -a||(a=!0,location.href=e.href)}n.preventDefault();var a=!1;setTimeout(i,1e3),lr.track(t,r,i)}))}function ct(e,t,r){Vr.check({item_type:e,item_id:t,properties:r})&&Vr.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function ut(e,t){Vr.check({item_type:e,item_id:t})&&Vr.sendItem({type:"item_delete",item_type:e,item_id:t})}function pt(e,t){Vr.check({propertiesMust:e})&&Vr.send({type:"profile_set",properties:e},t)}function dt(e,t){Vr.check({propertiesMust:e})&&Vr.send({type:"profile_set_once",properties:e},t)}function _t(e,t){Vr.check({propertiesMust:e})&&(w(e,function(t,r){i(t)?e[r]=[t]:f(t)?e[r]=t:(delete e[r],lr.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),re(e)||Vr.send({type:"profile_append",properties:e},t))}function ft(e,t){function r(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}var n=e;i(e)&&(e={},e[n]=1),Vr.check({propertiesMust:e})&&(r(e)?Vr.send({type:"profile_increment",properties:e},t):lr.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"))}function gt(e){Vr.send({type:"profile_delete"},e),Br.set("distinct_id",dr()),Br.set("first_id","")}function ht(e,t){var r=e,n={};i(e)&&(e=[],e.push(r)),f(e)?(w(e,function(e){i(e)?n[e]=!0:lr.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),Vr.send({type:"profile_unset",properties:n},t)):lr.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")}function mt(e,t){function r(e){lr.store._state.identities.$identity_anonymous_id=e,lr.store.save()}"number"==typeof e&&(e=String(e));var n=Br.getFirstId();if("undefined"==typeof e){var i=dr();n?Br.set("first_id",i):Br.set("distinct_id",i),r(i)}else Vr.check({distinct_id:e})&&(t===!0?n?Br.set("first_id",e):Br.set("distinct_id",e):n?Br.change("first_id",e):Br.change("distinct_id",e),r(e))}function vt(e,t,r,n){var i=Br.getFirstId()||Br.getDistinctId();Br.set("distinct_id",e),Vr.send({original_id:i,distinct_id:lr.store.getDistinctId(),type:"track_signup",event:t,properties:r},n)}function yt(e,t,r,n){"number"==typeof e&&(e=String(e)),Vr.check({distinct_id:e,event:t,properties:r})&&vt(e,t,r,n)}function wt(e){Vr.check({properties:e})?b(Lr.currentProps,e):lr.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function bt(e){Br.clearAllProps(e)}function St(e){var t;if(f(e)&&e.length>0)for(t=0;t-1?e.config.send_type:lr.para.send_type,"beacon"===r&&oe()===!1&&(r="image"),"ajax"===r&&le()===!1&&(r="image"),r}function Lt(e){var t=Et(e);switch(t){case"image":return new en(e);case"ajax":return new tn(e);case"beacon":return new rn(e);default:return new en(e)}}function Ut(e){var t=Lt(e),r=t.start;return t.start=function(){var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},lr.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},lr.para.datasend_timeout-lr.para.callback_timeout)},t.isEnd=function(){this.received||(this.received=!0,this.end())},t}function Ht(){this.sendingData=0,this.sendingItemKeys=[]}function Jt(e){var t=location.href,r=window.history.pushState,n=window.history.replaceState;_(window.history.pushState)&&(window.history.pushState=function(){r.apply(window.history,arguments),e(t),t=location.href}),_(window.history.replaceState)&&(window.history.replaceState=function(){n.apply(window.history,arguments),e(t),t=location.href});var i;i=window.document.documentMode?"hashchange":r?"popstate":"hashchange",h(window,i,function(){e(t),t=location.href})}function Bt(e){var t=null,n=new RegExp(e+"=([^&#]+)");try{var i=JSON.parse(window.name);w(i,function(r,n){e===n&&(t=decodeURIComponent(r))})}catch(a){t=null}if(null===t){var s=location.href.match(n);s&&s[0]&&s[1]&&(t=r(s[1]))}return t}function Rt(e){function t(){var e=[];r.touch_app_bridge||e.push(lr.debug.defineMode("1")),c(lr.para.app_js_bridge)||(e.push(lr.debug.defineMode("2")),r.verify_success=!1),c(lr.para.heatmap)&&"default"==lr.para.heatmap.clickmap||e.push(lr.debug.defineMode("3")),"fail"===r.verify_success&&e.push(lr.debug.defineMode("4"));var t={callType:"app_alert",data:e};SensorsData_App_Visual_Bridge&&SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info?SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info(JSON.stringify(t)):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.sensorsdataNativeTracker&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage(JSON.stringify(t))}var r=lr.bridge.bridge_info;if(c(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode===!0||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode()))if(c(lr.para.heatmap)&&"default"==lr.para.heatmap.clickmap)if(c(lr.para.app_js_bridge)&&"success"===r.verify_success)if(e)sa_jssdk_app_define_mode(lr,e);else{var n=location.protocol,i=["http:","https:"];n=G(i,n)>-1?n:"https:",pe({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_app_define_mode&&sa_jssdk_app_define_mode(lr,e)},0)},error:function(){},type:"js",url:n+"//static.sensorsdata.cn/sdk/"+lr.lib_version+"/vapph5define.min.js"})}else t();else t()}function Mt(){lr.para.is_track_single_page&&fn.on("switch",function(e){var t=function(t){t=t||{},e!==location.href&&(Lr.pageProp.referrer=F(e),lr.quick("autoTrack",b({$url:F(),$referrer:F(e)},t)))};if("boolean"==typeof lr.para.is_track_single_page)t();else if("function"==typeof lr.para.is_track_single_page){var r=lr.para.is_track_single_page();c(r)?t(r):r===!0&&t()}})}function qt(){lr._q&&f(lr._q)&&lr._q.length>0&&w(lr._q,function(e){lr[e[0]].apply(lr,Array.prototype.slice.call(e[1]))}),c(lr.para.heatmap)&&(zr.initHeatmap(),zr.initScrollmap())}function Kt(){lr.readyState.setState(3),new lr.JSBridge({type:"visualized",app_call_js:function(){Rt("undefined"!=typeof sa_jssdk_app_define_mode?!0:!1)}}),Rt(!1),lr.bridge.app_js_bridge_v1(),Lr.initPage(),Mt(),lr.para.batch_send&&(Ve(window,"onpagehide"in window?"pagehide":"unload",function(){lr.batchSend.clearPendingStatus()}),lr.batchSend.batchInterval()),lr.store.init(),lr.vtrackBase.init(),lr.readyState.setState(4),qt()}function Vt(){hn.isSeachHasKeyword()?hn.hasKeywordHandle():window.parent!==self&&mn.isSearchHasKeyword()?mn.verifyVtrackMode():hn.isStorageHasKeyword()?hn.storageHasKeywordHandle():window.parent!==self&&mn.isStorageHasKeyword()?mn.verifyVtrackMode():(Kt(),mn.notifyUser())}function Ft(){w(vn,function(e){var t=lr[e];lr[e]=function(){if(lr.readyState.state<3)return f(lr._q)||(lr._q=[]),lr._q.push([e,arguments]),!1;{if(lr.readyState.getState())return t.apply(lr,arguments);try{console.error("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}catch(r){lr.log(r)}}}})}function zt(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function Wt(e,t,r){var n=null;try{n=JSON.parse(JSON.stringify(e))}catch(i){Pe(i)}this.getOriginalData=function(){return n},this.getPosition=function(){return t},this.cancelationToken=new zt,this.sensors=r}function Xt(e){if(!c(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}function Zt(e){e&&e.dataStage&&bn.registerStageImplementation(e.dataStage)}function Yt(e){e.kit=Qr,e.saEvent=Vr,this.dataStage=Kr}function Gt(e){return c(e)?(w(e,function(t,r){if(f(t)){var n=[];w(t,function(e){i(e)?n.push(e):Pe("\u60a8\u7684\u6570\u636e-",r,t,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),e[r]=n}i(t)||se(t)||D(t)||te(t)||f(t)||_(t)||"$option"===r||(Pe("\u60a8\u7684\u6570\u636e-",r,t,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete e[r])}),e):e}function Qt(e,t){return se(t)&&e.length>t?(Pe("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function er(e){var t=["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"];c(e)&&w(t,function(t,r){t in e&&(r<3?(delete e[t],Pe("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):Pe("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d"))})}function tr(e){var t=["$element_selector","$element_path"],r=["sensorsdata_app_visual_properties"];c(e)&&w(e,function(n,a){if(c(n))tr(e[a]);else if(i(n)){if(G(r,a)>-1)return;e[a]=Qt(n,G(t,a)>-1?1024:$r.max_string_length)}})}function rr(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function nr(e){if("item_type"in e){var t=e.item_type,r=function(t){return t||delete e.item_type,!0};We({item_type:t},r)}if("item_id"in e){var n=e.item_id,i=function(t,r,n){return t||"string"!==n||delete e.item_id,!0};We({item_id:n},i)}}function ir(e){w(e,function(t,r){var n=function(t,n,i){return t||"keyLength"===i||delete e[r],!0};We({propertyKey:r},n)})}function ar(e){var t=e.properties;c(t)?(Gt(t),er(t),rr(e),ir(t),tr(t)):"properties"in e&&(e.properties={}),me(e),nr(e)}function sr(){this.dataStage=Sn}function or(e){e&&(ur.setup(Pe),lr._=b(Nr,Gr),lr.ee=gn,lr.sendState=nn,lr.events=new lr._.EventEmitterSa,lr.batchSend=an,lr.bridge=sn,lr.JSBridge=on,lr.store=Br,lr.vtrackBase=ln,lr.unlimitedDiv=cn,lr.customProp=un,lr.vtrackcollect=pn,lr.vapph5collect=_n,lr.heatmap=zr,lr.detectMode=Vt,lr.registerFeature=Zt,Zt(new Yt(lr)),Zt(new sr(lr)));var t=e?Zr:yn;for(var r in t)lr[r]=t[r]}var lr={};(function(){function e(n,i){function a(e,t){try{e()}catch(r){t&&t()}}function s(e){if(null!=s[e])return s[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=s("json-stringify")&&s("date-serialization")&&s("json-parse");else if("date-serialization"==e){if(t=s("json-stringify")&&w){var r=i.stringify;a(function(){t='"-271821-04-20T00:00:00.000Z"'==r(new p((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==r(new p(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new p((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==r(new p((-1)))})}}else{var n,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var r=i.stringify,u="function"==typeof r;u&&((n=function(){return 1}).toJSON=n,a(function(){u="0"===r(0)&&"0"===r(new l)&&'""'==r(new c)&&r(v)===h&&r(h)===h&&r()===h&&"1"===r(n)&&"[1]"==r([n])&&"[null]"==r([h])&&"null"==r(null)&&"[null,null,null]"==r([h,v,null])&&r({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==o&&"1"===r(null,n)&&"[\n 1,\n 2\n]"==r([1,2],null,1)},function(){u=!1})),t=u}if("json-parse"==e){var d,_=i.parse;"function"==typeof _&&a(function(){0!==_("0")||_(!1)||(n=_(o),d=5==n.a.length&&1===n.a[0],d&&(a(function(){d=!_('"\t"')}),d&&a(function(){d=1!==_("01")}),d&&a(function(){d=1!==_("1.")})))},function(){d=!1}),t=d}}return s[e]=!!t}function o(e){return T(this)}n||(n=r.Object()),i||(i=r.Object());var l=n.Number||r.Number,c=n.String||r.String,u=n.Object||r.Object,p=n.Date||r.Date,d=n.SyntaxError||r.SyntaxError,_=n.TypeError||r.TypeError,f=n.Math||r.Math,g=n.JSON||r.JSON;if("object"==typeof g&&g)return i.stringify=g.stringify,i.parse=g.parse,i.runInContext=e,i;var h,m=u.prototype,v=m.toString,y=m.hasOwnProperty,w=new p((-0xc782b5b800cec));if(a(function(){w=w.getUTCFullYear()==-109252&&0===w.getUTCMonth()&&1===w.getUTCDate()&&10==w.getUTCHours()&&37==w.getUTCMinutes()&&6==w.getUTCSeconds()&&708==w.getUTCMilliseconds()}),s["bug-string-char-index"]=s["date-serialization"]=s.json=s["json-stringify"]=s["json-parse"]=null,!s("json")){var b="[object Function]",S="[object Date]",k="[object Number]",P="[object String]",N="[object Array]",$="[object Boolean]",j=s("bug-string-char-index"),C=function(e,r){var n,i,a,s=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n;for(a in i)y.call(i,a)&&s++;return n=i=null,s?C=function(e,t){var r,n,i=v.call(e)==b;for(r in e)i&&"prototype"==r||!y.call(e,r)||(n="constructor"===r)||t(r);(n||y.call(e,r="constructor"))&&t(r)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],C=function(e,r){var n,a,s=v.call(e)==b,o=!s&&"function"!=typeof e.constructor&&t[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(n in e)s&&"prototype"==n||!o.call(e,n)||r(n);for(a=i.length;n=i[--a];)o.call(e,n)&&r(n)}),C(e,r)};if(!s("json-stringify")&&!s("date-serialization")){var A={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},D="000000",O=function(e,t){return(D+(t||0)).slice(-e)},T=function(e){var t,r,n,i,a,s,o,l,c;if(w)t=function(e){r=e.getUTCFullYear(),n=e.getUTCMonth(),i=e.getUTCDate(),s=e.getUTCHours(),o=e.getUTCMinutes(),l=e.getUTCSeconds(),c=e.getUTCMilliseconds()};else{var u=f.floor,p=[0,31,59,90,120,151,181,212,243,273,304,334],d=function(e,t){return p[t]+365*(e-1970)+u((e-1969+(t=+(t>1)))/4)-u((e-1901+t)/100)+u((e-1601+t)/400)};t=function(e){for(i=u(e/864e5),r=u(i/365.2425)+1970-1;d(r+1,0)<=i;r++);for(n=u((i-d(r,0))/30.42);d(r,n+1)<=i;n++);i=1+i-d(r,n),a=(e%864e5+864e5)%864e5,s=u(a/36e5)%24,o=u(a/6e4)%60,l=u(a/1e3)%60,c=a%1e3}}return(T=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+O(6,r<0?-r:r):O(4,r))+"-"+O(2,n+1)+"-"+O(2,i)+"T"+O(2,s)+":"+O(2,o)+":"+O(2,l)+"."+O(3,c)+"Z",r=n=i=s=o=l=c=null):e=null,e})(e)};if(s("json-stringify")&&!s("date-serialization")){var x=i.stringify;i.stringify=function(e,t,r){var n=p.prototype.toJSON;p.prototype.toJSON=o;var i=x(e,t,r);return p.prototype.toJSON=n,i}}else{var I="\\u00",E=function(e){var t=e.charCodeAt(0),r=A[t];return r?r:I+O(2,t.toString(16))},L=/[\x00-\x1f\x22\x5c]/g,U=function(e){return L.lastIndex=0,'"'+(L.test(e)?e.replace(L,E):e)+'"'},H=function(e,t,r,n,i,s,o){var l,c,u,d,f,g,m,y,w;if(a(function(){l=t[e]}),"object"==typeof l&&l&&(l.getUTCFullYear&&v.call(l)==S&&l.toJSON===p.prototype.toJSON?l=T(l):"function"==typeof l.toJSON&&(l=l.toJSON(e))),r&&(l=r.call(t,e,l)),l==h)return l===h?l:"null";switch(c=typeof l,"object"==c&&(u=v.call(l)),u||c){case"boolean":case $:return""+l;case"number":case k:return l>-1/0&&l<1/0?""+l:"null";case"string":case P:return U(""+l)}if("object"==typeof l){for(m=o.length;m--;)if(o[m]===l)throw _();if(o.push(l),d=[],y=s,s+=i,u==N){for(g=0,m=l.length;g0)for(n>10&&(n=10),i="";i.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||q();e+=R("0x"+a.slice(t,J));break;default:q()}else{if(34==i)break;for(i=a.charCodeAt(J),t=J;i>=32&&92!=i&&34!=i;)i=a.charCodeAt(++J);e+=a.slice(t,J)}if(34==a.charCodeAt(J))return J++,e;q();default:if(t=J,45==i&&(n=!0,i=a.charCodeAt(++J)),i>=48&&i<=57){for(48==i&&(i=a.charCodeAt(J+1),i>=48&&i<=57)&&q(),n=!1;J=48&&i<=57);J++);if(46==a.charCodeAt(J)){for(r=++J;r57));r++);r==J&&q(),J=r}if(i=a.charCodeAt(J),101==i||69==i){for(i=a.charCodeAt(++J),43!=i&&45!=i||J++,r=J;r57));r++);r==J&&q(),J=r}return+a.slice(t,J)}n&&q();var o=a.slice(J,J+4);if("true"==o)return J+=4,!0;if("fals"==o&&101==a.charCodeAt(J+4))return J+=5,!1;if("null"==o)return J+=4,null;q()}return"$"},V=function(e){var t,r;if("$"==e&&q(),"string"==typeof e){if("@"==(j?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=K(),"]"!=e;)r?","==e?(e=K(),"]"==e&&q()):q():r=!0,","==e&&q(),t.push(V(e));return t}if("{"==e){for(t={};e=K(),"}"!=e;)r?","==e?(e=K(),"}"==e&&q()):q():r=!0,","!=e&&"string"==typeof e&&"@"==(j?e.charAt(0):e[0])&&":"==K()||q(),t[e.slice(1)]=V(K());return t}q()}return e},F=function(e,t,r){var n=z(e,t,r);n===h?delete e[t]:e[t]=n},z=function(e,t,r){var n,i=e[t];if("object"==typeof i&&i)if(v.call(i)==N)for(n=i.length;n--;)F(v,C,i,n,r);else C(i,function(e){F(i,e,r)});return r.call(e,t,i)};i.parse=function(e,t){var r,n;return J=0,B=""+e,r=V(K()),"$"!=K()&&q(),J=B=null,t&&v.call(t)==b?z((n={},n[""]=r,n),"",t):r}}}return i.runInContext=e,i}var t={"function":!0,object:!0},r=t[typeof window]&&window||this,n=r.JSON,i=r.JSON3,a=!1,s=e(r,r.JSON3={noConflict:function(){return a||(a=!0,r.JSON=n,r.JSON3=i,n=i=null),s}});r.JSON={parse:s.parse,stringify:s.stringify}}).call(window),function(e,t){t(e)}(window,function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=function(e){var t=function(t){return e(String(t).replace(/[\t\n\f\r ]+/g,""))};return t.original=e,t}(e.atob)}else{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,n,i,a,s="",o=0,l=e.length%3;o255||(i=e.charCodeAt(o++))>255||(a=e.charCodeAt(o++))>255)return"";t=n<<16|i<<8|a,s+=r.charAt(t>>18&63)+r.charAt(t>>12&63)+r.charAt(t>>6&63)+r.charAt(63&t)}return l?s.slice(0,l-3)+"===".substring(l):s},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!n.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,i,a,s="",o=0;o>16&255):64===a?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return s}}}),function(){String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)})}(),t.prototype.on=function(t,r){if(!t||!r)return!1;if(!e(r))throw new Error("listener must be a function");this._events[t]=this._events[t]||[];var n="object"==typeof r;return this._events[t].push(n?r:{listener:r,once:!1}),this},t.prototype.prepend=function(t,r){if(!t||!r)return!1;if(!e(r))throw new Error("listener must be a function");this._events[t]=this._events[t]||[];var n="object"==typeof r;return this._events[t].unshift(n?r:{listener:r,once:!1}),this},t.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},t.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},t.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var n=0,i=r.length;n=4&&(a=e(a,i),i=[]);return i.length>0&&(a=e(a,i)),a.toString(16)};return function(){var n=String(screen.height*screen.width);n=n&&/\d{5,}/.test(n)?n.toString(16):String(31242*u()).replace(".","").slice(0,8);var i=e()+"-"+t()+"-"+r()+"-"+n+"-"+e();return i?i:(String(u())+String(u())+String(u())).slice(2,15)}}(),_r=function(e){this.ele=e},fr=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};_r.prototype={addClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")===-1&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1},attr:function(e,t){return"string"==typeof e&&d(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument,r=t.documentElement;return{top:e.top+window.pageYOffset-r.clientTop,left:e.left+window.pageXOffset-r.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),g(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!f(r))return null;for(var n=r.length-1;n>=0;n--){var i=r[n];if(t=i.style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return fr((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return fr(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return e=e&&11!==e.nodeType?e:null,g(e)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return g(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return g(e);return g(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),n=[],i=0;i0&&(e=e.concat($r.source_channel),e=ke(e)),w(e,function(e){t=R(location.href,e),t.length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=Lr.campaignParams(),n={},i={};return w(r,function(r,a,s){(" "+Or+" ").indexOf(" "+a+" ")!==-1?n[e+a]=s[a]:i[t+a]=s[a]}),{$utms:n,otherUtms:i}},properties:function(){var e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,r={$timezone_offset:(new Date).getTimezoneOffset(),$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$viewport_height:e,$viewport_width:t,$lib:"js",$lib_version:Tr};return r},currentProps:{},register:function(e){b(Lr.currentProps,e)}},Ur={get:function(e){return vr.get(e)},set:function(e,t,r,n){var i="";if(n="undefined"==typeof n?$r.cross_subdomain:n){var a=Oe(location.href);"url\u89e3\u6790\u5931\u8d25"===a&&(a=""),i=a?"; domain="+a:""}return vr.set(e,t,r,n,$r.set_cookie_samesite,$r.is_secure_cookie,i)},remove:function(e,t){return t="undefined"==typeof t?$r.cross_subdomain:t,vr.remove(e,t)},isSupport:function(e,t){return e=e||"sajssdk_2015_cookie_access_test",t=t||"1",vr.isSupport(e,t)}};Ur.getNewUser=ze;var Hr={data:{},get:function(e){var t=this.data[e];return void 0===t?null:void 0!==t._expirationTimestamp_?(new Date).getTime()>t._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var n,i=new Date;n="s"===String(r).slice(-1)?i.getTime()+1e3*Number(String(r).slice(0,-1)):i.getTime()+24*r*60*60*1e3,t={value:t,_expirationTimestamp_:n}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+$r.sdk_id+e}},Jr={checkIsAddSign:function(e){"track"===e.type&&(ze()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=Ur.get("sensorsdata2015jssdkcross"+lr.para.sdk_id);r=$e(r);var n={};null!=r&&ae(r)&&(n=JSON.parse(r),n.$device_id&&(t=n.$device_id)),t=t||e,lr.para.cross_subdomain===!0?lr.store.set("$device_id",t):(n.$device_id=t,n=JSON.stringify(n),lr.para.encrypt_cookie&&(n=je(n)),Ur.set("sensorsdata2015jssdkcross"+lr.para.sdk_id,n,null,!0)),lr.para.is_track_device_id&&(Lr.currentProps.$device_id=t)},storeInitCheck:function(){if(lr.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};Ur.isSupport()?Ur.set(Fe("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):Hr.set(Hr.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else ze()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=Lr.pageProp.url_domain,t={};""===e&&(e="url\u89e3\u6790\u5931\u8d25");var r=Je(document.referrer,!0);if(lr.para.preset_properties.search_keyword_baidu?Le(document.referrer)&&(!xe()||c(r)&&r.active?lr.store._state&&lr.store._state.props&&(lr.store._state.props.$search_keyword_id&&delete lr.store._state.props.$search_keyword_id,lr.store._state.props.$search_keyword_id_type&&delete lr.store._state.props.$search_keyword_id_type,lr.store._state.props.$search_keyword_id_hash&&delete lr.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=Er.id(),t.$search_keyword_id_type=Er.type(),t.$search_keyword_id_hash=Y(t.$search_keyword_id))):lr.store._state&&lr.store._state.props&&(lr.store._state.props.$search_keyword_id&&delete lr.store._state.props.$search_keyword_id,lr.store._state.props.$search_keyword_id_type&&delete lr.store._state.props.$search_keyword_id_type,lr.store._state.props.$search_keyword_id_hash&&delete lr.store._state.props.$search_keyword_id_hash),lr.store.save(),w(lr.para.preset_properties,function(r,n){if(n.indexOf("latest_")===-1)return!1;if(n=n.slice(7),r){if("wx_ad_click_id"===n&&"not_collect"===r)return!1;if("utm"!==n&&"url\u89e3\u6790\u5931\u8d25"===e)"wx_ad_click_id"===n?(t._latest_wx_ad_click_id="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_hash_key="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_callbacks="url\u7684domain\u89e3\u6790\u5931\u8d25"):t["$latest_"+n]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(Le(document.referrer))switch(n){case"traffic_source_type":t.$latest_traffic_source_type=Re();break;case"referrer":t.$latest_referrer=Lr.pageProp.referrer;break;case"search_keyword":Je()?t.$latest_search_keyword=Je():c(lr.store._state)&&c(lr.store._state.props)&&lr.store._state.props.$latest_search_keyword&&delete lr.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=F();break;case"wx_ad_click_id":var i=Be(location.href);t._latest_wx_ad_click_id=i.click_id,t._latest_wx_ad_hash_key=i.hash_key,t._latest_wx_ad_callbacks=i.callbacks}}else if("utm"===n&&lr.store._state&&lr.store._state.props)for(var a in lr.store._state.props)(0===a.indexOf("$latest_utm")||0===a.indexOf("_latest_")&&a.indexOf("_latest_wx_ad_")<0)&&delete lr.store._state.props[a];else if(lr.store._state&&lr.store._state.props&&"$latest_"+n in lr.store._state.props)delete lr.store._state.props["$latest_"+n];else if("wx_ad_click_id"==n&&lr.store._state&&lr.store._state.props&&r===!1){var s=["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"];w(s,function(e){e in lr.store._state.props&&delete lr.store._state.props[e]})}}),lr.register(t),lr.para.preset_properties.latest_utm){var n=Lr.campaignParamsStandard("$latest_","_latest_"),i=n.$utms,a=n.otherUtms;re(i)||lr.register(i),re(a)||lr.register(a)}}},Br={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={};e=e||this._state;var r=e._first_id||e.first_id,n=e._distinct_id||e.distinct_id;return r&&n?(t.login_id=n,t.anonymous_id=r):t.anonymous_id=n,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==lr.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=Ur.get("sensorsdata2015session");e=$e(e);var t=null;null!==e&&"object"==typeof(t=he(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&lr.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;b(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;j(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};r=t?e:b(this._state.props||{},e);for(var n in r)"string"==typeof r[n]&&(r[n]=r[n].slice(0,lr.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};j(t,e),this.set("props",t)},clearAllProps:function(e){this._sessionState={};var t;if(f(e)&&e.length>0)for(t=0;t$r.max_id_length)},keyLength:function(e){return!(!i(e)||e.length>$r.max_key_length)},stringLength:function(e){return!(!i(e)||e.length>$r.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(G(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(G(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=Br._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(G(this.bindReservedNames,e)>-1)}},qr={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Id"),_(Rr[r])&&Rr[r](t),"idLength"===r)||e}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="eventName"),_(Rr[r])&&Rr[r](t)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="Property key"),_(Rr[r])&&Rr[r](t)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(e,t,r){return e||(t="Property Value",_(Rr[r])&&Rr[r](t)),!0}},properties:function(e){return c(e)?w(e,function(e,t){We({propertyKey:t});var r=function(e,r,n){return e||(r=t+"'s Value",_(Rr[n])&&Rr[n](r)),!0};We({propertyValue:e},r)}):Mr.voidZero(e)&&Pe("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return void 0!==e&&c(e)&&!re(e)?this.properties.call(this,e):Pe("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_type"),_(Rr[r])&&Rr[r](t)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_id"),_(Rr[r])&&Rr[r](t)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="login_id_key"),_(Rr[r])&&Rr[r](t),"keyLength"===r)||e}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),_(Rr[r])&&Rr[r](t),"keyLength"===r)||e}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),_(Rr[r])&&Rr[r](t),"keyLength"===r)||e}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Value"),_(Rr[r])&&Rr[r](t),"idLength"===r)||e}},check:function(e,t,r){var n=this[e];if(_(n))return n.call(this,t);if(!n)return!1;for(var i=0;i-1)return n;if("area"===i&&"map"===a.tagName.toLowerCase()&&g(a).prev().tagName&&"img"===g(a).prev().tagName.toLowerCase())return g(a).prev();if("div"===i&&lr.para.heatmap.collect_tags.div&&r.isDivLevelValid(n)){var o=lr.para.heatmap&&lr.para.heatmap.collect_tags&&lr.para.heatmap.collect_tags.div&&lr.para.heatmap.collect_tags.div.max_level||1;if(o>1||r.isCollectableDiv(n))return n}if(r.isStyleTag(i)&&lr.para.heatmap.collect_tags.div){var l=r.getCollectableParent(n);if(l&&r.isDivLevelValid(l))return l}var c=r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)});return c||null},getDivLevels:function(e,t){var r=zr.getElementPath(e,!0,t),n=r.split(" > "),i=0;return w(n,function(e){"div"===e&&i++}),i},isDivLevelValid:function(e){for(var t=lr.para.heatmap&&lr.para.heatmap.collect_tags&&lr.para.heatmap.collect_tags.div&&lr.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),n=r.length-1;n>=0;n--)if(zr.getDivLevels(r[n],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var n=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){n.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){n.unshift(e.tagName.toLowerCase());break}if(e===document.body){n.unshift("body");break}n.unshift(e.tagName.toLowerCase()),e=e.parentNode}return n.join(" > ")},getClosestLi:function(e){var t=function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null};return t(e,"li")},getElementPosition:function(e,t,r){function n(e){var t=e.parentNode;if(!t)return"";var r=g(e).getSameTypeSiblings(),n=r.length;if(1===n)return 0;for(var i=0,a=e;g(a).previousElementSibling().ele;a=g(a).previousElementSibling().ele,i++);return i}var i=lr.heatmap.getClosestLi(e);if(!i)return null;var a=e.tagName.toLowerCase(),s=i.getElementsByTagName(a),o=s.length,l=[];if(o>1){for(var c=0;c1)return G(l,e)}return n(i)},setNotice:function(e){lr.is_heatmap_render_mode=!0,lr.para.heatmap||(lr.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(lr.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),lr.para.heatmap_url||(lr.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+lr.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,n=e.parentNode.children,i=0;i "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=Te({target:e});r.$element_selector=t?t:"",r.$element_path=lr.heatmap.getElementPath(e,lr.para.heatmap&&"not_use_id"===lr.para.heatmap.element_selector);var n=lr.heatmap.getElementPosition(e,r.$element_path,lr.para.heatmap&&"not_use_id"===lr.para.heatmap.element_selector);return se(n)&&(r.$element_position=n),r},getPointerEventProp:function(e,t){function r(){var e=document.body.scrollLeft||document.documentElement.scrollLeft||0,t=document.body.scrollTop||document.documentElement.scrollTop||0;return{scrollLeft:e,scrollTop:t}}function n(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function i(e){return Number(Number(e).toFixed(3))}function a(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+n(t).targetEleX||0,s=e.pageY||e.clientY+r().scrollTop||e.offsetY+n(t).targetEleY||0;return{$page_x:i(a),$page_y:i(s)}}return e?a(e):{}},start:function(e,t,r,n,i){var a=c(n)?n:{},s=_(i)?i:_(n)?n:void 0;if(lr.para.heatmap&&lr.para.heatmap.collect_element&&!lr.para.heatmap.collect_element(t))return!1;var o=this.getEleDetail(t);if(lr.para.heatmap&&lr.para.heatmap.custom_property){var l=lr.para.heatmap.custom_property(t);c(l)&&(o=b(o,l))}o=b(o,this.getPointerEventProp(e,t),a),"a"===r&&lr.para.heatmap&&lr.para.heatmap.isTrackLink===!0?lr.trackLink({event:e,target:t},"$WebClick",o):lr.track("$WebClick",o,s)},hasElement:function(e,t){var r;if(e.event){var n=e.event;r=n.path||n._getPath&&n._getPath()}else e.element&&(r=g(e.element).getParents());if(r&&f(r)&&r.length>0)for(var i=0;i-1)&&(!t||lr.para.heatmap&&lr.para.heatmap.collect_tags&&lr.para.heatmap.collect_tags.div?!!(c(lr.para.heatmap)&&c(lr.para.heatmap.collect_tags)&&c(lr.para.heatmap.collect_tags.div)&&f(lr.para.heatmap.collect_tags.div.ignore_tags)&&G(lr.para.heatmap.collect_tags.div.ignore_tags,e)>-1):G(n,e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(n,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(a){lr.log(a)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,n=r?r.tagName.toLowerCase():"";if("body"===n)return!1;var i=lr.para&&lr.para.heatmap&&lr.para.heatmap.collect_tags&&lr.para.heatmap.collect_tags.div&&lr.para.heatmap.collect_tags.div.max_level;if(n&&"div"===n&&(i>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(n,t))return this.getCollectableParent(r,t)}catch(a){lr.log(a)}return!1},listenUrlChange:function(e){e(),lr.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!c(lr.para.heatmap)||"default"!==lr.para.heatmap.scroll_notice_map)return!1;var e=!0;lr.para.scrollmap&&_(lr.para.scrollmap.collect_url)&&this.listenUrlChange(function(){e=!!lr.para.scrollmap.collect_url()});var t=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t},r=t({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,n=new Date,i=n-this.current_time;(i>lr.para.heatmap.scroll_delay_time&&r-e.$viewport_position!==0||t)&&(e.$url=F(),e.$title=document.title,e.$url_path=z(),e.event_duration=Math.min(lr.para.heatmap.scroll_event_duration,parseInt(i)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,lr.track("$WebStay",e)),this.current_time=n}});r.current_time=new Date,Ve(window,"scroll",function(){return!!e&&void r.go()}),Ve(window,"unload",function(){return!!e&&void r.go("notime")})},initHeatmap:function(){var e=this,t=!0;return!(!c(lr.para.heatmap)||"default"!==lr.para.heatmap.clickmap)&&(_(lr.para.heatmap.collect_url)&&this.listenUrlChange(function(){t=!!lr.para.heatmap.collect_url()}),"all"===lr.para.heatmap.collect_elements?lr.para.heatmap.collect_elements="all":lr.para.heatmap.collect_elements="interact",void("all"===lr.para.heatmap.collect_elements?Ve(document,"click",function(r){if(!t)return!1;var n=r||window.event;if(!n)return!1;var i=n.target||n.srcElement;if("object"!=typeof i)return!1;if("string"!=typeof i.tagName)return!1;var a=i.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!i||!i.parentNode||!i.parentNode.children)return!1;var s=i.parentNode.tagName.toLowerCase();"a"===s||"button"===s?e.start(n,i.parentNode,s):e.start(n,i,a)}):Ve(document,"click",function(r){if(!t)return!1;var n=r||window.event;if(!n)return!1;var i=n.target||n.srcElement,a=lr.heatmap.getTargetElement(i,r);a?e.start(n,a,a.tagName.toLowerCase()):p(i)&&"div"===i.tagName.toLowerCase()&&c(lr.para.heatmap)&&lr.para.heatmap.get_vtrack_config&&lr.unlimitedDiv.events.length>0&&lr.unlimitedDiv.isTargetEle(i)&&e.start(n,i,i.tagName.toLowerCase(),{$lib_method:"vtrack"})})))}},Wr={setOnlineState:function(e){if(e===!0&&c(lr.para.jsapp)&&"function"==typeof lr.para.jsapp.getData){lr.para.jsapp.isOnline=!0;var t=lr.para.jsapp.getData();f(t)&&t.length>0&&w(t,function(e){ae(e)&&lr.sendState.realtimeSend(JSON.parse(e))})}else lr.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return Lr.campaignParams()},getStayTime:function(){return(new Date-lr._t)/1e3},setProfileLocal:function(e){if(!wr.isSupport())return lr.setProfile(e),!1;if(!c(e)||re(e))return!1;var t=lr.store.readObjectVal("sensorsdata_2015_jssdk_profile"),r=!1;if(c(t)&&!re(t)){for(var n in e)!(n in t&&t[n]!==e[n])&&n in t||(t[n]=e[n],r=!0);r&&(lr.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),lr.setProfile(e))}else lr.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),lr.setProfile(e)},setInitReferrer:function(){var e=Ue();lr.setOnceProfile({_init_referrer:e,_init_referrer_host:Lr.pageProp.referrer_host})},setSessionReferrer:function(){var e=Ue();lr.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:Lr.pageProp.referrer_host})},setDefaultAttr:function(){Lr.register({_current_url:location.href,_referrer:Ue(),_referring_host:Lr.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase(),i=e.parentNode.tagName.toLowerCase(),a=lr.para.heatmap&&lr.para.heatmap.track_attr?lr.para.heatmap.track_attr:["data-sensors-click"];"button"===n||"a"===n||"a"===i||"button"===i||"input"===n||"textarea"===n||X(e,a)||zr.start(null,e,n,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase();zr.start(null,e,n,t,r)}},autoTrackSinglePage:function(e,t){function r(){var e=Lr.campaignParams(),t={};return w(e,function(e,r,n){(" "+lr.source_channel_standard+" ").indexOf(" "+r+" ")!==-1?t["$"+r]=n[r]:t[r]=n[r]}),t}function n(e,t){lr.track("$pageview",b({$referrer:a,$url:F(),$url_path:z(),$title:document.title},e,r()),t),a=F()}var a;a=this.autoTrackIsUsed?Lr.pageProp.url:Lr.pageProp.referrer,e=c(e)?e:{};var s=!e.not_set_profile;if(e.not_set_profile&&delete e.not_set_profile,n(e,t),this.autoTrackSinglePage=n,lr.is_first_visitor&&s){var o={};lr.para.preset_properties.search_keyword_baidu&&Le(document.referrer)&&xe()&&(o.$search_keyword_id=Er.id(),o.$search_keyword_id_type=Er.type(),o.$search_keyword_id_hash=Y(o.$search_keyword_id)),lr.setOnceProfile(b({$first_visit_time:new Date,$first_referrer:Ue(),$first_browser_language:i(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Re(),$first_search_keyword:Je()},r(),o)),lr.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=c(e)?e:{},this.autoTrack(b(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=c(e)?e:{};var r=Lr.campaignParams(),n={};w(r,function(e,t,r){(" "+lr.source_channel_standard+" ").indexOf(" "+t+" ")!==-1?n["$"+t]=r[t]:n[t]=r[t]});var a=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var s=location.href;if(lr.para.is_single_page&&v(function(){var r=Ue(s,!0);lr.track("$pageview",b({$referrer:r,$url:F(),$url_path:z(),$title:document.title},n,e),t),s=F()}),lr.track("$pageview",b({$referrer:Ue(null,!0),$url:F(),$url_path:z(),$title:document.title},n,e),t),lr.is_first_visitor&&a){var o={};lr.para.preset_properties.search_keyword_baidu&&Le(document.referrer)&&xe()&&(o.$search_keyword_id=Er.id(),o.$search_keyword_id_type=Er.type(),o.$search_keyword_id_hash=Y(o.$search_keyword_id)),lr.setOnceProfile(b({$first_visit_time:new Date,$first_referrer:Ue(null,!0),$first_browser_language:i(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Re(),$first_search_keyword:Je()},n,o)),lr.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return re(lr.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":lr.store._state._first_id||lr.store._state.first_id||lr.store._state._distinct_id||lr.store._state.distinct_id},setPlugin:function(e){return!!c(e)&&void w(e,function(e,t){_(e)&&(c(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[t]?e(window.SensorsDataWebJSSDKPlugin[t]):lr.log(t+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+t+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"))})},useModulePlugin:function(){lr.use.apply(lr,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}},Xr={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}},Zr={__proto__:null,addReferrerHost:Xe,addPropsHook:Ze,initPara:Ye,setInitVar:Qe,enableLocalLog:et,disableLocalLog:tt,quick:rt,use:nt,track:it,bind:at,unbind:st,trackLink:ot,trackLinks:lt,setItem:ct,deleteItem:ut,setProfile:pt,setOnceProfile:dt,appendProfile:_t,incrementProfile:ft,deleteProfile:gt,unsetProfile:ht,identify:mt,trackSignup:yt,registerPage:wt,clearAllRegister:bt,clearPageRegister:St,register:kt,registerOnce:Pt,registerSession:Nt,registerSessionOnce:$t,login:Ct,loginWithKey:At,logout:Dt,getPresetProperties:Ot,iOSWebClickPolyfill:Tt,readyState:Xr,para_default:jr,log:Pe,debug:Dr,IDENTITY_KEY:Ir},Yr=function(){this._events=[],this.pendingEvents=[]};Yr.prototype={emit:function(e){var t=[].slice.call(arguments,1);w(this._events,function(r){r.type===e&&r.callback.apply(r.context,t)}),this.pendingEvents.push({type:e,data:t}),this.pendingEvents.length>20?this.pendingEvents.shift():null},on:function(e,t,r,n){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),n=n!==!1,this.pendingEvents.length>0&&n&&w(this.pendingEvents,function(n){n.type===e&&t.apply(r,n.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var Gr={__proto__:null,parseSuperProperties:Ce,searchConfigData:Ae,strip_empty_properties:De,getCurrentDomain:Oe,getEleInfo:Te,isBaiduTraffic:xe, -getReferrerEqid:Ie,getReferrerEqidType:Ee,getBaiduKeyword:Er,isReferralTraffic:Le,getReferrer:Ue,getKeywordFromReferrer:Je,getWxAdIdFromUrl:Be,getReferSearchEngine:He,getSourceFromReferrer:Re,info:Lr,ajax:Ke,getElementContent:qe,cookie:Ur,addEvent:Ve,EventEmitterSa:Yr,encrypt:je,decryptIfNeeded:$e},Qr={};Qr.buildData=function(e){var t={identities:{},distinct_id:lr.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(lr.lib_version)},properties:{}};return c(e)&&c(e.identities)&&!re(e.identities)?b(t.identities,e.identities):b(t.identities,Br._state.identities),c(e)&&c(e.properties)&&!re(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),b(t,lr.store.getUnionId(),e),Kr.stage.process("addCustomProps",t),c(e.properties)&&!re(e.properties)&&b(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=b({},Lr.properties(),Br.getProps(),Br.getSessionProps(),Lr.currentProps,t.properties),lr.para.preset_properties.latest_referrer&&!i(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),lr.para.preset_properties.latest_search_keyword&&!i(t.properties.$latest_search_keyword)&&(lr.para.preset_properties.search_keyword_baidu&&i(t.properties.$search_keyword_id)&&se(t.properties.$search_keyword_id_hash)&&i(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),lr.para.preset_properties.latest_traffic_source_type&&!i(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),lr.para.preset_properties.latest_landing_page&&!i(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===lr.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id,delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):lr.para.preset_properties.latest_wx_ad_click_id&&!i(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),i(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=F())),t.properties.$time&&D(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,lr.vtrackBase.addCustomProps(t),Ce(t),Jr.checkIsAddSign(t),Jr.checkIsFirstTime(t),lr.addReferrerHost(t),lr.addPropsHook(t),Kr.stage.process("formatData",t),t},Qr.sendData=function(e,t){var r=Ae(e.properties);lr.para.debug_mode===!0?(lr.log(e),lr.saEvent.debugPath(JSON.stringify(e),t)):lr.sendState.getSendCall(e,r,t)},Qr.encodeTrackData=function(e){var t=N(e),r="crc="+Z(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)};var en=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,lr.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=xt(e.server_url,e.data)};en.prototype.start=function(){var e=this;lr.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},en.prototype.lastClear=function(){var e=V();void 0!==e.ie?this.img.src="about:blank":this.img.src=""};var tn=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=It(e.data)};tn.prototype.start=function(){var e=this;Ke({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:lr.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var rn=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=It(e.data)};rn.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var nn={};nn.getSendCall=function(e,t,r){if(lr.is_heatmap_render_mode)return!1;if(lr.readyState.state<3)return lr.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(u()).slice(2,5)+String(u()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var n=e;e=JSON.stringify(e);var i={data:n,config:t,callback:r};return lr.events.tempAdd("send",n),!lr.para.app_js_bridge&&lr.para.batch_send&&localStorage.length<200?(lr.log(n),lr.batchSend.add(i.data),!1):("item_set"===n.type||"item_delete"===n.type?this.prepareServerUrl(i):lr.bridge.dataSend(i,this,r),void lr.log(n))},nn.prepareServerUrl=function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(f(lr.para.server_url)&&lr.para.server_url.length)for(var t=0;t0&&--this.sendingData,f(e)&&e.length>0&&w(e,function(e){wr.remove(e)})},send:function(e){var t,r=this;return i(lr.para.server_url)&&""!==lr.para.server_url||f(lr.para.server_url)&&lr.para.server_url.length?(t=f(lr.para.server_url)?lr.para.server_url[0]:lr.para.server_url,void Ke({url:t,type:"POST",data:"data_list="+encodeURIComponent(N(JSON.stringify(e.vals))),credentials:!1,timeout:lr.para.batch_send.datasend_timeout,cors:!0,success:function(){r.remove(e.keys),r.removePendingItems(e.keys)},error:function(){r.sendingData>0&&--r.sendingData,r.removePendingItems(e.keys)}})):void lr.log("\u5f53\u524d server_url \u4e3a\u7a7a\u6216\u4e0d\u6b63\u786e\uff0c\u53ea\u5728\u63a7\u5236\u53f0\u6253\u5370\u65e5\u5fd7\uff0cnetwork \u4e2d\u4e0d\u4f1a\u53d1\u6570\u636e\uff0c\u8bf7\u914d\u7f6e\u6b63\u786e\u7684 server_url\uff01")},appendPendingItems:function(e){if(f(e)!==!1){this.sendingItemKeys=ke(this.sendingItemKeys.concat(e));try{var t=this.getPendingItems(),r=ke(t.concat(e));lr.store.saveObjectVal("sawebjssdk-sendingitems",r)}catch(n){}}},removePendingItems:function(e){if(f(e)!==!1){this.sendingItemKeys.length&&(this.sendingItemKeys=I(this.sendingItemKeys,function(t){return G(e,t)===-1}));try{var t=this.getPendingItems(),r=I(t,function(t){return G(e,t)===-1});lr.store.saveObjectVal("sawebjssdk-sendingitems",r)}catch(n){}}},getPendingItems:function(){return lr.store.readObjectVal("sawebjssdk-sendingitems")||[]},sendPrepare:function(e){this.appendPendingItems(e.keys);var t=e.vals,r=t.length;r>0&&this.send({keys:e.keys,vals:t})},sendStrategy:function(){if(document.hasFocus()===!1)return!1;var e=this.readStore();e.keys.length>0&&0===this.sendingData&&(this.sendingData=1,this.sendPrepare(e))},batchInterval:function(){var e=this;setInterval(function(){e.sendStrategy()},lr.para.batch_send.send_interval)},readStore:function(){for(var e=[],t=[],r=null,n=(new Date).getTime(),i=localStorage.length,a=this.getPendingItems(),s=0;s-1)continue;r=lr.store.readObjectVal(o),r?r&&c(r)?(r._flush_time=n,e.push(o),t.push(r)):(localStorage.removeItem(o),lr.log("localStorage-\u6570\u636eparse\u5f02\u5e38"+r)):(localStorage.removeItem(o),lr.log("localStorage-\u6570\u636e\u53d6\u503c\u5f02\u5e38"+r))}}return{keys:e,vals:t}},writeStore:function(e){var t=String(u()).slice(2,5)+String(u()).slice(2,5)+String((new Date).getTime()).slice(3);lr.store.saveObjectVal("sawebjssdk-"+t,e)}};var an=new Ht,sn={bridge_info:{touch_app_bridge:!1,verify_success:!1,platform:""},is_verify_success:!1,initPara:function(){var e={is_send:!0,white_list:[],is_mui:!1};"object"==typeof lr.para.app_js_bridge?lr.para.app_js_bridge=b({},e,lr.para.app_js_bridge):lr.para.use_app_track===!0||lr.para.app_js_bridge===!0||"only"===lr.para.use_app_track?(lr.para.use_app_track_is_send!==!1&&"only"!==lr.para.use_app_track||(e.is_send=!1),lr.para.app_js_bridge=b({},e)):"mui"===lr.para.use_app_track&&(e.is_mui=!0,lr.para.app_js_bridge=b({},e)),lr.para.app_js_bridge.is_send===!1&&lr.log("\u8bbe\u7f6e\u4e86 is_send:false,\u5982\u679c\u6253\u901a\u5931\u8d25\uff0c\u6570\u636e\u5c06\u88ab\u4e22\u5f03\uff01")},initState:function(){function e(e){function t(e){var t={hostname:"",project:""};try{t.hostname=l(e).hostname,t.project=l(e).searchParams.get("project")||"default"}catch(r){lr.log(r)}return t}var r=t(e),n=t(lr.para.server_url);if(r.hostname===n.hostname&&r.project===n.project)return!0;if(lr.para.app_js_bridge.white_list.length>0)for(var i=0;i"),r=a(t.pop());if("div"!==r.slice(0,3))return!1}return!0},ln.configIsMatchNew=function(e,t){if(i(e.$element_selector)&&i(t.element_selector)){if("element_selector"===t.element_field&&"equal"===t["function"])return e.$element_selector===t.element_selector;if("element_selector"===t.element_field&&"contain"===t["function"])return e.$element_selector.indexOf(t.element_selector)>-1}if(i(e.$element_path)&&i(t.element_path)){if("element_path"===t.element_field&&"equal"===t["function"])return e.$element_path===t.element_path;if("element_path"===t.element_field&&"contain"===t["function"])return e.$element_path.indexOf(t.element_path)>-1}return!1},ln.configIsMatch=function(e,t){return(!t.limit_element_content||t.element_content===e.$element_content)&&((!t.limit_element_position||t.element_position===String(e.$element_position))&&(t.element_field&&t["function"]?ln.configIsMatchNew(e,t):ln.configIsMatchOldVersion(e,t)))},ln.configIsMatchOldVersion=function(e,t){if(!t.element_path)return!1;if(void 0!==e.$element_position){if(t.element_path!==e.$element_path)return!1}else if(lr.vtrackBase.isDiv({element_path:t.element_path})){if(e.$element_path.indexOf(t.element_path)<0)return!1}else if(t.element_path!==e.$element_path)return!1;return!0},ln.filterConfig=function(e,t,r){var n=[];if(!r){var i=ln.initUrl();if(!i)return[];r=i.page_url}return"$WebClick"===e.event&&w(t,function(t){c(t)&&("webclick"===t.event_type||"appclick"===t.event_type)&&c(t.event)&&t.event.url_host===r.host&&t.event.url_path===r.pathname&&ln.configIsMatch(e.properties,t.event)&&n.push(t)}),n},ln.getPropElInLi=function(e,t){if(!(e&&p(e)&&i(t)))return null;if("li"!==e.tagName.toLowerCase())return null;var r,n=lr.heatmap.getDomSelector(e);if(n){r=n+t;var a=U(r);return a?a:null}return lr.log("----custom---\u83b7\u53d6\u540c\u7ea7\u5c5e\u6027\u5143\u7d20\u5931\u8d25\uff0cselector\u4fe1\u606f\u5f02\u5e38",n,t),null},ln.getProp=function(e,t){if(!c(e))return!1;if(!(i(e.name)&&e.name.length>0))return lr.log("----vcustom----\u5c5e\u6027\u540d\u4e0d\u5408\u6cd5,\u5c5e\u6027\u629b\u5f03",e.name),!1;var r,n,a={};if("content"===e.method){var s;if(i(e.element_selector)&&e.element_selector.length>0)s=U(e.element_selector);else{if(!t||!i(e.list_selector))return lr.log("----vcustom----\u5c5e\u6027\u914d\u7f6e\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var o=U(t.properties.$element_selector);if(!o)return lr.log("----vcustom----\u70b9\u51fb\u5143\u7d20\u83b7\u53d6\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var l=lr.heatmap.getClosestLi(o);s=ln.getPropElInLi(l,e.list_selector)}if(!s||!p(s))return lr.log("----vcustom----\u5c5e\u6027\u5143\u7d20\u83b7\u53d6\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;if("input"===s.tagName.toLowerCase())r=s.value||"";else if("select"===s.tagName.toLowerCase()){var u=s.selectedIndex;se(u)&&p(s[u])&&(r=qe(s[u],"select"))}else r=qe(s,s.tagName.toLowerCase());if(e.regular){try{n=new RegExp(e.regular).exec(r)}catch(d){return lr.log("----vcustom----\u6b63\u5219\u5904\u7406\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1}if(null===n)return lr.log("----vcustom----\u5c5e\u6027\u89c4\u5219\u5904\u7406\uff0c\u672a\u5339\u914d\u5230\u7ed3\u679c,\u5c5e\u6027\u629b\u5f03",e.name),!1;if(!f(n)||!i(n[0]))return lr.log("----vcustom----\u6b63\u5219\u5904\u7406\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name,n),!1;r=n[0]}if("STRING"===e.type)a[e.name]=r;else if("NUMBER"===e.type){if(r.length<1)return lr.log("----vcustom----\u672a\u83b7\u53d6\u5230\u6570\u5b57\u5185\u5bb9\uff0c\u5c5e\u6027\u629b\u5f03",e.name,r),!1;if(isNaN(Number(r)))return lr.log("----vcustom----\u6570\u5b57\u7c7b\u578b\u5c5e\u6027\u8f6c\u6362\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name,r),!1;a[e.name]=Number(r)}return a}return lr.log("----vcustom----\u5c5e\u6027\u4e0d\u652f\u6301\u6b64\u83b7\u53d6\u65b9\u5f0f",e.name,e.method),!1},ln.getAssignConfigs=function(e,t){var r=ln.initUrl();if(!r||!r.page_url)return[];if(!c(t))return[];var n=[];return t.events=t.events||t.eventList,f(t.events)&&t.events.length>0?(w(t.events,function(t){c(t)&&c(t.event)&&t.event.url_host===r.page_url.host&&t.event.url_path===r.page_url.pathname&&e(t)&&n.push(t)}),n):[]},ln.addCustomProps=function(e){if("success"===lr.bridge.bridge_info.verify_success){var t=lr.vapph5collect.customProp.geth5Props(JSON.parse(JSON.stringify(e)));c(t)&&!re(t)&&(e.properties=b(e.properties,t))}var r=lr.vtrackcollect.customProp.getVtrackProps(JSON.parse(JSON.stringify(e)));return c(r)&&!re(r)&&(e.properties=b(e.properties,r)),e},ln.init=function(){lr.vtrackcollect.init(),"success"===lr.bridge.bridge_info.verify_success&&lr.vapph5collect.init()};var cn={events:[],init:function(e){this.filterWebClickEvents(e)},filterWebClickEvents:function(e){this.events=lr.vtrackcollect.getAssignConfigs(function(e){return!(!c(e)||e.event.unlimited_div!==!0||"webclick"!==e.event_type)},e)},isTargetEle:function(e){var t=lr.heatmap.getEleDetail(e);if(!c(t)||!i(t.$element_path))return!1;for(var r=0;r0)},e),this.events.length?this.configSwitch=!0:this.configSwitch=!1},getVtrackProps:function(e){var t={};return this.collectAble()?("$WebClick"===e.event&&(t=this.clickCustomPropMaker(e,this.events)),t):{}},clickCustomPropMaker:function(e,t,r){var n=this;r=r||this.filterConfig(e,t,lr.vtrackcollect.url_info.page_url);var i={};return r.length?(w(r,function(t){f(t.properties)&&t.properties.length>0&&w(t.properties,function(t){var r=n.getProp(t,e);c(r)&&b(i,r)})}),i):{}},getProp:ln.getProp,getPropElInLi:ln.getPropElInLi,filterConfig:ln.filterConfig},pn={unlimitedDiv:cn,config:{},storageEnable:!0,storage_name:"webjssdkvtrackcollect",para:{session_time:18e5,timeout:5e3,update_interval:18e5},url_info:{},timer:null,update_time:null,customProp:un,initUrl:function(){var e=ln.initUrl();if(e){var t;try{t=new s(lr.para.server_url),t._values.Path="/config/visualized/Web.conf",e.api_url=t.getUrl()}catch(r){return lr.log("----vtrackcollect---API\u5730\u5740\u89e3\u6790\u5f02\u5e38",r),!1}this.url_info=e}return e},init:function(){if(!c(lr.para.heatmap)||!lr.para.heatmap.get_vtrack_config)return!1;if(wr.isSupport()||(this.storageEnable=!1),!this.initUrl())return lr.log("----vtrackcustom----\u521d\u59cb\u5316\u5931\u8d25\uff0curl\u4fe1\u606f\u89e3\u6790\u5931\u8d25"),!1;if(this.storageEnable){var e=lr.store.readObjectVal(this.storage_name);if(c(e)&&c(e.data))if(this.serverUrlIsSame(e.serverUrl)){this.config=e.data,this.update_time=e.updateTime,this.updateConfig(e.data);var t=(new Date).getTime(),r=t-this.update_time;if(se(r)&&r>0&&r0&&r0&&w(a.properties,function(r){if(c(r))if(r.h5===!1)f(t.sensorsdata_app_visual_properties)||(t.sensorsdata_app_visual_properties=[]),t.sensorsdata_app_visual_properties.push(r);else{var i=n.getProp(r,e);c(i)&&(t=b(t,i))}}),i(a.event_name)&&r.push(a.event_name))}),c(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode===!0||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode())&&(t.sensorsdata_web_visual_eventName=r)}return t.sensorsdata_app_visual_properties&&(t.sensorsdata_app_visual_properties=N(JSON.stringify(t.sensorsdata_app_visual_properties))),t},initAppGetPropsBridge:function(){var e=this;return new lr.JSBridge({type:"getJSVisualProperties",app_call_js:function(t){var r={};try{t=JSON.parse(P(t))}catch(n){lr.log("getJSVisualProperties data parse error!")}if(c(t)){var i=t.sensorsdata_js_visual_properties,a=e.initUrl();a&&(a=a.page_url,f(i)&&i.length>0&&w(i,function(t){if(c(t)&&t.url_host===a.host&&t.url_path===a.pathname&&t.h5){var n=e.getProp(t);c(n)&&(r=b(r,n))}}))}var s=lr.bridge.bridge_info.platform;if("android"===s){var o={callType:"getJSVisualProperties",data:r};c(t)&&t.message_id&&(o.message_id=t.message_id),c(window.SensorsData_APP_New_H5_Bridge)&&_(SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app)?SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app(JSON.stringify(o)):c(window.SensorsData_APP_JS_Bridge)&&_(SensorsData_APP_JS_Bridge.sensorsdata_js_call_app)&&SensorsData_APP_JS_Bridge.sensorsdata_js_call_app(JSON.stringify(o))}return r}})}},_n={events:[],customProp:dn,getAssignConfigs:ln.getAssignConfigs,initUrl:ln.initUrl,init:function(){if(this.initUrl()){var e=this.getConfigFromApp();e&&this.updateConfigs(e),this.customProp.init(),this.initAppUpdateConfigBridge()}},initAppUpdateConfigBridge:function(){var e=this;return new lr.JSBridge({type:"updateH5VisualConfig",app_call_js:function(t){if(t){try{t=JSON.parse(P(t))}catch(r){return void lr.log("updateH5VisualConfig result parse error\uff01")}e.updateConfigs(t)}}})},getConfigFromApp:function(){var e=new lr.JSBridge({type:"sensorsdata_get_app_visual_config"}),t=e.getAppData();if(t)try{t=JSON.parse(P(t))}catch(r){t=null,lr.log("getAppVisualConfig result parse error\uff01")}return t},updateConfigs:function(e){this.events=this.filterConfigs(e),this.customProp.updateEvents(this.events)},filterConfigs:function(e){return this.getAssignConfigs(function(e){return!(!c(e)||e.h5===!1)},e)}},fn=new t,gn={};gn.spa=fn,gn.initSystemEvent=function(){Jt(function(e){fn.emit("switch",e)})};var hn={getOriginalUrl:function(){function e(e){var t=e.split("&"),r=["sa-request-id","sa-request-type","sa-request-url"],n=[];return w(t,function(e){r.indexOf(e.split("=")[0])<0&&n.push(e)}),n.join("&")}var t=location.protocol+"//"+location.host+location.pathname,r="",n="";if(location.search){var i=e(location.search.slice(1));i&&(r="?"+i)}if(location.hash&&(n=location.hash,location.hash.indexOf("?")>-1)){var a=location.hash.split("?"),s=e(a[1]);s&&(n=a[0]+"?"+s)}return decodeURI(t+r+n)},isSeachHasKeyword:function(){return null!==Bt("sa-request-id")&&("string"==typeof sessionStorage.getItem("sensors-visual-mode")&&sessionStorage.removeItem("sensors-visual-mode"),!0)},hasKeywordHandle:function(){var e=Bt("sa-request-id"),t=Bt("sa-request-type"),r=Bt("sa-request-url");zr.setNotice(r),br.isSupport()&&(null!==r&&sessionStorage.setItem("sensors_heatmap_url",r),sessionStorage.setItem("sensors_heatmap_id",e),null!==t?"1"===t||"2"===t||"3"===t?sessionStorage.setItem("sensors_heatmap_type",t):t=null:t=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),this.isReady(e,t,this.getOriginalUrl())},isReady:function(e,t,r){lr.para.heatmap_url?pe({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(lr,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(lr.heatmap_version&&lr.heatmap_version===lr.lib_version||console.log("heatmap.js\u4e0esensorsdata.js\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669!")))},0)},error:function(){},type:"js",url:lr.para.heatmap_url}):lr.log("\u6ca1\u6709\u6307\u5b9aheatmap_url\u7684\u8def\u5f84")},isStorageHasKeyword:function(){return br.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")},storageHasKeywordHandle:function(){zr.setNotice(),hn.isReady(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),this.getOriginalUrl()); -}},mn={isStorageHasKeyword:function(){return br.isSupport()&&"string"==typeof sessionStorage.getItem("sensors-visual-mode")},isSearchHasKeyword:function(){return(Bt("sa-visual-mode")===!0||"true"===Bt("sa-visual-mode"))&&("string"==typeof sessionStorage.getItem("sensors_heatmap_id")&&sessionStorage.removeItem("sensors_heatmap_id"),!0)},loadVtrack:function(){pe({success:function(){},error:function(){},type:"js",url:lr.para.vtrack_url?lr.para.vtrack_url:location.protocol+"//static.sensorsdata.cn/sdk/"+lr.lib_version+"/vtrack.min.js"})},messageListener:function(e){function t(e){return ne(e)?_e(e):(lr.log("\u53ef\u89c6\u5316\u6a21\u5f0f\u68c0\u6d4b URL \u5931\u8d25"),!1)}if("sa-fe"!==e.data.source)return!1;if("v-track-mode"===e.data.type){if(e.data.data&&e.data.data.isVtrack)if(br.isSupport()&&sessionStorage.setItem("sensors-visual-mode","true"),e.data.data.userURL&&location.href.match(/sa-visual-mode=true/)){var r=t(e.data.data.userURL);r&&(window.location.href=r)}else mn.loadVtrack();window.removeEventListener("message",mn.messageListener,!1)}},removeMessageHandle:function(){window.removeEventListener&&window.removeEventListener("message",mn.messageListener,!1)},verifyVtrackMode:function(){window.addEventListener&&window.addEventListener("message",mn.messageListener,!1),mn.postMessage()},postMessage:function(){window.parent&&window.parent.postMessage&&window.parent.postMessage({source:"sa-web-sdk",type:"v-is-vtrack",data:{sdkversion:"1.22.3"}},"*")},notifyUser:function(){var e=function(t){return"sa-fe"===t.data.source&&void("v-track-mode"===t.data.type&&(t.data.data&&t.data.data.isVtrack&&alert("\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\uff0c\u8bf7\u5347\u7ea7\u90e8\u7f72\u795e\u7b56\u6570\u636e\u6cbb\u7406"),window.removeEventListener("message",e,!1)))};window.addEventListener&&window.addEventListener("message",e,!1),mn.postMessage()}},vn=["setItem","deleteItem","getAppStatus","track","quick","register","registerPage","registerOnce","trackSignup","setProfile","setOnceProfile","appendProfile","incrementProfile","deleteProfile","unsetProfile","identify","login","logout","trackLink","clearAllRegister","clearPageRegister"],yn={track:function(e,t,r){},quick:function(e,t,r,n){},register:function(e){},registerPage:function(e){},registerOnce:function(e){},clearAllRegister:function(e){},trackSignup:function(e,t,r,n){},setProfile:function(e,t){},setOnceProfile:function(e,t){},appendProfile:function(e,t){},incrementProfile:function(e,t){},deleteProfile:function(e){},unsetProfile:function(e,t){},identify:function(e,t){},login:function(e,t){},logout:function(e){},trackLink:function(e,t,r){},deleteItem:function(e,t){},setItem:function(e,t,r){},getAppStatus:function(e){},clearPageRegister:function(e){}};Xt.prototype.process=function(e,t){if(!(e&&e in this.processDef))return void Pe("process ["+e+"] is not supported");var r=this.registeredInterceptors[e];if(r&&f(r)&&r.length>0)for(var n={current:0,total:r.length},i=new Wt(t,n,lr),a=0;a=n.length:n.push(a);break;default:n.splice(i,0,a)}}}};var wn={addCustomProps:null,formatData:null},bn=new Xt(wn),Sn={init:function(){},interceptor:{formatData:{priority:0,entry:function(e){return ar(e),e}}}},kn=window.sensors_data_pre_config,Pn=!!c(kn)&&kn.is_compliance_enabled;lr.init=function(e){return!(lr.readyState&&lr.readyState.state&&lr.readyState.state>=2)&&(Pn&&or(!0),lr.ee.initSystemEvent(),lr.setInitVar(),lr.readyState.setState(2),lr.initPara(e),lr.bridge.supportAppCallJs(),lr.detectMode(),void lr.iOSWebClickPolyfill())},Pn?or(!1):(or(!0),Ft());var Nn=lr;try{lr.modules={},"string"==typeof window.sensorsDataAnalytic201505?(lr.para=window[sensorsDataAnalytic201505].para,lr._q=window[sensorsDataAnalytic201505]._q,window[sensorsDataAnalytic201505]=lr,window.sensorsDataAnalytic201505=lr,lr.init()):"undefined"==typeof window.sensorsDataAnalytic201505?window.sensorsDataAnalytic201505=lr:Nn=window.sensorsDataAnalytic201505}catch($n){if("object"==typeof console&&console.log)try{console.log($n)}catch(jn){lr.log(jn)}}var Cn=Nn;return Cn}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():t()}(this,function(){function e(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function t(){return Date.now&&e(Date.now)?Date.now():(new Date).getTime()}function r(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function i(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),r(e)&&e.getRandomValues){var t=new Uint32Array(1),i=e.getRandomValues(t)[0],n=Math.pow(2,32);return i/n}}return _r(1e19)/1e19}function n(e){var t=null;try{t=JSON.parse(e)}catch(r){}return t}function a(e,t){this.lockGetPrefix=e||"lock-get-prefix",this.lockSetPrefix=t||"lock-set-prefix"}function s(e){return"function"==typeof e||!(!e||"object"!=typeof e)&&s(e.listener)}function l(){this._events={}}function c(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function u(e){e=e||"";for(var t={},r=e.substring(1),i=r.split("&"),n=0;n Invalid URL");var r=e.split("#"),i=r[0],n=r.slice(1).join("#");t=this._regex.exec(i);for(var a in this._fields)"undefined"!=typeof t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=n},new t(e)}function f(e){var t={},r=function(){var e;try{return e=new URL("http://modernizr.com/"),"http://modernizr.com/"===e.href}catch(t){return!1}};if("function"==typeof window.URL&&r())t=new URL(e),t.searchParams||(t.searchParams=function(){var e=u(t.search);return{get:function(t){return e[t]}}}());else{p(e)||(e=String(e)),e=d(e);var i=/^https?:\/\/.+/;if(i.test(e)===!1)return void pr.log("Invalid URL");var n=_(e);t.hash=n._values.Fragment,t.host=n._values.Host?n._values.Host+(n._values.Port?":"+n._values.Port:""):"",t.href=n._values.URL,t.password=n._values.Password,t.pathname=n._values.Path,t.port=n._values.Port,t.search=n._values.QueryString?"?"+n._values.QueryString:"",t.username=n._values.Username,t.hostname=n._values.Hostname,t.protocol=n._values.Protocol?n._values.Protocol+":":"",t.origin=n._values.Origin?n._values.Origin+(n._values.Port?":"+n._values.Port:""):"",t.searchParams=function(){var e=u("?"+n._values.QueryString);return{get:function(t){return e[t]}}}()}return t}function g(e){return!(!e||1!==e.nodeType)}function h(e){return void 0===e}function v(t){return Array.isArray&&e(v)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function y(e){return new gr(e)}function w(e,t,r,i){function n(e){return e&&(e.preventDefault=n.preventDefault,e.stopPropagation=n.stopPropagation,e._getPath=n._getPath),e}function a(e,t,r,i){var a=function(a){if(a=a||n(window.event)){a.target=a.srcElement;var s,o,l=!0;return"function"==typeof r&&(s=r(a)),o=t.call(e,a),"beforeunload"!==i?(!1!==s&&!1!==o||(l=!1),l):void 0}};return a}n._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||y(e.target).getParents()},n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0};var s=function(e,t,r){if(void 0===i&&"click"===t&&(i=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=n._getPath,r.call(this,e)},i);else{var s="on"+t,o=e[s];e[s]=a(e,r,o,t)}};s.apply(null,arguments)}function b(e){var t="pushState"in window.history?"popstate":"hashchange";w(window,t,e)}function S(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){pr.log(t)}}}function k(e,t,r){if(null==e)return!1;if(mr&&e.forEach===mr)e.forEach(t,r);else if(v(e))for(var i=0,n=e.length;i=200&&n.status<300||304==n.status?e.success(t(n.responseText)):e.error(t(n.responseText),n.status),n.onreadystatechange=null,n.onload=null)}catch(r){n.onreadystatechange=null,n.onload=null}},n.open(e.type,e.url,!0);try{e.credentials&&(n.withCredentials=!0),r(e.header)&&k(e.header,function(e,t){n.setRequestHeader&&n.setRequestHeader(t,e)}),e.data&&(e.cors||n.setRequestHeader&&n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?n.setRequestHeader&&n.setRequestHeader("Content-type","application/json; charset=UTF-8"):n.setRequestHeader&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(l){pr.log(l)}n.send(e.data||null)}function $(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(k(e,function(e,i,n){r.push(t(e,i,n))}),r)}function C(e){var t=[];try{t=$(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function j(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function O(e,t){t=t||window;var r=!1,i=!0,n=t.document,a=n.documentElement,s=n.addEventListener,o=s?"addEventListener":"attachEvent",l=s?"removeEventListener":"detachEvent",c=s?"":"on",u=function(i){"readystatechange"==i.type&&"complete"!=n.readyState||(("load"==i.type?t:n)[l](c+i.type,u,!1),!r&&(r=!0)&&e.call(t,i.type||i))},p=function(){try{a.doScroll("left")}catch(e){return void setTimeout(p,50)}u("poll")};if("complete"==n.readyState)e.call(t,"lazy");else{if(!s&&a.doScroll){try{i=!t.frameElement}catch(d){pr.log(d)}i&&p()}n[o](c+"DOMContentLoaded",u,!1),n[o](c+"readystatechange",u,!1),t[o](c+"load",u,!1)}}function T(e){return k(Array.prototype.slice.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])}),e}function A(e){var t=e;try{t=decodeURI(e)}catch(r){t=e}return t}function D(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",r=t.length-1,i={},n=0;for(n=0;n=2&&!/^(\d+\.)+\d+$/.test(i))for(var a="."+n.splice(n.length-1,1);n.length>0;)if(a="."+n.splice(n.length-1,1)+a,document.cookie=t+"=true; path=/; domain="+a,document.cookie.indexOf(t+"=true")!==-1){var s=new Date;return s.setTime(s.getTime()-1e3),document.cookie=t+"=true; expires="+s.toGMTString()+"; path=/; SameSite=Lax; domain="+a,a}return""}function B(e){function t(e,t){e=d(e);var r;if("body"===e)return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var i=e.split(":nth-of-type");if(!i[0]||!i[1])return null;var n=i[0],a=i[1].match(/\(([0-9]+)\)/);if(!a||!a[1])return null;var s=Number(a[1]);if(!(g(t)&&t.children&&t.children.length>0))return null;for(var o=t.children,l=0;l0)return null}return r?r:null}function r(e){var n,a=i.shift();if(!a)return e;try{n=t(a,e)}catch(s){pr.log(s)}return n&&g(n)?r(n):null}if(!p(e))return null;var i=e.split(">"),n=null;return n=r(),n&&g(n)?n:null}function R(e,t){var r="",i="";return e.textContent?r=d(e.textContent):e.innerText&&(r=d(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),i=r||"","input"!==t&&"INPUT"!==t||(i=e.value||""),i}function M(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=f(e).hostname}catch(i){pr.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function V(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function K(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=c(e);var r="[\\?&]"+t+"=([^&#]*)",i=new RegExp(r),n=i.exec(e);return null===n||n&&"string"!=typeof n[1]&&n[1].length?"":c(n[1])}function q(e){var t={},r=e.split("?"),i=r[1]||"";return i&&(t=u("?"+i)),t}function F(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function z(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(F()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function W(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function X(e){return p(e)?(e=d(e),A(e)):A(location.href)}function Z(e){return p(e)?(e=d(e),A(e)):A(location.pathname)}function Y(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function G(e,t){if("string"==typeof t)return Y(e,t);if(v(t)){for(var r=!1,i=0;i0)for(var a=e.split(""),s=0;st)for(n=r+n;l=i*n+o,lt;)n=n/2+o;n=i*n+o}return n}function te(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var i=0;i41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function pe(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function de(t){if(!r(t)||!p(t.callbackName))return pr.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;t.success=e(t.success)?t.success:function(){},t.error=e(t.error)?t.error:function(){},t.data=t.data||"";var i=document.createElement("script"),n=document.getElementsByTagName("head")[0],a=null,s=!1;if(n.appendChild(i),ce(t.timeout)&&(a=setTimeout(function(){return!s&&(t.error("timeout"),window[t.callbackName]=function(){pr.log("call jsonp error")},a=null,n.removeChild(i),void(s=!0))},t.timeout)),window[t.callbackName]=function(){clearTimeout(a),a=null,t.success.apply(null,arguments),window[t.callbackName]=function(){pr.log("call jsonp error")},n.removeChild(i)},t.url.indexOf("?")>-1?t.url+="&callbackName="+t.callbackName:t.url+="?callbackName="+t.callbackName,r(t.data)){var o=[];k(t.data,function(e,t){o.push(t+"="+e)}),t.data=o.join("&"),t.url+="&"+t.data}i.onerror=function(e){return!s&&(window[t.callbackName]=function(){pr.log("call jsonp error")},clearTimeout(a),a=null,n.removeChild(i),t.error(e),void(s=!0))},i.src=t.url}function _e(t){var r={visibleHandler:e(t.visible)?t.visible:function(){},hiddenHandler:e(t.hidden)?t.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;w(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else w(window,"focus",this.visibleHandler),w(window,"blur",this.hiddenHandler)}};r.init()}function fe(e){e=P({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&(t=document.createElement("link"),t.rel="stylesheet",t.href=e.url),"js"===e.type&&(t=document.createElement("script"),t.async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function ge(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function he(e,t){e=String(e),t="number"==typeof t?t:13;for(var r=126,i=e.split(""),n=0,a=i.length;nr?(o&&(clearTimeout(o),o=null),l=u,s=e.apply(n,a),o||(n=a=null)):o||i.trailing===!1||(o=setTimeout(c,p)),s}}function Se(e){var t=[];return null==e?t:(k(e,function(e){t[t.length]=e}),t)}function ke(e){return e?e.toArray?e.toArray():v(e)||ie(e)?Array.prototype.slice.call(e):Se(e):[]}function Pe(e){for(var t,r=[],i={},n=0;ncr.para.datasend_timeout&&(cr.para.datasend_timeout=cr.para.callback_timeout),cr.para.heatmap&&cr.para.heatmap.collect_tags&&r(cr.para.heatmap.collect_tags)&&k(cr.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&cr.heatmap.otherTags.push(t)}),cr.para.heatmap&&"default"===cr.para.heatmap.clickmap&&cr.heatmap.initUnlimitedTags()}function Qe(e){var t={};for(var r in e)t[r]=e[r];cr.store._state.identities=t,cr.store.save()}function et(){cr._t=cr._t||1*new Date,cr.lib_version=xr,cr.is_first_visitor=!1,cr.source_channel_standard=Dr}function tt(){if(Sr.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){cr.log("enableLocalLog error: "+e.message)}}function rt(){Sr.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")}function it(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&Xr[t]?Xr[t].apply(Xr,r):void("function"==typeof t?t.apply(cr,r):cr.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0]))}function nt(t,i){return p(t)?r(window.SensorsDataWebJSSDKPlugin)&&r(window.SensorsDataWebJSSDKPlugin[t])&&e(window.SensorsDataWebJSSDKPlugin[t].init)?(window.SensorsDataWebJSSDKPlugin[t].init(cr,i),window.SensorsDataWebJSSDKPlugin[t]):r(cr.modules)&&r(cr.modules[t])&&e(cr.modules[t].init)?(cr.modules[t].init(cr,i),cr.modules[t]):void cr.log(t+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+t+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"):(cr.log("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1)}function at(e,t,r){Fr.check({event:e,properties:t})&&Fr.send({type:"track",event:e,properties:t},r)}function st(e,t){return!!Fr.check({bindKey:e,bindValue:t})&&(cr.store._state.identities[e]=t,cr.store.save(),void Fr.send({type:"track_id_bind",event:"$BindID",properties:{}}))}function ot(e,t){if(!Fr.check({unbindKey:e,bindValue:t}))return!1;if(r(cr.store._state.identities)&&cr.store._state.identities.hasOwnProperty(e)&&cr.store._state.identities[e]===t){var i=cr.store.getUnionId().login_id;i&&e+"+"+t===i&&(cr.store._state.distinct_id=cr.store._state.first_id,cr.store._state.first_id="",cr.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete cr.store._state.identities[e],cr.store.save())}var n={};n[e]=t,Fr.send({identities:n,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function lt(e,t,r){function i(e,t,r){function i(e){function i(){a||(a=!0,location.href=n.href)}e.stopPropagation(),e.preventDefault();var a=!1;setTimeout(i,1e3),cr.track(t,r,i)}e=e||{};var n=null;return e.ele&&(n=e.ele),e.event&&(n=e.target?e.target:e.event.target),r=r||{},!(!n||"object"!=typeof n)&&(!n.href||/^javascript/.test(n.href)||n.target||n.download||n.onclick?(cr.track(t,r),!1):(e.event&&i(e.event),void(e.ele&&Fe(e.ele,"click",function(e){i(e)}))))}"object"==typeof e&&e.tagName?i({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&i(e,t,r)}function ct(e,t,r){return r=r||{}, +!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void Fe(e,"click",function(i){function n(){a||(a=!0,location.href=e.href)}i.preventDefault();var a=!1;setTimeout(n,1e3),cr.track(t,r,n)}))}function ut(e,t,r){Fr.check({item_type:e,item_id:t,properties:r})&&Fr.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function pt(e,t){Fr.check({item_type:e,item_id:t})&&Fr.sendItem({type:"item_delete",item_type:e,item_id:t})}function dt(e,t){Fr.check({propertiesMust:e})&&Fr.send({type:"profile_set",properties:e},t)}function _t(e,t){Fr.check({propertiesMust:e})&&Fr.send({type:"profile_set_once",properties:e},t)}function ft(e,t){Fr.check({propertiesMust:e})&&(k(e,function(t,r){p(t)?e[r]=[t]:v(t)?e[r]=t:(delete e[r],cr.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),ae(e)||Fr.send({type:"profile_append",properties:e},t))}function gt(e,t){function r(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}var i=e;p(e)&&(e={},e[i]=1),Fr.check({propertiesMust:e})&&(r(e)?Fr.send({type:"profile_increment",properties:e},t):cr.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"))}function ht(e){Fr.send({type:"profile_delete"},e),Rr.set("distinct_id",fr()),Rr.set("first_id","")}function mt(e,t){var r=e,i={};p(e)&&(e=[],e.push(r)),v(e)?(k(e,function(e){p(e)?i[e]=!0:cr.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),Fr.send({type:"profile_unset",properties:i},t)):cr.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")}function vt(e,t){function r(e){cr.store._state.identities.$identity_anonymous_id=e,cr.store.save()}"number"==typeof e&&(e=String(e));var i=Rr.getFirstId();if("undefined"==typeof e){var n=fr();i?Rr.set("first_id",n):Rr.set("distinct_id",n),r(n)}else Fr.check({distinct_id:e})&&(t===!0?i?Rr.set("first_id",e):Rr.set("distinct_id",e):i?Rr.change("first_id",e):Rr.change("distinct_id",e),r(e))}function yt(e,t,r,i){var n=Rr.getFirstId()||Rr.getDistinctId();Rr.set("distinct_id",e),Fr.send({original_id:n,distinct_id:cr.store.getDistinctId(),type:"track_signup",event:t,properties:r},i)}function wt(e,t,r,i){"number"==typeof e&&(e=String(e)),Fr.check({distinct_id:e,event:t,properties:r})&&yt(e,t,r,i)}function bt(e){Fr.check({properties:e})?P(Ur.currentProps,e):cr.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function St(e){Rr.clearAllProps(e)}function kt(e){var t;if(v(e)&&e.length>0)for(t=0;t-1?e.config.send_type:cr.para.send_type,"beacon"===r&&ue()===!1&&(r="image"),"ajax"===r&&pe()===!1&&(r="image"),r}function Ut(e){var t=Lt(e);switch(t){case"image":return new ti(e);case"ajax":return new ri(e);case"beacon":return new ii(e);default:return new ti(e)}}function Jt(e){var t=Ut(e),r=t.start;return t.start=function(){var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},cr.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},cr.para.datasend_timeout-cr.para.callback_timeout)},t.isEnd=function(){this.received||(this.received=!0,this.end())},t}function Ht(){this.sendTimeStamp=0,this.timer=null,this.serverUrl="",this.hasTabStorage=!1,this.recycle()}function Bt(t){var r=location.href,i=window.history.pushState,n=window.history.replaceState;e(window.history.pushState)&&(window.history.pushState=function(){i.apply(window.history,arguments),t(r),r=location.href}),e(window.history.replaceState)&&(window.history.replaceState=function(){n.apply(window.history,arguments),t(r),r=location.href});var a;a=window.document.documentMode?"hashchange":i?"popstate":"hashchange",w(window,a,function(){t(r),r=location.href})}function Rt(e){var t=null,r=new RegExp(e+"=([^&#]+)");try{var i=JSON.parse(window.name);k(i,function(r,i){e===i&&(t=decodeURIComponent(r))})}catch(n){t=null}if(null===t){var a=location.href.match(r);a&&a[0]&&a[1]&&(t=c(a[1]))}return t}function Mt(e){function t(){var e=[];i.touch_app_bridge||e.push(cr.debug.defineMode("1")),r(cr.para.app_js_bridge)||(e.push(cr.debug.defineMode("2")),i.verify_success=!1),r(cr.para.heatmap)&&"default"==cr.para.heatmap.clickmap||e.push(cr.debug.defineMode("3")),"fail"===i.verify_success&&e.push(cr.debug.defineMode("4"));var t={callType:"app_alert",data:e};SensorsData_App_Visual_Bridge&&SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info?SensorsData_App_Visual_Bridge.sensorsdata_visualized_alert_info(JSON.stringify(t)):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.sensorsdataNativeTracker&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage&&window.webkit.messageHandlers.sensorsdataNativeTracker.postMessage(JSON.stringify(t))}var i=cr.bridge.bridge_info;if(r(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode===!0||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode()))if(r(cr.para.heatmap)&&"default"==cr.para.heatmap.clickmap)if(r(cr.para.app_js_bridge)&&"success"===i.verify_success)if(e)sa_jssdk_app_define_mode(cr,e);else{var n=location.protocol,a=["http:","https:"];n=te(a,n)>-1?n:"https:",fe({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_app_define_mode&&sa_jssdk_app_define_mode(cr,e)},0)},error:function(){},type:"js",url:n+"//static.sensorsdata.cn/sdk/"+cr.lib_version+"/vapph5define.min.js"})}else t();else t()}function Vt(){cr.para.is_track_single_page&&hi.on("switch",function(e){var t=function(t){t=t||{},e!==location.href&&(Ur.pageProp.referrer=X(e),cr.quick("autoTrack",P({$url:X(),$referrer:X(e)},t)))};if("boolean"==typeof cr.para.is_track_single_page)t();else if("function"==typeof cr.para.is_track_single_page){var i=cr.para.is_track_single_page();r(i)?t(i):i===!0&&t()}})}function Kt(){cr._q&&v(cr._q)&&cr._q.length>0&&k(cr._q,function(e){cr[e[0]].apply(cr,Array.prototype.slice.call(e[1]))}),r(cr.para.heatmap)&&(Wr.initHeatmap(),Wr.initScrollmap())}function qt(){cr.readyState.setState(3),new cr.JSBridge({type:"visualized",app_call_js:function(){Mt("undefined"!=typeof sa_jssdk_app_define_mode?!0:!1)}}),Mt(!1),cr.bridge.app_js_bridge_v1(),Ur.initPage(),Vt(),cr.para.batch_send&&cr.batchSend.batchInterval(),cr.store.init(),cr.vtrackBase.init(),cr.readyState.setState(4),Kt()}function Ft(){vi.isSeachHasKeyword()?vi.hasKeywordHandle():window.parent!==self&&yi.isSearchHasKeyword()?yi.verifyVtrackMode():vi.isStorageHasKeyword()?vi.storageHasKeywordHandle():window.parent!==self&&yi.isStorageHasKeyword()?yi.verifyVtrackMode():(qt(),yi.notifyUser())}function zt(){k(wi,function(e){var t=cr[e];cr[e]=function(){if(cr.readyState.state<3)return v(cr._q)||(cr._q=[]),cr._q.push([e,arguments]),!1;{if(cr.readyState.getState())return t.apply(cr,arguments);try{console.error("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}catch(r){cr.log(r)}}}})}function Wt(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function Xt(e,t,r){var i=null;try{i=JSON.parse(JSON.stringify(e))}catch(n){Ne(n)}this.getOriginalData=function(){return i},this.getPosition=function(){return t},this.cancelationToken=new Wt,this.sensors=r}function Zt(e){if(!r(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}function Yt(e){e&&e.dataStage&&ki.registerStageImplementation(e.dataStage)}function Gt(e){e.kit=ei,e.saEvent=Fr,this.dataStage=qr}function Qt(t){return r(t)?(k(t,function(r,i){if(v(r)){var n=[];k(r,function(e){p(e)?n.push(e):Ne("\u60a8\u7684\u6570\u636e-",i,r,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),t[i]=n}p(r)||ce(r)||x(r)||ne(r)||v(r)||e(r)||"$option"===i||(Ne("\u60a8\u7684\u6570\u636e-",i,r,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete t[i])}),t):t}function er(e,t){return ce(t)&&e.length>t?(Ne("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function tr(e){var t=["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"];r(e)&&k(t,function(t,r){t in e&&(r<3?(delete e[t],Ne("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):Ne("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d"))})}function rr(e){var t=["$element_selector","$element_path"],i=["sensorsdata_app_visual_properties"];r(e)&&k(e,function(n,a){if(r(n))rr(e[a]);else if(p(n)){if(te(i,a)>-1)return;e[a]=er(n,te(t,a)>-1?1024:Cr.max_string_length)}})}function ir(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function nr(e){if("item_type"in e){var t=e.item_type,r=function(t){return t||delete e.item_type,!0};Xe({item_type:t},r)}if("item_id"in e){var i=e.item_id,n=function(t,r,i){return t||"string"!==i||delete e.item_id,!0};Xe({item_id:i},n)}}function ar(e){k(e,function(t,r){var i=function(t,i,n){return t||"keyLength"===n||delete e[r],!0};Xe({propertyKey:r},i)})}function sr(e){var t=e.properties;r(t)?(Qt(t),tr(t),ir(e),ar(t),rr(t)):"properties"in e&&(e.properties={}),ve(e),nr(e)}function or(){this.dataStage=Pi}function lr(e){e&&(pr.setup(Ne),cr._=P($r,Qr),cr.ee=mi,cr.sendState=ni,cr.events=new cr._.EventEmitterSa,cr.batchSend=oi,cr.bridge=li,cr.JSBridge=ci,cr.store=Rr,cr.vtrackBase=ui,cr.unlimitedDiv=pi,cr.customProp=di,cr.vtrackcollect=_i,cr.vapph5collect=gi,cr.heatmap=Wr,cr.detectMode=Ft,cr.registerFeature=Yt,Yt(new Gt(cr)),Yt(new or(cr)));var t=e?Yr:bi;for(var r in t)cr[r]=t[r]}var cr={};(function(){function e(i,n){function a(e,t){try{e()}catch(r){t&&t()}}function s(e){if(null!=s[e])return s[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=s("json-stringify")&&s("date-serialization")&&s("json-parse");else if("date-serialization"==e){if(t=s("json-stringify")&&w){var r=n.stringify;a(function(){t='"-271821-04-20T00:00:00.000Z"'==r(new p((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==r(new p(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new p((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==r(new p((-1)))})}}else{var i,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var r=n.stringify,u="function"==typeof r;u&&((i=function(){return 1}).toJSON=i,a(function(){u="0"===r(0)&&"0"===r(new l)&&'""'==r(new c)&&r(v)===h&&r(h)===h&&r()===h&&"1"===r(i)&&"[1]"==r([i])&&"[null]"==r([h])&&"null"==r(null)&&"[null,null,null]"==r([h,v,null])&&r({a:[i,!0,!1,null,"\0\b\n\f\r\t"]})==o&&"1"===r(null,i)&&"[\n 1,\n 2\n]"==r([1,2],null,1)},function(){u=!1})),t=u}if("json-parse"==e){var d,_=n.parse;"function"==typeof _&&a(function(){0!==_("0")||_(!1)||(i=_(o),d=5==i.a.length&&1===i.a[0],d&&(a(function(){d=!_('"\t"')}),d&&a(function(){d=1!==_("01")}),d&&a(function(){d=1!==_("1.")})))},function(){d=!1}),t=d}}return s[e]=!!t}function o(e){return D(this)}i||(i=r.Object()),n||(n=r.Object());var l=i.Number||r.Number,c=i.String||r.String,u=i.Object||r.Object,p=i.Date||r.Date,d=i.SyntaxError||r.SyntaxError,_=i.TypeError||r.TypeError,f=i.Math||r.Math,g=i.JSON||r.JSON;if("object"==typeof g&&g)return n.stringify=g.stringify,n.parse=g.parse,n.runInContext=e,n;var h,m=u.prototype,v=m.toString,y=m.hasOwnProperty,w=new p((-0xc782b5b800cec));if(a(function(){w=w.getUTCFullYear()==-109252&&0===w.getUTCMonth()&&1===w.getUTCDate()&&10==w.getUTCHours()&&37==w.getUTCMinutes()&&6==w.getUTCSeconds()&&708==w.getUTCMilliseconds()}),s["bug-string-char-index"]=s["date-serialization"]=s.json=s["json-stringify"]=s["json-parse"]=null,!s("json")){var b="[object Function]",S="[object Date]",k="[object Number]",P="[object String]",N="[object Array]",$="[object Boolean]",C=s("bug-string-char-index"),j=function(e,r){var i,n,a,s=0;(i=function(){this.valueOf=0}).prototype.valueOf=0,n=new i;for(a in n)y.call(n,a)&&s++;return i=n=null,s?j=function(e,t){var r,i,n=v.call(e)==b;for(r in e)n&&"prototype"==r||!y.call(e,r)||(i="constructor"===r)||t(r);(i||y.call(e,r="constructor"))&&t(r)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],j=function(e,r){var i,a,s=v.call(e)==b,o=!s&&"function"!=typeof e.constructor&&t[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(i in e)s&&"prototype"==i||!o.call(e,i)||r(i);for(a=n.length;i=n[--a];)o.call(e,i)&&r(i)}),j(e,r)};if(!s("json-stringify")&&!s("date-serialization")){var O={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},T="000000",A=function(e,t){return(T+(t||0)).slice(-e)},D=function(e){var t,r,i,n,a,s,o,l,c;if(w)t=function(e){r=e.getUTCFullYear(),i=e.getUTCMonth(),n=e.getUTCDate(),s=e.getUTCHours(),o=e.getUTCMinutes(),l=e.getUTCSeconds(),c=e.getUTCMilliseconds()};else{var u=f.floor,p=[0,31,59,90,120,151,181,212,243,273,304,334],d=function(e,t){return p[t]+365*(e-1970)+u((e-1969+(t=+(t>1)))/4)-u((e-1901+t)/100)+u((e-1601+t)/400)};t=function(e){for(n=u(e/864e5),r=u(n/365.2425)+1970-1;d(r+1,0)<=n;r++);for(i=u((n-d(r,0))/30.42);d(r,i+1)<=n;i++);n=1+n-d(r,i),a=(e%864e5+864e5)%864e5,s=u(a/36e5)%24,o=u(a/6e4)%60,l=u(a/1e3)%60,c=a%1e3}}return(D=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+A(6,r<0?-r:r):A(4,r))+"-"+A(2,i+1)+"-"+A(2,n)+"T"+A(2,s)+":"+A(2,o)+":"+A(2,l)+"."+A(3,c)+"Z",r=i=n=s=o=l=c=null):e=null,e})(e)};if(s("json-stringify")&&!s("date-serialization")){var x=n.stringify;n.stringify=function(e,t,r){var i=p.prototype.toJSON;p.prototype.toJSON=o;var n=x(e,t,r);return p.prototype.toJSON=i,n}}else{var I="\\u00",E=function(e){var t=e.charCodeAt(0),r=O[t];return r?r:I+A(2,t.toString(16))},L=/[\x00-\x1f\x22\x5c]/g,U=function(e){return L.lastIndex=0,'"'+(L.test(e)?e.replace(L,E):e)+'"'},J=function(e,t,r,i,n,s,o){var l,c,u,d,f,g,m,y,w;if(a(function(){l=t[e]}),"object"==typeof l&&l&&(l.getUTCFullYear&&v.call(l)==S&&l.toJSON===p.prototype.toJSON?l=D(l):"function"==typeof l.toJSON&&(l=l.toJSON(e))),r&&(l=r.call(t,e,l)),l==h)return l===h?l:"null";switch(c=typeof l,"object"==c&&(u=v.call(l)),u||c){case"boolean":case $:return""+l;case"number":case k:return l>-1/0&&l<1/0?""+l:"null";case"string":case P:return U(""+l)}if("object"==typeof l){for(m=o.length;m--;)if(o[m]===l)throw _();if(o.push(l),d=[],y=s,s+=n,u==N){for(g=0,m=l.length;g0)for(i>10&&(i=10),n="";n.length=48&&n<=57||n>=97&&n<=102||n>=65&&n<=70||V();e+=R("0x"+a.slice(t,H));break;default:V()}else{if(34==n)break;for(n=a.charCodeAt(H),t=H;n>=32&&92!=n&&34!=n;)n=a.charCodeAt(++H);e+=a.slice(t,H)}if(34==a.charCodeAt(H))return H++,e;V();default:if(t=H,45==n&&(i=!0,n=a.charCodeAt(++H)),n>=48&&n<=57){for(48==n&&(n=a.charCodeAt(H+1),n>=48&&n<=57)&&V(),i=!1;H=48&&n<=57);H++);if(46==a.charCodeAt(H)){for(r=++H;r57));r++);r==H&&V(),H=r}if(n=a.charCodeAt(H),101==n||69==n){for(n=a.charCodeAt(++H),43!=n&&45!=n||H++,r=H;r57));r++);r==H&&V(),H=r}return+a.slice(t,H)}i&&V();var o=a.slice(H,H+4);if("true"==o)return H+=4,!0;if("fals"==o&&101==a.charCodeAt(H+4))return H+=5,!1;if("null"==o)return H+=4,null;V()}return"$"},q=function(e){var t,r;if("$"==e&&V(),"string"==typeof e){if("@"==(C?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=K(),"]"!=e;)r?","==e?(e=K(),"]"==e&&V()):V():r=!0,","==e&&V(),t.push(q(e));return t}if("{"==e){for(t={};e=K(),"}"!=e;)r?","==e?(e=K(),"}"==e&&V()):V():r=!0,","!=e&&"string"==typeof e&&"@"==(C?e.charAt(0):e[0])&&":"==K()||V(),t[e.slice(1)]=q(K());return t}V()}return e},F=function(e,t,r){var i=z(e,t,r);i===h?delete e[t]:e[t]=i},z=function(e,t,r){var i,n=e[t];if("object"==typeof n&&n)if(v.call(n)==N)for(i=n.length;i--;)F(v,j,n,i,r);else j(n,function(e){F(n,e,r)});return r.call(e,t,n)};n.parse=function(e,t){var r,i;return H=0,B=""+e,r=q(K()),"$"!=K()&&V(),H=B=null,t&&v.call(t)==b?z((i={},i[""]=r,i),"",t):r}}}return n.runInContext=e,n}var t={"function":!0,object:!0},r=t[typeof window]&&window||this,i=r.JSON,n=r.JSON3,a=!1,s=e(r,r.JSON3={noConflict:function(){return a||(a=!0,r.JSON=i,r.JSON3=n,i=n=null),s}});r.JSON={parse:s.parse,stringify:s.stringify}}).call(window),function(e,t){t(e)}(window,function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=function(e){var t=function(t){return e(String(t).replace(/[\t\n\f\r ]+/g,""))};return t.original=e,t}(e.atob)}else{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,i,n,a,s="",o=0,l=e.length%3;o255||(n=e.charCodeAt(o++))>255||(a=e.charCodeAt(o++))>255)return"";t=i<<16|n<<8|a,s+=r.charAt(t>>18&63)+r.charAt(t>>12&63)+r.charAt(t>>6&63)+r.charAt(63&t)}return l?s.slice(0,l-3)+"===".substring(l):s},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!i.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,n,a,s="",o=0;o>16&255):64===a?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return s}}}),function(){String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)})}();var ur,pr={setup:function(e){ur=e},log:function(){(ur||console&&console.log||function(){}).apply(null,arguments)}},dr={get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t;try{t=JSON.parse(dr.get(e))||null}catch(r){pr.log(r)}return t},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(r){pr.log(r)}},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__local_store_support__",r="testIsSupportStorage";dr.set(t,r),dr.get(t)!==r&&(e=!1),dr.remove(t)}catch(i){e=!1}return e}},_r=function(){function e(){return r=(9301*r+49297)%233280,r/233280}var t=new Date,r=t.getTime();return function(t){return Math.ceil(e()*t)}}();a.prototype.get=function(e,r,a,s){if(!e)throw new Error("key is must");r=r||1e4,a=a||1e3,s=s||function(){};var o=this.lockGetPrefix+e,l=dr.get(o),c=String(i());return l&&(l=n(l)||{randomNum:0,expireTime:0},l.expireTime>t())?s(null):(dr.set(o,JSON.stringify({randomNum:c,expireTime:t()+r})),void setTimeout(function(){l=n(dr.get(o))||{randomNum:0,expireTime:0},l&&l.randomNum===c?(s(dr.get(e)),dr.remove(e),dr.remove(o)):s(null)},a))},a.prototype.set=function(e,r,a,s,o){if(!e||!r)throw new Error("key and val is must");a=a||1e4,s=s||1e3,o=o||function(){};var l=this.lockSetPrefix+e,c=dr.get(l),u=String(i());return c&&(c=n(c)||{randomNum:0,expireTime:0},c.expireTime>t())?o({status:"fail",reason:"This key is locked"}):(dr.set(l,JSON.stringify({randomNum:u,expireTime:t()+a})),void setTimeout(function(){c=n(dr.get(l))||{randomNum:0,expireTime:0},c.randomNum===u?dr.set(e,r)&&o({status:"success"}):o({status:"fail",reason:"This key is locked"})},s))},l.prototype.on=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].push(r?t:{listener:t,once:!1}),this},l.prototype.prepend=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].unshift(r?t:{listener:t,once:!1}),this},l.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},l.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},l.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var i=0,n=r.length;i=4&&(a=e(a,n),n=[]);return n.length>0&&(a=e(a,n)),a.toString(16)};return function(){var n=String(screen.height*screen.width);n=n&&/\d{5,}/.test(n)?n.toString(16):String(31242*i()).replace(".","").slice(0,8);var a=e()+"-"+t()+"-"+r()+"-"+n+"-"+e();return a?a:(String(i())+String(i())+String(i())).slice(2,15)}}(),gr=function(e){this.ele=e},hr=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};gr.prototype={addClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")===-1&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1},attr:function(e,t){return"string"==typeof e&&h(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument,r=t.documentElement;return{top:e.top+window.pageYOffset-r.clientTop,left:e.left+window.pageXOffset-r.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),y(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!v(r))return null;for(var i=r.length-1;i>=0;i--){var n=r[i];if(t=n.style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return hr((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return hr(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return e=e&&11!==e.nodeType?e:null,y(e)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return y(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return y(e);return y(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),i=[],n=0;n0&&(e=e.concat(Cr.source_channel),e=Pe(e)),k(e,function(e){t=K(location.href,e),t.length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=Ur.campaignParams(),i={},n={};return k(r,function(r,a,s){(" "+Dr+" ").indexOf(" "+a+" ")!==-1?i[e+a]=s[a]:n[t+a]=s[a]}),{$utms:i,otherUtms:n}},properties:function(){var e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,r={$timezone_offset:(new Date).getTimezoneOffset(),$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$viewport_height:e,$viewport_width:t,$lib:"js",$lib_version:xr};return r},currentProps:{},register:function(e){P(Ur.currentProps,e)}},Jr={get:function(e){return wr.get(e)},set:function(e,t,r,i){var n="";if(i="undefined"==typeof i?Cr.cross_subdomain:i){var a=De(location.href);"url\u89e3\u6790\u5931\u8d25"===a&&(a=""),n=a?"; domain="+a:""}return wr.set(e,t,r,i,Cr.set_cookie_samesite,Cr.is_secure_cookie,n)},remove:function(e,t){return t="undefined"==typeof t?Cr.cross_subdomain:t,wr.remove(e,t)},isSupport:function(e,t){return e=e||"sajssdk_2015_cookie_access_test",t=t||"1",wr.isSupport(e,t)}};Jr.getNewUser=We;var Hr={data:{},get:function(e){var t=this.data[e];return void 0===t?null:void 0!==t._expirationTimestamp_?(new Date).getTime()>t._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var i,n=new Date;i="s"===String(r).slice(-1)?n.getTime()+1e3*Number(String(r).slice(0,-1)):n.getTime()+24*r*60*60*1e3,t={value:t,_expirationTimestamp_:i}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+Cr.sdk_id+e}},Br={checkIsAddSign:function(e){"track"===e.type&&(We()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=Jr.get("sensorsdata2015jssdkcross"+cr.para.sdk_id);r=Ce(r);var i={};null!=r&&le(r)&&(i=JSON.parse(r),i.$device_id&&(t=i.$device_id)),t=t||e,cr.para.cross_subdomain===!0?cr.store.set("$device_id",t):(i.$device_id=t,i=JSON.stringify(i),cr.para.encrypt_cookie&&(i=je(i)),Jr.set("sensorsdata2015jssdkcross"+cr.para.sdk_id,i,null,!0)),cr.para.is_track_device_id&&(Ur.currentProps.$device_id=t)},storeInitCheck:function(){if(cr.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};Jr.isSupport()?Jr.set(ze("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):Hr.set(Hr.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else We()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=Ur.pageProp.url_domain,t={};""===e&&(e="url\u89e3\u6790\u5931\u8d25");var i=Be(document.referrer,!0);if(cr.para.preset_properties.search_keyword_baidu?Ue(document.referrer)&&(!Ie()||r(i)&&i.active?cr.store._state&&cr.store._state.props&&(cr.store._state.props.$search_keyword_id&&delete cr.store._state.props.$search_keyword_id,cr.store._state.props.$search_keyword_id_type&&delete cr.store._state.props.$search_keyword_id_type,cr.store._state.props.$search_keyword_id_hash&&delete cr.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=Lr.id(),t.$search_keyword_id_type=Lr.type(),t.$search_keyword_id_hash=ee(t.$search_keyword_id))):cr.store._state&&cr.store._state.props&&(cr.store._state.props.$search_keyword_id&&delete cr.store._state.props.$search_keyword_id,cr.store._state.props.$search_keyword_id_type&&delete cr.store._state.props.$search_keyword_id_type,cr.store._state.props.$search_keyword_id_hash&&delete cr.store._state.props.$search_keyword_id_hash),cr.store.save(),k(cr.para.preset_properties,function(i,n){if(n.indexOf("latest_")===-1)return!1;if(n=n.slice(7),i){if("wx_ad_click_id"===n&&"not_collect"===i)return!1;if("utm"!==n&&"url\u89e3\u6790\u5931\u8d25"===e)"wx_ad_click_id"===n?(t._latest_wx_ad_click_id="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_hash_key="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_callbacks="url\u7684domain\u89e3\u6790\u5931\u8d25"):t["$latest_"+n]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(Ue(document.referrer))switch(n){case"traffic_source_type":t.$latest_traffic_source_type=Me();break;case"referrer":t.$latest_referrer=Ur.pageProp.referrer;break;case"search_keyword":Be()?t.$latest_search_keyword=Be():r(cr.store._state)&&r(cr.store._state.props)&&cr.store._state.props.$latest_search_keyword&&delete cr.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=X();break;case"wx_ad_click_id":var a=Re(location.href);t._latest_wx_ad_click_id=a.click_id,t._latest_wx_ad_hash_key=a.hash_key,t._latest_wx_ad_callbacks=a.callbacks}}else if("utm"===n&&cr.store._state&&cr.store._state.props)for(var s in cr.store._state.props)(0===s.indexOf("$latest_utm")||0===s.indexOf("_latest_")&&s.indexOf("_latest_wx_ad_")<0)&&delete cr.store._state.props[s];else if(cr.store._state&&cr.store._state.props&&"$latest_"+n in cr.store._state.props)delete cr.store._state.props["$latest_"+n];else if("wx_ad_click_id"==n&&cr.store._state&&cr.store._state.props&&i===!1){var o=["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"];k(o,function(e){e in cr.store._state.props&&delete cr.store._state.props[e]})}}),cr.register(t),cr.para.preset_properties.latest_utm){var n=Ur.campaignParamsStandard("$latest_","_latest_"),a=n.$utms,s=n.otherUtms;ae(a)||cr.register(a),ae(s)||cr.register(s)}}},Rr={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={};e=e||this._state;var r=e._first_id||e.first_id,i=e._distinct_id||e.distinct_id;return r&&i?(t.login_id=i,t.anonymous_id=r):t.anonymous_id=i,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==cr.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=Jr.get("sensorsdata2015session");e=Ce(e);var t=null;null!==e&&"object"==typeof(t=n(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&cr.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;P(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;T(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};r=t?e:P(this._state.props||{},e);for(var i in r)"string"==typeof r[i]&&(r[i]=r[i].slice(0,cr.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};T(t,e),this.set("props",t)},clearAllProps:function(e){this._sessionState={};var t;if(v(e)&&e.length>0)for(t=0;tCr.max_id_length)},keyLength:function(e){return!(!p(e)||e.length>Cr.max_key_length)},stringLength:function(e){return!(!p(e)||e.length>Cr.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(te(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(te(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=Rr._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(te(this.bindReservedNames,e)>-1)}},Kr={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="Id"),e(Mr[i])&&Mr[i](r),"idLength"===i)||t}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,i){return t||("emptyString"===i&&(r="eventName"),e(Mr[i])&&Mr[i](r)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,i){return t||("emptyString"===i&&(r="Property key"),e(Mr[i])&&Mr[i](r)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(t,r,i){return t||(r="Property Value",e(Mr[i])&&Mr[i](r)),!0}},properties:function(t){return r(t)?k(t,function(t,r){Xe({propertyKey:r});var i=function(t,i,n){return t||(i=r+"'s Value",e(Mr[n])&&Mr[n](i)),!0};Xe({propertyValue:t},i)}):Vr.voidZero(t)&&Ne("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return void 0!==e&&r(e)&&!ae(e)?this.properties.call(this,e):Ne("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,i){return t||("emptyString"===i&&(r="item_type"),e(Mr[i])&&Mr[i](r)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(t,r,i){return t||("emptyString"===i&&(r="item_id"),e(Mr[i])&&Mr[i](r)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="login_id_key"),e(Mr[i])&&Mr[i](r),"keyLength"===i)||t}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="Key"),e(Mr[i])&&Mr[i](r),"keyLength"===i)||t}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="Key"),e(Mr[i])&&Mr[i](r),"keyLength"===i)||t}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="Value"),e(Mr[i])&&Mr[i](r),"idLength"===i)||t}},check:function(t,r,i){var n=this[t];if(e(n))return n.call(this,r);if(!n)return!1;for(var a=0;a-1)return i;if("area"===n&&"map"===a.tagName.toLowerCase()&&y(a).prev().tagName&&"img"===y(a).prev().tagName.toLowerCase())return y(a).prev();if("div"===n&&cr.para.heatmap.collect_tags.div&&r.isDivLevelValid(i)){var o=cr.para.heatmap&&cr.para.heatmap.collect_tags&&cr.para.heatmap.collect_tags.div&&cr.para.heatmap.collect_tags.div.max_level||1;if(o>1||r.isCollectableDiv(i))return i}if(r.isStyleTag(n)&&cr.para.heatmap.collect_tags.div){var l=r.getCollectableParent(i);if(l&&r.isDivLevelValid(l))return l}var c=r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)});return c||null},getDivLevels:function(e,t){var r=Wr.getElementPath(e,!0,t),i=r.split(" > "),n=0;return k(i,function(e){"div"===e&&n++}),n},isDivLevelValid:function(e){for(var t=cr.para.heatmap&&cr.para.heatmap.collect_tags&&cr.para.heatmap.collect_tags.div&&cr.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),i=r.length-1;i>=0;i--)if(Wr.getDivLevels(r[i],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var i=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){i.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){i.unshift(e.tagName.toLowerCase());break}if(e===document.body){i.unshift("body");break}i.unshift(e.tagName.toLowerCase()),e=e.parentNode}return i.join(" > ")},getClosestLi:function(e){var t=function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null};return t(e,"li")},getElementPosition:function(e,t,r){function i(e){var t=e.parentNode;if(!t)return"";var r=y(e).getSameTypeSiblings(),i=r.length;if(1===i)return 0;for(var n=0,a=e;y(a).previousElementSibling().ele;a=y(a).previousElementSibling().ele,n++);return n}var n=cr.heatmap.getClosestLi(e);if(!n)return null;var a=e.tagName.toLowerCase(),s=n.getElementsByTagName(a),o=s.length,l=[];if(o>1){for(var c=0;c1)return te(l,e)}return i(n)},setNotice:function(e){cr.is_heatmap_render_mode=!0,cr.para.heatmap||(cr.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(cr.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),cr.para.heatmap_url||(cr.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+cr.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,i=e.parentNode.children,n=0;n "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=xe({target:e});r.$element_selector=t?t:"",r.$element_path=cr.heatmap.getElementPath(e,cr.para.heatmap&&"not_use_id"===cr.para.heatmap.element_selector);var i=cr.heatmap.getElementPosition(e,r.$element_path,cr.para.heatmap&&"not_use_id"===cr.para.heatmap.element_selector);return ce(i)&&(r.$element_position=i),r},getPointerEventProp:function(e,t){function r(){var e=document.body.scrollLeft||document.documentElement.scrollLeft||0,t=document.body.scrollTop||document.documentElement.scrollTop||0;return{scrollLeft:e,scrollTop:t}}function i(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function n(e){return Number(Number(e).toFixed(3))}function a(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+i(t).targetEleX||0,s=e.pageY||e.clientY+r().scrollTop||e.offsetY+i(t).targetEleY||0;return{$page_x:n(a),$page_y:n(s)}}return e?a(e):{}},start:function(t,i,n,a,s){var o=r(a)?a:{},l=e(s)?s:e(a)?a:void 0;if(cr.para.heatmap&&cr.para.heatmap.collect_element&&!cr.para.heatmap.collect_element(i))return!1;var c=this.getEleDetail(i);if(cr.para.heatmap&&cr.para.heatmap.custom_property){var u=cr.para.heatmap.custom_property(i);r(u)&&(c=P(c,u))}c=P(c,this.getPointerEventProp(t,i),o),"a"===n&&cr.para.heatmap&&cr.para.heatmap.isTrackLink===!0?cr.trackLink({event:t,target:i},"$WebClick",c):cr.track("$WebClick",c,l)},hasElement:function(e,t){var r;if(e.event){var i=e.event;r=i.path||i._getPath&&i._getPath()}else e.element&&(r=y(e.element).getParents());if(r&&v(r)&&r.length>0)for(var n=0;n-1)&&(!t||cr.para.heatmap&&cr.para.heatmap.collect_tags&&cr.para.heatmap.collect_tags.div?!!(r(cr.para.heatmap)&&r(cr.para.heatmap.collect_tags)&&r(cr.para.heatmap.collect_tags.div)&&v(cr.para.heatmap.collect_tags.div.ignore_tags)&&te(cr.para.heatmap.collect_tags.div.ignore_tags,e)>-1):te(n,e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(i,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(a){cr.log(a)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,i=r?r.tagName.toLowerCase():"";if("body"===i)return!1;var n=cr.para&&cr.para.heatmap&&cr.para.heatmap.collect_tags&&cr.para.heatmap.collect_tags.div&&cr.para.heatmap.collect_tags.div.max_level;if(i&&"div"===i&&(n>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(i,t))return this.getCollectableParent(r,t)}catch(a){cr.log(a)}return!1},listenUrlChange:function(e){e(),cr.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!r(cr.para.heatmap)||"default"!==cr.para.heatmap.scroll_notice_map)return!1;var t=!0;cr.para.scrollmap&&e(cr.para.scrollmap.collect_url)&&this.listenUrlChange(function(){t=!!cr.para.scrollmap.collect_url()});var i=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t},n=i({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,i=new Date,n=i-this.current_time;(n>cr.para.heatmap.scroll_delay_time&&r-e.$viewport_position!==0||t)&&(e.$url=X(),e.$title=document.title,e.$url_path=Z(),e.event_duration=Math.min(cr.para.heatmap.scroll_event_duration,parseInt(n)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,cr.track("$WebStay",e)),this.current_time=i}});n.current_time=new Date,Fe(window,"scroll",function(){return!!t&&void n.go()}),Fe(window,"unload",function(){return!!t&&void n.go("notime")})},initHeatmap:function(){var t=this,i=!0;return!(!r(cr.para.heatmap)||"default"!==cr.para.heatmap.clickmap)&&(e(cr.para.heatmap.collect_url)&&this.listenUrlChange(function(){i=!!cr.para.heatmap.collect_url()}),"all"===cr.para.heatmap.collect_elements?cr.para.heatmap.collect_elements="all":cr.para.heatmap.collect_elements="interact",void("all"===cr.para.heatmap.collect_elements?Fe(document,"click",function(e){if(!i)return!1;var r=e||window.event;if(!r)return!1;var n=r.target||r.srcElement;if("object"!=typeof n)return!1;if("string"!=typeof n.tagName)return!1;var a=n.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!n||!n.parentNode||!n.parentNode.children)return!1;var s=n.parentNode.tagName.toLowerCase();"a"===s||"button"===s?t.start(r,n.parentNode,s):t.start(r,n,a)}):Fe(document,"click",function(e){if(!i)return!1;var n=e||window.event;if(!n)return!1;var a=n.target||n.srcElement,s=cr.heatmap.getTargetElement(a,e);s?t.start(n,s,s.tagName.toLowerCase()):g(a)&&"div"===a.tagName.toLowerCase()&&r(cr.para.heatmap)&&cr.para.heatmap.get_vtrack_config&&cr.unlimitedDiv.events.length>0&&cr.unlimitedDiv.isTargetEle(a)&&t.start(n,a,a.tagName.toLowerCase(),{$lib_method:"vtrack"})})))}},Xr={setOnlineState:function(e){if(e===!0&&r(cr.para.jsapp)&&"function"==typeof cr.para.jsapp.getData){cr.para.jsapp.isOnline=!0;var t=cr.para.jsapp.getData();v(t)&&t.length>0&&k(t,function(e){le(e)&&cr.sendState.realtimeSend(JSON.parse(e))})}else cr.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return Ur.campaignParams()},getStayTime:function(){return(new Date-cr._t)/1e3},setProfileLocal:function(e){if(!dr.isSupport())return cr.setProfile(e),!1;if(!r(e)||ae(e))return!1;var t=cr.store.readObjectVal("sensorsdata_2015_jssdk_profile"),i=!1;if(r(t)&&!ae(t)){for(var n in e)!(n in t&&t[n]!==e[n])&&n in t||(t[n]=e[n],i=!0);i&&(cr.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),cr.setProfile(e))}else cr.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),cr.setProfile(e)},setInitReferrer:function(){var e=Je();cr.setOnceProfile({_init_referrer:e,_init_referrer_host:Ur.pageProp.referrer_host})},setSessionReferrer:function(){var e=Je();cr.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:Ur.pageProp.referrer_host})},setDefaultAttr:function(){Ur.register({_current_url:location.href,_referrer:Je(),_referring_host:Ur.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var i=e.tagName.toLowerCase(),n=e.parentNode.tagName.toLowerCase(),a=cr.para.heatmap&&cr.para.heatmap.track_attr?cr.para.heatmap.track_attr:["data-sensors-click"];"button"===i||"a"===i||"a"===n||"button"===n||"input"===i||"textarea"===i||G(e,a)||Wr.start(null,e,i,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var i=e.tagName.toLowerCase();Wr.start(null,e,i,t,r)}},autoTrackSinglePage:function(e,t){function i(){var e=Ur.campaignParams(),t={};return k(e,function(e,r,i){(" "+cr.source_channel_standard+" ").indexOf(" "+r+" ")!==-1?t["$"+r]=i[r]:t[r]=i[r]}),t}function n(e,t){cr.track("$pageview",P({$referrer:a,$url:X(),$url_path:Z(),$title:document.title},e,i()),t),a=X()}var a;a=this.autoTrackIsUsed?Ur.pageProp.url:Ur.pageProp.referrer,e=r(e)?e:{};var s=!e.not_set_profile;if(e.not_set_profile&&delete e.not_set_profile,n(e,t),this.autoTrackSinglePage=n,cr.is_first_visitor&&s){var o={};cr.para.preset_properties.search_keyword_baidu&&Ue(document.referrer)&&Ie()&&(o.$search_keyword_id=Lr.id(),o.$search_keyword_id_type=Lr.type(),o.$search_keyword_id_hash=ee(o.$search_keyword_id)),cr.setOnceProfile(P({$first_visit_time:new Date,$first_referrer:Je(),$first_browser_language:p(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Me(),$first_search_keyword:Be()},i(),o)),cr.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=r(e)?e:{},this.autoTrack(P(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=r(e)?e:{};var i=Ur.campaignParams(),n={};k(i,function(e,t,r){(" "+cr.source_channel_standard+" ").indexOf(" "+t+" ")!==-1?n["$"+t]=r[t]:n[t]=r[t]});var a=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var s=location.href;if(cr.para.is_single_page&&b(function(){var r=Je(s,!0);cr.track("$pageview",P({$referrer:r,$url:X(),$url_path:Z(),$title:document.title},n,e),t),s=X()}),cr.track("$pageview",P({$referrer:Je(null,!0),$url:X(),$url_path:Z(),$title:document.title},n,e),t),cr.is_first_visitor&&a){var o={};cr.para.preset_properties.search_keyword_baidu&&Ue(document.referrer)&&Ie()&&(o.$search_keyword_id=Lr.id(),o.$search_keyword_id_type=Lr.type(),o.$search_keyword_id_hash=ee(o.$search_keyword_id)),cr.setOnceProfile(P({$first_visit_time:new Date,$first_referrer:Je(null,!0),$first_browser_language:p(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Me(),$first_search_keyword:Be()},n,o)),cr.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return ae(cr.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":cr.store._state._first_id||cr.store._state.first_id||cr.store._state._distinct_id||cr.store._state.distinct_id},setPlugin:function(t){return!!r(t)&&void k(t,function(t,i){e(t)&&(r(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[i]?t(window.SensorsDataWebJSSDKPlugin[i]):cr.log(i+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+i+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"))})},useModulePlugin:function(){cr.use.apply(cr,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}},Zr={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}},Yr={__proto__:null,addReferrerHost:Ze,addPropsHook:Ye,initPara:Ge,setInitVar:et,enableLocalLog:tt,disableLocalLog:rt,quick:it,use:nt,track:at,bind:st,unbind:ot,trackLink:lt,trackLinks:ct,setItem:ut,deleteItem:pt, +setProfile:dt,setOnceProfile:_t,appendProfile:ft,incrementProfile:gt,deleteProfile:ht,unsetProfile:mt,identify:vt,trackSignup:wt,registerPage:bt,clearAllRegister:St,clearPageRegister:kt,register:Pt,registerOnce:Nt,registerSession:$t,registerSessionOnce:Ct,login:Ot,loginWithKey:Tt,logout:At,getPresetProperties:Dt,iOSWebClickPolyfill:xt,readyState:Zr,para_default:jr,log:Ne,debug:Ar,IDENTITY_KEY:Er},Gr=function(){this._events=[],this.pendingEvents=[]};Gr.prototype={emit:function(e){var t=[].slice.call(arguments,1);k(this._events,function(r){r.type===e&&r.callback.apply(r.context,t)}),this.pendingEvents.push({type:e,data:t}),this.pendingEvents.length>20?this.pendingEvents.shift():null},on:function(e,t,r,i){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),i=i!==!1,this.pendingEvents.length>0&&i&&k(this.pendingEvents,function(i){i.type===e&&t.apply(r,i.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var Qr={__proto__:null,parseSuperProperties:Oe,searchConfigData:Te,strip_empty_properties:Ae,getCurrentDomain:De,getEleInfo:xe,isBaiduTraffic:Ie,getReferrerEqid:Ee,getReferrerEqidType:Le,getBaiduKeyword:Lr,isReferralTraffic:Ue,getReferrer:Je,getKeywordFromReferrer:Be,getWxAdIdFromUrl:Re,getReferSearchEngine:He,getSourceFromReferrer:Me,info:Ur,ajax:qe,getElementContent:Ke,cookie:Jr,addEvent:Fe,EventEmitterSa:Gr,encrypt:je,decryptIfNeeded:Ce},ei={};ei.buildData=function(e){var t={identities:{},distinct_id:cr.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(cr.lib_version)},properties:{}};return r(e)&&r(e.identities)&&!ae(e.identities)?P(t.identities,e.identities):P(t.identities,Rr._state.identities),r(e)&&r(e.properties)&&!ae(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),P(t,cr.store.getUnionId(),e),qr.stage.process("addCustomProps",t),r(e.properties)&&!ae(e.properties)&&P(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=P({},Ur.properties(),Rr.getProps(),Rr.getSessionProps(),Ur.currentProps,t.properties),cr.para.preset_properties.latest_referrer&&!p(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),cr.para.preset_properties.latest_search_keyword&&!p(t.properties.$latest_search_keyword)&&(cr.para.preset_properties.search_keyword_baidu&&p(t.properties.$search_keyword_id)&&ce(t.properties.$search_keyword_id_hash)&&p(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),cr.para.preset_properties.latest_traffic_source_type&&!p(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),cr.para.preset_properties.latest_landing_page&&!p(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===cr.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id,delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):cr.para.preset_properties.latest_wx_ad_click_id&&!p(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),p(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=X())),t.properties.$time&&x(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,cr.vtrackBase.addCustomProps(t),Oe(t),Br.checkIsAddSign(t),Br.checkIsFirstTime(t),cr.addReferrerHost(t),cr.addPropsHook(t),qr.stage.process("formatData",t),t},ei.sendData=function(e,t){var r=Te(e.properties);cr.para.debug_mode===!0?(cr.log(e),cr.saEvent.debugPath(JSON.stringify(e),t)):cr.sendState.getSendCall(e,r,t)},ei.encodeTrackData=function(e){var t=j(e),r="crc="+Q(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)};var ti=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,cr.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=It(e.server_url,e.data)};ti.prototype.start=function(){var e=this;cr.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},ti.prototype.lastClear=function(){var e=W();void 0!==e.ie?this.img.src="about:blank":this.img.src=""};var ri=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=Et(e.data)};ri.prototype.start=function(){var e=this;qe({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:cr.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var ii=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=Et(e.data)};ii.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var ni={};ni.getSendCall=function(e,t,r){if(cr.is_heatmap_render_mode)return!1;if(cr.readyState.state<3)return cr.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(i()).slice(2,5)+String(i()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var n=e;e=JSON.stringify(e);var a={data:n,config:t,callback:r};return cr.events.tempAdd("send",n),!cr.para.app_js_bridge&&cr.para.batch_send&&localStorage.length<100?(cr.log(n),cr.batchSend.add(a.data),!1):("item_set"===n.type||"item_delete"===n.type?this.prepareServerUrl(a):cr.bridge.dataSend(a,this,r),void cr.log(n))},ni.prepareServerUrl=function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(v(cr.para.server_url)&&cr.para.server_url.length)for(var t=0;t-1&&r.splice(a,1),dr.remove(e[i])}dr.set(this.tabKey,JSON.stringify(this.generateTabStorageVal(r)))}},add:function(e){var r=ai+String(i()),a=dr.get(this.tabKey);null===a?(this.tabKey=si+String(i()),a=this.generateTabStorageVal()):a=n(a)||this.generateTabStorageVal(),a.data.push(r),a.expireTime=t()+2*cr.para.batch_send.send_interval,dr.set(this.tabKey,JSON.stringify(a)),cr.store.saveObjectVal(r,e),"track_signup"!==e.type&&"$pageview"!==e.event||this.sendImmediately()},generateTabStorage:function(){this.tabKey=si+String(i()),dr.set(this.tabKey,JSON.stringify(this.generateTabStorageVal()))},generateTabStorageVal:function(e){return e=e||[],{data:e,expireTime:t()+2*cr.para.batch_send.send_interval,serverUrl:this.serverUrl}},sendImmediately:function(){this.send()},recycle:function(){for(var e={},r=1e4,i="sajssdk-lock-get-",s=0;sc.expireTime&&this.serverUrl===c.serverUrl){var p=new a(i);p.get(o,r,1e3,function(e){if(e){null===dr.get(l.tabKey)&&l.generateTabStorage();var t=n(e)||l.generateTabStorageVal();dr.set(l.tabKey,JSON.stringify(l.generateTabStorageVal((n(dr.get(l.tabKey))||this.generateTabStorageVal()).data.concat(t.data))))}})}}else if(0===o.indexOf(i)){var d=n(dr.get(o))||{expireTime:0};t()-d.expireTime>r&&dr.remove(o)}}for(var _=0;_0)for(var n=0;n"),r=d(t.pop());if("div"!==r.slice(0,3))return!1}return!0},ui.configIsMatchNew=function(e,t){if(p(e.$element_selector)&&p(t.element_selector)){if("element_selector"===t.element_field&&"equal"===t["function"])return e.$element_selector===t.element_selector;if("element_selector"===t.element_field&&"contain"===t["function"])return e.$element_selector.indexOf(t.element_selector)>-1}if(p(e.$element_path)&&p(t.element_path)){if("element_path"===t.element_field&&"equal"===t["function"])return e.$element_path===t.element_path;if("element_path"===t.element_field&&"contain"===t["function"])return e.$element_path.indexOf(t.element_path)>-1}return!1},ui.configIsMatch=function(e,t){return(!t.limit_element_content||t.element_content===e.$element_content)&&((!t.limit_element_position||t.element_position===String(e.$element_position))&&(t.element_field&&t["function"]?ui.configIsMatchNew(e,t):ui.configIsMatchOldVersion(e,t)))},ui.configIsMatchOldVersion=function(e,t){if(!t.element_path)return!1;if(void 0!==e.$element_position){if(t.element_path!==e.$element_path)return!1}else if(cr.vtrackBase.isDiv({element_path:t.element_path})){if(e.$element_path.indexOf(t.element_path)<0)return!1}else if(t.element_path!==e.$element_path)return!1;return!0},ui.filterConfig=function(e,t,i){var n=[];if(!i){var a=ui.initUrl();if(!a)return[];i=a.page_url}return"$WebClick"===e.event&&k(t,function(t){r(t)&&("webclick"===t.event_type||"appclick"===t.event_type)&&r(t.event)&&t.event.url_host===i.host&&t.event.url_path===i.pathname&&ui.configIsMatch(e.properties,t.event)&&n.push(t)}),n},ui.getPropElInLi=function(e,t){if(!(e&&g(e)&&p(t)))return null;if("li"!==e.tagName.toLowerCase())return null;var r,i=cr.heatmap.getDomSelector(e);if(i){r=i+t;var n=B(r);return n?n:null}return cr.log("----custom---\u83b7\u53d6\u540c\u7ea7\u5c5e\u6027\u5143\u7d20\u5931\u8d25\uff0cselector\u4fe1\u606f\u5f02\u5e38",i,t),null},ui.getProp=function(e,t){if(!r(e))return!1;if(!(p(e.name)&&e.name.length>0))return cr.log("----vcustom----\u5c5e\u6027\u540d\u4e0d\u5408\u6cd5,\u5c5e\u6027\u629b\u5f03",e.name),!1;var i,n,a={};if("content"===e.method){var s;if(p(e.element_selector)&&e.element_selector.length>0)s=B(e.element_selector);else{if(!t||!p(e.list_selector))return cr.log("----vcustom----\u5c5e\u6027\u914d\u7f6e\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var o=B(t.properties.$element_selector);if(!o)return cr.log("----vcustom----\u70b9\u51fb\u5143\u7d20\u83b7\u53d6\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var l=cr.heatmap.getClosestLi(o);s=ui.getPropElInLi(l,e.list_selector)}if(!s||!g(s))return cr.log("----vcustom----\u5c5e\u6027\u5143\u7d20\u83b7\u53d6\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;if("input"===s.tagName.toLowerCase())i=s.value||"";else if("select"===s.tagName.toLowerCase()){var c=s.selectedIndex;ce(c)&&g(s[c])&&(i=Ke(s[c],"select"))}else i=Ke(s,s.tagName.toLowerCase());if(e.regular){try{n=new RegExp(e.regular).exec(i)}catch(u){return cr.log("----vcustom----\u6b63\u5219\u5904\u7406\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1}if(null===n)return cr.log("----vcustom----\u5c5e\u6027\u89c4\u5219\u5904\u7406\uff0c\u672a\u5339\u914d\u5230\u7ed3\u679c,\u5c5e\u6027\u629b\u5f03",e.name),!1;if(!v(n)||!p(n[0]))return cr.log("----vcustom----\u6b63\u5219\u5904\u7406\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name,n),!1;i=n[0]}if("STRING"===e.type)a[e.name]=i;else if("NUMBER"===e.type){if(i.length<1)return cr.log("----vcustom----\u672a\u83b7\u53d6\u5230\u6570\u5b57\u5185\u5bb9\uff0c\u5c5e\u6027\u629b\u5f03",e.name,i),!1;if(isNaN(Number(i)))return cr.log("----vcustom----\u6570\u5b57\u7c7b\u578b\u5c5e\u6027\u8f6c\u6362\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name,i),!1;a[e.name]=Number(i)}return a}return cr.log("----vcustom----\u5c5e\u6027\u4e0d\u652f\u6301\u6b64\u83b7\u53d6\u65b9\u5f0f",e.name,e.method),!1},ui.getAssignConfigs=function(e,t){var i=ui.initUrl();if(!i||!i.page_url)return[];if(!r(t))return[];var n=[];return t.events=t.events||t.eventList,v(t.events)&&t.events.length>0?(k(t.events,function(t){r(t)&&r(t.event)&&t.event.url_host===i.page_url.host&&t.event.url_path===i.page_url.pathname&&e(t)&&n.push(t)}),n):[]},ui.addCustomProps=function(e){if("success"===cr.bridge.bridge_info.verify_success){var t=cr.vapph5collect.customProp.geth5Props(JSON.parse(JSON.stringify(e)));r(t)&&!ae(t)&&(e.properties=P(e.properties,t))}var i=cr.vtrackcollect.customProp.getVtrackProps(JSON.parse(JSON.stringify(e)));return r(i)&&!ae(i)&&(e.properties=P(e.properties,i)),e},ui.init=function(){cr.vtrackcollect.init(),"success"===cr.bridge.bridge_info.verify_success&&cr.vapph5collect.init()};var pi={events:[],init:function(e){this.filterWebClickEvents(e)},filterWebClickEvents:function(e){this.events=cr.vtrackcollect.getAssignConfigs(function(e){return!(!r(e)||e.event.unlimited_div!==!0||"webclick"!==e.event_type)},e)},isTargetEle:function(e){var t=cr.heatmap.getEleDetail(e);if(!r(t)||!p(t.$element_path))return!1;for(var i=0;i0)},e),this.events.length?this.configSwitch=!0:this.configSwitch=!1},getVtrackProps:function(e){var t={};return this.collectAble()?("$WebClick"===e.event&&(t=this.clickCustomPropMaker(e,this.events)),t):{}},clickCustomPropMaker:function(e,t,i){var n=this;i=i||this.filterConfig(e,t,cr.vtrackcollect.url_info.page_url);var a={};return i.length?(k(i,function(t){v(t.properties)&&t.properties.length>0&&k(t.properties,function(t){var i=n.getProp(t,e);r(i)&&P(a,i)})}),a):{}},getProp:ui.getProp,getPropElInLi:ui.getPropElInLi,filterConfig:ui.filterConfig},_i={unlimitedDiv:pi,config:{},storageEnable:!0,storage_name:"webjssdkvtrackcollect",para:{session_time:18e5,timeout:5e3,update_interval:18e5},url_info:{},timer:null,update_time:null,customProp:di,initUrl:function(){var e=ui.initUrl();if(e){var t;try{t=new _(cr.para.server_url),t._values.Path="/config/visualized/Web.conf",e.api_url=t.getUrl()}catch(r){return cr.log("----vtrackcollect---API\u5730\u5740\u89e3\u6790\u5f02\u5e38",r),!1}this.url_info=e}return e},init:function(){if(!r(cr.para.heatmap)||!cr.para.heatmap.get_vtrack_config)return!1;if(dr.isSupport()||(this.storageEnable=!1),!this.initUrl())return cr.log("----vtrackcustom----\u521d\u59cb\u5316\u5931\u8d25\uff0curl\u4fe1\u606f\u89e3\u6790\u5931\u8d25"),!1;if(this.storageEnable){var e=cr.store.readObjectVal(this.storage_name);if(r(e)&&r(e.data))if(this.serverUrlIsSame(e.serverUrl)){this.config=e.data,this.update_time=e.updateTime,this.updateConfig(e.data);var t=(new Date).getTime(),i=t-this.update_time;if(ce(i)&&i>0&&i0&&r0&&k(a.properties,function(i){if(r(i))if(i.h5===!1)v(t.sensorsdata_app_visual_properties)||(t.sensorsdata_app_visual_properties=[]),t.sensorsdata_app_visual_properties.push(i);else{var a=n.getProp(i,e);r(a)&&(t=P(t,a))}}),p(a.event_name)&&i.push(a.event_name))}),r(window.SensorsData_App_Visual_Bridge)&&window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode&&(window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode===!0||window.SensorsData_App_Visual_Bridge.sensorsdata_visualized_mode())&&(t.sensorsdata_web_visual_eventName=i)}return t.sensorsdata_app_visual_properties&&(t.sensorsdata_app_visual_properties=j(JSON.stringify(t.sensorsdata_app_visual_properties))),t},initAppGetPropsBridge:function(){var t=this;return new cr.JSBridge({type:"getJSVisualProperties",app_call_js:function(i){var n={};try{i=JSON.parse(C(i))}catch(a){cr.log("getJSVisualProperties data parse error!")}if(r(i)){var s=i.sensorsdata_js_visual_properties,o=t.initUrl();o&&(o=o.page_url,v(s)&&s.length>0&&k(s,function(e){if(r(e)&&e.url_host===o.host&&e.url_path===o.pathname&&e.h5){var i=t.getProp(e);r(i)&&(n=P(n,i))}}))}var l=cr.bridge.bridge_info.platform;if("android"===l){var c={callType:"getJSVisualProperties",data:n};r(i)&&i.message_id&&(c.message_id=i.message_id),r(window.SensorsData_APP_New_H5_Bridge)&&e(SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app)?SensorsData_APP_New_H5_Bridge.sensorsdata_js_call_app(JSON.stringify(c)):r(window.SensorsData_APP_JS_Bridge)&&e(SensorsData_APP_JS_Bridge.sensorsdata_js_call_app)&&SensorsData_APP_JS_Bridge.sensorsdata_js_call_app(JSON.stringify(c))}return n}})}},gi={events:[],customProp:fi,getAssignConfigs:ui.getAssignConfigs,initUrl:ui.initUrl,init:function(){if(this.initUrl()){var e=this.getConfigFromApp();e&&this.updateConfigs(e),this.customProp.init(),this.initAppUpdateConfigBridge()}},initAppUpdateConfigBridge:function(){var e=this;return new cr.JSBridge({type:"updateH5VisualConfig",app_call_js:function(t){if(t){try{t=JSON.parse(C(t))}catch(r){return void cr.log("updateH5VisualConfig result parse error\uff01")}e.updateConfigs(t)}}})},getConfigFromApp:function(){var e=new cr.JSBridge({type:"sensorsdata_get_app_visual_config"}),t=e.getAppData();if(t)try{t=JSON.parse(C(t))}catch(r){t=null,cr.log("getAppVisualConfig result parse error\uff01")}return t},updateConfigs:function(e){this.events=this.filterConfigs(e),this.customProp.updateEvents(this.events)},filterConfigs:function(e){return this.getAssignConfigs(function(e){return!(!r(e)||e.h5===!1)},e)}},hi=new l,mi={};mi.spa=hi,mi.initSystemEvent=function(){Bt(function(e){hi.emit("switch",e)})};var vi={getOriginalUrl:function(){function e(e){var t=e.split("&"),r=["sa-request-id","sa-request-type","sa-request-url"],i=[];return k(t,function(e){r.indexOf(e.split("=")[0])<0&&i.push(e); +}),i.join("&")}var t=location.protocol+"//"+location.host+location.pathname,r="",i="";if(location.search){var n=e(location.search.slice(1));n&&(r="?"+n)}if(location.hash&&(i=location.hash,location.hash.indexOf("?")>-1)){var a=location.hash.split("?"),s=e(a[1]);s&&(i=a[0]+"?"+s)}return decodeURI(t+r+i)},isSeachHasKeyword:function(){return null!==Rt("sa-request-id")&&("string"==typeof sessionStorage.getItem("sensors-visual-mode")&&sessionStorage.removeItem("sensors-visual-mode"),!0)},hasKeywordHandle:function(){var e=Rt("sa-request-id"),t=Rt("sa-request-type"),r=Rt("sa-request-url");Wr.setNotice(r),Sr.isSupport()&&(null!==r&&sessionStorage.setItem("sensors_heatmap_url",r),sessionStorage.setItem("sensors_heatmap_id",e),null!==t?"1"===t||"2"===t||"3"===t?sessionStorage.setItem("sensors_heatmap_type",t):t=null:t=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),this.isReady(e,t,this.getOriginalUrl())},isReady:function(e,t,r){cr.para.heatmap_url?fe({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(cr,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(cr.heatmap_version&&cr.heatmap_version===cr.lib_version||console.log("heatmap.js\u4e0esensorsdata.js\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669!")))},0)},error:function(){},type:"js",url:cr.para.heatmap_url}):cr.log("\u6ca1\u6709\u6307\u5b9aheatmap_url\u7684\u8def\u5f84")},isStorageHasKeyword:function(){return Sr.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")},storageHasKeywordHandle:function(){Wr.setNotice(),vi.isReady(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),this.getOriginalUrl())}},yi={isStorageHasKeyword:function(){return Sr.isSupport()&&"string"==typeof sessionStorage.getItem("sensors-visual-mode")},isSearchHasKeyword:function(){return(Rt("sa-visual-mode")===!0||"true"===Rt("sa-visual-mode"))&&("string"==typeof sessionStorage.getItem("sensors_heatmap_id")&&sessionStorage.removeItem("sensors_heatmap_id"),!0)},loadVtrack:function(){fe({success:function(){},error:function(){},type:"js",url:cr.para.vtrack_url?cr.para.vtrack_url:location.protocol+"//static.sensorsdata.cn/sdk/"+cr.lib_version+"/vtrack.min.js"})},messageListener:function(e){function t(e){return se(e)?ge(e):(cr.log("\u53ef\u89c6\u5316\u6a21\u5f0f\u68c0\u6d4b URL \u5931\u8d25"),!1)}if("sa-fe"!==e.data.source)return!1;if("v-track-mode"===e.data.type){if(e.data.data&&e.data.data.isVtrack)if(Sr.isSupport()&&sessionStorage.setItem("sensors-visual-mode","true"),e.data.data.userURL&&location.href.match(/sa-visual-mode=true/)){var r=t(e.data.data.userURL);r&&(window.location.href=r)}else yi.loadVtrack();window.removeEventListener("message",yi.messageListener,!1)}},removeMessageHandle:function(){window.removeEventListener&&window.removeEventListener("message",yi.messageListener,!1)},verifyVtrackMode:function(){window.addEventListener&&window.addEventListener("message",yi.messageListener,!1),yi.postMessage()},postMessage:function(){window.parent&&window.parent.postMessage&&window.parent.postMessage({source:"sa-web-sdk",type:"v-is-vtrack",data:{sdkversion:"1.22.4"}},"*")},notifyUser:function(){var e=function(t){return"sa-fe"===t.data.source&&void("v-track-mode"===t.data.type&&(t.data.data&&t.data.data.isVtrack&&alert("\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\uff0c\u8bf7\u5347\u7ea7\u90e8\u7f72\u795e\u7b56\u6570\u636e\u6cbb\u7406"),window.removeEventListener("message",e,!1)))};window.addEventListener&&window.addEventListener("message",e,!1),yi.postMessage()}},wi=["setItem","deleteItem","getAppStatus","track","quick","register","registerPage","registerOnce","trackSignup","setProfile","setOnceProfile","appendProfile","incrementProfile","deleteProfile","unsetProfile","identify","login","logout","trackLink","clearAllRegister","clearPageRegister"],bi={track:function(e,t,r){},quick:function(e,t,r,i){},register:function(e){},registerPage:function(e){},registerOnce:function(e){},clearAllRegister:function(e){},trackSignup:function(e,t,r,i){},setProfile:function(e,t){},setOnceProfile:function(e,t){},appendProfile:function(e,t){},incrementProfile:function(e,t){},deleteProfile:function(e){},unsetProfile:function(e,t){},identify:function(e,t){},login:function(e,t){},logout:function(e){},trackLink:function(e,t,r){},deleteItem:function(e,t){},setItem:function(e,t,r){},getAppStatus:function(e){},clearPageRegister:function(e){}};Zt.prototype.process=function(e,t){if(!(e&&e in this.processDef))return void Ne("process ["+e+"] is not supported");var r=this.registeredInterceptors[e];if(r&&v(r)&&r.length>0)for(var i={current:0,total:r.length},n=new Xt(t,i,cr),a=0;a=a.length:a.push(o);break;default:a.splice(s,0,o)}}}};var Si={addCustomProps:null,formatData:null},ki=new Zt(Si),Pi={init:function(){},interceptor:{formatData:{priority:0,entry:function(e){return sr(e),e}}}},Ni=window.sensors_data_pre_config,$i=!!r(Ni)&&Ni.is_compliance_enabled;cr.init=function(e){return!(cr.readyState&&cr.readyState.state&&cr.readyState.state>=2)&&($i&&lr(!0),cr.ee.initSystemEvent(),cr.setInitVar(),cr.readyState.setState(2),cr.initPara(e),cr.bridge.supportAppCallJs(),cr.detectMode(),void cr.iOSWebClickPolyfill())},$i?lr(!1):(lr(!0),zt());var Ci=cr;try{cr.modules={},"string"==typeof window.sensorsDataAnalytic201505?(cr.para=window[sensorsDataAnalytic201505].para,cr._q=window[sensorsDataAnalytic201505]._q,window[sensorsDataAnalytic201505]=cr,window.sensorsDataAnalytic201505=cr,cr.init()):"undefined"==typeof window.sensorsDataAnalytic201505?window.sensorsDataAnalytic201505=cr:Ci=window.sensorsDataAnalytic201505}catch(ji){if("object"==typeof console&&console.log)try{console.log(ji)}catch(Oi){cr.log(Oi)}}var Ti=Ci;return Ti}); \ No newline at end of file diff --git a/core/sensorsdata.mtp.min.js b/core/sensorsdata.mtp.min.js index 6a7b7399..06e5607c 100644 --- a/core/sensorsdata.mtp.min.js +++ b/core/sensorsdata.mtp.min.js @@ -1,4 +1,4 @@ -!function(e,t){return t()}(this,function(){function e(t){return"function"==typeof t||!(!t||"object"!=typeof t)&&e(t.listener)}function t(){this._events={}}function r(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function n(e){e=e||"";for(var t={},n=e.substring(1),i=n.split("&"),a=0;a Invalid URL");var r=e.split("#"),n=r[0],i=r.slice(1).join("#");t=this._regex.exec(n);for(var a in this._fields)"undefined"!=typeof t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new t(e)}function c(e){var t={},r=function(){var e;try{return e=new URL("http://modernizr.com/"),"http://modernizr.com/"===e.href}catch(t){return!1}};if("function"==typeof window.URL&&r())t=new URL(e),t.searchParams||(t.searchParams=function(){var e=n(t.search);return{get:function(t){return e[t]}}}());else{i(e)||(e=String(e)),e=a(e);var o=/^https?:\/\/.+/;if(o.test(e)===!1)return void or.log("Invalid URL");var c=s(e);t.hash=c._values.Fragment,t.host=c._values.Host?c._values.Host+(c._values.Port?":"+c._values.Port:""):"",t.href=c._values.URL,t.password=c._values.Password,t.pathname=c._values.Path,t.port=c._values.Port,t.search=c._values.QueryString?"?"+c._values.QueryString:"",t.username=c._values.Username,t.hostname=c._values.Hostname,t.protocol=c._values.Protocol?c._values.Protocol+":":"",t.origin=c._values.Origin?c._values.Origin+(c._values.Port?":"+c._values.Port:""):"",t.searchParams=function(){var e=n("?"+c._values.QueryString);return{get:function(t){return e[t]}}}()}return t}function l(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function u(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),l(e)&&e.getRandomValues){var t=new Uint32Array(1),r=e.getRandomValues(t)[0],n=Math.pow(2,32);return r/n}}return sr(1e19)/1e19}function p(e){return!(!e||1!==e.nodeType)}function d(e){return void 0===e}function f(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function _(e){return Array.isArray&&f(_)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function h(e){return new lr(e)}function g(e,t,r,n){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation,e._getPath=i._getPath),e}function a(e,t,r,n){var a=function(a){if(a=a||i(window.event)){a.target=a.srcElement;var o,s,c=!0;return"function"==typeof r&&(o=r(a)),s=t.call(e,a),"beforeunload"!==n?(!1!==o&&!1!==s||(c=!1),c):void 0}};return a}i._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||h(e.target).getParents()},i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};var o=function(e,t,r){if(void 0===n&&"click"===t&&(n=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=i._getPath,r.call(this,e)},n);else{var o="on"+t,s=e[o];e[o]=a(e,r,s,t)}};o.apply(null,arguments)}function v(e){var t="pushState"in window.history?"popstate":"hashchange";g(window,t,e)}function y(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){or.log(t)}}}function b(e,t,r){if(null==e)return!1;if(pr&&e.forEach===pr)e.forEach(t,r);else if(_(e))for(var n=0,i=e.length;n=200&&n.status<300||304==n.status?e.success(t(n.responseText)):e.error(t(n.responseText),n.status),n.onreadystatechange=null,n.onload=null)}catch(r){n.onreadystatechange=null,n.onload=null}},n.open(e.type,e.url,!0);try{e.credentials&&(n.withCredentials=!0),l(e.header)&&b(e.header,function(e,t){n.setRequestHeader&&n.setRequestHeader(t,e)}),e.data&&(e.cors||n.setRequestHeader&&n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?n.setRequestHeader&&n.setRequestHeader("Content-type","application/json; charset=UTF-8"):n.setRequestHeader&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(s){or.log(s)}n.send(e.data||null)}function k(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(b(e,function(e,n,i){r.push(t(e,n,i))}),r)}function $(e){var t=[];try{t=k(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function P(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function C(e,t){t=t||window;var r=!1,n=!0,i=t.document,a=i.documentElement,o=i.addEventListener,s=o?"addEventListener":"attachEvent",c=o?"removeEventListener":"detachEvent",l=o?"":"on",u=function(n){"readystatechange"==n.type&&"complete"!=i.readyState||(("load"==n.type?t:i)[c](l+n.type,u,!1),!r&&(r=!0)&&e.call(t,n.type||n))},p=function(){try{a.doScroll("left")}catch(e){return void setTimeout(p,50)}u("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!o&&a.doScroll){try{n=!t.frameElement}catch(d){or.log(d)}n&&p()}i[s](l+"DOMContentLoaded",u,!1),i[s](l+"readystatechange",u,!1),t[s](l+"load",u,!1)}}function O(e){return b(Array.prototype.slice.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])}),e}function N(e){var t=e;try{t=decodeURI(e)}catch(r){t=e}return t}function x(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",r=t.length-1,n={},i=0;for(i=0;i=2&&!/^(\d+\.)+\d+$/.test(n))for(var a="."+i.splice(i.length-1,1);i.length>0;)if(a="."+i.splice(i.length-1,1)+a,document.cookie=t+"=true; path=/; domain="+a,document.cookie.indexOf(t+"=true")!==-1){var o=new Date;return o.setTime(o.getTime()-1e3),document.cookie=t+"=true; expires="+o.toGMTString()+"; path=/; SameSite=Lax; domain="+a,a}return""}function U(e){function t(e,t){e=a(e);var r;if("body"===e)return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var n=e.split(":nth-of-type");if(!n[0]||!n[1])return null;var i=n[0],o=n[1].match(/\(([0-9]+)\)/);if(!o||!o[1])return null;var s=Number(o[1]);if(!(p(t)&&t.children&&t.children.length>0))return null;for(var c=t.children,l=0;l0)return null}return r?r:null}function r(e){var i,a=n.shift();if(!a)return e;try{i=t(a,e)}catch(o){or.log(o)}return i&&p(i)?r(i):null}if(!i(e))return null;var n=e.split(">"),o=null;return o=r(),o&&p(o)?o:null}function R(e,t){var r="",n="";return e.textContent?r=a(e.textContent):e.innerText&&(r=a(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),n=r||"","input"!==t&&"INPUT"!==t||(n=e.value||""),n}function J(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=c(e).hostname}catch(n){or.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function H(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function M(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=r(e);var n="[\\?&]"+t+"=([^&#]*)",i=new RegExp(n),a=i.exec(e);return null===a||a&&"string"!=typeof a[1]&&a[1].length?"":r(a[1])}function q(e){var t={},r=e.split("?"),i=r[1]||"";return i&&(t=n("?"+i)),t}function K(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function B(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(K()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function F(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function W(e){return i(e)?(e=a(e),N(e)):N(location.href)}function z(e){return i(e)?(e=a(e),N(e)):N(location.pathname)}function V(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function X(e,t){if("string"==typeof t)return V(e,t);if(_(t)){for(var r=!1,n=0;n0)for(var a=e.split(""),o=0;ot)for(i=r+i;c=n*i+s,ct;)i=i/2+s;i=n*i+s}return i}function Q(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var n=0;n41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function ce(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function le(e){if(!l(e)||!i(e.callbackName))return or.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;e.success=f(e.success)?e.success:function(){},e.error=f(e.error)?e.error:function(){},e.data=e.data||"";var t=document.createElement("script"),r=document.getElementsByTagName("head")[0],n=null,a=!1;if(r.appendChild(t),oe(e.timeout)&&(n=setTimeout(function(){return!a&&(e.error("timeout"),window[e.callbackName]=function(){or.log("call jsonp error")},n=null,r.removeChild(t),void(a=!0))},e.timeout)),window[e.callbackName]=function(){clearTimeout(n),n=null,e.success.apply(null,arguments),window[e.callbackName]=function(){or.log("call jsonp error")},r.removeChild(t)},e.url.indexOf("?")>-1?e.url+="&callbackName="+e.callbackName:e.url+="?callbackName="+e.callbackName,l(e.data)){var o=[];b(e.data,function(e,t){o.push(t+"="+e)}),e.data=o.join("&"),e.url+="&"+e.data}t.onerror=function(i){return!a&&(window[e.callbackName]=function(){or.log("call jsonp error")},clearTimeout(n),n=null,r.removeChild(t),e.error(i),void(a=!0))},t.src=e.url}function ue(e){var t={visibleHandler:f(e.visible)?e.visible:function(){},hiddenHandler:f(e.hidden)?e.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;g(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else g(window,"focus",this.visibleHandler),g(window,"blur",this.hiddenHandler)}};t.init()}function pe(e){e=w({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&(t=document.createElement("link"),t.rel="stylesheet",t.href=e.url),"js"===e.type&&(t=document.createElement("script"),t.async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function de(){return Date.now&&f(Date.now)?Date.now():(new Date).getTime()}function fe(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function _e(e,t){e=String(e),t="number"==typeof t?t:13;for(var r=126,n=e.split(""),i=0,a=n.length;it?(o&&(clearTimeout(o),o=null),s=l,a=e.apply(n,i),o||(n=i=null)):o||r.trailing===!1||(o=setTimeout(c,u)),a}}function we(e){var t=[];return null==e?t:(b(e,function(e){t[t.length]=e}),t)}function Se(e){return e?e.toArray?e.toArray():_(e)||ee(e)?Array.prototype.slice.call(e):we(e):[]}function ke(e){for(var t,r=[],n={},i=0;iir.para.datasend_timeout&&(ir.para.datasend_timeout=ir.para.callback_timeout),ir.para.heatmap&&ir.para.heatmap.collect_tags&&l(ir.para.heatmap.collect_tags)&&b(ir.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&ir.heatmap.otherTags.push(t)}),ir.para.heatmap&&"default"===ir.para.heatmap.clickmap&&ir.heatmap.initUnlimitedTags()}function Qe(e){var t={};for(var r in e)t[r]=e[r];ir.store._state.identities=t,ir.store.save()}function Ge(){ir._t=ir._t||1*new Date,ir.lib_version=Nr,ir.is_first_visitor=!1,ir.source_channel_standard=Or}function et(){if(mr.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){ir.log("enableLocalLog error: "+e.message)}}function tt(){mr.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")}function rt(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&Br[t]?Br[t].apply(Br,r):void("function"==typeof t?t.apply(ir,r):ir.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0]))}function nt(e,t){return i(e)?l(window.SensorsDataWebJSSDKPlugin)&&l(window.SensorsDataWebJSSDKPlugin[e])&&f(window.SensorsDataWebJSSDKPlugin[e].init)?(window.SensorsDataWebJSSDKPlugin[e].init(ir,t),window.SensorsDataWebJSSDKPlugin[e]):l(ir.modules)&&l(ir.modules[e])&&f(ir.modules[e].init)?(ir.modules[e].init(ir,t),ir.modules[e]):void ir.log(e+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+e+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"):(ir.log("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1)}function it(e,t,r){Mr.check({event:e,properties:t})&&Mr.send({type:"track",event:e,properties:t},r)}function at(e,t){return!!Mr.check({bindKey:e,bindValue:t})&&(ir.store._state.identities[e]=t,ir.store.save(),void Mr.send({type:"track_id_bind",event:"$BindID",properties:{}}))}function ot(e,t){if(!Mr.check({unbindKey:e,bindValue:t}))return!1;if(l(ir.store._state.identities)&&ir.store._state.identities.hasOwnProperty(e)&&ir.store._state.identities[e]===t){var r=ir.store.getUnionId().login_id;r&&e+"+"+t===r&&(ir.store._state.distinct_id=ir.store._state.first_id,ir.store._state.first_id="",ir.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete ir.store._state.identities[e],ir.store.save())}var n={};n[e]=t,Mr.send({identities:n,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function st(e,t,r){function n(e,t,r){function n(e){function n(){a||(a=!0,location.href=i.href)}e.stopPropagation(),e.preventDefault();var a=!1;setTimeout(n,1e3),ir.track(t,r,n)}e=e||{};var i=null;return e.ele&&(i=e.ele),e.event&&(i=e.target?e.target:e.event.target),r=r||{},!(!i||"object"!=typeof i)&&(!i.href||/^javascript/.test(i.href)||i.target||i.download||i.onclick?(ir.track(t,r),!1):(e.event&&n(e.event),void(e.ele&&Fe(e.ele,"click",function(e){n(e)}))))}"object"==typeof e&&e.tagName?n({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&n(e,t,r)}function ct(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void Fe(e,"click",function(n){function i(){a||(a=!0,location.href=e.href)}n.preventDefault();var a=!1; -setTimeout(i,1e3),ir.track(t,r,i)}))}function lt(e,t,r){Mr.check({item_type:e,item_id:t,properties:r})&&Mr.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function ut(e,t){Mr.check({item_type:e,item_id:t})&&Mr.sendItem({type:"item_delete",item_type:e,item_id:t})}function pt(e,t){Mr.check({propertiesMust:e})&&Mr.send({type:"profile_set",properties:e},t)}function dt(e,t){Mr.check({propertiesMust:e})&&Mr.send({type:"profile_set_once",properties:e},t)}function ft(e,t){Mr.check({propertiesMust:e})&&(b(e,function(t,r){i(t)?e[r]=[t]:_(t)?e[r]=t:(delete e[r],ir.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),re(e)||Mr.send({type:"profile_append",properties:e},t))}function _t(e,t){function r(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}var n=e;i(e)&&(e={},e[n]=1),Mr.check({propertiesMust:e})&&(r(e)?Mr.send({type:"profile_increment",properties:e},t):ir.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"))}function ht(e){Mr.send({type:"profile_delete"},e),Lr.set("distinct_id",cr()),Lr.set("first_id","")}function gt(e,t){var r=e,n={};i(e)&&(e=[],e.push(r)),_(e)?(b(e,function(e){i(e)?n[e]=!0:ir.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),Mr.send({type:"profile_unset",properties:n},t)):ir.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")}function mt(e,t){function r(e){ir.store._state.identities.$identity_anonymous_id=e,ir.store.save()}"number"==typeof e&&(e=String(e));var n=Lr.getFirstId();if("undefined"==typeof e){var i=cr();n?Lr.set("first_id",i):Lr.set("distinct_id",i),r(i)}else Mr.check({distinct_id:e})&&(t===!0?n?Lr.set("first_id",e):Lr.set("distinct_id",e):n?Lr.change("first_id",e):Lr.change("distinct_id",e),r(e))}function vt(e,t,r,n){var i=Lr.getFirstId()||Lr.getDistinctId();Lr.set("distinct_id",e),Mr.send({original_id:i,distinct_id:ir.store.getDistinctId(),type:"track_signup",event:t,properties:r},n)}function yt(e,t,r,n){"number"==typeof e&&(e=String(e)),Mr.check({distinct_id:e,event:t,properties:r})&&vt(e,t,r,n)}function bt(e){Mr.check({properties:e})?w(Dr.currentProps,e):ir.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function wt(e){Lr.clearAllProps(e)}function St(e){var t;if(_(e)&&e.length>0)for(t=0;t-1?e.config.send_type:ir.para.send_type,"beacon"===r&&se()===!1&&(r="image"),"ajax"===r&&ce()===!1&&(r="image"),r}function Lt(e){var t=It(e);switch(t){case"image":return new Zr(e);case"ajax":return new Yr(e);case"beacon":return new Qr(e);default:return new Zr(e)}}function Ut(e){var t=Lt(e),r=t.start;return t.start=function(){var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},ir.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},ir.para.datasend_timeout-ir.para.callback_timeout)},t.isEnd=function(){this.received||(this.received=!0,this.end())},t}function Rt(){b(en,function(e){var t=ir[e];ir[e]=function(){if(ir.readyState.state<3)return _(ir._q)||(ir._q=[]),ir._q.push([e,arguments]),!1;{if(ir.readyState.getState())return t.apply(ir,arguments);try{console.error("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}catch(r){ir.log(r)}}}})}function Jt(){ir.para.is_track_single_page&&tn.on("switch",function(e){var t=function(t){t=t||{},e!==location.href&&(Dr.pageProp.referrer=W(e),ir.quick("autoTrack",w({$url:W(),$referrer:W(e)},t)))};if("boolean"==typeof ir.para.is_track_single_page)t();else if("function"==typeof ir.para.is_track_single_page){var r=ir.para.is_track_single_page();l(r)?t(r):r===!0&&t()}})}function Ht(){ir._q&&_(ir._q)&&ir._q.length>0&&b(ir._q,function(e){ir[e[0]].apply(ir,Array.prototype.slice.call(e[1]))}),l(ir.para.heatmap)&&(Kr.initHeatmap(),Kr.initScrollmap())}function Mt(){ir.readyState.setState(3),Dr.initPage(),Jt(),ir.store.init(),ir.readyState.setState(4),Ht()}function qt(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function Kt(e,t,r){var n=null;try{n=JSON.parse(JSON.stringify(e))}catch(i){$e(i)}this.getOriginalData=function(){return n},this.getPosition=function(){return t},this.cancelationToken=new qt,this.sensors=r}function Bt(e){if(!l(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}function Ft(e){e&&e.dataStage&&nn.registerStageImplementation(e.dataStage)}function Wt(e){e.kit=Xr,e.saEvent=Mr,this.dataStage=Hr}function zt(e){return l(e)?(b(e,function(t,r){if(_(t)){var n=[];b(t,function(e){i(e)?n.push(e):$e("\u60a8\u7684\u6570\u636e-",r,t,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),e[r]=n}i(t)||oe(t)||T(t)||te(t)||_(t)||f(t)||"$option"===r||($e("\u60a8\u7684\u6570\u636e-",r,t,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete e[r])}),e):e}function Vt(e,t){return oe(t)&&e.length>t?($e("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function Xt(e){var t=["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"];l(e)&&b(t,function(t,r){t in e&&(r<3?(delete e[t],$e("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):$e("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d"))})}function Zt(e){var t=["$element_selector","$element_path"],r=["sensorsdata_app_visual_properties"];l(e)&&b(e,function(n,a){if(l(n))Zt(e[a]);else if(i(n)){if(Q(r,a)>-1)return;e[a]=Vt(n,Q(t,a)>-1?1024:Sr.max_string_length)}})}function Yt(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function Qt(e){if("item_type"in e){var t=e.item_type,r=function(t){return t||delete e.item_type,!0};Ve({item_type:t},r)}if("item_id"in e){var n=e.item_id,i=function(t,r,n){return t||"string"!==n||delete e.item_id,!0};Ve({item_id:n},i)}}function Gt(e){b(e,function(t,r){var n=function(t,n,i){return t||"keyLength"===i||delete e[r],!0};Ve({propertyKey:r},n)})}function er(e){var t=e.properties;l(t)?(zt(t),Xt(t),Yt(e),Gt(t),Zt(t)):"properties"in e&&(e.properties={}),me(e),Qt(e)}function tr(){this.dataStage=an}function rr(e,t){if(!i(e))return $e("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1;if(l(window.SensorsDataWebJSSDKPlugin)&&l(window.SensorsDataWebJSSDKPlugin[e])&&f(window.SensorsDataWebJSSDKPlugin[e].__constructor__)){var r=new window.SensorsDataWebJSSDKPlugin[e].__constructor__;return r.init(ir,t),r}$e(e+"\u591a\u7248\u672c SDK\uff0c\u4e0d\u652f\u6301"+e+"\u63d2\u4ef6\uff01")}function nr(){}var ir={};(function(){function e(n,i){function a(e,t){try{e()}catch(r){t&&t()}}function o(e){if(null!=o[e])return o[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=o("json-stringify")&&o("date-serialization")&&o("json-parse");else if("date-serialization"==e){if(t=o("json-stringify")&&b){var r=i.stringify;a(function(){t='"-271821-04-20T00:00:00.000Z"'==r(new p((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==r(new p(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new p((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==r(new p((-1)))})}}else{var n,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var r=i.stringify,u="function"==typeof r;u&&((n=function(){return 1}).toJSON=n,a(function(){u="0"===r(0)&&"0"===r(new c)&&'""'==r(new l)&&r(v)===g&&r(g)===g&&r()===g&&"1"===r(n)&&"[1]"==r([n])&&"[null]"==r([g])&&"null"==r(null)&&"[null,null,null]"==r([g,v,null])&&r({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==s&&"1"===r(null,n)&&"[\n 1,\n 2\n]"==r([1,2],null,1)},function(){u=!1})),t=u}if("json-parse"==e){var d,f=i.parse;"function"==typeof f&&a(function(){0!==f("0")||f(!1)||(n=f(s),d=5==n.a.length&&1===n.a[0],d&&(a(function(){d=!f('"\t"')}),d&&a(function(){d=1!==f("01")}),d&&a(function(){d=1!==f("1.")})))},function(){d=!1}),t=d}}return o[e]=!!t}function s(e){return D(this)}n||(n=r.Object()),i||(i=r.Object());var c=n.Number||r.Number,l=n.String||r.String,u=n.Object||r.Object,p=n.Date||r.Date,d=n.SyntaxError||r.SyntaxError,f=n.TypeError||r.TypeError,_=n.Math||r.Math,h=n.JSON||r.JSON;if("object"==typeof h&&h)return i.stringify=h.stringify,i.parse=h.parse,i.runInContext=e,i;var g,m=u.prototype,v=m.toString,y=m.hasOwnProperty,b=new p((-0xc782b5b800cec));if(a(function(){b=b.getUTCFullYear()==-109252&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}),o["bug-string-char-index"]=o["date-serialization"]=o.json=o["json-stringify"]=o["json-parse"]=null,!o("json")){var w="[object Function]",S="[object Date]",k="[object Number]",$="[object String]",P="[object Array]",C="[object Boolean]",O=o("bug-string-char-index"),N=function(e,r){var n,i,a,o=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n;for(a in i)y.call(i,a)&&o++;return n=i=null,o?N=function(e,t){var r,n,i=v.call(e)==w;for(r in e)i&&"prototype"==r||!y.call(e,r)||(n="constructor"===r)||t(r);(n||y.call(e,r="constructor"))&&t(r)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],N=function(e,r){var n,a,o=v.call(e)==w,s=!o&&"function"!=typeof e.constructor&&t[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(n in e)o&&"prototype"==n||!s.call(e,n)||r(n);for(a=i.length;n=i[--a];)s.call(e,n)&&r(n)}),N(e,r)};if(!o("json-stringify")&&!o("date-serialization")){var x={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},T="000000",j=function(e,t){return(T+(t||0)).slice(-e)},D=function(e){var t,r,n,i,a,o,s,c,l;if(b)t=function(e){r=e.getUTCFullYear(),n=e.getUTCMonth(),i=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),c=e.getUTCSeconds(),l=e.getUTCMilliseconds()};else{var u=_.floor,p=[0,31,59,90,120,151,181,212,243,273,304,334],d=function(e,t){return p[t]+365*(e-1970)+u((e-1969+(t=+(t>1)))/4)-u((e-1901+t)/100)+u((e-1601+t)/400)};t=function(e){for(i=u(e/864e5),r=u(i/365.2425)+1970-1;d(r+1,0)<=i;r++);for(n=u((i-d(r,0))/30.42);d(r,n+1)<=i;n++);i=1+i-d(r,n),a=(e%864e5+864e5)%864e5,o=u(a/36e5)%24,s=u(a/6e4)%60,c=u(a/1e3)%60,l=a%1e3}}return(D=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+j(6,r<0?-r:r):j(4,r))+"-"+j(2,n+1)+"-"+j(2,i)+"T"+j(2,o)+":"+j(2,s)+":"+j(2,c)+"."+j(3,l)+"Z",r=n=i=o=s=c=l=null):e=null,e})(e)};if(o("json-stringify")&&!o("date-serialization")){var A=i.stringify;i.stringify=function(e,t,r){var n=p.prototype.toJSON;p.prototype.toJSON=s;var i=A(e,t,r);return p.prototype.toJSON=n,i}}else{var E="\\u00",I=function(e){var t=e.charCodeAt(0),r=x[t];return r?r:E+j(2,t.toString(16))},L=/[\x00-\x1f\x22\x5c]/g,U=function(e){return L.lastIndex=0,'"'+(L.test(e)?e.replace(L,I):e)+'"'},R=function(e,t,r,n,i,o,s){var c,l,u,d,_,h,m,y,b;if(a(function(){c=t[e]}),"object"==typeof c&&c&&(c.getUTCFullYear&&v.call(c)==S&&c.toJSON===p.prototype.toJSON?c=D(c):"function"==typeof c.toJSON&&(c=c.toJSON(e))),r&&(c=r.call(t,e,c)),c==g)return c===g?c:"null";switch(l=typeof c,"object"==l&&(u=v.call(c)),u||l){case"boolean":case C:return""+c;case"number":case k:return c>-1/0&&c<1/0?""+c:"null";case"string":case $:return U(""+c)}if("object"==typeof c){for(m=s.length;m--;)if(s[m]===c)throw f();if(s.push(c),d=[],y=o,o+=i,u==P){for(h=0,m=c.length;h0)for(n>10&&(n=10),i="";i.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||K();e+=M("0x"+a.slice(t,J));break;default:K()}else{if(34==i)break;for(i=a.charCodeAt(J),t=J;i>=32&&92!=i&&34!=i;)i=a.charCodeAt(++J);e+=a.slice(t,J)}if(34==a.charCodeAt(J))return J++,e;K();default:if(t=J,45==i&&(n=!0,i=a.charCodeAt(++J)),i>=48&&i<=57){for(48==i&&(i=a.charCodeAt(J+1),i>=48&&i<=57)&&K(),n=!1;J=48&&i<=57);J++);if(46==a.charCodeAt(J)){for(r=++J;r57));r++);r==J&&K(),J=r}if(i=a.charCodeAt(J),101==i||69==i){for(i=a.charCodeAt(++J),43!=i&&45!=i||J++,r=J;r57));r++);r==J&&K(),J=r}return+a.slice(t,J)}n&&K();var s=a.slice(J,J+4);if("true"==s)return J+=4,!0;if("fals"==s&&101==a.charCodeAt(J+4))return J+=5,!1;if("null"==s)return J+=4,null;K()}return"$"},F=function(e){var t,r;if("$"==e&&K(),"string"==typeof e){if("@"==(O?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=B(),"]"!=e;)r?","==e?(e=B(),"]"==e&&K()):K():r=!0,","==e&&K(),t.push(F(e));return t}if("{"==e){for(t={};e=B(),"}"!=e;)r?","==e?(e=B(),"}"==e&&K()):K():r=!0,","!=e&&"string"==typeof e&&"@"==(O?e.charAt(0):e[0])&&":"==B()||K(),t[e.slice(1)]=F(B());return t}K()}return e},W=function(e,t,r){var n=z(e,t,r);n===g?delete e[t]:e[t]=n},z=function(e,t,r){var n,i=e[t];if("object"==typeof i&&i)if(v.call(i)==P)for(n=i.length;n--;)W(v,N,i,n,r);else N(i,function(e){W(i,e,r)});return r.call(e,t,i)};i.parse=function(e,t){var r,n;return J=0,H=""+e,r=F(B()),"$"!=B()&&K(),J=H=null,t&&v.call(t)==w?z((n={},n[""]=r,n),"",t):r}}}return i.runInContext=e,i}var t={"function":!0,object:!0},r=t[typeof window]&&window||this,n=r.JSON,i=r.JSON3,a=!1,o=e(r,r.JSON3={noConflict:function(){return a||(a=!0,r.JSON=n,r.JSON3=i,n=i=null),o}});r.JSON={parse:o.parse,stringify:o.stringify}}).call(window),function(e,t){t(e)}(window,function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=function(e){var t=function(t){return e(String(t).replace(/[\t\n\f\r ]+/g,""))};return t.original=e,t}(e.atob)}else{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,n,i,a,o="",s=0,c=e.length%3;s255||(i=e.charCodeAt(s++))>255||(a=e.charCodeAt(s++))>255)return"";t=n<<16|i<<8|a,o+=r.charAt(t>>18&63)+r.charAt(t>>12&63)+r.charAt(t>>6&63)+r.charAt(63&t)}return c?o.slice(0,c-3)+"===".substring(c):o},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!n.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,i,a,o="",s=0;s>16&255):64===a?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}}}),function(){String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)})}(),t.prototype.on=function(t,r){if(!t||!r)return!1;if(!e(r))throw new Error("listener must be a function");this._events[t]=this._events[t]||[];var n="object"==typeof r;return this._events[t].push(n?r:{listener:r,once:!1}),this},t.prototype.prepend=function(t,r){if(!t||!r)return!1;if(!e(r))throw new Error("listener must be a function");this._events[t]=this._events[t]||[];var n="object"==typeof r;return this._events[t].unshift(n?r:{listener:r,once:!1}),this},t.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},t.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},t.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var n=0,i=r.length;n=4&&(a=e(a,i),i=[]);return i.length>0&&(a=e(a,i)),a.toString(16)};return function(){var n=String(screen.height*screen.width);n=n&&/\d{5,}/.test(n)?n.toString(16):String(31242*u()).replace(".","").slice(0,8);var i=e()+"-"+t()+"-"+r()+"-"+n+"-"+e();return i?i:(String(u())+String(u())+String(u())).slice(2,15)}}(),lr=function(e){this.ele=e},ur=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};lr.prototype={addClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")===-1&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1},attr:function(e,t){return"string"==typeof e&&d(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument,r=t.documentElement;return{top:e.top+window.pageYOffset-r.clientTop,left:e.left+window.pageXOffset-r.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),h(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!_(r))return null;for(var n=r.length-1;n>=0;n--){var i=r[n];if(t=i.style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return ur((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return ur(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return e=e&&11!==e.nodeType?e:null,h(e)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return h(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return h(e);return h(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),n=[],i=0;i0&&(e=e.concat(Sr.source_channel),e=ke(e)),b(e,function(e){t=M(location.href,e),t.length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=Dr.campaignParams(),n={},i={};return b(r,function(r,a,o){(" "+Or+" ").indexOf(" "+a+" ")!==-1?n[e+a]=o[a]:i[t+a]=o[a]}),{$utms:n,otherUtms:i}},properties:function(){var e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,r={$timezone_offset:(new Date).getTimezoneOffset(),$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$viewport_height:e,$viewport_width:t,$lib:"js",$lib_version:Nr};return r},currentProps:{},register:function(e){w(Dr.currentProps,e)}},Ar={get:function(e){return _r.get(e)},set:function(e,t,r,n){var i="";if(n="undefined"==typeof n?Sr.cross_subdomain:n){var a=je(location.href);"url\u89e3\u6790\u5931\u8d25"===a&&(a=""),i=a?"; domain="+a:""}return _r.set(e,t,r,n,Sr.set_cookie_samesite,Sr.is_secure_cookie,i)},remove:function(e,t){return t="undefined"==typeof t?Sr.cross_subdomain:t,_r.remove(e,t)},isSupport:function(e,t){return e=e||"sajssdk_2015_cookie_access_test",t=t||"1",_r.isSupport(e,t)}};Ar.getNewUser=ze;var Er={data:{},get:function(e){var t=this.data[e];return void 0===t?null:void 0!==t._expirationTimestamp_?(new Date).getTime()>t._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var n,i=new Date;n="s"===String(r).slice(-1)?i.getTime()+1e3*Number(String(r).slice(0,-1)):i.getTime()+24*r*60*60*1e3,t={value:t,_expirationTimestamp_:n}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+Sr.sdk_id+e}},Ir={checkIsAddSign:function(e){"track"===e.type&&(ze()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=Ar.get("sensorsdata2015jssdkcross"+ir.para.sdk_id);r=Ce(r);var n={};null!=r&&ae(r)&&(n=JSON.parse(r),n.$device_id&&(t=n.$device_id)),t=t||e,ir.para.cross_subdomain===!0?ir.store.set("$device_id",t):(n.$device_id=t, -n=JSON.stringify(n),ir.para.encrypt_cookie&&(n=Oe(n)),Ar.set("sensorsdata2015jssdkcross"+ir.para.sdk_id,n,null,!0)),ir.para.is_track_device_id&&(Dr.currentProps.$device_id=t)},storeInitCheck:function(){if(ir.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};Ar.isSupport()?Ar.set(We("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):Er.set(Er.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else ze()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=Dr.pageProp.url_domain,t={};""===e&&(e="url\u89e3\u6790\u5931\u8d25");var r=Je(document.referrer,!0);if(ir.para.preset_properties.search_keyword_baidu?Le(document.referrer)&&(!Ae()||l(r)&&r.active?ir.store._state&&ir.store._state.props&&(ir.store._state.props.$search_keyword_id&&delete ir.store._state.props.$search_keyword_id,ir.store._state.props.$search_keyword_id_type&&delete ir.store._state.props.$search_keyword_id_type,ir.store._state.props.$search_keyword_id_hash&&delete ir.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=jr.id(),t.$search_keyword_id_type=jr.type(),t.$search_keyword_id_hash=Y(t.$search_keyword_id))):ir.store._state&&ir.store._state.props&&(ir.store._state.props.$search_keyword_id&&delete ir.store._state.props.$search_keyword_id,ir.store._state.props.$search_keyword_id_type&&delete ir.store._state.props.$search_keyword_id_type,ir.store._state.props.$search_keyword_id_hash&&delete ir.store._state.props.$search_keyword_id_hash),ir.store.save(),b(ir.para.preset_properties,function(r,n){if(n.indexOf("latest_")===-1)return!1;if(n=n.slice(7),r){if("wx_ad_click_id"===n&&"not_collect"===r)return!1;if("utm"!==n&&"url\u89e3\u6790\u5931\u8d25"===e)"wx_ad_click_id"===n?(t._latest_wx_ad_click_id="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_hash_key="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_callbacks="url\u7684domain\u89e3\u6790\u5931\u8d25"):t["$latest_"+n]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(Le(document.referrer))switch(n){case"traffic_source_type":t.$latest_traffic_source_type=Me();break;case"referrer":t.$latest_referrer=Dr.pageProp.referrer;break;case"search_keyword":Je()?t.$latest_search_keyword=Je():l(ir.store._state)&&l(ir.store._state.props)&&ir.store._state.props.$latest_search_keyword&&delete ir.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=W();break;case"wx_ad_click_id":var i=He(location.href);t._latest_wx_ad_click_id=i.click_id,t._latest_wx_ad_hash_key=i.hash_key,t._latest_wx_ad_callbacks=i.callbacks}}else if("utm"===n&&ir.store._state&&ir.store._state.props)for(var a in ir.store._state.props)(0===a.indexOf("$latest_utm")||0===a.indexOf("_latest_")&&a.indexOf("_latest_wx_ad_")<0)&&delete ir.store._state.props[a];else if(ir.store._state&&ir.store._state.props&&"$latest_"+n in ir.store._state.props)delete ir.store._state.props["$latest_"+n];else if("wx_ad_click_id"==n&&ir.store._state&&ir.store._state.props&&r===!1){var o=["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"];b(o,function(e){e in ir.store._state.props&&delete ir.store._state.props[e]})}}),ir.register(t),ir.para.preset_properties.latest_utm){var n=Dr.campaignParamsStandard("$latest_","_latest_"),i=n.$utms,a=n.otherUtms;re(i)||ir.register(i),re(a)||ir.register(a)}}},Lr={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={};e=e||this._state;var r=e._first_id||e.first_id,n=e._distinct_id||e.distinct_id;return r&&n?(t.login_id=n,t.anonymous_id=r):t.anonymous_id=n,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==ir.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=Ar.get("sensorsdata2015session");e=Ce(e);var t=null;null!==e&&"object"==typeof(t=ge(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&ir.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;w(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;O(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};r=t?e:w(this._state.props||{},e);for(var n in r)"string"==typeof r[n]&&(r[n]=r[n].slice(0,ir.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};O(t,e),this.set("props",t)},clearAllProps:function(e){this._sessionState={};var t;if(_(e)&&e.length>0)for(t=0;tSr.max_id_length)},keyLength:function(e){return!(!i(e)||e.length>Sr.max_key_length)},stringLength:function(e){return!(!i(e)||e.length>Sr.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(Q(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(Q(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=Lr._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(Q(this.bindReservedNames,e)>-1)}},Jr={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Id"),f(Ur[r])&&Ur[r](t),"idLength"===r)||e}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="eventName"),f(Ur[r])&&Ur[r](t)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="Property key"),f(Ur[r])&&Ur[r](t)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(e,t,r){return e||(t="Property Value",f(Ur[r])&&Ur[r](t)),!0}},properties:function(e){return l(e)?b(e,function(e,t){Ve({propertyKey:t});var r=function(e,r,n){return e||(r=t+"'s Value",f(Ur[n])&&Ur[n](r)),!0};Ve({propertyValue:e},r)}):Rr.voidZero(e)&&$e("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return void 0!==e&&l(e)&&!re(e)?this.properties.call(this,e):$e("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_type"),f(Ur[r])&&Ur[r](t)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(e,t,r){return e||("emptyString"===r&&(t="item_id"),f(Ur[r])&&Ur[r](t)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="login_id_key"),f(Ur[r])&&Ur[r](t),"keyLength"===r)||e}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),f(Ur[r])&&Ur[r](t),"keyLength"===r)||e}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Key"),f(Ur[r])&&Ur[r](t),"keyLength"===r)||e}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(e,t,r){return!e&&("emptyString"===r&&(t="Value"),f(Ur[r])&&Ur[r](t),"idLength"===r)||e}},check:function(e,t,r){var n=this[e];if(f(n))return n.call(this,t);if(!n)return!1;for(var i=0;i-1)return n;if("area"===i&&"map"===a.tagName.toLowerCase()&&h(a).prev().tagName&&"img"===h(a).prev().tagName.toLowerCase())return h(a).prev();if("div"===i&&ir.para.heatmap.collect_tags.div&&r.isDivLevelValid(n)){var s=ir.para.heatmap&&ir.para.heatmap.collect_tags&&ir.para.heatmap.collect_tags.div&&ir.para.heatmap.collect_tags.div.max_level||1;if(s>1||r.isCollectableDiv(n))return n}if(r.isStyleTag(i)&&ir.para.heatmap.collect_tags.div){var c=r.getCollectableParent(n);if(c&&r.isDivLevelValid(c))return c}var l=r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)});return l||null},getDivLevels:function(e,t){var r=Kr.getElementPath(e,!0,t),n=r.split(" > "),i=0;return b(n,function(e){"div"===e&&i++}),i},isDivLevelValid:function(e){for(var t=ir.para.heatmap&&ir.para.heatmap.collect_tags&&ir.para.heatmap.collect_tags.div&&ir.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),n=r.length-1;n>=0;n--)if(Kr.getDivLevels(r[n],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var n=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){n.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){n.unshift(e.tagName.toLowerCase());break}if(e===document.body){n.unshift("body");break}n.unshift(e.tagName.toLowerCase()),e=e.parentNode}return n.join(" > ")},getClosestLi:function(e){var t=function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null};return t(e,"li")},getElementPosition:function(e,t,r){function n(e){var t=e.parentNode;if(!t)return"";var r=h(e).getSameTypeSiblings(),n=r.length;if(1===n)return 0;for(var i=0,a=e;h(a).previousElementSibling().ele;a=h(a).previousElementSibling().ele,i++);return i}var i=ir.heatmap.getClosestLi(e);if(!i)return null;var a=e.tagName.toLowerCase(),o=i.getElementsByTagName(a),s=o.length,c=[];if(s>1){for(var l=0;l1)return Q(c,e)}return n(i)},setNotice:function(e){ir.is_heatmap_render_mode=!0,ir.para.heatmap||(ir.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(ir.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),ir.para.heatmap_url||(ir.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+ir.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,n=e.parentNode.children,i=0;i "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=De({target:e});r.$element_selector=t?t:"",r.$element_path=ir.heatmap.getElementPath(e,ir.para.heatmap&&"not_use_id"===ir.para.heatmap.element_selector);var n=ir.heatmap.getElementPosition(e,r.$element_path,ir.para.heatmap&&"not_use_id"===ir.para.heatmap.element_selector);return oe(n)&&(r.$element_position=n),r},getPointerEventProp:function(e,t){function r(){var e=document.body.scrollLeft||document.documentElement.scrollLeft||0,t=document.body.scrollTop||document.documentElement.scrollTop||0;return{scrollLeft:e,scrollTop:t}}function n(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function i(e){return Number(Number(e).toFixed(3))}function a(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+n(t).targetEleX||0,o=e.pageY||e.clientY+r().scrollTop||e.offsetY+n(t).targetEleY||0;return{$page_x:i(a),$page_y:i(o)}}return e?a(e):{}},start:function(e,t,r,n,i){var a=l(n)?n:{},o=f(i)?i:f(n)?n:void 0;if(ir.para.heatmap&&ir.para.heatmap.collect_element&&!ir.para.heatmap.collect_element(t))return!1;var s=this.getEleDetail(t);if(ir.para.heatmap&&ir.para.heatmap.custom_property){var c=ir.para.heatmap.custom_property(t);l(c)&&(s=w(s,c))}s=w(s,this.getPointerEventProp(e,t),a),"a"===r&&ir.para.heatmap&&ir.para.heatmap.isTrackLink===!0?ir.trackLink({event:e,target:t},"$WebClick",s):ir.track("$WebClick",s,o)},hasElement:function(e,t){var r;if(e.event){var n=e.event;r=n.path||n._getPath&&n._getPath()}else e.element&&(r=h(e.element).getParents());if(r&&_(r)&&r.length>0)for(var i=0;i-1)&&(!t||ir.para.heatmap&&ir.para.heatmap.collect_tags&&ir.para.heatmap.collect_tags.div?!!(l(ir.para.heatmap)&&l(ir.para.heatmap.collect_tags)&&l(ir.para.heatmap.collect_tags.div)&&_(ir.para.heatmap.collect_tags.div.ignore_tags)&&Q(ir.para.heatmap.collect_tags.div.ignore_tags,e)>-1):Q(n,e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(n,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(a){ir.log(a)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,n=r?r.tagName.toLowerCase():"";if("body"===n)return!1;var i=ir.para&&ir.para.heatmap&&ir.para.heatmap.collect_tags&&ir.para.heatmap.collect_tags.div&&ir.para.heatmap.collect_tags.div.max_level;if(n&&"div"===n&&(i>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(n,t))return this.getCollectableParent(r,t)}catch(a){ir.log(a)}return!1},listenUrlChange:function(e){e(),ir.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!l(ir.para.heatmap)||"default"!==ir.para.heatmap.scroll_notice_map)return!1;var e=!0;ir.para.scrollmap&&f(ir.para.scrollmap.collect_url)&&this.listenUrlChange(function(){e=!!ir.para.scrollmap.collect_url()});var t=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t},r=t({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,n=new Date,i=n-this.current_time;(i>ir.para.heatmap.scroll_delay_time&&r-e.$viewport_position!==0||t)&&(e.$url=W(),e.$title=document.title,e.$url_path=z(),e.event_duration=Math.min(ir.para.heatmap.scroll_event_duration,parseInt(i)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,ir.track("$WebStay",e)),this.current_time=n}});r.current_time=new Date,Fe(window,"scroll",function(){return!!e&&void r.go()}),Fe(window,"unload",function(){return!!e&&void r.go("notime")})},initHeatmap:function(){var e=this,t=!0;return!(!l(ir.para.heatmap)||"default"!==ir.para.heatmap.clickmap)&&(f(ir.para.heatmap.collect_url)&&this.listenUrlChange(function(){t=!!ir.para.heatmap.collect_url()}),"all"===ir.para.heatmap.collect_elements?ir.para.heatmap.collect_elements="all":ir.para.heatmap.collect_elements="interact",void("all"===ir.para.heatmap.collect_elements?Fe(document,"click",function(r){if(!t)return!1;var n=r||window.event;if(!n)return!1;var i=n.target||n.srcElement;if("object"!=typeof i)return!1;if("string"!=typeof i.tagName)return!1;var a=i.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!i||!i.parentNode||!i.parentNode.children)return!1;var o=i.parentNode.tagName.toLowerCase();"a"===o||"button"===o?e.start(n,i.parentNode,o):e.start(n,i,a)}):Fe(document,"click",function(r){if(!t)return!1;var n=r||window.event;if(!n)return!1;var i=n.target||n.srcElement,a=ir.heatmap.getTargetElement(i,r);a?e.start(n,a,a.tagName.toLowerCase()):p(i)&&"div"===i.tagName.toLowerCase()&&l(ir.para.heatmap)&&ir.para.heatmap.get_vtrack_config&&ir.unlimitedDiv.events.length>0&&ir.unlimitedDiv.isTargetEle(i)&&e.start(n,i,i.tagName.toLowerCase(),{$lib_method:"vtrack"})})))}},Br={setOnlineState:function(e){if(e===!0&&l(ir.para.jsapp)&&"function"==typeof ir.para.jsapp.getData){ir.para.jsapp.isOnline=!0;var t=ir.para.jsapp.getData();_(t)&&t.length>0&&b(t,function(e){ae(e)&&ir.sendState.realtimeSend(JSON.parse(e))})}else ir.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return Dr.campaignParams()},getStayTime:function(){return(new Date-ir._t)/1e3},setProfileLocal:function(e){if(!gr.isSupport())return ir.setProfile(e),!1;if(!l(e)||re(e))return!1;var t=ir.store.readObjectVal("sensorsdata_2015_jssdk_profile"),r=!1;if(l(t)&&!re(t)){for(var n in e)!(n in t&&t[n]!==e[n])&&n in t||(t[n]=e[n],r=!0);r&&(ir.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),ir.setProfile(e))}else ir.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),ir.setProfile(e)},setInitReferrer:function(){var e=Ue();ir.setOnceProfile({_init_referrer:e,_init_referrer_host:Dr.pageProp.referrer_host})},setSessionReferrer:function(){var e=Ue();ir.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:Dr.pageProp.referrer_host})},setDefaultAttr:function(){Dr.register({_current_url:location.href,_referrer:Ue(),_referring_host:Dr.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase(),i=e.parentNode.tagName.toLowerCase(),a=ir.para.heatmap&&ir.para.heatmap.track_attr?ir.para.heatmap.track_attr:["data-sensors-click"];"button"===n||"a"===n||"a"===i||"button"===i||"input"===n||"textarea"===n||X(e,a)||Kr.start(null,e,n,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase();Kr.start(null,e,n,t,r)}},autoTrackSinglePage:function(e,t){function r(){var e=Dr.campaignParams(),t={};return b(e,function(e,r,n){(" "+ir.source_channel_standard+" ").indexOf(" "+r+" ")!==-1?t["$"+r]=n[r]:t[r]=n[r]}),t}function n(e,t){ir.track("$pageview",w({$referrer:a,$url:W(),$url_path:z(),$title:document.title},e,r()),t),a=W()}var a;a=this.autoTrackIsUsed?Dr.pageProp.url:Dr.pageProp.referrer,e=l(e)?e:{};var o=!e.not_set_profile;if(e.not_set_profile&&delete e.not_set_profile,n(e,t),this.autoTrackSinglePage=n,ir.is_first_visitor&&o){var s={};ir.para.preset_properties.search_keyword_baidu&&Le(document.referrer)&&Ae()&&(s.$search_keyword_id=jr.id(),s.$search_keyword_id_type=jr.type(),s.$search_keyword_id_hash=Y(s.$search_keyword_id)),ir.setOnceProfile(w({$first_visit_time:new Date,$first_referrer:Ue(),$first_browser_language:i(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Me(),$first_search_keyword:Je()},r(),s)),ir.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=l(e)?e:{},this.autoTrack(w(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=l(e)?e:{};var r=Dr.campaignParams(),n={};b(r,function(e,t,r){(" "+ir.source_channel_standard+" ").indexOf(" "+t+" ")!==-1?n["$"+t]=r[t]:n[t]=r[t]});var a=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var o=location.href;if(ir.para.is_single_page&&v(function(){var r=Ue(o,!0);ir.track("$pageview",w({$referrer:r,$url:W(),$url_path:z(),$title:document.title},n,e),t),o=W()}),ir.track("$pageview",w({$referrer:Ue(null,!0),$url:W(),$url_path:z(),$title:document.title},n,e),t),ir.is_first_visitor&&a){var s={};ir.para.preset_properties.search_keyword_baidu&&Le(document.referrer)&&Ae()&&(s.$search_keyword_id=jr.id(),s.$search_keyword_id_type=jr.type(),s.$search_keyword_id_hash=Y(s.$search_keyword_id)),ir.setOnceProfile(w({$first_visit_time:new Date,$first_referrer:Ue(null,!0),$first_browser_language:i(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Me(),$first_search_keyword:Je()},n,s)),ir.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return re(ir.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":ir.store._state._first_id||ir.store._state.first_id||ir.store._state._distinct_id||ir.store._state.distinct_id},setPlugin:function(e){return!!l(e)&&void b(e,function(e,t){f(e)&&(l(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[t]?e(window.SensorsDataWebJSSDKPlugin[t]):ir.log(t+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+t+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"))})},useModulePlugin:function(){ir.use.apply(ir,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}},Fr={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}},Wr={__proto__:null,addReferrerHost:Xe,addPropsHook:Ze,initPara:Ye,setInitVar:Ge,enableLocalLog:et,disableLocalLog:tt,quick:rt,use:nt,track:it,bind:at,unbind:ot,trackLink:st,trackLinks:ct,setItem:lt,deleteItem:ut,setProfile:pt,setOnceProfile:dt,appendProfile:ft,incrementProfile:_t,deleteProfile:ht,unsetProfile:gt,identify:mt,trackSignup:yt,registerPage:bt,clearAllRegister:wt,clearPageRegister:St,register:kt,registerOnce:$t,registerSession:Pt,registerSessionOnce:Ct,login:Nt,loginWithKey:xt,logout:Tt,getPresetProperties:jt,iOSWebClickPolyfill:Dt,readyState:Fr,para_default:kr,log:$e,debug:Cr,IDENTITY_KEY:Tr},zr=function(){this._events=[],this.pendingEvents=[]};zr.prototype={emit:function(e){var t=[].slice.call(arguments,1);b(this._events,function(r){r.type===e&&r.callback.apply(r.context,t)}),this.pendingEvents.push({type:e,data:t}),this.pendingEvents.length>20?this.pendingEvents.shift():null},on:function(e,t,r,n){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),n=n!==!1,this.pendingEvents.length>0&&n&&b(this.pendingEvents,function(n){n.type===e&&t.apply(r,n.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var Vr={__proto__:null,parseSuperProperties:Ne,searchConfigData:xe,strip_empty_properties:Te,getCurrentDomain:je,getEleInfo:De,isBaiduTraffic:Ae,getReferrerEqid:Ee,getReferrerEqidType:Ie,getBaiduKeyword:jr,isReferralTraffic:Le,getReferrer:Ue,getKeywordFromReferrer:Je,getWxAdIdFromUrl:He,getReferSearchEngine:Re,getSourceFromReferrer:Me,info:Dr,ajax:Be,getElementContent:Ke,cookie:Ar,addEvent:Fe,EventEmitterSa:zr,encrypt:Oe,decryptIfNeeded:Ce},Xr={};Xr.buildData=function(e){var t={identities:{},distinct_id:ir.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(ir.lib_version)},properties:{}};return l(e)&&l(e.identities)&&!re(e.identities)?w(t.identities,e.identities):w(t.identities,Lr._state.identities),l(e)&&l(e.properties)&&!re(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),w(t,ir.store.getUnionId(),e),Hr.stage.process("addCustomProps",t),l(e.properties)&&!re(e.properties)&&w(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=w({},Dr.properties(),Lr.getProps(),Lr.getSessionProps(),Dr.currentProps,t.properties),ir.para.preset_properties.latest_referrer&&!i(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),ir.para.preset_properties.latest_search_keyword&&!i(t.properties.$latest_search_keyword)&&(ir.para.preset_properties.search_keyword_baidu&&i(t.properties.$search_keyword_id)&&oe(t.properties.$search_keyword_id_hash)&&i(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),ir.para.preset_properties.latest_traffic_source_type&&!i(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),ir.para.preset_properties.latest_landing_page&&!i(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===ir.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id,delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):ir.para.preset_properties.latest_wx_ad_click_id&&!i(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),i(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=W())),t.properties.$time&&T(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,ir.vtrackBase.addCustomProps(t),Ne(t),Ir.checkIsAddSign(t),Ir.checkIsFirstTime(t),ir.addReferrerHost(t),ir.addPropsHook(t),Hr.stage.process("formatData",t),t},Xr.sendData=function(e,t){var r=xe(e.properties);ir.para.debug_mode===!0?(ir.log(e),ir.saEvent.debugPath(JSON.stringify(e),t)):ir.sendState.getSendCall(e,r,t)},Xr.encodeTrackData=function(e){var t=P(e),r="crc="+Z(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)};var Zr=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1, -this.img.height=1,ir.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=At(e.server_url,e.data)};Zr.prototype.start=function(){var e=this;ir.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},Zr.prototype.lastClear=function(){var e=F();void 0!==e.ie?this.img.src="about:blank":this.img.src=""};var Yr=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=Et(e.data)};Yr.prototype.start=function(){var e=this;Be({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:ir.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var Qr=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=Et(e.data)};Qr.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var Gr={};Gr.getSendCall=function(e,t,r){if(ir.is_heatmap_render_mode)return!1;if(ir.readyState.state<3)return ir.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(u()).slice(2,5)+String(u()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var n=e;e=JSON.stringify(e);var i={data:n,config:t,callback:r};return ir.events.tempAdd("send",n),!ir.para.app_js_bridge&&ir.para.batch_send&&localStorage.length<200?(ir.log(n),ir.batchSend.add(i.data),!1):("item_set"===n.type||"item_delete"===n.type?this.prepareServerUrl(i):ir.bridge.dataSend(i,this,r),void ir.log(n))},Gr.prepareServerUrl=function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(_(ir.para.server_url)&&ir.para.server_url.length)for(var t=0;t0)for(var n={current:0,total:r.length},i=new Kt(t,n,ir),a=0;a=n.length:n.push(a);break;default:n.splice(i,0,a)}}}};var rn={addCustomProps:null,formatData:null},nn=new Bt(rn),an={init:function(){},interceptor:{formatData:{priority:0,entry:function(e){return er(e),e}}}},on={initPara:function(){},initState:function(){},initDefineBridgeInfo:function(){},bridge_info:{touch_app_bridge:!1},dataSend:function(e,t){t.prepareServerUrl(e)}},sn={init:function(){},addCustomProps:function(){}},cn={add:function(e){ir.para.batch_send=!1;var t=xe(e.properties);ir.sendState.prepareServerUrl({data:e,config:t})}};for(var ln in Wr)ir[ln]=Wr[ln];return ir.modules={},or.setup($e),ir._=w(wr,Vr),ir.sendState=Gr,ir.events=new ir._.EventEmitterSa,ir.store=Lr,ir.heatmap=Kr,ir.bridge=on,ir.JSBridge=nr,ir.vtrackBase=sn,ir.batchSend=cn,ir.use=rr,Ft(new Wt(ir)),Ft(new tr(ir)),ir.init=function(e){return!(ir.readyState&&ir.readyState.state&&ir.readyState.state>=2)&&(e=e||{},e.batch_send=!1,l(e.heatmap)&&(e.heatmap.get_vtrack_config=!1),ir.setInitVar(),ir.readyState.setState(2),ir.initPara(e),Mt(),void ir.iOSWebClickPolyfill())},Rt(),ir}); \ No newline at end of file +!function(e,t){return t()}(this,function(){function e(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function t(){return Date.now&&e(Date.now)?Date.now():(new Date).getTime()}function r(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function n(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),r(e)&&e.getRandomValues){var t=new Uint32Array(1),n=e.getRandomValues(t)[0],i=Math.pow(2,32);return n/i}}return lr(1e19)/1e19}function i(e){var t=null;try{t=JSON.parse(e)}catch(r){}return t}function a(e,t){this.lockGetPrefix=e||"lock-get-prefix",this.lockSetPrefix=t||"lock-set-prefix"}function s(e){return"function"==typeof e||!(!e||"object"!=typeof e)&&s(e.listener)}function c(){this._events={}}function l(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function u(e){e=e||"";for(var t={},r=e.substring(1),n=r.split("&"),i=0;i Invalid URL");var r=e.split("#"),n=r[0],i=r.slice(1).join("#");t=this._regex.exec(n);for(var a in this._fields)"undefined"!=typeof t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new t(e)}function _(e){var t={},r=function(){var e;try{return e=new URL("http://modernizr.com/"),"http://modernizr.com/"===e.href}catch(t){return!1}};if("function"==typeof window.URL&&r())t=new URL(e),t.searchParams||(t.searchParams=function(){var e=u(t.search);return{get:function(t){return e[t]}}}());else{p(e)||(e=String(e)),e=d(e);var n=/^https?:\/\/.+/;if(n.test(e)===!1)return void sr.log("Invalid URL");var i=f(e);t.hash=i._values.Fragment,t.host=i._values.Host?i._values.Host+(i._values.Port?":"+i._values.Port:""):"",t.href=i._values.URL,t.password=i._values.Password,t.pathname=i._values.Path,t.port=i._values.Port,t.search=i._values.QueryString?"?"+i._values.QueryString:"",t.username=i._values.Username,t.hostname=i._values.Hostname,t.protocol=i._values.Protocol?i._values.Protocol+":":"",t.origin=i._values.Origin?i._values.Origin+(i._values.Port?":"+i._values.Port:""):"",t.searchParams=function(){var e=u("?"+i._values.QueryString);return{get:function(t){return e[t]}}}()}return t}function h(e){return!(!e||1!==e.nodeType)}function g(e){return void 0===e}function v(t){return Array.isArray&&e(v)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function y(e){return new pr(e)}function b(e,t,r,n){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation,e._getPath=i._getPath),e}function a(e,t,r,n){var a=function(a){if(a=a||i(window.event)){a.target=a.srcElement;var o,s,c=!0;return"function"==typeof r&&(o=r(a)),s=t.call(e,a),"beforeunload"!==n?(!1!==o&&!1!==s||(c=!1),c):void 0}};return a}i._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||y(e.target).getParents()},i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};var o=function(e,t,r){if(void 0===n&&"click"===t&&(n=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=i._getPath,r.call(this,e)},n);else{var o="on"+t,s=e[o];e[o]=a(e,r,s,t)}};o.apply(null,arguments)}function S(e){var t="pushState"in window.history?"popstate":"hashchange";b(window,t,e)}function w(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){sr.log(t)}}}function k(e,t,r){if(null==e)return!1;if(fr&&e.forEach===fr)e.forEach(t,r);else if(v(e))for(var n=0,i=e.length;n=200&&i.status<300||304==i.status?e.success(t(i.responseText)):e.error(t(i.responseText),i.status),i.onreadystatechange=null,i.onload=null)}catch(r){i.onreadystatechange=null,i.onload=null}},i.open(e.type,e.url,!0);try{e.credentials&&(i.withCredentials=!0),r(e.header)&&k(e.header,function(e,t){i.setRequestHeader&&i.setRequestHeader(t,e)}),e.data&&(e.cors||i.setRequestHeader&&i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?i.setRequestHeader&&i.setRequestHeader("Content-type","application/json; charset=UTF-8"):i.setRequestHeader&&i.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(c){sr.log(c)}i.send(e.data||null)}function C(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(k(e,function(e,n,i){r.push(t(e,n,i))}),r)}function O(e){var t=[];try{t=C(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function N(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function x(e,t){t=t||window;var r=!1,n=!0,i=t.document,a=i.documentElement,o=i.addEventListener,s=o?"addEventListener":"attachEvent",c=o?"removeEventListener":"detachEvent",l=o?"":"on",u=function(n){"readystatechange"==n.type&&"complete"!=i.readyState||(("load"==n.type?t:i)[c](l+n.type,u,!1),!r&&(r=!0)&&e.call(t,n.type||n))},p=function(){try{a.doScroll("left")}catch(e){return void setTimeout(p,50)}u("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!o&&a.doScroll){try{n=!t.frameElement}catch(d){sr.log(d)}n&&p()}i[s](l+"DOMContentLoaded",u,!1),i[s](l+"readystatechange",u,!1),t[s](l+"load",u,!1)}}function T(e){return k(Array.prototype.slice.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])}),e}function j(e){var t=e;try{t=decodeURI(e)}catch(r){t=e}return t}function D(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",r=t.length-1,n={},i=0;for(i=0;i=2&&!/^(\d+\.)+\d+$/.test(n))for(var a="."+i.splice(i.length-1,1);i.length>0;)if(a="."+i.splice(i.length-1,1)+a,document.cookie=t+"=true; path=/; domain="+a,document.cookie.indexOf(t+"=true")!==-1){var o=new Date;return o.setTime(o.getTime()-1e3),document.cookie=t+"=true; expires="+o.toGMTString()+"; path=/; SameSite=Lax; domain="+a,a}return""}function H(e){function t(e,t){e=d(e);var r;if("body"===e)return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var n=e.split(":nth-of-type");if(!n[0]||!n[1])return null;var i=n[0],a=n[1].match(/\(([0-9]+)\)/);if(!a||!a[1])return null;var o=Number(a[1]);if(!(h(t)&&t.children&&t.children.length>0))return null;for(var s=t.children,c=0;c0)return null}return r?r:null}function r(e){var i,a=n.shift();if(!a)return e;try{i=t(a,e)}catch(o){sr.log(o)}return i&&h(i)?r(i):null}if(!p(e))return null;var n=e.split(">"),i=null;return i=r(),i&&h(i)?i:null}function M(e,t){var r="",n="";return e.textContent?r=d(e.textContent):e.innerText&&(r=d(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),n=r||"","input"!==t&&"INPUT"!==t||(n=e.value||""),n}function q(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=_(e).hostname}catch(n){sr.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function K(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function B(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=l(e);var r="[\\?&]"+t+"=([^&#]*)",n=new RegExp(r),i=n.exec(e);return null===i||i&&"string"!=typeof i[1]&&i[1].length?"":l(i[1])}function F(e){var t={},r=e.split("?"),n=r[1]||"";return n&&(t=u("?"+n)),t}function W(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function z(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(W()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function V(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function X(e){return p(e)?(e=d(e),j(e)):j(location.href)}function Z(e){return p(e)?(e=d(e),j(e)):j(location.pathname)}function Y(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function G(e,t){if("string"==typeof t)return Y(e,t);if(v(t)){for(var r=!1,n=0;n0)for(var a=e.split(""),o=0;ot)for(i=r+i;c=n*i+s,ct;)i=i/2+s;i=n*i+s}return i}function te(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var n=0;n41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function pe(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function de(t){if(!r(t)||!p(t.callbackName))return sr.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;t.success=e(t.success)?t.success:function(){},t.error=e(t.error)?t.error:function(){},t.data=t.data||"";var n=document.createElement("script"),i=document.getElementsByTagName("head")[0],a=null,o=!1;if(i.appendChild(n),le(t.timeout)&&(a=setTimeout(function(){return!o&&(t.error("timeout"),window[t.callbackName]=function(){sr.log("call jsonp error")},a=null,i.removeChild(n),void(o=!0))},t.timeout)),window[t.callbackName]=function(){clearTimeout(a),a=null,t.success.apply(null,arguments),window[t.callbackName]=function(){sr.log("call jsonp error")},i.removeChild(n)},t.url.indexOf("?")>-1?t.url+="&callbackName="+t.callbackName:t.url+="?callbackName="+t.callbackName,r(t.data)){var s=[];k(t.data,function(e,t){s.push(t+"="+e)}),t.data=s.join("&"),t.url+="&"+t.data}n.onerror=function(e){return!o&&(window[t.callbackName]=function(){sr.log("call jsonp error")},clearTimeout(a),a=null,i.removeChild(n),t.error(e),void(o=!0))},n.src=t.url}function fe(t){var r={visibleHandler:e(t.visible)?t.visible:function(){},hiddenHandler:e(t.hidden)?t.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;b(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else b(window,"focus",this.visibleHandler),b(window,"blur",this.hiddenHandler)}};r.init()}function _e(e){e=$({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&(t=document.createElement("link"),t.rel="stylesheet",t.href=e.url),"js"===e.type&&(t=document.createElement("script"),t.async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function he(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function ge(e,t){e=String(e),t="number"==typeof t?t:13;for(var r=126,n=e.split(""),i=0,a=n.length;ir?(s&&(clearTimeout(s),s=null),c=u,o=e.apply(i,a),s||(i=a=null)):s||n.trailing===!1||(s=setTimeout(l,p)),o}}function we(e){var t=[];return null==e?t:(k(e,function(e){t[t.length]=e}),t)}function ke(e){return e?e.toArray?e.toArray():v(e)||ne(e)?Array.prototype.slice.call(e):we(e):[]}function $e(e){for(var t,r=[],n={},i=0;iar.para.datasend_timeout&&(ar.para.datasend_timeout=ar.para.callback_timeout),ar.para.heatmap&&ar.para.heatmap.collect_tags&&r(ar.para.heatmap.collect_tags)&&k(ar.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&ar.heatmap.otherTags.push(t)}),ar.para.heatmap&&"default"===ar.para.heatmap.clickmap&&ar.heatmap.initUnlimitedTags()}function Qe(e){var t={};for(var r in e)t[r]=e[r];ar.store._state.identities=t,ar.store.save()}function et(){ar._t=ar._t||1*new Date,ar.lib_version=xr,ar.is_first_visitor=!1,ar.source_channel_standard=Nr}function tt(){if(vr.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){ar.log("enableLocalLog error: "+e.message)}}function rt(){vr.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")}function nt(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&Fr[t]?Fr[t].apply(Fr,r):void("function"==typeof t?t.apply(ar,r):ar.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0]))}function it(t,n){return p(t)?r(window.SensorsDataWebJSSDKPlugin)&&r(window.SensorsDataWebJSSDKPlugin[t])&&e(window.SensorsDataWebJSSDKPlugin[t].init)?(window.SensorsDataWebJSSDKPlugin[t].init(ar,n),window.SensorsDataWebJSSDKPlugin[t]):r(ar.modules)&&r(ar.modules[t])&&e(ar.modules[t].init)?(ar.modules[t].init(ar,n),ar.modules[t]):void ar.log(t+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+t+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"):(ar.log("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1)}function at(e,t,r){qr.check({event:e,properties:t})&&qr.send({type:"track",event:e,properties:t},r)}function ot(e,t){return!!qr.check({bindKey:e,bindValue:t})&&(ar.store._state.identities[e]=t,ar.store.save(),void qr.send({type:"track_id_bind",event:"$BindID",properties:{}}))}function st(e,t){if(!qr.check({unbindKey:e,bindValue:t}))return!1;if(r(ar.store._state.identities)&&ar.store._state.identities.hasOwnProperty(e)&&ar.store._state.identities[e]===t){var n=ar.store.getUnionId().login_id;n&&e+"+"+t===n&&(ar.store._state.distinct_id=ar.store._state.first_id,ar.store._state.first_id="",ar.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete ar.store._state.identities[e],ar.store.save())}var i={};i[e]=t,qr.send({identities:i,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function ct(e,t,r){function n(e,t,r){function n(e){function n(){a||(a=!0,location.href=i.href)}e.stopPropagation(),e.preventDefault();var a=!1;setTimeout(n,1e3),ar.track(t,r,n)}e=e||{};var i=null;return e.ele&&(i=e.ele),e.event&&(i=e.target?e.target:e.event.target),r=r||{},!(!i||"object"!=typeof i)&&(!i.href||/^javascript/.test(i.href)||i.target||i.download||i.onclick?(ar.track(t,r),!1):(e.event&&n(e.event),void(e.ele&&We(e.ele,"click",function(e){n(e)}))))}"object"==typeof e&&e.tagName?n({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&n(e,t,r)}function lt(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void We(e,"click",function(n){ +function i(){a||(a=!0,location.href=e.href)}n.preventDefault();var a=!1;setTimeout(i,1e3),ar.track(t,r,i)}))}function ut(e,t,r){qr.check({item_type:e,item_id:t,properties:r})&&qr.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function pt(e,t){qr.check({item_type:e,item_id:t})&&qr.sendItem({type:"item_delete",item_type:e,item_id:t})}function dt(e,t){qr.check({propertiesMust:e})&&qr.send({type:"profile_set",properties:e},t)}function ft(e,t){qr.check({propertiesMust:e})&&qr.send({type:"profile_set_once",properties:e},t)}function _t(e,t){qr.check({propertiesMust:e})&&(k(e,function(t,r){p(t)?e[r]=[t]:v(t)?e[r]=t:(delete e[r],ar.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),ae(e)||qr.send({type:"profile_append",properties:e},t))}function ht(e,t){function r(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}var n=e;p(e)&&(e={},e[n]=1),qr.check({propertiesMust:e})&&(r(e)?qr.send({type:"profile_increment",properties:e},t):ar.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"))}function gt(e){qr.send({type:"profile_delete"},e),Ur.set("distinct_id",ur()),Ur.set("first_id","")}function mt(e,t){var r=e,n={};p(e)&&(e=[],e.push(r)),v(e)?(k(e,function(e){p(e)?n[e]=!0:ar.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),qr.send({type:"profile_unset",properties:n},t)):ar.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")}function vt(e,t){function r(e){ar.store._state.identities.$identity_anonymous_id=e,ar.store.save()}"number"==typeof e&&(e=String(e));var n=Ur.getFirstId();if("undefined"==typeof e){var i=ur();n?Ur.set("first_id",i):Ur.set("distinct_id",i),r(i)}else qr.check({distinct_id:e})&&(t===!0?n?Ur.set("first_id",e):Ur.set("distinct_id",e):n?Ur.change("first_id",e):Ur.change("distinct_id",e),r(e))}function yt(e,t,r,n){var i=Ur.getFirstId()||Ur.getDistinctId();Ur.set("distinct_id",e),qr.send({original_id:i,distinct_id:ar.store.getDistinctId(),type:"track_signup",event:t,properties:r},n)}function bt(e,t,r,n){"number"==typeof e&&(e=String(e)),qr.check({distinct_id:e,event:t,properties:r})&&yt(e,t,r,n)}function St(e){qr.check({properties:e})?$(Ar.currentProps,e):ar.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function wt(e){Ur.clearAllProps(e)}function kt(e){var t;if(v(e)&&e.length>0)for(t=0;t-1?e.config.send_type:ar.para.send_type,"beacon"===r&&ue()===!1&&(r="image"),"ajax"===r&&pe()===!1&&(r="image"),r}function Ut(e){var t=Lt(e);switch(t){case"image":return new Yr(e);case"ajax":return new Gr(e);case"beacon":return new Qr(e);default:return new Yr(e)}}function Rt(e){var t=Ut(e),r=t.start;return t.start=function(){var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},ar.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},ar.para.datasend_timeout-ar.para.callback_timeout)},t.isEnd=function(){this.received||(this.received=!0,this.end())},t}function Jt(){k(tn,function(e){var t=ar[e];ar[e]=function(){if(ar.readyState.state<3)return v(ar._q)||(ar._q=[]),ar._q.push([e,arguments]),!1;{if(ar.readyState.getState())return t.apply(ar,arguments);try{console.error("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}catch(r){ar.log(r)}}}})}function Ht(){ar.para.is_track_single_page&&rn.on("switch",function(e){var t=function(t){t=t||{},e!==location.href&&(Ar.pageProp.referrer=X(e),ar.quick("autoTrack",$({$url:X(),$referrer:X(e)},t)))};if("boolean"==typeof ar.para.is_track_single_page)t();else if("function"==typeof ar.para.is_track_single_page){var n=ar.para.is_track_single_page();r(n)?t(n):n===!0&&t()}})}function Mt(){ar._q&&v(ar._q)&&ar._q.length>0&&k(ar._q,function(e){ar[e[0]].apply(ar,Array.prototype.slice.call(e[1]))}),r(ar.para.heatmap)&&(Br.initHeatmap(),Br.initScrollmap())}function qt(){ar.readyState.setState(3),Ar.initPage(),Ht(),ar.store.init(),ar.readyState.setState(4),Mt()}function Kt(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function Bt(e,t,r){var n=null;try{n=JSON.parse(JSON.stringify(e))}catch(i){Pe(i)}this.getOriginalData=function(){return n},this.getPosition=function(){return t},this.cancelationToken=new Kt,this.sensors=r}function Ft(e){if(!r(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}function Wt(e){e&&e.dataStage&&an.registerStageImplementation(e.dataStage)}function zt(e){e.kit=Zr,e.saEvent=qr,this.dataStage=Mr}function Vt(t){return r(t)?(k(t,function(r,n){if(v(r)){var i=[];k(r,function(e){p(e)?i.push(e):Pe("\u60a8\u7684\u6570\u636e-",n,r,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),t[n]=i}p(r)||le(r)||A(r)||ie(r)||v(r)||e(r)||"$option"===n||(Pe("\u60a8\u7684\u6570\u636e-",n,r,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete t[n])}),t):t}function Xt(e,t){return le(t)&&e.length>t?(Pe("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function Zt(e){var t=["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"];r(e)&&k(t,function(t,r){t in e&&(r<3?(delete e[t],Pe("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):Pe("\u60a8\u7684\u5c5e\u6027- "+t+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d"))})}function Yt(e){var t=["$element_selector","$element_path"],n=["sensorsdata_app_visual_properties"];r(e)&&k(e,function(i,a){if(r(i))Yt(e[a]);else if(p(i)){if(te(n,a)>-1)return;e[a]=Xt(i,te(t,a)>-1?1024:kr.max_string_length)}})}function Gt(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function Qt(e){if("item_type"in e){var t=e.item_type,r=function(t){return t||delete e.item_type,!0};Xe({item_type:t},r)}if("item_id"in e){var n=e.item_id,i=function(t,r,n){return t||"string"!==n||delete e.item_id,!0};Xe({item_id:n},i)}}function er(e){k(e,function(t,r){var n=function(t,n,i){return t||"keyLength"===i||delete e[r],!0};Xe({propertyKey:r},n)})}function tr(e){var t=e.properties;r(t)?(Vt(t),Zt(t),Gt(e),er(t),Yt(t)):"properties"in e&&(e.properties={}),ve(e),Qt(e)}function rr(){this.dataStage=on}function nr(t,n){if(!p(t))return Pe("use\u63d2\u4ef6\u540d\u79f0\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff01"),!1;if(r(window.SensorsDataWebJSSDKPlugin)&&r(window.SensorsDataWebJSSDKPlugin[t])&&e(window.SensorsDataWebJSSDKPlugin[t].__constructor__)){var i=new window.SensorsDataWebJSSDKPlugin[t].__constructor__;return i.init(ar,n),i}Pe(t+"\u591a\u7248\u672c SDK\uff0c\u4e0d\u652f\u6301"+t+"\u63d2\u4ef6\uff01")}function ir(){}var ar={};(function(){function e(n,i){function a(e,t){try{e()}catch(r){t&&t()}}function o(e){if(null!=o[e])return o[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=o("json-stringify")&&o("date-serialization")&&o("json-parse");else if("date-serialization"==e){if(t=o("json-stringify")&&b){var r=i.stringify;a(function(){t='"-271821-04-20T00:00:00.000Z"'==r(new p((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==r(new p(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new p((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==r(new p((-1)))})}}else{var n,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var r=i.stringify,u="function"==typeof r;u&&((n=function(){return 1}).toJSON=n,a(function(){u="0"===r(0)&&"0"===r(new c)&&'""'==r(new l)&&r(v)===g&&r(g)===g&&r()===g&&"1"===r(n)&&"[1]"==r([n])&&"[null]"==r([g])&&"null"==r(null)&&"[null,null,null]"==r([g,v,null])&&r({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==s&&"1"===r(null,n)&&"[\n 1,\n 2\n]"==r([1,2],null,1)},function(){u=!1})),t=u}if("json-parse"==e){var d,f=i.parse;"function"==typeof f&&a(function(){0!==f("0")||f(!1)||(n=f(s),d=5==n.a.length&&1===n.a[0],d&&(a(function(){d=!f('"\t"')}),d&&a(function(){d=1!==f("01")}),d&&a(function(){d=1!==f("1.")})))},function(){d=!1}),t=d}}return o[e]=!!t}function s(e){return D(this)}n||(n=r.Object()),i||(i=r.Object());var c=n.Number||r.Number,l=n.String||r.String,u=n.Object||r.Object,p=n.Date||r.Date,d=n.SyntaxError||r.SyntaxError,f=n.TypeError||r.TypeError,_=n.Math||r.Math,h=n.JSON||r.JSON;if("object"==typeof h&&h)return i.stringify=h.stringify,i.parse=h.parse,i.runInContext=e,i;var g,m=u.prototype,v=m.toString,y=m.hasOwnProperty,b=new p((-0xc782b5b800cec));if(a(function(){b=b.getUTCFullYear()==-109252&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}),o["bug-string-char-index"]=o["date-serialization"]=o.json=o["json-stringify"]=o["json-parse"]=null,!o("json")){var S="[object Function]",w="[object Date]",k="[object Number]",$="[object String]",P="[object Array]",C="[object Boolean]",O=o("bug-string-char-index"),N=function(e,r){var n,i,a,o=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n;for(a in i)y.call(i,a)&&o++;return n=i=null,o?N=function(e,t){var r,n,i=v.call(e)==S;for(r in e)i&&"prototype"==r||!y.call(e,r)||(n="constructor"===r)||t(r);(n||y.call(e,r="constructor"))&&t(r)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],N=function(e,r){var n,a,o=v.call(e)==S,s=!o&&"function"!=typeof e.constructor&&t[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(n in e)o&&"prototype"==n||!s.call(e,n)||r(n);for(a=i.length;n=i[--a];)s.call(e,n)&&r(n)}),N(e,r)};if(!o("json-stringify")&&!o("date-serialization")){var x={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},T="000000",j=function(e,t){return(T+(t||0)).slice(-e)},D=function(e){var t,r,n,i,a,o,s,c,l;if(b)t=function(e){r=e.getUTCFullYear(),n=e.getUTCMonth(),i=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),c=e.getUTCSeconds(),l=e.getUTCMilliseconds()};else{var u=_.floor,p=[0,31,59,90,120,151,181,212,243,273,304,334],d=function(e,t){return p[t]+365*(e-1970)+u((e-1969+(t=+(t>1)))/4)-u((e-1901+t)/100)+u((e-1601+t)/400)};t=function(e){for(i=u(e/864e5),r=u(i/365.2425)+1970-1;d(r+1,0)<=i;r++);for(n=u((i-d(r,0))/30.42);d(r,n+1)<=i;n++);i=1+i-d(r,n),a=(e%864e5+864e5)%864e5,o=u(a/36e5)%24,s=u(a/6e4)%60,c=u(a/1e3)%60,l=a%1e3}}return(D=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+j(6,r<0?-r:r):j(4,r))+"-"+j(2,n+1)+"-"+j(2,i)+"T"+j(2,o)+":"+j(2,s)+":"+j(2,c)+"."+j(3,l)+"Z",r=n=i=o=s=c=l=null):e=null,e})(e)};if(o("json-stringify")&&!o("date-serialization")){var A=i.stringify;i.stringify=function(e,t,r){var n=p.prototype.toJSON;p.prototype.toJSON=s;var i=A(e,t,r);return p.prototype.toJSON=n,i}}else{var E="\\u00",I=function(e){var t=e.charCodeAt(0),r=x[t];return r?r:E+j(2,t.toString(16))},L=/[\x00-\x1f\x22\x5c]/g,U=function(e){return L.lastIndex=0,'"'+(L.test(e)?e.replace(L,I):e)+'"'},R=function(e,t,r,n,i,o,s){var c,l,u,d,_,h,m,y,b;if(a(function(){c=t[e]}),"object"==typeof c&&c&&(c.getUTCFullYear&&v.call(c)==w&&c.toJSON===p.prototype.toJSON?c=D(c):"function"==typeof c.toJSON&&(c=c.toJSON(e))),r&&(c=r.call(t,e,c)),c==g)return c===g?c:"null";switch(l=typeof c,"object"==l&&(u=v.call(c)),u||l){case"boolean":case C:return""+c;case"number":case k:return c>-1/0&&c<1/0?""+c:"null";case"string":case $:return U(""+c)}if("object"==typeof c){for(m=s.length;m--;)if(s[m]===c)throw f();if(s.push(c),d=[],y=o,o+=i,u==P){for(h=0,m=c.length;h0)for(n>10&&(n=10),i="";i.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||K();e+=M("0x"+a.slice(t,J));break;default:K()}else{if(34==i)break;for(i=a.charCodeAt(J),t=J;i>=32&&92!=i&&34!=i;)i=a.charCodeAt(++J);e+=a.slice(t,J)}if(34==a.charCodeAt(J))return J++,e;K();default:if(t=J,45==i&&(n=!0,i=a.charCodeAt(++J)),i>=48&&i<=57){for(48==i&&(i=a.charCodeAt(J+1),i>=48&&i<=57)&&K(),n=!1;J=48&&i<=57);J++);if(46==a.charCodeAt(J)){for(r=++J;r57));r++);r==J&&K(),J=r}if(i=a.charCodeAt(J),101==i||69==i){for(i=a.charCodeAt(++J),43!=i&&45!=i||J++,r=J;r57));r++);r==J&&K(),J=r}return+a.slice(t,J)}n&&K();var s=a.slice(J,J+4);if("true"==s)return J+=4,!0;if("fals"==s&&101==a.charCodeAt(J+4))return J+=5,!1;if("null"==s)return J+=4,null;K()}return"$"},F=function(e){var t,r;if("$"==e&&K(),"string"==typeof e){if("@"==(O?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=B(),"]"!=e;)r?","==e?(e=B(),"]"==e&&K()):K():r=!0,","==e&&K(),t.push(F(e));return t}if("{"==e){for(t={};e=B(),"}"!=e;)r?","==e?(e=B(),"}"==e&&K()):K():r=!0,","!=e&&"string"==typeof e&&"@"==(O?e.charAt(0):e[0])&&":"==B()||K(),t[e.slice(1)]=F(B());return t}K()}return e},W=function(e,t,r){var n=z(e,t,r);n===g?delete e[t]:e[t]=n},z=function(e,t,r){var n,i=e[t];if("object"==typeof i&&i)if(v.call(i)==P)for(n=i.length;n--;)W(v,N,i,n,r);else N(i,function(e){W(i,e,r)});return r.call(e,t,i)};i.parse=function(e,t){var r,n;return J=0,H=""+e,r=F(B()),"$"!=B()&&K(),J=H=null,t&&v.call(t)==S?z((n={},n[""]=r,n),"",t):r}}}return i.runInContext=e,i}var t={"function":!0,object:!0},r=t[typeof window]&&window||this,n=r.JSON,i=r.JSON3,a=!1,o=e(r,r.JSON3={noConflict:function(){return a||(a=!0,r.JSON=n,r.JSON3=i,n=i=null),o}});r.JSON={parse:o.parse,stringify:o.stringify}}).call(window),function(e,t){t(e)}(window,function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=function(e){var t=function(t){return e(String(t).replace(/[\t\n\f\r ]+/g,""))};return t.original=e,t}(e.atob)}else{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,n,i,a,o="",s=0,c=e.length%3;s255||(i=e.charCodeAt(s++))>255||(a=e.charCodeAt(s++))>255)return"";t=n<<16|i<<8|a,o+=r.charAt(t>>18&63)+r.charAt(t>>12&63)+r.charAt(t>>6&63)+r.charAt(63&t)}return c?o.slice(0,c-3)+"===".substring(c):o},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!n.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,i,a,o="",s=0;s>16&255):64===a?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}}}),function(){String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)})}();var or,sr={setup:function(e){or=e},log:function(){(or||console&&console.log||function(){}).apply(null,arguments)}},cr={get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t;try{t=JSON.parse(cr.get(e))||null}catch(r){sr.log(r)}return t},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(r){sr.log(r)}},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__local_store_support__",r="testIsSupportStorage";cr.set(t,r),cr.get(t)!==r&&(e=!1),cr.remove(t)}catch(n){e=!1}return e}},lr=function(){function e(){return r=(9301*r+49297)%233280,r/233280}var t=new Date,r=t.getTime();return function(t){return Math.ceil(e()*t)}}();a.prototype.get=function(e,r,a,o){if(!e)throw new Error("key is must");r=r||1e4,a=a||1e3,o=o||function(){};var s=this.lockGetPrefix+e,c=cr.get(s),l=String(n());return c&&(c=i(c)||{randomNum:0,expireTime:0},c.expireTime>t())?o(null):(cr.set(s,JSON.stringify({randomNum:l,expireTime:t()+r})),void setTimeout(function(){c=i(cr.get(s))||{randomNum:0,expireTime:0},c&&c.randomNum===l?(o(cr.get(e)),cr.remove(e),cr.remove(s)):o(null)},a))},a.prototype.set=function(e,r,a,o,s){if(!e||!r)throw new Error("key and val is must");a=a||1e4,o=o||1e3,s=s||function(){};var c=this.lockSetPrefix+e,l=cr.get(c),u=String(n());return l&&(l=i(l)||{randomNum:0,expireTime:0},l.expireTime>t())?s({status:"fail",reason:"This key is locked"}):(cr.set(c,JSON.stringify({randomNum:u,expireTime:t()+a})),void setTimeout(function(){l=i(cr.get(c))||{randomNum:0,expireTime:0},l.randomNum===u?cr.set(e,r)&&s({status:"success"}):s({status:"fail",reason:"This key is locked"})},o))},c.prototype.on=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].push(r?t:{listener:t,once:!1}),this},c.prototype.prepend=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].unshift(r?t:{listener:t,once:!1}),this},c.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},c.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},c.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var n=0,i=r.length;n=4&&(a=e(a,i),i=[]);return i.length>0&&(a=e(a,i)),a.toString(16)};return function(){var i=String(screen.height*screen.width);i=i&&/\d{5,}/.test(i)?i.toString(16):String(31242*n()).replace(".","").slice(0,8);var a=e()+"-"+t()+"-"+r()+"-"+i+"-"+e();return a?a:(String(n())+String(n())+String(n())).slice(2,15)}}(),pr=function(e){this.ele=e},dr=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};pr.prototype={addClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")===-1&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1},attr:function(e,t){return"string"==typeof e&&g(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument,r=t.documentElement;return{top:e.top+window.pageYOffset-r.clientTop,left:e.left+window.pageXOffset-r.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),y(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!v(r))return null;for(var n=r.length-1;n>=0;n--){var i=r[n];if(t=i.style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return dr((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return dr(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return e=e&&11!==e.nodeType?e:null,y(e)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return y(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return y(e);return y(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),n=[],i=0;i0&&(e=e.concat(kr.source_channel),e=$e(e)),k(e,function(e){t=B(location.href,e),t.length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=Ar.campaignParams(),n={},i={};return k(r,function(r,a,o){(" "+Nr+" ").indexOf(" "+a+" ")!==-1?n[e+a]=o[a]:i[t+a]=o[a]}),{$utms:n,otherUtms:i}},properties:function(){var e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,r={$timezone_offset:(new Date).getTimezoneOffset(),$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$viewport_height:e,$viewport_width:t,$lib:"js",$lib_version:xr};return r},currentProps:{},register:function(e){$(Ar.currentProps,e)}},Er={get:function(e){return gr.get(e)},set:function(e,t,r,n){var i="";if(n="undefined"==typeof n?kr.cross_subdomain:n){var a=De(location.href);"url\u89e3\u6790\u5931\u8d25"===a&&(a=""),i=a?"; domain="+a:""}return gr.set(e,t,r,n,kr.set_cookie_samesite,kr.is_secure_cookie,i)},remove:function(e,t){return t="undefined"==typeof t?kr.cross_subdomain:t,gr.remove(e,t)},isSupport:function(e,t){return e=e||"sajssdk_2015_cookie_access_test", +t=t||"1",gr.isSupport(e,t)}};Er.getNewUser=Ve;var Ir={data:{},get:function(e){var t=this.data[e];return void 0===t?null:void 0!==t._expirationTimestamp_?(new Date).getTime()>t._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var n,i=new Date;n="s"===String(r).slice(-1)?i.getTime()+1e3*Number(String(r).slice(0,-1)):i.getTime()+24*r*60*60*1e3,t={value:t,_expirationTimestamp_:n}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+kr.sdk_id+e}},Lr={checkIsAddSign:function(e){"track"===e.type&&(Ve()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=Er.get("sensorsdata2015jssdkcross"+ar.para.sdk_id);r=Oe(r);var n={};null!=r&&ce(r)&&(n=JSON.parse(r),n.$device_id&&(t=n.$device_id)),t=t||e,ar.para.cross_subdomain===!0?ar.store.set("$device_id",t):(n.$device_id=t,n=JSON.stringify(n),ar.para.encrypt_cookie&&(n=Ne(n)),Er.set("sensorsdata2015jssdkcross"+ar.para.sdk_id,n,null,!0)),ar.para.is_track_device_id&&(Ar.currentProps.$device_id=t)},storeInitCheck:function(){if(ar.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};Er.isSupport()?Er.set(ze("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):Ir.set(Ir.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else Ve()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=Ar.pageProp.url_domain,t={};""===e&&(e="url\u89e3\u6790\u5931\u8d25");var n=He(document.referrer,!0);if(ar.para.preset_properties.search_keyword_baidu?Ue(document.referrer)&&(!Ee()||r(n)&&n.active?ar.store._state&&ar.store._state.props&&(ar.store._state.props.$search_keyword_id&&delete ar.store._state.props.$search_keyword_id,ar.store._state.props.$search_keyword_id_type&&delete ar.store._state.props.$search_keyword_id_type,ar.store._state.props.$search_keyword_id_hash&&delete ar.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=Dr.id(),t.$search_keyword_id_type=Dr.type(),t.$search_keyword_id_hash=ee(t.$search_keyword_id))):ar.store._state&&ar.store._state.props&&(ar.store._state.props.$search_keyword_id&&delete ar.store._state.props.$search_keyword_id,ar.store._state.props.$search_keyword_id_type&&delete ar.store._state.props.$search_keyword_id_type,ar.store._state.props.$search_keyword_id_hash&&delete ar.store._state.props.$search_keyword_id_hash),ar.store.save(),k(ar.para.preset_properties,function(n,i){if(i.indexOf("latest_")===-1)return!1;if(i=i.slice(7),n){if("wx_ad_click_id"===i&&"not_collect"===n)return!1;if("utm"!==i&&"url\u89e3\u6790\u5931\u8d25"===e)"wx_ad_click_id"===i?(t._latest_wx_ad_click_id="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_hash_key="url\u7684domain\u89e3\u6790\u5931\u8d25",t._latest_wx_ad_callbacks="url\u7684domain\u89e3\u6790\u5931\u8d25"):t["$latest_"+i]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(Ue(document.referrer))switch(i){case"traffic_source_type":t.$latest_traffic_source_type=qe();break;case"referrer":t.$latest_referrer=Ar.pageProp.referrer;break;case"search_keyword":He()?t.$latest_search_keyword=He():r(ar.store._state)&&r(ar.store._state.props)&&ar.store._state.props.$latest_search_keyword&&delete ar.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=X();break;case"wx_ad_click_id":var a=Me(location.href);t._latest_wx_ad_click_id=a.click_id,t._latest_wx_ad_hash_key=a.hash_key,t._latest_wx_ad_callbacks=a.callbacks}}else if("utm"===i&&ar.store._state&&ar.store._state.props)for(var o in ar.store._state.props)(0===o.indexOf("$latest_utm")||0===o.indexOf("_latest_")&&o.indexOf("_latest_wx_ad_")<0)&&delete ar.store._state.props[o];else if(ar.store._state&&ar.store._state.props&&"$latest_"+i in ar.store._state.props)delete ar.store._state.props["$latest_"+i];else if("wx_ad_click_id"==i&&ar.store._state&&ar.store._state.props&&n===!1){var s=["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"];k(s,function(e){e in ar.store._state.props&&delete ar.store._state.props[e]})}}),ar.register(t),ar.para.preset_properties.latest_utm){var i=Ar.campaignParamsStandard("$latest_","_latest_"),a=i.$utms,o=i.otherUtms;ae(a)||ar.register(a),ae(o)||ar.register(o)}}},Ur={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={};e=e||this._state;var r=e._first_id||e.first_id,n=e._distinct_id||e.distinct_id;return r&&n?(t.login_id=n,t.anonymous_id=r):t.anonymous_id=n,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==ar.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=Er.get("sensorsdata2015session");e=Oe(e);var t=null;null!==e&&"object"==typeof(t=i(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&ar.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;$(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;T(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};r=t?e:$(this._state.props||{},e);for(var n in r)"string"==typeof r[n]&&(r[n]=r[n].slice(0,ar.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};T(t,e),this.set("props",t)},clearAllProps:function(e){this._sessionState={};var t;if(v(e)&&e.length>0)for(t=0;tkr.max_id_length)},keyLength:function(e){return!(!p(e)||e.length>kr.max_key_length)},stringLength:function(e){return!(!p(e)||e.length>kr.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(te(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(te(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=Ur._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(te(this.bindReservedNames,e)>-1)}},Hr={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Id"),e(Rr[n])&&Rr[n](r),"idLength"===n)||t}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="eventName"),e(Rr[n])&&Rr[n](r)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="Property key"),e(Rr[n])&&Rr[n](r)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(t,r,n){return t||(r="Property Value",e(Rr[n])&&Rr[n](r)),!0}},properties:function(t){return r(t)?k(t,function(t,r){Xe({propertyKey:r});var n=function(t,n,i){return t||(n=r+"'s Value",e(Rr[i])&&Rr[i](n)),!0};Xe({propertyValue:t},n)}):Jr.voidZero(t)&&Pe("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return void 0!==e&&r(e)&&!ae(e)?this.properties.call(this,e):Pe("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="item_type"),e(Rr[n])&&Rr[n](r)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="item_id"),e(Rr[n])&&Rr[n](r)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="login_id_key"),e(Rr[n])&&Rr[n](r),"keyLength"===n)||t}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Key"),e(Rr[n])&&Rr[n](r),"keyLength"===n)||t}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Key"),e(Rr[n])&&Rr[n](r),"keyLength"===n)||t}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Value"),e(Rr[n])&&Rr[n](r),"idLength"===n)||t}},check:function(t,r,n){var i=this[t];if(e(i))return i.call(this,r);if(!i)return!1;for(var a=0;a-1)return n;if("area"===i&&"map"===a.tagName.toLowerCase()&&y(a).prev().tagName&&"img"===y(a).prev().tagName.toLowerCase())return y(a).prev();if("div"===i&&ar.para.heatmap.collect_tags.div&&r.isDivLevelValid(n)){var s=ar.para.heatmap&&ar.para.heatmap.collect_tags&&ar.para.heatmap.collect_tags.div&&ar.para.heatmap.collect_tags.div.max_level||1;if(s>1||r.isCollectableDiv(n))return n}if(r.isStyleTag(i)&&ar.para.heatmap.collect_tags.div){var c=r.getCollectableParent(n);if(c&&r.isDivLevelValid(c))return c}var l=r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)});return l||null},getDivLevels:function(e,t){var r=Br.getElementPath(e,!0,t),n=r.split(" > "),i=0;return k(n,function(e){"div"===e&&i++}),i},isDivLevelValid:function(e){for(var t=ar.para.heatmap&&ar.para.heatmap.collect_tags&&ar.para.heatmap.collect_tags.div&&ar.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),n=r.length-1;n>=0;n--)if(Br.getDivLevels(r[n],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var n=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){n.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){n.unshift(e.tagName.toLowerCase());break}if(e===document.body){n.unshift("body");break}n.unshift(e.tagName.toLowerCase()),e=e.parentNode}return n.join(" > ")},getClosestLi:function(e){var t=function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null};return t(e,"li")},getElementPosition:function(e,t,r){function n(e){var t=e.parentNode;if(!t)return"";var r=y(e).getSameTypeSiblings(),n=r.length;if(1===n)return 0;for(var i=0,a=e;y(a).previousElementSibling().ele;a=y(a).previousElementSibling().ele,i++);return i}var i=ar.heatmap.getClosestLi(e);if(!i)return null;var a=e.tagName.toLowerCase(),o=i.getElementsByTagName(a),s=o.length,c=[];if(s>1){for(var l=0;l1)return te(c,e)}return n(i)},setNotice:function(e){ar.is_heatmap_render_mode=!0,ar.para.heatmap||(ar.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(ar.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),ar.para.heatmap_url||(ar.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+ar.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,n=e.parentNode.children,i=0;i "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=Ae({target:e});r.$element_selector=t?t:"",r.$element_path=ar.heatmap.getElementPath(e,ar.para.heatmap&&"not_use_id"===ar.para.heatmap.element_selector);var n=ar.heatmap.getElementPosition(e,r.$element_path,ar.para.heatmap&&"not_use_id"===ar.para.heatmap.element_selector);return le(n)&&(r.$element_position=n),r},getPointerEventProp:function(e,t){function r(){var e=document.body.scrollLeft||document.documentElement.scrollLeft||0,t=document.body.scrollTop||document.documentElement.scrollTop||0;return{scrollLeft:e,scrollTop:t}}function n(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function i(e){return Number(Number(e).toFixed(3))}function a(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+n(t).targetEleX||0,o=e.pageY||e.clientY+r().scrollTop||e.offsetY+n(t).targetEleY||0;return{$page_x:i(a),$page_y:i(o)}}return e?a(e):{}},start:function(t,n,i,a,o){var s=r(a)?a:{},c=e(o)?o:e(a)?a:void 0;if(ar.para.heatmap&&ar.para.heatmap.collect_element&&!ar.para.heatmap.collect_element(n))return!1;var l=this.getEleDetail(n);if(ar.para.heatmap&&ar.para.heatmap.custom_property){var u=ar.para.heatmap.custom_property(n);r(u)&&(l=$(l,u))}l=$(l,this.getPointerEventProp(t,n),s),"a"===i&&ar.para.heatmap&&ar.para.heatmap.isTrackLink===!0?ar.trackLink({event:t,target:n},"$WebClick",l):ar.track("$WebClick",l,c)},hasElement:function(e,t){var r;if(e.event){var n=e.event;r=n.path||n._getPath&&n._getPath()}else e.element&&(r=y(e.element).getParents());if(r&&v(r)&&r.length>0)for(var i=0;i-1)&&(!t||ar.para.heatmap&&ar.para.heatmap.collect_tags&&ar.para.heatmap.collect_tags.div?!!(r(ar.para.heatmap)&&r(ar.para.heatmap.collect_tags)&&r(ar.para.heatmap.collect_tags.div)&&v(ar.para.heatmap.collect_tags.div.ignore_tags)&&te(ar.para.heatmap.collect_tags.div.ignore_tags,e)>-1):te(i,e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(n,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(a){ar.log(a)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,n=r?r.tagName.toLowerCase():"";if("body"===n)return!1;var i=ar.para&&ar.para.heatmap&&ar.para.heatmap.collect_tags&&ar.para.heatmap.collect_tags.div&&ar.para.heatmap.collect_tags.div.max_level;if(n&&"div"===n&&(i>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(n,t))return this.getCollectableParent(r,t)}catch(a){ar.log(a)}return!1},listenUrlChange:function(e){e(),ar.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!r(ar.para.heatmap)||"default"!==ar.para.heatmap.scroll_notice_map)return!1;var t=!0;ar.para.scrollmap&&e(ar.para.scrollmap.collect_url)&&this.listenUrlChange(function(){t=!!ar.para.scrollmap.collect_url()});var n=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t},i=n({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,n=new Date,i=n-this.current_time;(i>ar.para.heatmap.scroll_delay_time&&r-e.$viewport_position!==0||t)&&(e.$url=X(),e.$title=document.title,e.$url_path=Z(),e.event_duration=Math.min(ar.para.heatmap.scroll_event_duration,parseInt(i)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,ar.track("$WebStay",e)),this.current_time=n}});i.current_time=new Date,We(window,"scroll",function(){return!!t&&void i.go()}),We(window,"unload",function(){return!!t&&void i.go("notime")})},initHeatmap:function(){var t=this,n=!0;return!(!r(ar.para.heatmap)||"default"!==ar.para.heatmap.clickmap)&&(e(ar.para.heatmap.collect_url)&&this.listenUrlChange(function(){n=!!ar.para.heatmap.collect_url()}),"all"===ar.para.heatmap.collect_elements?ar.para.heatmap.collect_elements="all":ar.para.heatmap.collect_elements="interact",void("all"===ar.para.heatmap.collect_elements?We(document,"click",function(e){if(!n)return!1;var r=e||window.event;if(!r)return!1;var i=r.target||r.srcElement;if("object"!=typeof i)return!1;if("string"!=typeof i.tagName)return!1;var a=i.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!i||!i.parentNode||!i.parentNode.children)return!1;var o=i.parentNode.tagName.toLowerCase();"a"===o||"button"===o?t.start(r,i.parentNode,o):t.start(r,i,a)}):We(document,"click",function(e){if(!n)return!1;var i=e||window.event;if(!i)return!1;var a=i.target||i.srcElement,o=ar.heatmap.getTargetElement(a,e);o?t.start(i,o,o.tagName.toLowerCase()):h(a)&&"div"===a.tagName.toLowerCase()&&r(ar.para.heatmap)&&ar.para.heatmap.get_vtrack_config&&ar.unlimitedDiv.events.length>0&&ar.unlimitedDiv.isTargetEle(a)&&t.start(i,a,a.tagName.toLowerCase(),{$lib_method:"vtrack"})})))}},Fr={setOnlineState:function(e){if(e===!0&&r(ar.para.jsapp)&&"function"==typeof ar.para.jsapp.getData){ar.para.jsapp.isOnline=!0;var t=ar.para.jsapp.getData();v(t)&&t.length>0&&k(t,function(e){ce(e)&&ar.sendState.realtimeSend(JSON.parse(e))})}else ar.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return Ar.campaignParams()},getStayTime:function(){return(new Date-ar._t)/1e3},setProfileLocal:function(e){if(!cr.isSupport())return ar.setProfile(e),!1;if(!r(e)||ae(e))return!1;var t=ar.store.readObjectVal("sensorsdata_2015_jssdk_profile"),n=!1;if(r(t)&&!ae(t)){for(var i in e)!(i in t&&t[i]!==e[i])&&i in t||(t[i]=e[i],n=!0);n&&(ar.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),ar.setProfile(e))}else ar.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),ar.setProfile(e)},setInitReferrer:function(){var e=Re();ar.setOnceProfile({_init_referrer:e,_init_referrer_host:Ar.pageProp.referrer_host})},setSessionReferrer:function(){var e=Re();ar.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:Ar.pageProp.referrer_host})},setDefaultAttr:function(){Ar.register({_current_url:location.href,_referrer:Re(),_referring_host:Ar.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase(),i=e.parentNode.tagName.toLowerCase(),a=ar.para.heatmap&&ar.para.heatmap.track_attr?ar.para.heatmap.track_attr:["data-sensors-click"];"button"===n||"a"===n||"a"===i||"button"===i||"input"===n||"textarea"===n||G(e,a)||Br.start(null,e,n,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase();Br.start(null,e,n,t,r)}},autoTrackSinglePage:function(e,t){function n(){var e=Ar.campaignParams(),t={};return k(e,function(e,r,n){(" "+ar.source_channel_standard+" ").indexOf(" "+r+" ")!==-1?t["$"+r]=n[r]:t[r]=n[r]}),t}function i(e,t){ar.track("$pageview",$({$referrer:a,$url:X(),$url_path:Z(),$title:document.title},e,n()),t),a=X()}var a;a=this.autoTrackIsUsed?Ar.pageProp.url:Ar.pageProp.referrer,e=r(e)?e:{};var o=!e.not_set_profile;if(e.not_set_profile&&delete e.not_set_profile,i(e,t),this.autoTrackSinglePage=i,ar.is_first_visitor&&o){var s={};ar.para.preset_properties.search_keyword_baidu&&Ue(document.referrer)&&Ee()&&(s.$search_keyword_id=Dr.id(),s.$search_keyword_id_type=Dr.type(),s.$search_keyword_id_hash=ee(s.$search_keyword_id)),ar.setOnceProfile($({$first_visit_time:new Date,$first_referrer:Re(),$first_browser_language:p(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:qe(),$first_search_keyword:He()},n(),s)),ar.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=r(e)?e:{},this.autoTrack($(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=r(e)?e:{};var n=Ar.campaignParams(),i={};k(n,function(e,t,r){(" "+ar.source_channel_standard+" ").indexOf(" "+t+" ")!==-1?i["$"+t]=r[t]:i[t]=r[t]});var a=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var o=location.href;if(ar.para.is_single_page&&S(function(){var r=Re(o,!0);ar.track("$pageview",$({$referrer:r,$url:X(),$url_path:Z(),$title:document.title},i,e),t),o=X()}),ar.track("$pageview",$({$referrer:Re(null,!0),$url:X(),$url_path:Z(),$title:document.title},i,e),t),ar.is_first_visitor&&a){var s={};ar.para.preset_properties.search_keyword_baidu&&Ue(document.referrer)&&Ee()&&(s.$search_keyword_id=Dr.id(),s.$search_keyword_id_type=Dr.type(),s.$search_keyword_id_hash=ee(s.$search_keyword_id)),ar.setOnceProfile($({$first_visit_time:new Date,$first_referrer:Re(null,!0),$first_browser_language:p(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:qe(),$first_search_keyword:He()},i,s)),ar.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return ae(ar.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":ar.store._state._first_id||ar.store._state.first_id||ar.store._state._distinct_id||ar.store._state.distinct_id},setPlugin:function(t){return!!r(t)&&void k(t,function(t,n){e(t)&&(r(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[n]?t(window.SensorsDataWebJSSDKPlugin[n]):ar.log(n+"\u6ca1\u6709\u83b7\u53d6\u5230,\u8bf7\u67e5\u9605\u6587\u6863\uff0c\u8c03\u6574"+n+"\u7684\u5f15\u5165\u987a\u5e8f\uff01"))})},useModulePlugin:function(){ar.use.apply(ar,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}},Wr={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}},zr={__proto__:null,addReferrerHost:Ze,addPropsHook:Ye,initPara:Ge,setInitVar:et,enableLocalLog:tt,disableLocalLog:rt,quick:nt,use:it,track:at,bind:ot,unbind:st,trackLink:ct,trackLinks:lt,setItem:ut,deleteItem:pt,setProfile:dt,setOnceProfile:ft,appendProfile:_t,incrementProfile:ht,deleteProfile:gt,unsetProfile:mt,identify:vt,trackSignup:bt,registerPage:St,clearAllRegister:wt,clearPageRegister:kt,register:$t,registerOnce:Pt,registerSession:Ct,registerSessionOnce:Ot,login:xt,loginWithKey:Tt,logout:jt,getPresetProperties:Dt,iOSWebClickPolyfill:At,readyState:Wr,para_default:$r,log:Pe,debug:Or,IDENTITY_KEY:jr},Vr=function(){this._events=[],this.pendingEvents=[]};Vr.prototype={emit:function(e){var t=[].slice.call(arguments,1);k(this._events,function(r){r.type===e&&r.callback.apply(r.context,t)}),this.pendingEvents.push({type:e,data:t}),this.pendingEvents.length>20?this.pendingEvents.shift():null},on:function(e,t,r,n){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),n=n!==!1,this.pendingEvents.length>0&&n&&k(this.pendingEvents,function(n){n.type===e&&t.apply(r,n.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var Xr={__proto__:null,parseSuperProperties:xe,searchConfigData:Te,strip_empty_properties:je,getCurrentDomain:De,getEleInfo:Ae,isBaiduTraffic:Ee,getReferrerEqid:Ie,getReferrerEqidType:Le,getBaiduKeyword:Dr,isReferralTraffic:Ue,getReferrer:Re,getKeywordFromReferrer:He,getWxAdIdFromUrl:Me,getReferSearchEngine:Je,getSourceFromReferrer:qe,info:Ar,ajax:Fe,getElementContent:Be,cookie:Er,addEvent:We,EventEmitterSa:Vr,encrypt:Ne,decryptIfNeeded:Oe},Zr={};Zr.buildData=function(e){var t={identities:{},distinct_id:ar.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(ar.lib_version)},properties:{}};return r(e)&&r(e.identities)&&!ae(e.identities)?$(t.identities,e.identities):$(t.identities,Ur._state.identities),r(e)&&r(e.properties)&&!ae(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),$(t,ar.store.getUnionId(),e),Mr.stage.process("addCustomProps",t),r(e.properties)&&!ae(e.properties)&&$(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=$({},Ar.properties(),Ur.getProps(),Ur.getSessionProps(),Ar.currentProps,t.properties),ar.para.preset_properties.latest_referrer&&!p(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),ar.para.preset_properties.latest_search_keyword&&!p(t.properties.$latest_search_keyword)&&(ar.para.preset_properties.search_keyword_baidu&&p(t.properties.$search_keyword_id)&&le(t.properties.$search_keyword_id_hash)&&p(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),ar.para.preset_properties.latest_traffic_source_type&&!p(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),ar.para.preset_properties.latest_landing_page&&!p(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===ar.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id, +delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):ar.para.preset_properties.latest_wx_ad_click_id&&!p(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",t.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),p(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=X())),t.properties.$time&&A(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,ar.vtrackBase.addCustomProps(t),xe(t),Lr.checkIsAddSign(t),Lr.checkIsFirstTime(t),ar.addReferrerHost(t),ar.addPropsHook(t),Mr.stage.process("formatData",t),t},Zr.sendData=function(e,t){var r=Te(e.properties);ar.para.debug_mode===!0?(ar.log(e),ar.saEvent.debugPath(JSON.stringify(e),t)):ar.sendState.getSendCall(e,r,t)},Zr.encodeTrackData=function(e){var t=N(e),r="crc="+Q(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)};var Yr=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,ar.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=Et(e.server_url,e.data)};Yr.prototype.start=function(){var e=this;ar.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},Yr.prototype.lastClear=function(){var e=V();void 0!==e.ie?this.img.src="about:blank":this.img.src=""};var Gr=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=It(e.data)};Gr.prototype.start=function(){var e=this;Fe({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:ar.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var Qr=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=It(e.data)};Qr.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var en={};en.getSendCall=function(e,t,r){if(ar.is_heatmap_render_mode)return!1;if(ar.readyState.state<3)return ar.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(n()).slice(2,5)+String(n()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var i=e;e=JSON.stringify(e);var a={data:i,config:t,callback:r};return ar.events.tempAdd("send",i),!ar.para.app_js_bridge&&ar.para.batch_send&&localStorage.length<100?(ar.log(i),ar.batchSend.add(a.data),!1):("item_set"===i.type||"item_delete"===i.type?this.prepareServerUrl(a):ar.bridge.dataSend(a,this,r),void ar.log(i))},en.prepareServerUrl=function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(v(ar.para.server_url)&&ar.para.server_url.length)for(var t=0;t0)for(var n={current:0,total:r.length},i=new Bt(t,n,ar),a=0;a=a.length:a.push(s);break;default:a.splice(o,0,s)}}}};var nn={addCustomProps:null,formatData:null},an=new Ft(nn),on={init:function(){},interceptor:{formatData:{priority:0,entry:function(e){return tr(e),e}}}},sn={initPara:function(){},initState:function(){},initDefineBridgeInfo:function(){},bridge_info:{touch_app_bridge:!1},dataSend:function(e,t){t.prepareServerUrl(e)}},cn={init:function(){},addCustomProps:function(){}},ln={add:function(e){ar.para.batch_send=!1;var t=Te(e.properties);ar.sendState.prepareServerUrl({data:e,config:t})}};for(var un in zr)ar[un]=zr[un];return ar.modules={},sr.setup(Pe),ar._=$(wr,Xr),ar.sendState=en,ar.events=new ar._.EventEmitterSa,ar.store=Ur,ar.heatmap=Br,ar.bridge=sn,ar.JSBridge=ir,ar.vtrackBase=cn,ar.batchSend=ln,ar.use=nr,Wt(new zt(ar)),Wt(new rr(ar)),ar.init=function(e){return!(ar.readyState&&ar.readyState.state&&ar.readyState.state>=2)&&(e=e||{},e.batch_send=!1,r(e.heatmap)&&(e.heatmap.get_vtrack_config=!1),ar.setInitVar(),ar.readyState.setState(2),ar.initPara(e),qt(),void ar.iOSWebClickPolyfill())},Jt(),ar}); \ No newline at end of file diff --git a/heatmap.min.js b/heatmap.min.js index 9d14ac94..de8949dd 100644 --- a/heatmap.min.js +++ b/heatmap.min.js @@ -2,4 +2,4 @@ !r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ne?t[0]:t,ne.merge(this,ne.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:W,!0)),fe.test(r[1])&&ne.isPlainObject(t))for(r in t)ne.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=W.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ne.isFunction(e)?void 0!==n.ready?n.ready(e):e(ne):ne.makeArray(e,this)};ge.prototype=ne.fn,pe=ne(W);var ve=/^(?:parents|prev(?:Until|All))/,me={children:!0,contents:!0,next:!0,prev:!0};ne.fn.extend({has:function(e){var t=ne(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&ne.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ne.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?G.call(ne(e),this[0]):G.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ne.uniqueSort(ne.merge(this.get(),ne(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ne.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return le(e,"parentNode")},parentsUntil:function(e,t,n){return le(e,"parentNode",n)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return le(e,"nextSibling")},prevAll:function(e){return le(e,"previousSibling")},nextUntil:function(e,t,n){return le(e,"nextSibling",n)},prevUntil:function(e,t,n){return le(e,"previousSibling",n)},siblings:function(e){return ue((e.parentNode||{}).firstChild,e)},children:function(e){return ue(e.firstChild)},contents:function(e){return i(e,"iframe")?e.contentDocument:(i(e,"template")&&(e=e.content||e),ne.merge([],e.childNodes))}},function(e,t){ne.fn[e]=function(n,r){var i=ne.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ne.filter(r,i)),this.length>1&&(me[e]||ne.uniqueSort(i),ve.test(e)&&i.reverse()),this.pushStack(i)}});var ye=/[^\x20\t\r\n\f]+/g;ne.Callbacks=function(e){e="string"==typeof e?s(e):ne.extend({},e);var t,n,r,i,o=[],a=[],l=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;l=-1)for(n=a.shift();++l-1;)o.splice(n,1),n<=l&&l--}),this},has:function(e){return e?ne.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},ne.extend({Deferred:function(t){var n=[["notify","progress",ne.Callbacks("memory"),ne.Callbacks("memory"),2],["resolve","done",ne.Callbacks("once memory"),ne.Callbacks("once memory"),0,"resolved"],["reject","fail",ne.Callbacks("once memory"),ne.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return ne.Deferred(function(t){ne.each(n,function(n,r){var i=ne.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&ne.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,c=arguments,f=function(){var e,f;if(!(t=a&&(r!==u&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?d():(ne.Deferred.getStackHook&&(d.stackTrace=ne.Deferred.getStackHook()),e.setTimeout(d))}}var a=0;return ne.Deferred(function(e){n[0][3].add(o(0,e,ne.isFunction(i)?i:l,e.notifyWith)),n[1][3].add(o(0,e,ne.isFunction(t)?t:l)),n[2][3].add(o(0,e,ne.isFunction(r)?r:u))}).promise()},promise:function(e){return null!=e?ne.extend(e,i):i}},o={};return ne.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=$.call(arguments),o=ne.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?$.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(c(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||ne.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)c(i[n],a(n),o.reject);return o.promise()}});var xe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ne.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&xe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},ne.readyException=function(t){e.setTimeout(function(){throw t})};var be=ne.Deferred();ne.fn.ready=function(e){return be.then(e)["catch"](function(e){ne.readyException(e)}),this},ne.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--ne.readyWait:ne.isReady)||(ne.isReady=!0,e!==!0&&--ne.readyWait>0||be.resolveWith(W,[ne]))}}),ne.ready.then=be.then,"complete"===W.readyState||"loading"!==W.readyState&&!W.documentElement.doScroll?e.setTimeout(ne.ready):(W.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f));var we=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===ne.type(n)){i=!0;for(s in n)we(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,ne.isFunction(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(ne(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){Ce.remove(this,e)})}}),ne.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ke.get(e,t),n&&(!r||Array.isArray(n)?r=ke.access(e,t,ne.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ne.queue(e,t),r=n.length,i=n.shift(),o=ne._queueHooks(e,t),a=function(){ne.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ke.get(e,n)||ke.access(e,n,{empty:ne.Callbacks("once memory").add(function(){ke.remove(e,[t+"queue",n])})})}}),ne.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Me=/^$|\/(?:java|ecma)script/i,He={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};He.optgroup=He.option,He.tbody=He.tfoot=He.colgroup=He.caption=He.thead,He.th=He.td;var Fe=/<|&#?\w+;/;!function(){var e=W.createDocumentFragment(),t=e.appendChild(W.createElement("div")),n=W.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ee.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ee.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Oe=W.documentElement,je=/^key/,Re=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qe=/^([^.]*)(?:\.(.+)|)/;ne.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,g,v=ke.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&ne.find.matchesSelector(Oe,i),n.guid||(n.guid=ne.guid++),(l=v.events)||(l=v.events={}),(a=v.handle)||(a=v.handle=function(t){return"undefined"!=typeof ne&&ne.event.triggered!==t.type?ne.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ye)||[""],u=t.length;u--;)s=qe.exec(t[u])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=ne.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=ne.event.special[p]||{},c=ne.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ne.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=l[p])||(d=l[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,h,a)!==!1||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),ne.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,g,v=ke.hasData(e)&&ke.get(e);if(v&&(l=v.events)){for(t=(t||"").match(ye)||[""],u=t.length;u--;)if(s=qe.exec(t[u])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=ne.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=l[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&f.teardown.call(e,h,v.handle)!==!1||ne.removeEvent(e,p,v.handle),delete l[p])}else for(p in l)ne.event.remove(e,p+t[u],n,r,!0);ne.isEmptyObject(l)&&ke.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=ne.event.fix(e),l=new Array(arguments.length),u=(ke.get(this,"events")||{})[s.type]||[],c=ne.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||u.disabled!==!0)){for(o=[],a={},n=0;n-1:ne.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,We=/\s*$/g;ne.extend({htmlPrefilter:function(e){return e.replace(Ue,"<$1>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=ne.contains(e.ownerDocument,e);if(!(ee.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ne.isXMLDoc(e)))for(a=y(s),o=y(e),r=0,i=o.length;r0&&x(a,!l&&y(e,"script")),s},cleanData:function(e){for(var t,n,r,i=ne.event.special,o=0;void 0!==(n=e[o]);o++)if(_e(n)){if(t=n[ke.expando]){if(t.events)for(r in t.events)i[r]?ne.event.remove(n,r):ne.removeEvent(n,r,t.handle);n[ke.expando]=void 0}n[Ce.expando]&&(n[Ce.expando]=void 0)}}}),ne.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return we(this,function(e){return void 0===e?ne.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ne.cleanData(y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ne.clone(this,e,t)})},html:function(e){return we(this,function(e){var n=this[0]||{},r=0,i=this.length;if(void 0===e&&1===n.nodeType)return n.innerHTML;if("string"==typeof e&&!We.test(e)&&!He[(Be.exec(e)||["",""])[1].toLowerCase()]){e=ne.htmlPrefilter(e);try{for(;r1)}}),ne.fn.delay=function(t,n){return t=ne.fx?ne.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=W.createElement("input"),t=W.createElement("select"),n=t.appendChild(W.createElement("option"));e.type="checkbox",ee.checkOn=""!==e.value,ee.optSelected=n.selected,e=W.createElement("input"),e.value="t",e.type="radio",ee.radioValue="t"===e.value}();var nt,rt=ne.expr.attrHandle;ne.fn.extend({attr:function(e,t){return we(this,ne.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ne.removeAttr(this,e)})}}),ne.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ne.prop(e,t,n):(1===o&&ne.isXMLDoc(e)||(i=ne.attrHooks[t.toLowerCase()]||(ne.expr.match.bool.test(t)?nt:void 0)),void 0!==n?null===n?void ne.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=ne.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ee.radioValue&&"radio"===t&&i(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(ye);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),nt={set:function(e,t,n){return t===!1?ne.removeAttr(e,n):e.setAttribute(n,n),n}},ne.each(ne.expr.match.bool.source.match(/\w+/g),function(e,t){var n=rt[t]||ne.find.attr;rt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=rt[a],rt[a]=i,i=null!=n(e,t,r)?a:null,rt[a]=o),i}});var it=/^(?:input|select|textarea|button)$/i,ot=/^(?:a|area)$/i;ne.fn.extend({prop:function(e,t){return we(this,ne.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ne.propFix[e]||e]})}}),ne.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ne.isXMLDoc(e)||(t=ne.propFix[t]||t,i=ne.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ne.find.attr(e,"tabindex");return t?parseInt(t,10):it.test(e.nodeName)||ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ee.optSelected||(ne.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ne.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ne.propFix[this.toLowerCase()]=this}),ne.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(ne.isFunction(e))return this.each(function(t){ne(this).addClass(e.call(this,t,R(this)))});if("string"==typeof e&&e)for(t=e.match(ye)||[];n=this[l++];)if(i=R(n),r=1===n.nodeType&&" "+j(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=j(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(ne.isFunction(e))return this.each(function(t){ne(this).removeClass(e.call(this,t,R(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(ye)||[];n=this[l++];)if(i=R(n),r=1===n.nodeType&&" "+j(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=j(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ne.isFunction(e)?this.each(function(n){ne(this).toggleClass(e.call(this,n,R(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=ne(this),o=e.match(ye)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=R(this),t&&ke.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":ke.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+j(R(n))+" ").indexOf(t)>-1)return!0;return!1}});var at=/\r/g;ne.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=ne.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ne(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=ne.map(i,function(e){return null==e?"":e+""})),t=ne.valHooks[this.type]||ne.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ne.valHooks[i.type]||ne.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(at,""):null==n?"":n)}}}),ne.extend({valHooks:{option:{get:function(e){var t=ne.find.attr(e,"value");return null!=t?t:j(ne.text(e))}},select:{get:function(e){var t,n,r,o=e.options,a=e.selectedIndex,s="select-one"===e.type,l=s?null:[],u=s?a+1:o.length;for(r=a<0?u:s?a:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ne.each(["radio","checkbox"],function(){ne.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=ne.inArray(ne(e).val(),t)>-1}},ee.checkOn||(ne.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var st=/^(?:focusinfocus|focusoutblur)$/;ne.extend(ne.event,{trigger:function(t,n,r,i){var o,a,s,l,u,c,f,d=[r||W],p=K.call(t,"type")?t.type:t,h=K.call(t,"namespace")?t.namespace.split("."):[];if(a=s=r=r||W,3!==r.nodeType&&8!==r.nodeType&&!st.test(p+ne.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),u=p.indexOf(":")<0&&"on"+p,t=t[ne.expando]?t:new ne.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:ne.makeArray(n,[t]),f=ne.event.special[p]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!ne.isWindow(r)){for(l=f.delegateType||p,st.test(l+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||W)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)t.type=o>1?l:f.bindType||p,c=(ke.get(a,"events")||{})[t.type]&&ke.get(a,"handle"),c&&c.apply(a,n),c=u&&a[u],c&&c.apply&&_e(a)&&(t.result=c.apply(a,n),t.result===!1&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!_e(r)||u&&ne.isFunction(r[p])&&!ne.isWindow(r)&&(s=r[u],s&&(r[u]=null),ne.event.triggered=p,r[p](),ne.event.triggered=void 0,s&&(r[u]=s)),t.result}},simulate:function(e,t,n){var r=ne.extend(new ne.Event,n,{type:e,isSimulated:!0});ne.event.trigger(r,null,t)}}),ne.fn.extend({trigger:function(e,t){return this.each(function(){ne.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ne.event.trigger(e,t,n,!0)}}),ne.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){ne.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ne.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ee.focusin="onfocusin"in e,ee.focusin||ne.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ne.event.simulate(t,e.target,ne.event.fix(e))};ne.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=ke.access(r,t);i||r.addEventListener(e,n,!0), ke.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=ke.access(r,t)-1;i?ke.access(r,t,i):(r.removeEventListener(e,n,!0),ke.remove(r,t))}}});var lt=/\[\]$/,ut=/\r?\n/g,ct=/^(?:submit|button|image|reset|file)$/i,ft=/^(?:input|select|textarea|keygen)/i;return ne.param=function(e,t){var n,r=[],i=function(e,t){var n=ne.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!ne.isPlainObject(e))ne.each(e,function(){i(this.name,this.value)});else for(n in e)q(n,e[n],t,i);return r.join("&")},ne.fn.extend({serialize:function(){return ne.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ne.prop(this,"elements");return e?ne.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ne(this).is(":disabled")&&ft.test(this.nodeName)&&!ct.test(e)&&(this.checked||!Ie.test(e))}).map(function(e,t){var n=ne(this).val();return null==n?null:Array.isArray(n)?ne.map(n,function(e){return{name:t.name,value:e.replace(ut,"\r\n")}}):{name:t.name,value:n.replace(ut,"\r\n")}}).get()}}),ne.fn.extend({wrapAll:function(e){var t;return this[0]&&(ne.isFunction(e)&&(e=e.call(this[0])),t=ne(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ne.isFunction(e)?this.each(function(t){ne(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ne(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ne.isFunction(e);return this.each(function(n){ne(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ne(this).replaceWith(this.childNodes)}),this}}),ne.expr.pseudos.hidden=function(e){return!ne.expr.pseudos.visible(e)},ne.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ee.createHTMLDocument=function(){var e=W.implementation.createHTMLDocument("").body;return e.innerHTML="
",2===e.childNodes.length}(),ne.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ee.createHTMLDocument?(t=W.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=W.location.href,t.head.appendChild(r)):t=W),i=fe.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=b([e],t,o),o&&o.length&&ne(o).remove(),ne.merge([],i.childNodes))},ne.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u,c=ne.css(e,"position"),f=ne(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=ne.css(e,"top"),l=ne.css(e,"left"),u=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1,u?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),ne.isFunction(t)&&(t=t.call(e,n,ne.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},ne.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ne.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===ne.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),i(e[0],"html")||(r=e.offset()),r={top:r.top+ne.css(e[0],"borderTopWidth",!0),left:r.left+ne.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-ne.css(n,"marginTop",!0),left:t.left-r.left-ne.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===ne.css(e,"position");)e=e.offsetParent;return e||Oe})}}),ne.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;ne.fn[e]=function(r){return we(this,function(e,r,i){var o;return ne.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i?o?o[t]:e[r]:void(o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i)},e,r,arguments.length)}}),ne.each(["top","left"],function(e,t){ne.cssHooks[t]=I(ee.pixelPosition,function(e,n){if(n)return n=P(e,t),Ge.test(n)?ne(e).position()[t]+"px":n})}),ne.each({Height:"height",Width:"width"},function(e,t){ne.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ne.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||o===!0?"margin":"border");return we(this,function(t,n,i){var o;return ne.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?ne.css(t,n,s):ne.style(t,n,i,s)},t,a?i:void 0,a)}})}),ne.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),ne.holdReady=function(e){e?ne.readyWait++:ne.ready(!0)},ne.isArray=Array.isArray,ne.parseJSON=JSON.parse,ne.nodeName=i,ne}(window);!function(){function t(e){this.mode=c.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,n=this.data.length;t65536?(r[0]=240|(1835008&i)>>>18,r[1]=128|(258048&i)>>>12,r[2]=128|(4032&i)>>>6,r[3]=128|63&i):i>2048?(r[0]=224|(61440&i)>>>12,r[1]=128|(4032&i)>>>6,r[2]=128|63&i):i>128?(r[0]=192|(1984&i)>>>6,r[1]=128|63&i):r[0]=i,this.parsedData.push(r)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function n(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function r(e,t){if(void 0==e.length)throw new Error(e.length+"/"+t);for(var n=0;nv.length)throw new Error("Too long data");return n}function u(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}t.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,n=this.parsedData.length;t=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=n.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4?this.modules[e+n][t+r]=!0:this.modules[e+n][t+r]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=p.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},createMovieClip:function(e,t,n){var r=e.createEmptyMovieClip(t,n),i=1;this.make();for(var o=0;o>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(var n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},setupTypeInfo:function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=p.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(var i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[r][a-s]){var l=!1;o>>i&1));var u=p.getMask(t,r,a-s);u&&(l=!l),this.modules[r][a-s]=l,i--,i==-1&&(o++,i=7)}if(r+=n,r<0||this.moduleCount<=r){r-=n,n=-n;break}}}},n.PAD0=236,n.PAD1=17,n.createData=function(e,t,r){for(var a=i.getRSBlocks(e,t),s=new o,l=0;l8*c)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*c+")");for(s.getLengthInBits()+4<=8*c&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;;){if(s.getLengthInBits()>=8*c)break;if(s.put(n.PAD0,8),s.getLengthInBits()>=8*c)break;s.put(n.PAD1,8)}return n.createBytes(s,a)},n.createBytes=function(e,t){for(var n=0,i=0,o=0,a=new Array(t.length),s=new Array(t.length),l=0;l=0?g.get(v):0}}for(var m=0,f=0;f=0;)t^=p.G15<=0;)t^=p.G18<>>=1;return t},getPatternPosition:function(e){return p.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case d.PATTERN000:return(t+n)%2==0;case d.PATTERN001:return t%2==0;case d.PATTERN010:return n%3==0;case d.PATTERN011:return(t+n)%3==0;case d.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case d.PATTERN101:return t*n%2+t*n%3==0;case d.PATTERN110:return(t*n%2+t*n%3)%2==0;case d.PATTERN111:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new r([1],0),n=0;n5&&(n+=3+o-5)}for(var r=0;r=256;)e-=255;return h.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},g=0;g<8;g++)h.EXP_TABLE[g]=1<>>7-e%8&1)},put:function(e,t){for(var n=0;n>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var v=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],m=function(){var e=function(e,t){this._el=e,this._htOption=t};return e.prototype.draw=function(e){function t(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg",e);for(var r in t)t.hasOwnProperty(r)&&n.setAttribute(r,t[r]);return n}var n=this._htOption,r=this._el,i=e.getModuleCount();Math.floor(n.width/i),Math.floor(n.height/i);this.clear();var o=t("svg",{viewBox:"0 0 "+String(i)+" "+String(i),width:"100%",height:"100%",fill:n.colorLight});o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.appendChild(o),o.appendChild(t("rect",{fill:n.colorLight,width:"100%",height:"100%"})),o.appendChild(t("rect",{fill:n.colorDark,width:"1",height:"1",id:"template"}));for(var a=0;a=1;f--)arguments[f]=arguments[f]*n;else"undefined"==typeof u&&(arguments[1]*=n,arguments[2]*=n,arguments[3]*=n,arguments[4]*=n);r.apply(this,arguments)}}var i=function(e,t){this._bIsPainted=!1,this._android=s(),this._htOption=t,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=t.width,this._elCanvas.height=t.height,e.appendChild(this._elCanvas),this._el=e,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return i.prototype.draw=function(e){var t=this._elImage,n=this._oContext,r=this._htOption,i=e.getModuleCount(),o=r.width/i,a=r.height/i,s=Math.round(o),l=Math.round(a);t.style.display="none",this.clear();for(var u=0;u'],s=0;s");for(var l=0;l');a.push("")}a.push(""),n.innerHTML=a.join("");var u=n.childNodes[0],c=(t.width-u.offsetWidth)/2,f=(t.height-u.offsetHeight)/2;c>0&&f>0&&(u.style.margin=f+"px "+c+"px")},e.prototype.clear=function(){this._el.innerHTML=""},e}();return e=function(e,t){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:f.H},"string"==typeof t&&(t={text:t}),t)for(var n in t)this._htOption[n]=t[n];"string"==typeof e&&(e=document.getElementById(e)),this._htOption.useSVG&&(x=m),this._android=s(),this._el=e,this._oQRCode=null,this._oDrawing=new x(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},e.prototype.makeCode=function(e){this._oQRCode=new n(l(e,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(e),this._oQRCode.make(),this._el.title=e,this._oDrawing.draw(this._oQRCode),this.makeImage()},e.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},e.prototype.clear=function(){this._oDrawing.clear()},e.CorrectLevel=f,e}();var n=e;!function(){var e=null,r=null,i={originalHeatData:null,ajaxHeatData:null,heatDataElement:[],heatMapList:[],heatMode:1,getCurrentUrl:function(){var e=r.urlParse(location.href),n={};return n["sa-request-url"]=sessionStorage.getItem("sensors_heatmap_url"),n["sa-request-url"]=n["sa-request-url"]?encodeURIComponent(n["sa-request-url"]):"",n["sa-request-id"]=sessionStorage.getItem("sensors_heatmap_id"),n["sa-request-type"]=sessionStorage.getItem("sensors_heatmap_type")||"1",t.each(n,function(e,t){t||delete n[e]}),e.addQueryString(n),e.getUrl()},setHeatState:function(e,t,n,i){if(i)"1"===t?this.setClickMap(e,n):"2"===t?this.setScrollMap(e,n):"3"===t&&this.setNoticeMap(e,n);else{if(!e)return!1;t||(t=1);var o={"sa-request-id":e,"sa-request-type":t,"sa-request-url":sessionStorage?sessionStorage.getItem("sensors_heatmap_url")||"":""},a={};try{window.name&&(a=JSON.parse(window.name),o=r.extend(a,o)),window.name=JSON.stringify(o)}catch(s){window.name=JSON.stringify(o)}location.reload()}},setDropDown:function(n,r,o){function a(){var n=null,r=!1;return t(window).on("scroll.v2",function(){r||(t("#heatMapContainer").html(""),r=!0),clearTimeout(n),n=setTimeout(function(){i.refreshHeatData(i.heatMode),r=!1},e.para.heatmap.renderRefreshTime||1e3)}),t(window).on("resize.v2",function(){r||(t("#heatMapContainer").html(""),r=!0),clearTimeout(n),n=setTimeout(function(){i.refreshHeatData(i.heatMode),r=!1},e.para.heatmap.renderRefreshTime||1e3)}),function(){t(window).off("scroll.v2"),t(window).off("resize.v2"),n&&(clearTimeout(n),n=null,r=!1)}}function s(e){function n(t,n){r=t,e.click(t,n),"type"==o?p.text(u[r]):"version"==o&&p.text(c[r])}var r=e.init(),o=e.name,s=e.id,l=t(s+">div"),d=t(s+">ul"),p=l.find("span:first");l.on("click",function(e){e.preventDefault(),e.stopPropagation(),t(s+">ul:visible").is(":visible")?d.hide():(t(".sa-sdk-heatmap-toolbar-selectmap ul").css("display","none"),d.css("display","block"),t(document).on("click.sa-jssdk-dropdown",function(){d.hide(),t(document).off("click.sa-jssdk-dropdown")}))}),d.on("click","li",function(){var e=t(this).attr("data-state");r!==e&&n(e)}),e.init&&n(r,!0),"version"===o&&t(document).on("keypress",function(e){f&&(f(),f=null),114==e.keyCode&&i.refreshHeatData(i.heatMode),122==e.keyCode&&(t("#chooseVersion").find("span:first").text("\u65b9\u6848\u4e00"),i.refreshHeatData(1),r="1"),120==e.keyCode&&(t("#chooseVersion").find("span:first").text("\u65b9\u6848\u4e8c"),i.refreshHeatData(2),f=a(),r="2")})}r=r||"1";var l="1"===r?"1":"0",u={1:"\u70b9\u51fb\u56fe",2:"\u89e6\u8fbe\u7387\u56fe",3:"\u6ce8\u610f\u529b\u56fe"},c={1:"\u65b9\u6848\u4e00",2:"\u65b9\u6848\u4e8c"},f=null,d=this;s({init:function(){return r},id:"#chooseType",name:"type",click:function(e,r){d.setHeatState(n,e,o,r),t("#sa_sdk_heatmap_toolbar_filter").toggle("1"==e)}}),"1"===r&&s({init:function(){return t("#chooseVersion").css("display","block"),l},name:"version",id:"#chooseVersion",click:function(e,t){t||(f&&(f(),f=null),"1"===e?i.refreshHeatData(1):"2"===e&&(i.refreshHeatData(2),f=a()))}})},setScrollMap:function(n,i){var a=this;if("string"==typeof n&&e.para.web_url){var s=new r.urlParse(e.para.web_url);s._values.Path="/api/scroll_heat_map/report/"+n;var l=new r.urlParse(e.para.web_url);l._values.Path="/api/scroll_heat_map/report/"+n,l.addQueryString({pathUrl:encodeURIComponent(i)});var u=l.getUrl(),c=new r.urlParse(e.para.web_url);c._values.Path="/api/v2/sa/scroll_heat_maps/report/jsonp/"+n;var f=new r.urlParse(e.para.web_url);f._values.Path="/api/v2/sa/scroll_heat_maps/report/jsonp/"+n,f.addQueryString({pathUrl:encodeURIComponent(i)});var d=f.getUrl(),p=function(e){function n(n){var r=parseInt((n.pageY+15)/10),i=0;i=r<=e.detail.length&&e.detail[r]?Math.floor(e.detail[r]/e.total*100*100)/100:0,u&&u.remove(),u=t(l.replace("{{top}}",n.pageY+15).replace("{{percent}}",i+"%")),t(document.body).append(u)}if("object"!=typeof e||!r.isArray(e.result)||0===e.result.length)return a.showErrorInfo(2,{error:"\u672a\u53d6\u5230\u6570\u636e"}),!1;if(e.detail=e.result||[],!e.total||0===e.total||"number"!=typeof e.total||e.total<2)return a.showErrorInfo(2,{error:"\u6709\u6548\u7684\u89e6\u53d1\u7528\u6237\u6570\u5c11\u4e8e2\u4eba"}),!1;e.origin_total=e.total,e.total=e.result[0],e.percent={};var i={setData:function(e,t,n){e=String(e),this.data[e]=this.data[e]||{},this.data[e][t]=n},data:{},getData:function(){var e={},t=[],n=null;for(var r in this.data){t=[];for(var i in this.data[r])t.push([i,this.data[r][i]]);this.data[r]=t,n=this.data[r].sort(function(e,t){return Math.abs(e[0]-Number(r))-Math.abs(t[0]-Number(r))})[0],e[n[0]]=n[1]}return e}};r.each(e.result,function(t,n){t/e.total==1?e.percent[100]=10*(n+1):t/e.total>.7&&t/e.total<.8?i.setData(75,parseInt(t/e.total*100),10*(n+1)):t/e.total>.45&&t/e.total<.55?i.setData(50,parseInt(t/e.total*100),10*(n+1)):t/e.total>.2&&t/e.total<.3&&i.setData(25,parseInt(t/e.total*100),10*(n+1))}),r.extend(e.percent,i.getData());var o='
{{percent}}
';for(var s in e.percent)t(document.body).append(t(o.replace("{{top}}",e.percent[s]-2).replace("{{percent}}",s+"%")));var l='
{{percent}}\u7684\u7528\u6237\u6d4f\u89c8\u5230\u8fd9\u91cc
',u=null;t(document).on("mousemove",r.throttle(n,150))},h=function(e){r.isObject(e)&&e.error?a.showErrorInfo(2,{error:e.error}):a.showErrorInfo(2,{error:"\u670d\u52a1\u5f02\u5e38"}),sessionStorage.removeItem("sensors_heatmap_id")};o.getServerData.start({url:{ajax:i?u:s.getUrl(),jsonp:i?d:c.getUrl()},success:p,error:h})}else e.log("\u7f3a\u5c11web_url")},setNoticeMap:function(){},setContainer:function(e){if(!e)return!1;if(e.classList.add("saContainer"),e&&e.children)for(var t=e.children,n=0;ni:"lt"===e?tMath.min(i,o)&&t