Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@apmplus/web

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apmplus/web - npm Package Compare versions

Comparing version 2.7.3-alpha.1 to 2.7.3

cn/apmplus.hybrid.2.7.3.cn.js

2

cn/browser.cn.js

@@ -1,1 +0,1 @@

!function(){"use strict";var u,q=function(){return(q=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)};function I(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var r,o,i=e.call(n),u=[];try{for(;(void 0===t||0<t--)&&!(r=i.next()).done;)u.push(r.value)}catch(n){o={error:n}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return u}function b(n,t,e){if(e||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||((r=r||Array.prototype.slice.call(t,0,o))[o]=t[o]);return n.concat(r||Array.prototype.slice.call(t))}"undefined"==typeof Element||Element.prototype.addEventListener||(u=[],Ao=function(n,t){for(var e=0;e<u.length;){var r=u[e];if(r.object===this&&r.type===n&&r.listener===t){"DOMContentLoaded"===n?this.detachEvent("onreadystatechange",r.wrapper):this.detachEvent("on"+n,r.wrapper),u.splice(e,1);break}++e}},Element.prototype.addEventListener=Io=function(n,t){function e(n){n.target=n.srcElement,n.currentTarget=i,void 0!==t.handleEvent?t.handleEvent(n):t.call(i,n)}var r,o,i=this;"DOMContentLoaded"===n?(r=function(n){"complete"===document.readyState&&e(n)},document.attachEvent("onreadystatechange",r),u.push({object:this,type:n,listener:t,wrapper:r}),"complete"===document.readyState&&((o=new window.Event).srcElement=window,r(o))):(this.attachEvent("on"+n,e),u.push({object:this,type:n,listener:t,wrapper:e}))},Element.prototype.removeEventListener=Ao,HTMLDocument&&!HTMLDocument.prototype.addEventListener&&(HTMLDocument.prototype.addEventListener=Io,HTMLDocument.prototype.removeEventListener=Ao),Window&&!Window.prototype.addEventListener&&(Window.prototype.addEventListener=Io,Window.prototype.removeEventListener=Ao));function p(n){return JSON.stringify({ev_type:"batch",list:n})}var w=["init","start","config","beforeDestroy","provide","beforeReport","report","beforeBuild","build","beforeSend","send","beforeConfig"],A=function(){return{}};function _(n){return n}function E(n){return"object"==typeof n&&null!==n}var t=Object.prototype;function i(n){if(E(n)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===t.toString.call(n);n=Object.getPrototypeOf(n);return n===t||null===n}}function a(n){return"[object Array]"===t.toString.call(n)}function l(n){return"function"==typeof n}function D(n){return"number"==typeof n}function s(n){return"string"==typeof n}function e(n){return"undefined"!=typeof Event&&function(n,t){try{return n instanceof t}catch(n){return}}(n,Event)}function d(n,t){var e,r,o=q({},n);for(e in t)r=e,Object.prototype.hasOwnProperty.call(t,r)&&void 0!==t[e]&&(E(t[e])&&i(t[e])?o[e]=d(E(n[e])?n[e]:{},t[e]):a(t[e])&&a(n[e])?o[e]=function t(n,e){n=a(n)?n:[];e=a(e)?e:[];return Array.prototype.concat.call(n,e).map(function(n){return n instanceof RegExp?n:E(n)&&i(n)?d({},n):a(n)?t([],n):n})}(n[e],t[e]):o[e]=t[e]);return o}function x(n,t){if(!a(n))return!1;if(0===n.length)return!1;for(var e=0;e<n.length;){if(n[e]===t)return!0;e++}return!1}function S(n,t){if(!a(n))return n;var e=n.indexOf(t);if(0<=e){t=n.slice();return t.splice(e,1),t}return n}function v(n,t,e){for(var r,o=(t=I(t.split(".")))[0],i=t.slice(1);n&&0<i.length;)n=n[o],o=(r=I(i))[0],i=r.slice(1);if(n)return e(n,o)}var r=function(e,n){return e&&E(e)?n.reduce(function(n,t){return n[t]=e[t],n},{}):e};function h(n){return a(n)&&n.length?function(n){for(var t=[],e=n.length,r=0;r<e;r++){var o=n[r];s(o)?t.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&t.push(o.source)}return new RegExp(t.join("|"),"i")}(n):null}var g=function(n,t){n=h(n||[]);return!!n&&n.test(t)};function c(n){try{return s(n)?n:JSON.stringify(n)}catch(n){return"[FAILED_TO_STRINGIFY]:"+String(n)}}function m(i,u,a,c){return void 0===c&&(c=!0),function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(!i)return A;var e=i[u],r=a.apply(void 0,b([e],I(n),!1)),o=r;return l(o)&&c&&(o=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return r.apply(this,t)}catch(n){return l(e)&&e.apply(this,t)}}),i[u]=o,function(n){n||(o===i[u]?i[u]=e:r=e)}}}function T(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];console.warn.apply(console,b(["[SDK]",Date.now(),o(""+j++)],I(n),!1))}function L(r){return function(n){for(var t=n,e=0;e<r.length&&t;e++)try{t=r[e](t)}catch(n){R(n)}return t}}var f=function(i,u,a){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(!i)return A;var e=i[u],r=a.apply(void 0,b([e],I(n),!1)),o=r;return l(o)&&(o=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r.apply(this,n)}),i[u]=o,function(){o===i[u]?i[u]=e:r=e}}},o="".padStart?function(n,t){return n.padStart(t=void 0===t?8:t," ")}:function(n){return n},y=0,R=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];console.error.apply(console,b(["[SDK]",Date.now(),o(""+y++)],I(n),!1))},j=0,k=function(n){return Math.random()<Number(n)},C=function(n,t){return n<Number(t)},O=function(r){return function(n){for(var t=!0,e=0;e<r.length&&t;e++)try{t=r[e](n)}catch(n){R(n)}return t}};function M(){var n=function(){for(var n=new Array(16),t=0,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(n){for(var t=[],e=0;e<256;++e)t[e]=(e+256).toString(16).substr(1);var r=0,o=t;return[o[n[r++]],o[n[r++]],o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],o[n[r++]],o[n[r++]],o[n[+r]],o[n[15]]].join("")}(n)}function N(r,n){var t=[];try{t=n.reduce(function(n,t){try{var e=t(r);"function"==typeof e&&n.push(e)}catch(n){}return n},[])}catch(n){}return function(n){return N(n,t)}}function B(n,r){var o=I(n,1)[0];return function(t,n){var e=o(function(n){return O(r)(n)?t(n):A});n(function(){e()})}}var H=function(n){function t(n){a=S(a,n),f||s()}var e,r,o,i,u,a=[],c=[],f=!1,s=(r=function(){return a.length},o=function(){f=!0,e&&e[0](),c.forEach(function(n){return n()}),c.length=0,e=void 0},-1===(i=n=void(u=0)===n?3e5:n)?A:function(){if(r())return u&&clearTimeout(u),void(u=0);0===u&&(u=setTimeout(o,i))});return{next:function(n){return N(n,a)},complete:function(n){c.push(n)},attach:function(n,t){e=[n,t]},subscribe:function(n){if(f)throw new Error("Observer is closed");return a.push(n),e&&e[1]&&e[1](n),s(),function(){return t(n)}},unsubscribe:t}},P=function(n,t,e){e=H(e);try{n(e.next,e.attach),t&&e.complete(t)}catch(n){}return[e.subscribe,e.unsubscribe]};function U(){function r(n){n.length&&n.forEach(function(n){try{n()}catch(n){}}),n.length=0}function t(n){i[n]&&i[n].forEach(function(n){r(n[1])}),i[n]=void 0}var o=!1,i={};return{set:function(n,t,e){i[n]?i[n].push([t,e]):i[n]=[[t,e]],o&&r(e)},has:function(n){return!!i[n]},remove:t,removeByEvType:function(t){Object.keys(i).forEach(function(n){i[n]&&i[n].forEach(function(n){n[0]===t&&r(n[1])})})},clear:function(){o=!0,Object.keys(i).forEach(function(n){t(n)})}}}var W=function(n,t,e,r){return n.destroyAgent.set(t,e,r)};var F=function(n){var e,r,o,t=(e={},r={},o={set:function(n,t){return e[n]=t,r[n]=c(t),o},merge:function(t){return e=q(q({},e),t),Object.keys(t).forEach(function(n){r[n]=c(t[n])}),o},delete:function(n){return delete e[n],delete r[n],o},clear:function(){return e={},r={},o},get:function(n){return r[n]},toString:function(){return q({},r)}});n.provide("context",t),n.on("report",function(n){return n.extra||(n.extra={}),n.extra.context=t.toString(),n})},X=function(a,c,e){function f(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=n[0];if(e){var r=e.split(".")[0];if(r in f)return i=f,u=e,o=[].slice.call(n,1),v(i,u,function(n,t){if(n&&t in n&&l(n[t]))try{return n[t].apply(n,o)}catch(n){return}});var o,i=s[r]||[],u=null!==(u=null==c?void 0:c(a))&&void 0!==u?u:{};i.push(b([u],I(n),!1)),void(s[r]=i)}}var n,s={};for(n in m(a,"provide",function(e){return function(n,t){f[n]=t,e.call(a,n,t)}})(),a)Object.prototype.hasOwnProperty.call(a,n)&&(f[n]=a[n]);return a.on("provide",function(n){s[n]&&(s[n].forEach(function(n){var t=I(n),n=t[0],t=t.slice(1);null!=e&&e(a,n,t)}),s[n]=null)}),f};function z(r,o){r.on("init",function(){function n(n){n.forEach(function(n){var t=n.name;x(e,t)||(e.push(t),n.setup(r),o&&o(t,n.setup),r.destroyAgent.set(t,t,[function(){e=S(e,t),n.tearDown&&n.tearDown()}]))})}var e=[];r.provide("applyIntegrations",n);var t=r.config();t&&t.integrations&&n(t.integrations)})}function G(n){return n.split(J)[0]}var J="_";function Y(n,t){return n.initSubject(t)}function $(n,t,e){var t=I(t,2),r=t[0],t=t[1],o=n.privateSubject||{};return o[r]||(o[r]=P(t,function(){o[r]=void 0},e)),o[r]}var V=function(){return Date.now()};function K(){if("object"==typeof window&&E(window))return window}function Q(){if("object"==typeof document&&E(document))return document}function Z(){if(K()&&E(window.performance))return window.performance}function nn(){if("function"==typeof XMLHttpRequest&&l(XMLHttpRequest))return XMLHttpRequest}function tn(){if(K()&&l(window.MutationObserver))return window.MutationObserver}function en(){if(K()&&l(window.PerformanceObserver))return window.PerformanceObserver}function rn(){var n=function(){if(K()&&"navigator"in window)return window.navigator}();if(n)return n.connection||n.mozConnection||n.webkitConnection}function on(n){var t=Q();if(!t||!n)return"";t=t.createElement("a");return t.href=n,t.href}function un(n){var t=Q();if(!t||!n)return{url:n,protocol:"",domain:"",query:"",path:"",hash:""};t=t.createElement("a");t.href=n;n=t.pathname||"/";return"/"!==n[0]&&(n="/"+n),{url:t.href,protocol:t.protocol.slice(0,-1),domain:t.hostname,query:t.search.substring(1),path:n,hash:t.hash}}function an(){var n=K()&&K()&&window.location;return n?n.href:""}function cn(t,n){void 0===n&&(n=!1);var e=pn(t);return n&&(e.timestamp=V()),function(n){t.report(q(q({},n),{overrides:e}))}}function fn(o){return function(e,n){function t(n){var t;n.viewId&&n.viewId!==(null===(t=o.config())||void 0===t?void 0:t.viewId)&&(e(r),r=q(q({},pn(o)),dn(n)))}var r=pn(o);o.on("beforeConfig",t),n(function(){o.off("beforeConfig",t)})}}function sn(r){return function(n,t){var e=pn(r);t(A,function(n){e&&n(e)})}}function ln(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=mn(K());e&&(e.errors||(e.errors=[]),e.errors.push(n))}var dn=function(n){return{pid:n.pid,view_id:n.viewId,url:an()}},pn=function(n){var t=n.config(),t=dn(t);return t.context=n.context?n.context.toString():{},t},vn="view_0",hn="f_view_0",mn=function(n){if(n)return n.__SLARDAR_REGISTRY__||(n.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),n.__SLARDAR_REGISTRY__.Slardar},gn=function(n,t){var e=n&&new n(t);return[function(n,t){e&&n&&e.observe(n,t)},function(){return e&&e.disconnect()}]},yn=function(n,t,e,r){var o,i=!l(t)||r&&n&&n.hidden?function(n){return n(0),0}:t,u=l(e)?e:A;return[function(n){o&&u(o),o=i(n)},i,u]},bn=function(e){var n=e&&e.timing||void 0;return[n,function(){return e&&e.now?e.now():(Date.now?Date.now():+new Date)-(n&&n.navigationStart||0)},function(n){var t=(e||{}).getEntriesByType;return l(t)&&t.call(e,n)||[]},function(){var n=(e||{}).clearResourceTimings;l(n)&&n.call(e)},function(n){var t=(e||{}).getEntriesByName;return l(t)&&t.call(e,n)||[]}]},wn=function(n){var t={url:an(),timestamp:V()},e=n.config();return null!=e&&e.pid&&(t.pid=e.pid),null!=n&&n.context&&(t.context=n.context.toString()),t},_n=function(e,r){return function(n){function t(n){return n.overrides=r,n}e.on("report",t),n(),e.off("report",t)}},En="<unknown>";function xn(n){try{for(var t,e=n,r=[],o=0,i=0,u=" > ".length;e&&o++<5&&!("html"===(t=function(n){var t,e,r,o,i=n,u=[];if(!i||!i.tagName)return"";u.push(i.tagName.toLowerCase()),i.id&&u.push("#"+i.id);n=i.className;if(n&&s(n))for(t=n.split(/\s+/),o=0;o<t.length;o++)u.push("."+t[o]);var a=["type","name","title","alt"];for(o=0;o<a.length;o++)e=a[o],(r=i.getAttribute(e))&&u.push("["+e+'="'+r+'"]');return u.join("")}(e))||1<o&&256<=i+r.length*u+t.length);)r.push(t),i+=t.length,e=e.parentNode;return r.reverse().join(" > ")}catch(n){return En}}var Sn=function(n,t,e,r){return void 0===r&&(r=!1),n.addEventListener(t,e,r),function(){n.removeEventListener(t,e,r)}};function Tn(n,t){n&&t.push(function(){return clearTimeout(n)})}function Ln(n){var t,e=K();e&&(t=I(kn(n),1)[0],["unload","beforeunload","pagehide"].forEach(function(n){e.addEventListener(n,t)}))}function Rn(n){var t,e=Q(),r=K();e&&r&&(t=A,t=Sn(e,"visibilitychange",function(){"visible"===e.visibilityState&&(n(),t())},!0))}function jn(){return!!btoa&&!!atob}var kn=function(t){var e=!1;return[function(n){e||(e=!0,t&&t(n))}]},Cn=function(n,t){return E(n)?q(q({},t),n):!!n&&t};function On(n){try{var t=localStorage.getItem(n),e=t,r=e=t&&"string"==typeof t?JSON.parse((u=t,jn()?decodeURI(atob(u)):u)):e,o=r.expires,i=function(n,t){var e={};for(o in n)Object.prototype.hasOwnProperty.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(e[o[r]]=n[o[r]]);return e}(r,["expires"]);return o>=V()?i:void 0}catch(n){return}var u}function qn(n,t,e){var r;if(!(e<=0))try{localStorage.setItem(n,(r=JSON.stringify(q(q({},t),{expires:V()+e})),jn()?btoa(encodeURI(r)):r))}catch(n){}}function In(n){return!1===n?0:!0!==n&&void 0!==n&&D(n)?n:7776e6}function An(r){return function(n,t){var e;r&&((e=[]).push(f(r,"open",Hn)()),e.push(f(r,"setRequestHeader",Pn)()),e.push(f(r,"send",Un)(n)),t(function(){e.forEach(function(n){return n()})}))}}function Dn(r,o){return function(n,t){var e=o([n,t=void 0===t?{}:t]),t=r(n,t);return t.then(function(n){e(n)},function(){e(void 0)}),t}}function Mn(n,t,e){return n=I(zn(n,t),3),t=n[1],n=n[2],t(e),n}function Nn(n,r){var o=Cn(n,ct);if(o&&k(o.sampleRate))return function(n,t){var e=o.origins;e.length&&g(e,n)&&(t("x-rum-traceparent","00-"+ft()+"-"+ft().substring(16)+"-"+at),t("x-rum-tracestate",r))}}function Bn(n,t){return!n||!t||(st.test(n)||lt.test(t))}var Hn=function(r){return function(){for(var n,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n=I(t,2),this._method=n[0],this._url=n[1],r.apply(this,t)}},Pn=function(o){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this._reqHeaders=this._reqHeaders||{};var e=I(n,2),r=e[0],e=e[1];return this._reqHeaders[r]=e,o&&o.apply(this,n)}},Un=function(i,u){var t,a=(t=new RegExp("\\/monitor_web\\/collect|\\/monitor_browser\\/collect\\/batch","i"),function(n){return t.test(n)});return function(){for(var n,r,o,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._start=V(),this._data=null==t?void 0:t[0],a(this._url)||(n=u([this._method,this._url,this._start,this]),o=n,f(r=this,"onreadystatechange",function(e){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return 4===this.readyState&&o(r),e&&e.apply(this,n)}})()),i.apply(this,t)}},Wn=["fetch_0",function(n,t){var e,r=K();r&&fetch&&((e=[]).push(f(r,"fetch",Dn)(n)),t(function(){e.forEach(function(n){return n()})}))}],Fn=["resource"],Xn=["longtask"],zn=function(t,o,e){var r=t&&new t(function(n,r){n.getEntries?n.getEntries().forEach(function(n,t,e){return o(n,t,e,r)}):e&&e()});return[function(n){if(!t||!r)return e&&e();try{r.observe({entryTypes:n})}catch(n){return e&&e()}},function(n){if(!t||!r)return e&&e();try{r.observe({type:n,buffered:!0})}catch(n){return e&&e()}r.observe({type:n,buffered:!1})},function(){return r&&r.disconnect()}]},Gn=function(n,t,e){n=I(zn(n,t),3),t=n[0],n=n[2];return t(e),n},Jn=["longtask_0",function(n,t){var e=en();e&&t(Gn(e,n,Xn))}],Yn=["resource_0",function(n,t){var e=en();e&&t(Gn(e,n,Fn))}],$n="pageview",Vn="session",Kn="js_error",Qn="http",Zn="resource_error",nt="resource",tt="custom",et="performance",rt="performance_timing",ot="performance_longtask",it="blank_screen",ut="action",at="01",ct={sampleRate:1,origins:[]},ft=function(){var n=window&&(window.crypto||window.msCrypto);if(void 0!==n&&n.getRandomValues){var t=new Uint16Array(8);n.getRandomValues(t);n=function(n){for(var t=n.toString(16);t.length<4;)t="0"+t;return t};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/[x]/g,function(){return(16*Math.random()|0).toString(16)})},st=new RegExp("(cookie|auth|jwt|token|key|ticket|secret|credential|session|password)","i"),lt=new RegExp("(bearer|session)","i"),dt=function(t){var e=!1;return function(n){e||(e=!0,t(n))}},pt=function(n,t){try{var e;t&&(e=n.request.url,n.request.url=t(e),n.extra=q(q({},n.extra),{original_url:e}))}catch(n){}};var vt=function(n,t){var e,r=n._method,o=n._reqHeaders,i=n._url,u=n._start,a=n._data,o={api:"xhr",request:{url:on(i),method:(r||"").toLowerCase(),headers:o&&(e=o,Object.keys(e).reduce(function(n,t){return Bn(t,e[t])||(n[t.toLowerCase()]=e[t]),n},{})),timestamp:u},response:{status:n.status||0,is_custom_error:!1,timestamp:V()},duration:V()-u};"function"==typeof n.getAllResponseHeaders&&(o.response.headers=s(c=n.getAllResponseHeaders())&&c?c.split("\r\n").reduce(function(n,t){var e;return s(t)&&(t=(e=I(t.split(": "),2))[0],e=e[1],Bn(t,e)||(n[t.toLowerCase()]=e)),n},{}):{});var u=o.response.status,c=t.collectBodyOnError,t=t.extraExtractor;try{var f=null==t?void 0:t(n.response,o,a);f&&(o.extra=f),f&&(o.response.is_custom_error=!0),c&&(f||400<=u)&&(o.request.body=a?""+a:void 0,o.response.body=n.response?""+n.response:void 0)}catch(n){}return o};function ht(n,t,e){t=null===(n=n.config())||void 0===n?void 0:n.plugins[t];return Cn(t,e)}var mt="ajax",gt={autoWrap:!0,setContextAtReq:function(){return _},ignoreUrls:[],collectBodyOnError:!1};var yt="click",bt="dom",wt=[yt+"_0",function(n,t){var e=Q();e&&(e.addEventListener(yt,n,!0),t(function(){e.removeEventListener(yt,n,!0)}))}],_t="keypress",Et=["keypress_0",function(n,t){var e=Q();e&&(e.addEventListener(_t,n,!0),t(function(){e.removeEventListener(_t,n,!0)}))}],xt=function(e){return function(n){var t;try{t=n.event.target?xn(n.event.target):xn(n.event)}catch(n){t=En}0!==t.length&&e({type:"dom",category:"ui."+n.name,message:t})}},St=function(t,e){return function(n){if(e)try{t(n)}catch(n){}}},Tt=function(o){function i(t,e){var r;return function(n){u=void 0,n&&r!==n&&e({event:r=n,name:t})}}var u;return[i,function(r){return function(n){var t;try{t=n.target}catch(n){return}var e=t&&t.tagName;e&&("INPUT"===e||"TEXTAREA"===e||t.isContentEditable)&&(u||i("input",r)(n),clearTimeout(u),u=window.setTimeout(function(){u=void 0},o))}}]},Lt=function(e,r,o){void 0===e&&(e=20),void 0===r&&(r=_),void 0===o&&(o=function(n,t){return n.slice(-t)});var i=[];return[function(){return i},function(n){var t=r(n);t&&(n=q(q({},t),{timestamp:n.timestamp||V()}),i=0<=e&&i.length+1>e?o(b(b([],I(i),!1),[n],!1),e):b(b([],I(i),!1),[n],!1))}]},Rt="breadcrumb",jt={maxBreadcrumbs:20,dom:!0};function kt(n,t){return n instanceof t}function Ct(n,t,e){return t=t&&t.method||"get",(t=kt(n,e)?n.method||t:t).toLowerCase()}function Ot(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];try{return n.reduce(function(e,n){return new t(n||{}).forEach(function(n,t){return!Bn(t,n)&&(e[t]=n)}),e},{})}catch(n){return{}}}function qt(n,t,e){return kt(n,e)?n.body:null==t?void 0:t.body}var It=function(n){if(!s(n))return!1;var t=I(n.split(":"),2),n=t[0];return!t[1]||"http"===n||"https"===n},At=function(n,t,e,r,o,i){kt(e,o)?e.headers.set(n,t):r.headers instanceof i?r.headers.set(n,t):r.headers=q(q({},r.headers),((r={})[n]=t,r))},Dt=function(t,e,n,r,o,i,u){function a(){var n;f&&(c.request.body=null===(n=qt(t,e,r))||void 0===n?void 0:n.toString())}var c={api:"fetch",request:{method:Ct(t,e,r),timestamp:u,url:on(t instanceof r?t.url:t),headers:Ot(o,t.headers,e.headers)},response:{status:n&&n.status||0,is_custom_error:!1,timestamp:V()},duration:V()-u},f=i.collectBodyOnError,s=i.extraExtractor;if(n)try{var l=Ot(o,n.headers);c.response.headers=l;try{-1!==(l["content-type"]||"").indexOf("application/json")&&s&&n.clone().json().then(function(n){n=s(n,c,null===(n=qt(t,e,r))||void 0===n?void 0:n.toString());n&&(c.extra=n,c.response.is_custom_error=!0,a())}).catch(A)}catch(n){}400<=n.status&&a()}catch(n){}else a();return c},Mt="fetch",Nt={autoWrap:!0,setContextAtReq:function(){return _},ignoreUrls:[],collectBodyOnError:!1};function Bt(n){var t;return!function(n){switch(Object.prototype.toString.call(n)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return 1;default:return n instanceof Error}}(n)?(i(n)||e(n)||s(n))&&(t={message:c(n)}):t=r(n,Ut),t}function Ht(n,t){return n&&t&&n===t}function Pt(o,n,t,e){function r(n){var t=n.error,e=n.extra,r=n.react,n=n.source;!(t=s?d(t):t)||!t.message||l&&l.test(t.message)||o({ev_type:Kn,payload:{error:t,breadcrumbs:[],extra:e,react:r,source:n}})}var i=(f=I(t,3))[0],u=f[1],a=f[2],c=e.ignoreErrors,t=e.onerror,f=e.onunhandledrejection,s=e.dedupe,e=e.captureGlobalAsync,l=h(c),d=Qt();return t&&n.push(i[0](function(n){return r({error:Wt(n),source:{type:"onerror"}})})),f&&n.push(u[0](function(n){return r({error:Ft(n),source:{type:"onunhandledrejection"}})})),e&&n.push(a()[0](function(n){r(n)})),function(n,t,e){return r({error:Xt(n),extra:t,react:e,source:{type:"manual"}})}}var Ut=["name","message","stack","filename","lineno","colno"],Wt=function(n){return Bt(n.error)},Ft=function(n){var t;try{var e=void 0;if("reason"in n?e=n.reason:"detail"in n&&"reason"in n.detail&&(e=n.detail.reason),e){var r=Bt(e);return q(q({},r),{name:null!==(t=r&&r.name)&&void 0!==t?t:"UnhandledRejection"})}}catch(n){}},Xt=function(n){return"[object ErrorEvent]"===Object.prototype.toString.call(n)?Wt(n):("[object PromiseRejectionEvent]"===Object.prototype.toString.call(n)?Ft:Bt)(n)},zt=["EventTarget","Window","Node","ApplicationCache","ChannelMergerNode","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","MessagePort","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Gt=["setTimeout","setInterval","requestAnimationFrame","requestIdleCallback"],Jt=["onload","onerror","onprogress","onreadystatechange"],Yt="addEventListener",$t=["async_error_0",function(o,n){function u(n,e){if(!l(n))return n;var r={type:"capture-global",data:q({},e)},t=n._w_||(n._w_=function(){try{return(n.handleEvent&&l(n.handleEvent)?n.handleEvent:n).apply(this,[].map.call(arguments,function(n){return u(n,e)}))}catch(n){var t=Bt(n);throw t&&o({source:r,error:t}),n}});return t._hook_=!0,t}var t=K(),e=nn(),r=[];t&&r.push.apply(r,b([],I(Gt.filter(function(n){return t[n]}).map(function(o){return m(t,o,function(r){return function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return r&&r.call.apply(r,b([this,u(n,{function:o})],I(t),!1))}},!1)()})),!1)),e&&e.prototype&&r.push(m(e.prototype,"send",function(r){return function(){for(var t=this,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return Jt.filter(function(n){return t[n]&&!t[n]._hook_}).forEach(function(n){t[n]=u(t[n],{function:n})}),r.apply(this,n)}},!1)()),zt.forEach(function(i){var n=t&&t[i]&&t[i].prototype;n&&n[Yt]&&(r.push(m(n,Yt,function(o){return function(n,t,e){try{var r=t.handleEvent;l(r)&&(t.handleEvent=u(r,{function:"handleEvent",target:i}))}catch(n){}return o&&o.call(this,n,u(t,{function:Yt,target:i}),e)}},!1)()),r.push(m(n,"removeEventListener",function(r){return function(n,t,e){return null!=t&&t._w_&&r.call(this,n,t._w_,e),r.call(this,n,t,e)}},!1)()))}),n(function(){return r.forEach(function(n){return n()})})}],Vt=["err_0",function(n,t){var e=K();e&&(e.addEventListener("error",n,!0),t(function(){e.removeEventListener("error",n,!0)}))}],Kt=["perr_0",function(n,t){var e=K();e&&(e.addEventListener("unhandledrejection",n,!0),t(function(){e.removeEventListener("unhandledrejection",n,!0)}))}],Qt=function(){var r;return function(n){try{if(e=r,!(!(t=n)||!e)&&!(!Ht(t.message,e.message)||!Ht(t.stack,e.stack)))return void(r=n)}catch(n){ln(n)}var t,e;return r=n}},Zt="jsError",ne={ignoreErrors:[],onerror:!0,onunhandledrejection:!0,captureGlobalAsync:!1,dedupe:!0};function te(n){return"hidden"===n.visibilityState}function ee(n){return"complete"===n.readyState}function re(n){return le(n,V())}var oe=["hidden_2",function(n,t){var e,r=K(),o=Q();r&&o&&(e=function(){n(te(o))},addEventListener("visibilitychange",e,!0),t(function(){removeEventListener("visibilitychange",e,!0)},function(n){n(te(o))}))}],ie=["load_1",function(n,t){var e,r,o=K(),i=Q();o&&i&&(e=!1,r=function(){setTimeout(function(){n(),e=!0},0)},ee(i)?r():o.addEventListener("load",r,!1),t(function(){o.removeEventListener("load",r,!1)},function(n){e&&n()}))}],ue=["unload_0",function(n,t){var e,r,o,i=K();i&&(e=I(kn(n),1)[0],o=function(){e()},(r=["unload","beforeunload","pagehide"]).forEach(function(n){i.addEventListener(n,o)}),t(function(){r.forEach(function(n){i.removeEventListener(n,o)})}))}],ae=["domLoad_1",function(n,t){var e,r,o=K(),i=Q();o&&i&&(e=!1,r=function(){setTimeout(function(){n(),e=!0},0)},"loading"!==i.readyState?r():o.addEventListener("DOMContentLoaded",r,!1),t(function(){o.removeEventListener("DOMContentLoaded",r,!1)},function(n){e&&n()}))}],ce=["hash_0",function(n,t){var e,r=K();r&&(r.addEventListener("hashchange",e=function(){return n(location.href)},!0),t(function(){return r.removeEventListener("hashchange",e,!0)}))}],fe=["history_0",function(n,t){var e,r,o,i=K()&&window.history;i&&(r=function(){return n(location.href)},(e=[]).push(m(i,"pushState",o=function(e){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];try{e.apply(i,n)}finally{r()}}})(),m(i,"replaceState",o)()),window.addEventListener("popstate",r,!0),e.push(function(){return window.removeEventListener("popstate",r,!0)}),t(function(){e.forEach(function(n){return n()})}))}],se=function(e){return function(n){var t;return"hash"===e?(null===(t=un(n).hash)||void 0===t?void 0:t.replace(/^#/,""))||"/":un(n).path}},le=function(n,t){return n+"_"+t},de=function(r,n,t,o){var i=t,u=n;o&&o(n);return[function(n,t,e){"user_set"!==n&&t!==i?(i=t,u=null!=e?e:i,o&&o(u),r(n,u)):"user_set"===n&&t!==u&&(u=t,o&&o(u),r(n,u))},function(){n&&r("init",n)}]},pe=function(e,n){var r=n;return[function(n,t){t!==r&&e(n,r=t)}]},ve=function(e){return function(n,t){e({ev_type:$n,payload:{pid:t,source:n}})}},he=function(n){return"manual"===n},me="error_weight",ge="duration_apdex",ye="perf_apdex",be=function(n,t){var e=n[0]+n[1]+n[2],r=n[0]/e;return n[2]/e>t.frustrating_threshold?2:r>t.satisfying_threshold||0===e?0:1},we=function(){var t=0,e=void 0;return[function(n){n?e&&(t+=V()-e,e=void 0):e=V()},function(){e&&(t+=V()-e);var n=t;return t=0,e=V(),n}]},_e=function(o,i){return function(n,t){var e=n.payload;switch(n.ev_type){case et:var r=e.name;e.isSupport&&o(t[ye],r,e.value);break;case ut:o(t[ye],"action",e.duration||0);break;case Kn:i(t[me],0);break;case Qn:e.response.is_custom_error||400<=e.response.status?i(t[me],1):(r=e.response.timing)&&o(t[ge],0,r.duration);break;case Zn:i(t[me],2);break;case it:i(t[me],3);break;case nt:o(t[ge],1,e.duration);break;case ot:e.longtasks.forEach(function(n){o(t[ge],2,n.duration)})}}},Ee=function(){function n(){o=[0,0,0],i={error_count:[0,0,0,0],duration_count:[0,0,0],perf_apdex:{}}}var o,i;n();return[function(n,t,e){var r=n&&n[t];!r||e<=0||(n=e<(r[0].threshold||0)?0:e>(r[1].threshold||0)?2:1,o[n]+=r[n].weight,"string"==typeof t?(e=le(t,n),r=i[ye][e],i[ye][e]=(r||0)+1):2==n&&(i.duration_count[t]+=1))},function(n,t){n&&(o[2]+=n[t],i.error_count[t]+=1)},function(){return[o,i]},n]},xe=function(){var o={start:V(),end:0,time_spent:0,is_bounced:!1,entry:"",exit:"",p_count:0,a_count:0};return[function(n,t){var e=I(n,3),r=e[0],n=e[1],e=e[2];o.end=V(),o.time_spent+=t&&t.time_spent||0,o.last_page=t,o.p_count+=1,o.rank=r,o.apdex=n,o.apdex_detail=e;e=Q();e&&(o.is_bounced=!ee(e))},function(n,t){o.time_spent+=n.time_spent,o.p_count+=1,o.exit=t},function(){o.a_count+=1},function(n){o.entry=n,o.exit=n},function(){return o}]},Se="pageview",Te={sendInit:!0,routeMode:"history",apdex:2};var Le="resource",Re=["xmlhttprequest","fetch","beacon"],je="resource",ke={ignoreUrls:[],slowSessionThreshold:4e3};function Ce(n){return n="link"===(t=n).tagName.toLowerCase()?"href":"src",l(t.getAttribute)?t.getAttribute(n)||"":t[n]||"";var t}var Oe=function(n,t){var e=n.target||n.srcElement;if(e){n=e.tagName;if(n&&s(n))return{url:Ce(e),tagName:n,xpath:t?xn(e):void 0}}},qe=function(n,t){var e=n.url,r=n.tagName,n=n.xpath,e=on(e),t=t(e)[0];return{type:r.toLowerCase(),url:e,xpath:n,timing:t}},Ie="resourceError",Ae={includeUrls:[],ignoreUrls:[],dedupe:!0,gatherPath:!1};function De(t){var e=0,r=Ue(n,0);return[function(){e=V()},function(){var n;n=V()-e,r.value=n,t&&t(ze(r)),e=0}]}function Me(t,n,e,r,o){var i,u=(c=I(o,2))[0],a=c[1],o=en(),c=Z(),f=Ue(n,0),s=Xe(ze,e,r);if(!c||!o)return f.isSupport=!1,void s(f);function l(n){n=n.startTime,f.value=n,s(f)}(c=(0,I(bn(c),5)[4])(t)[0])?l(c):(r.push(Gn(o,function(n){n.name===t&&l(n)},[Ye])),r.push(a[0](function(){f.isBounced=!0,s(f)})),i=function(n){n&&(f.isSupport=!1,s(f))},r.push(function(){return u[1](i)}),u[0](i))}function Ne(n,e){var r=["img","script","iframe","link","audio","video","source"],t=(n=I(gn(n,function(n){for(var t=0;t<n.length;t++)("childList"===n[t].type&&function n(t,e){for(var r=0;r<t.length;r++)if(x(e,t[r].nodeName.toLowerCase())||t[r].children&&n(t[r].children,e))return 1}(n[t].addedNodes,r)||"attributes"===n[t].type&&x(r,n[t].target.nodeName.toLowerCase()))&&e(n[t])}),2))[0];return[function(){return t(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},n[1]]}function Be(n,t){var e=n.startTime,r=n.duration;n.start=e,n.end=e+r,t.push(n)}function He(n,t,e,r){var o=(l=I(e,5))[0],i=l[1],u=l[2],a=l[3],c=l[4],f=Ue(Ke,0),s=Xe(ze,n,t),e=Z(),l=en(),d=void 0===(r=(n=r||{}).entries)?[]:r,p=n.observer;if(t.push(function(){p&&p.disconnect(),d.length=0}),!window||!XMLHttpRequest||!e||!l||l.supportedEntryTypes&&!x(l.supportedEntryTypes||[],Xn[0]))return f.isSupport=!1,s(f),0;var v=(n=I(bn(e),5))[0],h=n[1],m=n[4],e=(l=I(Ze(h),3))[0],n=l[1],g=l[2],y=(a=I(er(t,[o,i,u,a,tn()],d)(g,h),2))[0],b=a[1];function w(n){f.value=n,s(f)}t.push(n),n=y[y.length-1],e(function(){return function(n){var t=m(Ge)[0],t=tr((t?t.startTime:nr(v))||0,nr(v)||0,b(),h(),y);if(!t)return g(h()+1e3);n(t)}(w)},Math.max(b()+Qe,n?n.end:0)),t.push(c[0](function(){f.isSupport=!1,s(f)}))}var Pe={isSupport:!0,isPolyfill:!1,isBounced:!1,isCustom:!1,type:"perf"},Ue=function(n,t){return q({name:n,value:t},Pe)},We="performance",Fe={entries:[],observer:void 0},Xe=function(t,e,r){var o=!1;return function(n){r.length&&r.forEach(function(n){n()}),r.length=0,o||(o=!0,e&&e(t(n)))}},ze=function(n,t){return{ev_type:et,payload:n,overrides:t}},n="spa_load",Ge="first-contentful-paint",Je="first-paint",Ye="paint",$e=["fp",function(n,t,e){return Me(Je,"fp",n,t,e)}],Ve=["fcp",function(n,t,e){return Me(Ge,"fcp",n,t,e)}],Ke="tti",Qe=5e3,Ze=function(t){function e(n){n<o||!r||(u(),i=window.setTimeout(r,n-t()),o=n)}var r,o=-1/0,i=void 0,u=function(){return window.clearTimeout(i)};return[function(n,t){r=n,e(t)},function(){u(),r=void 0},e]},nr=function(n){var t=n||{},n=t.domContentLoadedEventEnd,t=t.navigationStart;return n?n-(void 0===t?0:t):null},tr=function(n,t,e,r,o){if(r-e<Qe)return null;o=0===o.length?n:o[o.length-1].end;return r-o<Qe?null:Math.max(o,t)},er=function(d,n,p){var n=I(n,5),v=n[0],h=n[1],m=n[2],g=n[3],y=n[4];return function(e,n){var r,o=[],i=[],t=I([r={},function(n,t){return r[n]=t},function(n){return delete r[n]}],3),u=t[0],a=t[1],c=t[2];p.forEach(function(n){n.entryType===Xn[0]&&Be(n,o)});var f=0;d.push(v[0](function(n){if("get"!==(I(n,1)[0]||"").toLowerCase())return A;var t=f+=1;return a(t,V()),function(){c(t)}})),d.push(h[0](function(n){var t=I(n,2),n=t[0],t=t[1];if(!window.Request||"get"!==Ct(n,t,window.Request))return A;var e=f+=1;return a(e,V()),function(){c(e)}}));var s=I(y&&Ne(y,function(){return e(n()+Qe)})||[],2),t=s[0],s=s[1];t&&t();function l(){return function(n,t,e){if(2<n.length)return e();for(var r=[],o=0;o<t.length;o++)r.push([t[o].start,0],[t[o].end,1]);for(o=0;o<n.length;o++)r.push([n[o],0]);r.sort(function(n,t){return n[0]-t[0]});for(var i=n.length,o=r.length-1;0<=o;o--){var u=I(r[o],2),a=u[0];switch(u[1]){case 0:i--;break;case 1:if(2<++i)return a}}return 0}(function(n){for(var t=Object.keys(n),e=[],r=0;r<t.length;r++){var o=n[t[r]];"number"==typeof o&&e.push(o)}return e}(u),i,n)}return s&&d.push(s),d.push(m[0](function(n){Be(n,o);var t=n.startTime,n=n.duration;e(t+n+Qe)})),d.push(g[0](function(n){var t=n.fetchStart,n=n.responseEnd;i.push({start:t,end:n}),e(l()+Qe)})),d.push(function(){o.length=0,i.length=0}),[o,l]}};function rr(n,t,e){var r=(a=I(e,2))[0],o=a[1],i=Q(),u=tn(),a=(e=Z())&&e.timing&&e.timing.navigationStart||void 0,c=Ue(or,0),f=Xe(ze,n,t);if(!i||!u||!a)return c.isSupport=!1,f(c),0;function s(){return d.push({time:V()-l,score:ur(i&&i.body,1,!1,ir)})}var l=V(),d=[],e=function(){if(K()&&"requestAnimationFrame"in window)return window.requestAnimationFrame}(),n=function(){if(K()&&"cancelAnimationFrame"in window)return window.cancelAnimationFrame}(),p=I(yn(i,e,n,!0),1)[0],u=(n=I(gn(u,function(){return p(s)}),2))[0],n=n[1],v=l-(a||0);u(i,{subtree:!0,childList:!0}),t.push(n),t.push(o[0](function(){c.isSupport=!1,f(c)})),t.push(r[0](function(){Tn(window.setTimeout(function(){!function(n){void 0===n&&(n=0);var t=ar(d);c.value=t?t+n:0,f(c),d.length=0}(v)},200),t)}))}var or="fmp",ir=["SCRIPT","STYLE","META","HEAD"],ur=function(n,e,t,r){if(!n||-1<r.indexOf(n.tagName))return 0;var o=n.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(n,t){return n+ur(t,e+1,0<n,r)},0);if(o<=0&&!t){if(!l(n.getBoundingClientRect))return 0;t=n.getBoundingClientRect()||{},n=t.top,t=t.height;if(n>window.innerHeight||t<=0)return 0}return o+1+.5*e},ar=function(n){var t=I(void 0===n?[]:n),n=t[0],t=t.slice(1);return t&&t.reduce(function(n,t){var e=I(n,2),r=e[0],n=e[1],e=t.score-r.score;return[t,t.time>=r.time&&n.rate<e?{time:t.time,rate:e}:n]},[n,{time:null==n?void 0:n.time,rate:0}])[1].time||0},cr="fmp",fr={renderType:"CSR"};function sr(n,t){return~vr.indexOf(n.tagName)||mr<t}function lr(n){return{width:(n=n.getBoundingClientRect()).width,height:n.height,top:n.top}}function dr(n){return n?document.querySelector(n):document.body}function pr(e,r,n,o){if(void 0===r&&(r=0),void 0===n&&(n=0),void 0===o&&(o=1.5),!e||sr(e,r)||o<=n)return n;var t=function(){if(!r)return 0;var n=lr(e),t=n.top,n=n.height;return t>innerHeight||n<=0?0:1/(1<<r-1)}();return[].reduceRight.call(e.children,function(n,t){return pr(t,r+1,n,o)},n+t)}var vr=["SCRIPT","STYLE","META","HEAD"],hr=[Kn,Qn,Zn],mr=4,gr=[et,ot,rt,tt];function yr(n){var e=n.cb,t=n.screenshotUrl,r=n.window,o=n.document,i=n.mask,u=n.partialShot,a=n.quality,c=n.rootSelector;if(K()&&"Promise"in window&&Promise&&r&&o){if(r.html2canvas)return f(),0;n=o.createElement("script");n.src=t,null!==(t=o.head)&&void 0!==t&&t.appendChild(n),n.onload=f}function f(){var t;((t=r).requestIdleCallback||function(n){return t.setTimeout(n,1)})(function(){r.html2canvas&&r.html2canvas(u&&c&&o.querySelector(c)||o.body,{scale:360/r.innerWidth,mask:i}).then(function(n){e("data:image"===(n=n.toDataURL("image/jpeg",a)).slice(0,10)?n:br())}).catch(function(){e(br())})})}}function br(n,t){void 0===n&&(n=192),void 0===t&&(t=108);var e=document.createElement("canvas");e.width=n,e.height=t;var r=e.getContext("2d");return r&&(r.fillStyle="#ffffff",r.fillRect(0,0,n,t)),e.toDataURL("image/jpeg")}var wr=function(e,r,n,t){function o(n,t){r.forEach(function(n){return n()}),r.length=0,u&&e({ev_type:it,payload:{timestamp:u[0],score:u[1],screenshot:t,error:a,serialized_dom:function e(n,r,t){if(void 0===r&&(r=0),void 0===t&&(t=!0),!n||sr(n,r))return"";var o=q(q({},lr(n)),{id:n.getAttribute("id"),class:n.getAttribute("class")}),i=Object.keys(o).reduce(function(n,t){return n+(D(o[t])||o[t]?" "+t+'="'+o[t]+'"':"")},""),u=n.tagName.toLowerCase(),n=[].reduce.call(n.children,function(n,t){return n+e(t,r+1,!1)},"");return"<"+u+i+(t?' innerHeight="'+innerHeight+'"':"")+">"+n+"</"+u+">"}(dr(b))},overrides:{timestamp:n||u[0]}})}function i(){c&&clearTimeout(c),c=S.setTimeout(function(){f=L(function(){var n=dr(b);n&&((n=pr(n,0,0,g))<g?(u=[V(),n],O()):u=void 0)})},1e3)}var u,a,c,f,s,l,d,p=I(n,4),v=p[0],h=p[1],m=p[2],n=p[3],g=t.threshold,y=t.screenshot,b=t.rootSelector,p=t.autoDetect,w=t.ssUrl,_=t.quality,E=t.mask,x=t.partialShot,S=K(),T=Q(),L=S.requestAnimationFrame||A,R=S.cancelAnimationFrame||A,j=I(bn(performance),2)[1],k=0,C=!1,O=(l=function(){u&&!C&&(C=!0,y?yr({cb:o.bind(null,V()),screenshotUrl:w,window:S,document:T,mask:E,partialShot:x,quality:_,rootSelector:b}):o())},function(){s||(d=V(),s=S.setTimeout(function(){s=0,(d<k?i:l)()},1e4<j()?2e3:8e3))});return r.push(n[0](function(){!C&&a&&o()})),p&&r.push(v[0](function(){var n=I(gn(tn(),i),2),t=n[0],e=n[1];r.push(function(){clearTimeout(c),clearTimeout(s),R(f),e&&e()}),t(null===(t=Q())||void 0===t?void 0:t.body,{subtree:!0,childList:!0}),r.push(h()[0](function(){c&&i()})),r.push(m()[0](function(){c&&i()})),i()})),[function(n){C||~gr.indexOf(n.ev_type)||(k=V(),a=function(n,t){if(-1===hr.indexOf(t.ev_type))return n;if(t.ev_type===Qn&&t.payload.response.status<400)return n;if(n&&hr.indexOf(n.type)<hr.indexOf(t.ev_type))return n;var e="";switch(t.ev_type){case Kn:e=t.payload.error.message;break;case Qn:e=t.payload.request.url;break;case Zn:e=t.payload.url}return{type:t.ev_type,message:e,timestamp:V()}}(a=a&&1e4<k-a.timestamp?void 0:a,n))},i]},_r="blankScreen";var Er={autoDetect:!0,threshold:1.5,screenshot:!0,ssUrl:"https://apm.volccdn.com/mars-web/apmplus/web/html2canvas.min.js",mask:!1,partialShot:!0,quality:.1};var xr=["keydown","click"],Sr=["lcp",function(n,t,e){var r=I(e,2),o=r[0],e=r[1],r=en(),i=Ue("lcp",0),u=Xe(ze,n,t);if(!r)return i.isSupport=!1,void u(i);t.push(Mn(r,function(n){if(i.value=n.startTime,n.element)try{i.extra={element:xn(n.element)}}catch(n){}},"largest-contentful-paint"));function a(){u(i)}xr.forEach(function(n){window.addEventListener(n,a,!0),t.push(function(){window.removeEventListener(n,a,!0)})}),t.push(e[0](function(){i.isBounced=!0,u(i)}));function c(n){n&&(i.isSupport=!1,u(i))}t.push(function(){return o[1](c)}),o[0](c)}],Tr="first-input",Lr=["fid",function(n,t){var e=en(),r=Z(),o=Ue("fid",0),i=Xe(ze,n,t);if(!r||!e)return o.isSupport=!1,void i(o);n=function(n){var t=n.processingStart,n=n.startTime;o.value=t-n,i(o)},r=(0,I(bn(r),3)[2])(Tr)[0];r?n(r):t.push(Gn(e,n,[Tr]))}],Rr=["cls",function(n,t,e){var r,o=I(e,3),i=o[0],u=o[1],e=o[2],o=en(),a=Ue("cls",0),c=(r=n,function(n,t){r(ze(n,t))});if(!o)return a.isSupport=!1,void c(a);var f,s,n=I((f=0,s=[],[function(){f=0},function(n,t){var e,r;t.hadRecentInput||(e=s[0],r=s[s.length-1],f&&t.startTime-r<1e3&&t.startTime-e<5e3?(f+=t.value,s.push(t.startTime)):(f=t.value,s=[t.startTime]),n(f))}]),2),l=n[0],n=n[1].bind(null,function(n){n>a.value&&(a.value=n)});t.push(Mn(o,n,"layout-shift")),t.push(i[0](function(n){n&&l()})),t.push(e[0](function(n){c(a,n),l(),a=Ue("cls",0)})),t.push(u[0](function(){c(a)}))}],jr="longtask",kr=[jr,function(t,n,e){e=I(e,3)[2];n.push(e[0](function(n){t({ev_type:ot,payload:{type:"perf",longtasks:[n]}})}))}],Cr=["timing",function(n,t,e){var e=I(e,2),r=e[0],e=e[1],o=Z(),i=I(bn(o),3)[2],u=Xe(function(n){var t=o&&o.timing||void 0,e=i("navigation")[0];return{ev_type:rt,payload:{isBounced:n,timing:t,navigation_timing:e}}},n,t);t.push(e[0](function(){u(!0)}));function a(){u(!1)}t.push(function(){return r[1](a)}),r[0](a)}],Or=["mpfid",function(n,t,e){var r=I(e,3),o=r[0],e=r[2],r=en(),i=Z(),u=Ue("mpfid",0),a=[],c=Xe(ze,n,t);if(!r)return u.isSupport=!1,void c(u);t.push(e[0](function(n){a.push(n)}));function f(){var n=(0,I(bn(i),5)[4])(Ge)[0],r=n&&n.startTime||0;u.value=a.reduce(function(n,t){var e=t.duration,t=t.startTime;return n<e&&r<t?e:n},0),a.length=0,c(u)}t.push(o[0](function(){Tn(window.setTimeout(f,200),t)}))}];var qr=function(n){if(n&&E(n)&&n.name&&s(n.name)){var t={name:n.name,type:"event"};if("metrics"in n&&E(n.metrics)){var e=n.metrics,r={};for(o in e)D(e[o])&&(r[o]=e[o]);t.metrics=r}if("categories"in n&&E(n.categories)){var o,i=n.categories,u={};for(o in i)u[o]=c(i[o]);t.categories=u}return t}},Ir=function(n){if(n&&E(n)&&n.content&&s(n.content)){var t={content:c(n.content),type:"log",level:"info"};if("level"in n&&(t.level=n.level),"extra"in n&&E(n.extra)){var e,r=n.extra,o={},i={};for(e in r)D(r[e])?o[e]=r[e]:i[e]=c(r[e]);t.metrics=o,t.categories=i}return t}};function Ar(n){return(null==n?void 0:n.effectiveType)||(null==n?void 0:n.type)||""}function Dr(n,t){var e=n.common||{};return e.sample_rate=t,n.common=e,n}function Mr(n,t,e,r,o){return n?(i=o(r,t),function(){return i}):function(){return e(t)};var i}function Nr(n,t,e,r){if(void 0===(n=v(n,t,function(n,t){return n[t]})))return!1;var o,t="boolean"==typeof n?"bool":D(n)?"number":"string";return function(n,t,e){switch(e){case"eq":return x(t,n);case"neq":return!x(t,n);case"gt":return n>t[0];case"gte":return n>=t[0];case"lt":return n<t[0];case"lte":return n<=t[0];case"regex":return Boolean(n.match(new RegExp(t.join("|"))));case"not_regex":return!n.match(new RegExp(t.join("|")));default:return!1}}(n,(o=t,r.map(function(n){switch(o){case"number":return Number(n);case"boolean":return"1"===n;default:return String(n)}})),e)}function Br(t,n){try{return"rule"===n.type?Nr(t,n.field,n.op,n.values):"and"===n.type?n.children.every(function(n){return Br(t,n)}):n.children.some(function(n){return Br(t,n)})}catch(n){return ln(n),!1}}function Hr(){var e=K();return e&&e.navigator.sendBeacon?{get:function(){},post:function(n,t){e.navigator.sendBeacon(n,t)}}:{get:A,post:A}}function Pr(n,t,e){var r=t.url,o=t.data,i=t.success,u=void 0===i?A:i,a=void 0===(i=t.fail)?A:i,c=void 0===(i=t.getResponseText)?A:i,t=void 0!==(t=t.withCredentials)&&t;(e=new e).withCredentials=t,e.open(n,r,!0),e.setRequestHeader("Content-Type","application/json"),e.onload=function(){null!=c&&c(this.responseText);try{var n;this.responseText?(n=JSON.parse(this.responseText),u(n)):u({})}catch(n){a(n)}},e.onerror=function(){a(new Error("Network request failed"))},e.onabort=function(){a(new Error("Network request aborted"))},e.send(o)}var Ur=function(n){var t=rn(),e=Ar(t);t&&(t.onchange=function(){e=Ar(t)}),n.on("report",function(n){return q(q({},n),{extra:q(q({},n.extra||{}),{network_type:e})})})},Wr=function(n,t,e,r,o){if(!t)return _;var i=t.sample_rate,u=t.include_users,a=t.sample_granularity,c=t.rules,t=t.r,t=void 0===t?Math.random():t;if(x(u,n))return function(n){return Dr(n,1)};var f,s,l,d,p,v,h,m="session"===a,g=Mr(m,i,e,t,r),y=(f=c,s=m,l=i,d=e,p=t,v=r,h={},Object.keys(f).forEach(function(n){var t=f[n],e=t.enable,r=t.sample_rate,t=t.conditional_sample_rules;e?(h[n]={enable:e,sample_rate:r,effectiveSampleRate:r*l,hit:Mr(s,r,d,p,v)},t&&(h[n].conditional_hit_rules=t.map(function(n){var t=n.sample_rate,n=n.filter;return{sample_rate:t,hit:Mr(s,t,d,p,v),effectiveSampleRate:t*l,filter:n}}))):h[n]={enable:e,hit:function(){return!1},sample_rate:0,effectiveSampleRate:0}}),h);return function(n){if(!g())return m&&o[0](),!1;if(!(n.ev_type in y))return Dr(n,i);if(!y[n.ev_type].enable)return m&&o[1](n.ev_type),!1;if(null!==(t=n.common)&&void 0!==t&&t.sample_rate)return n;var t=y[n.ev_type],e=t.conditional_hit_rules;if(e)for(var r=0;r<e.length;r++)if(Br(n,e[r].filter))return!!e[r].hit()&&Dr(n,e[r].effectiveSampleRate);return t.hit()?Dr(n,t.effectiveSampleRate):(e&&e.length||!m||o[1](n.ev_type),!1)}};function Fr(e){var n,r,o,i,t,u,a,c,f,s=(o=(n=e).transport,i=e.endpoint,t=e.size,u=void 0===t?10:t,a=void 0===(n=e.wait)?1e3:n,c=[],f=0,{getSize:function(){return u},getWait:function(){return a},setSize:function(n){u=n},setWait:function(n){a=n},getEndpoint:function(){return i},setEndpoint:function(n){i=n},send:function(n){c.push(n),c.length>=u&&l.call(this),clearTimeout(f),f=setTimeout(l.bind(this),a)},flush:function(){clearTimeout(f),l.call(this)},getBatchData:function(){return c.length?p(c):""},clear:function(){clearTimeout(f),c=[]},fail:function(n){r=n}});function l(){var t;c.length&&(t=this.getBatchData(),o.post({url:i,data:t,fail:function(n){r&&r(n,t)}}),c=[])}var d=s.send;return Ln(function(){var t,n;e.transport.useBeacon?(t=Hr(),(n=s.getBatchData())&&(t.post(s.getEndpoint(),n),s.clear()),s.send=function(n){t.post(s.getEndpoint(),p([n]))},Rn(function(){s.send=d})):s.flush()}),s}var Xr="2.7.3-alpha.1",zr="APM_PLUS_WEB",Gr="/settings/get/webpro",Jr="/monitor_web/collect",Yr=[Jr,Gr,"/monitor_browser/collect"],$r="session",Vr={sample_rate:1,include_users:[],sample_granularity:$r,rules:{}},Kr=20;function Qr(n,t){return n.plugins.filter(function(n){return n.name===t&&n.version===Xr})[0]}function Zr(n,t,e){(e=void 0===e?mn(K()):e)&&e.plugins&&(Qr(e,n)||e.plugins.push({name:n,version:Xr,apply:t}))}function no(r){r.provide("reloadPlugin",function(n,t){var e;r.destroyAgent.has(n)&&r.destroyAgent.remove(n),void 0!==t&&r.set({plugins:q(q({},r.config().plugins),((e={})[n]=t,e))}),r.config().plugins[n]&&function(n,t,e){void 0===e&&(e=mn(K()));if(e){e=Qr(e,t);if(e)try{if(n.destroyAgent.has(t))return;e.apply(n)}catch(n){T("[loader].applyPlugin failed",t,n)}else T("[loader].applyPlugin not found",t)}}(r,n)})}var to={build:function(n){return{ev_type:n.ev_type,payload:n.payload,common:q(q({},n.extra||{}),n.overrides||{})}}};function eo(n){var t,e=n.plugins||{};for(t in e)e[t]&&!E(e[t])&&(e[t]={});return q(q({},n),{plugins:e})}function ro(n){return E(n)&&"aid"in n}function oo(n){return q({},n)}function io(){var n=K(),t=Q();if(n&&t)return(null===(t=null===(t=null===(t=function(){if(!document)return null;if(document.currentScript)return document.currentScript;try{throw new Error}catch(n){var t=0,e=/at\s+(.*)\s+\((.*):(\d*):(\d*)\)/i.exec(n.stack),r=e&&e[2]||!1,o=e&&e[3]||0,i=document.location.href.replace(document.location.hash,""),u="",a=document.getElementsByTagName("script");for(r===i&&(e=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(o-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),u=e.replace(o,"$1").trim());t<a.length;t++){if("interactive"===a[t].readyState)return a[t];if(a[t].src===r)return a[t];if(r===i&&a[t].innerHTML&&a[t].innerHTML.trim()===u)return a[t]}return null}}())||void 0===t?void 0:t.getAttribute("src"))||void 0===t?void 0:t.match(/globalName=(.+)$/))||void 0===t?void 0:t[1])||zr}function uo(n){return"APMPLUS"+n}function ao(n,t){void 0===n&&(n=0);var e={userId:M(),deviceId:M(),r:Math.random()};return t<=0?e:(function(n,t){try{var e=localStorage.getItem(n);if(!e||!jn()||"{"!==e[0])return;qn(n,JSON.parse(e),t)}catch(n){}}(n=uo(n),t),On(n)||e)}var co=function(n,t){return void 0===t&&(t=Jr),(n&&0<=n.indexOf("//")?"":"https://")+n+t},fo=M,so=function(t){var o,i,u,a=t,c={},f=A,e=A;return{getConfig:function(){return a},setConfig:function(n){var t,e,r;return c=q(q({},c),n||{}),s(),o||(o=n,a.useLocalConfig?(u={},f()):i?l():(t=a.transport,e=a.domain,n=a.aid,r=function(n){i=n,l()},t.get({withCredentials:!0,url:function(n,t){return void 0===t&&(t=Gr),(n&&0<=n.indexOf("//")?"":"https://")+n+t}(e)+"?aid="+n,success:function(n){r(n.data||{})},fail:function(){r({sample:{sample_rate:.001}})}}))),a},onChange:function(n){e=n},onReady:function(n){f=function(){!function(){t.userId!==a.userId&&(t.sample.r=Math.random(),s());!function(n){var t=n.aid,e=n.userId,r=n.deviceId,o=n.sample,n=n.storageExpires,t=uo(t);qn(t,{userId:e,deviceId:r,r:o.r},In(n))}(a)}(),n()},u&&f()}};function s(){var n=q(q(q({},t),u||{}),c);n.plugins=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e={},r=0;r<n.length;)e=d(e,n[r++]);return e}(t.plugins,(null==u?void 0:u.plugins)||{},c.plugins||{}),n.sample=lo(lo(t.sample,null==u?void 0:u.sample),c.sample),a=n,e()}function l(){u=function(n){if(!n)return{};var t=n.sample,e=n.timestamp,r=n.status,o=n.apdex;if(!t)return{};var i=t.sample_rate,u=t.sample_granularity,n=t.include_users,t=t.rules;return{sample:{include_users:n,sample_rate:r&&4===r?0:i,sample_granularity:void 0===u?$r:u,rules:(void 0===t?[]:t).reduce(function(n,t){var e=t.name,r=t.enable,o=t.sample_rate,t=t.conditional_sample_rules;return n[e]={enable:r,sample_rate:o,conditional_sample_rules:t},n},{})},apdex:o,serverTimestamp:e}}(i),s(),f()}};function lo(r,o){if(!r||!o)return r||o;var n=q(q({},r),o);return n.include_users=b(b([],I(r.include_users||[]),!1),I(o.include_users||[]),!1),n.rules=b(b([],I(Object.keys(r.rules||{})),!1),I(Object.keys(o.rules||{})),!1).reduce(function(n,t){var e;return t in n||(t in(r.rules||{})&&t in(o.rules||{})?(n[t]=q(q({},r.rules[t]),o.rules[t]),n[t].conditional_sample_rules=b(b([],I(r.rules[t].conditional_sample_rules||[]),!1),I(o.rules[t].conditional_sample_rules||[]),!1)):n[t]=(null===(e=r.rules)||void 0===e?void 0:e[t])||(null===(e=o.rules)||void 0===e?void 0:e[t])),n},{}),n}function po(n){var t=(e=void 0===n?{}:n).createSender,n=e.builder,e=e.createDefaultConfig,r=function(n){var e,r,t=n.builder,o=n.createSender,i=n.createDefaultConfig,u=n.createConfigManager,a=n.userConfigNormalizer,c=n.initConfigNormalizer,f=n.validateInitConfig,s={};w.forEach(function(n){return s[n]=[]});var l=!1,d=!1,p=!1,v=[],h=[],m=U(),g={getBuilder:function(){return t},getSender:function(){return e},getPreStartQueue:function(){return v},init:function(n){if(l)T("already inited");else{if(!(n&&E(n)&&f(n)))throw new Error("invalid InitConfig, init failed");var t=i(n);if(!t)throw new Error("defaultConfig missing");n=c(n);if((r=u(t)).setConfig(n),r.onChange(function(){y("config")}),!(e=o(r.getConfig())))throw new Error("sender missing");y("init",l=!0)}},set:function(n){l&&n&&E(n)&&(y("beforeConfig",!1,n),null!=r&&r.setConfig(n))},config:function(n){if(l)return n&&E(n)&&(y("beforeConfig",!1,n),null!=r&&r.setConfig(a(n))),null==r?void 0:r.getConfig()},provide:function(n,t){x(h,n)?T("cannot provide "+n+", reserved"):(g[n]=t,y("provide",!1,n))},start:function(){var t=this;l&&(d||null!=r&&r.onReady(function(){y("start",d=!0),v.forEach(function(n){return t.build(n)}),v.length=0}))},report:function(n){n&&(!(n=L(s.beforeReport)(n))||(n=L(s.report)(n))&&(d?this.build(n):v.push(n)))},build:function(n){!d||(n=L(s.beforeBuild)(n))&&(!(n=t.build(n))||(n=L(s.build)(n))&&this.send(n))},send:function(n){!d||(n=L(s.beforeSend)(n))&&(e.send(n),y("send",!1,n))},destroy:function(){m.clear(),p=!0,y("beforeDestroy",!(v.length=0))},on:function(n,t){if("init"===n&&l||"start"===n&&d||"beforeDestroy"===n&&p)try{t()}catch(n){}else s[n]&&s[n].push(t)},off:function(n,t){s[n]&&(s[n]=S(s[n],t))},destroyAgent:m},h=Object.keys(g);return g;function y(n,t){void 0===t&&(t=!1);for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];s[n].forEach(function(n){try{n.apply(void 0,b([],I(e),!1))}catch(n){}}),t&&(s[n].length=0)}}({validateInitConfig:ro,initConfigNormalizer:eo,userConfigNormalizer:oo,createSender:void 0===t?function(n){return Fr({size:Kr,endpoint:co(n.domain),transport:n.transport})}:t,builder:void 0===n?to:n,createDefaultConfig:void 0===e?To:e,createConfigManager:so});F(r);var o,i,u,e=mn(K());return o=r,e=e&&e.subject,i=e||{},u={},o.provide("setFilter",function(n,t){u[n]||(u[n]=[]),u[n].push(t)}),o.provide("initSubject",function(n){var t=I(n,2),e=t[0],n=t[1],t=G(e),t=!!t&&u[t];return i[e]||(i[e]=P(n,function(){i[e]=void 0})),t?$(o,[e,B(i[e],t)]):i[e]}),o.provide("getSubject",function(n){return i[n]}),o.provide("privateSubject",{}),Eo(r),xo(r),ho(r),Ur(r),So(r),z(e=X(r,wn,function(n,t,e){return _n(n,t)(function(){var n=I(e),t=n[0],n=n.slice(1);r[t].apply(r,b([],I(n),!1))})}),Zr),e}function vo(n){var e,i,t,r,u,o,a=po(n=void 0===n?{}:n);return(e=a).on("start",function(){var n=e.config(),t=n.userId,n=n.sample,n=Wr(t,n,k,C,[function(){e.destroy()},function(n){e.destroyAgent.removeByEvType(n)}]);e.on("build",n)}),i=a,r=go(t=void 0===t?mo:t),n=yo(t),u=bo(i,r,t),null!==(t=i.p)&&void 0!==t&&t.a&&"observe"in i.p.a&&i.p.a.observe(function(n){var t=I(n,5);t[0];var e=t[1],r=t[2],o=t[3],n=t[4],t=i.config();_o(t,e)&&u(e,r,o,n)}),i.on("init",function(){var n,o=i.config();null!==(n=i.p)&&void 0!==n&&n.a.forEach(function(n){var t=I(n,5);t[0];var e=t[1],r=t[2],n=t[3],t=t[4];_o(o,e)&&u(e,r,n,t)}),i.p&&i.p.a&&(i.p.a.length=0),i.provide("precollect",function(n,t,e,r){void 0===e&&(e=V()),void 0===r&&(r=location.href),_o(o,n)&&u(n,t,e,r)})}),i.on("provide",wo(i,r,n)),(o=a).provide("sendEvent",function(n){n=qr(n);n&&o.report({ev_type:tt,payload:n,extra:{timestamp:V()}})}),o.provide("sendLog",function(n){n=Ir(n);n&&o.report({ev_type:tt,payload:n,extra:{timestamp:V()}})}),Object.keys(Lo).forEach(function(n){Zr(n,Lo[n]),Lo[n](a)}),no(a),a.provide("create",vo),a}var ho=function(r){r.on("report",function(n){return t=n,e=r.config(),e=void 0===(e=(n=e||{}).pid)?"":e,n=void 0===(n=n.viewId)?"":n,n={url:an(),timestamp:Date.now(),pid:e,view_id:n},q(q({},t),{extra:q(q({},n),t.extra||{})});var t,e})},mo={sri:"reportSri",st:"reportResourceError",err:"captureException",reject:"captureException"},go=function(n){return Object.keys(n).reduce(function(n,t){return n[t]=[],n},{})},yo=function(e){return Object.keys(e).reduce(function(n,t){return n[e[t]]?n[e[t]].push(t):n[e[t]]=[t],n},{})},bo=function(o,i,u){return function(n,t,e,r){void 0===e&&(e=V()),void 0===r&&(r=location.href);r=q(q({},wn(o)),{url:r,timestamp:e});i[n]&&(o[u[n]]?_n(o,r)(function(){o[u[n]](t)}):null!==(e=i[n])&&void 0!==e&&e.push([t,r]))}},wo=function(r,o,n){return function(e){e in n&&n[e].forEach(function(n){var t;null!==(t=o[n])&&void 0!==t&&t.forEach(function(n){var n=I(n,2),t=n[0],n=n[1];_n(r,n)(function(){r[e](t)})}),o[n]=null})}},_o=function(n,t){return"err"===t?!1!==v(n,"plugins."+Zt+".onerror",function(n,t){return n[t]}):"reject"!==t||!1!==v(n,"plugins."+Zt+".onunhandledrejection",function(n,t){return n[t]})},Eo=function(e){var r,o=!1;e.on("init",function(){r=(new Date).getTime(),e.on("config",function(){var n,t=null===(n=e.config())||void 0===n?void 0:n.serverTimestamp;isNaN(t)||Number(t)<=0||o||(o=!0,(n=(new Date).getTime())-r<700&&t&&(n=t-(n+r)/2,!isNaN(n)&&(0<n||n<-6e5)&&e.set({offset:n})))})})},xo=function(r){r.on("beforeBuild",function(n){return t=n,e=r.config(),(n={}).aid=e.aid,n.user_id=e.userId,q(q({},t),{extra:q(q({},n),t.extra||{})});var t,e})},So=function(c){c.on("start",function(){var e,n=c.config(),t=n.deviceId,r=n.sessionId,o=n.release,i=n.env,u=n.offset,a=n.aid,n=n.token,a={did:t,sid:r,release:o,env:i,sname:zr,sversion:Xr,soffset:u||0,biz_id:a,x_auth_token:n},n=c.getSender();n.setEndpoint(n.getEndpoint()+(E(e=a)?Object.keys(e).reduce(function(n,t){return n+="&"+t+"="+e[t]},"").replace("&","?"):""))})},To=function(n){var t,e=In(n.storageExpires),n=ao(n.aid,e);return{aid:0,pid:"",token:"",viewId:re("_"),userId:n.userId,deviceId:n.deviceId,sessionId:fo(),storageExpires:e,domain:"apmplus.volces.com",plugins:{ajax:{ignoreUrls:Yr},fetch:{ignoreUrls:Yr},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1},release:"",env:"production",sample:q(q({},Vr),{r:n.r}),transport:(t=nn())?{useBeacon:!0,get:function(n){Pr("GET",n,t)},post:function(n){Pr("POST",n,t)}}:{get:A,post:A}}},Lo=((ko={})[Se]=function(b){b.on("init",function(){var n,t,e,r,o,i,u,a,c,f,s,l,d,p,v,h,m,g,y=ht(b,Se,Te);y&&location&&(l=y.routeMode,n=y.apdex,c=b.report.bind(b),r=A,n&&(p=[],a=(f=I(function(r,t,n,e){var o=I(n,2),i=o[0],u=o[1],a=2===e.apdex,c=void 0,f=void 0,s=void 0,l=!1,d=I(Ee(),4),p=d[0],v=d[1],h=d[2],m=d[3],n=I(Ee(),4),o=n[0],e=n[1],g=n[2],y=n[3],d=I(xe(),5),b=d[0],w=d[1],_=d[2],E=d[3],x=d[4],n=I(we(),2),d=n[0],S=n[1];t.push(i[0](d)),a||t.push(u[0](function(){var n,t,e;l&&(n=(e=I(g(),2))[0],t=e[1],e=be(n,s),b([e,n,t],R()),r({ev_type:Vn,payload:x()}),y())}));var T=_e(p,v),L=_e(o,e),R=function(){var n=I(h(),2),t=n[0],n=n[1];return{start:c[0],pid:c[1],view_id:c[2],end:V(),time_spent:S(),apdex:t,rank:be(t,s),detail:n}};return t.push(function(){l=!1}),[function(n,t){if(!c)return c=[V(),n,t],E(n),void(l=!(!s||!c));l&&(f=R(),w(f,n)),c=[V(),n,t],m()},function(n){l&&(a||(L(n,s),n.ev_type===ut&&_()),n.common.pid===c[1]&&T(n,s))},function(n){l&&(n.payload.last=f),r(n)},function(n){if(!n)return t.forEach(function(n){return n()}),void(t.length=0);l=!(!(s=n)||!c)}]}(b.report.bind(b),p,[Y(b,oe),Y(b,ue)],y),4))[0],t=f[1],o=f[2],e=f[3],c=o,r=a,b.on("send",t),p.push(function(){return b.off("send",t)}),b.on("start",function(){e(b.config().apdex)}),W(b,Se,Vn,p)),i=I((f=c,u=o=[],a=he(l)?[]:[b.initSubject(ce),b.initSubject(fe)],c=q(q({},y),{initPid:null===(p=b.config())||void 0===p?void 0:p.pid,onPidUpdate:function(n){var t=re(n);r(n,t),b.set({pid:n,viewId:t,actionId:void 0})}}),l=c.sendInit,y=c.initPid,d=c.routeMode,p=c.extractPid,c=c.onPidUpdate,v=he(d)?function(){return""}:se(d),h=p||function(){},c=I(de(ve(f),y||(f=location.href,null!==(y=h(f))&&void 0!==y?y:v(f)),v(location.href),c),2),m=c[0],c=c[1],he(d)||(s=I(pe(function(n,t){return m(n,v(t),h(t))},""),1)[0],a.length&&a.forEach(function(n){return u.push(n[0](function(n){return s(d,n)}))})),l&&c(),[m.bind(null,"user_set")]),1)[0],$(b,[hn,sn(b)],-1),g=function(){i(b.config().pid)},b.on("config",g),o.push(function(){return b.off("config",g)}),W(b,Se,$n,o),b.provide("sendPageview",i))})},ko[mt]=function(o){o.on("init",function(){var n,t,a,e,c,f,s,l,d,r=ht(o,mt,gt);r&&(n=[],(e=q(q({},r),{setContextAtReq:function(){return cn(o,!0)},setTraceHeader:Nn(r.trace,"app_id="+(null===(t=o.config())||void 0===t?void 0:t.aid)+",origin=web")})).autoWrap&&(r=n,t=[Y(o,["xhr_0",An(XMLHttpRequest&&XMLHttpRequest.prototype)]),function(){return Y(o,Yn)}],a=e,e=I(t,2),t=e[0],c=e[1],f=a.setTraceHeader,s=a.ignoreUrls,l=a.setContextAtReq,d=a.extractUrl,r.push(t[0](function(n){var t=I(n,4);t[0];n=t[1];t[2];var e=t[3];if(!n)return A;var r=on(n);if(g(s,r))return A;f&&f(r,function(n,t){return e.setRequestHeader(n,t)});var o=l(),i=void 0,u=c()[0](function(n){r!==n.name||i||(i=n)});return function(n){var t=vt(n,a);setTimeout(function(){i&&(t.response.timing=i),pt(t,d),o&&o({ev_type:Qn,payload:t}),u()},100)}}))),W(o,mt,Qn,n))})},ko[Mt]=function(o){o.on("init",function(){var n,t,f,e,s,l,d,p,v,h,m,r=ht(o,Mt,Nt);r&&(n=[],(e=q(q({},r),{setContextAtReq:function(){return cn(o,!0)},setTraceHeader:Nn(r.trace,"app_id="+(null===(t=o.config())||void 0===t?void 0:t.aid)+",origin=web")})).autoWrap&&(r=n,t=[Y(o,Wn),function(){return Y(o,Yn)}],f=e,e=I(t,2),t=e[0],s=e[1],l=f.setTraceHeader,d=f.ignoreUrls,p=f.setContextAtReq,v=f.extractUrl,h=window.Headers,(m=window.Request)&&h&&r.push(t[0](function(n){var n=I(n,2),r=n[0],o=n[1],t=on(r instanceof m?r.url:r);if(!It(t)||g(d,t))return A;l&&l(t,function(n,t){return At(n,t,r,o,m,h)});var i=p(),u=V(),a=void 0,c=s()[0](function(n){t!==n.name||a||(a=n)});return function(n){var t=Dt(r,o,n,m,h,f,u),e=dt(function(n){a&&(n.response.timing=a),pt(n,v),i&&i({ev_type:Qn,payload:n}),c()});setTimeout(function(){e(t)},1e3)}}))),W(o,Mt,Qn,n))})},ko.tti=function(t){t.on("init",function(){var n;ht(t,"tti",{})&&(n=[],He(cn(t),n,[Y(t,["xhr_0",An(XMLHttpRequest&&XMLHttpRequest.prototype)]),Y(t,Wn),Y(t,Jn),Y(t,Yn),$(t,[vn,fn(t)])],t.pp),W(t,"tti",et,n))})},ko.fmp=function(r){r.on("init",function(){var n,t,e=ht(r,cr,fr);e&&(n=[],t=Y(r,ie),"SSR"===e.renderType?Me(Je,cr,cn(r),n,[Y(r,oe),Y(r,ue)]):rr(cn(r),n,[t,$(r,[vn,fn(r)])]),W(r,cr,et,n))})},ko[Rt]=function(d){d.on("init",function(){var n,t,e,r,o,i,u,a,c,f,s,l=ht(d,Rt,jt);l&&(f=(l=I((e=n=[],r=[Y(d,wt),Y(d,Et)],o=l,i=I(r,2),u=i[0],a=i[1],c=o.maxBreadcrumbs,f=o.onAddBreadcrumb,l=o.onMaxBreadcrumbs,r=o.dom,i=I(Tt(100),2),o=i[0],i=i[1],f=I(Lt(c,f,l),2),l=f[0],f=f[1],r&&(r=xt(f),e.push(u[0](o(yt,St(r,bt)))),e.push(a[0](i(St(r,bt))))),[l,f]),2))[0],t=l[1],d.on("report",s=function(n){return n.ev_type===Qn&&t({type:Qn,category:n.payload.api,message:"",data:{method:n.payload.request.method,url:n.payload.request.url,status_code:String(n.payload.response.status)},timestamp:n.payload.request.timestamp}),n}),n.push(function(){d.off("report",s)}),W(d,Rt,Kn,n),d.provide("getBreadcrumbs",f),d.provide("addBreadcrumb",t))})},ko[Zt]=function(e){e.on("init",function(){window.removeEventListener("error",e.pcErr,!0),window.removeEventListener("unhandledrejection",e.pcRej,!0);var n,t=ht(e,Zt,ne);t&&(t=Pt(function(n){e.getBreadcrumbs&&(n.payload.breadcrumbs=e.getBreadcrumbs()),e.report(n)},n=[],[Y(e,Vt),Y(e,Kt),function(){return Y(e,$t)}],t),W(e,Zt,Kn,n),e.provide("captureException",t))})},ko[We]=function(l){l.on("init",function(){var n=l.pp||Fe;null!==(c=n.observer)&&void 0!==c&&c.disconnect();var t,e,r,o,i,u,a,c,f,s=ht(l,We,{});s&&(t=Y(l,oe),e=Y(l,ue),r=Y(l,ie),o=Y(l,Jn),i=void 0,$(l,[hn,sn(l)],-1)[0](function(n){i=n})(),u=function(n){n=n.ev_type===et&&n.payload.name===Rr[0]||n.ev_type===ot?n:q(q({},n),{overrides:i});l.report(n)},a=$(l,[vn,fn(l)]),[$e,Ve,Sr,Lr,Rr].forEach(function(n){!1!==s[n[0]]&&(n[1](u,n=[],[t,e,a]),W(l,We,et,n))}),[kr,Cr,Or].forEach(function(n){var t;!1!==s[n[0]]&&(n[1](u,t=[],[r,e,o]),n=n[0]===jr?ot:"timing"===n[0]?rt:et,W(l,We,n,t))}),c=(f=I(De(l.report.bind(l)),2))[0],f=f[1],l.provide("performanceInit",c),l.provide("performanceSend",f),n.entries.length=0,l.provide("sendCustomPerfMetric",function(n){n=q(q(q({},Pe),n),{isCustom:!0});l.report(ze(n))}))})},ko[Ie]=function(e){e.on("init",function(){var n,t=ht(e,Ie,Ae);t&&(n=[],t=function(e,n,t,r){var o=I(t,1)[0],i=K();if(i){var u=r.ignoreUrls,t=r.includeUrls,a=r.dedupe,c=r.gatherPath,f=h(t),s=h(u),l=I(bn(Z()),5)[4],d=void 0,p=function(n){var t=location&&location.href;t&&n.url===t||f&&!f.test(n.url)||s&&s.test(n.url)||n.url&&(a&&n.url===d||(d=n.url,(n=qe(n,l))&&e({ev_type:Zn,payload:n})))};return n.push(o[0](function(n){n=n||i.event;!n||(n=Oe(n,c))&&p(n)})),p}}(e.report.bind(e),n,[Y(e,Vt)],t),W(e,Ie,Zn,n),t&&e.provide("reportResourceError",t))})},ko[je]=function(d){d.on("init",function(){var n,e,r,t,o,i,u,a,c,f,s,l=ht(d,je,ke);l&&(n=[],e=d.report.bind(d),r=n,t=[Y(d,ie),function(){return Y(d,Yn)}],o=l,l=I(t,2),t=l[0],f=l[1],(s=Z())&&(l=o.ignoreUrls,i=o.slowSessionThreshold,u=o.ignoreTypes,a=h(l),c=function(n,t){void 0===t&&(t=!1),x(u||Re,n.initiatorType)||a&&a.test(n.name)||(n={ev_type:nt,payload:n},t&&(n.extra={sample_rate:1}),e(n))},r.push(t[0](function(){var n=I(bn(s),3),t=n[0],n=n[2],e=function(){if(!t)return!1;var n=t.loadEventEnd-t.navigationStart;return i<n}();n(Le).forEach(function(n){return c(n,e)}),r.push(f()[0](function(n){c(n)}))}))),W(d,je,nt,n))})},ko[_r]=function(n,t){var o,i,u;i=Er,u=t,(o=n).on("init",function(){var t,n,e=Q(),r=K();e&&r&&((e=ht(o,_r,i)||Cn(u,i))&&(r=[],e=I(wr(o.report.bind(o),r,[Y(o,ae),function(){return Y(o,Jn)},function(){return Y(o,Yn)},Y(o,ue)],e),2),t=e[0],e=e[1],o.on("report",n=function(n){return t(n),n}),r.push(function(){o.off("report",n)}),W(o,_r,it,r),o.provide("detectBlankScreen",e)))})},ko),Ro=vo(),jo=function(){var n=K(),t=io();if(n&&t)return n[t]}();jo&&["p","pp","pcErr","pcRej"].forEach(function(n){Ro.provide(n,jo[n])});var ko,Co,Oo,qo,Io=K(),Ao=io();Io&&Ao&&(ko=(null==(ko=Io[Ao])?void 0:ko.q)||[],Io[Ao]=Ro,ko.forEach(function(n){var t,e;e=n,n=q(q({},wn(t=Ro)),{url:e.pop(),timestamp:e.pop()}),_n(t,n)(function(){t.apply(void 0,b([],I(e),!1))})}),ko.length=0,Ro.p&&("observe"in Ro.p.a&&console.warn("global precollect queue already updated"),Ro.p.a=(Oo=Ro.p.a,qo=[],Oo.observe=function(n){qo.push(n)},Oo.push=function(){for(var n,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach(function(t){qo.forEach(function(n){return n(t)})}),(n=[].push).call.apply(n,b([Oo],I(t),!1))},Oo),(Co=Ro.precollect)&&Ro.provide("precollect",function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return Ro.p.a.push(b(["precollect"],I(n),!1)),Co.apply(void 0,b([],I(n),!1))})))}();
!function(){"use strict";var u,q=function(){return(q=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)};function I(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var r,o,i=e.call(n),u=[];try{for(;(void 0===t||0<t--)&&!(r=i.next()).done;)u.push(r.value)}catch(n){o={error:n}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return u}function b(n,t,e){if(e||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||((r=r||Array.prototype.slice.call(t,0,o))[o]=t[o]);return n.concat(r||Array.prototype.slice.call(t))}"undefined"==typeof Element||Element.prototype.addEventListener||(u=[],Ao=function(n,t){for(var e=0;e<u.length;){var r=u[e];if(r.object===this&&r.type===n&&r.listener===t){"DOMContentLoaded"===n?this.detachEvent("onreadystatechange",r.wrapper):this.detachEvent("on"+n,r.wrapper),u.splice(e,1);break}++e}},Element.prototype.addEventListener=Io=function(n,t){function e(n){n.target=n.srcElement,n.currentTarget=i,void 0!==t.handleEvent?t.handleEvent(n):t.call(i,n)}var r,o,i=this;"DOMContentLoaded"===n?(r=function(n){"complete"===document.readyState&&e(n)},document.attachEvent("onreadystatechange",r),u.push({object:this,type:n,listener:t,wrapper:r}),"complete"===document.readyState&&((o=new window.Event).srcElement=window,r(o))):(this.attachEvent("on"+n,e),u.push({object:this,type:n,listener:t,wrapper:e}))},Element.prototype.removeEventListener=Ao,HTMLDocument&&!HTMLDocument.prototype.addEventListener&&(HTMLDocument.prototype.addEventListener=Io,HTMLDocument.prototype.removeEventListener=Ao),Window&&!Window.prototype.addEventListener&&(Window.prototype.addEventListener=Io,Window.prototype.removeEventListener=Ao));function p(n){return JSON.stringify({ev_type:"batch",list:n})}var w=["init","start","config","beforeDestroy","provide","beforeReport","report","beforeBuild","build","beforeSend","send","beforeConfig"],A=function(){return{}};function _(n){return n}function E(n){return"object"==typeof n&&null!==n}var t=Object.prototype;function i(n){if(E(n)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===t.toString.call(n);n=Object.getPrototypeOf(n);return n===t||null===n}}function a(n){return"[object Array]"===t.toString.call(n)}function l(n){return"function"==typeof n}function D(n){return"number"==typeof n}function s(n){return"string"==typeof n}function e(n){return"undefined"!=typeof Event&&function(n,t){try{return n instanceof t}catch(n){return}}(n,Event)}function d(n,t){var e,r,o=q({},n);for(e in t)r=e,Object.prototype.hasOwnProperty.call(t,r)&&void 0!==t[e]&&(E(t[e])&&i(t[e])?o[e]=d(E(n[e])?n[e]:{},t[e]):a(t[e])&&a(n[e])?o[e]=function t(n,e){n=a(n)?n:[];e=a(e)?e:[];return Array.prototype.concat.call(n,e).map(function(n){return n instanceof RegExp?n:E(n)&&i(n)?d({},n):a(n)?t([],n):n})}(n[e],t[e]):o[e]=t[e]);return o}function x(n,t){if(!a(n))return!1;if(0===n.length)return!1;for(var e=0;e<n.length;){if(n[e]===t)return!0;e++}return!1}function S(n,t){if(!a(n))return n;var e=n.indexOf(t);if(0<=e){t=n.slice();return t.splice(e,1),t}return n}function v(n,t,e){for(var r,o=(t=I(t.split(".")))[0],i=t.slice(1);n&&0<i.length;)n=n[o],o=(r=I(i))[0],i=r.slice(1);if(n)return e(n,o)}var r=function(e,n){return e&&E(e)?n.reduce(function(n,t){return n[t]=e[t],n},{}):e};function h(n){return a(n)&&n.length?function(n){for(var t=[],e=n.length,r=0;r<e;r++){var o=n[r];s(o)?t.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&t.push(o.source)}return new RegExp(t.join("|"),"i")}(n):null}var g=function(n,t){n=h(n||[]);return!!n&&n.test(t)};function c(n){try{return s(n)?n:JSON.stringify(n)}catch(n){return"[FAILED_TO_STRINGIFY]:"+String(n)}}function m(i,u,a,c){return void 0===c&&(c=!0),function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(!i)return A;var e=i[u],r=a.apply(void 0,b([e],I(n),!1)),o=r;return l(o)&&c&&(o=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return r.apply(this,t)}catch(n){return l(e)&&e.apply(this,t)}}),i[u]=o,function(n){n||(o===i[u]?i[u]=e:r=e)}}}function T(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];console.warn.apply(console,b(["[SDK]",Date.now(),o(""+j++)],I(n),!1))}function L(r){return function(n){for(var t=n,e=0;e<r.length&&t;e++)try{t=r[e](t)}catch(n){R(n)}return t}}var f=function(i,u,a){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(!i)return A;var e=i[u],r=a.apply(void 0,b([e],I(n),!1)),o=r;return l(o)&&(o=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r.apply(this,n)}),i[u]=o,function(){o===i[u]?i[u]=e:r=e}}},o="".padStart?function(n,t){return n.padStart(t=void 0===t?8:t," ")}:function(n){return n},y=0,R=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];console.error.apply(console,b(["[SDK]",Date.now(),o(""+y++)],I(n),!1))},j=0,k=function(n){return Math.random()<Number(n)},C=function(n,t){return n<Number(t)},O=function(r){return function(n){for(var t=!0,e=0;e<r.length&&t;e++)try{t=r[e](n)}catch(n){R(n)}return t}};function M(){var n=function(){for(var n=new Array(16),t=0,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(n){for(var t=[],e=0;e<256;++e)t[e]=(e+256).toString(16).substr(1);var r=0,o=t;return[o[n[r++]],o[n[r++]],o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],o[n[r++]],o[n[r++]],o[n[+r]],o[n[15]]].join("")}(n)}function N(r,n){var t=[];try{t=n.reduce(function(n,t){try{var e=t(r);"function"==typeof e&&n.push(e)}catch(n){}return n},[])}catch(n){}return function(n){return N(n,t)}}function B(n,r){var o=I(n,1)[0];return function(t,n){var e=o(function(n){return O(r)(n)?t(n):A});n(function(){e()})}}var H=function(n){function t(n){a=S(a,n),f||s()}var e,r,o,i,u,a=[],c=[],f=!1,s=(r=function(){return a.length},o=function(){f=!0,e&&e[0](),c.forEach(function(n){return n()}),c.length=0,e=void 0},-1===(i=n=void(u=0)===n?3e5:n)?A:function(){if(r())return u&&clearTimeout(u),void(u=0);0===u&&(u=setTimeout(o,i))});return{next:function(n){return N(n,a)},complete:function(n){c.push(n)},attach:function(n,t){e=[n,t]},subscribe:function(n){if(f)throw new Error("Observer is closed");return a.push(n),e&&e[1]&&e[1](n),s(),function(){return t(n)}},unsubscribe:t}},P=function(n,t,e){e=H(e);try{n(e.next,e.attach),t&&e.complete(t)}catch(n){}return[e.subscribe,e.unsubscribe]};function U(){function r(n){n.length&&n.forEach(function(n){try{n()}catch(n){}}),n.length=0}function t(n){i[n]&&i[n].forEach(function(n){r(n[1])}),i[n]=void 0}var o=!1,i={};return{set:function(n,t,e){i[n]?i[n].push([t,e]):i[n]=[[t,e]],o&&r(e)},has:function(n){return!!i[n]},remove:t,removeByEvType:function(t){Object.keys(i).forEach(function(n){i[n]&&i[n].forEach(function(n){n[0]===t&&r(n[1])})})},clear:function(){o=!0,Object.keys(i).forEach(function(n){t(n)})}}}var W=function(n,t,e,r){return n.destroyAgent.set(t,e,r)};var F=function(n){var e,r,o,t=(e={},r={},o={set:function(n,t){return e[n]=t,r[n]=c(t),o},merge:function(t){return e=q(q({},e),t),Object.keys(t).forEach(function(n){r[n]=c(t[n])}),o},delete:function(n){return delete e[n],delete r[n],o},clear:function(){return e={},r={},o},get:function(n){return r[n]},toString:function(){return q({},r)}});n.provide("context",t),n.on("report",function(n){return n.extra||(n.extra={}),n.extra.context=t.toString(),n})},X=function(a,c,e){function f(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=n[0];if(e){var r=e.split(".")[0];if(r in f)return i=f,u=e,o=[].slice.call(n,1),v(i,u,function(n,t){if(n&&t in n&&l(n[t]))try{return n[t].apply(n,o)}catch(n){return}});var o,i=s[r]||[],u=null!==(u=null==c?void 0:c(a))&&void 0!==u?u:{};i.push(b([u],I(n),!1)),void(s[r]=i)}}var n,s={};for(n in m(a,"provide",function(e){return function(n,t){f[n]=t,e.call(a,n,t)}})(),a)Object.prototype.hasOwnProperty.call(a,n)&&(f[n]=a[n]);return a.on("provide",function(n){s[n]&&(s[n].forEach(function(n){var t=I(n),n=t[0],t=t.slice(1);null!=e&&e(a,n,t)}),s[n]=null)}),f};function z(r,o){r.on("init",function(){function n(n){n.forEach(function(n){var t=n.name;x(e,t)||(e.push(t),n.setup(r),o&&o(t,n.setup),r.destroyAgent.set(t,t,[function(){e=S(e,t),n.tearDown&&n.tearDown()}]))})}var e=[];r.provide("applyIntegrations",n);var t=r.config();t&&t.integrations&&n(t.integrations)})}function G(n){return n.split(J)[0]}var J="_";function Y(n,t){return n.initSubject(t)}function $(n,t,e){var t=I(t,2),r=t[0],t=t[1],o=n.privateSubject||{};return o[r]||(o[r]=P(t,function(){o[r]=void 0},e)),o[r]}var V=function(){return Date.now()};function K(){if("object"==typeof window&&E(window))return window}function Q(){if("object"==typeof document&&E(document))return document}function Z(){if(K()&&E(window.performance))return window.performance}function nn(){if("function"==typeof XMLHttpRequest&&l(XMLHttpRequest))return XMLHttpRequest}function tn(){if(K()&&l(window.MutationObserver))return window.MutationObserver}function en(){if(K()&&l(window.PerformanceObserver))return window.PerformanceObserver}function rn(){var n=function(){if(K()&&"navigator"in window)return window.navigator}();if(n)return n.connection||n.mozConnection||n.webkitConnection}function on(n){var t=Q();if(!t||!n)return"";t=t.createElement("a");return t.href=n,t.href}function un(n){var t=Q();if(!t||!n)return{url:n,protocol:"",domain:"",query:"",path:"",hash:""};t=t.createElement("a");t.href=n;n=t.pathname||"/";return"/"!==n[0]&&(n="/"+n),{url:t.href,protocol:t.protocol.slice(0,-1),domain:t.hostname,query:t.search.substring(1),path:n,hash:t.hash}}function an(){var n=K()&&K()&&window.location;return n?n.href:""}function cn(t,n){void 0===n&&(n=!1);var e=pn(t);return n&&(e.timestamp=V()),function(n){t.report(q(q({},n),{overrides:e}))}}function fn(o){return function(e,n){function t(n){var t;n.viewId&&n.viewId!==(null===(t=o.config())||void 0===t?void 0:t.viewId)&&(e(r),r=q(q({},pn(o)),dn(n)))}var r=pn(o);o.on("beforeConfig",t),n(function(){o.off("beforeConfig",t)})}}function sn(r){return function(n,t){var e=pn(r);t(A,function(n){e&&n(e)})}}function ln(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=mn(K());e&&(e.errors||(e.errors=[]),e.errors.push(n))}var dn=function(n){return{pid:n.pid,view_id:n.viewId,url:an()}},pn=function(n){var t=n.config(),t=dn(t);return t.context=n.context?n.context.toString():{},t},vn="view_0",hn="f_view_0",mn=function(n){if(n)return n.__SLARDAR_REGISTRY__||(n.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),n.__SLARDAR_REGISTRY__.Slardar},gn=function(n,t){var e=n&&new n(t);return[function(n,t){e&&n&&e.observe(n,t)},function(){return e&&e.disconnect()}]},yn=function(n,t,e,r){var o,i=!l(t)||r&&n&&n.hidden?function(n){return n(0),0}:t,u=l(e)?e:A;return[function(n){o&&u(o),o=i(n)},i,u]},bn=function(e){var n=e&&e.timing||void 0;return[n,function(){return e&&e.now?e.now():(Date.now?Date.now():+new Date)-(n&&n.navigationStart||0)},function(n){var t=(e||{}).getEntriesByType;return l(t)&&t.call(e,n)||[]},function(){var n=(e||{}).clearResourceTimings;l(n)&&n.call(e)},function(n){var t=(e||{}).getEntriesByName;return l(t)&&t.call(e,n)||[]}]},wn=function(n){var t={url:an(),timestamp:V()},e=n.config();return null!=e&&e.pid&&(t.pid=e.pid),null!=n&&n.context&&(t.context=n.context.toString()),t},_n=function(e,r){return function(n){function t(n){return n.overrides=r,n}e.on("report",t),n(),e.off("report",t)}},En="<unknown>";function xn(n){try{for(var t,e=n,r=[],o=0,i=0,u=" > ".length;e&&o++<5&&!("html"===(t=function(n){var t,e,r,o,i=n,u=[];if(!i||!i.tagName)return"";u.push(i.tagName.toLowerCase()),i.id&&u.push("#"+i.id);n=i.className;if(n&&s(n))for(t=n.split(/\s+/),o=0;o<t.length;o++)u.push("."+t[o]);var a=["type","name","title","alt"];for(o=0;o<a.length;o++)e=a[o],(r=i.getAttribute(e))&&u.push("["+e+'="'+r+'"]');return u.join("")}(e))||1<o&&256<=i+r.length*u+t.length);)r.push(t),i+=t.length,e=e.parentNode;return r.reverse().join(" > ")}catch(n){return En}}var Sn=function(n,t,e,r){return void 0===r&&(r=!1),n.addEventListener(t,e,r),function(){n.removeEventListener(t,e,r)}};function Tn(n,t){n&&t.push(function(){return clearTimeout(n)})}function Ln(n){var t,e=K();e&&(t=I(kn(n),1)[0],["unload","beforeunload","pagehide"].forEach(function(n){e.addEventListener(n,t)}))}function Rn(n){var t,e=Q(),r=K();e&&r&&(t=A,t=Sn(e,"visibilitychange",function(){"visible"===e.visibilityState&&(n(),t())},!0))}function jn(){return!!btoa&&!!atob}var kn=function(t){var e=!1;return[function(n){e||(e=!0,t&&t(n))}]},Cn=function(n,t){return E(n)?q(q({},t),n):!!n&&t};function On(n){try{var t=localStorage.getItem(n),e=t,r=e=t&&"string"==typeof t?JSON.parse((u=t,jn()?decodeURI(atob(u)):u)):e,o=r.expires,i=function(n,t){var e={};for(o in n)Object.prototype.hasOwnProperty.call(n,o)&&t.indexOf(o)<0&&(e[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(e[o[r]]=n[o[r]]);return e}(r,["expires"]);return o>=V()?i:void 0}catch(n){return}var u}function qn(n,t,e){var r;if(!(e<=0))try{localStorage.setItem(n,(r=JSON.stringify(q(q({},t),{expires:V()+e})),jn()?btoa(encodeURI(r)):r))}catch(n){}}function In(n){return!1===n?0:!0!==n&&void 0!==n&&D(n)?n:7776e6}function An(r){return function(n,t){var e;r&&((e=[]).push(f(r,"open",Hn)()),e.push(f(r,"setRequestHeader",Pn)()),e.push(f(r,"send",Un)(n)),t(function(){e.forEach(function(n){return n()})}))}}function Dn(r,o){return function(n,t){var e=o([n,t=void 0===t?{}:t]),t=r(n,t);return t.then(function(n){e(n)},function(){e(void 0)}),t}}function Mn(n,t,e){return n=I(zn(n,t),3),t=n[1],n=n[2],t(e),n}function Nn(n,r){var o=Cn(n,ct);if(o&&k(o.sampleRate))return function(n,t){var e=o.origins;e.length&&g(e,n)&&(t("x-rum-traceparent","00-"+ft()+"-"+ft().substring(16)+"-"+at),t("x-rum-tracestate",r))}}function Bn(n,t){return!n||!t||(st.test(n)||lt.test(t))}var Hn=function(r){return function(){for(var n,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n=I(t,2),this._method=n[0],this._url=n[1],r.apply(this,t)}},Pn=function(o){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this._reqHeaders=this._reqHeaders||{};var e=I(n,2),r=e[0],e=e[1];return this._reqHeaders[r]=e,o&&o.apply(this,n)}},Un=function(i,u){var t,a=(t=new RegExp("\\/monitor_web\\/collect|\\/monitor_browser\\/collect\\/batch","i"),function(n){return t.test(n)});return function(){for(var n,r,o,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._start=V(),this._data=null==t?void 0:t[0],a(this._url)||(n=u([this._method,this._url,this._start,this]),o=n,f(r=this,"onreadystatechange",function(e){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return 4===this.readyState&&o(r),e&&e.apply(this,n)}})()),i.apply(this,t)}},Wn=["fetch_0",function(n,t){var e,r=K();r&&fetch&&((e=[]).push(f(r,"fetch",Dn)(n)),t(function(){e.forEach(function(n){return n()})}))}],Fn=["resource"],Xn=["longtask"],zn=function(t,o,e){var r=t&&new t(function(n,r){n.getEntries?n.getEntries().forEach(function(n,t,e){return o(n,t,e,r)}):e&&e()});return[function(n){if(!t||!r)return e&&e();try{r.observe({entryTypes:n})}catch(n){return e&&e()}},function(n){if(!t||!r)return e&&e();try{r.observe({type:n,buffered:!0})}catch(n){return e&&e()}r.observe({type:n,buffered:!1})},function(){return r&&r.disconnect()}]},Gn=function(n,t,e){n=I(zn(n,t),3),t=n[0],n=n[2];return t(e),n},Jn=["longtask_0",function(n,t){var e=en();e&&t(Gn(e,n,Xn))}],Yn=["resource_0",function(n,t){var e=en();e&&t(Gn(e,n,Fn))}],$n="pageview",Vn="session",Kn="js_error",Qn="http",Zn="resource_error",nt="resource",tt="custom",et="performance",rt="performance_timing",ot="performance_longtask",it="blank_screen",ut="action",at="01",ct={sampleRate:1,origins:[]},ft=function(){var n=window&&(window.crypto||window.msCrypto);if(void 0!==n&&n.getRandomValues){var t=new Uint16Array(8);n.getRandomValues(t);n=function(n){for(var t=n.toString(16);t.length<4;)t="0"+t;return t};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/[x]/g,function(){return(16*Math.random()|0).toString(16)})},st=new RegExp("(cookie|auth|jwt|token|key|ticket|secret|credential|session|password)","i"),lt=new RegExp("(bearer|session)","i"),dt=function(t){var e=!1;return function(n){e||(e=!0,t(n))}},pt=function(n,t){try{var e;t&&(e=n.request.url,n.request.url=t(e),n.extra=q(q({},n.extra),{original_url:e}))}catch(n){}};var vt=function(n,t){var e,r=n._method,o=n._reqHeaders,i=n._url,u=n._start,a=n._data,o={api:"xhr",request:{url:on(i),method:(r||"").toLowerCase(),headers:o&&(e=o,Object.keys(e).reduce(function(n,t){return Bn(t,e[t])||(n[t.toLowerCase()]=e[t]),n},{})),timestamp:u},response:{status:n.status||0,is_custom_error:!1,timestamp:V()},duration:V()-u};"function"==typeof n.getAllResponseHeaders&&(o.response.headers=s(c=n.getAllResponseHeaders())&&c?c.split("\r\n").reduce(function(n,t){var e;return s(t)&&(t=(e=I(t.split(": "),2))[0],e=e[1],Bn(t,e)||(n[t.toLowerCase()]=e)),n},{}):{});var u=o.response.status,c=t.collectBodyOnError,t=t.extraExtractor;try{var f=null==t?void 0:t(n.response,o,a);f&&(o.extra=f),f&&(o.response.is_custom_error=!0),c&&(f||400<=u)&&(o.request.body=a?""+a:void 0,o.response.body=n.response?""+n.response:void 0)}catch(n){}return o};function ht(n,t,e){t=null===(n=n.config())||void 0===n?void 0:n.plugins[t];return Cn(t,e)}var mt="ajax",gt={autoWrap:!0,setContextAtReq:function(){return _},ignoreUrls:[],collectBodyOnError:!1};var yt="click",bt="dom",wt=[yt+"_0",function(n,t){var e=Q();e&&(e.addEventListener(yt,n,!0),t(function(){e.removeEventListener(yt,n,!0)}))}],_t="keypress",Et=["keypress_0",function(n,t){var e=Q();e&&(e.addEventListener(_t,n,!0),t(function(){e.removeEventListener(_t,n,!0)}))}],xt=function(e){return function(n){var t;try{t=n.event.target?xn(n.event.target):xn(n.event)}catch(n){t=En}0!==t.length&&e({type:"dom",category:"ui."+n.name,message:t})}},St=function(t,e){return function(n){if(e)try{t(n)}catch(n){}}},Tt=function(o){function i(t,e){var r;return function(n){u=void 0,n&&r!==n&&e({event:r=n,name:t})}}var u;return[i,function(r){return function(n){var t;try{t=n.target}catch(n){return}var e=t&&t.tagName;e&&("INPUT"===e||"TEXTAREA"===e||t.isContentEditable)&&(u||i("input",r)(n),clearTimeout(u),u=window.setTimeout(function(){u=void 0},o))}}]},Lt=function(e,r,o){void 0===e&&(e=20),void 0===r&&(r=_),void 0===o&&(o=function(n,t){return n.slice(-t)});var i=[];return[function(){return i},function(n){var t=r(n);t&&(n=q(q({},t),{timestamp:n.timestamp||V()}),i=0<=e&&i.length+1>e?o(b(b([],I(i),!1),[n],!1),e):b(b([],I(i),!1),[n],!1))}]},Rt="breadcrumb",jt={maxBreadcrumbs:20,dom:!0};function kt(n,t){return n instanceof t}function Ct(n,t,e){return t=t&&t.method||"get",(t=kt(n,e)?n.method||t:t).toLowerCase()}function Ot(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];try{return n.reduce(function(e,n){return new t(n||{}).forEach(function(n,t){return!Bn(t,n)&&(e[t]=n)}),e},{})}catch(n){return{}}}function qt(n,t,e){return kt(n,e)?n.body:null==t?void 0:t.body}var It=function(n){if(!s(n))return!1;var t=I(n.split(":"),2),n=t[0];return!t[1]||"http"===n||"https"===n},At=function(n,t,e,r,o,i){kt(e,o)?e.headers.set(n,t):r.headers instanceof i?r.headers.set(n,t):r.headers=q(q({},r.headers),((r={})[n]=t,r))},Dt=function(t,e,n,r,o,i,u){function a(){var n;f&&(c.request.body=null===(n=qt(t,e,r))||void 0===n?void 0:n.toString())}var c={api:"fetch",request:{method:Ct(t,e,r),timestamp:u,url:on(t instanceof r?t.url:t),headers:Ot(o,t.headers,e.headers)},response:{status:n&&n.status||0,is_custom_error:!1,timestamp:V()},duration:V()-u},f=i.collectBodyOnError,s=i.extraExtractor;if(n)try{var l=Ot(o,n.headers);c.response.headers=l;try{-1!==(l["content-type"]||"").indexOf("application/json")&&s&&n.clone().json().then(function(n){n=s(n,c,null===(n=qt(t,e,r))||void 0===n?void 0:n.toString());n&&(c.extra=n,c.response.is_custom_error=!0,a())}).catch(A)}catch(n){}400<=n.status&&a()}catch(n){}else a();return c},Mt="fetch",Nt={autoWrap:!0,setContextAtReq:function(){return _},ignoreUrls:[],collectBodyOnError:!1};function Bt(n){var t;return!function(n){switch(Object.prototype.toString.call(n)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return 1;default:return n instanceof Error}}(n)?(i(n)||e(n)||s(n))&&(t={message:c(n)}):t=r(n,Ut),t}function Ht(n,t){return n&&t&&n===t}function Pt(o,n,t,e){function r(n){var t=n.error,e=n.extra,r=n.react,n=n.source;!(t=s?d(t):t)||!t.message||l&&l.test(t.message)||o({ev_type:Kn,payload:{error:t,breadcrumbs:[],extra:e,react:r,source:n}})}var i=(f=I(t,3))[0],u=f[1],a=f[2],c=e.ignoreErrors,t=e.onerror,f=e.onunhandledrejection,s=e.dedupe,e=e.captureGlobalAsync,l=h(c),d=Qt();return t&&n.push(i[0](function(n){return r({error:Wt(n),source:{type:"onerror"}})})),f&&n.push(u[0](function(n){return r({error:Ft(n),source:{type:"onunhandledrejection"}})})),e&&n.push(a()[0](function(n){r(n)})),function(n,t,e){return r({error:Xt(n),extra:t,react:e,source:{type:"manual"}})}}var Ut=["name","message","stack","filename","lineno","colno"],Wt=function(n){return Bt(n.error)},Ft=function(n){var t;try{var e=void 0;if("reason"in n?e=n.reason:"detail"in n&&"reason"in n.detail&&(e=n.detail.reason),e){var r=Bt(e);return q(q({},r),{name:null!==(t=r&&r.name)&&void 0!==t?t:"UnhandledRejection"})}}catch(n){}},Xt=function(n){return"[object ErrorEvent]"===Object.prototype.toString.call(n)?Wt(n):("[object PromiseRejectionEvent]"===Object.prototype.toString.call(n)?Ft:Bt)(n)},zt=["EventTarget","Window","Node","ApplicationCache","ChannelMergerNode","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","MessagePort","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Gt=["setTimeout","setInterval","requestAnimationFrame","requestIdleCallback"],Jt=["onload","onerror","onprogress","onreadystatechange"],Yt="addEventListener",$t=["async_error_0",function(o,n){function u(n,e){if(!l(n))return n;var r={type:"capture-global",data:q({},e)},t=n._w_||(n._w_=function(){try{return(n.handleEvent&&l(n.handleEvent)?n.handleEvent:n).apply(this,[].map.call(arguments,function(n){return u(n,e)}))}catch(n){var t=Bt(n);throw t&&o({source:r,error:t}),n}});return t._hook_=!0,t}var t=K(),e=nn(),r=[];t&&r.push.apply(r,b([],I(Gt.filter(function(n){return t[n]}).map(function(o){return m(t,o,function(r){return function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return r&&r.call.apply(r,b([this,u(n,{function:o})],I(t),!1))}},!1)()})),!1)),e&&e.prototype&&r.push(m(e.prototype,"send",function(r){return function(){for(var t=this,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return Jt.filter(function(n){return t[n]&&!t[n]._hook_}).forEach(function(n){t[n]=u(t[n],{function:n})}),r.apply(this,n)}},!1)()),zt.forEach(function(i){var n=t&&t[i]&&t[i].prototype;n&&n[Yt]&&(r.push(m(n,Yt,function(o){return function(n,t,e){try{var r=t.handleEvent;l(r)&&(t.handleEvent=u(r,{function:"handleEvent",target:i}))}catch(n){}return o&&o.call(this,n,u(t,{function:Yt,target:i}),e)}},!1)()),r.push(m(n,"removeEventListener",function(r){return function(n,t,e){return null!=t&&t._w_&&r.call(this,n,t._w_,e),r.call(this,n,t,e)}},!1)()))}),n(function(){return r.forEach(function(n){return n()})})}],Vt=["err_0",function(n,t){var e=K();e&&(e.addEventListener("error",n,!0),t(function(){e.removeEventListener("error",n,!0)}))}],Kt=["perr_0",function(n,t){var e=K();e&&(e.addEventListener("unhandledrejection",n,!0),t(function(){e.removeEventListener("unhandledrejection",n,!0)}))}],Qt=function(){var r;return function(n){try{if(e=r,!(!(t=n)||!e)&&!(!Ht(t.message,e.message)||!Ht(t.stack,e.stack)))return void(r=n)}catch(n){ln(n)}var t,e;return r=n}},Zt="jsError",ne={ignoreErrors:[],onerror:!0,onunhandledrejection:!0,captureGlobalAsync:!1,dedupe:!0};function te(n){return"hidden"===n.visibilityState}function ee(n){return"complete"===n.readyState}function re(n){return le(n,V())}var oe=["hidden_2",function(n,t){var e,r=K(),o=Q();r&&o&&(e=function(){n(te(o))},addEventListener("visibilitychange",e,!0),t(function(){removeEventListener("visibilitychange",e,!0)},function(n){n(te(o))}))}],ie=["load_1",function(n,t){var e,r,o=K(),i=Q();o&&i&&(e=!1,r=function(){setTimeout(function(){n(),e=!0},0)},ee(i)?r():o.addEventListener("load",r,!1),t(function(){o.removeEventListener("load",r,!1)},function(n){e&&n()}))}],ue=["unload_0",function(n,t){var e,r,o,i=K();i&&(e=I(kn(n),1)[0],o=function(){e()},(r=["unload","beforeunload","pagehide"]).forEach(function(n){i.addEventListener(n,o)}),t(function(){r.forEach(function(n){i.removeEventListener(n,o)})}))}],ae=["domLoad_1",function(n,t){var e,r,o=K(),i=Q();o&&i&&(e=!1,r=function(){setTimeout(function(){n(),e=!0},0)},"loading"!==i.readyState?r():o.addEventListener("DOMContentLoaded",r,!1),t(function(){o.removeEventListener("DOMContentLoaded",r,!1)},function(n){e&&n()}))}],ce=["hash_0",function(n,t){var e,r=K();r&&(r.addEventListener("hashchange",e=function(){return n(location.href)},!0),t(function(){return r.removeEventListener("hashchange",e,!0)}))}],fe=["history_0",function(n,t){var e,r,o,i=K()&&window.history;i&&(r=function(){return n(location.href)},(e=[]).push(m(i,"pushState",o=function(e){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];try{e.apply(i,n)}finally{r()}}})(),m(i,"replaceState",o)()),window.addEventListener("popstate",r,!0),e.push(function(){return window.removeEventListener("popstate",r,!0)}),t(function(){e.forEach(function(n){return n()})}))}],se=function(e){return function(n){var t;return"hash"===e?(null===(t=un(n).hash)||void 0===t?void 0:t.replace(/^#/,""))||"/":un(n).path}},le=function(n,t){return n+"_"+t},de=function(r,n,t,o){var i=t,u=n;o&&o(n);return[function(n,t,e){"user_set"!==n&&t!==i?(i=t,u=null!=e?e:i,o&&o(u),r(n,u)):"user_set"===n&&t!==u&&(u=t,o&&o(u),r(n,u))},function(){n&&r("init",n)}]},pe=function(e,n){var r=n;return[function(n,t){t!==r&&e(n,r=t)}]},ve=function(e){return function(n,t){e({ev_type:$n,payload:{pid:t,source:n}})}},he=function(n){return"manual"===n},me="error_weight",ge="duration_apdex",ye="perf_apdex",be=function(n,t){var e=n[0]+n[1]+n[2],r=n[0]/e;return n[2]/e>t.frustrating_threshold?2:r>t.satisfying_threshold||0===e?0:1},we=function(){var t=0,e=void 0;return[function(n){n?e&&(t+=V()-e,e=void 0):e=V()},function(){e&&(t+=V()-e);var n=t;return t=0,e=V(),n}]},_e=function(o,i){return function(n,t){var e=n.payload;switch(n.ev_type){case et:var r=e.name;e.isSupport&&o(t[ye],r,e.value);break;case ut:o(t[ye],"action",e.duration||0);break;case Kn:i(t[me],0);break;case Qn:e.response.is_custom_error||400<=e.response.status?i(t[me],1):(r=e.response.timing)&&o(t[ge],0,r.duration);break;case Zn:i(t[me],2);break;case it:i(t[me],3);break;case nt:o(t[ge],1,e.duration);break;case ot:e.longtasks.forEach(function(n){o(t[ge],2,n.duration)})}}},Ee=function(){function n(){o=[0,0,0],i={error_count:[0,0,0,0],duration_count:[0,0,0],perf_apdex:{}}}var o,i;n();return[function(n,t,e){var r=n&&n[t];!r||e<=0||(n=e<(r[0].threshold||0)?0:e>(r[1].threshold||0)?2:1,o[n]+=r[n].weight,"string"==typeof t?(e=le(t,n),r=i[ye][e],i[ye][e]=(r||0)+1):2==n&&(i.duration_count[t]+=1))},function(n,t){n&&(o[2]+=n[t],i.error_count[t]+=1)},function(){return[o,i]},n]},xe=function(){var o={start:V(),end:0,time_spent:0,is_bounced:!1,entry:"",exit:"",p_count:0,a_count:0};return[function(n,t){var e=I(n,3),r=e[0],n=e[1],e=e[2];o.end=V(),o.time_spent+=t&&t.time_spent||0,o.last_page=t,o.p_count+=1,o.rank=r,o.apdex=n,o.apdex_detail=e;e=Q();e&&(o.is_bounced=!ee(e))},function(n,t){o.time_spent+=n.time_spent,o.p_count+=1,o.exit=t},function(){o.a_count+=1},function(n){o.entry=n,o.exit=n},function(){return o}]},Se="pageview",Te={sendInit:!0,routeMode:"history",apdex:2};var Le="resource",Re=["xmlhttprequest","fetch","beacon"],je="resource",ke={ignoreUrls:[],slowSessionThreshold:4e3};function Ce(n){return n="link"===(t=n).tagName.toLowerCase()?"href":"src",l(t.getAttribute)?t.getAttribute(n)||"":t[n]||"";var t}var Oe=function(n,t){var e=n.target||n.srcElement;if(e){n=e.tagName;if(n&&s(n))return{url:Ce(e),tagName:n,xpath:t?xn(e):void 0}}},qe=function(n,t){var e=n.url,r=n.tagName,n=n.xpath,e=on(e),t=t(e)[0];return{type:r.toLowerCase(),url:e,xpath:n,timing:t}},Ie="resourceError",Ae={includeUrls:[],ignoreUrls:[],dedupe:!0,gatherPath:!1};function De(t){var e=0,r=Ue(n,0);return[function(){e=V()},function(){var n;n=V()-e,r.value=n,t&&t(ze(r)),e=0}]}function Me(t,n,e,r,o){var i,u=(c=I(o,2))[0],a=c[1],o=en(),c=Z(),f=Ue(n,0),s=Xe(ze,e,r);if(!c||!o)return f.isSupport=!1,void s(f);function l(n){n=n.startTime,f.value=n,s(f)}(c=(0,I(bn(c),5)[4])(t)[0])?l(c):(r.push(Gn(o,function(n){n.name===t&&l(n)},[Ye])),r.push(a[0](function(){f.isBounced=!0,s(f)})),i=function(n){n&&(f.isSupport=!1,s(f))},r.push(function(){return u[1](i)}),u[0](i))}function Ne(n,e){var r=["img","script","iframe","link","audio","video","source"],t=(n=I(gn(n,function(n){for(var t=0;t<n.length;t++)("childList"===n[t].type&&function n(t,e){for(var r=0;r<t.length;r++)if(x(e,t[r].nodeName.toLowerCase())||t[r].children&&n(t[r].children,e))return 1}(n[t].addedNodes,r)||"attributes"===n[t].type&&x(r,n[t].target.nodeName.toLowerCase()))&&e(n[t])}),2))[0];return[function(){return t(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},n[1]]}function Be(n,t){var e=n.startTime,r=n.duration;n.start=e,n.end=e+r,t.push(n)}function He(n,t,e,r){var o=(l=I(e,5))[0],i=l[1],u=l[2],a=l[3],c=l[4],f=Ue(Ke,0),s=Xe(ze,n,t),e=Z(),l=en(),d=void 0===(r=(n=r||{}).entries)?[]:r,p=n.observer;if(t.push(function(){p&&p.disconnect(),d.length=0}),!window||!XMLHttpRequest||!e||!l||l.supportedEntryTypes&&!x(l.supportedEntryTypes||[],Xn[0]))return f.isSupport=!1,s(f),0;var v=(n=I(bn(e),5))[0],h=n[1],m=n[4],e=(l=I(Ze(h),3))[0],n=l[1],g=l[2],y=(a=I(er(t,[o,i,u,a,tn()],d)(g,h),2))[0],b=a[1];function w(n){f.value=n,s(f)}t.push(n),n=y[y.length-1],e(function(){return function(n){var t=m(Ge)[0],t=tr((t?t.startTime:nr(v))||0,nr(v)||0,b(),h(),y);if(!t)return g(h()+1e3);n(t)}(w)},Math.max(b()+Qe,n?n.end:0)),t.push(c[0](function(){f.isSupport=!1,s(f)}))}var Pe={isSupport:!0,isPolyfill:!1,isBounced:!1,isCustom:!1,type:"perf"},Ue=function(n,t){return q({name:n,value:t},Pe)},We="performance",Fe={entries:[],observer:void 0},Xe=function(t,e,r){var o=!1;return function(n){r.length&&r.forEach(function(n){n()}),r.length=0,o||(o=!0,e&&e(t(n)))}},ze=function(n,t){return{ev_type:et,payload:n,overrides:t}},n="spa_load",Ge="first-contentful-paint",Je="first-paint",Ye="paint",$e=["fp",function(n,t,e){return Me(Je,"fp",n,t,e)}],Ve=["fcp",function(n,t,e){return Me(Ge,"fcp",n,t,e)}],Ke="tti",Qe=5e3,Ze=function(t){function e(n){n<o||!r||(u(),i=window.setTimeout(r,n-t()),o=n)}var r,o=-1/0,i=void 0,u=function(){return window.clearTimeout(i)};return[function(n,t){r=n,e(t)},function(){u(),r=void 0},e]},nr=function(n){var t=n||{},n=t.domContentLoadedEventEnd,t=t.navigationStart;return n?n-(void 0===t?0:t):null},tr=function(n,t,e,r,o){if(r-e<Qe)return null;o=0===o.length?n:o[o.length-1].end;return r-o<Qe?null:Math.max(o,t)},er=function(d,n,p){var n=I(n,5),v=n[0],h=n[1],m=n[2],g=n[3],y=n[4];return function(e,n){var r,o=[],i=[],t=I([r={},function(n,t){return r[n]=t},function(n){return delete r[n]}],3),u=t[0],a=t[1],c=t[2];p.forEach(function(n){n.entryType===Xn[0]&&Be(n,o)});var f=0;d.push(v[0](function(n){if("get"!==(I(n,1)[0]||"").toLowerCase())return A;var t=f+=1;return a(t,V()),function(){c(t)}})),d.push(h[0](function(n){var t=I(n,2),n=t[0],t=t[1];if(!window.Request||"get"!==Ct(n,t,window.Request))return A;var e=f+=1;return a(e,V()),function(){c(e)}}));var s=I(y&&Ne(y,function(){return e(n()+Qe)})||[],2),t=s[0],s=s[1];t&&t();function l(){return function(n,t,e){if(2<n.length)return e();for(var r=[],o=0;o<t.length;o++)r.push([t[o].start,0],[t[o].end,1]);for(o=0;o<n.length;o++)r.push([n[o],0]);r.sort(function(n,t){return n[0]-t[0]});for(var i=n.length,o=r.length-1;0<=o;o--){var u=I(r[o],2),a=u[0];switch(u[1]){case 0:i--;break;case 1:if(2<++i)return a}}return 0}(function(n){for(var t=Object.keys(n),e=[],r=0;r<t.length;r++){var o=n[t[r]];"number"==typeof o&&e.push(o)}return e}(u),i,n)}return s&&d.push(s),d.push(m[0](function(n){Be(n,o);var t=n.startTime,n=n.duration;e(t+n+Qe)})),d.push(g[0](function(n){var t=n.fetchStart,n=n.responseEnd;i.push({start:t,end:n}),e(l()+Qe)})),d.push(function(){o.length=0,i.length=0}),[o,l]}};function rr(n,t,e){var r=(a=I(e,2))[0],o=a[1],i=Q(),u=tn(),a=(e=Z())&&e.timing&&e.timing.navigationStart||void 0,c=Ue(or,0),f=Xe(ze,n,t);if(!i||!u||!a)return c.isSupport=!1,f(c),0;function s(){return d.push({time:V()-l,score:ur(i&&i.body,1,!1,ir)})}var l=V(),d=[],e=function(){if(K()&&"requestAnimationFrame"in window)return window.requestAnimationFrame}(),n=function(){if(K()&&"cancelAnimationFrame"in window)return window.cancelAnimationFrame}(),p=I(yn(i,e,n,!0),1)[0],u=(n=I(gn(u,function(){return p(s)}),2))[0],n=n[1],v=l-(a||0);u(i,{subtree:!0,childList:!0}),t.push(n),t.push(o[0](function(){c.isSupport=!1,f(c)})),t.push(r[0](function(){Tn(window.setTimeout(function(){!function(n){void 0===n&&(n=0);var t=ar(d);c.value=t?t+n:0,f(c),d.length=0}(v)},200),t)}))}var or="fmp",ir=["SCRIPT","STYLE","META","HEAD"],ur=function(n,e,t,r){if(!n||-1<r.indexOf(n.tagName))return 0;var o=n.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(n,t){return n+ur(t,e+1,0<n,r)},0);if(o<=0&&!t){if(!l(n.getBoundingClientRect))return 0;t=n.getBoundingClientRect()||{},n=t.top,t=t.height;if(n>window.innerHeight||t<=0)return 0}return o+1+.5*e},ar=function(n){var t=I(void 0===n?[]:n),n=t[0],t=t.slice(1);return t&&t.reduce(function(n,t){var e=I(n,2),r=e[0],n=e[1],e=t.score-r.score;return[t,t.time>=r.time&&n.rate<e?{time:t.time,rate:e}:n]},[n,{time:null==n?void 0:n.time,rate:0}])[1].time||0},cr="fmp",fr={renderType:"CSR"};function sr(n,t){return~vr.indexOf(n.tagName)||mr<t}function lr(n){return{width:(n=n.getBoundingClientRect()).width,height:n.height,top:n.top}}function dr(n){return n?document.querySelector(n):document.body}function pr(e,r,n,o){if(void 0===r&&(r=0),void 0===n&&(n=0),void 0===o&&(o=1.5),!e||sr(e,r)||o<=n)return n;var t=function(){if(!r)return 0;var n=lr(e),t=n.top,n=n.height;return t>innerHeight||n<=0?0:1/(1<<r-1)}();return[].reduceRight.call(e.children,function(n,t){return pr(t,r+1,n,o)},n+t)}var vr=["SCRIPT","STYLE","META","HEAD"],hr=[Kn,Qn,Zn],mr=4,gr=[et,ot,rt,tt];function yr(n){var e=n.cb,t=n.screenshotUrl,r=n.window,o=n.document,i=n.mask,u=n.partialShot,a=n.quality,c=n.rootSelector;if(K()&&"Promise"in window&&Promise&&r&&o){if(r.html2canvas)return f(),0;n=o.createElement("script");n.src=t,null!==(t=o.head)&&void 0!==t&&t.appendChild(n),n.onload=f}function f(){var t;((t=r).requestIdleCallback||function(n){return t.setTimeout(n,1)})(function(){r.html2canvas&&r.html2canvas(u&&c&&o.querySelector(c)||o.body,{scale:360/r.innerWidth,mask:i}).then(function(n){e("data:image"===(n=n.toDataURL("image/jpeg",a)).slice(0,10)?n:br())}).catch(function(){e(br())})})}}function br(n,t){void 0===n&&(n=192),void 0===t&&(t=108);var e=document.createElement("canvas");e.width=n,e.height=t;var r=e.getContext("2d");return r&&(r.fillStyle="#ffffff",r.fillRect(0,0,n,t)),e.toDataURL("image/jpeg")}var wr=function(e,r,n,t){function o(n,t){r.forEach(function(n){return n()}),r.length=0,u&&e({ev_type:it,payload:{timestamp:u[0],score:u[1],screenshot:t,error:a,serialized_dom:function e(n,r,t){if(void 0===r&&(r=0),void 0===t&&(t=!0),!n||sr(n,r))return"";var o=q(q({},lr(n)),{id:n.getAttribute("id"),class:n.getAttribute("class")}),i=Object.keys(o).reduce(function(n,t){return n+(D(o[t])||o[t]?" "+t+'="'+o[t]+'"':"")},""),u=n.tagName.toLowerCase(),n=[].reduce.call(n.children,function(n,t){return n+e(t,r+1,!1)},"");return"<"+u+i+(t?' innerHeight="'+innerHeight+'"':"")+">"+n+"</"+u+">"}(dr(b))},overrides:{timestamp:n||u[0]}})}function i(){c&&clearTimeout(c),c=S.setTimeout(function(){f=L(function(){var n=dr(b);n&&((n=pr(n,0,0,g))<g?(u=[V(),n],O()):u=void 0)})},1e3)}var u,a,c,f,s,l,d,p=I(n,4),v=p[0],h=p[1],m=p[2],n=p[3],g=t.threshold,y=t.screenshot,b=t.rootSelector,p=t.autoDetect,w=t.ssUrl,_=t.quality,E=t.mask,x=t.partialShot,S=K(),T=Q(),L=S.requestAnimationFrame||A,R=S.cancelAnimationFrame||A,j=I(bn(performance),2)[1],k=0,C=!1,O=(l=function(){u&&!C&&(C=!0,y?yr({cb:o.bind(null,V()),screenshotUrl:w,window:S,document:T,mask:E,partialShot:x,quality:_,rootSelector:b}):o())},function(){s||(d=V(),s=S.setTimeout(function(){s=0,(d<k?i:l)()},1e4<j()?2e3:8e3))});return r.push(n[0](function(){!C&&a&&o()})),p&&r.push(v[0](function(){var n=I(gn(tn(),i),2),t=n[0],e=n[1];r.push(function(){clearTimeout(c),clearTimeout(s),R(f),e&&e()}),t(null===(t=Q())||void 0===t?void 0:t.body,{subtree:!0,childList:!0}),r.push(h()[0](function(){c&&i()})),r.push(m()[0](function(){c&&i()})),i()})),[function(n){C||~gr.indexOf(n.ev_type)||(k=V(),a=function(n,t){if(-1===hr.indexOf(t.ev_type))return n;if(t.ev_type===Qn&&t.payload.response.status<400)return n;if(n&&hr.indexOf(n.type)<hr.indexOf(t.ev_type))return n;var e="";switch(t.ev_type){case Kn:e=t.payload.error.message;break;case Qn:e=t.payload.request.url;break;case Zn:e=t.payload.url}return{type:t.ev_type,message:e,timestamp:V()}}(a=a&&1e4<k-a.timestamp?void 0:a,n))},i]},_r="blankScreen";var Er={autoDetect:!0,threshold:1.5,screenshot:!0,ssUrl:"https://apm.volccdn.com/mars-web/apmplus/web/html2canvas.min.js",mask:!1,partialShot:!0,quality:.1};var xr=["keydown","click"],Sr=["lcp",function(n,t,e){var r=I(e,2),o=r[0],e=r[1],r=en(),i=Ue("lcp",0),u=Xe(ze,n,t);if(!r)return i.isSupport=!1,void u(i);t.push(Mn(r,function(n){if(i.value=n.startTime,n.element)try{i.extra={element:xn(n.element)}}catch(n){}},"largest-contentful-paint"));function a(){u(i)}xr.forEach(function(n){window.addEventListener(n,a,!0),t.push(function(){window.removeEventListener(n,a,!0)})}),t.push(e[0](function(){i.isBounced=!0,u(i)}));function c(n){n&&(i.isSupport=!1,u(i))}t.push(function(){return o[1](c)}),o[0](c)}],Tr="first-input",Lr=["fid",function(n,t){var e=en(),r=Z(),o=Ue("fid",0),i=Xe(ze,n,t);if(!r||!e)return o.isSupport=!1,void i(o);n=function(n){var t=n.processingStart,n=n.startTime;o.value=t-n,i(o)},r=(0,I(bn(r),3)[2])(Tr)[0];r?n(r):t.push(Gn(e,n,[Tr]))}],Rr=["cls",function(n,t,e){var r,o=I(e,3),i=o[0],u=o[1],e=o[2],o=en(),a=Ue("cls",0),c=(r=n,function(n,t){r(ze(n,t))});if(!o)return a.isSupport=!1,void c(a);var f,s,n=I((f=0,s=[],[function(){f=0},function(n,t){var e,r;t.hadRecentInput||(e=s[0],r=s[s.length-1],f&&t.startTime-r<1e3&&t.startTime-e<5e3?(f+=t.value,s.push(t.startTime)):(f=t.value,s=[t.startTime]),n(f))}]),2),l=n[0],n=n[1].bind(null,function(n){n>a.value&&(a.value=n)});t.push(Mn(o,n,"layout-shift")),t.push(i[0](function(n){n&&l()})),t.push(e[0](function(n){c(a,n),l(),a=Ue("cls",0)})),t.push(u[0](function(){c(a)}))}],jr="longtask",kr=[jr,function(t,n,e){e=I(e,3)[2];n.push(e[0](function(n){t({ev_type:ot,payload:{type:"perf",longtasks:[n]}})}))}],Cr=["timing",function(n,t,e){var e=I(e,2),r=e[0],e=e[1],o=Z(),i=I(bn(o),3)[2],u=Xe(function(n){var t=o&&o.timing||void 0,e=i("navigation")[0];return{ev_type:rt,payload:{isBounced:n,timing:t,navigation_timing:e}}},n,t);t.push(e[0](function(){u(!0)}));function a(){u(!1)}t.push(function(){return r[1](a)}),r[0](a)}],Or=["mpfid",function(n,t,e){var r=I(e,3),o=r[0],e=r[2],r=en(),i=Z(),u=Ue("mpfid",0),a=[],c=Xe(ze,n,t);if(!r)return u.isSupport=!1,void c(u);t.push(e[0](function(n){a.push(n)}));function f(){var n=(0,I(bn(i),5)[4])(Ge)[0],r=n&&n.startTime||0;u.value=a.reduce(function(n,t){var e=t.duration,t=t.startTime;return n<e&&r<t?e:n},0),a.length=0,c(u)}t.push(o[0](function(){Tn(window.setTimeout(f,200),t)}))}];var qr=function(n){if(n&&E(n)&&n.name&&s(n.name)){var t={name:n.name,type:"event"};if("metrics"in n&&E(n.metrics)){var e=n.metrics,r={};for(o in e)D(e[o])&&(r[o]=e[o]);t.metrics=r}if("categories"in n&&E(n.categories)){var o,i=n.categories,u={};for(o in i)u[o]=c(i[o]);t.categories=u}return t}},Ir=function(n){if(n&&E(n)&&n.content&&s(n.content)){var t={content:c(n.content),type:"log",level:"info"};if("level"in n&&(t.level=n.level),"extra"in n&&E(n.extra)){var e,r=n.extra,o={},i={};for(e in r)D(r[e])?o[e]=r[e]:i[e]=c(r[e]);t.metrics=o,t.categories=i}return t}};function Ar(n){return(null==n?void 0:n.effectiveType)||(null==n?void 0:n.type)||""}function Dr(n,t){var e=n.common||{};return e.sample_rate=t,n.common=e,n}function Mr(n,t,e,r,o){return n?(i=o(r,t),function(){return i}):function(){return e(t)};var i}function Nr(n,t,e,r){if(void 0===(n=v(n,t,function(n,t){return n[t]})))return!1;var o,t="boolean"==typeof n?"bool":D(n)?"number":"string";return function(n,t,e){switch(e){case"eq":return x(t,n);case"neq":return!x(t,n);case"gt":return n>t[0];case"gte":return n>=t[0];case"lt":return n<t[0];case"lte":return n<=t[0];case"regex":return Boolean(n.match(new RegExp(t.join("|"))));case"not_regex":return!n.match(new RegExp(t.join("|")));default:return!1}}(n,(o=t,r.map(function(n){switch(o){case"number":return Number(n);case"boolean":return"1"===n;default:return String(n)}})),e)}function Br(t,n){try{return"rule"===n.type?Nr(t,n.field,n.op,n.values):"and"===n.type?n.children.every(function(n){return Br(t,n)}):n.children.some(function(n){return Br(t,n)})}catch(n){return ln(n),!1}}function Hr(){var e=K();return e&&e.navigator.sendBeacon?{get:function(){},post:function(n,t){e.navigator.sendBeacon(n,t)}}:{get:A,post:A}}function Pr(n,t,e){var r=t.url,o=t.data,i=t.success,u=void 0===i?A:i,a=void 0===(i=t.fail)?A:i,c=void 0===(i=t.getResponseText)?A:i,t=void 0!==(t=t.withCredentials)&&t;(e=new e).withCredentials=t,e.open(n,r,!0),e.setRequestHeader("Content-Type","application/json"),e.onload=function(){null!=c&&c(this.responseText);try{var n;this.responseText?(n=JSON.parse(this.responseText),u(n)):u({})}catch(n){a(n)}},e.onerror=function(){a(new Error("Network request failed"))},e.onabort=function(){a(new Error("Network request aborted"))},e.send(o)}var Ur=function(n){var t=rn(),e=Ar(t);t&&(t.onchange=function(){e=Ar(t)}),n.on("report",function(n){return q(q({},n),{extra:q(q({},n.extra||{}),{network_type:e})})})},Wr=function(n,t,e,r,o){if(!t)return _;var i=t.sample_rate,u=t.include_users,a=t.sample_granularity,c=t.rules,t=t.r,t=void 0===t?Math.random():t;if(x(u,n))return function(n){return Dr(n,1)};var f,s,l,d,p,v,h,m="session"===a,g=Mr(m,i,e,t,r),y=(f=c,s=m,l=i,d=e,p=t,v=r,h={},Object.keys(f).forEach(function(n){var t=f[n],e=t.enable,r=t.sample_rate,t=t.conditional_sample_rules;e?(h[n]={enable:e,sample_rate:r,effectiveSampleRate:r*l,hit:Mr(s,r,d,p,v)},t&&(h[n].conditional_hit_rules=t.map(function(n){var t=n.sample_rate,n=n.filter;return{sample_rate:t,hit:Mr(s,t,d,p,v),effectiveSampleRate:t*l,filter:n}}))):h[n]={enable:e,hit:function(){return!1},sample_rate:0,effectiveSampleRate:0}}),h);return function(n){if(!g())return m&&o[0](),!1;if(!(n.ev_type in y))return Dr(n,i);if(!y[n.ev_type].enable)return m&&o[1](n.ev_type),!1;if(null!==(t=n.common)&&void 0!==t&&t.sample_rate)return n;var t=y[n.ev_type],e=t.conditional_hit_rules;if(e)for(var r=0;r<e.length;r++)if(Br(n,e[r].filter))return!!e[r].hit()&&Dr(n,e[r].effectiveSampleRate);return t.hit()?Dr(n,t.effectiveSampleRate):(e&&e.length||!m||o[1](n.ev_type),!1)}};function Fr(e){var n,r,o,i,t,u,a,c,f,s=(o=(n=e).transport,i=e.endpoint,t=e.size,u=void 0===t?10:t,a=void 0===(n=e.wait)?1e3:n,c=[],f=0,{getSize:function(){return u},getWait:function(){return a},setSize:function(n){u=n},setWait:function(n){a=n},getEndpoint:function(){return i},setEndpoint:function(n){i=n},send:function(n){c.push(n),c.length>=u&&l.call(this),clearTimeout(f),f=setTimeout(l.bind(this),a)},flush:function(){clearTimeout(f),l.call(this)},getBatchData:function(){return c.length?p(c):""},clear:function(){clearTimeout(f),c=[]},fail:function(n){r=n}});function l(){var t;c.length&&(t=this.getBatchData(),o.post({url:i,data:t,fail:function(n){r&&r(n,t)}}),c=[])}var d=s.send;return Ln(function(){var t,n;e.transport.useBeacon?(t=Hr(),(n=s.getBatchData())&&(t.post(s.getEndpoint(),n),s.clear()),s.send=function(n){t.post(s.getEndpoint(),p([n]))},Rn(function(){s.send=d})):s.flush()}),s}var Xr="2.7.3",zr="APM_PLUS_WEB",Gr="/settings/get/webpro",Jr="/monitor_web/collect",Yr=[Jr,Gr,"/monitor_browser/collect"],$r="session",Vr={sample_rate:1,include_users:[],sample_granularity:$r,rules:{}},Kr=20;function Qr(n,t){return n.plugins.filter(function(n){return n.name===t&&n.version===Xr})[0]}function Zr(n,t,e){(e=void 0===e?mn(K()):e)&&e.plugins&&(Qr(e,n)||e.plugins.push({name:n,version:Xr,apply:t}))}function no(r){r.provide("reloadPlugin",function(n,t){var e;r.destroyAgent.has(n)&&r.destroyAgent.remove(n),void 0!==t&&r.set({plugins:q(q({},r.config().plugins),((e={})[n]=t,e))}),r.config().plugins[n]&&function(n,t,e){void 0===e&&(e=mn(K()));if(e){e=Qr(e,t);if(e)try{if(n.destroyAgent.has(t))return;e.apply(n)}catch(n){T("[loader].applyPlugin failed",t,n)}else T("[loader].applyPlugin not found",t)}}(r,n)})}var to={build:function(n){return{ev_type:n.ev_type,payload:n.payload,common:q(q({},n.extra||{}),n.overrides||{})}}};function eo(n){var t,e=n.plugins||{};for(t in e)e[t]&&!E(e[t])&&(e[t]={});return q(q({},n),{plugins:e})}function ro(n){return E(n)&&"aid"in n}function oo(n){return q({},n)}function io(){var n=K(),t=Q();if(n&&t)return(null===(t=null===(t=null===(t=function(){if(!document)return null;if(document.currentScript)return document.currentScript;try{throw new Error}catch(n){var t=0,e=/at\s+(.*)\s+\((.*):(\d*):(\d*)\)/i.exec(n.stack),r=e&&e[2]||!1,o=e&&e[3]||0,i=document.location.href.replace(document.location.hash,""),u="",a=document.getElementsByTagName("script");for(r===i&&(e=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(o-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),u=e.replace(o,"$1").trim());t<a.length;t++){if("interactive"===a[t].readyState)return a[t];if(a[t].src===r)return a[t];if(r===i&&a[t].innerHTML&&a[t].innerHTML.trim()===u)return a[t]}return null}}())||void 0===t?void 0:t.getAttribute("src"))||void 0===t?void 0:t.match(/globalName=(.+)$/))||void 0===t?void 0:t[1])||zr}function uo(n){return"APMPLUS"+n}function ao(n,t){void 0===n&&(n=0);var e={userId:M(),deviceId:M(),r:Math.random()};return t<=0?e:(function(n,t){try{var e=localStorage.getItem(n);if(!e||!jn()||"{"!==e[0])return;qn(n,JSON.parse(e),t)}catch(n){}}(n=uo(n),t),On(n)||e)}var co=function(n,t){return void 0===t&&(t=Jr),(n&&0<=n.indexOf("//")?"":"https://")+n+t},fo=M,so=function(t){var o,i,u,a=t,c={},f=A,e=A;return{getConfig:function(){return a},setConfig:function(n){var t,e,r;return c=q(q({},c),n||{}),s(),o||(o=n,a.useLocalConfig?(u={},f()):i?l():(t=a.transport,e=a.domain,n=a.aid,r=function(n){i=n,l()},t.get({withCredentials:!0,url:function(n,t){return void 0===t&&(t=Gr),(n&&0<=n.indexOf("//")?"":"https://")+n+t}(e)+"?aid="+n,success:function(n){r(n.data||{})},fail:function(){r({sample:{sample_rate:.001}})}}))),a},onChange:function(n){e=n},onReady:function(n){f=function(){!function(){t.userId!==a.userId&&(t.sample.r=Math.random(),s());!function(n){var t=n.aid,e=n.userId,r=n.deviceId,o=n.sample,n=n.storageExpires,t=uo(t);qn(t,{userId:e,deviceId:r,r:o.r},In(n))}(a)}(),n()},u&&f()}};function s(){var n=q(q(q({},t),u||{}),c);n.plugins=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e={},r=0;r<n.length;)e=d(e,n[r++]);return e}(t.plugins,(null==u?void 0:u.plugins)||{},c.plugins||{}),n.sample=lo(lo(t.sample,null==u?void 0:u.sample),c.sample),a=n,e()}function l(){u=function(n){if(!n)return{};var t=n.sample,e=n.timestamp,r=n.status,o=n.apdex;if(!t)return{};var i=t.sample_rate,u=t.sample_granularity,n=t.include_users,t=t.rules;return{sample:{include_users:n,sample_rate:r&&4===r?0:i,sample_granularity:void 0===u?$r:u,rules:(void 0===t?[]:t).reduce(function(n,t){var e=t.name,r=t.enable,o=t.sample_rate,t=t.conditional_sample_rules;return n[e]={enable:r,sample_rate:o,conditional_sample_rules:t},n},{})},apdex:o,serverTimestamp:e}}(i),s(),f()}};function lo(r,o){if(!r||!o)return r||o;var n=q(q({},r),o);return n.include_users=b(b([],I(r.include_users||[]),!1),I(o.include_users||[]),!1),n.rules=b(b([],I(Object.keys(r.rules||{})),!1),I(Object.keys(o.rules||{})),!1).reduce(function(n,t){var e;return t in n||(t in(r.rules||{})&&t in(o.rules||{})?(n[t]=q(q({},r.rules[t]),o.rules[t]),n[t].conditional_sample_rules=b(b([],I(r.rules[t].conditional_sample_rules||[]),!1),I(o.rules[t].conditional_sample_rules||[]),!1)):n[t]=(null===(e=r.rules)||void 0===e?void 0:e[t])||(null===(e=o.rules)||void 0===e?void 0:e[t])),n},{}),n}function po(n){var t=(e=void 0===n?{}:n).createSender,n=e.builder,e=e.createDefaultConfig,r=function(n){var e,r,t=n.builder,o=n.createSender,i=n.createDefaultConfig,u=n.createConfigManager,a=n.userConfigNormalizer,c=n.initConfigNormalizer,f=n.validateInitConfig,s={};w.forEach(function(n){return s[n]=[]});var l=!1,d=!1,p=!1,v=[],h=[],m=U(),g={getBuilder:function(){return t},getSender:function(){return e},getPreStartQueue:function(){return v},init:function(n){if(l)T("already inited");else{if(!(n&&E(n)&&f(n)))throw new Error("invalid InitConfig, init failed");var t=i(n);if(!t)throw new Error("defaultConfig missing");n=c(n);if((r=u(t)).setConfig(n),r.onChange(function(){y("config")}),!(e=o(r.getConfig())))throw new Error("sender missing");y("init",l=!0)}},set:function(n){l&&n&&E(n)&&(y("beforeConfig",!1,n),null!=r&&r.setConfig(n))},config:function(n){if(l)return n&&E(n)&&(y("beforeConfig",!1,n),null!=r&&r.setConfig(a(n))),null==r?void 0:r.getConfig()},provide:function(n,t){x(h,n)?T("cannot provide "+n+", reserved"):(g[n]=t,y("provide",!1,n))},start:function(){var t=this;l&&(d||null!=r&&r.onReady(function(){y("start",d=!0),v.forEach(function(n){return t.build(n)}),v.length=0}))},report:function(n){n&&(!(n=L(s.beforeReport)(n))||(n=L(s.report)(n))&&(d?this.build(n):v.push(n)))},build:function(n){!d||(n=L(s.beforeBuild)(n))&&(!(n=t.build(n))||(n=L(s.build)(n))&&this.send(n))},send:function(n){!d||(n=L(s.beforeSend)(n))&&(e.send(n),y("send",!1,n))},destroy:function(){m.clear(),p=!0,y("beforeDestroy",!(v.length=0))},on:function(n,t){if("init"===n&&l||"start"===n&&d||"beforeDestroy"===n&&p)try{t()}catch(n){}else s[n]&&s[n].push(t)},off:function(n,t){s[n]&&(s[n]=S(s[n],t))},destroyAgent:m},h=Object.keys(g);return g;function y(n,t){void 0===t&&(t=!1);for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];s[n].forEach(function(n){try{n.apply(void 0,b([],I(e),!1))}catch(n){}}),t&&(s[n].length=0)}}({validateInitConfig:ro,initConfigNormalizer:eo,userConfigNormalizer:oo,createSender:void 0===t?function(n){return Fr({size:Kr,endpoint:co(n.domain),transport:n.transport})}:t,builder:void 0===n?to:n,createDefaultConfig:void 0===e?To:e,createConfigManager:so});F(r);var o,i,u,e=mn(K());return o=r,e=e&&e.subject,i=e||{},u={},o.provide("setFilter",function(n,t){u[n]||(u[n]=[]),u[n].push(t)}),o.provide("initSubject",function(n){var t=I(n,2),e=t[0],n=t[1],t=G(e),t=!!t&&u[t];return i[e]||(i[e]=P(n,function(){i[e]=void 0})),t?$(o,[e,B(i[e],t)]):i[e]}),o.provide("getSubject",function(n){return i[n]}),o.provide("privateSubject",{}),Eo(r),xo(r),ho(r),Ur(r),So(r),z(e=X(r,wn,function(n,t,e){return _n(n,t)(function(){var n=I(e),t=n[0],n=n.slice(1);r[t].apply(r,b([],I(n),!1))})}),Zr),e}function vo(n){var e,i,t,r,u,o,a=po(n=void 0===n?{}:n);return(e=a).on("start",function(){var n=e.config(),t=n.userId,n=n.sample,n=Wr(t,n,k,C,[function(){e.destroy()},function(n){e.destroyAgent.removeByEvType(n)}]);e.on("build",n)}),i=a,r=go(t=void 0===t?mo:t),n=yo(t),u=bo(i,r,t),null!==(t=i.p)&&void 0!==t&&t.a&&"observe"in i.p.a&&i.p.a.observe(function(n){var t=I(n,5);t[0];var e=t[1],r=t[2],o=t[3],n=t[4],t=i.config();_o(t,e)&&u(e,r,o,n)}),i.on("init",function(){var n,o=i.config();null!==(n=i.p)&&void 0!==n&&n.a.forEach(function(n){var t=I(n,5);t[0];var e=t[1],r=t[2],n=t[3],t=t[4];_o(o,e)&&u(e,r,n,t)}),i.p&&i.p.a&&(i.p.a.length=0),i.provide("precollect",function(n,t,e,r){void 0===e&&(e=V()),void 0===r&&(r=location.href),_o(o,n)&&u(n,t,e,r)})}),i.on("provide",wo(i,r,n)),(o=a).provide("sendEvent",function(n){n=qr(n);n&&o.report({ev_type:tt,payload:n,extra:{timestamp:V()}})}),o.provide("sendLog",function(n){n=Ir(n);n&&o.report({ev_type:tt,payload:n,extra:{timestamp:V()}})}),Object.keys(Lo).forEach(function(n){Zr(n,Lo[n]),Lo[n](a)}),no(a),a.provide("create",vo),a}var ho=function(r){r.on("report",function(n){return t=n,e=r.config(),e=void 0===(e=(n=e||{}).pid)?"":e,n=void 0===(n=n.viewId)?"":n,n={url:an(),timestamp:Date.now(),pid:e,view_id:n},q(q({},t),{extra:q(q({},n),t.extra||{})});var t,e})},mo={sri:"reportSri",st:"reportResourceError",err:"captureException",reject:"captureException"},go=function(n){return Object.keys(n).reduce(function(n,t){return n[t]=[],n},{})},yo=function(e){return Object.keys(e).reduce(function(n,t){return n[e[t]]?n[e[t]].push(t):n[e[t]]=[t],n},{})},bo=function(o,i,u){return function(n,t,e,r){void 0===e&&(e=V()),void 0===r&&(r=location.href);r=q(q({},wn(o)),{url:r,timestamp:e});i[n]&&(o[u[n]]?_n(o,r)(function(){o[u[n]](t)}):null!==(e=i[n])&&void 0!==e&&e.push([t,r]))}},wo=function(r,o,n){return function(e){e in n&&n[e].forEach(function(n){var t;null!==(t=o[n])&&void 0!==t&&t.forEach(function(n){var n=I(n,2),t=n[0],n=n[1];_n(r,n)(function(){r[e](t)})}),o[n]=null})}},_o=function(n,t){return"err"===t?!1!==v(n,"plugins."+Zt+".onerror",function(n,t){return n[t]}):"reject"!==t||!1!==v(n,"plugins."+Zt+".onunhandledrejection",function(n,t){return n[t]})},Eo=function(e){var r,o=!1;e.on("init",function(){r=(new Date).getTime(),e.on("config",function(){var n,t=null===(n=e.config())||void 0===n?void 0:n.serverTimestamp;isNaN(t)||Number(t)<=0||o||(o=!0,(n=(new Date).getTime())-r<700&&t&&(n=t-(n+r)/2,!isNaN(n)&&(0<n||n<-6e5)&&e.set({offset:n})))})})},xo=function(r){r.on("beforeBuild",function(n){return t=n,e=r.config(),(n={}).aid=e.aid,n.user_id=e.userId,q(q({},t),{extra:q(q({},n),t.extra||{})});var t,e})},So=function(c){c.on("start",function(){var e,n=c.config(),t=n.deviceId,r=n.sessionId,o=n.release,i=n.env,u=n.offset,a=n.aid,n=n.token,a={did:t,sid:r,release:o,env:i,sname:zr,sversion:Xr,soffset:u||0,biz_id:a,x_auth_token:n},n=c.getSender();n.setEndpoint(n.getEndpoint()+(E(e=a)?Object.keys(e).reduce(function(n,t){return n+="&"+t+"="+e[t]},"").replace("&","?"):""))})},To=function(n){var t,e=In(n.storageExpires),n=ao(n.aid,e);return{aid:0,pid:"",token:"",viewId:re("_"),userId:n.userId,deviceId:n.deviceId,sessionId:fo(),storageExpires:e,domain:"apmplus.volces.com",plugins:{ajax:{ignoreUrls:Yr},fetch:{ignoreUrls:Yr},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1},release:"",env:"production",sample:q(q({},Vr),{r:n.r}),transport:(t=nn())?{useBeacon:!0,get:function(n){Pr("GET",n,t)},post:function(n){Pr("POST",n,t)}}:{get:A,post:A}}},Lo=((ko={})[Se]=function(b){b.on("init",function(){var n,t,e,r,o,i,u,a,c,f,s,l,d,p,v,h,m,g,y=ht(b,Se,Te);y&&location&&(l=y.routeMode,n=y.apdex,c=b.report.bind(b),r=A,n&&(p=[],a=(f=I(function(r,t,n,e){var o=I(n,2),i=o[0],u=o[1],a=2===e.apdex,c=void 0,f=void 0,s=void 0,l=!1,d=I(Ee(),4),p=d[0],v=d[1],h=d[2],m=d[3],n=I(Ee(),4),o=n[0],e=n[1],g=n[2],y=n[3],d=I(xe(),5),b=d[0],w=d[1],_=d[2],E=d[3],x=d[4],n=I(we(),2),d=n[0],S=n[1];t.push(i[0](d)),a||t.push(u[0](function(){var n,t,e;l&&(n=(e=I(g(),2))[0],t=e[1],e=be(n,s),b([e,n,t],R()),r({ev_type:Vn,payload:x()}),y())}));var T=_e(p,v),L=_e(o,e),R=function(){var n=I(h(),2),t=n[0],n=n[1];return{start:c[0],pid:c[1],view_id:c[2],end:V(),time_spent:S(),apdex:t,rank:be(t,s),detail:n}};return t.push(function(){l=!1}),[function(n,t){if(!c)return c=[V(),n,t],E(n),void(l=!(!s||!c));l&&(f=R(),w(f,n)),c=[V(),n,t],m()},function(n){l&&(a||(L(n,s),n.ev_type===ut&&_()),n.common.pid===c[1]&&T(n,s))},function(n){l&&(n.payload.last=f),r(n)},function(n){if(!n)return t.forEach(function(n){return n()}),void(t.length=0);l=!(!(s=n)||!c)}]}(b.report.bind(b),p,[Y(b,oe),Y(b,ue)],y),4))[0],t=f[1],o=f[2],e=f[3],c=o,r=a,b.on("send",t),p.push(function(){return b.off("send",t)}),b.on("start",function(){e(b.config().apdex)}),W(b,Se,Vn,p)),i=I((f=c,u=o=[],a=he(l)?[]:[b.initSubject(ce),b.initSubject(fe)],c=q(q({},y),{initPid:null===(p=b.config())||void 0===p?void 0:p.pid,onPidUpdate:function(n){var t=re(n);r(n,t),b.set({pid:n,viewId:t,actionId:void 0})}}),l=c.sendInit,y=c.initPid,d=c.routeMode,p=c.extractPid,c=c.onPidUpdate,v=he(d)?function(){return""}:se(d),h=p||function(){},c=I(de(ve(f),y||(f=location.href,null!==(y=h(f))&&void 0!==y?y:v(f)),v(location.href),c),2),m=c[0],c=c[1],he(d)||(s=I(pe(function(n,t){return m(n,v(t),h(t))},""),1)[0],a.length&&a.forEach(function(n){return u.push(n[0](function(n){return s(d,n)}))})),l&&c(),[m.bind(null,"user_set")]),1)[0],$(b,[hn,sn(b)],-1),g=function(){i(b.config().pid)},b.on("config",g),o.push(function(){return b.off("config",g)}),W(b,Se,$n,o),b.provide("sendPageview",i))})},ko[mt]=function(o){o.on("init",function(){var n,t,a,e,c,f,s,l,d,r=ht(o,mt,gt);r&&(n=[],(e=q(q({},r),{setContextAtReq:function(){return cn(o,!0)},setTraceHeader:Nn(r.trace,"app_id="+(null===(t=o.config())||void 0===t?void 0:t.aid)+",origin=web")})).autoWrap&&(r=n,t=[Y(o,["xhr_0",An(XMLHttpRequest&&XMLHttpRequest.prototype)]),function(){return Y(o,Yn)}],a=e,e=I(t,2),t=e[0],c=e[1],f=a.setTraceHeader,s=a.ignoreUrls,l=a.setContextAtReq,d=a.extractUrl,r.push(t[0](function(n){var t=I(n,4);t[0];n=t[1];t[2];var e=t[3];if(!n)return A;var r=on(n);if(g(s,r))return A;f&&f(r,function(n,t){return e.setRequestHeader(n,t)});var o=l(),i=void 0,u=c()[0](function(n){r!==n.name||i||(i=n)});return function(n){var t=vt(n,a);setTimeout(function(){i&&(t.response.timing=i),pt(t,d),o&&o({ev_type:Qn,payload:t}),u()},100)}}))),W(o,mt,Qn,n))})},ko[Mt]=function(o){o.on("init",function(){var n,t,f,e,s,l,d,p,v,h,m,r=ht(o,Mt,Nt);r&&(n=[],(e=q(q({},r),{setContextAtReq:function(){return cn(o,!0)},setTraceHeader:Nn(r.trace,"app_id="+(null===(t=o.config())||void 0===t?void 0:t.aid)+",origin=web")})).autoWrap&&(r=n,t=[Y(o,Wn),function(){return Y(o,Yn)}],f=e,e=I(t,2),t=e[0],s=e[1],l=f.setTraceHeader,d=f.ignoreUrls,p=f.setContextAtReq,v=f.extractUrl,h=window.Headers,(m=window.Request)&&h&&r.push(t[0](function(n){var n=I(n,2),r=n[0],o=n[1],t=on(r instanceof m?r.url:r);if(!It(t)||g(d,t))return A;l&&l(t,function(n,t){return At(n,t,r,o,m,h)});var i=p(),u=V(),a=void 0,c=s()[0](function(n){t!==n.name||a||(a=n)});return function(n){var t=Dt(r,o,n,m,h,f,u),e=dt(function(n){a&&(n.response.timing=a),pt(n,v),i&&i({ev_type:Qn,payload:n}),c()});setTimeout(function(){e(t)},1e3)}}))),W(o,Mt,Qn,n))})},ko.tti=function(t){t.on("init",function(){var n;ht(t,"tti",{})&&(n=[],He(cn(t),n,[Y(t,["xhr_0",An(XMLHttpRequest&&XMLHttpRequest.prototype)]),Y(t,Wn),Y(t,Jn),Y(t,Yn),$(t,[vn,fn(t)])],t.pp),W(t,"tti",et,n))})},ko.fmp=function(r){r.on("init",function(){var n,t,e=ht(r,cr,fr);e&&(n=[],t=Y(r,ie),"SSR"===e.renderType?Me(Je,cr,cn(r),n,[Y(r,oe),Y(r,ue)]):rr(cn(r),n,[t,$(r,[vn,fn(r)])]),W(r,cr,et,n))})},ko[Rt]=function(d){d.on("init",function(){var n,t,e,r,o,i,u,a,c,f,s,l=ht(d,Rt,jt);l&&(f=(l=I((e=n=[],r=[Y(d,wt),Y(d,Et)],o=l,i=I(r,2),u=i[0],a=i[1],c=o.maxBreadcrumbs,f=o.onAddBreadcrumb,l=o.onMaxBreadcrumbs,r=o.dom,i=I(Tt(100),2),o=i[0],i=i[1],f=I(Lt(c,f,l),2),l=f[0],f=f[1],r&&(r=xt(f),e.push(u[0](o(yt,St(r,bt)))),e.push(a[0](i(St(r,bt))))),[l,f]),2))[0],t=l[1],d.on("report",s=function(n){return n.ev_type===Qn&&t({type:Qn,category:n.payload.api,message:"",data:{method:n.payload.request.method,url:n.payload.request.url,status_code:String(n.payload.response.status)},timestamp:n.payload.request.timestamp}),n}),n.push(function(){d.off("report",s)}),W(d,Rt,Kn,n),d.provide("getBreadcrumbs",f),d.provide("addBreadcrumb",t))})},ko[Zt]=function(e){e.on("init",function(){window.removeEventListener("error",e.pcErr,!0),window.removeEventListener("unhandledrejection",e.pcRej,!0);var n,t=ht(e,Zt,ne);t&&(t=Pt(function(n){e.getBreadcrumbs&&(n.payload.breadcrumbs=e.getBreadcrumbs()),e.report(n)},n=[],[Y(e,Vt),Y(e,Kt),function(){return Y(e,$t)}],t),W(e,Zt,Kn,n),e.provide("captureException",t))})},ko[We]=function(l){l.on("init",function(){var n=l.pp||Fe;null!==(c=n.observer)&&void 0!==c&&c.disconnect();var t,e,r,o,i,u,a,c,f,s=ht(l,We,{});s&&(t=Y(l,oe),e=Y(l,ue),r=Y(l,ie),o=Y(l,Jn),i=void 0,$(l,[hn,sn(l)],-1)[0](function(n){i=n})(),u=function(n){n=n.ev_type===et&&n.payload.name===Rr[0]||n.ev_type===ot?n:q(q({},n),{overrides:i});l.report(n)},a=$(l,[vn,fn(l)]),[$e,Ve,Sr,Lr,Rr].forEach(function(n){!1!==s[n[0]]&&(n[1](u,n=[],[t,e,a]),W(l,We,et,n))}),[kr,Cr,Or].forEach(function(n){var t;!1!==s[n[0]]&&(n[1](u,t=[],[r,e,o]),n=n[0]===jr?ot:"timing"===n[0]?rt:et,W(l,We,n,t))}),c=(f=I(De(l.report.bind(l)),2))[0],f=f[1],l.provide("performanceInit",c),l.provide("performanceSend",f),n.entries.length=0,l.provide("sendCustomPerfMetric",function(n){n=q(q(q({},Pe),n),{isCustom:!0});l.report(ze(n))}))})},ko[Ie]=function(e){e.on("init",function(){var n,t=ht(e,Ie,Ae);t&&(n=[],t=function(e,n,t,r){var o=I(t,1)[0],i=K();if(i){var u=r.ignoreUrls,t=r.includeUrls,a=r.dedupe,c=r.gatherPath,f=h(t),s=h(u),l=I(bn(Z()),5)[4],d=void 0,p=function(n){var t=location&&location.href;t&&n.url===t||f&&!f.test(n.url)||s&&s.test(n.url)||n.url&&(a&&n.url===d||(d=n.url,(n=qe(n,l))&&e({ev_type:Zn,payload:n})))};return n.push(o[0](function(n){n=n||i.event;!n||(n=Oe(n,c))&&p(n)})),p}}(e.report.bind(e),n,[Y(e,Vt)],t),W(e,Ie,Zn,n),t&&e.provide("reportResourceError",t))})},ko[je]=function(d){d.on("init",function(){var n,e,r,t,o,i,u,a,c,f,s,l=ht(d,je,ke);l&&(n=[],e=d.report.bind(d),r=n,t=[Y(d,ie),function(){return Y(d,Yn)}],o=l,l=I(t,2),t=l[0],f=l[1],(s=Z())&&(l=o.ignoreUrls,i=o.slowSessionThreshold,u=o.ignoreTypes,a=h(l),c=function(n,t){void 0===t&&(t=!1),x(u||Re,n.initiatorType)||a&&a.test(n.name)||(n={ev_type:nt,payload:n},t&&(n.extra={sample_rate:1}),e(n))},r.push(t[0](function(){var n=I(bn(s),3),t=n[0],n=n[2],e=function(){if(!t)return!1;var n=t.loadEventEnd-t.navigationStart;return i<n}();n(Le).forEach(function(n){return c(n,e)}),r.push(f()[0](function(n){c(n)}))}))),W(d,je,nt,n))})},ko[_r]=function(n,t){var o,i,u;i=Er,u=t,(o=n).on("init",function(){var t,n,e=Q(),r=K();e&&r&&((e=ht(o,_r,i)||Cn(u,i))&&(r=[],e=I(wr(o.report.bind(o),r,[Y(o,ae),function(){return Y(o,Jn)},function(){return Y(o,Yn)},Y(o,ue)],e),2),t=e[0],e=e[1],o.on("report",n=function(n){return t(n),n}),r.push(function(){o.off("report",n)}),W(o,_r,it,r),o.provide("detectBlankScreen",e)))})},ko),Ro=vo(),jo=function(){var n=K(),t=io();if(n&&t)return n[t]}();jo&&["p","pp","pcErr","pcRej"].forEach(function(n){Ro.provide(n,jo[n])});var ko,Co,Oo,qo,Io=K(),Ao=io();Io&&Ao&&(ko=(null==(ko=Io[Ao])?void 0:ko.q)||[],Io[Ao]=Ro,ko.forEach(function(n){var t,e;e=n,n=q(q({},wn(t=Ro)),{url:e.pop(),timestamp:e.pop()}),_n(t,n)(function(){t.apply(void 0,b([],I(e),!1))})}),ko.length=0,Ro.p&&("observe"in Ro.p.a&&console.warn("global precollect queue already updated"),Ro.p.a=(Oo=Ro.p.a,qo=[],Oo.observe=function(n){qo.push(n)},Oo.push=function(){for(var n,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach(function(t){qo.forEach(function(n){return n(t)})}),(n=[].push).call.apply(n,b([Oo],I(t),!1))},Oo),(Co=Ro.precollect)&&Ro.provide("precollect",function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return Ro.p.a.push(b(["precollect"],I(n),!1)),Co.apply(void 0,b([],I(n),!1))})))}();

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var REPORT_DOMAIN="apmplus.volces.com",SETTINGS_DOMAIN=REPORT_DOMAIN,SDK_VERSION="2.7.3-alpha.1",SDK_NAME="APM_PLUS_WEB",SETTINGS_PATH="/settings/get/webpro",BATCH_REPORT_PATH="/monitor_web/collect",STORAGE_PREFIX="APMPLUS",DEFAULT_IGNORE_PATHS=[BATCH_REPORT_PATH,SETTINGS_PATH,"/monitor_browser/collect"],DEFAULT_SAMPLE_GRANULARITY="session",DEFAULT_SAMPLE_CONFIG={sample_rate:1,include_users:[],sample_granularity:DEFAULT_SAMPLE_GRANULARITY,rules:{}},DEFAULT_SENDER_SIZE=20;exports.BATCH_REPORT_PATH=BATCH_REPORT_PATH,exports.DEFAULT_IGNORE_PATHS=DEFAULT_IGNORE_PATHS,exports.DEFAULT_SAMPLE_CONFIG=DEFAULT_SAMPLE_CONFIG,exports.DEFAULT_SAMPLE_GRANULARITY=DEFAULT_SAMPLE_GRANULARITY,exports.DEFAULT_SENDER_SIZE=DEFAULT_SENDER_SIZE,exports.REPORT_DOMAIN=REPORT_DOMAIN,exports.SDK_NAME=SDK_NAME,exports.SDK_VERSION=SDK_VERSION,exports.SETTINGS_DOMAIN=SETTINGS_DOMAIN,exports.SETTINGS_PATH=SETTINGS_PATH,exports.STORAGE_PREFIX=STORAGE_PREFIX;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var REPORT_DOMAIN="apmplus.volces.com",SETTINGS_DOMAIN=REPORT_DOMAIN,SDK_VERSION="2.7.3",SDK_NAME="APM_PLUS_WEB",SETTINGS_PATH="/settings/get/webpro",BATCH_REPORT_PATH="/monitor_web/collect",STORAGE_PREFIX="APMPLUS",DEFAULT_IGNORE_PATHS=[BATCH_REPORT_PATH,SETTINGS_PATH,"/monitor_browser/collect"],DEFAULT_SAMPLE_GRANULARITY="session",DEFAULT_SAMPLE_CONFIG={sample_rate:1,include_users:[],sample_granularity:DEFAULT_SAMPLE_GRANULARITY,rules:{}},DEFAULT_SENDER_SIZE=20;exports.BATCH_REPORT_PATH=BATCH_REPORT_PATH,exports.DEFAULT_IGNORE_PATHS=DEFAULT_IGNORE_PATHS,exports.DEFAULT_SAMPLE_CONFIG=DEFAULT_SAMPLE_CONFIG,exports.DEFAULT_SAMPLE_GRANULARITY=DEFAULT_SAMPLE_GRANULARITY,exports.DEFAULT_SENDER_SIZE=DEFAULT_SENDER_SIZE,exports.REPORT_DOMAIN=REPORT_DOMAIN,exports.SDK_NAME=SDK_NAME,exports.SDK_VERSION=SDK_VERSION,exports.SETTINGS_DOMAIN=SETTINGS_DOMAIN,exports.SETTINGS_PATH=SETTINGS_PATH,exports.STORAGE_PREFIX=STORAGE_PREFIX;

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __assign=function(){return(__assign=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function __rest(e,n){var t={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t}function __read(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function __spreadArray(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var DEFAULT_SIZE=10,DEFAULT_WAIT=1e3,stringifyBatch=function(e){return JSON.stringify({ev_type:"batch",list:e})};function createBatchSender(e){var t,r=e.transport,o=e.endpoint,n=e.size,i=void 0===n?DEFAULT_SIZE:n,e=e.wait,a=void 0===e?DEFAULT_WAIT:e,u=[],c=0;function s(){var n;u.length&&(n=this.getBatchData(),r.post({url:o,data:n,fail:function(e){t&&t(e,n)}}),u=[])}return{getSize:function(){return i},getWait:function(){return a},setSize:function(e){i=e},setWait:function(e){a=e},getEndpoint:function(){return o},setEndpoint:function(e){o=e},send:function(e){u.push(e),u.length>=i&&s.call(this),clearTimeout(c),c=setTimeout(s.bind(this),a)},flush:function(){clearTimeout(c),s.call(this)},getBatchData:function(){return u.length?stringifyBatch(u):""},clear:function(){clearTimeout(c),u=[]},fail:function(e){t=e}}}var EVENTS=["init","start","config","beforeDestroy","provide","beforeReport","report","beforeBuild","build","beforeSend","send","beforeConfig"],noop=function(){return{}};function isObject(e){return"object"==typeof e&&null!==e}var objProto=Object.prototype;function isPlainObject(e){if(isObject(e)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===objProto.toString.call(e);e=Object.getPrototypeOf(e);return e===objProto||null===e}return!1}function isArray(e){return"[object Array]"===objProto.toString.call(e)}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function hasKey(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function mergeDeepConcatArray(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var t={},r=0;r<e.length;)t=_mergeDeepMergeArray(t,e[r++]);return t}function _mergeDeepMergeArray(e,n){var t,r=__assign({},e);for(t in n)hasKey(n,t)&&void 0!==n[t]&&(isObject(n[t])&&isPlainObject(n[t])?r[t]=_mergeDeepMergeArray(isObject(e[t])?e[t]:{},n[t]):isArray(n[t])&&isArray(e[t])?r[t]=_mergeDeepArray(e[t],n[t]):r[t]=n[t]);return r}function _mergeDeepArray(e,n){e=isArray(e)?e:[],n=isArray(n)?n:[];return Array.prototype.concat.call(e,n).map(function(e){return e instanceof RegExp?e:isObject(e)&&isPlainObject(e)?_mergeDeepMergeArray({},e):isArray(e)?_mergeDeepArray([],e):e})}function arrayIncludes(e,n){if(!isArray(e))return!1;if(0===e.length)return!1;for(var t=0;t<e.length;){if(e[t]===n)return!0;t++}return!1}var arrayRemove=function(e,n){if(!isArray(e))return e;var t=e.indexOf(n);if(0<=t){n=e.slice();return n.splice(t,1),n}return e},safeVisit=function(e,n,t){for(var r,n=__read(n.split(".")),o=n[0],i=n.slice(1);e&&0<i.length;)e=e[o],o=(r=__read(i))[0],i=r.slice(1);if(e)return t(e,o)},safeCall=function(e,n,t){return safeVisit(e,n,function(e,n){if(e&&n in e&&isFunction(e[n]))try{return e[n].apply(e,t)}catch(e){return}})};function safeStringify(e){try{return isString(e)?e:JSON.stringify(e)}catch(e){return"[FAILED_TO_STRINGIFY]:"+String(e)}}var joinQueryWithMap=function(t){return isObject(t)?Object.keys(t).reduce(function(e,n){return e+="&"+n+"="+t[n]},"").replace("&","?"):""};function createContextAgent(){var t={},r={},o={set:function(e,n){return t[e]=n,r[e]=safeStringify(n),o},merge:function(n){return t=__assign(__assign({},t),n),Object.keys(n).forEach(function(e){r[e]=safeStringify(n[e])}),o},delete:function(e){return delete t[e],delete r[e],o},clear:function(){return t={},r={},o},get:function(e){return r[e]},toString:function(){return __assign({},r)}};return o}var hookObjectProperty=function(i,a,u,c){return void 0===c&&(c=!0),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!i)return noop;var t=i[a],r=u.apply(void 0,__spreadArray([t],__read(e),!1)),o=r;return isFunction(o)&&c&&(o=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];try{return r.apply(this,n)}catch(e){return isFunction(t)&&t.apply(this,n)}}),i[a]=o,function(e){e||(o===i[a]?i[a]=t:r=t)}}},getPrintString=function(){return"".padStart?function(e,n){return e.padStart(n=void 0===n?8:n," ")}:function(e){return e}},printString=getPrintString(),errCount=0,error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+errCount++)],__read(e),!1))},warnCount=0,warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.warn.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+warnCount++)],__read(e),!1))},runProcessors=function(r){return function(e){for(var n=e,t=0;t<r.length&&n;t++)try{n=r[t](n)}catch(e){error(e)}return n}},runFilters=function(r){return function(e){for(var n=!0,t=0;t<r.length&&n;t++)try{n=r[t](e)}catch(e){error(e)}return n}};function mathRNG(){for(var e=new Array(16),n=0,t=0;t<16;t++)0==(3&t)&&(n=4294967296*Math.random()),e[t]=n>>>((3&t)<<3)&255;return e}function bytesToUuid(e){for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);var r=0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[+r]],o[e[15]]].join("")}function uuid(){var e=mathRNG();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,bytesToUuid(e)}var BUFFER_TIME=3e5,applyBufferTimer=function(e,n,t){var r=0;return-1===t?noop:function(){if(e())return r&&clearTimeout(r),void(r=0);0===r&&(r=setTimeout(n,t))}},nextLink=function(r,e){var n=[];try{n=e.reduce(function(e,n){try{var t=n(r);"function"==typeof t&&e.push(t)}catch(e){}return e},[])}catch(e){}return function(e){return nextLink(e,n)}},toObservable=function(e){function n(e){r=arrayRemove(r,e),i||a()}var t,r=[],o=[],i=!1,a=applyBufferTimer(function(){return!!r.length},function(){i=!0,t&&t[0](),o.forEach(function(e){return e()}),o.length=0,t=void 0},e=void 0===e?BUFFER_TIME:e);return{next:function(e){return nextLink(e,r)},complete:function(e){o.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(i)throw new Error("Observer is closed");return r.push(e),t&&t[1]&&t[1](e),a(),function(){return n(e)}},unsubscribe:n}},createSafeObserver=function(e,n,t){t=toObservable(t);try{e(t.next,t.attach),n&&t.complete(n)}catch(e){}return[t.subscribe,t.unsubscribe]},wrapFilters=function(e,r){var o=__read(e,1)[0];return function(n,e){var t=o(function(e){return runFilters(r)(e)?n(e):noop});e(function(){t()})}};function createDestroyAgent(){function r(e){e.length&&e.forEach(function(e){try{e()}catch(e){}}),e.length=0}function n(e){i[e]&&i[e].forEach(function(e){r(e[1])}),i[e]=void 0}var o=!1,i={};return{set:function(e,n,t){i[e]?i[e].push([n,t]):i[e]=[[n,t]],o&&r(t)},has:function(e){return!!i[e]},remove:n,removeByEvType:function(n){Object.keys(i).forEach(function(e){i[e]&&i[e].forEach(function(e){e[0]===n&&r(e[1])})})},clear:function(){o=!0,Object.keys(i).forEach(function(e){n(e)})}}}function createClient(e){var t,r,n=e.builder,o=e.createSender,i=e.createDefaultConfig,a=e.createConfigManager,u=e.userConfigNormalizer,c=e.initConfigNormalizer,s=e.validateInitConfig,f={};EVENTS.forEach(function(e){return f[e]=[]});var l=!1,g=!1,d=!1,p=[],_=[],v=createDestroyAgent(),y={getBuilder:function(){return n},getSender:function(){return t},getPreStartQueue:function(){return p},init:function(e){if(l)warn("already inited");else{if(!(e&&isObject(e)&&s(e)))throw new Error("invalid InitConfig, init failed");var n=i(e);if(!n)throw new Error("defaultConfig missing");e=c(e);if((r=a(n)).setConfig(e),r.onChange(function(){S("config")}),!(t=o(r.getConfig())))throw new Error("sender missing");S("init",l=!0)}},set:function(e){l&&e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(e))},config:function(e){if(l)return e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(u(e))),null==r?void 0:r.getConfig()},provide:function(e,n){arrayIncludes(_,e)?warn("cannot provide "+e+", reserved"):(y[e]=n,S("provide",!1,e))},start:function(){var n=this;l&&(g||null!=r&&r.onReady(function(){S("start",g=!0),p.forEach(function(e){return n.build(e)}),p.length=0}))},report:function(e){e&&(!(e=runProcessors(f.beforeReport)(e))||(e=runProcessors(f.report)(e))&&(g?this.build(e):p.push(e)))},build:function(e){!g||(e=runProcessors(f.beforeBuild)(e))&&(!(e=n.build(e))||(e=runProcessors(f.build)(e))&&this.send(e))},send:function(e){!g||(e=runProcessors(f.beforeSend)(e))&&(t.send(e),S("send",!1,e))},destroy:function(){v.clear(),d=!0,S("beforeDestroy",!(p.length=0))},on:function(e,n){if("init"===e&&l||"start"===e&&g||"beforeDestroy"===e&&d)try{n()}catch(e){}else f[e]&&f[e].push(n)},off:function(e,n){f[e]&&(f[e]=arrayRemove(f[e],n))},destroyAgent:v},_=Object.keys(y);return y;function S(e,n){void 0===n&&(n=!1);for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];f[e].forEach(function(e){try{e.apply(void 0,__spreadArray([],__read(t),!1))}catch(e){}}),n&&(f[e].length=0)}}var ContextPlugin=function(e){var n=createContextAgent();e.provide("context",n),e.on("report",function(e){return e.extra||(e.extra={}),e.extra.context=n.toString(),e})},withCommandArray=function(i,a,t){function u(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o=e[0]){var t=o.split(".")[0];if(t in u)return safeCall(u,o,[].slice.call(e,1));var r=c[t]||[],o=null!==(o=null==a?void 0:a(i))&&void 0!==o?o:{};r.push(__spreadArray([o],__read(e),!1)),void(c[t]=r)}}var e,c={};for(e in hookObjectProperty(i,"provide",function(t){return function(e,n){u[e]=n,t.call(i,e,n)}})(),i)Object.prototype.hasOwnProperty.call(i,e)&&(u[e]=i[e]);return i.on("provide",function(e){c[e]&&(c[e].forEach(function(e){var n=__read(e),e=n[0],n=n.slice(1);null!=t&&t(i,e,n)}),c[e]=null)}),u};function IntegrationPlugin(r,o){r.on("init",function(){function e(e){e.forEach(function(e){var n=e.name;arrayIncludes(t,n)||(t.push(n),e.setup(r),o&&o(n,e.setup),r.destroyAgent.set(n,n,[function(){t=arrayRemove(t,n),e.tearDown&&e.tearDown()}]))})}var t=[];r.provide("applyIntegrations",e);var n=r.config();n&&n.integrations&&e(n.integrations)})}var SubjectSpacer="_",getSubjectKeyWithoutVersion=function(e){return e.split(SubjectSpacer)[0]};function SubjectPlugin(r,e){var o=e||{},i={};r.provide("setFilter",function(e,n){i[e]||(i[e]=[]),i[e].push(n)}),r.provide("initSubject",function(e){var n=__read(e,2),t=n[0],e=n[1],n=getSubjectKeyWithoutVersion(t),n=!!n&&i[n];return o[t]||(o[t]=createSafeObserver(e,function(){o[t]=void 0})),n?initPrivateSubject(r,[t,wrapFilters(o[t],n)]):o[t]}),r.provide("getSubject",function(e){return o[e]}),r.provide("privateSubject",{})}function initPrivateSubject(e,n,t){var n=__read(n,2),r=n[0],n=n[1],o=e.privateSubject||{};return o[r]||(o[r]=createSafeObserver(n,function(){o[r]=void 0},t)),o[r]}var now=function(){return Date.now()};function getDefaultBrowser(){if("object"==typeof window&&isObject(window))return window}function getDefaultDocument(){if("object"==typeof document&&isObject(document))return document}function getDefaultLocation(){return getDefaultBrowser()&&window.location}function getDefaultXMLHttpRequest(){if("function"==typeof XMLHttpRequest&&isFunction(XMLHttpRequest))return XMLHttpRequest}function getDefaultNavigator(){if(getDefaultBrowser()&&"navigator"in window)return window.navigator}function getDefaultNetworkInformation(){var e=getDefaultNavigator();if(e)return e.connection||e.mozConnection||e.webkitConnection}function getLocationUrl(){var e=getDefaultBrowser()&&getDefaultLocation();return e?e.href:""}var getGlobalRegistry=function(e){if(e)return e.__SLARDAR_REGISTRY__||(e.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),e.__SLARDAR_REGISTRY__.Slardar},captureCurrentContext=function(e){var n={url:getLocationUrl(),timestamp:now()},t=e.config();return null!=t&&t.pid&&(n.pid=t.pid),null!=e&&e.context&&(n.context=e.context.toString()),n},syncReportWithCapturedContext=function(t,r){return function(e){function n(e){return e.overrides=r,e}t.on("report",n),e(),t.off("report",n)}},addListenerToDocument=function(e,n,t,r){return void 0===r&&(r=!1),e.addEventListener(n,t,r),function(){e.removeEventListener(n,t,r)}},invokeCallbackOnce=function(n){var t=!1;return[function(e){t||(t=!0,n&&n(e))}]},onPageUnload=function(e){var n,t=getDefaultBrowser();t&&(n=__read(invokeCallbackOnce(e),1)[0],["unload","beforeunload","pagehide"].forEach(function(e){t.addEventListener(e,n)}))},onPageNextShow=function(e){var n,t=getDefaultDocument(),r=getDefaultBrowser();t&&r&&(n=noop,n=addListenerToDocument(t,"visibilitychange",function(){"visible"===t.visibilityState&&(e(),n())},!0))},isSupportEncrypt=function(){return!!btoa&&!!atob};function encodeToBase64(e){return isSupportEncrypt()?btoa(encodeURI(e)):e}function decodeWithBase64(e){return isSupportEncrypt()?decodeURI(atob(e)):e}var getStorageWithDecoding=function(e){try{var n=localStorage.getItem(e),t=n,r=t=n&&"string"==typeof n?JSON.parse(decodeWithBase64(n)):t,o=r.expires,i=__rest(r,["expires"]);return o>=now()?i:void 0}catch(e){return}},setStorageWithEncoding=function(e,n,t){if(!(t<=0))try{localStorage.setItem(e,encodeToBase64(JSON.stringify(__assign(__assign({},n),{expires:now()+t}))))}catch(e){}},DEFAULT_STORAGE_EXPIRES=7776e6,formatStorageExpires=function(e){return!1===e?0:!0!==e&&void 0!==e&&isNumber(e)?e:DEFAULT_STORAGE_EXPIRES},getViewId=function(e){return joinWithSeparator(e,now())},joinWithSeparator=function(e,n){return e+"_"+n};function getNetworkType(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var InjectNetworkTypePlugin=function(e){var n=getDefaultNetworkInformation(),t=getNetworkType(n);n&&(n.onchange=function(){t=getNetworkType(n)}),e.on("report",function(e){return __assign(__assign({},e),{extra:__assign(__assign({},e.extra||{}),{network_type:t})})})},getBeaconTransport=function(){var t=getDefaultBrowser();return t&&t.navigator.sendBeacon?{get:function(){},post:function(e,n){t.navigator.sendBeacon(e,n)}}:{get:noop,post:noop}},request=function(e,n,t){var r=n.url,o=n.data,i=n.success,a=void 0===i?noop:i,i=n.fail,u=void 0===i?noop:i,i=n.getResponseText,c=void 0===i?noop:i,n=n.withCredentials,n=void 0!==n&&n,t=new t;t.withCredentials=n,t.open(e,r,!0),t.setRequestHeader("Content-Type","application/json"),t.onload=function(){null!=c&&c(this.responseText);try{var e;this.responseText?(e=JSON.parse(this.responseText),a(e)):a({})}catch(e){u(e)}},t.onerror=function(){u(new Error("Network request failed"))},t.onabort=function(){u(new Error("Network request aborted"))},t.send(o)},getXhrTransport=function(){var n=getDefaultXMLHttpRequest();return n?{useBeacon:!0,get:function(e){request("GET",e,n)},post:function(e){request("POST",e,n)}}:{get:noop,post:noop}};function createBrowserSender(t){var r=createBatchSender(t),o=r.send;return onPageUnload(function(){var n,e;t.transport.useBeacon?(n=getBeaconTransport(),(e=r.getBatchData())&&(n.post(r.getEndpoint(),e),r.clear()),r.send=function(e){n.post(r.getEndpoint(),stringifyBatch([e]))},onPageNextShow(function(){r.send=o})):r.flush()}),r}var browserBuilder={build:function(e){return{ev_type:e.ev_type,payload:e.payload,common:__assign(__assign({},e.extra||{}),e.overrides||{})}}},REPORT_DOMAIN="apmplus.volces.com",SDK_VERSION="2.7.3-alpha.1",SDK_NAME="APM_PLUS_WEB",SETTINGS_PATH="/settings/get/webpro",BATCH_REPORT_PATH="/monitor_web/collect",STORAGE_PREFIX="APMPLUS",DEFAULT_IGNORE_PATHS=[BATCH_REPORT_PATH,SETTINGS_PATH,"/monitor_browser/collect"],DEFAULT_SAMPLE_GRANULARITY="session",DEFAULT_SAMPLE_CONFIG={sample_rate:1,include_users:[],sample_granularity:DEFAULT_SAMPLE_GRANULARITY,rules:{}},DEFAULT_SENDER_SIZE=20;function normalizeInitConfig(e){var n,t=e.plugins||{};for(n in t)t[n]&&!isObject(t[n])&&(t[n]={});return __assign(__assign({},e),{plugins:t})}function validateInitConfig(e){return isObject(e)&&"aid"in e}function normalizeUserConfig(e){return __assign({},e)}function parseServerConfig(e){if(!e)return{};var n=e.sample,t=e.timestamp,r=e.status,o=e.apdex;if(!n)return{};var i=n.sample_rate,a=n.sample_granularity,e=n.include_users,n=n.rules;return{sample:{include_users:e,sample_rate:r&&4===r?0:i,sample_granularity:void 0===a?DEFAULT_SAMPLE_GRANULARITY:a,rules:(void 0===n?[]:n).reduce(function(e,n){var t=n.name,r=n.enable,o=n.sample_rate,n=n.conditional_sample_rules;return e[t]={enable:r,sample_rate:o,conditional_sample_rules:n},e},{})},apdex:o,serverTimestamp:t}}var getReportUrl=function(e,n){return void 0===n&&(n=BATCH_REPORT_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getSettingsUrl=function(e,n){return void 0===n&&(n=SETTINGS_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getDefaultSessionId=function(){return uuid()},getStorageKey=function(e){return STORAGE_PREFIX+e},glueCodeForStorageSecurity=function(e,n){try{var t=localStorage.getItem(e);if(!t||!isSupportEncrypt()||"{"!==t[0])return;setStorageWithEncoding(e,JSON.parse(t),n)}catch(e){}},getStoreInfo=function(e,n){void 0===e&&(e=0);var t={userId:uuid(),deviceId:uuid(),r:Math.random()};if(n<=0)return t;e=getStorageKey(e);return glueCodeForStorageSecurity(e,n),getStorageWithDecoding(e)||t},saveStoreInfo=function(e){var n=e.aid,t=e.userId,r=e.deviceId,o=e.sample,e=e.storageExpires,n=getStorageKey(n);setStorageWithEncoding(n,{userId:t,deviceId:r,r:o.r},formatStorageExpires(e))},createBrowserConfigManager=function(n){var t,r,o,i=n,a={},u=noop,c=noop;return{getConfig:function(){return i},setConfig:function(e){return a=__assign(__assign({},a),e||{}),s(),t||(t=e,i.useLocalConfig?(o={},u()):r?f():getServerConfig(i.transport,i.domain,i.aid,function(e){r=e,f()})),i},onChange:function(e){c=e},onReady:function(e){u=function(){!function(){n.userId!==i.userId&&(n.sample.r=Math.random(),s());saveStoreInfo(i)}(),e()},o&&u()}};function s(){var e=__assign(__assign(__assign({},n),o||{}),a);e.plugins=mergeDeepConcatArray(n.plugins,(null==o?void 0:o.plugins)||{},a.plugins||{}),e.sample=mergeSampleConfig(mergeSampleConfig(n.sample,null==o?void 0:o.sample),a.sample),i=e,c()}function f(){o=parseServerConfig(r),s(),u()}};function getServerConfig(e,n,t,r){e.get({withCredentials:!0,url:getSettingsUrl(n)+"?aid="+t,success:function(e){r(e.data||{})},fail:function(){r({sample:{sample_rate:.001}})}})}function mergeSampleConfig(r,o){if(!r||!o)return r||o;var e=__assign(__assign({},r),o);return e.include_users=__spreadArray(__spreadArray([],__read(r.include_users||[]),!1),__read(o.include_users||[]),!1),e.rules=__spreadArray(__spreadArray([],__read(Object.keys(r.rules||{})),!1),__read(Object.keys(o.rules||{})),!1).reduce(function(e,n){var t;return n in e||(n in(r.rules||{})&&n in(o.rules||{})?(e[n]=__assign(__assign({},r.rules[n]),o.rules[n]),e[n].conditional_sample_rules=__spreadArray(__spreadArray([],__read(r.rules[n].conditional_sample_rules||[]),!1),__read(o.rules[n].conditional_sample_rules||[]),!1)):e[n]=(null===(t=r.rules)||void 0===t?void 0:t[n])||(null===(t=o.rules)||void 0===t?void 0:t[n])),e},{}),e}function getPluginFromRegistry(e,n){return e.plugins.filter(function(e){return e.name===n&&e.version===SDK_VERSION})[0]}function register(e,n,t){(t=void 0===t?getGlobalRegistry(getDefaultBrowser()):t)&&t.plugins&&(getPluginFromRegistry(t,e)||t.plugins.push({name:e,version:SDK_VERSION,apply:n}))}var addEnvToSendEvent=function(e,n){var t=n||{},n=t.pid,n=void 0===n?"":n,t=t.viewId,t=void 0===t?"":t,t={url:getLocationUrl(),timestamp:Date.now(),pid:n,view_id:t};return __assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectEnvPlugin=function(n){n.on("report",function(e){return addEnvToSendEvent(e,n.config())})},MAX_RTT=700,TimeCalibrationPlugin=function(t){var r,o=!1;t.on("init",function(){r=(new Date).getTime(),t.on("config",function(){var e,n=null===(e=t.config())||void 0===e?void 0:e.serverTimestamp;isNaN(n)||Number(n)<=0||o||(o=!0,(e=(new Date).getTime())-r<MAX_RTT&&n&&(e=n-(e+r)/2,!isNaN(e)&&(0<e||e<-6e5)&&t.set({offset:e})))})})},addConfigToReportEvent=function(e,n){var t={};return t.aid=n.aid,t.user_id=n.userId,__assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectConfigPlugin=function(n){n.on("beforeBuild",function(e){return addConfigToReportEvent(e,n.config())})},InjectQueryPlugin=function(u){u.on("start",function(){var e=u.config(),n=e.deviceId,t=e.sessionId,r=e.release,o=e.env,i=e.offset,a=e.aid,e=e.token,a={did:n,sid:t,release:r,env:o,sname:SDK_NAME,sversion:SDK_VERSION,soffset:i||0,biz_id:a,x_auth_token:e},e=u.getSender();e.setEndpoint(e.getEndpoint()+joinQueryWithMap(a))})},getDefaultConfig=function(e){var n=formatStorageExpires(e.storageExpires),e=getStoreInfo(e.aid,n);return{aid:0,pid:"",token:"",viewId:getViewId("_"),userId:e.userId,deviceId:e.deviceId,sessionId:getDefaultSessionId(),storageExpires:n,domain:REPORT_DOMAIN,plugins:{ajax:{ignoreUrls:DEFAULT_IGNORE_PATHS},fetch:{ignoreUrls:DEFAULT_IGNORE_PATHS},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1},release:"",env:"production",sample:__assign(__assign({},DEFAULT_SAMPLE_CONFIG),{r:e.r}),transport:getXhrTransport()}},createMinimalBrowserClient=function(e){var n=void 0===e?{}:e,t=n.createSender,e=n.builder,n=n.createDefaultConfig,r=createClient({validateInitConfig:validateInitConfig,initConfigNormalizer:normalizeInitConfig,userConfigNormalizer:normalizeUserConfig,createSender:void 0===t?function(e){return createBrowserSender({size:DEFAULT_SENDER_SIZE,endpoint:getReportUrl(e.domain),transport:e.transport})}:t,builder:void 0===e?browserBuilder:e,createDefaultConfig:void 0===n?getDefaultConfig:n,createConfigManager:createBrowserConfigManager});ContextPlugin(r);n=getGlobalRegistry(getDefaultBrowser());SubjectPlugin(r,n&&n.subject),TimeCalibrationPlugin(r),InjectConfigPlugin(r),InjectEnvPlugin(r),InjectNetworkTypePlugin(r),InjectQueryPlugin(r);n=withCommandArray(r,captureCurrentContext,function(e,n,t){return syncReportWithCapturedContext(e,n)(function(){var e=__read(t),n=e[0],e=e.slice(1);r[n].apply(r,__spreadArray([],__read(e),!1))})});return IntegrationPlugin(n,register),n};exports.createMinimalBrowserClient=createMinimalBrowserClient,exports.getDefaultConfig=getDefaultConfig;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __assign=function(){return(__assign=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function __rest(e,n){var t={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t}function __read(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function __spreadArray(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var DEFAULT_SIZE=10,DEFAULT_WAIT=1e3,stringifyBatch=function(e){return JSON.stringify({ev_type:"batch",list:e})};function createBatchSender(e){var t,r=e.transport,o=e.endpoint,n=e.size,i=void 0===n?DEFAULT_SIZE:n,e=e.wait,a=void 0===e?DEFAULT_WAIT:e,u=[],c=0;function s(){var n;u.length&&(n=this.getBatchData(),r.post({url:o,data:n,fail:function(e){t&&t(e,n)}}),u=[])}return{getSize:function(){return i},getWait:function(){return a},setSize:function(e){i=e},setWait:function(e){a=e},getEndpoint:function(){return o},setEndpoint:function(e){o=e},send:function(e){u.push(e),u.length>=i&&s.call(this),clearTimeout(c),c=setTimeout(s.bind(this),a)},flush:function(){clearTimeout(c),s.call(this)},getBatchData:function(){return u.length?stringifyBatch(u):""},clear:function(){clearTimeout(c),u=[]},fail:function(e){t=e}}}var EVENTS=["init","start","config","beforeDestroy","provide","beforeReport","report","beforeBuild","build","beforeSend","send","beforeConfig"],noop=function(){return{}};function isObject(e){return"object"==typeof e&&null!==e}var objProto=Object.prototype;function isPlainObject(e){if(isObject(e)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===objProto.toString.call(e);e=Object.getPrototypeOf(e);return e===objProto||null===e}return!1}function isArray(e){return"[object Array]"===objProto.toString.call(e)}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function hasKey(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function mergeDeepConcatArray(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var t={},r=0;r<e.length;)t=_mergeDeepMergeArray(t,e[r++]);return t}function _mergeDeepMergeArray(e,n){var t,r=__assign({},e);for(t in n)hasKey(n,t)&&void 0!==n[t]&&(isObject(n[t])&&isPlainObject(n[t])?r[t]=_mergeDeepMergeArray(isObject(e[t])?e[t]:{},n[t]):isArray(n[t])&&isArray(e[t])?r[t]=_mergeDeepArray(e[t],n[t]):r[t]=n[t]);return r}function _mergeDeepArray(e,n){e=isArray(e)?e:[],n=isArray(n)?n:[];return Array.prototype.concat.call(e,n).map(function(e){return e instanceof RegExp?e:isObject(e)&&isPlainObject(e)?_mergeDeepMergeArray({},e):isArray(e)?_mergeDeepArray([],e):e})}function arrayIncludes(e,n){if(!isArray(e))return!1;if(0===e.length)return!1;for(var t=0;t<e.length;){if(e[t]===n)return!0;t++}return!1}var arrayRemove=function(e,n){if(!isArray(e))return e;var t=e.indexOf(n);if(0<=t){n=e.slice();return n.splice(t,1),n}return e},safeVisit=function(e,n,t){for(var r,n=__read(n.split(".")),o=n[0],i=n.slice(1);e&&0<i.length;)e=e[o],o=(r=__read(i))[0],i=r.slice(1);if(e)return t(e,o)},safeCall=function(e,n,t){return safeVisit(e,n,function(e,n){if(e&&n in e&&isFunction(e[n]))try{return e[n].apply(e,t)}catch(e){return}})};function safeStringify(e){try{return isString(e)?e:JSON.stringify(e)}catch(e){return"[FAILED_TO_STRINGIFY]:"+String(e)}}var joinQueryWithMap=function(t){return isObject(t)?Object.keys(t).reduce(function(e,n){return e+="&"+n+"="+t[n]},"").replace("&","?"):""};function createContextAgent(){var t={},r={},o={set:function(e,n){return t[e]=n,r[e]=safeStringify(n),o},merge:function(n){return t=__assign(__assign({},t),n),Object.keys(n).forEach(function(e){r[e]=safeStringify(n[e])}),o},delete:function(e){return delete t[e],delete r[e],o},clear:function(){return t={},r={},o},get:function(e){return r[e]},toString:function(){return __assign({},r)}};return o}var hookObjectProperty=function(i,a,u,c){return void 0===c&&(c=!0),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!i)return noop;var t=i[a],r=u.apply(void 0,__spreadArray([t],__read(e),!1)),o=r;return isFunction(o)&&c&&(o=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];try{return r.apply(this,n)}catch(e){return isFunction(t)&&t.apply(this,n)}}),i[a]=o,function(e){e||(o===i[a]?i[a]=t:r=t)}}},getPrintString=function(){return"".padStart?function(e,n){return e.padStart(n=void 0===n?8:n," ")}:function(e){return e}},printString=getPrintString(),errCount=0,error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+errCount++)],__read(e),!1))},warnCount=0,warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.warn.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+warnCount++)],__read(e),!1))},runProcessors=function(r){return function(e){for(var n=e,t=0;t<r.length&&n;t++)try{n=r[t](n)}catch(e){error(e)}return n}},runFilters=function(r){return function(e){for(var n=!0,t=0;t<r.length&&n;t++)try{n=r[t](e)}catch(e){error(e)}return n}};function mathRNG(){for(var e=new Array(16),n=0,t=0;t<16;t++)0==(3&t)&&(n=4294967296*Math.random()),e[t]=n>>>((3&t)<<3)&255;return e}function bytesToUuid(e){for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);var r=0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[+r]],o[e[15]]].join("")}function uuid(){var e=mathRNG();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,bytesToUuid(e)}var BUFFER_TIME=3e5,applyBufferTimer=function(e,n,t){var r=0;return-1===t?noop:function(){if(e())return r&&clearTimeout(r),void(r=0);0===r&&(r=setTimeout(n,t))}},nextLink=function(r,e){var n=[];try{n=e.reduce(function(e,n){try{var t=n(r);"function"==typeof t&&e.push(t)}catch(e){}return e},[])}catch(e){}return function(e){return nextLink(e,n)}},toObservable=function(e){function n(e){r=arrayRemove(r,e),i||a()}var t,r=[],o=[],i=!1,a=applyBufferTimer(function(){return!!r.length},function(){i=!0,t&&t[0](),o.forEach(function(e){return e()}),o.length=0,t=void 0},e=void 0===e?BUFFER_TIME:e);return{next:function(e){return nextLink(e,r)},complete:function(e){o.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(i)throw new Error("Observer is closed");return r.push(e),t&&t[1]&&t[1](e),a(),function(){return n(e)}},unsubscribe:n}},createSafeObserver=function(e,n,t){t=toObservable(t);try{e(t.next,t.attach),n&&t.complete(n)}catch(e){}return[t.subscribe,t.unsubscribe]},wrapFilters=function(e,r){var o=__read(e,1)[0];return function(n,e){var t=o(function(e){return runFilters(r)(e)?n(e):noop});e(function(){t()})}};function createDestroyAgent(){function r(e){e.length&&e.forEach(function(e){try{e()}catch(e){}}),e.length=0}function n(e){i[e]&&i[e].forEach(function(e){r(e[1])}),i[e]=void 0}var o=!1,i={};return{set:function(e,n,t){i[e]?i[e].push([n,t]):i[e]=[[n,t]],o&&r(t)},has:function(e){return!!i[e]},remove:n,removeByEvType:function(n){Object.keys(i).forEach(function(e){i[e]&&i[e].forEach(function(e){e[0]===n&&r(e[1])})})},clear:function(){o=!0,Object.keys(i).forEach(function(e){n(e)})}}}function createClient(e){var t,r,n=e.builder,o=e.createSender,i=e.createDefaultConfig,a=e.createConfigManager,u=e.userConfigNormalizer,c=e.initConfigNormalizer,s=e.validateInitConfig,f={};EVENTS.forEach(function(e){return f[e]=[]});var l=!1,g=!1,d=!1,p=[],_=[],v=createDestroyAgent(),y={getBuilder:function(){return n},getSender:function(){return t},getPreStartQueue:function(){return p},init:function(e){if(l)warn("already inited");else{if(!(e&&isObject(e)&&s(e)))throw new Error("invalid InitConfig, init failed");var n=i(e);if(!n)throw new Error("defaultConfig missing");e=c(e);if((r=a(n)).setConfig(e),r.onChange(function(){S("config")}),!(t=o(r.getConfig())))throw new Error("sender missing");S("init",l=!0)}},set:function(e){l&&e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(e))},config:function(e){if(l)return e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(u(e))),null==r?void 0:r.getConfig()},provide:function(e,n){arrayIncludes(_,e)?warn("cannot provide "+e+", reserved"):(y[e]=n,S("provide",!1,e))},start:function(){var n=this;l&&(g||null!=r&&r.onReady(function(){S("start",g=!0),p.forEach(function(e){return n.build(e)}),p.length=0}))},report:function(e){e&&(!(e=runProcessors(f.beforeReport)(e))||(e=runProcessors(f.report)(e))&&(g?this.build(e):p.push(e)))},build:function(e){!g||(e=runProcessors(f.beforeBuild)(e))&&(!(e=n.build(e))||(e=runProcessors(f.build)(e))&&this.send(e))},send:function(e){!g||(e=runProcessors(f.beforeSend)(e))&&(t.send(e),S("send",!1,e))},destroy:function(){v.clear(),d=!0,S("beforeDestroy",!(p.length=0))},on:function(e,n){if("init"===e&&l||"start"===e&&g||"beforeDestroy"===e&&d)try{n()}catch(e){}else f[e]&&f[e].push(n)},off:function(e,n){f[e]&&(f[e]=arrayRemove(f[e],n))},destroyAgent:v},_=Object.keys(y);return y;function S(e,n){void 0===n&&(n=!1);for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];f[e].forEach(function(e){try{e.apply(void 0,__spreadArray([],__read(t),!1))}catch(e){}}),n&&(f[e].length=0)}}var ContextPlugin=function(e){var n=createContextAgent();e.provide("context",n),e.on("report",function(e){return e.extra||(e.extra={}),e.extra.context=n.toString(),e})},withCommandArray=function(i,a,t){function u(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o=e[0]){var t=o.split(".")[0];if(t in u)return safeCall(u,o,[].slice.call(e,1));var r=c[t]||[],o=null!==(o=null==a?void 0:a(i))&&void 0!==o?o:{};r.push(__spreadArray([o],__read(e),!1)),void(c[t]=r)}}var e,c={};for(e in hookObjectProperty(i,"provide",function(t){return function(e,n){u[e]=n,t.call(i,e,n)}})(),i)Object.prototype.hasOwnProperty.call(i,e)&&(u[e]=i[e]);return i.on("provide",function(e){c[e]&&(c[e].forEach(function(e){var n=__read(e),e=n[0],n=n.slice(1);null!=t&&t(i,e,n)}),c[e]=null)}),u};function IntegrationPlugin(r,o){r.on("init",function(){function e(e){e.forEach(function(e){var n=e.name;arrayIncludes(t,n)||(t.push(n),e.setup(r),o&&o(n,e.setup),r.destroyAgent.set(n,n,[function(){t=arrayRemove(t,n),e.tearDown&&e.tearDown()}]))})}var t=[];r.provide("applyIntegrations",e);var n=r.config();n&&n.integrations&&e(n.integrations)})}var SubjectSpacer="_",getSubjectKeyWithoutVersion=function(e){return e.split(SubjectSpacer)[0]};function SubjectPlugin(r,e){var o=e||{},i={};r.provide("setFilter",function(e,n){i[e]||(i[e]=[]),i[e].push(n)}),r.provide("initSubject",function(e){var n=__read(e,2),t=n[0],e=n[1],n=getSubjectKeyWithoutVersion(t),n=!!n&&i[n];return o[t]||(o[t]=createSafeObserver(e,function(){o[t]=void 0})),n?initPrivateSubject(r,[t,wrapFilters(o[t],n)]):o[t]}),r.provide("getSubject",function(e){return o[e]}),r.provide("privateSubject",{})}function initPrivateSubject(e,n,t){var n=__read(n,2),r=n[0],n=n[1],o=e.privateSubject||{};return o[r]||(o[r]=createSafeObserver(n,function(){o[r]=void 0},t)),o[r]}var now=function(){return Date.now()};function getDefaultBrowser(){if("object"==typeof window&&isObject(window))return window}function getDefaultDocument(){if("object"==typeof document&&isObject(document))return document}function getDefaultLocation(){return getDefaultBrowser()&&window.location}function getDefaultXMLHttpRequest(){if("function"==typeof XMLHttpRequest&&isFunction(XMLHttpRequest))return XMLHttpRequest}function getDefaultNavigator(){if(getDefaultBrowser()&&"navigator"in window)return window.navigator}function getDefaultNetworkInformation(){var e=getDefaultNavigator();if(e)return e.connection||e.mozConnection||e.webkitConnection}function getLocationUrl(){var e=getDefaultBrowser()&&getDefaultLocation();return e?e.href:""}var getGlobalRegistry=function(e){if(e)return e.__SLARDAR_REGISTRY__||(e.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),e.__SLARDAR_REGISTRY__.Slardar},captureCurrentContext=function(e){var n={url:getLocationUrl(),timestamp:now()},t=e.config();return null!=t&&t.pid&&(n.pid=t.pid),null!=e&&e.context&&(n.context=e.context.toString()),n},syncReportWithCapturedContext=function(t,r){return function(e){function n(e){return e.overrides=r,e}t.on("report",n),e(),t.off("report",n)}},addListenerToDocument=function(e,n,t,r){return void 0===r&&(r=!1),e.addEventListener(n,t,r),function(){e.removeEventListener(n,t,r)}},invokeCallbackOnce=function(n){var t=!1;return[function(e){t||(t=!0,n&&n(e))}]},onPageUnload=function(e){var n,t=getDefaultBrowser();t&&(n=__read(invokeCallbackOnce(e),1)[0],["unload","beforeunload","pagehide"].forEach(function(e){t.addEventListener(e,n)}))},onPageNextShow=function(e){var n,t=getDefaultDocument(),r=getDefaultBrowser();t&&r&&(n=noop,n=addListenerToDocument(t,"visibilitychange",function(){"visible"===t.visibilityState&&(e(),n())},!0))},isSupportEncrypt=function(){return!!btoa&&!!atob};function encodeToBase64(e){return isSupportEncrypt()?btoa(encodeURI(e)):e}function decodeWithBase64(e){return isSupportEncrypt()?decodeURI(atob(e)):e}var getStorageWithDecoding=function(e){try{var n=localStorage.getItem(e),t=n,r=t=n&&"string"==typeof n?JSON.parse(decodeWithBase64(n)):t,o=r.expires,i=__rest(r,["expires"]);return o>=now()?i:void 0}catch(e){return}},setStorageWithEncoding=function(e,n,t){if(!(t<=0))try{localStorage.setItem(e,encodeToBase64(JSON.stringify(__assign(__assign({},n),{expires:now()+t}))))}catch(e){}},DEFAULT_STORAGE_EXPIRES=7776e6,formatStorageExpires=function(e){return!1===e?0:!0!==e&&void 0!==e&&isNumber(e)?e:DEFAULT_STORAGE_EXPIRES},getViewId=function(e){return joinWithSeparator(e,now())},joinWithSeparator=function(e,n){return e+"_"+n};function getNetworkType(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var InjectNetworkTypePlugin=function(e){var n=getDefaultNetworkInformation(),t=getNetworkType(n);n&&(n.onchange=function(){t=getNetworkType(n)}),e.on("report",function(e){return __assign(__assign({},e),{extra:__assign(__assign({},e.extra||{}),{network_type:t})})})},getBeaconTransport=function(){var t=getDefaultBrowser();return t&&t.navigator.sendBeacon?{get:function(){},post:function(e,n){t.navigator.sendBeacon(e,n)}}:{get:noop,post:noop}},request=function(e,n,t){var r=n.url,o=n.data,i=n.success,a=void 0===i?noop:i,i=n.fail,u=void 0===i?noop:i,i=n.getResponseText,c=void 0===i?noop:i,n=n.withCredentials,n=void 0!==n&&n,t=new t;t.withCredentials=n,t.open(e,r,!0),t.setRequestHeader("Content-Type","application/json"),t.onload=function(){null!=c&&c(this.responseText);try{var e;this.responseText?(e=JSON.parse(this.responseText),a(e)):a({})}catch(e){u(e)}},t.onerror=function(){u(new Error("Network request failed"))},t.onabort=function(){u(new Error("Network request aborted"))},t.send(o)},getXhrTransport=function(){var n=getDefaultXMLHttpRequest();return n?{useBeacon:!0,get:function(e){request("GET",e,n)},post:function(e){request("POST",e,n)}}:{get:noop,post:noop}};function createBrowserSender(t){var r=createBatchSender(t),o=r.send;return onPageUnload(function(){var n,e;t.transport.useBeacon?(n=getBeaconTransport(),(e=r.getBatchData())&&(n.post(r.getEndpoint(),e),r.clear()),r.send=function(e){n.post(r.getEndpoint(),stringifyBatch([e]))},onPageNextShow(function(){r.send=o})):r.flush()}),r}var browserBuilder={build:function(e){return{ev_type:e.ev_type,payload:e.payload,common:__assign(__assign({},e.extra||{}),e.overrides||{})}}},REPORT_DOMAIN="apmplus.volces.com",SDK_VERSION="2.7.3",SDK_NAME="APM_PLUS_WEB",SETTINGS_PATH="/settings/get/webpro",BATCH_REPORT_PATH="/monitor_web/collect",STORAGE_PREFIX="APMPLUS",DEFAULT_IGNORE_PATHS=[BATCH_REPORT_PATH,SETTINGS_PATH,"/monitor_browser/collect"],DEFAULT_SAMPLE_GRANULARITY="session",DEFAULT_SAMPLE_CONFIG={sample_rate:1,include_users:[],sample_granularity:DEFAULT_SAMPLE_GRANULARITY,rules:{}},DEFAULT_SENDER_SIZE=20;function normalizeInitConfig(e){var n,t=e.plugins||{};for(n in t)t[n]&&!isObject(t[n])&&(t[n]={});return __assign(__assign({},e),{plugins:t})}function validateInitConfig(e){return isObject(e)&&"aid"in e}function normalizeUserConfig(e){return __assign({},e)}function parseServerConfig(e){if(!e)return{};var n=e.sample,t=e.timestamp,r=e.status,o=e.apdex;if(!n)return{};var i=n.sample_rate,a=n.sample_granularity,e=n.include_users,n=n.rules;return{sample:{include_users:e,sample_rate:r&&4===r?0:i,sample_granularity:void 0===a?DEFAULT_SAMPLE_GRANULARITY:a,rules:(void 0===n?[]:n).reduce(function(e,n){var t=n.name,r=n.enable,o=n.sample_rate,n=n.conditional_sample_rules;return e[t]={enable:r,sample_rate:o,conditional_sample_rules:n},e},{})},apdex:o,serverTimestamp:t}}var getReportUrl=function(e,n){return void 0===n&&(n=BATCH_REPORT_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getSettingsUrl=function(e,n){return void 0===n&&(n=SETTINGS_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getDefaultSessionId=function(){return uuid()},getStorageKey=function(e){return STORAGE_PREFIX+e},glueCodeForStorageSecurity=function(e,n){try{var t=localStorage.getItem(e);if(!t||!isSupportEncrypt()||"{"!==t[0])return;setStorageWithEncoding(e,JSON.parse(t),n)}catch(e){}},getStoreInfo=function(e,n){void 0===e&&(e=0);var t={userId:uuid(),deviceId:uuid(),r:Math.random()};if(n<=0)return t;e=getStorageKey(e);return glueCodeForStorageSecurity(e,n),getStorageWithDecoding(e)||t},saveStoreInfo=function(e){var n=e.aid,t=e.userId,r=e.deviceId,o=e.sample,e=e.storageExpires,n=getStorageKey(n);setStorageWithEncoding(n,{userId:t,deviceId:r,r:o.r},formatStorageExpires(e))},createBrowserConfigManager=function(n){var t,r,o,i=n,a={},u=noop,c=noop;return{getConfig:function(){return i},setConfig:function(e){return a=__assign(__assign({},a),e||{}),s(),t||(t=e,i.useLocalConfig?(o={},u()):r?f():getServerConfig(i.transport,i.domain,i.aid,function(e){r=e,f()})),i},onChange:function(e){c=e},onReady:function(e){u=function(){!function(){n.userId!==i.userId&&(n.sample.r=Math.random(),s());saveStoreInfo(i)}(),e()},o&&u()}};function s(){var e=__assign(__assign(__assign({},n),o||{}),a);e.plugins=mergeDeepConcatArray(n.plugins,(null==o?void 0:o.plugins)||{},a.plugins||{}),e.sample=mergeSampleConfig(mergeSampleConfig(n.sample,null==o?void 0:o.sample),a.sample),i=e,c()}function f(){o=parseServerConfig(r),s(),u()}};function getServerConfig(e,n,t,r){e.get({withCredentials:!0,url:getSettingsUrl(n)+"?aid="+t,success:function(e){r(e.data||{})},fail:function(){r({sample:{sample_rate:.001}})}})}function mergeSampleConfig(r,o){if(!r||!o)return r||o;var e=__assign(__assign({},r),o);return e.include_users=__spreadArray(__spreadArray([],__read(r.include_users||[]),!1),__read(o.include_users||[]),!1),e.rules=__spreadArray(__spreadArray([],__read(Object.keys(r.rules||{})),!1),__read(Object.keys(o.rules||{})),!1).reduce(function(e,n){var t;return n in e||(n in(r.rules||{})&&n in(o.rules||{})?(e[n]=__assign(__assign({},r.rules[n]),o.rules[n]),e[n].conditional_sample_rules=__spreadArray(__spreadArray([],__read(r.rules[n].conditional_sample_rules||[]),!1),__read(o.rules[n].conditional_sample_rules||[]),!1)):e[n]=(null===(t=r.rules)||void 0===t?void 0:t[n])||(null===(t=o.rules)||void 0===t?void 0:t[n])),e},{}),e}function getPluginFromRegistry(e,n){return e.plugins.filter(function(e){return e.name===n&&e.version===SDK_VERSION})[0]}function register(e,n,t){(t=void 0===t?getGlobalRegistry(getDefaultBrowser()):t)&&t.plugins&&(getPluginFromRegistry(t,e)||t.plugins.push({name:e,version:SDK_VERSION,apply:n}))}var addEnvToSendEvent=function(e,n){var t=n||{},n=t.pid,n=void 0===n?"":n,t=t.viewId,t=void 0===t?"":t,t={url:getLocationUrl(),timestamp:Date.now(),pid:n,view_id:t};return __assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectEnvPlugin=function(n){n.on("report",function(e){return addEnvToSendEvent(e,n.config())})},MAX_RTT=700,TimeCalibrationPlugin=function(t){var r,o=!1;t.on("init",function(){r=(new Date).getTime(),t.on("config",function(){var e,n=null===(e=t.config())||void 0===e?void 0:e.serverTimestamp;isNaN(n)||Number(n)<=0||o||(o=!0,(e=(new Date).getTime())-r<MAX_RTT&&n&&(e=n-(e+r)/2,!isNaN(e)&&(0<e||e<-6e5)&&t.set({offset:e})))})})},addConfigToReportEvent=function(e,n){var t={};return t.aid=n.aid,t.user_id=n.userId,__assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectConfigPlugin=function(n){n.on("beforeBuild",function(e){return addConfigToReportEvent(e,n.config())})},InjectQueryPlugin=function(u){u.on("start",function(){var e=u.config(),n=e.deviceId,t=e.sessionId,r=e.release,o=e.env,i=e.offset,a=e.aid,e=e.token,a={did:n,sid:t,release:r,env:o,sname:SDK_NAME,sversion:SDK_VERSION,soffset:i||0,biz_id:a,x_auth_token:e},e=u.getSender();e.setEndpoint(e.getEndpoint()+joinQueryWithMap(a))})},getDefaultConfig=function(e){var n=formatStorageExpires(e.storageExpires),e=getStoreInfo(e.aid,n);return{aid:0,pid:"",token:"",viewId:getViewId("_"),userId:e.userId,deviceId:e.deviceId,sessionId:getDefaultSessionId(),storageExpires:n,domain:REPORT_DOMAIN,plugins:{ajax:{ignoreUrls:DEFAULT_IGNORE_PATHS},fetch:{ignoreUrls:DEFAULT_IGNORE_PATHS},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1},release:"",env:"production",sample:__assign(__assign({},DEFAULT_SAMPLE_CONFIG),{r:e.r}),transport:getXhrTransport()}},createMinimalBrowserClient=function(e){var n=void 0===e?{}:e,t=n.createSender,e=n.builder,n=n.createDefaultConfig,r=createClient({validateInitConfig:validateInitConfig,initConfigNormalizer:normalizeInitConfig,userConfigNormalizer:normalizeUserConfig,createSender:void 0===t?function(e){return createBrowserSender({size:DEFAULT_SENDER_SIZE,endpoint:getReportUrl(e.domain),transport:e.transport})}:t,builder:void 0===e?browserBuilder:e,createDefaultConfig:void 0===n?getDefaultConfig:n,createConfigManager:createBrowserConfigManager});ContextPlugin(r);n=getGlobalRegistry(getDefaultBrowser());SubjectPlugin(r,n&&n.subject),TimeCalibrationPlugin(r),InjectConfigPlugin(r),InjectEnvPlugin(r),InjectNetworkTypePlugin(r),InjectQueryPlugin(r);n=withCommandArray(r,captureCurrentContext,function(e,n,t){return syncReportWithCapturedContext(e,n)(function(){var e=__read(t),n=e[0],e=e.slice(1);r[n].apply(r,__spreadArray([],__read(e),!1))})});return IntegrationPlugin(n,register),n};exports.createMinimalBrowserClient=createMinimalBrowserClient,exports.getDefaultConfig=getDefaultConfig;

@@ -1,1 +0,1 @@

var __assign=function(){return(__assign=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function __rest(e,n){var t={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t}function __read(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function __spreadArray(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var DEFAULT_SIZE=10,DEFAULT_WAIT=1e3,stringifyBatch=function(e){return JSON.stringify({ev_type:"batch",list:e})};function createBatchSender(e){var t,r=e.transport,o=e.endpoint,n=e.size,i=void 0===n?DEFAULT_SIZE:n,e=e.wait,a=void 0===e?DEFAULT_WAIT:e,u=[],c=0;function s(){var n;u.length&&(n=this.getBatchData(),r.post({url:o,data:n,fail:function(e){t&&t(e,n)}}),u=[])}return{getSize:function(){return i},getWait:function(){return a},setSize:function(e){i=e},setWait:function(e){a=e},getEndpoint:function(){return o},setEndpoint:function(e){o=e},send:function(e){u.push(e),u.length>=i&&s.call(this),clearTimeout(c),c=setTimeout(s.bind(this),a)},flush:function(){clearTimeout(c),s.call(this)},getBatchData:function(){return u.length?stringifyBatch(u):""},clear:function(){clearTimeout(c),u=[]},fail:function(e){t=e}}}var EVENTS=["init","start","config","beforeDestroy","provide","beforeReport","report","beforeBuild","build","beforeSend","send","beforeConfig"],noop=function(){return{}};function isObject(e){return"object"==typeof e&&null!==e}var objProto=Object.prototype;function isPlainObject(e){if(isObject(e)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===objProto.toString.call(e);e=Object.getPrototypeOf(e);return e===objProto||null===e}return!1}function isArray(e){return"[object Array]"===objProto.toString.call(e)}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function hasKey(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function mergeDeepConcatArray(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var t={},r=0;r<e.length;)t=_mergeDeepMergeArray(t,e[r++]);return t}function _mergeDeepMergeArray(e,n){var t,r=__assign({},e);for(t in n)hasKey(n,t)&&void 0!==n[t]&&(isObject(n[t])&&isPlainObject(n[t])?r[t]=_mergeDeepMergeArray(isObject(e[t])?e[t]:{},n[t]):isArray(n[t])&&isArray(e[t])?r[t]=_mergeDeepArray(e[t],n[t]):r[t]=n[t]);return r}function _mergeDeepArray(e,n){e=isArray(e)?e:[],n=isArray(n)?n:[];return Array.prototype.concat.call(e,n).map(function(e){return e instanceof RegExp?e:isObject(e)&&isPlainObject(e)?_mergeDeepMergeArray({},e):isArray(e)?_mergeDeepArray([],e):e})}function arrayIncludes(e,n){if(!isArray(e))return!1;if(0===e.length)return!1;for(var t=0;t<e.length;){if(e[t]===n)return!0;t++}return!1}var arrayRemove=function(e,n){if(!isArray(e))return e;var t=e.indexOf(n);if(0<=t){n=e.slice();return n.splice(t,1),n}return e},safeVisit=function(e,n,t){for(var r,n=__read(n.split(".")),o=n[0],i=n.slice(1);e&&0<i.length;)e=e[o],o=(r=__read(i))[0],i=r.slice(1);if(e)return t(e,o)},safeCall=function(e,n,t){return safeVisit(e,n,function(e,n){if(e&&n in e&&isFunction(e[n]))try{return e[n].apply(e,t)}catch(e){return}})};function safeStringify(e){try{return isString(e)?e:JSON.stringify(e)}catch(e){return"[FAILED_TO_STRINGIFY]:"+String(e)}}var joinQueryWithMap=function(t){return isObject(t)?Object.keys(t).reduce(function(e,n){return e+="&"+n+"="+t[n]},"").replace("&","?"):""};function createContextAgent(){var t={},r={},o={set:function(e,n){return t[e]=n,r[e]=safeStringify(n),o},merge:function(n){return t=__assign(__assign({},t),n),Object.keys(n).forEach(function(e){r[e]=safeStringify(n[e])}),o},delete:function(e){return delete t[e],delete r[e],o},clear:function(){return t={},r={},o},get:function(e){return r[e]},toString:function(){return __assign({},r)}};return o}var hookObjectProperty=function(i,a,u,c){return void 0===c&&(c=!0),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!i)return noop;var t=i[a],r=u.apply(void 0,__spreadArray([t],__read(e),!1)),o=r;return isFunction(o)&&c&&(o=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];try{return r.apply(this,n)}catch(e){return isFunction(t)&&t.apply(this,n)}}),i[a]=o,function(e){e||(o===i[a]?i[a]=t:r=t)}}},getPrintString=function(){return"".padStart?function(e,n){return e.padStart(n=void 0===n?8:n," ")}:function(e){return e}},printString=getPrintString(),errCount=0,error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+errCount++)],__read(e),!1))},warnCount=0,warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.warn.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+warnCount++)],__read(e),!1))},runProcessors=function(r){return function(e){for(var n=e,t=0;t<r.length&&n;t++)try{n=r[t](n)}catch(e){error(e)}return n}},runFilters=function(r){return function(e){for(var n=!0,t=0;t<r.length&&n;t++)try{n=r[t](e)}catch(e){error(e)}return n}};function mathRNG(){for(var e=new Array(16),n=0,t=0;t<16;t++)0==(3&t)&&(n=4294967296*Math.random()),e[t]=n>>>((3&t)<<3)&255;return e}function bytesToUuid(e){for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);var r=0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[+r]],o[e[15]]].join("")}function uuid(){var e=mathRNG();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,bytesToUuid(e)}var BUFFER_TIME=3e5,applyBufferTimer=function(e,n,t){var r=0;return-1===t?noop:function(){if(e())return r&&clearTimeout(r),void(r=0);0===r&&(r=setTimeout(n,t))}},nextLink=function(r,e){var n=[];try{n=e.reduce(function(e,n){try{var t=n(r);"function"==typeof t&&e.push(t)}catch(e){}return e},[])}catch(e){}return function(e){return nextLink(e,n)}},toObservable=function(e){function n(e){r=arrayRemove(r,e),i||a()}var t,r=[],o=[],i=!1,a=applyBufferTimer(function(){return!!r.length},function(){i=!0,t&&t[0](),o.forEach(function(e){return e()}),o.length=0,t=void 0},e=void 0===e?BUFFER_TIME:e);return{next:function(e){return nextLink(e,r)},complete:function(e){o.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(i)throw new Error("Observer is closed");return r.push(e),t&&t[1]&&t[1](e),a(),function(){return n(e)}},unsubscribe:n}},createSafeObserver=function(e,n,t){t=toObservable(t);try{e(t.next,t.attach),n&&t.complete(n)}catch(e){}return[t.subscribe,t.unsubscribe]},wrapFilters=function(e,r){var o=__read(e,1)[0];return function(n,e){var t=o(function(e){return runFilters(r)(e)?n(e):noop});e(function(){t()})}};function createDestroyAgent(){function r(e){e.length&&e.forEach(function(e){try{e()}catch(e){}}),e.length=0}function n(e){i[e]&&i[e].forEach(function(e){r(e[1])}),i[e]=void 0}var o=!1,i={};return{set:function(e,n,t){i[e]?i[e].push([n,t]):i[e]=[[n,t]],o&&r(t)},has:function(e){return!!i[e]},remove:n,removeByEvType:function(n){Object.keys(i).forEach(function(e){i[e]&&i[e].forEach(function(e){e[0]===n&&r(e[1])})})},clear:function(){o=!0,Object.keys(i).forEach(function(e){n(e)})}}}function createClient(e){var t,r,n=e.builder,o=e.createSender,i=e.createDefaultConfig,a=e.createConfigManager,u=e.userConfigNormalizer,c=e.initConfigNormalizer,s=e.validateInitConfig,f={};EVENTS.forEach(function(e){return f[e]=[]});var l=!1,g=!1,d=!1,p=[],_=[],v=createDestroyAgent(),y={getBuilder:function(){return n},getSender:function(){return t},getPreStartQueue:function(){return p},init:function(e){if(l)warn("already inited");else{if(!(e&&isObject(e)&&s(e)))throw new Error("invalid InitConfig, init failed");var n=i(e);if(!n)throw new Error("defaultConfig missing");e=c(e);if((r=a(n)).setConfig(e),r.onChange(function(){S("config")}),!(t=o(r.getConfig())))throw new Error("sender missing");S("init",l=!0)}},set:function(e){l&&e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(e))},config:function(e){if(l)return e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(u(e))),null==r?void 0:r.getConfig()},provide:function(e,n){arrayIncludes(_,e)?warn("cannot provide "+e+", reserved"):(y[e]=n,S("provide",!1,e))},start:function(){var n=this;l&&(g||null!=r&&r.onReady(function(){S("start",g=!0),p.forEach(function(e){return n.build(e)}),p.length=0}))},report:function(e){e&&(!(e=runProcessors(f.beforeReport)(e))||(e=runProcessors(f.report)(e))&&(g?this.build(e):p.push(e)))},build:function(e){!g||(e=runProcessors(f.beforeBuild)(e))&&(!(e=n.build(e))||(e=runProcessors(f.build)(e))&&this.send(e))},send:function(e){!g||(e=runProcessors(f.beforeSend)(e))&&(t.send(e),S("send",!1,e))},destroy:function(){v.clear(),d=!0,S("beforeDestroy",!(p.length=0))},on:function(e,n){if("init"===e&&l||"start"===e&&g||"beforeDestroy"===e&&d)try{n()}catch(e){}else f[e]&&f[e].push(n)},off:function(e,n){f[e]&&(f[e]=arrayRemove(f[e],n))},destroyAgent:v},_=Object.keys(y);return y;function S(e,n){void 0===n&&(n=!1);for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];f[e].forEach(function(e){try{e.apply(void 0,__spreadArray([],__read(t),!1))}catch(e){}}),n&&(f[e].length=0)}}var ContextPlugin=function(e){var n=createContextAgent();e.provide("context",n),e.on("report",function(e){return e.extra||(e.extra={}),e.extra.context=n.toString(),e})},withCommandArray=function(i,a,t){function u(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o=e[0]){var t=o.split(".")[0];if(t in u)return safeCall(u,o,[].slice.call(e,1));var r=c[t]||[],o=null!==(o=null==a?void 0:a(i))&&void 0!==o?o:{};r.push(__spreadArray([o],__read(e),!1)),void(c[t]=r)}}var e,c={};for(e in hookObjectProperty(i,"provide",function(t){return function(e,n){u[e]=n,t.call(i,e,n)}})(),i)Object.prototype.hasOwnProperty.call(i,e)&&(u[e]=i[e]);return i.on("provide",function(e){c[e]&&(c[e].forEach(function(e){var n=__read(e),e=n[0],n=n.slice(1);null!=t&&t(i,e,n)}),c[e]=null)}),u};function IntegrationPlugin(r,o){r.on("init",function(){function e(e){e.forEach(function(e){var n=e.name;arrayIncludes(t,n)||(t.push(n),e.setup(r),o&&o(n,e.setup),r.destroyAgent.set(n,n,[function(){t=arrayRemove(t,n),e.tearDown&&e.tearDown()}]))})}var t=[];r.provide("applyIntegrations",e);var n=r.config();n&&n.integrations&&e(n.integrations)})}var SubjectSpacer="_",getSubjectKeyWithoutVersion=function(e){return e.split(SubjectSpacer)[0]};function SubjectPlugin(r,e){var o=e||{},i={};r.provide("setFilter",function(e,n){i[e]||(i[e]=[]),i[e].push(n)}),r.provide("initSubject",function(e){var n=__read(e,2),t=n[0],e=n[1],n=getSubjectKeyWithoutVersion(t),n=!!n&&i[n];return o[t]||(o[t]=createSafeObserver(e,function(){o[t]=void 0})),n?initPrivateSubject(r,[t,wrapFilters(o[t],n)]):o[t]}),r.provide("getSubject",function(e){return o[e]}),r.provide("privateSubject",{})}function initPrivateSubject(e,n,t){var n=__read(n,2),r=n[0],n=n[1],o=e.privateSubject||{};return o[r]||(o[r]=createSafeObserver(n,function(){o[r]=void 0},t)),o[r]}var now=function(){return Date.now()};function getDefaultBrowser(){if("object"==typeof window&&isObject(window))return window}function getDefaultDocument(){if("object"==typeof document&&isObject(document))return document}function getDefaultLocation(){return getDefaultBrowser()&&window.location}function getDefaultXMLHttpRequest(){if("function"==typeof XMLHttpRequest&&isFunction(XMLHttpRequest))return XMLHttpRequest}function getDefaultNavigator(){if(getDefaultBrowser()&&"navigator"in window)return window.navigator}function getDefaultNetworkInformation(){var e=getDefaultNavigator();if(e)return e.connection||e.mozConnection||e.webkitConnection}function getLocationUrl(){var e=getDefaultBrowser()&&getDefaultLocation();return e?e.href:""}var getGlobalRegistry=function(e){if(e)return e.__SLARDAR_REGISTRY__||(e.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),e.__SLARDAR_REGISTRY__.Slardar},captureCurrentContext=function(e){var n={url:getLocationUrl(),timestamp:now()},t=e.config();return null!=t&&t.pid&&(n.pid=t.pid),null!=e&&e.context&&(n.context=e.context.toString()),n},syncReportWithCapturedContext=function(t,r){return function(e){function n(e){return e.overrides=r,e}t.on("report",n),e(),t.off("report",n)}},addListenerToDocument=function(e,n,t,r){return void 0===r&&(r=!1),e.addEventListener(n,t,r),function(){e.removeEventListener(n,t,r)}},invokeCallbackOnce=function(n){var t=!1;return[function(e){t||(t=!0,n&&n(e))}]},onPageUnload=function(e){var n,t=getDefaultBrowser();t&&(n=__read(invokeCallbackOnce(e),1)[0],["unload","beforeunload","pagehide"].forEach(function(e){t.addEventListener(e,n)}))},onPageNextShow=function(e){var n,t=getDefaultDocument(),r=getDefaultBrowser();t&&r&&(n=noop,n=addListenerToDocument(t,"visibilitychange",function(){"visible"===t.visibilityState&&(e(),n())},!0))},isSupportEncrypt=function(){return!!btoa&&!!atob};function encodeToBase64(e){return isSupportEncrypt()?btoa(encodeURI(e)):e}function decodeWithBase64(e){return isSupportEncrypt()?decodeURI(atob(e)):e}var getStorageWithDecoding=function(e){try{var n=localStorage.getItem(e),t=n,r=t=n&&"string"==typeof n?JSON.parse(decodeWithBase64(n)):t,o=r.expires,i=__rest(r,["expires"]);return o>=now()?i:void 0}catch(e){return}},setStorageWithEncoding=function(e,n,t){if(!(t<=0))try{localStorage.setItem(e,encodeToBase64(JSON.stringify(__assign(__assign({},n),{expires:now()+t}))))}catch(e){}},DEFAULT_STORAGE_EXPIRES=7776e6,formatStorageExpires=function(e){return!1===e?0:!0!==e&&void 0!==e&&isNumber(e)?e:DEFAULT_STORAGE_EXPIRES},getViewId=function(e){return joinWithSeparator(e,now())},joinWithSeparator=function(e,n){return e+"_"+n};function getNetworkType(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var InjectNetworkTypePlugin=function(e){var n=getDefaultNetworkInformation(),t=getNetworkType(n);n&&(n.onchange=function(){t=getNetworkType(n)}),e.on("report",function(e){return __assign(__assign({},e),{extra:__assign(__assign({},e.extra||{}),{network_type:t})})})},getBeaconTransport=function(){var t=getDefaultBrowser();return t&&t.navigator.sendBeacon?{get:function(){},post:function(e,n){t.navigator.sendBeacon(e,n)}}:{get:noop,post:noop}},request=function(e,n,t){var r=n.url,o=n.data,i=n.success,a=void 0===i?noop:i,i=n.fail,u=void 0===i?noop:i,i=n.getResponseText,c=void 0===i?noop:i,n=n.withCredentials,n=void 0!==n&&n,t=new t;t.withCredentials=n,t.open(e,r,!0),t.setRequestHeader("Content-Type","application/json"),t.onload=function(){null!=c&&c(this.responseText);try{var e;this.responseText?(e=JSON.parse(this.responseText),a(e)):a({})}catch(e){u(e)}},t.onerror=function(){u(new Error("Network request failed"))},t.onabort=function(){u(new Error("Network request aborted"))},t.send(o)},getXhrTransport=function(){var n=getDefaultXMLHttpRequest();return n?{useBeacon:!0,get:function(e){request("GET",e,n)},post:function(e){request("POST",e,n)}}:{get:noop,post:noop}};function createBrowserSender(t){var r=createBatchSender(t),o=r.send;return onPageUnload(function(){var n,e;t.transport.useBeacon?(n=getBeaconTransport(),(e=r.getBatchData())&&(n.post(r.getEndpoint(),e),r.clear()),r.send=function(e){n.post(r.getEndpoint(),stringifyBatch([e]))},onPageNextShow(function(){r.send=o})):r.flush()}),r}var browserBuilder={build:function(e){return{ev_type:e.ev_type,payload:e.payload,common:__assign(__assign({},e.extra||{}),e.overrides||{})}}},REPORT_DOMAIN="apmplus.volces.com",SDK_VERSION="2.7.3-alpha.1",SDK_NAME="APM_PLUS_WEB",SETTINGS_PATH="/settings/get/webpro",BATCH_REPORT_PATH="/monitor_web/collect",STORAGE_PREFIX="APMPLUS",DEFAULT_IGNORE_PATHS=[BATCH_REPORT_PATH,SETTINGS_PATH,"/monitor_browser/collect"],DEFAULT_SAMPLE_GRANULARITY="session",DEFAULT_SAMPLE_CONFIG={sample_rate:1,include_users:[],sample_granularity:DEFAULT_SAMPLE_GRANULARITY,rules:{}},DEFAULT_SENDER_SIZE=20;function normalizeInitConfig(e){var n,t=e.plugins||{};for(n in t)t[n]&&!isObject(t[n])&&(t[n]={});return __assign(__assign({},e),{plugins:t})}function validateInitConfig(e){return isObject(e)&&"aid"in e}function normalizeUserConfig(e){return __assign({},e)}function parseServerConfig(e){if(!e)return{};var n=e.sample,t=e.timestamp,r=e.status,o=e.apdex;if(!n)return{};var i=n.sample_rate,a=n.sample_granularity,e=n.include_users,n=n.rules;return{sample:{include_users:e,sample_rate:r&&4===r?0:i,sample_granularity:void 0===a?DEFAULT_SAMPLE_GRANULARITY:a,rules:(void 0===n?[]:n).reduce(function(e,n){var t=n.name,r=n.enable,o=n.sample_rate,n=n.conditional_sample_rules;return e[t]={enable:r,sample_rate:o,conditional_sample_rules:n},e},{})},apdex:o,serverTimestamp:t}}var getReportUrl=function(e,n){return void 0===n&&(n=BATCH_REPORT_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getSettingsUrl=function(e,n){return void 0===n&&(n=SETTINGS_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getDefaultSessionId=function(){return uuid()},getStorageKey=function(e){return STORAGE_PREFIX+e},glueCodeForStorageSecurity=function(e,n){try{var t=localStorage.getItem(e);if(!t||!isSupportEncrypt()||"{"!==t[0])return;setStorageWithEncoding(e,JSON.parse(t),n)}catch(e){}},getStoreInfo=function(e,n){void 0===e&&(e=0);var t={userId:uuid(),deviceId:uuid(),r:Math.random()};if(n<=0)return t;e=getStorageKey(e);return glueCodeForStorageSecurity(e,n),getStorageWithDecoding(e)||t},saveStoreInfo=function(e){var n=e.aid,t=e.userId,r=e.deviceId,o=e.sample,e=e.storageExpires,n=getStorageKey(n);setStorageWithEncoding(n,{userId:t,deviceId:r,r:o.r},formatStorageExpires(e))},createBrowserConfigManager=function(n){var t,r,o,i=n,a={},u=noop,c=noop;return{getConfig:function(){return i},setConfig:function(e){return a=__assign(__assign({},a),e||{}),s(),t||(t=e,i.useLocalConfig?(o={},u()):r?f():getServerConfig(i.transport,i.domain,i.aid,function(e){r=e,f()})),i},onChange:function(e){c=e},onReady:function(e){u=function(){!function(){n.userId!==i.userId&&(n.sample.r=Math.random(),s());saveStoreInfo(i)}(),e()},o&&u()}};function s(){var e=__assign(__assign(__assign({},n),o||{}),a);e.plugins=mergeDeepConcatArray(n.plugins,(null==o?void 0:o.plugins)||{},a.plugins||{}),e.sample=mergeSampleConfig(mergeSampleConfig(n.sample,null==o?void 0:o.sample),a.sample),i=e,c()}function f(){o=parseServerConfig(r),s(),u()}};function getServerConfig(e,n,t,r){e.get({withCredentials:!0,url:getSettingsUrl(n)+"?aid="+t,success:function(e){r(e.data||{})},fail:function(){r({sample:{sample_rate:.001}})}})}function mergeSampleConfig(r,o){if(!r||!o)return r||o;var e=__assign(__assign({},r),o);return e.include_users=__spreadArray(__spreadArray([],__read(r.include_users||[]),!1),__read(o.include_users||[]),!1),e.rules=__spreadArray(__spreadArray([],__read(Object.keys(r.rules||{})),!1),__read(Object.keys(o.rules||{})),!1).reduce(function(e,n){var t;return n in e||(n in(r.rules||{})&&n in(o.rules||{})?(e[n]=__assign(__assign({},r.rules[n]),o.rules[n]),e[n].conditional_sample_rules=__spreadArray(__spreadArray([],__read(r.rules[n].conditional_sample_rules||[]),!1),__read(o.rules[n].conditional_sample_rules||[]),!1)):e[n]=(null===(t=r.rules)||void 0===t?void 0:t[n])||(null===(t=o.rules)||void 0===t?void 0:t[n])),e},{}),e}function getPluginFromRegistry(e,n){return e.plugins.filter(function(e){return e.name===n&&e.version===SDK_VERSION})[0]}function register(e,n,t){(t=void 0===t?getGlobalRegistry(getDefaultBrowser()):t)&&t.plugins&&(getPluginFromRegistry(t,e)||t.plugins.push({name:e,version:SDK_VERSION,apply:n}))}var addEnvToSendEvent=function(e,n){var t=n||{},n=t.pid,n=void 0===n?"":n,t=t.viewId,t=void 0===t?"":t,t={url:getLocationUrl(),timestamp:Date.now(),pid:n,view_id:t};return __assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectEnvPlugin=function(n){n.on("report",function(e){return addEnvToSendEvent(e,n.config())})},MAX_RTT=700,TimeCalibrationPlugin=function(t){var r,o=!1;t.on("init",function(){r=(new Date).getTime(),t.on("config",function(){var e,n=null===(e=t.config())||void 0===e?void 0:e.serverTimestamp;isNaN(n)||Number(n)<=0||o||(o=!0,(e=(new Date).getTime())-r<MAX_RTT&&n&&(e=n-(e+r)/2,!isNaN(e)&&(0<e||e<-6e5)&&t.set({offset:e})))})})},addConfigToReportEvent=function(e,n){var t={};return t.aid=n.aid,t.user_id=n.userId,__assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectConfigPlugin=function(n){n.on("beforeBuild",function(e){return addConfigToReportEvent(e,n.config())})},InjectQueryPlugin=function(u){u.on("start",function(){var e=u.config(),n=e.deviceId,t=e.sessionId,r=e.release,o=e.env,i=e.offset,a=e.aid,e=e.token,a={did:n,sid:t,release:r,env:o,sname:SDK_NAME,sversion:SDK_VERSION,soffset:i||0,biz_id:a,x_auth_token:e},e=u.getSender();e.setEndpoint(e.getEndpoint()+joinQueryWithMap(a))})},getDefaultConfig=function(e){var n=formatStorageExpires(e.storageExpires),e=getStoreInfo(e.aid,n);return{aid:0,pid:"",token:"",viewId:getViewId("_"),userId:e.userId,deviceId:e.deviceId,sessionId:getDefaultSessionId(),storageExpires:n,domain:REPORT_DOMAIN,plugins:{ajax:{ignoreUrls:DEFAULT_IGNORE_PATHS},fetch:{ignoreUrls:DEFAULT_IGNORE_PATHS},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1},release:"",env:"production",sample:__assign(__assign({},DEFAULT_SAMPLE_CONFIG),{r:e.r}),transport:getXhrTransport()}},createMinimalBrowserClient=function(e){var n=void 0===e?{}:e,t=n.createSender,e=n.builder,n=n.createDefaultConfig,r=createClient({validateInitConfig:validateInitConfig,initConfigNormalizer:normalizeInitConfig,userConfigNormalizer:normalizeUserConfig,createSender:void 0===t?function(e){return createBrowserSender({size:DEFAULT_SENDER_SIZE,endpoint:getReportUrl(e.domain),transport:e.transport})}:t,builder:void 0===e?browserBuilder:e,createDefaultConfig:void 0===n?getDefaultConfig:n,createConfigManager:createBrowserConfigManager});ContextPlugin(r);n=getGlobalRegistry(getDefaultBrowser());SubjectPlugin(r,n&&n.subject),TimeCalibrationPlugin(r),InjectConfigPlugin(r),InjectEnvPlugin(r),InjectNetworkTypePlugin(r),InjectQueryPlugin(r);n=withCommandArray(r,captureCurrentContext,function(e,n,t){return syncReportWithCapturedContext(e,n)(function(){var e=__read(t),n=e[0],e=e.slice(1);r[n].apply(r,__spreadArray([],__read(e),!1))})});return IntegrationPlugin(n,register),n};export{createMinimalBrowserClient,getDefaultConfig};
var __assign=function(){return(__assign=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function __rest(e,n){var t={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t}function __read(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function __spreadArray(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var DEFAULT_SIZE=10,DEFAULT_WAIT=1e3,stringifyBatch=function(e){return JSON.stringify({ev_type:"batch",list:e})};function createBatchSender(e){var t,r=e.transport,o=e.endpoint,n=e.size,i=void 0===n?DEFAULT_SIZE:n,e=e.wait,a=void 0===e?DEFAULT_WAIT:e,u=[],c=0;function s(){var n;u.length&&(n=this.getBatchData(),r.post({url:o,data:n,fail:function(e){t&&t(e,n)}}),u=[])}return{getSize:function(){return i},getWait:function(){return a},setSize:function(e){i=e},setWait:function(e){a=e},getEndpoint:function(){return o},setEndpoint:function(e){o=e},send:function(e){u.push(e),u.length>=i&&s.call(this),clearTimeout(c),c=setTimeout(s.bind(this),a)},flush:function(){clearTimeout(c),s.call(this)},getBatchData:function(){return u.length?stringifyBatch(u):""},clear:function(){clearTimeout(c),u=[]},fail:function(e){t=e}}}var EVENTS=["init","start","config","beforeDestroy","provide","beforeReport","report","beforeBuild","build","beforeSend","send","beforeConfig"],noop=function(){return{}};function isObject(e){return"object"==typeof e&&null!==e}var objProto=Object.prototype;function isPlainObject(e){if(isObject(e)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===objProto.toString.call(e);e=Object.getPrototypeOf(e);return e===objProto||null===e}return!1}function isArray(e){return"[object Array]"===objProto.toString.call(e)}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function hasKey(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function mergeDeepConcatArray(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var t={},r=0;r<e.length;)t=_mergeDeepMergeArray(t,e[r++]);return t}function _mergeDeepMergeArray(e,n){var t,r=__assign({},e);for(t in n)hasKey(n,t)&&void 0!==n[t]&&(isObject(n[t])&&isPlainObject(n[t])?r[t]=_mergeDeepMergeArray(isObject(e[t])?e[t]:{},n[t]):isArray(n[t])&&isArray(e[t])?r[t]=_mergeDeepArray(e[t],n[t]):r[t]=n[t]);return r}function _mergeDeepArray(e,n){e=isArray(e)?e:[],n=isArray(n)?n:[];return Array.prototype.concat.call(e,n).map(function(e){return e instanceof RegExp?e:isObject(e)&&isPlainObject(e)?_mergeDeepMergeArray({},e):isArray(e)?_mergeDeepArray([],e):e})}function arrayIncludes(e,n){if(!isArray(e))return!1;if(0===e.length)return!1;for(var t=0;t<e.length;){if(e[t]===n)return!0;t++}return!1}var arrayRemove=function(e,n){if(!isArray(e))return e;var t=e.indexOf(n);if(0<=t){n=e.slice();return n.splice(t,1),n}return e},safeVisit=function(e,n,t){for(var r,n=__read(n.split(".")),o=n[0],i=n.slice(1);e&&0<i.length;)e=e[o],o=(r=__read(i))[0],i=r.slice(1);if(e)return t(e,o)},safeCall=function(e,n,t){return safeVisit(e,n,function(e,n){if(e&&n in e&&isFunction(e[n]))try{return e[n].apply(e,t)}catch(e){return}})};function safeStringify(e){try{return isString(e)?e:JSON.stringify(e)}catch(e){return"[FAILED_TO_STRINGIFY]:"+String(e)}}var joinQueryWithMap=function(t){return isObject(t)?Object.keys(t).reduce(function(e,n){return e+="&"+n+"="+t[n]},"").replace("&","?"):""};function createContextAgent(){var t={},r={},o={set:function(e,n){return t[e]=n,r[e]=safeStringify(n),o},merge:function(n){return t=__assign(__assign({},t),n),Object.keys(n).forEach(function(e){r[e]=safeStringify(n[e])}),o},delete:function(e){return delete t[e],delete r[e],o},clear:function(){return t={},r={},o},get:function(e){return r[e]},toString:function(){return __assign({},r)}};return o}var hookObjectProperty=function(i,a,u,c){return void 0===c&&(c=!0),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!i)return noop;var t=i[a],r=u.apply(void 0,__spreadArray([t],__read(e),!1)),o=r;return isFunction(o)&&c&&(o=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];try{return r.apply(this,n)}catch(e){return isFunction(t)&&t.apply(this,n)}}),i[a]=o,function(e){e||(o===i[a]?i[a]=t:r=t)}}},getPrintString=function(){return"".padStart?function(e,n){return e.padStart(n=void 0===n?8:n," ")}:function(e){return e}},printString=getPrintString(),errCount=0,error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+errCount++)],__read(e),!1))},warnCount=0,warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.warn.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+warnCount++)],__read(e),!1))},runProcessors=function(r){return function(e){for(var n=e,t=0;t<r.length&&n;t++)try{n=r[t](n)}catch(e){error(e)}return n}},runFilters=function(r){return function(e){for(var n=!0,t=0;t<r.length&&n;t++)try{n=r[t](e)}catch(e){error(e)}return n}};function mathRNG(){for(var e=new Array(16),n=0,t=0;t<16;t++)0==(3&t)&&(n=4294967296*Math.random()),e[t]=n>>>((3&t)<<3)&255;return e}function bytesToUuid(e){for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);var r=0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[+r]],o[e[15]]].join("")}function uuid(){var e=mathRNG();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,bytesToUuid(e)}var BUFFER_TIME=3e5,applyBufferTimer=function(e,n,t){var r=0;return-1===t?noop:function(){if(e())return r&&clearTimeout(r),void(r=0);0===r&&(r=setTimeout(n,t))}},nextLink=function(r,e){var n=[];try{n=e.reduce(function(e,n){try{var t=n(r);"function"==typeof t&&e.push(t)}catch(e){}return e},[])}catch(e){}return function(e){return nextLink(e,n)}},toObservable=function(e){function n(e){r=arrayRemove(r,e),i||a()}var t,r=[],o=[],i=!1,a=applyBufferTimer(function(){return!!r.length},function(){i=!0,t&&t[0](),o.forEach(function(e){return e()}),o.length=0,t=void 0},e=void 0===e?BUFFER_TIME:e);return{next:function(e){return nextLink(e,r)},complete:function(e){o.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(i)throw new Error("Observer is closed");return r.push(e),t&&t[1]&&t[1](e),a(),function(){return n(e)}},unsubscribe:n}},createSafeObserver=function(e,n,t){t=toObservable(t);try{e(t.next,t.attach),n&&t.complete(n)}catch(e){}return[t.subscribe,t.unsubscribe]},wrapFilters=function(e,r){var o=__read(e,1)[0];return function(n,e){var t=o(function(e){return runFilters(r)(e)?n(e):noop});e(function(){t()})}};function createDestroyAgent(){function r(e){e.length&&e.forEach(function(e){try{e()}catch(e){}}),e.length=0}function n(e){i[e]&&i[e].forEach(function(e){r(e[1])}),i[e]=void 0}var o=!1,i={};return{set:function(e,n,t){i[e]?i[e].push([n,t]):i[e]=[[n,t]],o&&r(t)},has:function(e){return!!i[e]},remove:n,removeByEvType:function(n){Object.keys(i).forEach(function(e){i[e]&&i[e].forEach(function(e){e[0]===n&&r(e[1])})})},clear:function(){o=!0,Object.keys(i).forEach(function(e){n(e)})}}}function createClient(e){var t,r,n=e.builder,o=e.createSender,i=e.createDefaultConfig,a=e.createConfigManager,u=e.userConfigNormalizer,c=e.initConfigNormalizer,s=e.validateInitConfig,f={};EVENTS.forEach(function(e){return f[e]=[]});var l=!1,g=!1,d=!1,p=[],_=[],v=createDestroyAgent(),y={getBuilder:function(){return n},getSender:function(){return t},getPreStartQueue:function(){return p},init:function(e){if(l)warn("already inited");else{if(!(e&&isObject(e)&&s(e)))throw new Error("invalid InitConfig, init failed");var n=i(e);if(!n)throw new Error("defaultConfig missing");e=c(e);if((r=a(n)).setConfig(e),r.onChange(function(){S("config")}),!(t=o(r.getConfig())))throw new Error("sender missing");S("init",l=!0)}},set:function(e){l&&e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(e))},config:function(e){if(l)return e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(u(e))),null==r?void 0:r.getConfig()},provide:function(e,n){arrayIncludes(_,e)?warn("cannot provide "+e+", reserved"):(y[e]=n,S("provide",!1,e))},start:function(){var n=this;l&&(g||null!=r&&r.onReady(function(){S("start",g=!0),p.forEach(function(e){return n.build(e)}),p.length=0}))},report:function(e){e&&(!(e=runProcessors(f.beforeReport)(e))||(e=runProcessors(f.report)(e))&&(g?this.build(e):p.push(e)))},build:function(e){!g||(e=runProcessors(f.beforeBuild)(e))&&(!(e=n.build(e))||(e=runProcessors(f.build)(e))&&this.send(e))},send:function(e){!g||(e=runProcessors(f.beforeSend)(e))&&(t.send(e),S("send",!1,e))},destroy:function(){v.clear(),d=!0,S("beforeDestroy",!(p.length=0))},on:function(e,n){if("init"===e&&l||"start"===e&&g||"beforeDestroy"===e&&d)try{n()}catch(e){}else f[e]&&f[e].push(n)},off:function(e,n){f[e]&&(f[e]=arrayRemove(f[e],n))},destroyAgent:v},_=Object.keys(y);return y;function S(e,n){void 0===n&&(n=!1);for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];f[e].forEach(function(e){try{e.apply(void 0,__spreadArray([],__read(t),!1))}catch(e){}}),n&&(f[e].length=0)}}var ContextPlugin=function(e){var n=createContextAgent();e.provide("context",n),e.on("report",function(e){return e.extra||(e.extra={}),e.extra.context=n.toString(),e})},withCommandArray=function(i,a,t){function u(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o=e[0]){var t=o.split(".")[0];if(t in u)return safeCall(u,o,[].slice.call(e,1));var r=c[t]||[],o=null!==(o=null==a?void 0:a(i))&&void 0!==o?o:{};r.push(__spreadArray([o],__read(e),!1)),void(c[t]=r)}}var e,c={};for(e in hookObjectProperty(i,"provide",function(t){return function(e,n){u[e]=n,t.call(i,e,n)}})(),i)Object.prototype.hasOwnProperty.call(i,e)&&(u[e]=i[e]);return i.on("provide",function(e){c[e]&&(c[e].forEach(function(e){var n=__read(e),e=n[0],n=n.slice(1);null!=t&&t(i,e,n)}),c[e]=null)}),u};function IntegrationPlugin(r,o){r.on("init",function(){function e(e){e.forEach(function(e){var n=e.name;arrayIncludes(t,n)||(t.push(n),e.setup(r),o&&o(n,e.setup),r.destroyAgent.set(n,n,[function(){t=arrayRemove(t,n),e.tearDown&&e.tearDown()}]))})}var t=[];r.provide("applyIntegrations",e);var n=r.config();n&&n.integrations&&e(n.integrations)})}var SubjectSpacer="_",getSubjectKeyWithoutVersion=function(e){return e.split(SubjectSpacer)[0]};function SubjectPlugin(r,e){var o=e||{},i={};r.provide("setFilter",function(e,n){i[e]||(i[e]=[]),i[e].push(n)}),r.provide("initSubject",function(e){var n=__read(e,2),t=n[0],e=n[1],n=getSubjectKeyWithoutVersion(t),n=!!n&&i[n];return o[t]||(o[t]=createSafeObserver(e,function(){o[t]=void 0})),n?initPrivateSubject(r,[t,wrapFilters(o[t],n)]):o[t]}),r.provide("getSubject",function(e){return o[e]}),r.provide("privateSubject",{})}function initPrivateSubject(e,n,t){var n=__read(n,2),r=n[0],n=n[1],o=e.privateSubject||{};return o[r]||(o[r]=createSafeObserver(n,function(){o[r]=void 0},t)),o[r]}var now=function(){return Date.now()};function getDefaultBrowser(){if("object"==typeof window&&isObject(window))return window}function getDefaultDocument(){if("object"==typeof document&&isObject(document))return document}function getDefaultLocation(){return getDefaultBrowser()&&window.location}function getDefaultXMLHttpRequest(){if("function"==typeof XMLHttpRequest&&isFunction(XMLHttpRequest))return XMLHttpRequest}function getDefaultNavigator(){if(getDefaultBrowser()&&"navigator"in window)return window.navigator}function getDefaultNetworkInformation(){var e=getDefaultNavigator();if(e)return e.connection||e.mozConnection||e.webkitConnection}function getLocationUrl(){var e=getDefaultBrowser()&&getDefaultLocation();return e?e.href:""}var getGlobalRegistry=function(e){if(e)return e.__SLARDAR_REGISTRY__||(e.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),e.__SLARDAR_REGISTRY__.Slardar},captureCurrentContext=function(e){var n={url:getLocationUrl(),timestamp:now()},t=e.config();return null!=t&&t.pid&&(n.pid=t.pid),null!=e&&e.context&&(n.context=e.context.toString()),n},syncReportWithCapturedContext=function(t,r){return function(e){function n(e){return e.overrides=r,e}t.on("report",n),e(),t.off("report",n)}},addListenerToDocument=function(e,n,t,r){return void 0===r&&(r=!1),e.addEventListener(n,t,r),function(){e.removeEventListener(n,t,r)}},invokeCallbackOnce=function(n){var t=!1;return[function(e){t||(t=!0,n&&n(e))}]},onPageUnload=function(e){var n,t=getDefaultBrowser();t&&(n=__read(invokeCallbackOnce(e),1)[0],["unload","beforeunload","pagehide"].forEach(function(e){t.addEventListener(e,n)}))},onPageNextShow=function(e){var n,t=getDefaultDocument(),r=getDefaultBrowser();t&&r&&(n=noop,n=addListenerToDocument(t,"visibilitychange",function(){"visible"===t.visibilityState&&(e(),n())},!0))},isSupportEncrypt=function(){return!!btoa&&!!atob};function encodeToBase64(e){return isSupportEncrypt()?btoa(encodeURI(e)):e}function decodeWithBase64(e){return isSupportEncrypt()?decodeURI(atob(e)):e}var getStorageWithDecoding=function(e){try{var n=localStorage.getItem(e),t=n,r=t=n&&"string"==typeof n?JSON.parse(decodeWithBase64(n)):t,o=r.expires,i=__rest(r,["expires"]);return o>=now()?i:void 0}catch(e){return}},setStorageWithEncoding=function(e,n,t){if(!(t<=0))try{localStorage.setItem(e,encodeToBase64(JSON.stringify(__assign(__assign({},n),{expires:now()+t}))))}catch(e){}},DEFAULT_STORAGE_EXPIRES=7776e6,formatStorageExpires=function(e){return!1===e?0:!0!==e&&void 0!==e&&isNumber(e)?e:DEFAULT_STORAGE_EXPIRES},getViewId=function(e){return joinWithSeparator(e,now())},joinWithSeparator=function(e,n){return e+"_"+n};function getNetworkType(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var InjectNetworkTypePlugin=function(e){var n=getDefaultNetworkInformation(),t=getNetworkType(n);n&&(n.onchange=function(){t=getNetworkType(n)}),e.on("report",function(e){return __assign(__assign({},e),{extra:__assign(__assign({},e.extra||{}),{network_type:t})})})},getBeaconTransport=function(){var t=getDefaultBrowser();return t&&t.navigator.sendBeacon?{get:function(){},post:function(e,n){t.navigator.sendBeacon(e,n)}}:{get:noop,post:noop}},request=function(e,n,t){var r=n.url,o=n.data,i=n.success,a=void 0===i?noop:i,i=n.fail,u=void 0===i?noop:i,i=n.getResponseText,c=void 0===i?noop:i,n=n.withCredentials,n=void 0!==n&&n,t=new t;t.withCredentials=n,t.open(e,r,!0),t.setRequestHeader("Content-Type","application/json"),t.onload=function(){null!=c&&c(this.responseText);try{var e;this.responseText?(e=JSON.parse(this.responseText),a(e)):a({})}catch(e){u(e)}},t.onerror=function(){u(new Error("Network request failed"))},t.onabort=function(){u(new Error("Network request aborted"))},t.send(o)},getXhrTransport=function(){var n=getDefaultXMLHttpRequest();return n?{useBeacon:!0,get:function(e){request("GET",e,n)},post:function(e){request("POST",e,n)}}:{get:noop,post:noop}};function createBrowserSender(t){var r=createBatchSender(t),o=r.send;return onPageUnload(function(){var n,e;t.transport.useBeacon?(n=getBeaconTransport(),(e=r.getBatchData())&&(n.post(r.getEndpoint(),e),r.clear()),r.send=function(e){n.post(r.getEndpoint(),stringifyBatch([e]))},onPageNextShow(function(){r.send=o})):r.flush()}),r}var browserBuilder={build:function(e){return{ev_type:e.ev_type,payload:e.payload,common:__assign(__assign({},e.extra||{}),e.overrides||{})}}},REPORT_DOMAIN="apmplus.volces.com",SDK_VERSION="2.7.3",SDK_NAME="APM_PLUS_WEB",SETTINGS_PATH="/settings/get/webpro",BATCH_REPORT_PATH="/monitor_web/collect",STORAGE_PREFIX="APMPLUS",DEFAULT_IGNORE_PATHS=[BATCH_REPORT_PATH,SETTINGS_PATH,"/monitor_browser/collect"],DEFAULT_SAMPLE_GRANULARITY="session",DEFAULT_SAMPLE_CONFIG={sample_rate:1,include_users:[],sample_granularity:DEFAULT_SAMPLE_GRANULARITY,rules:{}},DEFAULT_SENDER_SIZE=20;function normalizeInitConfig(e){var n,t=e.plugins||{};for(n in t)t[n]&&!isObject(t[n])&&(t[n]={});return __assign(__assign({},e),{plugins:t})}function validateInitConfig(e){return isObject(e)&&"aid"in e}function normalizeUserConfig(e){return __assign({},e)}function parseServerConfig(e){if(!e)return{};var n=e.sample,t=e.timestamp,r=e.status,o=e.apdex;if(!n)return{};var i=n.sample_rate,a=n.sample_granularity,e=n.include_users,n=n.rules;return{sample:{include_users:e,sample_rate:r&&4===r?0:i,sample_granularity:void 0===a?DEFAULT_SAMPLE_GRANULARITY:a,rules:(void 0===n?[]:n).reduce(function(e,n){var t=n.name,r=n.enable,o=n.sample_rate,n=n.conditional_sample_rules;return e[t]={enable:r,sample_rate:o,conditional_sample_rules:n},e},{})},apdex:o,serverTimestamp:t}}var getReportUrl=function(e,n){return void 0===n&&(n=BATCH_REPORT_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getSettingsUrl=function(e,n){return void 0===n&&(n=SETTINGS_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getDefaultSessionId=function(){return uuid()},getStorageKey=function(e){return STORAGE_PREFIX+e},glueCodeForStorageSecurity=function(e,n){try{var t=localStorage.getItem(e);if(!t||!isSupportEncrypt()||"{"!==t[0])return;setStorageWithEncoding(e,JSON.parse(t),n)}catch(e){}},getStoreInfo=function(e,n){void 0===e&&(e=0);var t={userId:uuid(),deviceId:uuid(),r:Math.random()};if(n<=0)return t;e=getStorageKey(e);return glueCodeForStorageSecurity(e,n),getStorageWithDecoding(e)||t},saveStoreInfo=function(e){var n=e.aid,t=e.userId,r=e.deviceId,o=e.sample,e=e.storageExpires,n=getStorageKey(n);setStorageWithEncoding(n,{userId:t,deviceId:r,r:o.r},formatStorageExpires(e))},createBrowserConfigManager=function(n){var t,r,o,i=n,a={},u=noop,c=noop;return{getConfig:function(){return i},setConfig:function(e){return a=__assign(__assign({},a),e||{}),s(),t||(t=e,i.useLocalConfig?(o={},u()):r?f():getServerConfig(i.transport,i.domain,i.aid,function(e){r=e,f()})),i},onChange:function(e){c=e},onReady:function(e){u=function(){!function(){n.userId!==i.userId&&(n.sample.r=Math.random(),s());saveStoreInfo(i)}(),e()},o&&u()}};function s(){var e=__assign(__assign(__assign({},n),o||{}),a);e.plugins=mergeDeepConcatArray(n.plugins,(null==o?void 0:o.plugins)||{},a.plugins||{}),e.sample=mergeSampleConfig(mergeSampleConfig(n.sample,null==o?void 0:o.sample),a.sample),i=e,c()}function f(){o=parseServerConfig(r),s(),u()}};function getServerConfig(e,n,t,r){e.get({withCredentials:!0,url:getSettingsUrl(n)+"?aid="+t,success:function(e){r(e.data||{})},fail:function(){r({sample:{sample_rate:.001}})}})}function mergeSampleConfig(r,o){if(!r||!o)return r||o;var e=__assign(__assign({},r),o);return e.include_users=__spreadArray(__spreadArray([],__read(r.include_users||[]),!1),__read(o.include_users||[]),!1),e.rules=__spreadArray(__spreadArray([],__read(Object.keys(r.rules||{})),!1),__read(Object.keys(o.rules||{})),!1).reduce(function(e,n){var t;return n in e||(n in(r.rules||{})&&n in(o.rules||{})?(e[n]=__assign(__assign({},r.rules[n]),o.rules[n]),e[n].conditional_sample_rules=__spreadArray(__spreadArray([],__read(r.rules[n].conditional_sample_rules||[]),!1),__read(o.rules[n].conditional_sample_rules||[]),!1)):e[n]=(null===(t=r.rules)||void 0===t?void 0:t[n])||(null===(t=o.rules)||void 0===t?void 0:t[n])),e},{}),e}function getPluginFromRegistry(e,n){return e.plugins.filter(function(e){return e.name===n&&e.version===SDK_VERSION})[0]}function register(e,n,t){(t=void 0===t?getGlobalRegistry(getDefaultBrowser()):t)&&t.plugins&&(getPluginFromRegistry(t,e)||t.plugins.push({name:e,version:SDK_VERSION,apply:n}))}var addEnvToSendEvent=function(e,n){var t=n||{},n=t.pid,n=void 0===n?"":n,t=t.viewId,t=void 0===t?"":t,t={url:getLocationUrl(),timestamp:Date.now(),pid:n,view_id:t};return __assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectEnvPlugin=function(n){n.on("report",function(e){return addEnvToSendEvent(e,n.config())})},MAX_RTT=700,TimeCalibrationPlugin=function(t){var r,o=!1;t.on("init",function(){r=(new Date).getTime(),t.on("config",function(){var e,n=null===(e=t.config())||void 0===e?void 0:e.serverTimestamp;isNaN(n)||Number(n)<=0||o||(o=!0,(e=(new Date).getTime())-r<MAX_RTT&&n&&(e=n-(e+r)/2,!isNaN(e)&&(0<e||e<-6e5)&&t.set({offset:e})))})})},addConfigToReportEvent=function(e,n){var t={};return t.aid=n.aid,t.user_id=n.userId,__assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectConfigPlugin=function(n){n.on("beforeBuild",function(e){return addConfigToReportEvent(e,n.config())})},InjectQueryPlugin=function(u){u.on("start",function(){var e=u.config(),n=e.deviceId,t=e.sessionId,r=e.release,o=e.env,i=e.offset,a=e.aid,e=e.token,a={did:n,sid:t,release:r,env:o,sname:SDK_NAME,sversion:SDK_VERSION,soffset:i||0,biz_id:a,x_auth_token:e},e=u.getSender();e.setEndpoint(e.getEndpoint()+joinQueryWithMap(a))})},getDefaultConfig=function(e){var n=formatStorageExpires(e.storageExpires),e=getStoreInfo(e.aid,n);return{aid:0,pid:"",token:"",viewId:getViewId("_"),userId:e.userId,deviceId:e.deviceId,sessionId:getDefaultSessionId(),storageExpires:n,domain:REPORT_DOMAIN,plugins:{ajax:{ignoreUrls:DEFAULT_IGNORE_PATHS},fetch:{ignoreUrls:DEFAULT_IGNORE_PATHS},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1},release:"",env:"production",sample:__assign(__assign({},DEFAULT_SAMPLE_CONFIG),{r:e.r}),transport:getXhrTransport()}},createMinimalBrowserClient=function(e){var n=void 0===e?{}:e,t=n.createSender,e=n.builder,n=n.createDefaultConfig,r=createClient({validateInitConfig:validateInitConfig,initConfigNormalizer:normalizeInitConfig,userConfigNormalizer:normalizeUserConfig,createSender:void 0===t?function(e){return createBrowserSender({size:DEFAULT_SENDER_SIZE,endpoint:getReportUrl(e.domain),transport:e.transport})}:t,builder:void 0===e?browserBuilder:e,createDefaultConfig:void 0===n?getDefaultConfig:n,createConfigManager:createBrowserConfigManager});ContextPlugin(r);n=getGlobalRegistry(getDefaultBrowser());SubjectPlugin(r,n&&n.subject),TimeCalibrationPlugin(r),InjectConfigPlugin(r),InjectEnvPlugin(r),InjectNetworkTypePlugin(r),InjectQueryPlugin(r);n=withCommandArray(r,captureCurrentContext,function(e,n,t){return syncReportWithCapturedContext(e,n)(function(){var e=__read(t),n=e[0],e=e.slice(1);r[n].apply(r,__spreadArray([],__read(e),!1))})});return IntegrationPlugin(n,register),n};export{createMinimalBrowserClient,getDefaultConfig};

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __assign=function(){return(__assign=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function __rest(e,n){var t={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t}function __read(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function __spreadArray(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var DEFAULT_SIZE=10,DEFAULT_WAIT=1e3,stringifyBatch=function(e){return JSON.stringify({ev_type:"batch",list:e})};function createBatchSender(e){var t,r=e.transport,o=e.endpoint,n=e.size,i=void 0===n?DEFAULT_SIZE:n,e=e.wait,a=void 0===e?DEFAULT_WAIT:e,u=[],c=0;function s(){var n;u.length&&(n=this.getBatchData(),r.post({url:o,data:n,fail:function(e){t&&t(e,n)}}),u=[])}return{getSize:function(){return i},getWait:function(){return a},setSize:function(e){i=e},setWait:function(e){a=e},getEndpoint:function(){return o},setEndpoint:function(e){o=e},send:function(e){u.push(e),u.length>=i&&s.call(this),clearTimeout(c),c=setTimeout(s.bind(this),a)},flush:function(){clearTimeout(c),s.call(this)},getBatchData:function(){return u.length?stringifyBatch(u):""},clear:function(){clearTimeout(c),u=[]},fail:function(e){t=e}}}var EVENTS=["init","start","config","beforeDestroy","provide","beforeReport","report","beforeBuild","build","beforeSend","send","beforeConfig"],noop=function(){return{}};function isObject(e){return"object"==typeof e&&null!==e}var objProto=Object.prototype;function isPlainObject(e){if(isObject(e)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===objProto.toString.call(e);e=Object.getPrototypeOf(e);return e===objProto||null===e}return!1}function isArray(e){return"[object Array]"===objProto.toString.call(e)}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function hasKey(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function mergeDeepConcatArray(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var t={},r=0;r<e.length;)t=_mergeDeepMergeArray(t,e[r++]);return t}function _mergeDeepMergeArray(e,n){var t,r=__assign({},e);for(t in n)hasKey(n,t)&&void 0!==n[t]&&(isObject(n[t])&&isPlainObject(n[t])?r[t]=_mergeDeepMergeArray(isObject(e[t])?e[t]:{},n[t]):isArray(n[t])&&isArray(e[t])?r[t]=_mergeDeepArray(e[t],n[t]):r[t]=n[t]);return r}function _mergeDeepArray(e,n){e=isArray(e)?e:[],n=isArray(n)?n:[];return Array.prototype.concat.call(e,n).map(function(e){return e instanceof RegExp?e:isObject(e)&&isPlainObject(e)?_mergeDeepMergeArray({},e):isArray(e)?_mergeDeepArray([],e):e})}function arrayIncludes(e,n){if(!isArray(e))return!1;if(0===e.length)return!1;for(var t=0;t<e.length;){if(e[t]===n)return!0;t++}return!1}var arrayRemove=function(e,n){if(!isArray(e))return e;var t=e.indexOf(n);if(0<=t){n=e.slice();return n.splice(t,1),n}return e},safeVisit=function(e,n,t){for(var r,n=__read(n.split(".")),o=n[0],i=n.slice(1);e&&0<i.length;)e=e[o],o=(r=__read(i))[0],i=r.slice(1);if(e)return t(e,o)},safeCall=function(e,n,t){return safeVisit(e,n,function(e,n){if(e&&n in e&&isFunction(e[n]))try{return e[n].apply(e,t)}catch(e){return}})};function safeStringify(e){try{return isString(e)?e:JSON.stringify(e)}catch(e){return"[FAILED_TO_STRINGIFY]:"+String(e)}}var joinQueryWithMap=function(t){return isObject(t)?Object.keys(t).reduce(function(e,n){return e+="&"+n+"="+t[n]},"").replace("&","?"):""};function createContextAgent(){var t={},r={},o={set:function(e,n){return t[e]=n,r[e]=safeStringify(n),o},merge:function(n){return t=__assign(__assign({},t),n),Object.keys(n).forEach(function(e){r[e]=safeStringify(n[e])}),o},delete:function(e){return delete t[e],delete r[e],o},clear:function(){return t={},r={},o},get:function(e){return r[e]},toString:function(){return __assign({},r)}};return o}var hookObjectProperty=function(i,a,u,c){return void 0===c&&(c=!0),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!i)return noop;var t=i[a],r=u.apply(void 0,__spreadArray([t],__read(e),!1)),o=r;return isFunction(o)&&c&&(o=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];try{return r.apply(this,n)}catch(e){return isFunction(t)&&t.apply(this,n)}}),i[a]=o,function(e){e||(o===i[a]?i[a]=t:r=t)}}},getPrintString=function(){return"".padStart?function(e,n){return e.padStart(n=void 0===n?8:n," ")}:function(e){return e}},printString=getPrintString(),errCount=0,error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+errCount++)],__read(e),!1))},warnCount=0,warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.warn.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+warnCount++)],__read(e),!1))},runProcessors=function(r){return function(e){for(var n=e,t=0;t<r.length&&n;t++)try{n=r[t](n)}catch(e){error(e)}return n}},runFilters=function(r){return function(e){for(var n=!0,t=0;t<r.length&&n;t++)try{n=r[t](e)}catch(e){error(e)}return n}};function mathRNG(){for(var e=new Array(16),n=0,t=0;t<16;t++)0==(3&t)&&(n=4294967296*Math.random()),e[t]=n>>>((3&t)<<3)&255;return e}function bytesToUuid(e){for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);var r=0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[+r]],o[e[15]]].join("")}function uuid(){var e=mathRNG();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,bytesToUuid(e)}var BUFFER_TIME=3e5,applyBufferTimer=function(e,n,t){var r=0;return-1===t?noop:function(){if(e())return r&&clearTimeout(r),void(r=0);0===r&&(r=setTimeout(n,t))}},nextLink=function(r,e){var n=[];try{n=e.reduce(function(e,n){try{var t=n(r);"function"==typeof t&&e.push(t)}catch(e){}return e},[])}catch(e){}return function(e){return nextLink(e,n)}},toObservable=function(e){function n(e){r=arrayRemove(r,e),i||a()}var t,r=[],o=[],i=!1,a=applyBufferTimer(function(){return!!r.length},function(){i=!0,t&&t[0](),o.forEach(function(e){return e()}),o.length=0,t=void 0},e=void 0===e?BUFFER_TIME:e);return{next:function(e){return nextLink(e,r)},complete:function(e){o.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(i)throw new Error("Observer is closed");return r.push(e),t&&t[1]&&t[1](e),a(),function(){return n(e)}},unsubscribe:n}},createSafeObserver=function(e,n,t){t=toObservable(t);try{e(t.next,t.attach),n&&t.complete(n)}catch(e){}return[t.subscribe,t.unsubscribe]},wrapFilters=function(e,r){var o=__read(e,1)[0];return function(n,e){var t=o(function(e){return runFilters(r)(e)?n(e):noop});e(function(){t()})}};function createDestroyAgent(){function r(e){e.length&&e.forEach(function(e){try{e()}catch(e){}}),e.length=0}function n(e){i[e]&&i[e].forEach(function(e){r(e[1])}),i[e]=void 0}var o=!1,i={};return{set:function(e,n,t){i[e]?i[e].push([n,t]):i[e]=[[n,t]],o&&r(t)},has:function(e){return!!i[e]},remove:n,removeByEvType:function(n){Object.keys(i).forEach(function(e){i[e]&&i[e].forEach(function(e){e[0]===n&&r(e[1])})})},clear:function(){o=!0,Object.keys(i).forEach(function(e){n(e)})}}}function createClient(e){var t,r,n=e.builder,o=e.createSender,i=e.createDefaultConfig,a=e.createConfigManager,u=e.userConfigNormalizer,c=e.initConfigNormalizer,s=e.validateInitConfig,f={};EVENTS.forEach(function(e){return f[e]=[]});var l=!1,g=!1,d=!1,p=[],_=[],v=createDestroyAgent(),y={getBuilder:function(){return n},getSender:function(){return t},getPreStartQueue:function(){return p},init:function(e){if(l)warn("already inited");else{if(!(e&&isObject(e)&&s(e)))throw new Error("invalid InitConfig, init failed");var n=i(e);if(!n)throw new Error("defaultConfig missing");e=c(e);if((r=a(n)).setConfig(e),r.onChange(function(){S("config")}),!(t=o(r.getConfig())))throw new Error("sender missing");S("init",l=!0)}},set:function(e){l&&e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(e))},config:function(e){if(l)return e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(u(e))),null==r?void 0:r.getConfig()},provide:function(e,n){arrayIncludes(_,e)?warn("cannot provide "+e+", reserved"):(y[e]=n,S("provide",!1,e))},start:function(){var n=this;l&&(g||null!=r&&r.onReady(function(){S("start",g=!0),p.forEach(function(e){return n.build(e)}),p.length=0}))},report:function(e){e&&(!(e=runProcessors(f.beforeReport)(e))||(e=runProcessors(f.report)(e))&&(g?this.build(e):p.push(e)))},build:function(e){!g||(e=runProcessors(f.beforeBuild)(e))&&(!(e=n.build(e))||(e=runProcessors(f.build)(e))&&this.send(e))},send:function(e){!g||(e=runProcessors(f.beforeSend)(e))&&(t.send(e),S("send",!1,e))},destroy:function(){v.clear(),d=!0,S("beforeDestroy",!(p.length=0))},on:function(e,n){if("init"===e&&l||"start"===e&&g||"beforeDestroy"===e&&d)try{n()}catch(e){}else f[e]&&f[e].push(n)},off:function(e,n){f[e]&&(f[e]=arrayRemove(f[e],n))},destroyAgent:v},_=Object.keys(y);return y;function S(e,n){void 0===n&&(n=!1);for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];f[e].forEach(function(e){try{e.apply(void 0,__spreadArray([],__read(t),!1))}catch(e){}}),n&&(f[e].length=0)}}var ContextPlugin=function(e){var n=createContextAgent();e.provide("context",n),e.on("report",function(e){return e.extra||(e.extra={}),e.extra.context=n.toString(),e})},withCommandArray=function(i,a,t){function u(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o=e[0]){var t=o.split(".")[0];if(t in u)return safeCall(u,o,[].slice.call(e,1));var r=c[t]||[],o=null!==(o=null==a?void 0:a(i))&&void 0!==o?o:{};r.push(__spreadArray([o],__read(e),!1)),void(c[t]=r)}}var e,c={};for(e in hookObjectProperty(i,"provide",function(t){return function(e,n){u[e]=n,t.call(i,e,n)}})(),i)Object.prototype.hasOwnProperty.call(i,e)&&(u[e]=i[e]);return i.on("provide",function(e){c[e]&&(c[e].forEach(function(e){var n=__read(e),e=n[0],n=n.slice(1);null!=t&&t(i,e,n)}),c[e]=null)}),u};function IntegrationPlugin(r,o){r.on("init",function(){function e(e){e.forEach(function(e){var n=e.name;arrayIncludes(t,n)||(t.push(n),e.setup(r),o&&o(n,e.setup),r.destroyAgent.set(n,n,[function(){t=arrayRemove(t,n),e.tearDown&&e.tearDown()}]))})}var t=[];r.provide("applyIntegrations",e);var n=r.config();n&&n.integrations&&e(n.integrations)})}var SubjectSpacer="_",getSubjectKeyWithoutVersion=function(e){return e.split(SubjectSpacer)[0]};function SubjectPlugin(r,e){var o=e||{},i={};r.provide("setFilter",function(e,n){i[e]||(i[e]=[]),i[e].push(n)}),r.provide("initSubject",function(e){var n=__read(e,2),t=n[0],e=n[1],n=getSubjectKeyWithoutVersion(t),n=!!n&&i[n];return o[t]||(o[t]=createSafeObserver(e,function(){o[t]=void 0})),n?initPrivateSubject(r,[t,wrapFilters(o[t],n)]):o[t]}),r.provide("getSubject",function(e){return o[e]}),r.provide("privateSubject",{})}function initPrivateSubject(e,n,t){var n=__read(n,2),r=n[0],n=n[1],o=e.privateSubject||{};return o[r]||(o[r]=createSafeObserver(n,function(){o[r]=void 0},t)),o[r]}var now=function(){return Date.now()};function getDefaultBrowser(){if("object"==typeof window&&isObject(window))return window}function getDefaultDocument(){if("object"==typeof document&&isObject(document))return document}function getDefaultLocation(){return getDefaultBrowser()&&window.location}function getDefaultXMLHttpRequest(){if("function"==typeof XMLHttpRequest&&isFunction(XMLHttpRequest))return XMLHttpRequest}function getDefaultNavigator(){if(getDefaultBrowser()&&"navigator"in window)return window.navigator}function getDefaultNetworkInformation(){var e=getDefaultNavigator();if(e)return e.connection||e.mozConnection||e.webkitConnection}function getLocationUrl(){var e=getDefaultBrowser()&&getDefaultLocation();return e?e.href:""}var getGlobalRegistry=function(e){if(e)return e.__SLARDAR_REGISTRY__||(e.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),e.__SLARDAR_REGISTRY__.Slardar},captureCurrentContext=function(e){var n={url:getLocationUrl(),timestamp:now()},t=e.config();return null!=t&&t.pid&&(n.pid=t.pid),null!=e&&e.context&&(n.context=e.context.toString()),n},syncReportWithCapturedContext=function(t,r){return function(e){function n(e){return e.overrides=r,e}t.on("report",n),e(),t.off("report",n)}},addListenerToDocument=function(e,n,t,r){return void 0===r&&(r=!1),e.addEventListener(n,t,r),function(){e.removeEventListener(n,t,r)}},invokeCallbackOnce=function(n){var t=!1;return[function(e){t||(t=!0,n&&n(e))}]},onPageUnload=function(e){var n,t=getDefaultBrowser();t&&(n=__read(invokeCallbackOnce(e),1)[0],["unload","beforeunload","pagehide"].forEach(function(e){t.addEventListener(e,n)}))},onPageNextShow=function(e){var n,t=getDefaultDocument(),r=getDefaultBrowser();t&&r&&(n=noop,n=addListenerToDocument(t,"visibilitychange",function(){"visible"===t.visibilityState&&(e(),n())},!0))},isSupportEncrypt=function(){return!!btoa&&!!atob};function encodeToBase64(e){return isSupportEncrypt()?btoa(encodeURI(e)):e}function decodeWithBase64(e){return isSupportEncrypt()?decodeURI(atob(e)):e}var getStorageWithDecoding=function(e){try{var n=localStorage.getItem(e),t=n,r=t=n&&"string"==typeof n?JSON.parse(decodeWithBase64(n)):t,o=r.expires,i=__rest(r,["expires"]);return o>=now()?i:void 0}catch(e){return}},setStorageWithEncoding=function(e,n,t){if(!(t<=0))try{localStorage.setItem(e,encodeToBase64(JSON.stringify(__assign(__assign({},n),{expires:now()+t}))))}catch(e){}},DEFAULT_STORAGE_EXPIRES=7776e6,formatStorageExpires=function(e){return!1===e?0:!0!==e&&void 0!==e&&isNumber(e)?e:DEFAULT_STORAGE_EXPIRES},getViewId=function(e){return joinWithSeparator(e,now())},joinWithSeparator=function(e,n){return e+"_"+n};function getNetworkType(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var InjectNetworkTypePlugin=function(e){var n=getDefaultNetworkInformation(),t=getNetworkType(n);n&&(n.onchange=function(){t=getNetworkType(n)}),e.on("report",function(e){return __assign(__assign({},e),{extra:__assign(__assign({},e.extra||{}),{network_type:t})})})},getBeaconTransport=function(){var t=getDefaultBrowser();return t&&t.navigator.sendBeacon?{get:function(){},post:function(e,n){t.navigator.sendBeacon(e,n)}}:{get:noop,post:noop}},request=function(e,n,t){var r=n.url,o=n.data,i=n.success,a=void 0===i?noop:i,i=n.fail,u=void 0===i?noop:i,i=n.getResponseText,c=void 0===i?noop:i,n=n.withCredentials,n=void 0!==n&&n,t=new t;t.withCredentials=n,t.open(e,r,!0),t.setRequestHeader("Content-Type","application/json"),t.onload=function(){null!=c&&c(this.responseText);try{var e;this.responseText?(e=JSON.parse(this.responseText),a(e)):a({})}catch(e){u(e)}},t.onerror=function(){u(new Error("Network request failed"))},t.onabort=function(){u(new Error("Network request aborted"))},t.send(o)},getXhrTransport=function(){var n=getDefaultXMLHttpRequest();return n?{useBeacon:!0,get:function(e){request("GET",e,n)},post:function(e){request("POST",e,n)}}:{get:noop,post:noop}};function createBrowserSender(t){var r=createBatchSender(t),o=r.send;return onPageUnload(function(){var n,e;t.transport.useBeacon?(n=getBeaconTransport(),(e=r.getBatchData())&&(n.post(r.getEndpoint(),e),r.clear()),r.send=function(e){n.post(r.getEndpoint(),stringifyBatch([e]))},onPageNextShow(function(){r.send=o})):r.flush()}),r}var browserBuilder={build:function(e){return{ev_type:e.ev_type,payload:e.payload,common:__assign(__assign({},e.extra||{}),e.overrides||{})}}},REPORT_DOMAIN="apmplus.volces.com",SDK_VERSION="2.7.3-alpha.1",SDK_NAME="APM_PLUS_WEB",SETTINGS_PATH="/settings/get/webpro",BATCH_REPORT_PATH="/monitor_web/collect",STORAGE_PREFIX="APMPLUS",DEFAULT_IGNORE_PATHS=[BATCH_REPORT_PATH,SETTINGS_PATH,"/monitor_browser/collect"],DEFAULT_SAMPLE_GRANULARITY="session",DEFAULT_SAMPLE_CONFIG={sample_rate:1,include_users:[],sample_granularity:DEFAULT_SAMPLE_GRANULARITY,rules:{}},DEFAULT_SENDER_SIZE=20;function normalizeInitConfig(e){var n,t=e.plugins||{};for(n in t)t[n]&&!isObject(t[n])&&(t[n]={});return __assign(__assign({},e),{plugins:t})}function validateInitConfig(e){return isObject(e)&&"aid"in e}function normalizeUserConfig(e){return __assign({},e)}function parseServerConfig(e){if(!e)return{};var n=e.sample,t=e.timestamp,r=e.status,o=e.apdex;if(!n)return{};var i=n.sample_rate,a=n.sample_granularity,e=n.include_users,n=n.rules;return{sample:{include_users:e,sample_rate:r&&4===r?0:i,sample_granularity:void 0===a?DEFAULT_SAMPLE_GRANULARITY:a,rules:(void 0===n?[]:n).reduce(function(e,n){var t=n.name,r=n.enable,o=n.sample_rate,n=n.conditional_sample_rules;return e[t]={enable:r,sample_rate:o,conditional_sample_rules:n},e},{})},apdex:o,serverTimestamp:t}}var getReportUrl=function(e,n){return void 0===n&&(n=BATCH_REPORT_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getSettingsUrl=function(e,n){return void 0===n&&(n=SETTINGS_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getDefaultSessionId=function(){return uuid()},getStorageKey=function(e){return STORAGE_PREFIX+e},glueCodeForStorageSecurity=function(e,n){try{var t=localStorage.getItem(e);if(!t||!isSupportEncrypt()||"{"!==t[0])return;setStorageWithEncoding(e,JSON.parse(t),n)}catch(e){}},getStoreInfo=function(e,n){void 0===e&&(e=0);var t={userId:uuid(),deviceId:uuid(),r:Math.random()};if(n<=0)return t;e=getStorageKey(e);return glueCodeForStorageSecurity(e,n),getStorageWithDecoding(e)||t},saveStoreInfo=function(e){var n=e.aid,t=e.userId,r=e.deviceId,o=e.sample,e=e.storageExpires,n=getStorageKey(n);setStorageWithEncoding(n,{userId:t,deviceId:r,r:o.r},formatStorageExpires(e))},createBrowserConfigManager=function(n){var t,r,o,i=n,a={},u=noop,c=noop;return{getConfig:function(){return i},setConfig:function(e){return a=__assign(__assign({},a),e||{}),s(),t||(t=e,i.useLocalConfig?(o={},u()):r?f():getServerConfig(i.transport,i.domain,i.aid,function(e){r=e,f()})),i},onChange:function(e){c=e},onReady:function(e){u=function(){!function(){n.userId!==i.userId&&(n.sample.r=Math.random(),s());saveStoreInfo(i)}(),e()},o&&u()}};function s(){var e=__assign(__assign(__assign({},n),o||{}),a);e.plugins=mergeDeepConcatArray(n.plugins,(null==o?void 0:o.plugins)||{},a.plugins||{}),e.sample=mergeSampleConfig(mergeSampleConfig(n.sample,null==o?void 0:o.sample),a.sample),i=e,c()}function f(){o=parseServerConfig(r),s(),u()}};function getServerConfig(e,n,t,r){e.get({withCredentials:!0,url:getSettingsUrl(n)+"?aid="+t,success:function(e){r(e.data||{})},fail:function(){r({sample:{sample_rate:.001}})}})}function mergeSampleConfig(r,o){if(!r||!o)return r||o;var e=__assign(__assign({},r),o);return e.include_users=__spreadArray(__spreadArray([],__read(r.include_users||[]),!1),__read(o.include_users||[]),!1),e.rules=__spreadArray(__spreadArray([],__read(Object.keys(r.rules||{})),!1),__read(Object.keys(o.rules||{})),!1).reduce(function(e,n){var t;return n in e||(n in(r.rules||{})&&n in(o.rules||{})?(e[n]=__assign(__assign({},r.rules[n]),o.rules[n]),e[n].conditional_sample_rules=__spreadArray(__spreadArray([],__read(r.rules[n].conditional_sample_rules||[]),!1),__read(o.rules[n].conditional_sample_rules||[]),!1)):e[n]=(null===(t=r.rules)||void 0===t?void 0:t[n])||(null===(t=o.rules)||void 0===t?void 0:t[n])),e},{}),e}function getPluginFromRegistry(e,n){return e.plugins.filter(function(e){return e.name===n&&e.version===SDK_VERSION})[0]}function register(e,n,t){(t=void 0===t?getGlobalRegistry(getDefaultBrowser()):t)&&t.plugins&&(getPluginFromRegistry(t,e)||t.plugins.push({name:e,version:SDK_VERSION,apply:n}))}var addEnvToSendEvent=function(e,n){var t=n||{},n=t.pid,n=void 0===n?"":n,t=t.viewId,t=void 0===t?"":t,t={url:getLocationUrl(),timestamp:Date.now(),pid:n,view_id:t};return __assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectEnvPlugin=function(n){n.on("report",function(e){return addEnvToSendEvent(e,n.config())})},MAX_RTT=700,TimeCalibrationPlugin=function(t){var r,o=!1;t.on("init",function(){r=(new Date).getTime(),t.on("config",function(){var e,n=null===(e=t.config())||void 0===e?void 0:e.serverTimestamp;isNaN(n)||Number(n)<=0||o||(o=!0,(e=(new Date).getTime())-r<MAX_RTT&&n&&(e=n-(e+r)/2,!isNaN(e)&&(0<e||e<-6e5)&&t.set({offset:e})))})})},addConfigToReportEvent=function(e,n){var t={};return t.aid=n.aid,t.user_id=n.userId,__assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectConfigPlugin=function(n){n.on("beforeBuild",function(e){return addConfigToReportEvent(e,n.config())})},InjectQueryPlugin=function(u){u.on("start",function(){var e=u.config(),n=e.deviceId,t=e.sessionId,r=e.release,o=e.env,i=e.offset,a=e.aid,e=e.token,a={did:n,sid:t,release:r,env:o,sname:SDK_NAME,sversion:SDK_VERSION,soffset:i||0,biz_id:a,x_auth_token:e},e=u.getSender();e.setEndpoint(e.getEndpoint()+joinQueryWithMap(a))})},getDefaultConfig=function(e){var n=formatStorageExpires(e.storageExpires),e=getStoreInfo(e.aid,n);return{aid:0,pid:"",token:"",viewId:getViewId("_"),userId:e.userId,deviceId:e.deviceId,sessionId:getDefaultSessionId(),storageExpires:n,domain:REPORT_DOMAIN,plugins:{ajax:{ignoreUrls:DEFAULT_IGNORE_PATHS},fetch:{ignoreUrls:DEFAULT_IGNORE_PATHS},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1},release:"",env:"production",sample:__assign(__assign({},DEFAULT_SAMPLE_CONFIG),{r:e.r}),transport:getXhrTransport()}},createMinimalBrowserClient=function(e){var n=void 0===e?{}:e,t=n.createSender,e=n.builder,n=n.createDefaultConfig,r=createClient({validateInitConfig:validateInitConfig,initConfigNormalizer:normalizeInitConfig,userConfigNormalizer:normalizeUserConfig,createSender:void 0===t?function(e){return createBrowserSender({size:DEFAULT_SENDER_SIZE,endpoint:getReportUrl(e.domain),transport:e.transport})}:t,builder:void 0===e?browserBuilder:e,createDefaultConfig:void 0===n?getDefaultConfig:n,createConfigManager:createBrowserConfigManager});ContextPlugin(r);n=getGlobalRegistry(getDefaultBrowser());SubjectPlugin(r,n&&n.subject),TimeCalibrationPlugin(r),InjectConfigPlugin(r),InjectEnvPlugin(r),InjectNetworkTypePlugin(r),InjectQueryPlugin(r);n=withCommandArray(r,captureCurrentContext,function(e,n,t){return syncReportWithCapturedContext(e,n)(function(){var e=__read(t),n=e[0],e=e.slice(1);r[n].apply(r,__spreadArray([],__read(e),!1))})});return IntegrationPlugin(n,register),n};exports.createMinimalBrowserClient=createMinimalBrowserClient,exports.getDefaultConfig=getDefaultConfig;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __assign=function(){return(__assign=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function __rest(e,n){var t={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t}function __read(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function __spreadArray(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var DEFAULT_SIZE=10,DEFAULT_WAIT=1e3,stringifyBatch=function(e){return JSON.stringify({ev_type:"batch",list:e})};function createBatchSender(e){var t,r=e.transport,o=e.endpoint,n=e.size,i=void 0===n?DEFAULT_SIZE:n,e=e.wait,a=void 0===e?DEFAULT_WAIT:e,u=[],c=0;function s(){var n;u.length&&(n=this.getBatchData(),r.post({url:o,data:n,fail:function(e){t&&t(e,n)}}),u=[])}return{getSize:function(){return i},getWait:function(){return a},setSize:function(e){i=e},setWait:function(e){a=e},getEndpoint:function(){return o},setEndpoint:function(e){o=e},send:function(e){u.push(e),u.length>=i&&s.call(this),clearTimeout(c),c=setTimeout(s.bind(this),a)},flush:function(){clearTimeout(c),s.call(this)},getBatchData:function(){return u.length?stringifyBatch(u):""},clear:function(){clearTimeout(c),u=[]},fail:function(e){t=e}}}var EVENTS=["init","start","config","beforeDestroy","provide","beforeReport","report","beforeBuild","build","beforeSend","send","beforeConfig"],noop=function(){return{}};function isObject(e){return"object"==typeof e&&null!==e}var objProto=Object.prototype;function isPlainObject(e){if(isObject(e)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===objProto.toString.call(e);e=Object.getPrototypeOf(e);return e===objProto||null===e}return!1}function isArray(e){return"[object Array]"===objProto.toString.call(e)}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function hasKey(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function mergeDeepConcatArray(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var t={},r=0;r<e.length;)t=_mergeDeepMergeArray(t,e[r++]);return t}function _mergeDeepMergeArray(e,n){var t,r=__assign({},e);for(t in n)hasKey(n,t)&&void 0!==n[t]&&(isObject(n[t])&&isPlainObject(n[t])?r[t]=_mergeDeepMergeArray(isObject(e[t])?e[t]:{},n[t]):isArray(n[t])&&isArray(e[t])?r[t]=_mergeDeepArray(e[t],n[t]):r[t]=n[t]);return r}function _mergeDeepArray(e,n){e=isArray(e)?e:[],n=isArray(n)?n:[];return Array.prototype.concat.call(e,n).map(function(e){return e instanceof RegExp?e:isObject(e)&&isPlainObject(e)?_mergeDeepMergeArray({},e):isArray(e)?_mergeDeepArray([],e):e})}function arrayIncludes(e,n){if(!isArray(e))return!1;if(0===e.length)return!1;for(var t=0;t<e.length;){if(e[t]===n)return!0;t++}return!1}var arrayRemove=function(e,n){if(!isArray(e))return e;var t=e.indexOf(n);if(0<=t){n=e.slice();return n.splice(t,1),n}return e},safeVisit=function(e,n,t){for(var r,n=__read(n.split(".")),o=n[0],i=n.slice(1);e&&0<i.length;)e=e[o],o=(r=__read(i))[0],i=r.slice(1);if(e)return t(e,o)},safeCall=function(e,n,t){return safeVisit(e,n,function(e,n){if(e&&n in e&&isFunction(e[n]))try{return e[n].apply(e,t)}catch(e){return}})};function safeStringify(e){try{return isString(e)?e:JSON.stringify(e)}catch(e){return"[FAILED_TO_STRINGIFY]:"+String(e)}}var joinQueryWithMap=function(t){return isObject(t)?Object.keys(t).reduce(function(e,n){return e+="&"+n+"="+t[n]},"").replace("&","?"):""};function createContextAgent(){var t={},r={},o={set:function(e,n){return t[e]=n,r[e]=safeStringify(n),o},merge:function(n){return t=__assign(__assign({},t),n),Object.keys(n).forEach(function(e){r[e]=safeStringify(n[e])}),o},delete:function(e){return delete t[e],delete r[e],o},clear:function(){return t={},r={},o},get:function(e){return r[e]},toString:function(){return __assign({},r)}};return o}var hookObjectProperty=function(i,a,u,c){return void 0===c&&(c=!0),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!i)return noop;var t=i[a],r=u.apply(void 0,__spreadArray([t],__read(e),!1)),o=r;return isFunction(o)&&c&&(o=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];try{return r.apply(this,n)}catch(e){return isFunction(t)&&t.apply(this,n)}}),i[a]=o,function(e){e||(o===i[a]?i[a]=t:r=t)}}},getPrintString=function(){return"".padStart?function(e,n){return e.padStart(n=void 0===n?8:n," ")}:function(e){return e}},printString=getPrintString(),errCount=0,error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+errCount++)],__read(e),!1))},warnCount=0,warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.warn.apply(console,__spreadArray(["[SDK]",Date.now(),printString(""+warnCount++)],__read(e),!1))},runProcessors=function(r){return function(e){for(var n=e,t=0;t<r.length&&n;t++)try{n=r[t](n)}catch(e){error(e)}return n}},runFilters=function(r){return function(e){for(var n=!0,t=0;t<r.length&&n;t++)try{n=r[t](e)}catch(e){error(e)}return n}};function mathRNG(){for(var e=new Array(16),n=0,t=0;t<16;t++)0==(3&t)&&(n=4294967296*Math.random()),e[t]=n>>>((3&t)<<3)&255;return e}function bytesToUuid(e){for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);var r=0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[+r]],o[e[15]]].join("")}function uuid(){var e=mathRNG();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,bytesToUuid(e)}var BUFFER_TIME=3e5,applyBufferTimer=function(e,n,t){var r=0;return-1===t?noop:function(){if(e())return r&&clearTimeout(r),void(r=0);0===r&&(r=setTimeout(n,t))}},nextLink=function(r,e){var n=[];try{n=e.reduce(function(e,n){try{var t=n(r);"function"==typeof t&&e.push(t)}catch(e){}return e},[])}catch(e){}return function(e){return nextLink(e,n)}},toObservable=function(e){function n(e){r=arrayRemove(r,e),i||a()}var t,r=[],o=[],i=!1,a=applyBufferTimer(function(){return!!r.length},function(){i=!0,t&&t[0](),o.forEach(function(e){return e()}),o.length=0,t=void 0},e=void 0===e?BUFFER_TIME:e);return{next:function(e){return nextLink(e,r)},complete:function(e){o.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(i)throw new Error("Observer is closed");return r.push(e),t&&t[1]&&t[1](e),a(),function(){return n(e)}},unsubscribe:n}},createSafeObserver=function(e,n,t){t=toObservable(t);try{e(t.next,t.attach),n&&t.complete(n)}catch(e){}return[t.subscribe,t.unsubscribe]},wrapFilters=function(e,r){var o=__read(e,1)[0];return function(n,e){var t=o(function(e){return runFilters(r)(e)?n(e):noop});e(function(){t()})}};function createDestroyAgent(){function r(e){e.length&&e.forEach(function(e){try{e()}catch(e){}}),e.length=0}function n(e){i[e]&&i[e].forEach(function(e){r(e[1])}),i[e]=void 0}var o=!1,i={};return{set:function(e,n,t){i[e]?i[e].push([n,t]):i[e]=[[n,t]],o&&r(t)},has:function(e){return!!i[e]},remove:n,removeByEvType:function(n){Object.keys(i).forEach(function(e){i[e]&&i[e].forEach(function(e){e[0]===n&&r(e[1])})})},clear:function(){o=!0,Object.keys(i).forEach(function(e){n(e)})}}}function createClient(e){var t,r,n=e.builder,o=e.createSender,i=e.createDefaultConfig,a=e.createConfigManager,u=e.userConfigNormalizer,c=e.initConfigNormalizer,s=e.validateInitConfig,f={};EVENTS.forEach(function(e){return f[e]=[]});var l=!1,g=!1,d=!1,p=[],_=[],v=createDestroyAgent(),y={getBuilder:function(){return n},getSender:function(){return t},getPreStartQueue:function(){return p},init:function(e){if(l)warn("already inited");else{if(!(e&&isObject(e)&&s(e)))throw new Error("invalid InitConfig, init failed");var n=i(e);if(!n)throw new Error("defaultConfig missing");e=c(e);if((r=a(n)).setConfig(e),r.onChange(function(){S("config")}),!(t=o(r.getConfig())))throw new Error("sender missing");S("init",l=!0)}},set:function(e){l&&e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(e))},config:function(e){if(l)return e&&isObject(e)&&(S("beforeConfig",!1,e),null!=r&&r.setConfig(u(e))),null==r?void 0:r.getConfig()},provide:function(e,n){arrayIncludes(_,e)?warn("cannot provide "+e+", reserved"):(y[e]=n,S("provide",!1,e))},start:function(){var n=this;l&&(g||null!=r&&r.onReady(function(){S("start",g=!0),p.forEach(function(e){return n.build(e)}),p.length=0}))},report:function(e){e&&(!(e=runProcessors(f.beforeReport)(e))||(e=runProcessors(f.report)(e))&&(g?this.build(e):p.push(e)))},build:function(e){!g||(e=runProcessors(f.beforeBuild)(e))&&(!(e=n.build(e))||(e=runProcessors(f.build)(e))&&this.send(e))},send:function(e){!g||(e=runProcessors(f.beforeSend)(e))&&(t.send(e),S("send",!1,e))},destroy:function(){v.clear(),d=!0,S("beforeDestroy",!(p.length=0))},on:function(e,n){if("init"===e&&l||"start"===e&&g||"beforeDestroy"===e&&d)try{n()}catch(e){}else f[e]&&f[e].push(n)},off:function(e,n){f[e]&&(f[e]=arrayRemove(f[e],n))},destroyAgent:v},_=Object.keys(y);return y;function S(e,n){void 0===n&&(n=!1);for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];f[e].forEach(function(e){try{e.apply(void 0,__spreadArray([],__read(t),!1))}catch(e){}}),n&&(f[e].length=0)}}var ContextPlugin=function(e){var n=createContextAgent();e.provide("context",n),e.on("report",function(e){return e.extra||(e.extra={}),e.extra.context=n.toString(),e})},withCommandArray=function(i,a,t){function u(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o=e[0]){var t=o.split(".")[0];if(t in u)return safeCall(u,o,[].slice.call(e,1));var r=c[t]||[],o=null!==(o=null==a?void 0:a(i))&&void 0!==o?o:{};r.push(__spreadArray([o],__read(e),!1)),void(c[t]=r)}}var e,c={};for(e in hookObjectProperty(i,"provide",function(t){return function(e,n){u[e]=n,t.call(i,e,n)}})(),i)Object.prototype.hasOwnProperty.call(i,e)&&(u[e]=i[e]);return i.on("provide",function(e){c[e]&&(c[e].forEach(function(e){var n=__read(e),e=n[0],n=n.slice(1);null!=t&&t(i,e,n)}),c[e]=null)}),u};function IntegrationPlugin(r,o){r.on("init",function(){function e(e){e.forEach(function(e){var n=e.name;arrayIncludes(t,n)||(t.push(n),e.setup(r),o&&o(n,e.setup),r.destroyAgent.set(n,n,[function(){t=arrayRemove(t,n),e.tearDown&&e.tearDown()}]))})}var t=[];r.provide("applyIntegrations",e);var n=r.config();n&&n.integrations&&e(n.integrations)})}var SubjectSpacer="_",getSubjectKeyWithoutVersion=function(e){return e.split(SubjectSpacer)[0]};function SubjectPlugin(r,e){var o=e||{},i={};r.provide("setFilter",function(e,n){i[e]||(i[e]=[]),i[e].push(n)}),r.provide("initSubject",function(e){var n=__read(e,2),t=n[0],e=n[1],n=getSubjectKeyWithoutVersion(t),n=!!n&&i[n];return o[t]||(o[t]=createSafeObserver(e,function(){o[t]=void 0})),n?initPrivateSubject(r,[t,wrapFilters(o[t],n)]):o[t]}),r.provide("getSubject",function(e){return o[e]}),r.provide("privateSubject",{})}function initPrivateSubject(e,n,t){var n=__read(n,2),r=n[0],n=n[1],o=e.privateSubject||{};return o[r]||(o[r]=createSafeObserver(n,function(){o[r]=void 0},t)),o[r]}var now=function(){return Date.now()};function getDefaultBrowser(){if("object"==typeof window&&isObject(window))return window}function getDefaultDocument(){if("object"==typeof document&&isObject(document))return document}function getDefaultLocation(){return getDefaultBrowser()&&window.location}function getDefaultXMLHttpRequest(){if("function"==typeof XMLHttpRequest&&isFunction(XMLHttpRequest))return XMLHttpRequest}function getDefaultNavigator(){if(getDefaultBrowser()&&"navigator"in window)return window.navigator}function getDefaultNetworkInformation(){var e=getDefaultNavigator();if(e)return e.connection||e.mozConnection||e.webkitConnection}function getLocationUrl(){var e=getDefaultBrowser()&&getDefaultLocation();return e?e.href:""}var getGlobalRegistry=function(e){if(e)return e.__SLARDAR_REGISTRY__||(e.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),e.__SLARDAR_REGISTRY__.Slardar},captureCurrentContext=function(e){var n={url:getLocationUrl(),timestamp:now()},t=e.config();return null!=t&&t.pid&&(n.pid=t.pid),null!=e&&e.context&&(n.context=e.context.toString()),n},syncReportWithCapturedContext=function(t,r){return function(e){function n(e){return e.overrides=r,e}t.on("report",n),e(),t.off("report",n)}},addListenerToDocument=function(e,n,t,r){return void 0===r&&(r=!1),e.addEventListener(n,t,r),function(){e.removeEventListener(n,t,r)}},invokeCallbackOnce=function(n){var t=!1;return[function(e){t||(t=!0,n&&n(e))}]},onPageUnload=function(e){var n,t=getDefaultBrowser();t&&(n=__read(invokeCallbackOnce(e),1)[0],["unload","beforeunload","pagehide"].forEach(function(e){t.addEventListener(e,n)}))},onPageNextShow=function(e){var n,t=getDefaultDocument(),r=getDefaultBrowser();t&&r&&(n=noop,n=addListenerToDocument(t,"visibilitychange",function(){"visible"===t.visibilityState&&(e(),n())},!0))},isSupportEncrypt=function(){return!!btoa&&!!atob};function encodeToBase64(e){return isSupportEncrypt()?btoa(encodeURI(e)):e}function decodeWithBase64(e){return isSupportEncrypt()?decodeURI(atob(e)):e}var getStorageWithDecoding=function(e){try{var n=localStorage.getItem(e),t=n,r=t=n&&"string"==typeof n?JSON.parse(decodeWithBase64(n)):t,o=r.expires,i=__rest(r,["expires"]);return o>=now()?i:void 0}catch(e){return}},setStorageWithEncoding=function(e,n,t){if(!(t<=0))try{localStorage.setItem(e,encodeToBase64(JSON.stringify(__assign(__assign({},n),{expires:now()+t}))))}catch(e){}},DEFAULT_STORAGE_EXPIRES=7776e6,formatStorageExpires=function(e){return!1===e?0:!0!==e&&void 0!==e&&isNumber(e)?e:DEFAULT_STORAGE_EXPIRES},getViewId=function(e){return joinWithSeparator(e,now())},joinWithSeparator=function(e,n){return e+"_"+n};function getNetworkType(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var InjectNetworkTypePlugin=function(e){var n=getDefaultNetworkInformation(),t=getNetworkType(n);n&&(n.onchange=function(){t=getNetworkType(n)}),e.on("report",function(e){return __assign(__assign({},e),{extra:__assign(__assign({},e.extra||{}),{network_type:t})})})},getBeaconTransport=function(){var t=getDefaultBrowser();return t&&t.navigator.sendBeacon?{get:function(){},post:function(e,n){t.navigator.sendBeacon(e,n)}}:{get:noop,post:noop}},request=function(e,n,t){var r=n.url,o=n.data,i=n.success,a=void 0===i?noop:i,i=n.fail,u=void 0===i?noop:i,i=n.getResponseText,c=void 0===i?noop:i,n=n.withCredentials,n=void 0!==n&&n,t=new t;t.withCredentials=n,t.open(e,r,!0),t.setRequestHeader("Content-Type","application/json"),t.onload=function(){null!=c&&c(this.responseText);try{var e;this.responseText?(e=JSON.parse(this.responseText),a(e)):a({})}catch(e){u(e)}},t.onerror=function(){u(new Error("Network request failed"))},t.onabort=function(){u(new Error("Network request aborted"))},t.send(o)},getXhrTransport=function(){var n=getDefaultXMLHttpRequest();return n?{useBeacon:!0,get:function(e){request("GET",e,n)},post:function(e){request("POST",e,n)}}:{get:noop,post:noop}};function createBrowserSender(t){var r=createBatchSender(t),o=r.send;return onPageUnload(function(){var n,e;t.transport.useBeacon?(n=getBeaconTransport(),(e=r.getBatchData())&&(n.post(r.getEndpoint(),e),r.clear()),r.send=function(e){n.post(r.getEndpoint(),stringifyBatch([e]))},onPageNextShow(function(){r.send=o})):r.flush()}),r}var browserBuilder={build:function(e){return{ev_type:e.ev_type,payload:e.payload,common:__assign(__assign({},e.extra||{}),e.overrides||{})}}},REPORT_DOMAIN="apmplus.volces.com",SDK_VERSION="2.7.3",SDK_NAME="APM_PLUS_WEB",SETTINGS_PATH="/settings/get/webpro",BATCH_REPORT_PATH="/monitor_web/collect",STORAGE_PREFIX="APMPLUS",DEFAULT_IGNORE_PATHS=[BATCH_REPORT_PATH,SETTINGS_PATH,"/monitor_browser/collect"],DEFAULT_SAMPLE_GRANULARITY="session",DEFAULT_SAMPLE_CONFIG={sample_rate:1,include_users:[],sample_granularity:DEFAULT_SAMPLE_GRANULARITY,rules:{}},DEFAULT_SENDER_SIZE=20;function normalizeInitConfig(e){var n,t=e.plugins||{};for(n in t)t[n]&&!isObject(t[n])&&(t[n]={});return __assign(__assign({},e),{plugins:t})}function validateInitConfig(e){return isObject(e)&&"aid"in e}function normalizeUserConfig(e){return __assign({},e)}function parseServerConfig(e){if(!e)return{};var n=e.sample,t=e.timestamp,r=e.status,o=e.apdex;if(!n)return{};var i=n.sample_rate,a=n.sample_granularity,e=n.include_users,n=n.rules;return{sample:{include_users:e,sample_rate:r&&4===r?0:i,sample_granularity:void 0===a?DEFAULT_SAMPLE_GRANULARITY:a,rules:(void 0===n?[]:n).reduce(function(e,n){var t=n.name,r=n.enable,o=n.sample_rate,n=n.conditional_sample_rules;return e[t]={enable:r,sample_rate:o,conditional_sample_rules:n},e},{})},apdex:o,serverTimestamp:t}}var getReportUrl=function(e,n){return void 0===n&&(n=BATCH_REPORT_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getSettingsUrl=function(e,n){return void 0===n&&(n=SETTINGS_PATH),(e&&0<=e.indexOf("//")?"":"https://")+e+n},getDefaultSessionId=function(){return uuid()},getStorageKey=function(e){return STORAGE_PREFIX+e},glueCodeForStorageSecurity=function(e,n){try{var t=localStorage.getItem(e);if(!t||!isSupportEncrypt()||"{"!==t[0])return;setStorageWithEncoding(e,JSON.parse(t),n)}catch(e){}},getStoreInfo=function(e,n){void 0===e&&(e=0);var t={userId:uuid(),deviceId:uuid(),r:Math.random()};if(n<=0)return t;e=getStorageKey(e);return glueCodeForStorageSecurity(e,n),getStorageWithDecoding(e)||t},saveStoreInfo=function(e){var n=e.aid,t=e.userId,r=e.deviceId,o=e.sample,e=e.storageExpires,n=getStorageKey(n);setStorageWithEncoding(n,{userId:t,deviceId:r,r:o.r},formatStorageExpires(e))},createBrowserConfigManager=function(n){var t,r,o,i=n,a={},u=noop,c=noop;return{getConfig:function(){return i},setConfig:function(e){return a=__assign(__assign({},a),e||{}),s(),t||(t=e,i.useLocalConfig?(o={},u()):r?f():getServerConfig(i.transport,i.domain,i.aid,function(e){r=e,f()})),i},onChange:function(e){c=e},onReady:function(e){u=function(){!function(){n.userId!==i.userId&&(n.sample.r=Math.random(),s());saveStoreInfo(i)}(),e()},o&&u()}};function s(){var e=__assign(__assign(__assign({},n),o||{}),a);e.plugins=mergeDeepConcatArray(n.plugins,(null==o?void 0:o.plugins)||{},a.plugins||{}),e.sample=mergeSampleConfig(mergeSampleConfig(n.sample,null==o?void 0:o.sample),a.sample),i=e,c()}function f(){o=parseServerConfig(r),s(),u()}};function getServerConfig(e,n,t,r){e.get({withCredentials:!0,url:getSettingsUrl(n)+"?aid="+t,success:function(e){r(e.data||{})},fail:function(){r({sample:{sample_rate:.001}})}})}function mergeSampleConfig(r,o){if(!r||!o)return r||o;var e=__assign(__assign({},r),o);return e.include_users=__spreadArray(__spreadArray([],__read(r.include_users||[]),!1),__read(o.include_users||[]),!1),e.rules=__spreadArray(__spreadArray([],__read(Object.keys(r.rules||{})),!1),__read(Object.keys(o.rules||{})),!1).reduce(function(e,n){var t;return n in e||(n in(r.rules||{})&&n in(o.rules||{})?(e[n]=__assign(__assign({},r.rules[n]),o.rules[n]),e[n].conditional_sample_rules=__spreadArray(__spreadArray([],__read(r.rules[n].conditional_sample_rules||[]),!1),__read(o.rules[n].conditional_sample_rules||[]),!1)):e[n]=(null===(t=r.rules)||void 0===t?void 0:t[n])||(null===(t=o.rules)||void 0===t?void 0:t[n])),e},{}),e}function getPluginFromRegistry(e,n){return e.plugins.filter(function(e){return e.name===n&&e.version===SDK_VERSION})[0]}function register(e,n,t){(t=void 0===t?getGlobalRegistry(getDefaultBrowser()):t)&&t.plugins&&(getPluginFromRegistry(t,e)||t.plugins.push({name:e,version:SDK_VERSION,apply:n}))}var addEnvToSendEvent=function(e,n){var t=n||{},n=t.pid,n=void 0===n?"":n,t=t.viewId,t=void 0===t?"":t,t={url:getLocationUrl(),timestamp:Date.now(),pid:n,view_id:t};return __assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectEnvPlugin=function(n){n.on("report",function(e){return addEnvToSendEvent(e,n.config())})},MAX_RTT=700,TimeCalibrationPlugin=function(t){var r,o=!1;t.on("init",function(){r=(new Date).getTime(),t.on("config",function(){var e,n=null===(e=t.config())||void 0===e?void 0:e.serverTimestamp;isNaN(n)||Number(n)<=0||o||(o=!0,(e=(new Date).getTime())-r<MAX_RTT&&n&&(e=n-(e+r)/2,!isNaN(e)&&(0<e||e<-6e5)&&t.set({offset:e})))})})},addConfigToReportEvent=function(e,n){var t={};return t.aid=n.aid,t.user_id=n.userId,__assign(__assign({},e),{extra:__assign(__assign({},t),e.extra||{})})},InjectConfigPlugin=function(n){n.on("beforeBuild",function(e){return addConfigToReportEvent(e,n.config())})},InjectQueryPlugin=function(u){u.on("start",function(){var e=u.config(),n=e.deviceId,t=e.sessionId,r=e.release,o=e.env,i=e.offset,a=e.aid,e=e.token,a={did:n,sid:t,release:r,env:o,sname:SDK_NAME,sversion:SDK_VERSION,soffset:i||0,biz_id:a,x_auth_token:e},e=u.getSender();e.setEndpoint(e.getEndpoint()+joinQueryWithMap(a))})},getDefaultConfig=function(e){var n=formatStorageExpires(e.storageExpires),e=getStoreInfo(e.aid,n);return{aid:0,pid:"",token:"",viewId:getViewId("_"),userId:e.userId,deviceId:e.deviceId,sessionId:getDefaultSessionId(),storageExpires:n,domain:REPORT_DOMAIN,plugins:{ajax:{ignoreUrls:DEFAULT_IGNORE_PATHS},fetch:{ignoreUrls:DEFAULT_IGNORE_PATHS},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1},release:"",env:"production",sample:__assign(__assign({},DEFAULT_SAMPLE_CONFIG),{r:e.r}),transport:getXhrTransport()}},createMinimalBrowserClient=function(e){var n=void 0===e?{}:e,t=n.createSender,e=n.builder,n=n.createDefaultConfig,r=createClient({validateInitConfig:validateInitConfig,initConfigNormalizer:normalizeInitConfig,userConfigNormalizer:normalizeUserConfig,createSender:void 0===t?function(e){return createBrowserSender({size:DEFAULT_SENDER_SIZE,endpoint:getReportUrl(e.domain),transport:e.transport})}:t,builder:void 0===e?browserBuilder:e,createDefaultConfig:void 0===n?getDefaultConfig:n,createConfigManager:createBrowserConfigManager});ContextPlugin(r);n=getGlobalRegistry(getDefaultBrowser());SubjectPlugin(r,n&&n.subject),TimeCalibrationPlugin(r),InjectConfigPlugin(r),InjectEnvPlugin(r),InjectNetworkTypePlugin(r),InjectQueryPlugin(r);n=withCommandArray(r,captureCurrentContext,function(e,n,t){return syncReportWithCapturedContext(e,n)(function(){var e=__read(t),n=e[0],e=e.slice(1);r[n].apply(r,__spreadArray([],__read(e),!1))})});return IntegrationPlugin(n,register),n};exports.createMinimalBrowserClient=createMinimalBrowserClient,exports.getDefaultConfig=getDefaultConfig;
{
"name": "@apmplus/web",
"version": "2.7.3-alpha.1",
"version": "2.7.3",
"description": "APM Plus Web SDK",

@@ -5,0 +5,0 @@ "main": "cn/index.cjs.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc