/*AGENT_VERSION=1.3.8*/"use strict";var i=wx;function m(){return+new Date}function a(t){var e;try{e=i.getStorageSync(t)}catch(t){}return e}function r(t,e){try{i.setStorageSync(t,e)}catch(t){}}function t(){return i.getSystemInfoSync()}function y(t){return t.statusCode}function e(){return["requestPayment","scanCode","previewImage"]}var n=[],v={context:null},o={networkType:"",system:t()};function s(t){n.push({timestamp:m(),route:t})}function u(){n=[]}function c(){return n.slice()}function d(e){return function(t){return"Array"===e&&Array.isArray?Array.isArray(t):Object.prototype.toString.call(t)==="[object "+e+"]"}}var h=d("String"),f=d("Array"),g=d("Function"),T=d("Object"),l=d("Boolean"),p=d("Number");function D(t,e){return function(){if(g(e))try{e.apply(this,arguments)}catch(t){}if(g(t))return t.apply(this,arguments)}}function q(e,n,a){return function(){var t;if(g(n))try{n.apply(this,arguments)}catch(t){}if(g(e)&&(t=e.apply(this,arguments)),g(a))try{a.apply(this,arguments)}catch(t){}return t}}function S(t,e){var n,a,r;T(t)&&g(t.handler)&&(n=t.name,a=t.handler,r=t.afterHandler,e[n]=q(e[n],a,r),e[n]._ty_hook=!0)}var x=function(){function t(t){return t<0?NaN:t<=30?0|Math.random()*(1<>>=1,r+=r)1&a&&(n=r+n);return n}return function(){return e(t(32),8)+"-"+e(t(16),4)+"-"+e(16384|t(12),4)+"-"+e(32768|t(14),4)+"-"+e(t(48),12)}}();function I(t){return t&&h(t)?JSON.parse(t):t}function b(t){try{return I(t)}catch(t){}return null}function k(t,e){var n="",a=!1;try{n=JSON.stringify(t)}catch(t){a=!(n="")}return e?{error:a,value:n}:n}function E(t){return t+""}function A(t){return t?T(t)?k(t).length:h(t)?t.length:t instanceof ArrayBuffer?t.byteLength:t.length?t.length:0:0}function C(t,e){var n=T(t)?k(t):h(t)?t:"";return e&&(n=n.substring(0,e)),n}var O="recordTyTime",_="TINGYUN_UID",F="custom",L="TRIGGER_LIFECYCLE",M="2.6.4",R=20,P="event",N="request",w="api",j="timer",H=1500,z=!0,Y=!0,B=5,G="TY_CONFIG",K="TY_SAMPLING",U="TY_SETDATA_THRESHOLD",J="TY_SETDATA_TRACE",V="TY_SETDATA_TRACEHINT",X="TY_IGNORE_ERRCODES",Q="TY_SETDATA_TIME_INTERVAL",W=[500,1500],Z=256,$=256,tt="__ty_page_param",et={},nt=!1;function at(t){null==(et=t||{}).requestFailMessageSize&&(et.requestFailMessageSize=$),null==et.apiFailMessageSize&&(et.apiFailMessageSize=Z)}function rt(){return nt}function it(t){nt=t}function ot(){for(var t=0;t=this.size||(this.queue.push(t),this.running||(this.running=!0,this.run()))},st.prototype.run=function(){var t=this;this.handler(this.queue.shift(),function(){0=e&&Et.eventActions.shift(),Et.eventActions.push(t)):Et.otherActions.push(t))}function Lt(t,e){for(var n in e)e.hasOwnProperty(n)&&e[n]&&0Et.lastSetDataInOnReady&&(Et.lastSetDataInOnReady=i.end),i.duration=i.end-i.start;var t=Et.setData.data[i.segmentTime];if(t.count++,i.duration>Et.setData.max&&(Et.setData.max=i.duration),i.duration>f[1]?t.grade.bad.count++:i.duration>f[0]?t.grade.normal.count++:t.grade.good.count++,i.duration>c&&(Et.stuck||(Et.stuck=!0),t.traces.length",this.type=t.type||P,this.subType=this.type===P?t.subType||"tap":t.subType,this.requests=[],this.apis=[],this.remain=ue(),this.s=m(),this.e=null,this.data=t.data,this.closed=!1,this.path=kt.current,this.prevPath=kt.prev,this.dataComposed=t.dataComposed||!1}de.prototype.end=function(t){var e;this.closed||(t&&((e=this.getItemsByType(t.type))&&0