Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function() {
  2.   var o = {};
  3.   var self = {};
  4.   var data = {
  5.     id : "3faf3a47435cc512f3b86dc12af100d0",
  6.     dm : ["zone.wooyun.org"],
  7.     js : "tongji.baidu.com/hm-web/js/",
  8.     etrk : [],
  9.     icon : "/hmt/icon/21|gif|20|20",
  10.     ctrk : true,
  11.     align : 1,
  12.     nv : -1,
  13.     vdur : 18E5,
  14.     age : 31536E6,
  15.     rec : 0,
  16.     rp : [],
  17.     trust : 0,
  18.     vcard : 0,
  19.     qiao : 0,
  20.     lxb : 0,
  21.     conv : 0,
  22.     apps : ""
  23.   };
  24.   /** @type {boolean} */
  25.   var key = true;
  26.   /** @type {null} */
  27.   var NULL = null;
  28.   /** @type {boolean} */
  29.   var useCapture = false;
  30.   self.g = {};
  31.   /** @type {boolean} */
  32.   self.g.wa = /msie (\d+\.\d+)/i.test(navigator.userAgent);
  33.   /** @type {boolean} */
  34.   self.g.cookieEnabled = navigator.cookieEnabled;
  35.   /** @type {boolean} */
  36.   self.g.javaEnabled = navigator.javaEnabled();
  37.   self.g.language = navigator.language || (navigator.browserLanguage || (navigator.systemLanguage || (navigator.userLanguage || "")));
  38.   /** @type {string} */
  39.   self.g.ya = (window.screen.width || 0) + "x" + (window.screen.height || 0);
  40.   /** @type {number} */
  41.   self.g.colorDepth = window.screen.colorDepth || 0;
  42.   self.cookie = {};
  43.   /**
  44.    * @param {string} name
  45.    * @param {string} value
  46.    * @param {Object} item
  47.    * @return {undefined}
  48.    */
  49.   self.cookie.set = function(name, value, item) {
  50.     var expires;
  51.     if (item.F) {
  52.       /** @type {Date} */
  53.       expires = new Date;
  54.       expires.setTime(expires.getTime() + item.F);
  55.     }
  56.     /** @type {string} */
  57.     document.cookie = name + "=" + value + (item.domain ? "; domain=" + item.domain : "") + (item.path ? "; path=" + item.path : "") + (expires ? "; expires=" + expires.toGMTString() : "") + (item.Ka ? "; secure" : "");
  58.   };
  59.   /**
  60.    * @param {string} name
  61.    * @return {?}
  62.    */
  63.   self.cookie.get = function(name) {
  64.     return(name = RegExp("(^| )" + name + "=([^;]*)(;|$)").exec(document.cookie)) ? name[2] : NULL;
  65.   };
  66.   self.r = {};
  67.   /**
  68.    * @param {?} opt_id
  69.    * @return {?}
  70.    */
  71.   self.r.Da = function(opt_id) {
  72.     return document.getElementById(opt_id);
  73.   };
  74.   /**
  75.    * @param {Node} n
  76.    * @return {?}
  77.    */
  78.   self.r.ia = function(n) {
  79.     var inTag;
  80.     /** @type {string} */
  81.     inTag = "A";
  82.     for (;(n = n.parentNode) && 1 == n.nodeType;) {
  83.       if (n.tagName == inTag) {
  84.         return n;
  85.       }
  86.     }
  87.     return NULL;
  88.   };
  89.   /** @type {boolean} */
  90.   (self.r.Ja = function() {
  91.     /**
  92.      * @return {undefined}
  93.      */
  94.     function ready() {
  95.       if (!ready.w) {
  96.         /** @type {boolean} */
  97.         ready.w = key;
  98.         /** @type {number} */
  99.         var i = 0;
  100.         /** @type {number} */
  101.         var valuesLen = configList.length;
  102.         for (;i < valuesLen;i++) {
  103.           configList[i]();
  104.         }
  105.       }
  106.     }
  107.     /**
  108.      * @return {undefined}
  109.      */
  110.     function scrollCheck() {
  111.       try {
  112.         document.documentElement.doScroll("left");
  113.       } catch (d) {
  114.         setTimeout(scrollCheck, 1);
  115.         return;
  116.       }
  117.       ready();
  118.     }
  119.     /** @type {boolean} */
  120.     var attrs = useCapture;
  121.     /** @type {Array} */
  122.     var configList = [];
  123.     var contentLoaded;
  124.     if (document.addEventListener) {
  125.       /**
  126.        * @return {undefined}
  127.        */
  128.       contentLoaded = function() {
  129.         document.removeEventListener("DOMContentLoaded", contentLoaded, useCapture);
  130.         ready();
  131.       };
  132.     } else {
  133.       if (document.attachEvent) {
  134.         /**
  135.          * @return {undefined}
  136.          */
  137.         contentLoaded = function() {
  138.           if ("complete" === document.readyState) {
  139.             document.detachEvent("onreadystatechange", contentLoaded);
  140.             ready();
  141.           }
  142.         };
  143.       }
  144.     }
  145.     (function() {
  146.       if (!attrs) {
  147.         if (attrs = key, "complete" === document.readyState) {
  148.           /** @type {boolean} */
  149.           ready.w = key;
  150.         } else {
  151.           if (document.addEventListener) {
  152.             document.addEventListener("DOMContentLoaded", contentLoaded, useCapture);
  153.             window.addEventListener("load", ready, useCapture);
  154.           } else {
  155.             if (document.attachEvent) {
  156.               document.attachEvent("onreadystatechange", contentLoaded);
  157.               window.attachEvent("onload", ready);
  158.               /** @type {boolean} */
  159.               var d = useCapture;
  160.               try {
  161.                 /** @type {boolean} */
  162.                 d = window.frameElement == NULL;
  163.               } catch (m) {
  164.               }
  165.               if (document.documentElement.doScroll) {
  166.                 if (d) {
  167.                   scrollCheck();
  168.                 }
  169.               }
  170.             }
  171.           }
  172.         }
  173.       }
  174.     })();
  175.     return function(name) {
  176.       if (ready.w) {
  177.         name();
  178.       } else {
  179.         configList.push(name);
  180.       }
  181.     };
  182.   }()).w = useCapture;
  183.   self.event = {};
  184.   /**
  185.    * @param {Object} element
  186.    * @param {string} name
  187.    * @param {Function} callback
  188.    * @return {undefined}
  189.    */
  190.   self.event.d = function(element, name, callback) {
  191.     if (element.attachEvent) {
  192.       element.attachEvent("on" + name, function(operation) {
  193.         callback.call(element, operation);
  194.       });
  195.     } else {
  196.       if (element.addEventListener) {
  197.         element.addEventListener(name, callback, useCapture);
  198.       }
  199.     }
  200.   };
  201.   /**
  202.    * @param {Event} e
  203.    * @return {undefined}
  204.    */
  205.   self.event.preventDefault = function(e) {
  206.     if (e.preventDefault) {
  207.       e.preventDefault();
  208.     } else {
  209.       /** @type {boolean} */
  210.       e.returnValue = useCapture;
  211.     }
  212.   };
  213.   self.o = {};
  214.   /**
  215.    * @return {?}
  216.    */
  217.   self.o.parse = function() {
  218.     return(new Function('return (" + source + ")'))();
  219.   };
  220.   self.o.stringify = function() {
  221.     /**
  222.      * @param {string} string
  223.      * @return {?}
  224.      */
  225.     function quote(string) {
  226.       if (/["\\\x00-\x1f]/.test(string)) {
  227.         string = string.replace(/["\\\x00-\x1f]/g, function(a) {
  228.           var c = meta[a];
  229.           if (c) {
  230.             return c;
  231.           }
  232.           c = a.charCodeAt();
  233.           return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
  234.         });
  235.       }
  236.       return'"' + string + '"';
  237.     }
  238.     /**
  239.      * @param {number} v
  240.      * @return {?}
  241.      */
  242.     function _zeroPad(v) {
  243.       return 10 > v ? "0" + v : v;
  244.     }
  245.     var meta = {
  246.       "\b" : "\\b",
  247.       "\t" : "\\t",
  248.       "\n" : "\\n",
  249.       "\f" : "\\f",
  250.       "\r" : "\\r",
  251.       '"' : '\\"',
  252.       "\\" : "\\\\"
  253.     };
  254.     return function(value) {
  255.       switch(typeof value) {
  256.         case "undefined":
  257.           return "undefined";
  258.         case "number":
  259.           return isFinite(value) ? String(value) : "null";
  260.         case "string":
  261.           return quote(value);
  262.         case "boolean":
  263.           return String(value);
  264.         default:
  265.           if (value === NULL) {
  266.             return "null";
  267.           }
  268.           if (value instanceof Array) {
  269.             /** @type {Array} */
  270.             var buffer = ["["];
  271.             /** @type {number} */
  272.             var j = value.length;
  273.             var tagNameArr;
  274.             var i;
  275.             var key;
  276.             /** @type {number} */
  277.             i = 0;
  278.             for (;i < j;i++) {
  279.               switch(key = value[i], typeof key) {
  280.                 case "undefined":
  281.                 ;
  282.                 case "function":
  283.                 ;
  284.                 case "unknown":
  285.                   break;
  286.                 default:
  287.                   if (tagNameArr) {
  288.                     buffer.push(",");
  289.                   }
  290.                   buffer.push(self.o.stringify(key));
  291.                   /** @type {number} */
  292.                   tagNameArr = 1;
  293.               }
  294.             }
  295.             buffer.push("]");
  296.             return buffer.join("");
  297.           }
  298.           if (value instanceof Date) {
  299.             return'"' + value.getFullYear() + "-" + _zeroPad(value.getMonth() + 1) + "-" + _zeroPad(value.getDate()) + "T" + _zeroPad(value.getHours()) + ":" + _zeroPad(value.getMinutes()) + ":" + _zeroPad(value.getSeconds()) + '"';
  300.           }
  301.           /** @type {Array} */
  302.           tagNameArr = ["{"];
  303.           i = self.o.stringify;
  304.           for (j in value) {
  305.             if (Object.prototype.hasOwnProperty.call(value, j)) {
  306.               switch(key = value[j], typeof key) {
  307.                 case "undefined":
  308.                 ;
  309.                 case "unknown":
  310.                 ;
  311.                 case "function":
  312.                   break;
  313.                 default:
  314.                   if (buffer) {
  315.                     tagNameArr.push(",");
  316.                   }
  317.                   /** @type {number} */
  318.                   buffer = 1;
  319.                   tagNameArr.push(i(j) + ":" + i(key));
  320.               }
  321.             }
  322.           }
  323.           tagNameArr.push("}");
  324.           return tagNameArr.join("");
  325.       }
  326.     };
  327.   }();
  328.   self.lang = {};
  329.   /**
  330.    * @param {string} d
  331.    * @param {string} name
  332.    * @return {?}
  333.    */
  334.   self.lang.e = function(d, name) {
  335.     return "[object " + name + "]" === {}.toString.call(d);
  336.   };
  337.   /**
  338.    * @param {string} x
  339.    * @return {?}
  340.    */
  341.   self.lang.Ga = function(x) {
  342.     return self.lang.e(x, "Number") && isFinite(x);
  343.   };
  344.   /**
  345.    * @param {string} next
  346.    * @return {?}
  347.    */
  348.   self.lang.Ia = function(next) {
  349.     return self.lang.e(next, "String");
  350.   };
  351.   self.localStorage = {};
  352.   /**
  353.    * @return {?}
  354.    */
  355.   self.localStorage.C = function() {
  356.     if (!self.localStorage.f) {
  357.       try {
  358.         /** @type {Element} */
  359.         self.localStorage.f = document.createElement("input");
  360.         /** @type {string} */
  361.         self.localStorage.f.type = "hidden";
  362.         /** @type {string} */
  363.         self.localStorage.f.style.display = "none";
  364.         self.localStorage.f.addBehavior("#default#userData");
  365.         document.getElementsByTagName("head")[0].appendChild(self.localStorage.f);
  366.       } catch (a) {
  367.         return useCapture;
  368.       }
  369.     }
  370.     return key;
  371.   };
  372.   /**
  373.    * @param {string} name
  374.    * @param {string} value
  375.    * @param {number} ms
  376.    * @return {undefined}
  377.    */
  378.   self.localStorage.set = function(name, value, ms) {
  379.     /** @type {Date} */
  380.     var expires = new Date;
  381.     expires.setTime(expires.getTime() + ms || 31536E6);
  382.     try {
  383.       if (window.localStorage) {
  384.         /** @type {string} */
  385.         value = expires.getTime() + "|" + value;
  386.         window.localStorage.setItem(name, value);
  387.       } else {
  388.         if (self.localStorage.C()) {
  389.           /** @type {string} */
  390.           self.localStorage.f.expires = expires.toUTCString();
  391.           self.localStorage.f.load(document.location.hostname);
  392.           self.localStorage.f.setAttribute(name, value);
  393.           self.localStorage.f.save(document.location.hostname);
  394.         }
  395.       }
  396.     } catch (g) {
  397.     }
  398.   };
  399.   /**
  400.    * @param {string} name
  401.    * @return {?}
  402.    */
  403.   self.localStorage.get = function(name) {
  404.     if (window.localStorage) {
  405.       if (name = window.localStorage.getItem(name)) {
  406.         /** @type {number} */
  407.         var indexOfEquals = name.indexOf("|");
  408.         /** @type {number} */
  409.         var delay = name.substring(0, indexOfEquals) - 0;
  410.         if (delay && delay > (new Date).getTime()) {
  411.           return name.substring(indexOfEquals + 1);
  412.         }
  413.       }
  414.     } else {
  415.       if (self.localStorage.C()) {
  416.         try {
  417.           return self.localStorage.f.load(document.location.hostname), self.localStorage.f.getAttribute(name);
  418.         } catch (d) {
  419.         }
  420.       }
  421.     }
  422.     return NULL;
  423.   };
  424.   /**
  425.    * @param {string} key
  426.    * @return {undefined}
  427.    */
  428.   self.localStorage.remove = function(key) {
  429.     if (window.localStorage) {
  430.       window.localStorage.removeItem(key);
  431.     } else {
  432.       if (self.localStorage.C()) {
  433.         try {
  434.           self.localStorage.f.load(document.location.hostname);
  435.           self.localStorage.f.removeAttribute(key);
  436.           self.localStorage.f.save(document.location.hostname);
  437.         } catch (b) {
  438.         }
  439.       }
  440.     }
  441.   };
  442.   self.sessionStorage = {};
  443.   /**
  444.    * @param {string} name
  445.    * @param {string} value
  446.    * @return {undefined}
  447.    */
  448.   self.sessionStorage.set = function(name, value) {
  449.     if (window.sessionStorage) {
  450.       try {
  451.         window.sessionStorage.setItem(name, value);
  452.       } catch (f) {
  453.       }
  454.     }
  455.   };
  456.   /**
  457.    * @param {string} opt_key
  458.    * @return {?}
  459.    */
  460.   self.sessionStorage.get = function(opt_key) {
  461.     return window.sessionStorage ? window.sessionStorage.getItem(opt_key) : NULL;
  462.   };
  463.   /**
  464.    * @param {string} key
  465.    * @return {undefined}
  466.    */
  467.   self.sessionStorage.remove = function(key) {
  468.     if (window.sessionStorage) {
  469.       window.sessionStorage.removeItem(key);
  470.     }
  471.   };
  472.   self.M = {};
  473.   /**
  474.    * @param {string} url
  475.    * @param {Function} done
  476.    * @return {undefined}
  477.    */
  478.   self.M.log = function(url, done) {
  479.     /** @type {Image} */
  480.     var tmp = new Image;
  481.     /** @type {string} */
  482.     var id = "mini_tangram_log_" + Math.floor(2147483648 * Math.random()).toString(36);
  483.     window[id] = tmp;
  484.     /** @type {function (): undefined} */
  485.     tmp.onload = tmp.onerror = tmp.onabort = function() {
  486.       /** @type {null} */
  487.       tmp.onload = tmp.onerror = tmp.onabort = NULL;
  488.       /** @type {null} */
  489.       tmp = window[id] = NULL;
  490.       if (done) {
  491.         done(url);
  492.       }
  493.     };
  494.     /** @type {string} */
  495.     tmp.src = url;
  496.   };
  497.   self.B = {};
  498.   /**
  499.    * @return {?}
  500.    */
  501.   self.B.pa = function() {
  502.     /** @type {string} */
  503.     var d = "";
  504.     if (navigator.plugins && navigator.mimeTypes.length) {
  505.       var flash = navigator.plugins["Shockwave Flash"];
  506.       if (flash) {
  507.         if (flash.description) {
  508.           d = flash.description.replace(/^.*\s+(\S+)\s+\S+$/, "$1");
  509.         }
  510.       }
  511.     } else {
  512.       if (window.ActiveXObject) {
  513.         try {
  514.           if (flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) {
  515.             if (d = flash.GetVariable("$version")) {
  516.               d = d.replace(/^.*\s+(\d+),(\d+).*$/, "$1.$2");
  517.             }
  518.           }
  519.         } catch (f) {
  520.         }
  521.       }
  522.     }
  523.     return d;
  524.   };
  525.   /**
  526.    * @param {string} dataAndEvents
  527.    * @param {string} v11
  528.    * @param {string} deepDataAndEvents
  529.    * @param {string} d
  530.    * @param {string} classNames
  531.    * @return {?}
  532.    */
  533.   self.B.ea = function(dataAndEvents, v11, deepDataAndEvents, d, classNames) {
  534.     return'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="' + dataAndEvents + '" width="' + deepDataAndEvents + '" height="' + d + '"><param name="movie" value="' + v11 + '" /><param name="flashvars" value="' + (classNames || "") + '" /><param name="allowscriptaccess" value="always" /><embed type="application/x-shockwave-flash" name="' + dataAndEvents + '" width="' + deepDataAndEvents + '" height="' + d + '" src="' + v11 + '" flashvars="' + (classNames || "") + '" allowscriptaccess="always" /></object>';
  535.   };
  536.   self.url = {};
  537.   /**
  538.    * @param {string} s
  539.    * @param {string} a
  540.    * @return {?}
  541.    */
  542.   self.url.k = function(s, a) {
  543.     var point = s.match(RegExp("(^|&|\\?|#)(" + a + ")=([^&#]*)(&|$|#)", ""));
  544.     return point ? point[3] : NULL;
  545.   };
  546.   /**
  547.    * @param {string} optionsString
  548.    * @return {?}
  549.    */
  550.   self.url.Fa = function(optionsString) {
  551.     return(optionsString = optionsString.match(/^(https?:)\/\//)) ? optionsString[1] : NULL;
  552.   };
  553.   /**
  554.    * @param {string} s
  555.    * @return {?}
  556.    */
  557.   self.url.ma = function(s) {
  558.     return(s = s.match(/^(https?:\/\/)?([^\/\?#]*)/)) ? s[2].replace(/.*@/, "") : NULL;
  559.   };
  560.   /**
  561.    * @param {string} mod
  562.    * @return {?}
  563.    */
  564.   self.url.P = function(mod) {
  565.     return(mod = self.url.ma(mod)) ? mod.replace(/:\d+$/, "") : mod;
  566.   };
  567.   /**
  568.    * @param {string} raw
  569.    * @return {?}
  570.    */
  571.   self.url.Ea = function(raw) {
  572.     return(raw = raw.match(/^(https?:\/\/)?[^\/]*(.*)/)) ? raw[2].replace(/[\?#].*/, "").replace(/^$/, "/") : NULL;
  573.   };
  574.   o.q = {
  575.     va : "http://tongji.baidu.com/hm-web/welcome/ico",
  576.     K : "hm.baidu.com/hm.gif",
  577.     Y : "baidu.com",
  578.     sa : "hmmd",
  579.     ta : "hmpl",
  580.     ra : "hmkw",
  581.     qa : "hmci",
  582.     ua : "hmsr",
  583.     l : 0,
  584.     h : Math.round(+new Date / 1E3),
  585.     protocol : "https:" == document.location.protocol ? "https:" : "http:",
  586.     Ha : 0,
  587.     ca : 6E5,
  588.     da : 10,
  589.     N : 1024,
  590.     ba : 1,
  591.     m : 2147483647,
  592.     V : "cc cf ci ck cl cm cp cw ds ep et fl ja ln lo lt nv rnd si st su v cv lv api tt u".split(" ")
  593.   };
  594.   (function() {
  595.     var obj = {
  596.       j : {},
  597.       /**
  598.        * @param {Object} a
  599.        * @param {Function} name
  600.        * @return {undefined}
  601.        */
  602.       d : function(a, name) {
  603.         this.j[a] = this.j[a] || [];
  604.         this.j[a].push(name);
  605.       },
  606.       /**
  607.        * @param {string} event
  608.        * @param {?} p
  609.        * @return {undefined}
  610.        */
  611.       s : function(event, p) {
  612.         this.j[event] = this.j[event] || [];
  613.         var valuesLen = this.j[event].length;
  614.         /** @type {number} */
  615.         var i = 0;
  616.         for (;i < valuesLen;i++) {
  617.           this.j[event][i](p);
  618.         }
  619.       }
  620.     };
  621.     return o.n = obj;
  622.   })();
  623.   (function() {
  624.     /**
  625.      * @param {string} url
  626.      * @param {string} next
  627.      * @return {undefined}
  628.      */
  629.     function load(url, next) {
  630.       /** @type {Element} */
  631.       var script = document.createElement("script");
  632.       /** @type {string} */
  633.       script.charset = "utf-8";
  634.       if ($.e(next, "Function")) {
  635.         if (script.readyState) {
  636.           /**
  637.            * @return {undefined}
  638.            */
  639.           script.onreadystatechange = function() {
  640.             if ("loaded" === script.readyState || "complete" === script.readyState) {
  641.               /** @type {null} */
  642.               script.onreadystatechange = NULL;
  643.               next();
  644.             }
  645.           };
  646.         } else {
  647.           /**
  648.            * @return {undefined}
  649.            */
  650.           script.onload = function() {
  651.             next();
  652.           };
  653.         }
  654.       }
  655.       /** @type {string} */
  656.       script.src = url;
  657.       var insertAt = document.getElementsByTagName("script")[0];
  658.       insertAt.parentNode.insertBefore(script, insertAt);
  659.     }
  660.     var $ = self.lang;
  661.     return o.load = load;
  662.   })();
  663.   (function() {
  664.     var s = o.q;
  665.     var ctx = self.B;
  666.     var proto = {
  667.       /**
  668.        * @return {undefined}
  669.        */
  670.       init : function() {
  671.         if ("" !== data.icon) {
  672.           var c;
  673.           /** @type {Array.<string>} */
  674.           c = data.icon.split("|");
  675.           /** @type {string} */
  676.           var segmentAngle = s.va + "?s=" + data.id;
  677.           /** @type {string} */
  678.           var y = ("http:" == s.protocol ? "http://eiv" : "https://bs") + ".baidu.com" + c[0] + "." + c[1];
  679.           switch(c[1]) {
  680.             case "swf":
  681.               c = ctx.ea("HolmesIcon" + s.h, y, c[2], c[3], "s=" + segmentAngle);
  682.               break;
  683.             case "gif":
  684.               /** @type {string} */
  685.               c = '<a href="' + segmentAngle + '" target="_blank"><img border="0" src="' + y + '" width="' + c[2] + '" height="' + c[3] + '"></a>';
  686.               break;
  687.             default:
  688.               /** @type {string} */
  689.               c = '<a href="' + segmentAngle + '" target="_blank">' + c[0] + "</a>";
  690.           }
  691.           document.write(c);
  692.         }
  693.       }
  694.     };
  695.     o.n.d("pv-b", proto.init);
  696.     return proto;
  697.   })();
  698.   (function() {
  699.     var r = self.r;
  700.     var event = self.event;
  701.     var len = self.g;
  702.     var options = o.q;
  703.     /** @type {Array} */
  704.     var query = [];
  705.     var w = {
  706.       /**
  707.        * @return {undefined}
  708.        */
  709.       W : function() {
  710.         if (data.ctrk) {
  711.           event.d(document, "mouseup", w.aa());
  712.           event.d(window, "unload", function() {
  713.             w.z();
  714.           });
  715.           setInterval(function() {
  716.             w.z();
  717.           }, options.ca);
  718.         }
  719.       },
  720.       /**
  721.        * @return {?}
  722.        */
  723.       aa : function() {
  724.         return function(qualifier) {
  725.           qualifier = w.ka(qualifier);
  726.           if ("" !== qualifier) {
  727.             var lineLength = (options.protocol + "//" + options.K + "?" + o.b.U().replace(/ep=[^&]*/, "ep=" + encodeURIComponent("[" + qualifier + "]"))).length;
  728.             if (!(lineLength + (options.m + "").length > options.N)) {
  729.               if (lineLength + encodeURIComponent(query.join(",") + (query.length ? "," : "")).length + (options.m + "").length > options.N) {
  730.                 w.z();
  731.               }
  732.               query.push(qualifier);
  733.               if (query.length >= options.da || /t:a/.test(qualifier)) {
  734.                 w.z();
  735.               }
  736.             }
  737.           }
  738.         };
  739.       },
  740.       /**
  741.        * @param {Object} event
  742.        * @return {?}
  743.        */
  744.       ka : function(event) {
  745.         if (0 === options.ba) {
  746.           var e = event.target || event.srcElement;
  747.           var x = e.tagName.toLowerCase();
  748.           if ("embed" == x || "object" == x) {
  749.             return "";
  750.           }
  751.         }
  752.         if (len.wa) {
  753.           /** @type {number} */
  754.           e = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
  755.           /** @type {number} */
  756.           x = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
  757.           x = event.clientX + x;
  758.           e = event.clientY + e;
  759.         } else {
  760.           x = event.pageX;
  761.           e = event.pageY;
  762.         }
  763.         /** @type {number} */
  764.         var itemWidth = window.innerWidth || (document.documentElement.clientWidth || document.body.offsetWidth);
  765.         switch(data.align) {
  766.           case 1:
  767.             x -= itemWidth / 2;
  768.             break;
  769.           case 2:
  770.             x -= itemWidth;
  771.         }
  772.         /** @type {string} */
  773.         x = "{x:" + x + ",y:" + e + ",";
  774.         e = event.target || event.srcElement;
  775.         return x = (event = "a" == e.tagName.toLowerCase() ? e : r.ia(e)) ? x + ("t:a,u:" + encodeURIComponent(event.href) + "}") : x + "t:b}";
  776.       },
  777.       /**
  778.        * @return {undefined}
  779.        */
  780.       z : function() {
  781.         if (0 !== query.length) {
  782.           /** @type {number} */
  783.           o.b.a.et = 2;
  784.           /** @type {string} */
  785.           o.b.a.ep = "[" + query.join(",") + "]";
  786.           o.b.i();
  787.           /** @type {Array} */
  788.           query = [];
  789.         }
  790.       }
  791.     };
  792.     o.n.d("pv-b", w.W);
  793.     return w;
  794.   })();
  795.   (function() {
  796.     /**
  797.      * @return {?}
  798.      */
  799.     function property() {
  800.       return function() {
  801.         /** @type {number} */
  802.         o.b.a.nv = 0;
  803.         /** @type {number} */
  804.         o.b.a.st = 4;
  805.         /** @type {number} */
  806.         o.b.a.et = 3;
  807.         /** @type {string} */
  808.         o.b.a.ep = o.D.na() + "," + o.D.la();
  809.         o.b.i();
  810.       };
  811.     }
  812.     /**
  813.      * @return {undefined}
  814.      */
  815.     function reset() {
  816.       clearTimeout(timeoutId);
  817.       var io;
  818.       if (output) {
  819.         /** @type {boolean} */
  820.         io = "visible" == document[output];
  821.       }
  822.       if (hidden) {
  823.         /** @type {boolean} */
  824.         io = !document[hidden];
  825.       }
  826.       /** @type {boolean} */
  827.       type = "undefined" == typeof io ? key : io;
  828.       if ((!data || !options) && (type && listener)) {
  829.         /** @type {boolean} */
  830.         flagMsg = key;
  831.         /** @type {number} */
  832.         YYSTATE = +new Date;
  833.       } else {
  834.         if (data && (options && (!type || !listener))) {
  835.           /** @type {boolean} */
  836.           flagMsg = useCapture;
  837.           msg += +new Date - YYSTATE;
  838.         }
  839.       }
  840.       /** @type {boolean} */
  841.       data = type;
  842.       options = listener;
  843.       /** @type {number} */
  844.       timeoutId = setTimeout(reset, 100);
  845.     }
  846.     /**
  847.      * @param {string} key
  848.      * @return {?}
  849.      */
  850.     function prefix(key) {
  851.       /** @type {HTMLDocument} */
  852.       var t = document;
  853.       /** @type {string} */
  854.       var result = "";
  855.       if (key in t) {
  856.         /** @type {string} */
  857.         result = key;
  858.       } else {
  859.         /** @type {Array} */
  860.         var vendors = ["webkit", "ms", "moz", "o"];
  861.         /** @type {number} */
  862.         var i = 0;
  863.         for (;i < vendors.length;i++) {
  864.           var k = vendors[i] + key.charAt(0).toUpperCase() + key.slice(1);
  865.           if (k in t) {
  866.             result = k;
  867.             break;
  868.           }
  869.         }
  870.       }
  871.       return result;
  872.     }
  873.     /**
  874.      * @param {Event} options
  875.      * @return {undefined}
  876.      */
  877.     function init(options) {
  878.       if (!("focus" == options.type || "blur" == options.type) || !(options.target && options.target != window)) {
  879.         /** @type {boolean} */
  880.         listener = "focus" == options.type || "focusin" == options.type ? key : useCapture;
  881.         reset();
  882.       }
  883.     }
  884.     var event = self.event;
  885.     var matrix = o.n;
  886.     /** @type {boolean} */
  887.     var data = key;
  888.     /** @type {boolean} */
  889.     var type = key;
  890.     /** @type {boolean} */
  891.     var options = key;
  892.     /** @type {boolean} */
  893.     var listener = key;
  894.     /** @type {number} */
  895.     var YY_START = +new Date;
  896.     /** @type {number} */
  897.     var YYSTATE = YY_START;
  898.     /** @type {number} */
  899.     var msg = 0;
  900.     /** @type {boolean} */
  901.     var flagMsg = key;
  902.     var output = prefix("visibilityState");
  903.     var hidden = prefix("hidden");
  904.     var timeoutId;
  905.     reset();
  906.     (function() {
  907.       var rvar = output.replace(/[vV]isibilityState/, "visibilitychange");
  908.       event.d(document, rvar, reset);
  909.       event.d(window, "pageshow", reset);
  910.       event.d(window, "pagehide", reset);
  911.       if ("object" == typeof document.onfocusin) {
  912.         event.d(document, "focusin", init);
  913.         event.d(document, "focusout", init);
  914.       } else {
  915.         event.d(window, "focus", init);
  916.         event.d(window, "blur", init);
  917.       }
  918.     })();
  919.     o.D = {
  920.       /**
  921.        * @return {?}
  922.        */
  923.       na : function() {
  924.         return+new Date - YY_START;
  925.       },
  926.       /**
  927.        * @return {?}
  928.        */
  929.       la : function() {
  930.         return flagMsg ? +new Date - YYSTATE + msg : msg;
  931.       }
  932.     };
  933.     matrix.d("pv-b", function() {
  934.       event.d(window, "unload", property());
  935.     });
  936.     return o.D;
  937.   })();
  938.   (function() {
  939.     /**
  940.      * @param {(Object|string)} obj
  941.      * @return {undefined}
  942.      */
  943.     function format(obj) {
  944.       var key;
  945.       for (key in obj) {
  946.         if ({}.hasOwnProperty.call(obj, key)) {
  947.           var val = obj[key];
  948.           if (test.e(val, "Object") || test.e(val, "Array")) {
  949.             format(val);
  950.           } else {
  951.             /** @type {string} */
  952.             obj[key] = String(val);
  953.           }
  954.         }
  955.       }
  956.     }
  957.     /**
  958.      * @param {string} s
  959.      * @return {?}
  960.      */
  961.     function encode(s) {
  962.       return s.replace ? s.replace(/'/g, "'0").replace(/\*/g, "'1").replace(/!/g, "'2") : s;
  963.     }
  964.     var messages = self.M;
  965.     var test = self.lang;
  966.     var c = self.o;
  967.     var config = o.q;
  968.     var result = o.n;
  969.     var obj = {
  970.       Q : NULL,
  971.       p : [],
  972.       A : 0,
  973.       R : useCapture,
  974.       /**
  975.        * @return {undefined}
  976.        */
  977.       init : function() {
  978.         /** @type {number} */
  979.         obj.c = 0;
  980.         obj.Q = {
  981.           /**
  982.            * @return {undefined}
  983.            */
  984.           push : function() {
  985.             obj.J.apply(obj, arguments);
  986.           }
  987.         };
  988.         result.d("pv-b", function() {
  989.           obj.fa();
  990.           obj.ga();
  991.         });
  992.         result.d("pv-d", obj.ha);
  993.         result.d("stag-b", function() {
  994.           /** @type {string} */
  995.           o.b.a.api = obj.c || obj.A ? obj.c + "_" + obj.A : "";
  996.         });
  997.         result.d("stag-d", function() {
  998.           /** @type {number} */
  999.           o.b.a.api = 0;
  1000.           /** @type {number} */
  1001.           obj.c = 0;
  1002.           /** @type {number} */
  1003.           obj.A = 0;
  1004.         });
  1005.       },
  1006.       /**
  1007.        * @return {undefined}
  1008.        */
  1009.       fa : function() {
  1010.         var a = window._hmt;
  1011.         if (a && a.length) {
  1012.           /** @type {number} */
  1013.           var i = 0;
  1014.           for (;i < a.length;i++) {
  1015.             var b = a[i];
  1016.             switch(b[0]) {
  1017.               case "_setAccount":
  1018.                 if (1 < b.length) {
  1019.                   if (/^[0-9a-z]{32}$/.test(b[1])) {
  1020.                     obj.c |= 1;
  1021.                     window._bdhm_account = b[1];
  1022.                   }
  1023.                 }
  1024.                 break;
  1025.               case "_setAutoPageview":
  1026.                 if (1 < b.length && (b = b[1], useCapture === b || key === b)) {
  1027.                   obj.c |= 2;
  1028.                   window._bdhm_autoPageview = b;
  1029.                 }
  1030.               ;
  1031.             }
  1032.           }
  1033.         }
  1034.       },
  1035.       /**
  1036.        * @return {undefined}
  1037.        */
  1038.       ga : function() {
  1039.         if ("undefined" === typeof window._bdhm_account || window._bdhm_account === data.id) {
  1040.           /** @type {string} */
  1041.           window._bdhm_account = data.id;
  1042.           var p = window._hmt;
  1043.           if (p && p.length) {
  1044.             /** @type {number} */
  1045.             var i = 0;
  1046.             var pl = p.length;
  1047.             for (;i < pl;i++) {
  1048.               if (test.e(p[i], "Array") && ("_trackEvent" !== p[i][0] && "_trackRTEvent" !== p[i][0])) {
  1049.                 obj.J(p[i]);
  1050.               } else {
  1051.                 obj.p.push(p[i]);
  1052.               }
  1053.             }
  1054.           }
  1055.           /** @type {(null|{push: function (): undefined})} */
  1056.           window._hmt = obj.Q;
  1057.         }
  1058.       },
  1059.       /**
  1060.        * @return {undefined}
  1061.        */
  1062.       ha : function() {
  1063.         if (0 < obj.p.length) {
  1064.           /** @type {number} */
  1065.           var i = 0;
  1066.           /** @type {number} */
  1067.           var valuesLen = obj.p.length;
  1068.           for (;i < valuesLen;i++) {
  1069.             obj.J(obj.p[i]);
  1070.           }
  1071.         }
  1072.         /** @type {null} */
  1073.         obj.p = NULL;
  1074.       },
  1075.       /**
  1076.        * @param {(Array|string)} data
  1077.        * @return {undefined}
  1078.        */
  1079.       J : function(data) {
  1080.         if (test.e(data, "Array")) {
  1081.           var x = data[0];
  1082.           if (obj.hasOwnProperty(x) && test.e(obj[x], "Function")) {
  1083.             obj[x](data);
  1084.           }
  1085.         }
  1086.       },
  1087.       /**
  1088.        * @param {Array} written
  1089.        * @return {undefined}
  1090.        */
  1091.       _trackPageview : function(written) {
  1092.         if (1 < written.length && (written[1].charAt && "/" == written[1].charAt(0))) {
  1093.           obj.c |= 4;
  1094.           /** @type {number} */
  1095.           o.b.a.et = 0;
  1096.           /** @type {string} */
  1097.           o.b.a.ep = "";
  1098.           if (o.b.H) {
  1099.             /** @type {number} */
  1100.             o.b.a.nv = 0;
  1101.             /** @type {number} */
  1102.             o.b.a.st = 4;
  1103.           } else {
  1104.             /** @type {boolean} */
  1105.             o.b.H = key;
  1106.           }
  1107.           var u = o.b.a.u;
  1108.           var su = o.b.a.su;
  1109.           o.b.a.u = config.protocol + "//" + document.location.host + written[1];
  1110.           if (!obj.R) {
  1111.             /** @type {string} */
  1112.             o.b.a.su = document.location.href;
  1113.           }
  1114.           o.b.i();
  1115.           o.b.a.u = u;
  1116.           o.b.a.su = su;
  1117.         }
  1118.       },
  1119.       /**
  1120.        * @param {Array} data
  1121.        * @return {undefined}
  1122.        */
  1123.       _trackEvent : function(data) {
  1124.         if (2 < data.length) {
  1125.           obj.c |= 8;
  1126.           /** @type {number} */
  1127.           o.b.a.nv = 0;
  1128.           /** @type {number} */
  1129.           o.b.a.st = 4;
  1130.           /** @type {number} */
  1131.           o.b.a.et = 4;
  1132.           /** @type {string} */
  1133.           o.b.a.ep = encode(data[1]) + "*" + encode(data[2]) + (data[3] ? "*" + encode(data[3]) : "") + (data[4] ? "*" + encode(data[4]) : "");
  1134.           o.b.i();
  1135.         }
  1136.       },
  1137.       /**
  1138.        * @param {Array} value
  1139.        * @return {undefined}
  1140.        */
  1141.       _setCustomVar : function(value) {
  1142.         if (!(4 > value.length)) {
  1143.           var section = value[1];
  1144.           var prop = value[4] || 3;
  1145.           if (0 < section && (6 > section && (0 < prop && 4 > prop))) {
  1146.             obj.A++;
  1147.             var leaks = (o.b.a.cv || "*").split("!");
  1148.             var cnl = leaks.length;
  1149.             for (;cnl < section - 1;cnl++) {
  1150.               leaks.push("*");
  1151.             }
  1152.             /** @type {string} */
  1153.             leaks[section - 1] = prop + "*" + encode(value[2]) + "*" + encode(value[3]);
  1154.             o.b.a.cv = leaks.join("!");
  1155.             value = o.b.a.cv.replace(/[^1](\*[^!]*){2}/g, "*").replace(/((^|!)\*)+$/g, "");
  1156.             if ("" !== value) {
  1157.               o.b.setData("Hm_cv_" + data.id, encodeURIComponent(value), data.age);
  1158.             } else {
  1159.               o.b.xa("Hm_cv_" + data.id);
  1160.             }
  1161.           }
  1162.         }
  1163.       },
  1164.       /**
  1165.        * @param {Array} written
  1166.        * @return {undefined}
  1167.        */
  1168.       _setReferrerOverride : function(written) {
  1169.         if (1 < written.length) {
  1170.           o.b.a.su = written[1].charAt && "/" == written[1].charAt(0) ? config.protocol + "//" + window.location.host + written[1] : written[1];
  1171.           /** @type {boolean} */
  1172.           obj.R = key;
  1173.         }
  1174.       },
  1175.       /**
  1176.        * @param {string} date
  1177.        * @return {undefined}
  1178.        */
  1179.       _trackOrder : function(date) {
  1180.         date = date[1];
  1181.         if (test.e(date, "Object")) {
  1182.           format(date);
  1183.           obj.c |= 16;
  1184.           /** @type {number} */
  1185.           o.b.a.nv = 0;
  1186.           /** @type {number} */
  1187.           o.b.a.st = 4;
  1188.           /** @type {number} */
  1189.           o.b.a.et = 94;
  1190.           o.b.a.ep = c.stringify(date);
  1191.           o.b.i();
  1192.         }
  1193.       },
  1194.       /**
  1195.        * @param {string} dataAndEvents
  1196.        * @return {undefined}
  1197.        */
  1198.       _trackMobConv : function(dataAndEvents) {
  1199.         if (dataAndEvents = {
  1200.           webim : 1,
  1201.           tel : 2,
  1202.           map : 3,
  1203.           sms : 4,
  1204.           callback : 5,
  1205.           share : 6
  1206.         }[dataAndEvents[1]]) {
  1207.           obj.c |= 32;
  1208.           /** @type {number} */
  1209.           o.b.a.et = 93;
  1210.           /** @type {string} */
  1211.           o.b.a.ep = dataAndEvents;
  1212.           o.b.i();
  1213.         }
  1214.       },
  1215.       /**
  1216.        * @param {string} date
  1217.        * @return {undefined}
  1218.        */
  1219.       _trackRTPageview : function(date) {
  1220.         date = date[1];
  1221.         if (test.e(date, "Object")) {
  1222.           format(date);
  1223.           date = c.stringify(date);
  1224.           if (512 >= encodeURIComponent(date).length) {
  1225.             obj.c |= 64;
  1226.             /** @type {string} */
  1227.             o.b.a.rt = date;
  1228.           }
  1229.         }
  1230.       },
  1231.       /**
  1232.        * @param {string} data
  1233.        * @return {undefined}
  1234.        */
  1235.       _trackRTEvent : function(data) {
  1236.         data = data[1];
  1237.         if (test.e(data, "Object")) {
  1238.           format(data);
  1239.           /** @type {string} */
  1240.           data = encodeURIComponent(c.stringify(data));
  1241.           /**
  1242.            * @param {Array} token
  1243.            * @return {undefined}
  1244.            */
  1245.           var handler = function(token) {
  1246.             var rt = o.b.a.rt;
  1247.             obj.c |= 128;
  1248.             /** @type {number} */
  1249.             o.b.a.et = 90;
  1250.             /** @type {Array} */
  1251.             o.b.a.rt = token;
  1252.             o.b.i();
  1253.             o.b.a.rt = rt;
  1254.           };
  1255.           /** @type {number} */
  1256.           var fileSize = data.length;
  1257.           if (900 >= fileSize) {
  1258.             handler.call(this, data);
  1259.           } else {
  1260.             /** @type {number} */
  1261.             fileSize = Math.ceil(fileSize / 900);
  1262.             /** @type {string} */
  1263.             var o = "block|" + Math.round(Math.random() * config.m).toString(16) + "|" + fileSize + "|";
  1264.             /** @type {Array} */
  1265.             var assigns = [];
  1266.             /** @type {number} */
  1267.             var vvar = 0;
  1268.             for (;vvar < fileSize;vvar++) {
  1269.               assigns.push(vvar);
  1270.               assigns.push(data.substring(900 * vvar, 900 * vvar + 900));
  1271.               handler.call(this, o + assigns.join("|"));
  1272.               /** @type {Array} */
  1273.               assigns = [];
  1274.             }
  1275.           }
  1276.         }
  1277.       },
  1278.       /**
  1279.        * @param {Object} date
  1280.        * @return {undefined}
  1281.        */
  1282.       _setUserId : function(date) {
  1283.         date = date[1];
  1284.         if (test.e(date, "String") || test.e(date, "Number")) {
  1285.           var encodedValue = o.b.G();
  1286.           /** @type {string} */
  1287.           var hm_ = "hm-" + o.b.a.v;
  1288.           obj.T = obj.T || Math.round(Math.random() * config.m);
  1289.           messages.log("//datax.baidu.com/x.gif?si=" + data.id + "&dm=" + encodeURIComponent(encodedValue) + "&ac=" + encodeURIComponent(date) + "&v=" + hm_ + "&li=" + obj.T + "&rnd=" + Math.round(Math.random() * config.m));
  1290.         }
  1291.       }
  1292.     };
  1293.     obj.init();
  1294.     o.Z = obj;
  1295.     return o.Z;
  1296.   })();
  1297.   (function() {
  1298.     /**
  1299.      * @return {undefined}
  1300.      */
  1301.     function Game() {
  1302.       if ("undefined" == typeof window["_bdhm_loaded_" + data.id]) {
  1303.         /** @type {boolean} */
  1304.         window["_bdhm_loaded_" + data.id] = key;
  1305.         this.a = {};
  1306.         /** @type {boolean} */
  1307.         this.H = useCapture;
  1308.         this.init();
  1309.       }
  1310.     }
  1311.     var t = self.url;
  1312.     var app = self.M;
  1313.     var max = self.B;
  1314.     var a = self.lang;
  1315.     var c = self.cookie;
  1316.     var ctx = self.g;
  1317.     var elem = self.localStorage;
  1318.     var cache = self.sessionStorage;
  1319.     var s = o.q;
  1320.     var color = o.n;
  1321.     Game.prototype = {
  1322.       /**
  1323.        * @param {string} result
  1324.        * @param {string} el
  1325.        * @return {?}
  1326.        */
  1327.       I : function(result, el) {
  1328.         result = "." + result.replace(/:\d+/, "");
  1329.         el = "." + el.replace(/:\d+/, "");
  1330.         var j = result.indexOf(el);
  1331.         return-1 < j && j + el.length == result.length;
  1332.       },
  1333.       /**
  1334.        * @param {string} s
  1335.        * @param {?} args
  1336.        * @return {?}
  1337.        */
  1338.       S : function(s, args) {
  1339.         s = s.replace(/^https?:\/\//, "");
  1340.         return 0 === s.indexOf(args);
  1341.       },
  1342.       /**
  1343.        * @param {string} mod
  1344.        * @return {?}
  1345.        */
  1346.       t : function(mod) {
  1347.         /** @type {number} */
  1348.         var s = 0;
  1349.         for (;s < data.dm.length;s++) {
  1350.           if (-1 < data.dm[s].indexOf("/")) {
  1351.             if (this.S(mod, data.dm[s])) {
  1352.               return key;
  1353.             }
  1354.           } else {
  1355.             var parent = t.P(mod);
  1356.             if (parent && this.I(parent, data.dm[s])) {
  1357.               return key;
  1358.             }
  1359.           }
  1360.         }
  1361.         return useCapture;
  1362.       },
  1363.       /**
  1364.        * @return {?}
  1365.        */
  1366.       G : function() {
  1367.         /** @type {string} */
  1368.         var expectationResult = document.location.hostname;
  1369.         /** @type {number} */
  1370.         var i = 0;
  1371.         /** @type {number} */
  1372.         var valuesLen = data.dm.length;
  1373.         for (;i < valuesLen;i++) {
  1374.           if (this.I(expectationResult, data.dm[i])) {
  1375.             return data.dm[i].replace(/(:\d+)?[\/\?#].*/, "");
  1376.           }
  1377.         }
  1378.         return expectationResult;
  1379.       },
  1380.       /**
  1381.        * @return {?}
  1382.        */
  1383.       O : function() {
  1384.         /** @type {number} */
  1385.         var i = 0;
  1386.         /** @type {number} */
  1387.         var valuesLen = data.dm.length;
  1388.         for (;i < valuesLen;i++) {
  1389.           var b = data.dm[i];
  1390.           if (-1 < b.indexOf("/") && this.S(document.location.href, b)) {
  1391.             return b.replace(/^[^\/]+(\/.*)/, "$1") + "/";
  1392.           }
  1393.         }
  1394.         return "/";
  1395.       },
  1396.       /**
  1397.        * @return {?}
  1398.        */
  1399.       oa : function() {
  1400.         if (!document.referrer) {
  1401.           return s.h - s.l > data.vdur ? 1 : 4;
  1402.         }
  1403.         /** @type {boolean} */
  1404.         var format = useCapture;
  1405.         if (this.t(document.referrer) && this.t(document.location.href)) {
  1406.           /** @type {boolean} */
  1407.           format = key;
  1408.         } else {
  1409.           format = t.P(document.referrer);
  1410.           format = this.I(format || "", document.location.hostname);
  1411.         }
  1412.         return format ? s.h - s.l > data.vdur ? 1 : 4 : 3;
  1413.       },
  1414.       /**
  1415.        * @param {string} name
  1416.        * @return {?}
  1417.        */
  1418.       getData : function(name) {
  1419.         try {
  1420.           return c.get(name) || (cache.get(name) || elem.get(name));
  1421.         } catch (b) {
  1422.         }
  1423.       },
  1424.       /**
  1425.        * @param {string} name
  1426.        * @param {string} value
  1427.        * @param {number} val
  1428.        * @return {undefined}
  1429.        */
  1430.       setData : function(name, value, val) {
  1431.         try {
  1432.           c.set(name, value, {
  1433.             domain : this.G(),
  1434.             path : this.O(),
  1435.             F : val
  1436.           });
  1437.           if (val) {
  1438.             elem.set(name, value, val);
  1439.           } else {
  1440.             cache.set(name, value);
  1441.           }
  1442.         } catch (f) {
  1443.         }
  1444.       },
  1445.       /**
  1446.        * @param {string} name
  1447.        * @return {undefined}
  1448.        */
  1449.       xa : function(name) {
  1450.         try {
  1451.           c.set(name, "", {
  1452.             domain : this.G(),
  1453.             path : this.O(),
  1454.             F : -1
  1455.           });
  1456.           cache.remove(name);
  1457.           elem.remove(name);
  1458.         } catch (b) {
  1459.         }
  1460.       },
  1461.       /**
  1462.        * @return {undefined}
  1463.        */
  1464.       Ba : function() {
  1465.         var a;
  1466.         var oa;
  1467.         var v;
  1468.         var p;
  1469.         var i;
  1470.         s.l = this.getData("Hm_lpvt_" + data.id) || 0;
  1471.         if (13 == s.l.length) {
  1472.           /** @type {number} */
  1473.           s.l = Math.round(s.l / 1E3);
  1474.         }
  1475.         oa = this.oa();
  1476.         /** @type {number} */
  1477.         a = 4 != oa ? 1 : 0;
  1478.         if (v = this.getData("Hm_lvt_" + data.id)) {
  1479.           p = v.split(",");
  1480.           /** @type {number} */
  1481.           i = p.length - 1;
  1482.           for (;0 <= i;i--) {
  1483.             if (13 == p[i].length) {
  1484.               /** @type {string} */
  1485.               p[i] = "" + Math.round(p[i] / 1E3);
  1486.             }
  1487.           }
  1488.           for (;2592E3 < s.h - p[0];) {
  1489.             p.shift();
  1490.           }
  1491.           /** @type {number} */
  1492.           i = 4 > p.length ? 2 : 3;
  1493.           if (1 === a) {
  1494.             p.push(s.h);
  1495.           }
  1496.           for (;4 < p.length;) {
  1497.             p.shift();
  1498.           }
  1499.           v = p.join(",");
  1500.           p = p[p.length - 1];
  1501.         } else {
  1502.           /** @type {number} */
  1503.           v = s.h;
  1504.           /** @type {string} */
  1505.           p = "";
  1506.           /** @type {number} */
  1507.           i = 1;
  1508.         }
  1509.         this.setData("Hm_lvt_" + data.id, v, data.age);
  1510.         this.setData("Hm_lpvt_" + data.id, s.h);
  1511.         /** @type {string} */
  1512.         v = s.h == this.getData("Hm_lpvt_" + data.id) ? "1" : "0";
  1513.         if (0 === data.nv && (this.t(document.location.href) && ("" === document.referrer || this.t(document.referrer)))) {
  1514.           /** @type {number} */
  1515.           a = 0;
  1516.           /** @type {number} */
  1517.           oa = 4;
  1518.         }
  1519.         /** @type {number} */
  1520.         this.a.nv = a;
  1521.         this.a.st = oa;
  1522.         /** @type {string} */
  1523.         this.a.cc = v;
  1524.         this.a.lt = p;
  1525.         /** @type {number} */
  1526.         this.a.lv = i;
  1527.       },
  1528.       /**
  1529.        * @return {?}
  1530.        */
  1531.       U : function() {
  1532.         /** @type {Array} */
  1533.         var tagNameArr = [];
  1534.         /** @type {number} */
  1535.         var a = 0;
  1536.         /** @type {number} */
  1537.         var al = s.V.length;
  1538.         for (;a < al;a++) {
  1539.           /** @type {string} */
  1540.           var i = s.V[a];
  1541.           var v = this.a[i];
  1542.           if ("undefined" != typeof v) {
  1543.             if ("" !== v) {
  1544.               tagNameArr.push(i + "=" + encodeURIComponent(v));
  1545.             }
  1546.           }
  1547.         }
  1548.         a = this.a.et;
  1549.         if (this.a.rt) {
  1550.           if (0 === a) {
  1551.             tagNameArr.push("rt=" + encodeURIComponent(this.a.rt));
  1552.           } else {
  1553.             if (90 === a) {
  1554.               tagNameArr.push("rt=" + this.a.rt);
  1555.             }
  1556.           }
  1557.         }
  1558.         return tagNameArr.join("&");
  1559.       },
  1560.       /**
  1561.        * @return {undefined}
  1562.        */
  1563.       Ca : function() {
  1564.         this.Ba();
  1565.         /** @type {string} */
  1566.         this.a.si = data.id;
  1567.         /** @type {string} */
  1568.         this.a.su = document.referrer;
  1569.         /** @type {string} */
  1570.         this.a.ds = ctx.ya;
  1571.         /** @type {string} */
  1572.         this.a.cl = ctx.colorDepth + "-bit";
  1573.         this.a.ln = ctx.language;
  1574.         /** @type {number} */
  1575.         this.a.ja = ctx.javaEnabled ? 1 : 0;
  1576.         /** @type {number} */
  1577.         this.a.ck = ctx.cookieEnabled ? 1 : 0;
  1578.         /** @type {number} */
  1579.         this.a.lo = "number" == typeof _bdhm_top ? 1 : 0;
  1580.         this.a.fl = max.pa();
  1581.         /** @type {string} */
  1582.         this.a.v = "1.0.75";
  1583.         /** @type {string} */
  1584.         this.a.cv = decodeURIComponent(this.getData("Hm_cv_" + data.id) || "");
  1585.         if (1 == this.a.nv) {
  1586.           /** @type {string} */
  1587.           this.a.tt = document.title || "";
  1588.         }
  1589.         /** @type {string} */
  1590.         var url = document.location.href;
  1591.         this.a.cm = t.k(url, s.sa) || "";
  1592.         this.a.cp = t.k(url, s.ta) || "";
  1593.         this.a.cw = t.k(url, s.ra) || "";
  1594.         this.a.ci = t.k(url, s.qa) || "";
  1595.         this.a.cf = t.k(url, s.ua) || "";
  1596.       },
  1597.       /**
  1598.        * @return {undefined}
  1599.        */
  1600.       init : function() {
  1601.         try {
  1602.           this.Ca();
  1603.           if (0 === this.a.nv) {
  1604.             this.Aa();
  1605.           } else {
  1606.             this.L(".*");
  1607.           }
  1608.           o.b = this;
  1609.           this.$();
  1610.           color.s("pv-b");
  1611.           this.za();
  1612.         } catch (e) {
  1613.           /** @type {Array} */
  1614.           var tagNameArr = [];
  1615.           tagNameArr.push("si=" + data.id);
  1616.           tagNameArr.push("n=" + encodeURIComponent(e.name));
  1617.           tagNameArr.push("m=" + encodeURIComponent(e.message));
  1618.           tagNameArr.push("r=" + encodeURIComponent(document.referrer));
  1619.           app.log(s.protocol + "//" + s.K + "?" + tagNameArr.join("&"));
  1620.         }
  1621.       },
  1622.       /**
  1623.        * @return {undefined}
  1624.        */
  1625.       za : function() {
  1626.         /**
  1627.          * @return {undefined}
  1628.          */
  1629.         function e() {
  1630.           color.s("pv-d");
  1631.         }
  1632.         if ("undefined" === typeof window._bdhm_autoPageview || window._bdhm_autoPageview === key) {
  1633.           /** @type {boolean} */
  1634.           this.H = key;
  1635.           /** @type {number} */
  1636.           this.a.et = 0;
  1637.           /** @type {string} */
  1638.           this.a.ep = "";
  1639.           this.i(e);
  1640.         } else {
  1641.           e();
  1642.         }
  1643.       },
  1644.       /**
  1645.        * @param {Function} v
  1646.        * @return {undefined}
  1647.        */
  1648.       i : function(v) {
  1649.         var node = this;
  1650.         /** @type {number} */
  1651.         node.a.rnd = Math.round(Math.random() * s.m);
  1652.         color.s("stag-b");
  1653.         var load = s.protocol + "//" + s.K + "?" + node.U();
  1654.         color.s("stag-d");
  1655.         node.X(load);
  1656.         app.log(load, function(o) {
  1657.           node.L(o);
  1658.           if (a.e(v, "Function")) {
  1659.             v.call(node);
  1660.           }
  1661.         });
  1662.       },
  1663.       /**
  1664.        * @return {undefined}
  1665.        */
  1666.       $ : function() {
  1667.         /** @type {string} */
  1668.         var script = document.location.hash.substring(1);
  1669.         /** @type {RegExp} */
  1670.         var RE_SIMPLE_SELECTOR = RegExp(data.id);
  1671.         /** @type {boolean} */
  1672.         var newKey = -1 < document.referrer.indexOf(s.Y) ? key : useCapture;
  1673.         var tag = t.k(script, "jn");
  1674.         /** @type {boolean} */
  1675.         var elements = /^heatlink$|^select$/.test(tag);
  1676.         if (script) {
  1677.           if (RE_SIMPLE_SELECTOR.test(script) && (newKey && elements)) {
  1678.             /** @type {Element} */
  1679.             script = document.createElement("script");
  1680.             script.setAttribute("type", "text/javascript");
  1681.             script.setAttribute("charset", "utf-8");
  1682.             script.setAttribute("src", s.protocol + "//" + data.js + tag + ".js?" + this.a.rnd);
  1683.             tag = document.getElementsByTagName("script")[0];
  1684.             tag.parentNode.insertBefore(script, tag);
  1685.           }
  1686.         }
  1687.       },
  1688.       /**
  1689.        * @param {string} cmd
  1690.        * @return {undefined}
  1691.        */
  1692.       X : function(cmd) {
  1693.         var value = cache.get("Hm_unsent_" + data.id) || "";
  1694.         /** @type {string} */
  1695.         var path = this.a.u ? "" : "&u=" + encodeURIComponent(document.location.href);
  1696.         /** @type {string} */
  1697.         value = encodeURIComponent(cmd.replace(/^https?:\/\//, "") + path) + (value ? "," + value : "");
  1698.         cache.set("Hm_unsent_" + data.id, value);
  1699.       },
  1700.       /**
  1701.        * @param {string} cls
  1702.        * @return {undefined}
  1703.        */
  1704.       L : function(cls) {
  1705.         var result = cache.get("Hm_unsent_" + data.id) || "";
  1706.         if (result) {
  1707.           if (result = result.replace(RegExp(encodeURIComponent(cls.replace(/^https?:\/\//, "")).replace(/([\*\(\)])/g, "\\$1") + "(%26u%3D[^,]*)?,?", "g"), "").replace(/,$/, "")) {
  1708.             cache.set("Hm_unsent_" + data.id, result);
  1709.           } else {
  1710.             cache.remove("Hm_unsent_" + data.id);
  1711.           }
  1712.         }
  1713.       },
  1714.       /**
  1715.        * @return {undefined}
  1716.        */
  1717.       Aa : function() {
  1718.         var that = this;
  1719.         var values = cache.get("Hm_unsent_" + data.id);
  1720.         if (values) {
  1721.           values = values.split(",");
  1722.           /**
  1723.            * @param {?} param
  1724.            * @return {undefined}
  1725.            */
  1726.           var fn = function(param) {
  1727.             app.log(s.protocol + "//" + decodeURIComponent(param).replace(/^https?:\/\//, ""), function(cls) {
  1728.               that.L(cls);
  1729.             });
  1730.           };
  1731.           /** @type {number} */
  1732.           var i = 0;
  1733.           var valuesLen = values.length;
  1734.           for (;i < valuesLen;i++) {
  1735.             fn(values[i]);
  1736.           }
  1737.         }
  1738.       }
  1739.     };
  1740.     return new Game;
  1741.   })();
  1742. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement