@cloudcare/browser-logs 3.2.2 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dataflux-logs.js +1 -1
- package/cjs/boot/buildEnv.js +1 -1
- package/cjs/boot/logsPublicApi.js +2 -4
- package/cjs/boot/logsPublicApi.js.map +1 -1
- package/esm/boot/buildEnv.js +1 -1
- package/esm/boot/logsPublicApi.js +3 -5
- package/esm/boot/logsPublicApi.js.map +1 -1
- package/package.json +3 -3
- package/src/boot/logsPublicApi.js +4 -5
package/bundle/dataflux-logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var e={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},t=console,n={};Object.keys(e).forEach((function(e){n[e]=t[e]}));var r,o="GUANCE Browser SDK:",i={debug:n.debug.bind(t,o),log:n.log.bind(t,o),info:n.info.bind(t,o),warn:n.warn.bind(t,o),error:n.error.bind(t,o)};function a(e,t){var n,r=window;return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}var s=!1;function u(e){s=e}function c(e){return function(){return f(e,this,arguments)}}function f(e,t,n){try{return e.apply(t,n)}catch(e){if(l(e),r)try{r(e)}catch(e){l(e)}}}function l(){var e=[].slice.call(arguments);s&&i.error.apply(null,["[MONITOR]"].concat(e))}function d(e,t){return function(){var n=[].slice.call(arguments);try{return e.apply(this,n)}catch(e){i.error(t,e)}}}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function v(){if("object"===("undefined"==typeof globalThis?"undefined":p(globalThis)))return globalThis;Object.defineProperty(Object.prototype,"_gc_temp_",{get:function(){return this},configurable:!0});var e=_gc_temp_;return delete Object.prototype._gc_temp_,"object"!==p(e)&&(e="object"===("undefined"==typeof self?"undefined":p(self))?self:"object"===("undefined"==typeof window?"undefined":p(window))?window:{}),e}function g(e,t){return a(v(),"setTimeout")(c(e),t)}function y(e){a(v(),"clearTimeout")(e)}function _(e,t){return a(v(),"setInterval")(c(e),t)}function h(e){a(v(),"clearInterval")(e)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}var b=Array.prototype,E=(Function.prototype,Object.prototype),w=b.slice,O=E.toString,S=E.hasOwnProperty,C=b.forEach,x=Array.isArray,T=!1,k=function(e,t,n){if(null===e)return!1;if(C&&e.forEach===C)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r,e)===T)return!1}else for(var i in e)if(S.call(e,i)&&t.call(n,e[i],i,e)===T)return!1};function R(e){return k(w.call(arguments,1),(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}var L=function(e){return k(w.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},A=function(e){return k(w.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(W(t[n])&&W(e[n])?L(e[n],t[n]):e[n]=t[n])})),e},I=x||function(e){return"[object Array]"===O.call(e)},M=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},D=function(e){var t=[];return null===e||k(e,(function(e){t[t.length]=e})),t},P=function(e){var t=[];return null===e||k(e,(function(e,n){t[t.length]=n})),t},U=function(e,t,n){if(e.filter)return e.filter(t);for(var r=[],o=0;o<e.length;o++)if(S.call(e,o)){var i=e[o];t.call(n,i,o,e)&&r.push(i)}return r},$=function(e,t,n){if(e.map)return e.map(t);for(var r=[],o=0;o<e.length;o++)if(S.call(e,o)){var i=e[o];r.push(t.call(n,i,o,e))}return r},N=function(e,t,n){if(e.some)return e.some(t);for(var r=!1,o=0;o<e.length;o++)if(S.call(e,o)){var i=e[o];if(t.call(n,i,o,e)){r=!0;break}}return r},B=function(e,t,n){if(e.every)return e.every(t);for(var r=!0,o=0;o<e.length;o++)if(S.call(e,o)){var i=e[o];if(!t.call(n,i,o,e)){r=!1;break}}return r},W=function(e){return null!==e&&"[object Object]"===O.call(e)},j=function(e){if(W(e)){for(var t in e)if(S.call(e,t))return!1;return!0}return!1},G=function(e){var t=[];return k(e,(function(e,n){t.push([n,e])})),t},F=function(e){return"[object String]"===O.call(e)},V=function(e){return"[object Boolean]"===O.call(e)},H=function(e){return"[object Number]"===O.call(e)&&/[\d\.]+/.test(String(e))},q=(Date.now,function(e,t,n){var r,o,i=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1,u=this;return{throttled:function(){s?r=arguments:(i?e.apply(u,arguments):r=arguments,s=!0,o=g((function(){a&&r&&e.apply(u,r),s=!1,r=void 0}),t))},cancel:function(){y(o),s=!1,r=void 0}}}),Q=function(e){for(var t,n=[],r={},o=0;o<e.length;o++)(t=e[o])in r||(r[t]=!0,n.push(t));return n};function K(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,K)}var z=function(e){var t=function(e){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=null,this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==e&&this._parse(e)};return t.prototype.setUrl=function(e){this._parse(e)},t.prototype._initValues=function(){for(var e in this._fields)this._values[e]=""},t.prototype.addQueryString=function(e){if("object"!==m(e))return!1;var t=this._values.QueryString||"";for(var n in e)t=new RegExp(n+"[^&]+").test(t)?t.replace(new RegExp(n+"[^&]+"),n+"="+e[n]):"&"===t.slice(-1)?t+n+"="+e[n]:""===t?n+"="+e[n]:t+"&"+n+"="+e[n];this._values.QueryString=t},t.prototype.getParse=function(){return this._values},t.prototype.getUrl=function(){var e="";return e+=this._values.Origin,e+=this._values.Path,e+=this._values.QueryString?"?"+this._values.QueryString:""},t.prototype._parse=function(e){this._initValues();var t=this._regex.exec(e);if(!t)throw"DPURLParser::_parse -> Invalid URL";for(var n in this._fields)void 0!==t[this._fields[n]]&&(this._values[n]=t[this._fields[n]]);this._values.Path=this._values.Path||"/",this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname+(this._values.Port?":"+this._values.Port:"")},new t(e)};function X(e){return null===e?"null":Array.isArray(e)?"array":m(e)}function Y(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!==m(t)||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var o=Array.isArray(e)?e:[],i=0;i<t.length;++i)o[i]=Y(o[i],t[i],n);return o}o="object"===X(e)?e:{};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(o[a]=Y(o[a],t[a],n));return o}}function J(e){return Y(void 0,e)}function Z(){}var ee,te=1e3,ne=60*te,re=60*ne;function oe(e){return 0!==e&&100*Math.random()<=e}function ie(){return performance.now()}function ae(){return{relative:ie(),timeStamp:se()}}function se(){return ue()}function ue(){return(new Date).getTime()}function ce(){return void 0===ee&&(ee=performance.timing.navigationStart),ee}var fe=/([\w-]+)\s*=\s*([^;]+)/g;function le(e,t){for(var n=t.split(".");n.length;){var r=n.shift();if(!(e&&r in e&&S.call(e,r)))return;e=e[r]}return e}function de(e,t){var n=e.charCodeAt(t-1);return n>=55296&&n<=56319?e.slice(0,t+1):e.slice(0,t)}function pe(e,t){return-1!==e.indexOf(t)}function ve(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach((function(e){t.push(e)}));else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function ge(e){return H(e)&&e>=0&&e<=100}var ye,_e={IE:0,CHROMIUM:1,SAFARI:2,OTHER:3};function he(){return Ee(ye,ye=function(e){var t;void 0===e&&(e=window);var n=e.navigator.userAgent;if(e.chrome||/HeadlessChrome/.test(n))return _e.CHROMIUM;if(0===(null===(t=e.navigator.vendor)||void 0===t?void 0:t.indexOf("Apple"))||/safari/i.test(n)&&!/chrome|android/i.test(n))return _e.SAFARI;if(e.document.documentMode)return _e.IE;return _e.OTHER}())}function me(e){var t={};return k(e,(function(e,n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e,t){return(0!==t?"_":"")+e.toLowerCase()})).replace(/-/g,"_"))]=be(e)})),t}function be(e){return I(e)?$(e,(function(e){return be(e)})):"object"===m(e)&&null!==e?me(e):e}function Ee(e,t){return null!=e?e:t}function we(e,t){return e.slice(0,t.length)===t}function Oe(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var Se=500;function Ce(){var e=[],t=function(t){e.push(t)>Se&&e.splice(0,1)};return{add:t,remove:t,drain:function(t){e.forEach((function(e){e(t)})),e.length=0}}}function xe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Te(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ke=1/0,Re=ne;function Le(e){var t=e.expireDelay,n=e.maxEntries,r=[],o=_((function(){return function(){var e=ie()-t;for(;r.length>0&&r[r.length-1].endTime<e;)r.pop()}()}),Re);return{add:function(e,t){var o={value:e,startTime:t,endTime:ke,remove:function(){Oe(r,o)},close:function(e){o.endTime=e}};return n&&r.length>=n&&r.pop(),r.unshift(o),o},find:function(e,t){void 0===e&&(e=ke),void 0===t&&(t={returnInactive:!1});var n,o=xe(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.startTime<=e){if(t.returnInactive||e<=i.endTime)return i.value;break}}}catch(e){o.e(e)}finally{o.f()}},closeActive:function(e){var t=r[0];t&&t.endTime===ke&&t.close(e)},findAll:function(e,t){void 0===e&&(e=ke),void 0===t&&(t=0);var n=e+t;return r.filter((function(t){return t.startTime<=n&&e<=t.endTime})).map((function(e){return e.value}))},reset:function(){r=[]},stop:function(){h(o)}}}var Ae={navigator:"undefined"!=typeof window&&void 0!==window.navigator?window.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","IE 11","IE 10","IE 9","IE 8","IE 7","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat",,"WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Ie={getMatchMap:c((function(e){return{Trident:e.indexOf("Trident")>-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Edge:e.indexOf("Edge")>-1||e.indexOf("Edg")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Arora:e.indexOf("Arora")>-1,Lunascape:e.indexOf("Lunascape")>-1,QupZilla:e.indexOf("QupZilla")>-1,"Coc Coc":e.indexOf("coc_coc_browser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,Iceweasel:e.indexOf("Iceweasel")>-1,Konqueror:e.indexOf("Konqueror")>-1,Iceape:e.indexOf("Iceape")>-1,SeaMonkey:e.indexOf("SeaMonkey")>-1,Epiphany:e.indexOf("Epiphany")>-1,360:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1,"360EE":e.indexOf("360EE")>-1,"360SE":e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,"Mac OS":e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Nexus 7")>-1,iPad:e.indexOf("iPad")>-1}})),matchInfoMap:c((function(e){var t=Ae.navigator.userAgent||"",n=Ie.getMatchMap(t);for(var r in Ae.infoMap)for(var o=0;o<Ae.infoMap[r].length;o++){var i=Ae.infoMap[r][o];n[i]&&(e[r]=i)}})),getOS:c((function(){return Ie.matchInfoMap(this),this.os||"Unknown"})),getOSVersion:c((function(){var e=this,t=Ae.navigator.userAgent||"";e.osVersion="",e.osMajor="";var n={Windows:function(){var e=t.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[e]||e},Android:function(){return t.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return t.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return t.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return t.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return t.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return t.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};return n[e.os]&&(e.osVersion=n[e.os](),e.osVersion===t&&(e.osVersion="")),e.osVersion&&(e.osMajor=e.osVersion.split(".").length&&e.osVersion.split(".")[0]),{version:e.osVersion,osMajor:e.osMajor}})),getOrientationStatu:c((function(){return window.matchMedia("(orientation: portrait)").matches?"竖屏":"横屏"})),getDeviceType:c((function(){var e=this;return e.device="PC",Ie.matchInfoMap(e),e.device})),getNetwork:c((function(){var e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t="unknown",n=e?e.type||e.effectiveType:null;if(n&&"string"==typeof n)switch(n){case"bluetooth":case"cellular":case"slow-2g":case"2g":case"3g":t="cellular";break;case"none":t="none";break;case"ethernet":case"wifi":case"wimax":case"4g":t="wifi";break;case"other":case"unknown":t="unknown"}return t})),getLanguage:c((function(){var e;return this.language=((e=(Ae.navigator.browserLanguage||Ae.navigator.language||"").split("-"))[1]&&(e[1]=e[1].toUpperCase()),e.join("_")),this.language})),getBrowserInfo:c((function(){var e=this;Ie.matchInfoMap(e);var t=Ae.navigator.userAgent||"",n=function(e,t){var n=Ae.navigator.mimeTypes;for(var r in n)if(n[r][e]==t)return!0;return!1},r=Ie.getMatchMap(t),o=!1;if("undefined"!=typeof window&&window.chrome){var i=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");i>36&&window.showModalDialog?o=!0:i>45&&(o=n("type","application/vnd.chromium.remoting-viewer"))}if(r.Baidu&&r.Opera&&(r.Baidu=!1),r.Mobile&&(r.Mobile=!(t.indexOf("iPad")>-1)),o&&(n("type","application/gameplugin")||Ae.navigator&&Ae.navigator.connection&&void 0===Ae.navigator.connection.saveData?r["360SE"]=!0:r["360EE"]=!0),r.IE||r.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 74:case 105:default:break;case 102:r["360EE"]=!0;break;case 104:r["360SE"]=!0}var a={Safari:function(){return t.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return t.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return t.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return t.replace(/^.*Edge?\/([\d.]+).*$/,"$1")},Firefox:function(){return t.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return t.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return t.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return t.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return t.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return t.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return t.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return t.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return t.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return t.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return t.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return t.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return t.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return t.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return t.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return t.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return t.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[t.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[t.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return t.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return t.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return t.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return t.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return t.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return t.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){var e="";t.indexOf("LieBaoFast")>-1&&(e=t.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1"));var n=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");return e||{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[n]||""},"2345Explorer":function(){return t.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return t.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return t.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return t.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return t.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return t.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return t.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return t.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return t.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return t.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return t.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return t.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return t.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return e.browserVersion="",e.browserMajor="",a[e.browser]&&(e.browserVersion=a[e.browser](),e.browserVersion==t&&(e.browserVersion="")),"Chrome"==e.browser&&t.match(/\S+Browser/)&&(e.browser=t.match(/\S+Browser/)[0],e.version=t.replace(/^.*Browser\/([\d.]+).*$/,"$1")),"Edge"==e.browser&&(e.version>"75"?e.engine="Blink":e.engine="EdgeHTML"),("Chrome"==e.browser&&parseInt(e.browserVersion)>27||r.Chrome&&"WebKit"==e.engine&&parseInt(e.browserVersion)>27||"Opera"==e.browser&&parseInt(e.version)>12||"Yandex"==e.browser)&&(e.engine="Blink"),e.browserVersion&&(e.browserMajor=e.browserVersion.split(".").length&&this.browserVersion.split(".")[0]),{browser:e.browser,browserVersion:e.browserVersion,engine:e.engine,browserMajor:e.browserMajor}})),getGeoPostion:c((function(e){navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(t){e(t)}),(function(e){i.warn(e)}))}))},Me={};"undefined"!=typeof window&&(Me={os:Ie.getOS(),osVersion:Ie.getOSVersion().version,osVersionMajor:Ie.getOSVersion().osMajor,browser:Ie.getBrowserInfo().browser,browserVersion:Ie.getBrowserInfo().browserVersion,browserVersionMajor:Ie.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:Ie.getNetwork(),device:Ie.getDeviceType()});var De=Me,Pe={BEFORE_UNLOAD:"beforeunload",CLICK:"click",DBL_CLICK:"dblclick",KEY_DOWN:"keydown",LOAD:"load",POP_STATE:"popstate",SCROLL:"scroll",TOUCH_START:"touchstart",TOUCH_END:"touchend",TOUCH_MOVE:"touchmove",VISIBILITY_CHANGE:"visibilitychange",PAGE_SHOW:"pageshow",FREEZE:"freeze",RESUME:"resume",DOM_CONTENT_LOADED:"DOMContentLoaded",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_CANCEL:"pointercancel",HASH_CHANGE:"hashchange",PAGE_HIDE:"pagehide",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_MOVE:"mousemove",FOCUS:"focus",BLUR:"blur",CONTEXT_MENU:"contextmenu",RESIZE:"resize",CHANGE:"change",INPUT:"input",PLAY:"play",PAUSE:"pause",SECURITY_POLICY_VIOLATION:"securitypolicyviolation",SELECTION_CHANGE:"selectionchange",STORAGE:"storage"},Ue={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",LOGGER:"logger"},$e={FETCH:"fetch",XHR:"xhr"},Ne={HANDLED:"handled",UNHANDLED:"unhandled"},Be={UNCAUGHT:"Uncaught",PROVIDED:"Provided"};function We(e){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},We(e)}function je(e,t,n){if("object"!==We(e)||null===e)return JSON.stringify(e);var r=Ge(Object.prototype),o=Ge(Array.prototype),i=Ge(Object.getPrototypeOf(e)),a=Ge(e);try{return JSON.stringify(e,t,n)}catch(e){return"<error: unable to serialize object>"}finally{r(),o(),i(),a()}}function Ge(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):Z}function Fe(e){return Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(e)}var Ve="?";function He(e){var t=[],n=et(e,"stack");return n&&k(n.split("\n"),(function(e){var n=function(e){var t=Ke.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=ze.exec(t[2]);r&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Ve,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=Xe.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:Ve,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=Ye.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Ve,line:+t[3],url:t[2]}}(e)||function(e){var t=Je.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=Ze.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||Ve,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=Ve),t.push(n))})),{message:et(e,"message"),name:et(e,"name"),stack:t}}var qe="((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",Qe="(?::(\\d+))",Ke=new RegExp("^\\s*at (.*?) ?\\("+qe+Qe+"?"+Qe+"?\\)?\\s*$","i"),ze=new RegExp("\\((\\S*)"+Qe+Qe+"\\)");var Xe=new RegExp("^\\s*at ?"+qe+Qe+"?"+Qe+"??\\s*$","i");var Ye=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Je=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ze=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function et(e,t){if("object"===Fe(e)&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var tt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function nt(e){var t=function(e){return Et(window,"onerror",(function(t){var n,r=t.parameters,o=r[0],i=r[1],a=r[2],s=r[3],u=r[4];if(u instanceof Error)n=He(u);else{var c={url:i,column:s,line:a},f=function(e){var t,n;if("[object String]"==={}.toString.call(e)){var r=tt.exec(e);r&&(t=r[1],n=r[2])}return{name:t,message:n}}(o);n={name:f.name,message:f.message,stack:[c]}}e(n,Ee(u,o))}))}(e),n=function(e){return Et(window,"onunhandledrejection",(function(t){var n=t.parameters[0].reason||"Empty reason",r=He(n);e(r,n)}))}(e);return{stop:function(){t.stop(),n.stop()}}}var rt=1024,ot=1024*rt,it=/[^\u0000-\u007F]/;function at(e){return it.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length}function st(e){return st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(e)}var ut=220*rt,ct="$",ft=3;function lt(e,t){void 0===t&&(t=ut);var n=Ge(Object.prototype),r=Ge(Array.prototype),o=[],i=new WeakMap,a=dt(e,ct,void 0,o,i),s=JSON.stringify(a)&&JSON.stringify(a).length||0;if(!(s>t)){for(;o.length>0&&s<t;){var u=o.shift(),c=0;if(Array.isArray(u.source))for(var f=0;f<u.source.length;f++){if(s+=void 0!==(l=dt(u.source[f],u.path,f,o,i))?JSON.stringify(l).length:4,s+=c,c=1,s>t){pt(t,"truncated",e);break}u.target[f]=l}else for(var f in u.source)if(Object.prototype.hasOwnProperty.call(u.source,f)){var l;if(void 0!==(l=dt(u.source[f],u.path,f,o,i))&&(s+=JSON.stringify(l).length+c+f.length+ft,c=1),s>t){pt(t,"truncated",e);break}u.target[f]=l}}return n(),r(),a}pt(t,"discarded",e)}function dt(e,t,n,r,o){var i=function(e){var t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!i||"object"!==st(i))return function(e){if("bigint"==typeof e)return"[BigInt] "+e.toString();if("function"==typeof e)return"[Function] "+e.name||0;if("symbol"===st(e))return"[Symbol] "+e.description||0;return e}(i);var a=function(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"["+t[1]+"]"}catch(e){}return"[Unserializable]"}(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;var s=e;if(o.has(s))return"[Reference seen at "+o.get(s)+"]";var u=void 0!==n?t+"."+n:t,c=Array.isArray(i)?[]:{};return o.set(s,u),r.push({source:i,target:c,path:u}),c}function pt(e,t,n){i.warn("The data provided has been "+t+" as it is over the limit of "+e+" characters:",n)}var vt="No stack, consider using an instance of Error",gt={AGENT:"agent",CONSOLE:"console",NETWORK:"network",SOURCE:"source",LOGGER:"logger",CUSTOM:"custom"};function yt(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,a=e.source,s=e.handling,u=n instanceof Error,c=function(e,t,n,r){return e&&e.message&&e&&e.name?e.message:t?"Empty message":n+" "+je(lt(r))}(t,u,i,n),f=function(e,t){if(void 0===t)return!1;if(e)return!0;return t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url)}(u,t)?ht(t):vt,l=u?bt(n,a):void 0;return{startClocks:o,source:a,handling:s,originalError:n,message:c,stack:f,handlingStack:r,type:t&&t.name,causes:l}}function _t(){var e,t=new Error;if(!t.stack)try{throw t}catch(e){}return f((function(){var n=He(t);n.stack=n.stack.slice(2),e=ht(n)})),e}function ht(e){var t=mt(e);return k(e.stack,(function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"("+e.args.join(", ")+")":"",o=e.line?":"+e.line:"",i=e.line&&e.column?":"+e.column:"";t+="\n at "+n+r+" @ "+e.url+o+i})),t}function mt(e){return(e.name||"Error")+": "+e.message}function bt(e,t){for(var n=e,r=[];n&&n.cause instanceof Error&&r.length<10;){var o=He(n.cause);r.push({message:n.cause.message,source:t,type:o&&o.name,stack:o&&ht(o)}),n=n.cause}return r.length?r:void 0}function Et(e,t,n,r){var o=r&&r.computeHandlingStack,i=e[t];if("function"!=typeof i){if(!we(t,"on"))return{stop:Z};i=Z}var a=!1,s=function(){if(a)return i.apply(this,arguments);var e,t=ve(arguments);f(n,null,[{target:this,parameters:t,onPostCall:function(t){e=t},handlingStack:o?_t():void 0}]);var r=i.apply(this,t);return e&&f(e,null,[r]),r};return e[t]=s,{stop:function(){a=!0,e[t]===s&&(e[t]=i)}}}var wt=function(e){this.observers=[],this.onLastUnsubscribe=void 0,this.onFirstSubscribe=e};wt.prototype={subscribe:function(e){this.observers.push(e),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0);var t=this;return{unsubscribe:function(){t.observers=U(t.observers,(function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},notify:function(e){k(this.observers,(function(t){t(e)}))}};var Ot=wt;function St(){var e=[].slice.call(arguments);return new Ot((function(t){var n=$(e,(function(e){return e.subscribe((function(e){return t.notify(e)}))}));return function(){return k(n,(function(e){return e.unsubscribe()}))}}))}var Ct={};function xt(t){var n=$(t,(function(t){return Ct[t]||(Ct[t]=function(t){return new Ot((function(n){var r=console[t];return console[t]=function(){var o=[].slice.call(arguments);r.apply(console,arguments);var i=_t();f((function(){n.notify(function(t,n,r){var o,i=$(t,(function(e){return function(e){if("string"==typeof e)return e;if(e instanceof Error)return mt(He(e));return je(e,void 0,2)}(e)})).join(" ");if(n===e.error){var a=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n,e))return r}}(t,(function(e){return e instanceof Error}));o={stack:a?ht(He(a)):void 0,causes:a?bt(a,"console"):void 0,startClocks:ae(),message:i,source:gt.CONSOLE,handling:Ne.HANDLED,handlingStack:r}}return{api:n,message:i,error:o,handlingStack:r}}(o,t,i))}))},function(){console[t]=r}}))}(t)),Ct[t]}));return St.apply(this,n)}function Tt(e,t,n,r){return kt(e,[t],n,r)}function kt(e,t,n,r){var o=c(r&&r.once?function(e){s(),n(e)}:n);r=r&&r.passive?{capture:r.capture,passive:r.passive}:r&&r.capture;var i=a(e,"addEventListener");k(t,(function(t){i.call(e,t,o,r)}));var s=function(){var n=a(e,"removeEventListener");k(t,(function(t){n.call(e,t,o,r)}))};return{stop:s}}var Rt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function Lt(e,t){var n=[];pe(t,Rt.cspViolation)&&n.push(new Ot((function(e){return Tt(document,Pe.SECURITY_POLICY_VIOLATION,(function(t){e.notify(function(e){var t="'"+e.blockedURI+"' blocked by '"+e.effectiveDirective+"' directive";return At({type:e.effectiveDirective,message:Rt.cspViolation+": "+t,originalError:e,csp:{disposition:e.disposition},stack:It(e.effectiveDirective,e.originalPolicy?"".concat(t,' of the policy "').concat(de(e.originalPolicy,100),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}(t))})).stop})));var r=U(t,(function(e){return e!==Rt.cspViolation}));return r.length&&n.push(function(e){return new Ot((function(t){if(window.ReportingObserver){var n=c((function(e){k(e,(function(e){t.notify(function(e){var t=e.body,n=e.type;return At({type:t.id,message:n+": "+t.message,originalError:e,stack:It(t.id,t.message,t.sourceFile,t.lineNumber,t.columnNumber)})}(e))}))})),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}))}(r)),St.apply(this,n)}function At(e){return R({startClocks:ae(),source:ErrorSource.REPORT,handling:ErrorHandling.UNHANDLED},e)}function It(e,t,n,r,o){return n&&ht({name:e,message:t,stack:[{func:"?",url:n,line:r,column:o}]})}var Mt=function(){this._events=[],this.pendingEvents=[]};Mt.prototype={emit:function(e){var t=[].slice.call(arguments,1);k(this._events,(function(n){if(n.type!==e)return!1;n.callback.apply(n.context,t)}))},on:function(e,t,n){"function"==typeof t&&this._events.push({type:e,callback:t,context:n||this})}};new Mt;var Dt,Pt={AUTO_ACTION_COMPLETED:"AUTO_ACTION_COMPLETED",BEFORE_VIEW_CREATED:"BEFORE_VIEW_CREATED",VIEW_CREATED:"VIEW_CREATED",VIEW_UPDATED:"VIEW_UPDATED",VIEW_ENDED:"VIEW_ENDED",AFTER_VIEW_ENDED:"AFTER_VIEW_ENDED",SESSION_RENEWED:"SESSION_RENEWED",SESSION_EXPIRED:"SESSION_EXPIRED",PAGE_EXITED:"PAGE_EXITED",REQUEST_STARTED:"REQUEST_STARTED",REQUEST_COMPLETED:"REQUEST_COMPLETED",RAW_RUM_EVENT_COLLECTED:"RAW_RUM_EVENT_COLLECTED",RUM_EVENT_COLLECTED:"RUM_EVENT_COLLECTED",RAW_ERROR_COLLECTED:"RAW_ERROR_COLLECTED",RAW_LOG_COLLECTED:"RAW_LOG_COLLECTED",LOG_COLLECTED:"LOG_COLLECTED"};function Ut(){this.callbacks={}}function $t(e){return Nt(e,function(e){if(e.origin&&"null"!==e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}(window.location)).href}function Nt(e,t){if(function(){if(void 0!==Dt)return Dt;try{var e=new URL("http://test/path");return Dt="http://test/path"===e.href}catch(e){Dt=!1}return Dt}())return void 0!==t?new URL(e,t):new URL(e);if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: "+e);var n=document,r=n.createElement("a");if(void 0!==t){var o=(n=document.implementation.createHTMLDocument("")).createElement("base");o.href=t,n.head.appendChild(o),n.body.appendChild(r)}return r.href=e,r}Ut.prototype={notify:function(e,t){var n=this.callbacks[e];n&&k(n,(function(e){e(t)}))},subscribe:function(e,t){this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t);var n=this;return{unsubscribe:function(){n.callbacks[e]=U(n.callbacks[e],(function(e){return e!==t}))}}}};var Bt=navigator.userAgent.toLowerCase(),Wt=function(){return/iphone os/.test(Bt)};var jt;function Gt(e,t,n,r){var o=new Date;o.setTime(o.getTime()+n);var i="expires="+o.toUTCString(),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain="+r.domain:"",u=r&&r.secure?";secure":"",c=r&&r.partitioned?";partitioned":"";document.cookie=e+"="+t+";"+i+";path=/;samesite="+a+s+u+c}function Ft(e){return function(e,t){for(fe.lastIndex=0;;){var n=fe.exec(e);if(!n)break;if(n[1]===t)return n[2]}}(document.cookie,e)}var Vt=/^\s+|\s+$/g,Ht={rum:"/rum",log:"/logging",sessionReplay:"/rum/replay"};function qt(e,t){var n=Ht[t];if(!n)return"";var r=e.datakitOrigin||e.datakitUrl||e.site;0===r.indexOf("/")&&(r=location.origin+Qt(r));var o=r;return o=r.lastIndexOf("/")===r.length-1?Qt(r)+"v1/write"+n:Qt(r)+"/v1/write"+n,e.site&&e.clientToken&&(o=o+"?token="+e.clientToken+"&to_headless=true"),o}function Qt(e){return e.replace(Vt,"")}var Kt,zt;function Xt(e){if(void 0===e.sampleRate||ge(e.sampleRate))if(void 0===e.sessionSampleRate||ge(e.sessionSampleRate)){if(void 0===e.telemetrySampleRate||ge(e.telemetrySampleRate)){var t=e.sessionSampleRate||e.sampleRate;return R({beforeSend:e.beforeSend&&d(e.beforeSend,"beforeSend threw an error:"),cookieOptions:Yt(e),sessionSampleRate:Ee(t,100),service:e.service,version:e.version,env:e.env,telemetrySampleRate:Ee(e.telemetrySampleRate,100),telemetryEnabled:Ee(e.telemetryEnabled,!1),silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16*rt,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*te,batchMessagesLimit:50,messageBytesLimit:256*rt,resourceUrlLimit:5*rt,storeContextsToLocal:!!e.storeContextsToLocal,storeContextsKey:e.storeContextsKey,sendContentTypeByJson:!!e.sendContentTypeByJson},function(e){var t=function(e){return!1};"isIntakeUrl"in e&&M(e.isIntakeUrl)&&V(e.isIntakeUrl())&&(t=e.isIntakeUrl);var n=function(e){return!1};return"isServerError"in e&&M(e.isServerError)&&V(e.isServerError())&&(n=e.isServerError),{rumEndpoint:qt(e,"rum"),logsEndpoint:qt(e,"log"),sessionReplayEndPoint:qt(e,"sessionReplay"),isIntakeUrl:t,isServerError:n}}(e))}i.error("Telemetry Sample Rate should be a number between 0 and 100")}else i.error("Sample Rate should be a number between 0 and 100");else i.error("Sample Rate should be a number between 0 and 100")}function Yt(e){var t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===jt){for(var e="gc_site_test_".concat(K()),t=window.location.hostname.split("."),n=t.pop();t.length&&!Ft(e);)n=t.pop()+"."+n,Gt(e,"test",te,{domain:n});jt=n}return jt}()),t}function Jt(){return Kt||(Kt=new Ot((function(e){if(window.fetch){var t=Et(window,"fetch",(function(t){return function(e,t){var n=e.parameters,r=e.onPostCall,o=e.handlingStack,i=n[0],a=n[1],s=a&&a.method;void 0===s&&i instanceof Request&&(s=i.method);var u=void 0!==s?String(s).toUpperCase():"GET",f=i instanceof Request?i.url:$t(String(i)),l=ae(),d={state:"start",init:a,input:i,method:u,startClocks:l,url:f,handlingStack:o};t.notify(d),n[0]=d.input,n[1]=d.init,r((function(e){return function(e,t,n){var r=n,o=function(t){r.state="resolve",R(r,t),e.notify(r)};t.then(c((function(e){var t="";try{t=e.constructor===Response&&e.type||""}catch(e){t=""}o({response:e,responseType:t,status:e.status,isAborted:!1})})),c((function(e){o({status:0,isAborted:r.init&&r.init.signal&&r.init.signal.aborted||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,error:e})})))}(t,e,d)}))}(t,e)}),{computeHandlingStack:!0});return t.stop}}))),Kt}var Zt=new WeakMap;function en(){return zt||(zt=new Ot((function(e){var t=Et(XMLHttpRequest.prototype,"open",tn),n=Et(XMLHttpRequest.prototype,"send",(function(t){!function(e,t){var n=e.target,r=e.handlingStack,o=Zt.get(n);if(o){var i=o;i.state="start",i.startClocks=ae(),i.isAborted=!1,i.xhr=n,i.handlingStack=r;var a=!1,s=Et(n,"onreadystatechange",(function(){n.readyState===XMLHttpRequest.DONE&&u()})).stop,u=function(){if(c(),s(),!a){a=!0;var e,r=o;r.state="complete",r.duration=(e=i.startClocks.timeStamp,se()-e),r.status=n.status,t.notify(R({},r))}},c=Tt(n,"loadend",u).stop;t.notify(i)}}(t,e)}),{computeHandlingStack:!0}),r=Et(XMLHttpRequest.prototype,"abort",nn);return function(){t.stop(),n.stop(),r.stop()}}))),zt}function tn(e){var t=e.target,n=e.parameters[0],r=e.parameters[1];Zt.set(t,{state:"open",method:String(n).toUpperCase(),url:$t(String(r))})}function nn(e){var t=e.target,n=Zt.get(t);n&&(n.isAborted=!0)}var rn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};var on,an={sdk_name:"_gc.sdk_name",sdk_version:"_gc.sdk_version",app_id:"application.id",env:"env",service:"service",version:"version",source:"source",userid:"user.id",user_email:"user.email",user_name:"user.name",session_id:"session.id",session_type:"session.type",session_sampling:"session.is_sampling",is_signin:"user.is_signin",os:"device.os",os_version:"device.os_version",os_version_major:"device.os_version_major",browser:"device.browser",browser_version:"device.browser_version",browser_version_major:"device.browser_version_major",screen_size:"device.screen_size",network_type:"device.network_type",device:"device.device",view_id:"view.id",view_referrer:"view.referrer",view_url:"view.url",view_host:"view.host",view_path:"view.path",view_name:"view.path",view_path_group:"view.path_group"},sn={view_url_query:"view.url_query",action_id:"action.id",action_ids:"action.ids",view_in_foreground:"view.in_foreground",display:"display",session_has_replay:"session.has_replay",is_login:"user.is_login",page_states:"_gc.page_states",session_sample_rate:"_gc.configuration.session_sample_rate",session_replay_sample_rate:"_gc.configuration.session_replay_sample_rate",drift:"_gc.drift"},un={view:{type:Ue.VIEW,tags:{view_loading_type:"view.loading_type",view_apdex_level:"view.apdex_level",view_privacy_replay_level:"privacy.replay_level"},fields:{sampled_for_replay:"session.sampled_for_replay",is_active:"view.is_active",session_replay_stats:"_gc.replay_stats",session_is_active:"session.is_active",view_error_count:"view.error.count",view_resource_count:"view.resource.count",view_long_task_count:"view.long_task.count",view_action_count:"view.action.count",first_contentful_paint:"view.first_contentful_paint",largest_contentful_paint:"view.largest_contentful_paint",largest_contentful_paint_element_selector:"view.largest_contentful_paint_element_selector",cumulative_layout_shift:"view.cumulative_layout_shift",cumulative_layout_shift_time:"view.cumulative_layout_shift_time",cumulative_layout_shift_target_selector:"view.cumulative_layout_shift_target_selector",first_input_delay:"view.first_input_delay",loading_time:"view.loading_time",dom_interactive:"view.dom_interactive",dom_content_loaded:"view.dom_content_loaded",dom_complete:"view.dom_complete",load_event:"view.load_event",first_input_time:"view.first_input_time",first_input_target_selector:"view.first_input_target_selector",first_paint_time:"view.fpt",interaction_to_next_paint:"view.interaction_to_next_paint",interaction_to_next_paint_target_selector:"view.interaction_to_next_paint_target_selector",resource_load_time:"view.resource_load_time",time_to_interactive:"view.tti",dom:"view.dom",dom_ready:"view.dom_ready",time_spent:"view.time_spent",first_byte:"view.first_byte",frustration_count:"view.frustration.count",custom_timings:"view.custom_timings"}},resource:{type:Ue.RESOURCE,tags:{trace_id:"_gc.trace_id",span_id:"_gc.span_id",resource_id:"resource.id",resource_url:"resource.url",resource_url_host:"resource.url_host",resource_url_path:"resource.url_path",resource_url_path_group:"resource.url_path_group",resource_url_query:"resource.url_query",resource_type:"resource.type",resource_status:"resource.status",resource_status_group:"resource.status_group",resource_method:"resource.method"},fields:{duration:"resource.duration",resource_size:"resource.size",resource_encode_size:"resource.encoded_body_size",resource_decode_size:"resource.decoded_body_size",resource_transfer_size:"resource.transfer_size",resource_render_blocking_status:"resource.render_blocking_status",resource_dns:"resource.dns",resource_tcp:"resource.tcp",resource_ssl:"resource.ssl",resource_ttfb:"resource.ttfb",resource_trans:"resource.trans",resource_redirect:"resource.redirect",resource_first_byte:"resource.firstbyte",resource_dns_time:"resource.dns_time",resource_download_time:"resource.download_time",resource_first_byte_time:"resource.first_byte_time",resource_connect_time:"resource.connect_time",resource_ssl_time:"resource.ssl_time",resource_redirect_time:"resource.redirect_time"}},error:{type:Ue.ERROR,tags:{error_id:"error.id",trace_id:"_gc.trace_id",span_id:"_gc.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"],error_causes:["string","error.causes"],error_handling_stack:["string","error.handling_stack"]}},long_task:{type:Ue.LONG_TASK,tags:{long_task_id:"long_task.id"},fields:{duration:"long_task.duration",blocking_duration:"long_task.blocking_duration",first_ui_event_timestamp:"long_task.first_ui_event_timestamp",render_start:"long_task.render_start",style_and_layout_start:"long_task.style_and_layout_start",long_task_start_time:"long_task.start_time",scripts:["string","long_task.scripts"]}},action:{type:Ue.ACTION,tags:{action_type:"action.type"},fields:{action_name:"action.target.name",duration:"action.loading_time",action_error_count:"action.error.count",action_resource_count:"action.resource.count",action_frustration_types:"action.frustration.type",action_long_task_count:"action.long_task.count",action_target:"_gc.action.target",action_position:"_gc.action.position"}},telemetry:{type:"telemetry",fields:{status:"telemetry.status",message:["string","telemetry.message"],type:"telemetry.type",error_stack:["string","telemetry.error.stack"],error_kind:["string","telemetry.error.kind"]}},browser_log:{type:Ue.LOGGER,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"http.url",error_resource_url_host:"http.url_host",error_resource_url_path:"http.url_path",error_resource_url_path_group:"http.url_path_group",error_resource_status:"http.status_code",error_resource_status_group:"http.status_group",error_resource_method:"http.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"],error_message:["string","error.message"],error_stack:["string","error.stack"]}}},cn=4*re,fn=15*ne,ln=/^([a-z]+)=([a-z0-9-]+)$/,dn="&",pn="_dataflux_s",vn=10,gn=100,yn=[];function _n(e,t){if(void 0===t&&(t=0),on||(on=e),e===on)if(t>=gn)bn();else{var n,r=wn();if(hn()){if(r.lock)return void mn(e,t);if(n=K(),r.lock=n,En(r,e.options),(r=wn()).lock!==n)return void mn(e,t)}var o=e.process(r);if(hn()&&(r=wn()).lock!==n)mn(e,t);else{if(o&&function(e,t){if(On(e))return void Sn(t);e.expire=String(ue()+fn),En(e,t)}(o,e.options),hn()&&(!o||!On(o))){if((r=wn()).lock!==n)return void mn(e,t);delete r.lock,En(r,e.options),o=r}e.after&&e.after(o||r),bn()}}else yn.push(e)}function hn(){return he()===_e.CHROMIUM}function mn(e,t){g((function(){_n(e,t+1)}),vn)}function bn(){on=void 0;var e=yn.shift();e&&_n(e)}function En(e,t){Gt(pn,function(e){return $(G(e),(function(e){return e[0]+"="+e[1]})).join(dn)}(e),fn,t)}function wn(){var e=Ft(pn),t={};return function(e){return void 0!==e&&(-1!==e.indexOf(dn)||ln.test(e))}(e)&&k(e.split(dn),(function(e){var n=ln.exec(e);if(null!==n){var r=n[1],o=n[2];t[r]=o}})),t}function On(e){return j(e)}function Sn(e){Gt(pn,"",0,e)}var Cn=te;function xn(e,t,n){var r=new Ot,o=new Ot,i=_((function(){_n({options:e,process:function(e){return d(e)?void 0:{}},after:f})}),Cn),a=function(){var e=wn();if(d(e))return e;return{}}(),s=q((function(){var o;_n({options:e,process:function(e){var r=f(e);return o=function(e){var r=n(e[t]),o=r.trackingType,i=r.isTracked;e[t]=o,i&&!e.id&&(e.id=K(),e.created=String(ue()));return i}(r),r},after:function(e){o&&!l()&&function(e){a=e,r.notify()}(e),a=e}})}),Cn),u=s.throttled,c=s.cancel;function f(e){return d(e)||(e={}),l()&&(!function(e){return a.id!==e.id||a[t]!==e[t]}(e)?a=e:(a={},o.notify())),e}function l(){return void 0!==a[t]}function d(e){return(void 0===e.created||ue()-Number(e.created)<cn)&&(void 0===e.expire||ue()<Number(e.expire))}return{expandOrRenewSession:u,expandSession:function(){_n({options:e,process:function(e){return l()?f(e):void 0}})},getSession:function(){return a},renewObservable:r,expireObservable:o,expire:function(){c(),Sn(e),f({})},stop:function(){h(i)}}}var Tn=ne,kn=cn,Rn=[],Ln=function(e,t,n){var r=new Ot,o=new Ot,i=xn(e,t,n);Rn.push((function(){return i.stop()}));var a,s,u=Le({expireDelay:kn});function c(){return{id:i.getSession().id,trackingType:i.getSession()[t]}}return Rn.push((function(){return u.stop()})),i.renewObservable.subscribe((function(){u.add(c(),ie()),r.notify()})),i.expireObservable.subscribe((function(){o.notify(),u.closeActive(ie())})),i.expandOrRenewSession(),u.add(c(),[0,ce()][0]),a=function(){return i.expandOrRenewSession()},s=kt(window,[Pe.CLICK,Pe.TOUCH_START,Pe.KEY_DOWN,Pe.SCROLL],a,{capture:!0,passive:!0}),Rn.push(s.stop),function(e){var t=function(){"visible"===document.visibilityState&&e()},n=Tt(document,Pe.VISIBILITY_CHANGE,t);Rn.push(n.stop);var r=_(t,Tn);Rn.push((function(){h(r)}))}((function(){return i.expandSession()})),{findActiveSession:function(e){return u.find(e)},renewObservable:r,expireObservable:o,expire:i.expire}};var An=80*rt,In=32,Mn=3*ot,Dn=256*te,Pn=te,Un={UP:0,FAILURE_DETECTED:1,DOWN:2},$n={AFTER_SUCCESS:0,AFTER_RESUME:1};function Nn(e,t,n,r,o){t.transportStatus===Un.UP&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?Wn(e,t,n,{onSuccess:function(){return jn($n.AFTER_SUCCESS,t,n,r,o)},onFailure:function(){t.queuedPayloads.enqueue(e),Bn(t,n,r,o)}}):t.queuedPayloads.enqueue(e)}function Bn(e,t,n,r){e.transportStatus===Un.DOWN&&g((function(){Wn(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=Pn,jn($n.AFTER_RESUME,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(Dn,2*e.currentBackoffTime),Bn(e,t,n,r)}})}),e.currentBackoffTime)}function Wn(e,t,n,r){var o=r.onSuccess,i=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e){return"opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||e.status>=500)}(n)?(t.transportStatus=Un.UP,o()):(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?Un.FAILURE_DETECTED:Un.DOWN,t.lastFailureStatus=n.status,i())}))}function jn(e,t,n,r,o){e===$n.AFTER_SUCCESS&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max "+r+" events size queued for upload: "+Mn/ot+"MiB",source:gt.AGENT,startClocks:ae()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=Gn();i.size()>0;)Nn(i.dequeue(),t,n,r,o)}function Gn(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=Mn}}}function Fn(){var e,t=window.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:null===(e=t.connection)||void 0===e?void 0:e.effectiveType}}var Vn={log:"log",configuration:"configuration",usage:"usage"},Hn={debug:"debug",error:"error"},qn=["https://static.guance.com","http://localhost","<anonymous>"],Qn={LOGS:"browser-logs-sdk",RUM:"browser-rum-sdk"},Kn=Ce(),zn=function(e){Kn.add((function(){zn(e)}))};function Xn(e,t){var n,o=new Ot,i=new Set,a=t.telemetryEnabled&&oe(t.telemetrySampleRate),s={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self};return zn=function(r){var u=je(r);if(a&&i.size<t.maxTelemetryEventsPerPage&&!i.has(u)){var c=function(e,t,r){return A({type:"telemetry",date:se(),service:e,version:"3.2.2",source:"browser",telemetry:A(t,{runtime_env:r,connectivity:Fn()})},void 0!==n?n():{})}(e,r,s);o.notify(c),i.add(u)}},r=Yn,{setContextProvider:function(e){n=e},observable:o,enabled:a}}function Yn(e,t){zn(R({type:Vn.log,status:Hn.error},function(e){if(e instanceof Error){var t=He(e);return{error:{kind:t.name,stack:ht(Jn(t))},message:t.message}}return{error:{stack:vt},message:Be.UNCAUGHT+" "+je(e)}}(e),t))}function Jn(e){return e.stack=e.stack.filter((function(e){return!e.url||qn.some((function(t){return we(e.url,t)}))})),e}function Zn(e,t){return e?(e=e+(-1===e.indexOf("?")?"?":"&")+"precision=ms",t&&(e=e+"&encoding="+t),e):e}function er(e,t,n){var r={transportStatus:Un.UP,lastFailureStatus:0,currentBackoffTime:Pn,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=An&&this.ongoingRequestCount<In},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:Gn(),queueFullReported:!1},o=function(n,r){return function(e,t,n,r){var o=n.data,i=n.bytesCount,a=Zn(e,n.encoding),s=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&i<t;if(s){var u={method:"POST",body:o,keepalive:!0,mode:"cors"};n.type&&(u.headers={"Content-Type":n.type}),fetch(a,u).then(c((function(e){"function"==typeof r&&r({status:e.status,type:e.type})})),c((function(){nr(a,n,r)})))}else nr(a,n,r)}(e,t,n,r)};return{send:function(t){Nn(t,r,o,e,n)},sendOnExit:function(n){!function(e,t,n){var r=n.data,o=n.bytesCount,i=Zn(e,n.encoding),a=!!navigator.sendBeacon&&o<t;if(a)try{var s;if(s=n.type?new Blob([r],{type:n.type}):r,navigator.sendBeacon(i,s))return}catch(e){!function(e){tr||(tr=!0,Yn(e))}(e)}nr(i,n)}(e,t,n)}}}var tr=!1;function nr(e,t,n){var r=t.data,o=new XMLHttpRequest;o.open("POST",e,!0),r instanceof Blob?o.setRequestHeader("Content-Type",r.type):t.type&&o.setRequestHeader("Content-Type",t.type),Tt(o,"loadend",(function(){"function"==typeof n&&n({status:o.status})}),{once:!0}),o.send(r)}function rr(e){return rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(e)}function or(e){if("object"===rr(e)&&e)e=je(e);else if(!F(e))return e;return String(e).replace(/[\s=,"]/g,(function(e){return"\\"+e}))}function ir(e,t){return"object"===rr(e)&&e?e=je(e):t&&(e=""+e),e}function ar(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}function sr(e){return"object"===rr(e)&&e?ar(je(e)):F(e)?ar(e):e}var ur="custom_keys",cr=function(e){if(!e||!e.type)return{rowStr:"",rowData:void 0};var t={tags:{},fields:{}},n=!1,r="";return k(un,(function(o,i){if(o.type===e.type){r+=i+",",t.measurement=i;var a=[],s=L({},an,o.tags),u=["date","type",ur];k(s,(function(n,r){var o=le(e,n);u.push(r),(o||H(o))&&(t.tags[r]=ir(o,!0),a.push(or(r)+"="+or(o)))}));var c=[],f=L({},sn,o.fields);if(k(f,(function(n,r){if(I(n)&&2===n.length){var o=n[1],i=le(e,o);u.push(r),null!=i&&(t.fields[r]=ir(i),c.push(or(r)+"="+sr(i)))}else if(F(n)){i=le(e,n);u.push(r),null!=i&&(t.fields[r]=ir(i),c.push(or(r)+"="+sr(i)))}})),e.context&&W(e.context)&&!j(e.context)){var l=[];k(e.context,(function(e,n){u.indexOf(n)>-1||(u.push(n),null!=e&&(l.push(n),t.fields[n]=ir(e),c.push(or(n)+"="+sr(e))))})),l.length&&(t.fields[ur]=ir(l),c.push(or(ur)+"="+sr(l)))}e.type===Ue.LOGGER&&k(e,(function(e,n){-1===u.indexOf(n)&&null!=e&&(t.fields[n]=ir(e),c.push(or(n)+"="+sr(e)))})),a.length&&(r+=a.join(",")),c.length&&(r+=" ",r+=c.join(","),n=!0),r=r+" "+e.date,t.time=e.date}})),{rowStr:n?r:"",rowData:n?t:void 0}};function fr(e){var t=e.encoder,n=e.request,r=e.messageBytesLimit,o=e.sendContentTypeByJson,a=e.flushController,s={},u=a.flushObservable.subscribe((function(e){!function(e){var r=D(s).join(o?",":"\n");s={};var i=(u=e.reason,pe(D(rn),u)),a=i?n.sendOnExit:n.send;var u;if(i&&t.isAsync){var f=t.finishSync();f.outputBytesCount&&a(lr(f,o));var l=[f.pendingData,r].filter(Boolean).join("\n");l&&a({data:l,bytesCount:at(l)})}else{if(r){var d=c([r],t.isEmpty());o&&(d+="]"),t.write(d)}else o&&t.write("]");t.finish((function(e){a(lr(e))}))}}(e)}));function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return o?t?"["+e.join(","):","+e.join(","):t?e.join("\n"):"\n"+e.join("\n")}function f(e,n){var u=function(e){return o?je(cr(e).rowData):cr(e).rowStr}(e),f=t.estimateEncodedBytesCount(u);f>=r?i.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(r,"KB.")):(function(e){return void 0!==e&&void 0!==s[e]}(n)&&function(e){var n=s[e];delete s[e];var r=t.estimateEncodedBytesCount(n);a.notifyAfterRemoveMessage(r)}(n),function(e,n,r){a.notifyBeforeAddMessage(n),void 0!==r?(s[r]=e,a.notifyAfterAddMessage()):t.write(c([e],t.isEmpty()),(function(e){a.notifyAfterAddMessage(e-n)}))}(u,f,n))}return{flushController:a,add:f,upsert:f,stop:u.unsubscribe}}function lr(e,t){return{data:"string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),type:t?"application/json;UTF-8":void 0,bytesCount:e.outputBytesCount,encoding:e.encoding}}function dr(e){var t=e.messagesLimit,n=e.bytesLimit,r=e.durationLimit,o=e.pageExitObservable,i=e.sessionExpireObservable;o.subscribe((function(e){return f(e.reason)})),i.subscribe((function(){return f("session_expire")}));var a,s=new Ot((function(){return function(){pageExitSubscription.unsubscribe(),sessionExpireSubscription.unsubscribe()}})),u=0,c=0;function f(e){if(0!==c){var t=c,n=u;c=0,u=0,l(),s.notify({reason:e,messagesCount:t,bytesCount:n})}}function l(){y(a),a=void 0}return{flushObservable:s,getMessagesCount:function(){return c},notifyBeforeAddMessage:function(e){u+e>=n&&f("bytes_limit"),c+=1,u+=e,void 0===a&&(a=g((function(){f("duration_limit")}),r))},notifyAfterAddMessage:function(e){void 0===e&&(e=0),u+=e,c>=t?f("messages_limit"):u>=n&&f("bytes_limit")},notifyAfterRemoveMessage:function(e){u-=e,0===(c-=1)&&l()}}}function pr(e,t,n,r,o,i){void 0===i&&(i=fr);var a=function(e,t){return i({encoder:t.encoder,request:er(t.endpoint,e.batchBytesLimit,n),flushController:dr({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:r,sessionExpireObservable:o}),messageBytesLimit:e.messageBytesLimit,sendContentTypeByJson:e.sendContentTypeByJson})}(e,t);return{flushObservable:a.flushController.flushObservable,add:function(e){a.add(e)},upsert:function(e,t){a.upsert(e,t)},stop:function(){a.stop()}}}function vr(){var e=v().FTWebViewJavascriptBridge;if(e)return{send:function(t,n){e.sendEvent(JSON.stringify({name:t,data:n}))}}}function gr(){return!!vr()}var yr="guance-synthetics-injects-rum";var _r=3*rt,hr={FeatureFlag:"feature flag evaluation",User:"user",GlobalContext:"global context",LoggerContext:"logger context"};var mr=200;function br(e,t){void 0===t&&(t=at);var n,r={},o=!1,a=new Ot,s=q((function(r){n=t(je(r)),o||(o=function(e,t){return e>_r&&(i.warn("The "+t+"data is over "+_r/rt+" KiB. On low connectivity, the SDK has the potential to exhaust the user's upload bandwidth."),!0)}(n,e))}),mr).throttled,u={getBytesCount:function(){return n},get:function(){return r},add:function(e,t){r[e]=t,s(r),a.notify()},remove:function(e){delete r[e],s(r),a.notify()},set:function(e){s(r=e),a.notify()},getContext:function(){return J(r)},setContext:function(e){"object"===X(e)?(r=lt(e),s(r)):u.clearContext(),a.notify()},setContextProperty:function(e,t){r[e]=J(t),s(r),a.notify()},removeContextProperty:function(e){delete r[e],s(r),a.notify()},clearContext:function(){r={},n=0,a.notify()},changeObservable:a};return u}var Er="_gc_s",wr=[];function Or(e,t,n,r){var o=function(e,t,n){return e.storeContextsKey&&F(e.storeContextsKey)?Er+"_"+t+"_"+n+"_"+e.storeContextsKey:Er+"_"+t+"_"+n}(e,n,r);function i(){var e=localStorage.getItem(o);return null!==e?JSON.parse(e):{}}return wr.push(Tt(window,Pe.STORAGE,(function(e){o===e.key&&t.setContext(i())}))),t.changeObservable.subscribe((function(){localStorage.setItem(o,JSON.stringify(t.getContext()))})),t.setContext(A(i(),t.getContext())),t}function Sr(){var e="",t=0;return{isAsync:!1,isEmpty:function(){return!e},write:function(n,r){var o=at(n);t+=o,e+=n,r&&r(o)},finish:function(e){e(this.finishSync())},finishSync:function(){var n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount:function(e){return e.length}}}function Cr(e){var t=R({},e);return k(["id","name","email"],(function(e){e in t&&(t[e]=String(t[e]))})),t}function xr(e){this.map=new WeakMap,e&&e.forEach((function(e){this.map.set(e,1)}))}function Tr(e,t){t.silentMultipleInit||i.error(e+" is already initialized.")}xr.prototype.add=function(e){return this.map.set(e,1),this},xr.prototype.delete=function(e){return this.map.delete(e)},xr.prototype.has=function(e){return this.map.has(e)};var kr={ok:0,debug:1,info:2,notice:4,warn:5,error:6,critical:7,alert:8,emerg:9};function Rr(e){return{handleLog:function(t,r,o,i,a){var s=A(r.getContext(),t.context);if(Lr(t.status,Mr.console,r)&&function(e,t){var r=e.status,o=e.message;n[loggerToConsoleApiName[r]].call(globalConsole,o,t)}(t,s),Lr(t.status,Mr.http,r)){var u={rawLogsEvent:{date:a||se(),message:t.message,status:t.status,origin:gt.LOGGER},messageContext:s,savedCommonContext:i};o&&(u.domainContext={handlingStack:o}),e.notify(Pt.RAW_LOG_COLLECTED,u)}}}}function Lr(e,t,n){var r=n.getHandler(),o=I(r)?r:[r];return kr[e]>=kr[n.getLevel()]&&pe(o,t)}function Ar(e,t){void 0===t&&(t={});var n=t.includeMessage||!1;return{stack:e.stack,kind:e.type,message:n?e.message:void 0,causes:e.causes,handling:e.handling}}var Ir={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},Mr={console:"console",http:"http",silent:"silent"},Dr=P(Ir);function Pr(e,t,n,r,o){void 0===n&&(n=Mr.http),void 0===r&&(r=Ir.debug),void 0===o&&(o={}),this.contextManager=br(hr.LoggerContext),this.handleLogStrategy=e,this.handlerType=n,this.level=r,this.contextManager.setContext(o),t&&this.contextManager.setContextProperty("logger",{name:t})}function Ur(e){return function(t,n,r){var o;Lr(e,Mr.http,this)&&(o=_t()),this.logImplementation(t,n,e,r,o)}}Pr.prototype={logImplementation:c((function(e,t,n,r,o){void 0===n&&(n=Ir.info);var i,a=lt(t);if(null!=r){var s=yt({stackTrace:r instanceof Error?He(r):void 0,originalError:r,nonErrorPrefix:Be.PROVIDED,source:gt.LOGGER,handling:Ne.HANDLED,startClocks:ae()});i=A({error:Ar(s,{includeMessage:!0})},a)}else i=a;this.handleLogStrategy({message:lt(e),context:i,status:n},this,o)})),log:function(e,t,n,r){var o;Lr(n,Mr.http,this)&&(o=_t()),this.logImplementation(e,t,n,r,o)},setContext:function(e){this.contextManager.setContext(e)},getContext:function(){return this.contextManager.getContext()},setContextProperty:function(e,t){this.contextManager.setContextProperty(e,t)},addContext:function(e,t){this.contextManager.setContextProperty(e,t)},removeContextProperty:function(e){this.contextManager.removeContextProperty(e)},removeContext:function(e){this.contextManager.remove(e)},clearContext:function(){this.contextManager.clearContext()},setHandler:function(e){this.handlerType=e},getHandler:function(){return this.handlerType},setLevel:function(e){this.level=e},getLevel:function(){return this.level}},Pr.prototype.ok=Ur(Ir.ok),Pr.prototype.debug=Ur(Ir.debug),Pr.prototype.info=Ur(Ir.info),Pr.prototype.notice=Ur(Ir.notice),Pr.prototype.warn=Ur(Ir.warn),Pr.prototype.error=Ur(Ir.error),Pr.prototype.critical=Ur(Ir.critical),Pr.prototype.alert=Ur(Ir.alert),Pr.prototype.emerg=Ur(Ir.emerg);var $r={sdkVersion:"3.2.2",sdkName:"df_web_logs_sdk"},Nr=32*rt;function Br(t){var n=function(e){return e.site||e.datakitOrigin||e.datakitUrl?!(e.site&&!e.clientToken&&(i.error("clientToken is not configured, no RUM data will be collected."),1)):(i.error("datakitOrigin or site is not configured, no RUM data will be collected."),!1)}(t);if(n){var r=Xt(t),o=Wr(t.forwardConsoleLogs,D(e),"Forward Console Logs"),a=Wr(t.forwardReports,D(Rt),"Forward Reports");if(r&&o&&a)return t.forwardErrorsToLogs&&!pe(o,e.error)&&o.push(e.error),R({forwardErrorsToLogs:!1!==t.forwardErrorsToLogs,forwardConsoleLogs:o,forwardReports:a,requestErrorResponseLengthLimit:Nr},r,$r)}}function Wr(e,t,n){return void 0===e?[]:"all"===e||I(e)&&B(e,(function(e){return pe(t,e)}))?"all"===e?t:Q(e):void i.error(n+' should be "all" or an array with allowed values "'+t.join('", "')+'"')}function jr(e,t){var n,r,o=Ce();return{init:function(e){if(e)if(gr()&&(e=function(e){return R({},e,{clientToken:"empty"})}(e)),n=e,r)Tr("DATAFLUX_LOGS",e);else{var a=Br(e);a&&(r=a,Jt().subscribe(Z),function(){if(r&&n){var e=t(n,r);o.drain(e)}}())}else i.error("Missing configuration")},getInitConfiguration:function(){return n},getInternalContext:Z,handleLog:function(t,n,r,i,a){void 0===i&&(i=e()),void 0===a&&(a=se()),o.add((function(e){e.handleLog(t,n,r,i,a)}))}}}var Gr="logs";var Fr,Vr="logs",Hr={NOT_TRACKED:"0",TRACKED:"1"};function qr(e){var t=Ln(e.cookieOptions,Vr,(function(t){return function(e,t){var n=function(e){return e===Hr.NOT_TRACKED||e===Hr.TRACKED}(t)?t:Qr(e);return{trackingType:n,isTracked:n===Hr.TRACKED}}(e,t)}));return{findTrackedSession:function(e){var n=t.findActiveSession(e);return n&&n.trackingType===Hr.TRACKED?{id:n.id}:void 0},expireObservable:t.expireObservable}}function Qr(e){return oe(e.sessionSampleRate)?Hr.TRACKED:Hr.NOT_TRACKED}function Kr(e,t,n,r,o){var i=Dr.concat(["custom"]),a={};k(i,(function(e){var n,r,i,s,u;a[e]=(n=e,r=t.eventRateLimiterThreshold,i=o,s=0,u=!1,{isLimitReached:function(){if(0===s&&g((function(){s=0}),ne),(s+=1)<=r||u)return u=!1,!1;if(s===r+1){u=!0;try{i({message:"Reached max number of "+n+"s by minute: "+r,source:gt.AGENT,startClocks:ae()})}finally{u=!1}}return!0}})})),n.subscribe(Pt.RAW_LOG_COLLECTED,(function(o){var i=o.rawLogsEvent,s=o.messageContext||void 0,u=o.savedCommonContext||void 0,c=o.domainContext,f=i.date-ce(),l=e.findTrackedSession(f);if(l){var d=u||r(),p=A({service:t.service||"browser",env:t.env||"",version:t.version||"",_gc:{sdkName:t.sdkName,sdkVersion:t.sdkVersion},session:{id:l.id},view:d.view,user:j(d.user)?void 0:d.user,device:De,type:Ue.LOGGER},d.context,zr(f),i,s);t.beforeSend&&!1===t.beforeSend(p,c)||p.origin!==gt.AGENT&&Ee(a[p.status],a.custom).isLimitReached()||n.notify(Pt.LOG_COLLECTED,me(p))}}))}function zr(e){return function(t){if(t&&t.getInternalContext)return t.getInternalContext(e)}(window.DATAFLUX_RUM)}function Xr(e){return Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xr(e)}function Yr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Xr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Xr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Xr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jr=(Yr(Fr={},e.log,Ir.info),Yr(Fr,e.debug,Ir.debug),Yr(Fr,e.info,Ir.info),Yr(Fr,e.warn,Ir.warn),Yr(Fr,e.error,Ir.error),Fr);function Zr(e,t){if(!e.forwardErrorsToLogs)return{stop:Z};var n=en().subscribe((function(e){"complete"===e.state&&o($e.XHR,e)})),r=Jt().subscribe((function(e){"resolve"===e.state&&o($e.FETCH,e)}));function o(n,r){function o(e){var o,i,a,s={isAborted:r.isAborted,handlingStack:r.handlingStack},u=z(r.url).getParse();t.notify(Pt.RAW_LOG_COLLECTED,{rawLogsEvent:{message:to(n)+" error "+r.method+" "+r.url,date:r.startClocks.timeStamp,error:{stack:e||"Failed to load",handing:void 0},http:{method:r.method,status_code:r.status,url:r.url,statusGroup:(a=r.status,a?String(a).substr(0,1)+String(a).substr(1).replace(/\d*/g,"x"):a),urlHost:u.Host,urlPath:u.Path,urlPathGroup:(o=u.Path,i="",o&&(i=o.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),i||"/")},status:Ir.error,origin:gt.NETWORK},domainContext:s})}!function(e,t){var n=[t.rumEndpoint];return t.logsEndpoint&&n.push(t.logsEndpoint),t.sessionReplayEndPoint&&n.push(t.sessionReplayEndPoint),N(n,(function(t){return 0===e.indexOf(t)}))||t.isIntakeUrl(e)}(r.url,e)&&(function(e){return 0===e.status&&"opaque"!==e.responseType}(r)||function(e){return e.status>=500}(r)||e.isServerError(r))&&("xhr"in r?function(e,t,n){"string"==typeof e.response?n(eo(e.response,t)):n(e.response)}(r.xhr,e,o):r.response?function(e,t,n){var r=function(e){try{return e.clone()}catch(e){return}}(e);r&&r.body?window.TextDecoder?function(e,t,n){!function(e,t,n){var r=e.getReader(),o=[],i=0;function a(){var e,a;if(r.cancel().catch(Z),n.collectStreamBody){var s;if(1===o.length)s=o[0];else{s=new Uint8Array(i);var u=0;k(o,(function(e){s.set(e,u),u+=e.length}))}e=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}t(void 0,e,a)}!function e(){r.read().then(c((function(t){t.done?a():(n.collectStreamBody&&o.push(t.value),(i+=t.value.length)>n.bytesLimit?a():e())})),c((function(e){t(e)})))}()}(e,(function(e,t,r){if(e)n(e);else{var o=(new TextDecoder).decode(t);r&&(o+="..."),n(void 0,o)}}),{bytesLimit:t,collectStreamBody:!0})}(r.body,t.requestErrorResponseLengthLimit,(function(e,t){n(e?"Unable to retrieve response: "+e:t)})):r.text().then(c((function(e){return n(eo(e,t))})),c((function(e){return n("Unable to retrieve response: "+e)}))):n()}(r.response,e,o):r.error&&function(e,t,n){n(eo(ht(He(e)),t))}(r.error,e,o))}return{stop:function(){n.unsubscribe(),r.unsubscribe()}}}function eo(e,t){return e.length>t.requestErrorResponseLengthLimit?e.substring(0,t.requestErrorResponseLengthLimit)+"...":e}function to(e){return $e.XHR===e?"XHR":"Fetch"}function no(e,t){if(!e.forwardErrorsToLogs)return{stop:Z};var n,r=new Ot,o=(n=r,nt((function(e,t){n.notify(yt({stackTrace:e,originalError:t,startClocks:ae(),nonErrorPrefix:Be.UNCAUGHT,source:gt.SOURCE,handling:Ne.UNHANDLED}))}))),i=r.subscribe((function(e){t.notify(Pt.RAW_LOG_COLLECTED,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:Ar(e),origin:gt.SOURCE,status:Ir.error}})}));return{stop:function(){o.stop(),i.unsubscribe()}}}function ro(e){return function(t){var n,r;e.notify(Pt.RAW_LOG_COLLECTED,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:gt.AGENT,status:Ir.error}}),n="Error reported to customer",r={"error.message":t.message},l(n,r),zn(R({type:Vn.log,message:n,status:Hn.debug},r))}}var oo,io,ao,so,uo=function(e){var t=br(hr.GlobalContext),n=br(hr.User);function r(){return function(e,t){return{view:{referrer:document.referrer,url:window.location.href},context:e.getContext(),user:t.getContext()}}(t,n)}var o,a,s=jr(r,(function(o,i){o.storeContextsToLocal&&(Or(i,t,Gr,hr.GlobalContext),Or(i,n,Gr,hr.User));var a=e(o,i,r);return s=function(e,t){return R({init:function(e){Tr("DATAFLUX_LOGS",e)},getInitConfiguration:function(){return e}},t)}(o,a),a})),f={},l=new Pr((function(){return s.handleLog.apply(this,arguments)}));return o={logger:l,init:c((function(e){return s.init(e)})),getGlobalContext:c((function(){return t.getContext()})),setGlobalContext:c((function(e){return t.setContext(e)})),setGlobalContextProperty:c((function(e,n){return t.setContextProperty(e,n)})),removeGlobalContextProperty:c((function(e){return t.removeContextProperty(e)})),clearGlobalContext:c((function(){return t.clearContext()})),createLogger:c((function(e,t){return void 0===t&&(t={}),f[e]=new Pr((function(){return s.handleLog.apply(this,arguments)}),sanitize(e),t.handler,t.level,sanitize(t.context)),f[e]})),getLogger:c((function(e){return f[e]})),getInitConfiguration:c((function(){return s.getInitConfiguration()})),getInternalContext:c((function(e){return s.getInternalContext(e)})),setUser:c((function(e){(function(e){var t="object"===X(e);return t||i.error("Unsupported user:",e),t})(e)&&n.setContext(Cr(e))})),getUser:c((function(){return n.getContext()})),removeUserProperty:c((function(e){return n.removeContextProperty(e)})),setUserProperty:c((function(e,t){var r={};r[e]=t;var o=Cr(r)[e];n.setContextProperty(e,o)})),clearUser:c((function(){return n.clearContext()}))},a=R({onReady:function(e){e()}},o),Object.defineProperty(a,"_setDebug",{get:function(){return u},enumerable:!1}),a}((function(e,t,n){var r=new Ut,o=[],i=ro(r),a=new Ot((function(e){var t=kt(window,[Pe.VISIBILITY_CHANGE,Pe.FREEZE],(function(t){t.type===Pe.VISIBILITY_CHANGE&&"hidden"===document.visibilityState?e.notify({reason:rn.HIDDEN}):t.type===Pe.FREEZE&&e.notify({reason:rn.FROZEN})}),{capture:!0}),n=Tt(window,Pe.BEFORE_UNLOAD,(function(){e.notify({reason:rn.UNLOADING})}));return function(){t.stop(),n.stop()}})),s=!function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="gc_cookie_test_".concat(K()),n="test";return Gt(t,n,te,e),Ft(t)===n}catch(e){return!1}}(t.cookieOptions)||gr()||Boolean(window._GUANCE_SYNTHETICS_INJECTS_RUM||Ft(yr))?function(e){var t=Qr(e)===Hr.TRACKED?{}:void 0;return{findTrackedSession:function(){return t},expireObservable:new Ot}}(t):qr(t),u=function(e,t,n,r,o){var i=Xn(Qn.LOGS,t);i.setContextProvider((function(){var e=zr();return{application:{id:e&&e.application&&e.application.id},session:{id:o.findTrackedSession()&&o.findTrackedSession().id},view:{id:e&&e.view&&e.view.id},action:{id:e&&e.userAction&&e.userAction.id}}}));var a=[];if(!gr()){var s=pr(t,{endpoint:t.rumEndpoint,encoder:Sr()},n,r,o.expireObservable);a.push((function(){s.stop()}));var u=i.observable.subscribe((function(e){s.add(e)}));a.push((function(){u.unsubscribe()}))}return function(){Kn.drain()}(),function(e){zn({type:Vn.configuration,configuration:e})}(J(e)),{telemetry:i,stop:function(){a.forEach((function(e){e()}))}}}(e,t,i,a,s);o.push((function(){u.stop()})),Zr(t,r),no(t,r),function(e,t){var n=xt(e.forwardConsoleLogs).subscribe((function(e){t.notify(Pt.RAW_LOG_COLLECTED,{rawLogsEvent:{date:se(),message:e.message,origin:gt.CONSOLE,error:e.error&&Ar(e.error),status:Jr[e.api]},domainContext:{handlingStack:e.handlingStack}})}))}(t,r),function(e,t){var n=Lt(0,e.forwardReports).subscribe((function(e){var n,r,o,i=e.message,a="deprecation"===e.originalError.type?Ir.warn:Ir.error;a===Ir.error?n=Ar(e):report.stack&&(i+=" Found in "+(r=e.stack,(o=/@ (.+)/.exec(r))&&o[1])),t.notify(Pt.RAW_LOG_COLLECTED,{rawLogsEvent:{date:se(),message:i,origin:gt.REPORT,error:n,status:a}})}))}(t,r);var c=Rr(r);if(Kr(s,t,r,n,i),!gr()){var f=function(e,t,n,r,o){var i=pr(e,{endpoint:e.logsEndpoint,encoder:Sr()},n,r,o.expireObservable);return t.subscribe(Pt.LOG_COLLECTED,(function(e){i.add(e)})),i}(t,r,i,a,s);o.push((function(){f.stop()}))}var l,d=(l=s,{get:function(e){var t=l.findTrackedSession(e);if(t)return{session:{id:t.id}}}});return{handleLog:c.handleLog,getInternalContext:d.get,stop:function(){o.forEach((function(e){e()}))}}}));oo=v(),ao=uo,so=oo[io="DATAFLUX_LOGS"],oo[io]=ao,so&&so.q&&k(so.q,(function(e){d(e,"onReady callback threw an error:")()}))}();
|
|
1
|
+
!function(){"use strict";var e={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},t=console,n={};Object.keys(e).forEach((function(e){n[e]=t[e]}));var r,o="GUANCE Browser SDK:",i={debug:n.debug.bind(t,o),log:n.log.bind(t,o),info:n.info.bind(t,o),warn:n.warn.bind(t,o),error:n.error.bind(t,o)};function s(e,t){var n,r=window;return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}var a=!1;function u(e){a=e}function c(e){return function(){return f(e,this,arguments)}}function f(e,t,n){try{return e.apply(t,n)}catch(e){if(l(e),r)try{r(e)}catch(e){l(e)}}}function l(){var e=[].slice.call(arguments);a&&i.error.apply(null,["[MONITOR]"].concat(e))}function d(e,t){return function(){var n=[].slice.call(arguments);try{return e.apply(this,n)}catch(e){i.error(t,e)}}}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function v(){if("object"===("undefined"==typeof globalThis?"undefined":p(globalThis)))return globalThis;Object.defineProperty(Object.prototype,"_gc_temp_",{get:function(){return this},configurable:!0});var e=_gc_temp_;return delete Object.prototype._gc_temp_,"object"!==p(e)&&(e="object"===("undefined"==typeof self?"undefined":p(self))?self:"object"===("undefined"==typeof window?"undefined":p(window))?window:{}),e}function g(e,t){return s(v(),"setTimeout")(c(e),t)}function y(e){s(v(),"clearTimeout")(e)}function _(e,t){return s(v(),"setInterval")(c(e),t)}function h(e){s(v(),"clearInterval")(e)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}var b=Array.prototype,E=(Function.prototype,Object.prototype),w=b.slice,O=E.toString,S=E.hasOwnProperty,C=b.forEach,x=Array.isArray,T=!1,k=function(e,t,n){if(null===e)return!1;if(C&&e.forEach===C)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r,e)===T)return!1}else for(var i in e)if(S.call(e,i)&&t.call(n,e[i],i,e)===T)return!1};function R(e){return k(w.call(arguments,1),(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}var L=function(e){return k(w.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},A=function(e){return k(w.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(W(t[n])&&W(e[n])?L(e[n],t[n]):e[n]=t[n])})),e},I=x||function(e){return"[object Array]"===O.call(e)},D=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},M=function(e){var t=[];return null===e||k(e,(function(e){t[t.length]=e})),t},P=function(e){var t=[];return null===e||k(e,(function(e,n){t[t.length]=n})),t},U=function(e,t,n){if(e.filter)return e.filter(t);for(var r=[],o=0;o<e.length;o++)if(S.call(e,o)){var i=e[o];t.call(n,i,o,e)&&r.push(i)}return r},$=function(e,t,n){if(e.map)return e.map(t);for(var r=[],o=0;o<e.length;o++)if(S.call(e,o)){var i=e[o];r.push(t.call(n,i,o,e))}return r},N=function(e,t,n){if(e.some)return e.some(t);for(var r=!1,o=0;o<e.length;o++)if(S.call(e,o)){var i=e[o];if(t.call(n,i,o,e)){r=!0;break}}return r},B=function(e,t,n){if(e.every)return e.every(t);for(var r=!0,o=0;o<e.length;o++)if(S.call(e,o)){var i=e[o];if(!t.call(n,i,o,e)){r=!1;break}}return r},W=function(e){return null!==e&&"[object Object]"===O.call(e)},G=function(e){if(W(e)){for(var t in e)if(S.call(e,t))return!1;return!0}return!1},j=function(e){var t=[];return k(e,(function(e,n){t.push([n,e])})),t},F=function(e){return"[object String]"===O.call(e)},V=function(e){return"[object Boolean]"===O.call(e)},H=function(e){return"[object Number]"===O.call(e)&&/[\d\.]+/.test(String(e))},q=(Date.now,function(e,t,n){var r,o,i=!n||void 0===n.leading||n.leading,s=!n||void 0===n.trailing||n.trailing,a=!1,u=this;return{throttled:function(){a?r=arguments:(i?e.apply(u,arguments):r=arguments,a=!0,o=g((function(){s&&r&&e.apply(u,r),a=!1,r=void 0}),t))},cancel:function(){y(o),a=!1,r=void 0}}}),Q=function(e){for(var t,n=[],r={},o=0;o<e.length;o++)(t=e[o])in r||(r[t]=!0,n.push(t));return n};function K(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,K)}var z=function(e){var t=function(e){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=null,this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==e&&this._parse(e)};return t.prototype.setUrl=function(e){this._parse(e)},t.prototype._initValues=function(){for(var e in this._fields)this._values[e]=""},t.prototype.addQueryString=function(e){if("object"!==m(e))return!1;var t=this._values.QueryString||"";for(var n in e)t=new RegExp(n+"[^&]+").test(t)?t.replace(new RegExp(n+"[^&]+"),n+"="+e[n]):"&"===t.slice(-1)?t+n+"="+e[n]:""===t?n+"="+e[n]:t+"&"+n+"="+e[n];this._values.QueryString=t},t.prototype.getParse=function(){return this._values},t.prototype.getUrl=function(){var e="";return e+=this._values.Origin,e+=this._values.Path,e+=this._values.QueryString?"?"+this._values.QueryString:""},t.prototype._parse=function(e){this._initValues();var t=this._regex.exec(e);if(!t)throw"DPURLParser::_parse -> Invalid URL";for(var n in this._fields)void 0!==t[this._fields[n]]&&(this._values[n]=t[this._fields[n]]);this._values.Path=this._values.Path||"/",this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname+(this._values.Port?":"+this._values.Port:"")},new t(e)};function X(e){return null===e?"null":Array.isArray(e)?"array":m(e)}function Y(e,t,n){if(void 0===n&&(n=function(){if("undefined"!=typeof WeakSet){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}()),void 0===t)return e;if("object"!==m(t)||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var o=Array.isArray(e)?e:[],i=0;i<t.length;++i)o[i]=Y(o[i],t[i],n);return o}o="object"===X(e)?e:{};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(o[s]=Y(o[s],t[s],n));return o}}function J(e){return Y(void 0,e)}function Z(){}var ee,te=1e3,ne=60*te,re=60*ne;function oe(e){return 0!==e&&100*Math.random()<=e}function ie(){return performance.now()}function se(){return{relative:ie(),timeStamp:ae()}}function ae(){return ue()}function ue(){return(new Date).getTime()}function ce(){return void 0===ee&&(ee=performance.timing.navigationStart),ee}var fe=/([\w-]+)\s*=\s*([^;]+)/g;function le(e,t){for(var n=t.split(".");n.length;){var r=n.shift();if(!(e&&W(e)&&r in e&&S.call(e,r)))return;e=e[r]}return e}function de(e,t){var n=e.charCodeAt(t-1);return n>=55296&&n<=56319?e.slice(0,t+1):e.slice(0,t)}function pe(e,t){return-1!==e.indexOf(t)}function ve(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach((function(e){t.push(e)}));else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function ge(e){return H(e)&&e>=0&&e<=100}var ye,_e={IE:0,CHROMIUM:1,SAFARI:2,OTHER:3};function he(){return Ee(ye,ye=function(e){var t;void 0===e&&(e=window);var n=e.navigator.userAgent;if(e.chrome||/HeadlessChrome/.test(n))return _e.CHROMIUM;if(0===(null===(t=e.navigator.vendor)||void 0===t?void 0:t.indexOf("Apple"))||/safari/i.test(n)&&!/chrome|android/i.test(n))return _e.SAFARI;if(e.document.documentMode)return _e.IE;return _e.OTHER}())}function me(e){var t={};return k(e,(function(e,n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e,t){return(0!==t?"_":"")+e.toLowerCase()})).replace(/-/g,"_"))]=be(e)})),t}function be(e){return I(e)?$(e,(function(e){return be(e)})):"object"===m(e)&&null!==e?me(e):e}function Ee(e,t){return null!=e?e:t}function we(e,t){return e.slice(0,t.length)===t}function Oe(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var Se=500;function Ce(){var e=[],t=function(t){e.push(t)>Se&&e.splice(0,1)};return{add:t,remove:t,drain:function(t){e.forEach((function(e){e(t)})),e.length=0}}}var xe=1/0,Te=ne;function ke(e){var t=e.expireDelay,n=e.maxEntries,r=[],o=_((function(){return function(){var e=ie()-t;for(;r.length>0&&r[r.length-1].endTime<e;)r.pop()}()}),Te);return{add:function(e,t){var o={value:e,startTime:t,endTime:xe,remove:function(){Oe(r,o)},close:function(e){o.endTime=e}};return n&&r.length>=n&&r.pop(),r.unshift(o),o},find:function(e,t){void 0===e&&(e=xe),void 0===t&&(t={returnInactive:!1});for(var n=0,o=r;n<o.length;n++){var i=o[n];if(i.startTime<=e){if(t.returnInactive||e<=i.endTime)return i.value;break}}},closeActive:function(e){var t=r[0];t&&t.endTime===xe&&t.close(e)},findAll:function(e,t){void 0===e&&(e=xe),void 0===t&&(t=0);var n=e+t;return r.filter((function(t){return t.startTime<=n&&e<=t.endTime})).map((function(e){return e.value}))},reset:function(){r=[]},stop:function(){h(o)}}}var Re={navigator:"undefined"!=typeof window&&void 0!==window.navigator?window.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","IE 11","IE 10","IE 9","IE 8","IE 7","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat",,"WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},Le={getMatchMap:c((function(e){return{Trident:e.indexOf("Trident")>-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Edge:e.indexOf("Edge")>-1||e.indexOf("Edg")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Arora:e.indexOf("Arora")>-1,Lunascape:e.indexOf("Lunascape")>-1,QupZilla:e.indexOf("QupZilla")>-1,"Coc Coc":e.indexOf("coc_coc_browser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,Iceweasel:e.indexOf("Iceweasel")>-1,Konqueror:e.indexOf("Konqueror")>-1,Iceape:e.indexOf("Iceape")>-1,SeaMonkey:e.indexOf("SeaMonkey")>-1,Epiphany:e.indexOf("Epiphany")>-1,360:e.indexOf("QihooBrowser")>-1||e.indexOf("QHBrowser")>-1,"360EE":e.indexOf("360EE")>-1,"360SE":e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,"Mac OS":e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Nexus 7")>-1,iPad:e.indexOf("iPad")>-1}})),matchInfoMap:c((function(e){var t=Re.navigator.userAgent||"",n=Le.getMatchMap(t);for(var r in Re.infoMap)for(var o=0;o<Re.infoMap[r].length;o++){var i=Re.infoMap[r][o];n[i]&&(e[r]=i)}})),getOS:c((function(){return Le.matchInfoMap(this),this.os||"Unknown"})),getOSVersion:c((function(){var e=this,t=Re.navigator.userAgent||"";e.osVersion="",e.osMajor="";var n={Windows:function(){var e=t.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[e]||e},Android:function(){return t.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return t.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return t.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return t.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return t.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return t.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};return n[e.os]&&(e.osVersion=n[e.os](),e.osVersion===t&&(e.osVersion="")),e.osVersion&&(e.osMajor=e.osVersion.split(".").length&&e.osVersion.split(".")[0]),{version:e.osVersion,osMajor:e.osMajor}})),getOrientationStatu:c((function(){return window.matchMedia("(orientation: portrait)").matches?"竖屏":"横屏"})),getDeviceType:c((function(){var e=this;return e.device="PC",Le.matchInfoMap(e),e.device})),getNetwork:c((function(){var e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t="unknown",n=e?e.type||e.effectiveType:null;if(n&&"string"==typeof n)switch(n){case"bluetooth":case"cellular":case"slow-2g":case"2g":case"3g":t="cellular";break;case"none":t="none";break;case"ethernet":case"wifi":case"wimax":case"4g":t="wifi";break;case"other":case"unknown":t="unknown"}return t})),getLanguage:c((function(){var e;return this.language=((e=(Re.navigator.browserLanguage||Re.navigator.language||"").split("-"))[1]&&(e[1]=e[1].toUpperCase()),e.join("_")),this.language})),getBrowserInfo:c((function(){var e=this;Le.matchInfoMap(e);var t=Re.navigator.userAgent||"",n=function(e,t){var n=Re.navigator.mimeTypes;for(var r in n)if(n[r][e]==t)return!0;return!1},r=Le.getMatchMap(t),o=!1;if("undefined"!=typeof window&&window.chrome){var i=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");i>36&&window.showModalDialog?o=!0:i>45&&(o=n("type","application/vnd.chromium.remoting-viewer"))}if(r.Baidu&&r.Opera&&(r.Baidu=!1),r.Mobile&&(r.Mobile=!(t.indexOf("iPad")>-1)),o&&(n("type","application/gameplugin")||Re.navigator&&Re.navigator.connection&&void 0===Re.navigator.connection.saveData?r["360SE"]=!0:r["360EE"]=!0),r.IE||r.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 74:case 105:default:break;case 102:r["360EE"]=!0;break;case 104:r["360SE"]=!0}var s={Safari:function(){return t.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return t.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return t.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return t.replace(/^.*Edge?\/([\d.]+).*$/,"$1")},Firefox:function(){return t.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return t.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return t.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return t.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return t.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return t.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return t.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return t.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return t.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return t.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return t.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return t.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return t.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return t.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return t.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return t.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return t.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[t.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[t.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return t.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return t.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return t.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return t.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return t.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return t.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){var e="";t.indexOf("LieBaoFast")>-1&&(e=t.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1"));var n=t.replace(/^.*Chrome\/([\d]+).*$/,"$1");return e||{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[n]||""},"2345Explorer":function(){return t.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return t.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return t.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return t.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return t.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return t.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return t.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return t.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return t.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return t.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return t.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return t.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return t.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return e.browserVersion="",e.browserMajor="",s[e.browser]&&(e.browserVersion=s[e.browser](),e.browserVersion==t&&(e.browserVersion="")),"Chrome"==e.browser&&t.match(/\S+Browser/)&&(e.browser=t.match(/\S+Browser/)[0],e.version=t.replace(/^.*Browser\/([\d.]+).*$/,"$1")),"Edge"==e.browser&&(e.version>"75"?e.engine="Blink":e.engine="EdgeHTML"),("Chrome"==e.browser&&parseInt(e.browserVersion)>27||r.Chrome&&"WebKit"==e.engine&&parseInt(e.browserVersion)>27||"Opera"==e.browser&&parseInt(e.version)>12||"Yandex"==e.browser)&&(e.engine="Blink"),e.browserVersion&&(e.browserMajor=e.browserVersion.split(".").length&&this.browserVersion.split(".")[0]),{browser:e.browser,browserVersion:e.browserVersion,engine:e.engine,browserMajor:e.browserMajor}})),getGeoPostion:c((function(e){navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(t){e(t)}),(function(e){i.warn(e)}))}))},Ae={};"undefined"!=typeof window&&(Ae={os:Le.getOS(),osVersion:Le.getOSVersion().version,osVersionMajor:Le.getOSVersion().osMajor,browser:Le.getBrowserInfo().browser,browserVersion:Le.getBrowserInfo().browserVersion,browserVersionMajor:Le.getBrowserInfo().browserMajor,screenSize:window.screen.width+"*"+window.screen.height,networkType:Le.getNetwork(),device:Le.getDeviceType()});var Ie=Ae,De={BEFORE_UNLOAD:"beforeunload",CLICK:"click",DBL_CLICK:"dblclick",KEY_DOWN:"keydown",LOAD:"load",POP_STATE:"popstate",SCROLL:"scroll",TOUCH_START:"touchstart",TOUCH_END:"touchend",TOUCH_MOVE:"touchmove",VISIBILITY_CHANGE:"visibilitychange",PAGE_SHOW:"pageshow",FREEZE:"freeze",RESUME:"resume",DOM_CONTENT_LOADED:"DOMContentLoaded",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_CANCEL:"pointercancel",HASH_CHANGE:"hashchange",PAGE_HIDE:"pagehide",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_MOVE:"mousemove",FOCUS:"focus",BLUR:"blur",CONTEXT_MENU:"contextmenu",RESIZE:"resize",CHANGE:"change",INPUT:"input",PLAY:"play",PAUSE:"pause",SECURITY_POLICY_VIOLATION:"securitypolicyviolation",SELECTION_CHANGE:"selectionchange",STORAGE:"storage"},Me={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",LOGGER:"logger"},Pe={FETCH:"fetch",XHR:"xhr"},Ue={HANDLED:"handled",UNHANDLED:"unhandled"},$e={UNCAUGHT:"Uncaught",PROVIDED:"Provided"};function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Be(e,t,n){if("object"!==Ne(e)||null===e)return JSON.stringify(e);var r=We(Object.prototype),o=We(Array.prototype),i=We(Object.getPrototypeOf(e)),s=We(e);try{return JSON.stringify(e,t,n)}catch(e){return"<error: unable to serialize object>"}finally{r(),o(),i(),s()}}function We(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):Z}function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}var je="?";function Fe(e){var t=[],n=Je(e,"stack");return n&&k(n.split("\n"),(function(e){var n=function(e){var t=qe.exec(e);if(!t)return;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=Qe.exec(t[2]);r&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||je,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}(e)||function(e){var t=Ke.exec(e);if(!t)return;return{args:[],column:t[3]?+t[3]:void 0,func:je,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=ze.exec(e);if(!t)return;return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||je,line:+t[3],url:t[2]}}(e)||function(e){var t=Xe.exec(e);if(!t)return;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=Ye.exec(t[3]);n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0);return{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||je,line:t[4]?+t[4]:void 0,url:t[3]}}(e);n&&(!n.func&&n.line&&(n.func=je),t.push(n))})),{message:Je(e,"message"),name:Je(e,"name"),stack:t}}var Ve="((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",He="(?::(\\d+))",qe=new RegExp("^\\s*at (.*?) ?\\("+Ve+He+"?"+He+"?\\)?\\s*$","i"),Qe=new RegExp("\\((\\S*)"+He+He+"\\)");var Ke=new RegExp("^\\s*at ?"+Ve+He+"?"+He+"??\\s*$","i");var ze=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Xe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ye=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Je(e,t){if("object"===Ge(e)&&e&&t in e){var n=e[t];return"string"==typeof n?n:void 0}}var Ze=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function et(e){var t=function(e){return mt(window,"onerror",(function(t){var n,r=t.parameters,o=r[0],i=r[1],s=r[2],a=r[3],u=r[4];if(u instanceof Error)n=Fe(u);else{var c={url:i,column:a,line:s},f=function(e){var t,n;if("[object String]"==={}.toString.call(e)){var r=Ze.exec(e);r&&(t=r[1],n=r[2])}return{name:t,message:n}}(o);n={name:f.name,message:f.message,stack:[c]}}e(n,Ee(u,o))}))}(e),n=function(e){return mt(window,"onunhandledrejection",(function(t){var n=t.parameters[0].reason||"Empty reason",r=Fe(n);e(r,n)}))}(e);return{stop:function(){t.stop(),n.stop()}}}var tt=1024,nt=1024*tt,rt=/[^\u0000-\u007F]/;function ot(e){return rt.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length}function it(e){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(e)}var st=220*tt,at="$",ut=3;function ct(e,t){void 0===t&&(t=st);var n=We(Object.prototype),r=We(Array.prototype),o=[],i=new WeakMap,s=ft(e,at,void 0,o,i),a=JSON.stringify(s)&&JSON.stringify(s).length||0;if(!(a>t)){for(;o.length>0&&a<t;){var u=o.shift(),c=0;if(Array.isArray(u.source))for(var f=0;f<u.source.length;f++){if(a+=void 0!==(l=ft(u.source[f],u.path,f,o,i))?JSON.stringify(l).length:4,a+=c,c=1,a>t){lt(t,"truncated",e);break}u.target[f]=l}else for(var f in u.source)if(Object.prototype.hasOwnProperty.call(u.source,f)){var l;if(void 0!==(l=ft(u.source[f],u.path,f,o,i))&&(a+=JSON.stringify(l).length+c+f.length+ut,c=1),a>t){lt(t,"truncated",e);break}u.target[f]=l}}return n(),r(),s}lt(t,"discarded",e)}function ft(e,t,n,r,o){var i=function(e){var t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!i||"object"!==it(i))return function(e){if("bigint"==typeof e)return"[BigInt] "+e.toString();if("function"==typeof e)return"[Function] "+e.name||0;if("symbol"===it(e))return"[Symbol] "+e.description||0;return e}(i);var s=function(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"["+t[1]+"]"}catch(e){}return"[Unserializable]"}(i);if("[Object]"!==s&&"[Array]"!==s&&"[Error]"!==s)return s;var a=e;if(o.has(a))return"[Reference seen at "+o.get(a)+"]";var u=void 0!==n?t+"."+n:t,c=Array.isArray(i)?[]:{};return o.set(a,u),r.push({source:i,target:c,path:u}),c}function lt(e,t,n){i.warn("The data provided has been "+t+" as it is over the limit of "+e+" characters:",n)}var dt="No stack, consider using an instance of Error",pt={AGENT:"agent",CONSOLE:"console",NETWORK:"network",SOURCE:"source",LOGGER:"logger",CUSTOM:"custom"};function vt(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,s=e.source,a=e.handling,u=n instanceof Error,c=function(e,t,n,r){return e&&e.message&&e&&e.name?e.message:t?"Empty message":n+" "+Be(ct(r))}(t,u,i,n),f=function(e,t){if(void 0===t)return!1;if(e)return!0;return t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url)}(u,t)?yt(t):dt,l=u?ht(n,s):void 0;return{startClocks:o,source:s,handling:a,originalError:n,message:c,stack:f,handlingStack:r,type:t&&t.name,causes:l}}function gt(){var e,t=new Error;if(!t.stack)try{throw t}catch(e){}return f((function(){var n=Fe(t);n.stack=n.stack.slice(2),e=yt(n)})),e}function yt(e){var t=_t(e);return k(e.stack,(function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"("+e.args.join(", ")+")":"",o=e.line?":"+e.line:"",i=e.line&&e.column?":"+e.column:"";t+="\n at "+n+r+" @ "+e.url+o+i})),t}function _t(e){return(e.name||"Error")+": "+e.message}function ht(e,t){for(var n=e,r=[];n&&n.cause instanceof Error&&r.length<10;){var o=Fe(n.cause);r.push({message:n.cause.message,source:t,type:o&&o.name,stack:o&&yt(o)}),n=n.cause}return r.length?r:void 0}function mt(e,t,n,r){var o=r&&r.computeHandlingStack,i=e[t];if("function"!=typeof i){if(!we(t,"on"))return{stop:Z};i=Z}var s=!1,a=function(){if(s)return i.apply(this,arguments);var e,t=ve(arguments);f(n,null,[{target:this,parameters:t,onPostCall:function(t){e=t},handlingStack:o?gt():void 0}]);var r=i.apply(this,t);return e&&f(e,null,[r]),r};return e[t]=a,{stop:function(){s=!0,e[t]===a&&(e[t]=i)}}}var bt=function(e){this.observers=[],this.onLastUnsubscribe=void 0,this.onFirstSubscribe=e};bt.prototype={subscribe:function(e){this.observers.push(e),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0);var t=this;return{unsubscribe:function(){t.observers=U(t.observers,(function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},notify:function(e){k(this.observers,(function(t){t(e)}))}};var Et=bt;function wt(){var e=[].slice.call(arguments);return new Et((function(t){var n=$(e,(function(e){return e.subscribe((function(e){return t.notify(e)}))}));return function(){return k(n,(function(e){return e.unsubscribe()}))}}))}var Ot={};function St(t){var n=$(t,(function(t){return Ot[t]||(Ot[t]=function(t){return new Et((function(n){var r=console[t];return console[t]=function(){var o=[].slice.call(arguments);r.apply(console,arguments);var i=gt();f((function(){n.notify(function(t,n,r){var o,i=$(t,(function(e){return function(e){if("string"==typeof e)return e;if(e instanceof Error)return _t(Fe(e));return Be(e,void 0,2)}(e)})).join(" ");if(n===e.error){var s=function(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n,e))return r}}(t,(function(e){return e instanceof Error}));o={stack:s?yt(Fe(s)):void 0,causes:s?ht(s,"console"):void 0,startClocks:se(),message:i,source:pt.CONSOLE,handling:Ue.HANDLED,handlingStack:r}}return{api:n,message:i,error:o,handlingStack:r}}(o,t,i))}))},function(){console[t]=r}}))}(t)),Ot[t]}));return wt.apply(this,n)}function Ct(e,t,n,r){return xt(e,[t],n,r)}function xt(e,t,n,r){var o=c(r&&r.once?function(e){a(),n(e)}:n);r=r&&r.passive?{capture:r.capture,passive:r.passive}:r&&r.capture;var i=s(e,"addEventListener");k(t,(function(t){i.call(e,t,o,r)}));var a=function(){var n=s(e,"removeEventListener");k(t,(function(t){n.call(e,t,o,r)}))};return{stop:a}}var Tt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function kt(e,t){var n=[];pe(t,Tt.cspViolation)&&n.push(new Et((function(e){return Ct(document,De.SECURITY_POLICY_VIOLATION,(function(t){e.notify(function(e){var t="'"+e.blockedURI+"' blocked by '"+e.effectiveDirective+"' directive";return Rt({type:e.effectiveDirective,message:Tt.cspViolation+": "+t,originalError:e,csp:{disposition:e.disposition},stack:Lt(e.effectiveDirective,e.originalPolicy?"".concat(t,' of the policy "').concat(de(e.originalPolicy,100),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}(t))})).stop})));var r=U(t,(function(e){return e!==Tt.cspViolation}));return r.length&&n.push(function(e){return new Et((function(t){if(window.ReportingObserver){var n=c((function(e){k(e,(function(e){t.notify(function(e){var t=e.body,n=e.type;return Rt({type:t.id,message:n+": "+t.message,originalError:e,stack:Lt(t.id,t.message,t.sourceFile,t.lineNumber,t.columnNumber)})}(e))}))})),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}}))}(r)),wt.apply(this,n)}function Rt(e){return R({startClocks:se(),source:ErrorSource.REPORT,handling:ErrorHandling.UNHANDLED},e)}function Lt(e,t,n,r,o){return n&&yt({name:e,message:t,stack:[{func:"?",url:n,line:r,column:o}]})}var At=function(){this._events=[],this.pendingEvents=[]};At.prototype={emit:function(e){var t=[].slice.call(arguments,1);k(this._events,(function(n){if(n.type!==e)return!1;n.callback.apply(n.context,t)}))},on:function(e,t,n){"function"==typeof t&&this._events.push({type:e,callback:t,context:n||this})}};new At;var It,Dt={AUTO_ACTION_COMPLETED:"AUTO_ACTION_COMPLETED",BEFORE_VIEW_CREATED:"BEFORE_VIEW_CREATED",VIEW_CREATED:"VIEW_CREATED",VIEW_UPDATED:"VIEW_UPDATED",VIEW_ENDED:"VIEW_ENDED",AFTER_VIEW_ENDED:"AFTER_VIEW_ENDED",SESSION_RENEWED:"SESSION_RENEWED",SESSION_EXPIRED:"SESSION_EXPIRED",PAGE_EXITED:"PAGE_EXITED",REQUEST_STARTED:"REQUEST_STARTED",REQUEST_COMPLETED:"REQUEST_COMPLETED",RAW_RUM_EVENT_COLLECTED:"RAW_RUM_EVENT_COLLECTED",RUM_EVENT_COLLECTED:"RUM_EVENT_COLLECTED",RAW_ERROR_COLLECTED:"RAW_ERROR_COLLECTED",RAW_LOG_COLLECTED:"RAW_LOG_COLLECTED",LOG_COLLECTED:"LOG_COLLECTED"};function Mt(){this.callbacks={}}function Pt(e){return Ut(e,function(e){if(e.origin&&"null"!==e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}(window.location)).href}function Ut(e,t){if(function(){if(void 0!==It)return It;try{var e=new URL("http://test/path");return It="http://test/path"===e.href}catch(e){It=!1}return It}())return void 0!==t?new URL(e,t):new URL(e);if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: "+e);var n=document,r=n.createElement("a");if(void 0!==t){var o=(n=document.implementation.createHTMLDocument("")).createElement("base");o.href=t,n.head.appendChild(o),n.body.appendChild(r)}return r.href=e,r}Mt.prototype={notify:function(e,t){var n=this.callbacks[e];n&&k(n,(function(e){e(t)}))},subscribe:function(e,t){this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t);var n=this;return{unsubscribe:function(){n.callbacks[e]=U(n.callbacks[e],(function(e){return e!==t}))}}}};var $t=navigator.userAgent.toLowerCase(),Nt=function(){return/iphone os/.test($t)};var Bt;function Wt(e,t,n,r){var o=new Date;o.setTime(o.getTime()+n);var i="expires="+o.toUTCString(),s=r&&r.crossSite?"none":"strict",a=r&&r.domain?";domain="+r.domain:"",u=r&&r.secure?";secure":"",c=r&&r.partitioned?";partitioned":"";document.cookie=e+"="+t+";"+i+";path=/;samesite="+s+a+u+c}function Gt(e){return function(e,t){for(fe.lastIndex=0;;){var n=fe.exec(e);if(!n)break;if(n[1]===t)return n[2]}}(document.cookie,e)}var jt=/^\s+|\s+$/g,Ft={rum:"/rum",log:"/logging",sessionReplay:"/rum/replay"};function Vt(e,t){var n=Ft[t];if(!n)return"";var r=e.datakitOrigin||e.datakitUrl||e.site;0===r.indexOf("/")&&(r=location.origin+Ht(r));var o=r;return o=r.lastIndexOf("/")===r.length-1?Ht(r)+"v1/write"+n:Ht(r)+"/v1/write"+n,e.site&&e.clientToken&&(o=o+"?token="+e.clientToken+"&to_headless=true"),o}function Ht(e){return e.replace(jt,"")}var qt,Qt;function Kt(e){if(void 0===e.sampleRate||ge(e.sampleRate))if(void 0===e.sessionSampleRate||ge(e.sessionSampleRate)){if(void 0===e.telemetrySampleRate||ge(e.telemetrySampleRate)){var t=e.sessionSampleRate||e.sampleRate;return R({beforeSend:e.beforeSend&&d(e.beforeSend,"beforeSend threw an error:"),cookieOptions:zt(e),sessionSampleRate:Ee(t,100),service:e.service,version:e.version,env:e.env,telemetrySampleRate:Ee(e.telemetrySampleRate,100),telemetryEnabled:Ee(e.telemetryEnabled,!1),silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16*tt,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*te,batchMessagesLimit:50,messageBytesLimit:256*tt,resourceUrlLimit:5*tt,storeContextsToLocal:!!e.storeContextsToLocal,storeContextsKey:e.storeContextsKey,sendContentTypeByJson:!!e.sendContentTypeByJson},function(e){var t=function(e){return!1};"isIntakeUrl"in e&&D(e.isIntakeUrl)&&V(e.isIntakeUrl())&&(t=e.isIntakeUrl);var n=function(e){return!1};return"isServerError"in e&&D(e.isServerError)&&V(e.isServerError())&&(n=e.isServerError),{rumEndpoint:Vt(e,"rum"),logsEndpoint:Vt(e,"log"),sessionReplayEndPoint:Vt(e,"sessionReplay"),isIntakeUrl:t,isServerError:n}}(e))}i.error("Telemetry Sample Rate should be a number between 0 and 100")}else i.error("Sample Rate should be a number between 0 and 100");else i.error("Sample Rate should be a number between 0 and 100")}function zt(e){var t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===Bt){for(var e="gc_site_test_".concat(K()),t=window.location.hostname.split("."),n=t.pop();t.length&&!Gt(e);)n=t.pop()+"."+n,Wt(e,"test",te,{domain:n});Bt=n}return Bt}()),t}function Xt(){return qt||(qt=new Et((function(e){if(window.fetch){var t=mt(window,"fetch",(function(t){return function(e,t){var n=e.parameters,r=e.onPostCall,o=e.handlingStack,i=n[0],s=n[1],a=s&&s.method;void 0===a&&i instanceof Request&&(a=i.method);var u=void 0!==a?String(a).toUpperCase():"GET",f=i instanceof Request?i.url:Pt(String(i)),l=se(),d={state:"start",init:s,input:i,method:u,startClocks:l,url:f,handlingStack:o};t.notify(d),n[0]=d.input,n[1]=d.init,r((function(e){return function(e,t,n){var r=n,o=function(t){r.state="resolve",R(r,t),e.notify(r)};t.then(c((function(e){var t="";try{t=e.constructor===Response&&e.type||""}catch(e){t=""}o({response:e,responseType:t,status:e.status,isAborted:!1})})),c((function(e){o({status:0,isAborted:r.init&&r.init.signal&&r.init.signal.aborted||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,error:e})})))}(t,e,d)}))}(t,e)}),{computeHandlingStack:!0});return t.stop}}))),qt}var Yt=new WeakMap;function Jt(){return Qt||(Qt=new Et((function(e){var t=mt(XMLHttpRequest.prototype,"open",Zt),n=mt(XMLHttpRequest.prototype,"send",(function(t){!function(e,t){var n=e.target,r=e.handlingStack,o=Yt.get(n);if(o){var i=o;i.state="start",i.startClocks=se(),i.isAborted=!1,i.xhr=n,i.handlingStack=r;var s=!1,a=mt(n,"onreadystatechange",(function(){n.readyState===XMLHttpRequest.DONE&&u()})).stop,u=function(){if(c(),a(),!s){s=!0;var e,r=o;r.state="complete",r.duration=(e=i.startClocks.timeStamp,ae()-e),r.status=n.status,t.notify(R({},r))}},c=Ct(n,"loadend",u).stop;t.notify(i)}}(t,e)}),{computeHandlingStack:!0}),r=mt(XMLHttpRequest.prototype,"abort",en);return function(){t.stop(),n.stop(),r.stop()}}))),Qt}function Zt(e){var t=e.target,n=e.parameters[0],r=e.parameters[1];Yt.set(t,{state:"open",method:String(n).toUpperCase(),url:Pt(String(r))})}function en(e){var t=e.target,n=Yt.get(t);n&&(n.isAborted=!0)}var tn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};var nn,rn={sdk_name:"_gc.sdk_name",sdk_version:"_gc.sdk_version",app_id:"application.id",env:"env",service:"service",version:"version",source:"source",userid:"user.id",user_email:"user.email",user_name:"user.name",session_id:"session.id",session_type:"session.type",session_sampling:"session.is_sampling",is_signin:"user.is_signin",os:"device.os",os_version:"device.os_version",os_version_major:"device.os_version_major",browser:"device.browser",browser_version:"device.browser_version",browser_version_major:"device.browser_version_major",screen_size:"device.screen_size",network_type:"device.network_type",device:"device.device",view_id:"view.id",view_referrer:"view.referrer",view_url:"view.url",view_host:"view.host",view_path:"view.path",view_name:"view.path",view_path_group:"view.path_group"},on={view_url_query:"view.url_query",action_id:"action.id",action_ids:"action.ids",view_in_foreground:"view.in_foreground",display:"display",session_has_replay:"session.has_replay",is_login:"user.is_login",page_states:"_gc.page_states",session_sample_rate:"_gc.configuration.session_sample_rate",session_replay_sample_rate:"_gc.configuration.session_replay_sample_rate",drift:"_gc.drift"},sn={view:{type:Me.VIEW,tags:{view_loading_type:"view.loading_type",view_apdex_level:"view.apdex_level",view_privacy_replay_level:"privacy.replay_level"},fields:{sampled_for_replay:"session.sampled_for_replay",is_active:"view.is_active",session_replay_stats:"_gc.replay_stats",session_is_active:"session.is_active",view_error_count:"view.error.count",view_resource_count:"view.resource.count",view_long_task_count:"view.long_task.count",view_action_count:"view.action.count",first_contentful_paint:"view.first_contentful_paint",largest_contentful_paint:"view.largest_contentful_paint",largest_contentful_paint_element_selector:"view.largest_contentful_paint_element_selector",cumulative_layout_shift:"view.cumulative_layout_shift",cumulative_layout_shift_time:"view.cumulative_layout_shift_time",cumulative_layout_shift_target_selector:"view.cumulative_layout_shift_target_selector",first_input_delay:"view.first_input_delay",loading_time:"view.loading_time",dom_interactive:"view.dom_interactive",dom_content_loaded:"view.dom_content_loaded",dom_complete:"view.dom_complete",load_event:"view.load_event",first_input_time:"view.first_input_time",first_input_target_selector:"view.first_input_target_selector",first_paint_time:"view.fpt",interaction_to_next_paint:"view.interaction_to_next_paint",interaction_to_next_paint_target_selector:"view.interaction_to_next_paint_target_selector",resource_load_time:"view.resource_load_time",time_to_interactive:"view.tti",dom:"view.dom",dom_ready:"view.dom_ready",time_spent:"view.time_spent",first_byte:"view.first_byte",frustration_count:"view.frustration.count",custom_timings:"view.custom_timings"}},resource:{type:Me.RESOURCE,tags:{trace_id:"_gc.trace_id",span_id:"_gc.span_id",resource_id:"resource.id",resource_url:"resource.url",resource_url_host:"resource.url_host",resource_url_path:"resource.url_path",resource_url_path_group:"resource.url_path_group",resource_url_query:"resource.url_query",resource_type:"resource.type",resource_status:"resource.status",resource_status_group:"resource.status_group",resource_method:"resource.method"},fields:{duration:"resource.duration",resource_size:"resource.size",resource_encode_size:"resource.encoded_body_size",resource_decode_size:"resource.decoded_body_size",resource_transfer_size:"resource.transfer_size",resource_render_blocking_status:"resource.render_blocking_status",resource_dns:"resource.dns",resource_tcp:"resource.tcp",resource_ssl:"resource.ssl",resource_ttfb:"resource.ttfb",resource_trans:"resource.trans",resource_redirect:"resource.redirect",resource_first_byte:"resource.firstbyte",resource_dns_time:"resource.dns_time",resource_download_time:"resource.download_time",resource_first_byte_time:"resource.first_byte_time",resource_connect_time:"resource.connect_time",resource_ssl_time:"resource.ssl_time",resource_redirect_time:"resource.redirect_time"}},error:{type:Me.ERROR,tags:{error_id:"error.id",trace_id:"_gc.trace_id",span_id:"_gc.span_id",error_source:"error.source",error_type:"error.type",error_handling:"error.handling"},fields:{error_message:["string","error.message"],error_stack:["string","error.stack"],error_causes:["string","error.causes"],error_handling_stack:["string","error.handling_stack"]}},long_task:{type:Me.LONG_TASK,tags:{long_task_id:"long_task.id"},fields:{duration:"long_task.duration",blocking_duration:"long_task.blocking_duration",first_ui_event_timestamp:"long_task.first_ui_event_timestamp",render_start:"long_task.render_start",style_and_layout_start:"long_task.style_and_layout_start",long_task_start_time:"long_task.start_time",scripts:["string","long_task.scripts"]}},action:{type:Me.ACTION,tags:{action_type:"action.type"},fields:{action_name:"action.target.name",duration:"action.loading_time",action_error_count:"action.error.count",action_resource_count:"action.resource.count",action_frustration_types:"action.frustration.type",action_long_task_count:"action.long_task.count",action_target:"_gc.action.target",action_position:"_gc.action.position"}},telemetry:{type:"telemetry",fields:{status:"telemetry.status",message:["string","telemetry.message"],type:"telemetry.type",error_stack:["string","telemetry.error.stack"],error_kind:["string","telemetry.error.kind"]}},browser_log:{type:Me.LOGGER,tags:{error_source:"error.source",error_type:"error.type",error_resource_url:"http.url",error_resource_url_host:"http.url_host",error_resource_url_path:"http.url_path",error_resource_url_path_group:"http.url_path_group",error_resource_status:"http.status_code",error_resource_status_group:"http.status_group",error_resource_method:"http.method",action_id:"user_action.id",service:"service",status:"status"},fields:{message:["string","message"],error_message:["string","error.message"],error_stack:["string","error.stack"]}}},an=4*re,un=15*ne,cn=/^([a-z]+)=([a-z0-9-]+)$/,fn="&",ln="_dataflux_s",dn=10,pn=100,vn=[];function gn(e,t){if(void 0===t&&(t=0),nn||(nn=e),e===nn)if(t>=pn)hn();else{var n,r=bn();if(yn()){if(r.lock)return void _n(e,t);if(n=K(),r.lock=n,mn(r,e.options),(r=bn()).lock!==n)return void _n(e,t)}var o=e.process(r);if(yn()&&(r=bn()).lock!==n)_n(e,t);else{if(o&&function(e,t){if(En(e))return void wn(t);e.expire=String(ue()+un),mn(e,t)}(o,e.options),yn()&&(!o||!En(o))){if((r=bn()).lock!==n)return void _n(e,t);delete r.lock,mn(r,e.options),o=r}e.after&&e.after(o||r),hn()}}else vn.push(e)}function yn(){return he()===_e.CHROMIUM}function _n(e,t){g((function(){gn(e,t+1)}),dn)}function hn(){nn=void 0;var e=vn.shift();e&&gn(e)}function mn(e,t){Wt(ln,function(e){return $(j(e),(function(e){return e[0]+"="+e[1]})).join(fn)}(e),un,t)}function bn(){var e=Gt(ln),t={};return function(e){return void 0!==e&&(-1!==e.indexOf(fn)||cn.test(e))}(e)&&k(e.split(fn),(function(e){var n=cn.exec(e);if(null!==n){var r=n[1],o=n[2];t[r]=o}})),t}function En(e){return G(e)}function wn(e){Wt(ln,"",0,e)}var On=te;function Sn(e,t,n){var r=new Et,o=new Et,i=_((function(){gn({options:e,process:function(e){return d(e)?void 0:{}},after:f})}),On),s=function(){var e=bn();if(d(e))return e;return{}}(),a=q((function(){var o;gn({options:e,process:function(e){var r=f(e);return o=function(e){var r=n(e[t]),o=r.trackingType,i=r.isTracked;e[t]=o,i&&!e.id&&(e.id=K(),e.created=String(ue()));return i}(r),r},after:function(e){o&&!l()&&function(e){s=e,r.notify()}(e),s=e}})}),On),u=a.throttled,c=a.cancel;function f(e){return d(e)||(e={}),l()&&(!function(e){return s.id!==e.id||s[t]!==e[t]}(e)?s=e:(s={},o.notify())),e}function l(){return void 0!==s[t]}function d(e){return(void 0===e.created||ue()-Number(e.created)<an)&&(void 0===e.expire||ue()<Number(e.expire))}return{expandOrRenewSession:u,expandSession:function(){gn({options:e,process:function(e){return l()?f(e):void 0}})},getSession:function(){return s},renewObservable:r,expireObservable:o,expire:function(){c(),wn(e),f({})},stop:function(){h(i)}}}var Cn=ne,xn=an,Tn=[],kn=function(e,t,n){var r=new Et,o=new Et,i=Sn(e,t,n);Tn.push((function(){return i.stop()}));var s,a,u=ke({expireDelay:xn});function c(){return{id:i.getSession().id,trackingType:i.getSession()[t]}}return Tn.push((function(){return u.stop()})),i.renewObservable.subscribe((function(){u.add(c(),ie()),r.notify()})),i.expireObservable.subscribe((function(){o.notify(),u.closeActive(ie())})),i.expandOrRenewSession(),u.add(c(),[0,ce()][0]),s=function(){return i.expandOrRenewSession()},a=xt(window,[De.CLICK,De.TOUCH_START,De.KEY_DOWN,De.SCROLL],s,{capture:!0,passive:!0}),Tn.push(a.stop),function(e){var t=function(){"visible"===document.visibilityState&&e()},n=Ct(document,De.VISIBILITY_CHANGE,t);Tn.push(n.stop);var r=_(t,Cn);Tn.push((function(){h(r)}))}((function(){return i.expandSession()})),{findActiveSession:function(e){return u.find(e)},renewObservable:r,expireObservable:o,expire:i.expire}};var Rn=80*tt,Ln=32,An=3*nt,In=256*te,Dn=te,Mn={UP:0,FAILURE_DETECTED:1,DOWN:2},Pn={AFTER_SUCCESS:0,AFTER_RESUME:1};function Un(e,t,n,r,o){t.transportStatus===Mn.UP&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?Nn(e,t,n,{onSuccess:function(){return Bn(Pn.AFTER_SUCCESS,t,n,r,o)},onFailure:function(){t.queuedPayloads.enqueue(e),$n(t,n,r,o)}}):t.queuedPayloads.enqueue(e)}function $n(e,t,n,r){e.transportStatus===Mn.DOWN&&g((function(){Nn(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=Dn,Bn(Pn.AFTER_RESUME,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(In,2*e.currentBackoffTime),$n(e,t,n,r)}})}),e.currentBackoffTime)}function Nn(e,t,n,r){var o=r.onSuccess,i=r.onFailure;t.bandwidthMonitor.add(e),n(e,(function(n){t.bandwidthMonitor.remove(e),!function(e){return"opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||e.status>=500)}(n)?(t.transportStatus=Mn.UP,o()):(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?Mn.FAILURE_DETECTED:Mn.DOWN,t.lastFailureStatus=n.status,i())}))}function Bn(e,t,n,r,o){e===Pn.AFTER_SUCCESS&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max "+r+" events size queued for upload: "+An/nt+"MiB",source:pt.AGENT,startClocks:se()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=Wn();i.size()>0;)Un(i.dequeue(),t,n,r,o)}function Wn(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=An}}}function Gn(){var e,t=window.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:null===(e=t.connection)||void 0===e?void 0:e.effectiveType}}var jn={log:"log",configuration:"configuration",usage:"usage"},Fn={debug:"debug",error:"error"},Vn=["https://static.guance.com","http://localhost","<anonymous>"],Hn={LOGS:"browser-logs-sdk",RUM:"browser-rum-sdk"},qn=Ce(),Qn=function(e){qn.add((function(){Qn(e)}))};function Kn(e,t){var n,o=new Et,i=new Set,s=t.telemetryEnabled&&oe(t.telemetrySampleRate),a={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self};return Qn=function(r){var u=Be(r);if(s&&i.size<t.maxTelemetryEventsPerPage&&!i.has(u)){var c=function(e,t,r){return A({type:"telemetry",date:ae(),service:e,version:"3.2.4",source:"browser",telemetry:A(t,{runtime_env:r,connectivity:Gn()})},void 0!==n?n():{})}(e,r,a);o.notify(c),i.add(u)}},r=zn,{setContextProvider:function(e){n=e},observable:o,enabled:s}}function zn(e,t){Qn(R({type:jn.log,status:Fn.error},function(e){if(e instanceof Error){var t=Fe(e);return{error:{kind:t.name,stack:yt(Xn(t))},message:t.message}}return{error:{stack:dt},message:$e.UNCAUGHT+" "+Be(e)}}(e),t))}function Xn(e){return e.stack=e.stack.filter((function(e){return!e.url||Vn.some((function(t){return we(e.url,t)}))})),e}function Yn(e,t){return e?(e=e+(-1===e.indexOf("?")?"?":"&")+"precision=ms",t&&(e=e+"&encoding="+t),e):e}function Jn(e,t,n){var r={transportStatus:Mn.UP,lastFailureStatus:0,currentBackoffTime:Dn,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=Rn&&this.ongoingRequestCount<Ln},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:Wn(),queueFullReported:!1},o=function(n,r){return function(e,t,n,r){var o=n.data,i=n.bytesCount,s=Yn(e,n.encoding),a=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&i<t;if(a){var u={method:"POST",body:o,keepalive:!0,mode:"cors"};n.type&&(u.headers={"Content-Type":n.type}),fetch(s,u).then(c((function(e){"function"==typeof r&&r({status:e.status,type:e.type})})),c((function(){er(s,n,r)})))}else er(s,n,r)}(e,t,n,r)};return{send:function(t){Un(t,r,o,e,n)},sendOnExit:function(n){!function(e,t,n){var r=n.data,o=n.bytesCount,i=Yn(e,n.encoding),s=!!navigator.sendBeacon&&o<t;if(s)try{var a;if(a=n.type?new Blob([r],{type:n.type}):r,navigator.sendBeacon(i,a))return}catch(e){!function(e){Zn||(Zn=!0,zn(e))}(e)}er(i,n)}(e,t,n)}}}var Zn=!1;function er(e,t,n){var r=t.data,o=new XMLHttpRequest;o.open("POST",e,!0),r instanceof Blob?o.setRequestHeader("Content-Type",r.type):t.type&&o.setRequestHeader("Content-Type",t.type),Ct(o,"loadend",(function(){"function"==typeof n&&n({status:o.status})}),{once:!0}),o.send(r)}function tr(e){return tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tr(e)}function nr(e){if("object"===tr(e)&&e)e=Be(e);else if(!F(e))return e;return String(e).replace(/[\s=,"]/g,(function(e){return"\\"+e}))}function rr(e,t){return"object"===tr(e)&&e?e=Be(e):t&&(e=""+e),e}function or(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}function ir(e){return"object"===tr(e)&&e?or(Be(e)):F(e)?or(e):e}var sr="custom_keys",ar=function(e){if(!e||!e.type)return{rowStr:"",rowData:void 0};var t={tags:{},fields:{}},n=!1,r="";return k(sn,(function(o,i){if(o.type===e.type){r+=i+",",t.measurement=i;var s=[],a=L({},rn,o.tags),u=["date","type",sr];k(a,(function(n,r){var o=le(e,n);u.push(r),(o||H(o))&&(t.tags[r]=rr(o,!0),s.push(nr(r)+"="+nr(o)))}));var c=[],f=L({},on,o.fields);if(k(f,(function(n,r){if(I(n)&&2===n.length){var o=n[1],i=le(e,o);u.push(r),null!=i&&(t.fields[r]=rr(i),c.push(nr(r)+"="+ir(i)))}else if(F(n)){i=le(e,n);u.push(r),null!=i&&(t.fields[r]=rr(i),c.push(nr(r)+"="+ir(i)))}})),e.context&&W(e.context)&&!G(e.context)){var l=[];k(e.context,(function(e,n){u.indexOf(n)>-1||(u.push(n),null!=e&&(l.push(n),t.fields[n]=rr(e),c.push(nr(n)+"="+ir(e))))})),l.length&&(t.fields[sr]=rr(l),c.push(nr(sr)+"="+ir(l)))}e.type===Me.LOGGER&&k(e,(function(e,n){-1===u.indexOf(n)&&null!=e&&(t.fields[n]=rr(e),c.push(nr(n)+"="+ir(e)))})),s.length&&(r+=s.join(",")),c.length&&(r+=" ",r+=c.join(","),n=!0),r=r+" "+e.date,t.time=e.date}})),{rowStr:n?r:"",rowData:n?t:void 0}};function ur(e){var t=e.encoder,n=e.request,r=e.messageBytesLimit,o=e.sendContentTypeByJson,s=e.flushController,a={},u=s.flushObservable.subscribe((function(e){!function(e){var r=M(a).join(o?",":"\n");a={};var i=(u=e.reason,pe(M(tn),u)),s=i?n.sendOnExit:n.send;var u;if(i&&t.isAsync){var f=t.finishSync();f.outputBytesCount&&s(cr(f,o));var l=[f.pendingData,r].filter(Boolean).join("\n");l&&s({data:l,bytesCount:ot(l)})}else{if(r){var d=c([r],t.isEmpty());o&&(d+="]"),t.write(d)}else o&&t.write("]");t.finish((function(e){s(cr(e))}))}}(e)}));function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return o?t?"["+e.join(","):","+e.join(","):t?e.join("\n"):"\n"+e.join("\n")}function f(e,n){var u=function(e){return o?Be(ar(e).rowData):ar(e).rowStr}(e),f=t.estimateEncodedBytesCount(u);f>=r?i.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(r,"KB.")):(function(e){return void 0!==e&&void 0!==a[e]}(n)&&function(e){var n=a[e];delete a[e];var r=t.estimateEncodedBytesCount(n);s.notifyAfterRemoveMessage(r)}(n),function(e,n,r){s.notifyBeforeAddMessage(n),void 0!==r?(a[r]=e,s.notifyAfterAddMessage()):t.write(c([e],t.isEmpty()),(function(e){s.notifyAfterAddMessage(e-n)}))}(u,f,n))}return{flushController:s,add:f,upsert:f,stop:u.unsubscribe}}function cr(e,t){return{data:"string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),type:t?"application/json;UTF-8":void 0,bytesCount:e.outputBytesCount,encoding:e.encoding}}function fr(e){var t=e.messagesLimit,n=e.bytesLimit,r=e.durationLimit,o=e.pageExitObservable,i=e.sessionExpireObservable;o.subscribe((function(e){return f(e.reason)})),i.subscribe((function(){return f("session_expire")}));var s,a=new Et((function(){return function(){pageExitSubscription.unsubscribe(),sessionExpireSubscription.unsubscribe()}})),u=0,c=0;function f(e){if(0!==c){var t=c,n=u;c=0,u=0,l(),a.notify({reason:e,messagesCount:t,bytesCount:n})}}function l(){y(s),s=void 0}return{flushObservable:a,getMessagesCount:function(){return c},notifyBeforeAddMessage:function(e){u+e>=n&&f("bytes_limit"),c+=1,u+=e,void 0===s&&(s=g((function(){f("duration_limit")}),r))},notifyAfterAddMessage:function(e){void 0===e&&(e=0),u+=e,c>=t?f("messages_limit"):u>=n&&f("bytes_limit")},notifyAfterRemoveMessage:function(e){u-=e,0===(c-=1)&&l()}}}function lr(e,t,n,r,o,i){void 0===i&&(i=ur);var s=function(e,t){return i({encoder:t.encoder,request:Jn(t.endpoint,e.batchBytesLimit,n),flushController:fr({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:r,sessionExpireObservable:o}),messageBytesLimit:e.messageBytesLimit,sendContentTypeByJson:e.sendContentTypeByJson})}(e,t);return{flushObservable:s.flushController.flushObservable,add:function(e){s.add(e)},upsert:function(e,t){s.upsert(e,t)},stop:function(){s.stop()}}}function dr(){var e=v().FTWebViewJavascriptBridge;if(e)return{send:function(t,n){e.sendEvent(JSON.stringify({name:t,data:n}))}}}function pr(){return!!dr()}var vr="guance-synthetics-injects-rum";var gr=3*tt,yr={FeatureFlag:"feature flag evaluation",User:"user",GlobalContext:"global context",LoggerContext:"logger context"};var _r=200;function hr(e,t){void 0===t&&(t=ot);var n,r={},o=!1,s=new Et,a=q((function(r){n=t(Be(r)),o||(o=function(e,t){return e>gr&&(i.warn("The "+t+"data is over "+gr/tt+" KiB. On low connectivity, the SDK has the potential to exhaust the user's upload bandwidth."),!0)}(n,e))}),_r).throttled,u={getBytesCount:function(){return n},get:function(){return r},add:function(e,t){r[e]=t,a(r),s.notify()},remove:function(e){delete r[e],a(r),s.notify()},set:function(e){a(r=e),s.notify()},getContext:function(){return J(r)},setContext:function(e){"object"===X(e)?(r=ct(e),a(r)):u.clearContext(),s.notify()},setContextProperty:function(e,t){r[e]=J(t),a(r),s.notify()},removeContextProperty:function(e){delete r[e],a(r),s.notify()},clearContext:function(){r={},n=0,s.notify()},changeObservable:s};return u}var mr="_gc_s",br=[];function Er(e,t,n,r){var o=function(e,t,n){return e.storeContextsKey&&F(e.storeContextsKey)?mr+"_"+t+"_"+n+"_"+e.storeContextsKey:mr+"_"+t+"_"+n}(e,n,r);function i(){var e=localStorage.getItem(o);return null!==e?JSON.parse(e):{}}return br.push(Ct(window,De.STORAGE,(function(e){o===e.key&&t.setContext(i())}))),t.changeObservable.subscribe((function(){localStorage.setItem(o,JSON.stringify(t.getContext()))})),t.setContext(A(i(),t.getContext())),t}function wr(){var e="",t=0;return{isAsync:!1,isEmpty:function(){return!e},write:function(n,r){var o=ot(n);t+=o,e+=n,r&&r(o)},finish:function(e){e(this.finishSync())},finishSync:function(){var n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount:function(e){return e.length}}}function Or(e){var t=R({},e);return k(["id","name","email"],(function(e){e in t&&(t[e]=String(t[e]))})),t}function Sr(e){this.map=new WeakMap,e&&e.forEach((function(e){this.map.set(e,1)}))}function Cr(e,t){t.silentMultipleInit||i.error(e+" is already initialized.")}Sr.prototype.add=function(e){return this.map.set(e,1),this},Sr.prototype.delete=function(e){return this.map.delete(e)},Sr.prototype.has=function(e){return this.map.has(e)};var xr={ok:0,debug:1,info:2,notice:4,warn:5,error:6,critical:7,alert:8,emerg:9};function Tr(e){return{handleLog:function(t,r,o,i,s){var a=A(r.getContext(),t.context);if(kr(t.status,Ar.console,r)&&function(e,t){var r=e.status,o=e.message;n[loggerToConsoleApiName[r]].call(globalConsole,o,t)}(t,a),kr(t.status,Ar.http,r)){var u={rawLogsEvent:{date:s||ae(),message:t.message,status:t.status,origin:pt.LOGGER},messageContext:a,savedCommonContext:i};o&&(u.domainContext={handlingStack:o}),e.notify(Dt.RAW_LOG_COLLECTED,u)}}}}function kr(e,t,n){var r=n.getHandler(),o=I(r)?r:[r];return xr[e]>=xr[n.getLevel()]&&pe(o,t)}function Rr(e,t){void 0===t&&(t={});var n=t.includeMessage||!1;return{stack:e.stack,kind:e.type,message:n?e.message:void 0,causes:e.causes,handling:e.handling}}var Lr={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},Ar={console:"console",http:"http",silent:"silent"},Ir=P(Lr);function Dr(e,t,n,r,o){void 0===n&&(n=Ar.http),void 0===r&&(r=Lr.debug),void 0===o&&(o={}),this.contextManager=hr(yr.LoggerContext),this.handleLogStrategy=e,this.handlerType=n,this.level=r,this.contextManager.setContext(o),t&&this.contextManager.setContextProperty("logger",{name:t})}function Mr(e){return function(t,n,r){var o;kr(e,Ar.http,this)&&(o=gt()),this.logImplementation(t,n,e,r,o)}}Dr.prototype={logImplementation:c((function(e,t,n,r,o){void 0===n&&(n=Lr.info);var i,s=ct(t);if(null!=r){var a=vt({stackTrace:r instanceof Error?Fe(r):void 0,originalError:r,nonErrorPrefix:$e.PROVIDED,source:pt.LOGGER,handling:Ue.HANDLED,startClocks:se()});i=A({error:Rr(a,{includeMessage:!0})},s)}else i=s;this.handleLogStrategy({message:ct(e),context:i,status:n},this,o)})),log:function(e,t,n,r){var o;kr(n,Ar.http,this)&&(o=gt()),this.logImplementation(e,t,n,r,o)},setContext:function(e){this.contextManager.setContext(e)},getContext:function(){return this.contextManager.getContext()},setContextProperty:function(e,t){this.contextManager.setContextProperty(e,t)},addContext:function(e,t){this.contextManager.setContextProperty(e,t)},removeContextProperty:function(e){this.contextManager.removeContextProperty(e)},removeContext:function(e){this.contextManager.remove(e)},clearContext:function(){this.contextManager.clearContext()},setHandler:function(e){this.handlerType=e},getHandler:function(){return this.handlerType},setLevel:function(e){this.level=e},getLevel:function(){return this.level}},Dr.prototype.ok=Mr(Lr.ok),Dr.prototype.debug=Mr(Lr.debug),Dr.prototype.info=Mr(Lr.info),Dr.prototype.notice=Mr(Lr.notice),Dr.prototype.warn=Mr(Lr.warn),Dr.prototype.error=Mr(Lr.error),Dr.prototype.critical=Mr(Lr.critical),Dr.prototype.alert=Mr(Lr.alert),Dr.prototype.emerg=Mr(Lr.emerg);var Pr={sdkVersion:"3.2.4",sdkName:"df_web_logs_sdk"},Ur=32*tt;function $r(t){var n=function(e){return e.site||e.datakitOrigin||e.datakitUrl?!(e.site&&!e.clientToken&&(i.error("clientToken is not configured, no RUM data will be collected."),1)):(i.error("datakitOrigin or site is not configured, no RUM data will be collected."),!1)}(t);if(n){var r=Kt(t),o=Nr(t.forwardConsoleLogs,M(e),"Forward Console Logs"),s=Nr(t.forwardReports,M(Tt),"Forward Reports");if(r&&o&&s)return t.forwardErrorsToLogs&&!pe(o,e.error)&&o.push(e.error),R({forwardErrorsToLogs:!1!==t.forwardErrorsToLogs,forwardConsoleLogs:o,forwardReports:s,requestErrorResponseLengthLimit:Ur},r,Pr)}}function Nr(e,t,n){return void 0===e?[]:"all"===e||I(e)&&B(e,(function(e){return pe(t,e)}))?"all"===e?t:Q(e):void i.error(n+' should be "all" or an array with allowed values "'+t.join('", "')+'"')}function Br(e,t){var n,r,o=Ce();return{init:function(e){if(e)if(pr()&&(e=function(e){return R({},e,{clientToken:"empty"})}(e)),n=e,r)Cr("DATAFLUX_LOGS",e);else{var s=$r(e);s&&(r=s,Xt().subscribe(Z),function(){if(r&&n){var e=t(n,r);o.drain(e)}}())}else i.error("Missing configuration")},getInitConfiguration:function(){return n},getInternalContext:Z,handleLog:function(t,n,r,i,s){void 0===i&&(i=e()),void 0===s&&(s=ae()),o.add((function(e){e.handleLog(t,n,r,i,s)}))}}}var Wr="logs";var Gr,jr="logs",Fr={NOT_TRACKED:"0",TRACKED:"1"};function Vr(e){var t=kn(e.cookieOptions,jr,(function(t){return function(e,t){var n=function(e){return e===Fr.NOT_TRACKED||e===Fr.TRACKED}(t)?t:Hr(e);return{trackingType:n,isTracked:n===Fr.TRACKED}}(e,t)}));return{findTrackedSession:function(e){var n=t.findActiveSession(e);return n&&n.trackingType===Fr.TRACKED?{id:n.id}:void 0},expireObservable:t.expireObservable}}function Hr(e){return oe(e.sessionSampleRate)?Fr.TRACKED:Fr.NOT_TRACKED}function qr(e,t,n,r,o){var i=Ir.concat(["custom"]),s={};k(i,(function(e){var n,r,i,a,u;s[e]=(n=e,r=t.eventRateLimiterThreshold,i=o,a=0,u=!1,{isLimitReached:function(){if(0===a&&g((function(){a=0}),ne),(a+=1)<=r||u)return u=!1,!1;if(a===r+1){u=!0;try{i({message:"Reached max number of "+n+"s by minute: "+r,source:pt.AGENT,startClocks:se()})}finally{u=!1}}return!0}})})),n.subscribe(Dt.RAW_LOG_COLLECTED,(function(o){var i=o.rawLogsEvent,a=o.messageContext||void 0,u=o.savedCommonContext||void 0,c=o.domainContext,f=i.date-ce(),l=e.findTrackedSession(f);if(l){var d=u||r(),p=A({service:t.service||"browser",env:t.env||"",version:t.version||"",_gc:{sdkName:t.sdkName,sdkVersion:t.sdkVersion},session:{id:l.id},view:d.view,user:G(d.user)?void 0:d.user,device:Ie,type:Me.LOGGER},d.context,Qr(f),i,a);t.beforeSend&&!1===t.beforeSend(p,c)||p.origin!==pt.AGENT&&Ee(s[p.status],s.custom).isLimitReached()||n.notify(Dt.LOG_COLLECTED,me(p))}}))}function Qr(e){return function(t){if(t&&t.getInternalContext)return t.getInternalContext(e)}(window.DATAFLUX_RUM)}function Kr(e){return Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kr(e)}function zr(e){var t=function(e,t){if("object"!=Kr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Kr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kr(t)?t:t+""}function Xr(e,t,n){return(t=zr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yr=(Xr(Gr={},e.log,Lr.info),Xr(Gr,e.debug,Lr.debug),Xr(Gr,e.info,Lr.info),Xr(Gr,e.warn,Lr.warn),Xr(Gr,e.error,Lr.error),Gr);function Jr(e,t){if(!e.forwardErrorsToLogs)return{stop:Z};var n=Jt().subscribe((function(e){"complete"===e.state&&o(Pe.XHR,e)})),r=Xt().subscribe((function(e){"resolve"===e.state&&o(Pe.FETCH,e)}));function o(n,r){function o(e){var o,i,s,a={isAborted:r.isAborted,handlingStack:r.handlingStack},u=z(r.url).getParse();t.notify(Dt.RAW_LOG_COLLECTED,{rawLogsEvent:{message:eo(n)+" error "+r.method+" "+r.url,date:r.startClocks.timeStamp,error:{stack:e||"Failed to load",handing:void 0},http:{method:r.method,status_code:r.status,url:r.url,statusGroup:(s=r.status,s?String(s).substr(0,1)+String(s).substr(1).replace(/\d*/g,"x"):s),urlHost:u.Host,urlPath:u.Path,urlPathGroup:(o=u.Path,i="",o&&(i=o.replace(/\/([^\/]*)\d([^\/]*)/g,"/?").replace(/\/$/g,"")),i||"/")},status:Lr.error,origin:pt.NETWORK},domainContext:a})}!function(e,t){var n=[t.rumEndpoint];return t.logsEndpoint&&n.push(t.logsEndpoint),t.sessionReplayEndPoint&&n.push(t.sessionReplayEndPoint),N(n,(function(t){return 0===e.indexOf(t)}))||t.isIntakeUrl(e)}(r.url,e)&&(function(e){return 0===e.status&&"opaque"!==e.responseType}(r)||function(e){return e.status>=500}(r)||e.isServerError(r))&&("xhr"in r?function(e,t,n){"string"==typeof e.response?n(Zr(e.response,t)):n(e.response)}(r.xhr,e,o):r.response?function(e,t,n){var r=function(e){try{return e.clone()}catch(e){return}}(e);r&&r.body?window.TextDecoder?function(e,t,n){!function(e,t,n){var r=e.getReader(),o=[],i=0;function s(){var e,s;if(r.cancel().catch(Z),n.collectStreamBody){var a;if(1===o.length)a=o[0];else{a=new Uint8Array(i);var u=0;k(o,(function(e){a.set(e,u),u+=e.length}))}e=a.slice(0,n.bytesLimit),s=a.length>n.bytesLimit}t(void 0,e,s)}!function e(){r.read().then(c((function(t){t.done?s():(n.collectStreamBody&&o.push(t.value),(i+=t.value.length)>n.bytesLimit?s():e())})),c((function(e){t(e)})))}()}(e,(function(e,t,r){if(e)n(e);else{var o=(new TextDecoder).decode(t);r&&(o+="..."),n(void 0,o)}}),{bytesLimit:t,collectStreamBody:!0})}(r.body,t.requestErrorResponseLengthLimit,(function(e,t){n(e?"Unable to retrieve response: "+e:t)})):r.text().then(c((function(e){return n(Zr(e,t))})),c((function(e){return n("Unable to retrieve response: "+e)}))):n()}(r.response,e,o):r.error&&function(e,t,n){n(Zr(yt(Fe(e)),t))}(r.error,e,o))}return{stop:function(){n.unsubscribe(),r.unsubscribe()}}}function Zr(e,t){return e.length>t.requestErrorResponseLengthLimit?e.substring(0,t.requestErrorResponseLengthLimit)+"...":e}function eo(e){return Pe.XHR===e?"XHR":"Fetch"}function to(e,t){if(!e.forwardErrorsToLogs)return{stop:Z};var n,r=new Et,o=(n=r,et((function(e,t){n.notify(vt({stackTrace:e,originalError:t,startClocks:se(),nonErrorPrefix:$e.UNCAUGHT,source:pt.SOURCE,handling:Ue.UNHANDLED}))}))),i=r.subscribe((function(e){t.notify(Dt.RAW_LOG_COLLECTED,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:Rr(e),origin:pt.SOURCE,status:Lr.error}})}));return{stop:function(){o.stop(),i.unsubscribe()}}}function no(e){return function(t){var n,r;e.notify(Dt.RAW_LOG_COLLECTED,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:pt.AGENT,status:Lr.error}}),n="Error reported to customer",r={"error.message":t.message},l(n,r),Qn(R({type:jn.log,message:n,status:Fn.debug},r))}}var ro,oo,io,so,ao=function(e){var t=hr(yr.GlobalContext),n=hr(yr.User);function r(){return function(e,t){return{view:{referrer:document.referrer,url:window.location.href},context:e.getContext(),user:t.getContext()}}(t,n)}var o,s,a=Br(r,(function(o,i){o.storeContextsToLocal&&(Er(i,t,Wr,yr.GlobalContext),Er(i,n,Wr,yr.User));var s=e(o,i,r);return a=function(e,t){return R({init:function(e){Cr("DATAFLUX_LOGS",e)},initConfiguration:e},t)}(o,s),s})),f={},l=new Dr((function(){return a.handleLog.apply(this,arguments)}));return o={logger:l,init:c((function(e){return a.init(e)})),getGlobalContext:c((function(){return t.getContext()})),setGlobalContext:c((function(e){return t.setContext(e)})),setGlobalContextProperty:c((function(e,n){return t.setContextProperty(e,n)})),removeGlobalContextProperty:c((function(e){return t.removeContextProperty(e)})),clearGlobalContext:c((function(){return t.clearContext()})),createLogger:c((function(e,t){return void 0===t&&(t={}),f[e]=new Dr((function(){return a.handleLog.apply(this,arguments)}),sanitize(e),t.handler,t.level,sanitize(t.context)),f[e]})),getLogger:c((function(e){return f[e]})),getInitConfiguration:c((function(){return J(a.initConfiguration)})),getInternalContext:c((function(e){return a.getInternalContext(e)})),setUser:c((function(e){(function(e){var t="object"===X(e);return t||i.error("Unsupported user:",e),t})(e)&&n.setContext(Or(e))})),getUser:c((function(){return n.getContext()})),removeUserProperty:c((function(e){return n.removeContextProperty(e)})),setUserProperty:c((function(e,t){var r={};r[e]=t;var o=Or(r)[e];n.setContextProperty(e,o)})),clearUser:c((function(){return n.clearContext()}))},s=R({onReady:function(e){e()}},o),Object.defineProperty(s,"_setDebug",{get:function(){return u},enumerable:!1}),s}((function(e,t,n){var r=new Mt,o=[],i=no(r),s=new Et((function(e){var t=xt(window,[De.VISIBILITY_CHANGE,De.FREEZE],(function(t){t.type===De.VISIBILITY_CHANGE&&"hidden"===document.visibilityState?e.notify({reason:tn.HIDDEN}):t.type===De.FREEZE&&e.notify({reason:tn.FROZEN})}),{capture:!0}),n=Ct(window,De.BEFORE_UNLOAD,(function(){e.notify({reason:tn.UNLOADING})}));return function(){t.stop(),n.stop()}})),a=!function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="gc_cookie_test_".concat(K()),n="test";return Wt(t,n,te,e),Gt(t)===n}catch(e){return!1}}(t.cookieOptions)||pr()||Boolean(window._GUANCE_SYNTHETICS_INJECTS_RUM||Gt(vr))?function(e){var t=Hr(e)===Fr.TRACKED?{}:void 0;return{findTrackedSession:function(){return t},expireObservable:new Et}}(t):Vr(t),u=function(e,t,n,r,o){var i=Kn(Hn.LOGS,t);i.setContextProvider((function(){var e=Qr();return{application:{id:e&&e.application&&e.application.id},session:{id:o.findTrackedSession()&&o.findTrackedSession().id},view:{id:e&&e.view&&e.view.id},action:{id:e&&e.userAction&&e.userAction.id}}}));var s=[];if(!pr()){var a=lr(t,{endpoint:t.rumEndpoint,encoder:wr()},n,r,o.expireObservable);s.push((function(){a.stop()}));var u=i.observable.subscribe((function(e){a.add(e)}));s.push((function(){u.unsubscribe()}))}return function(){qn.drain()}(),function(e){Qn({type:jn.configuration,configuration:e})}(J(e)),{telemetry:i,stop:function(){s.forEach((function(e){e()}))}}}(e,t,i,s,a);o.push((function(){u.stop()})),Jr(t,r),to(t,r),function(e,t){var n=St(e.forwardConsoleLogs).subscribe((function(e){t.notify(Dt.RAW_LOG_COLLECTED,{rawLogsEvent:{date:ae(),message:e.message,origin:pt.CONSOLE,error:e.error&&Rr(e.error),status:Yr[e.api]},domainContext:{handlingStack:e.handlingStack}})}))}(t,r),function(e,t){var n=kt(0,e.forwardReports).subscribe((function(e){var n,r,o,i=e.message,s="deprecation"===e.originalError.type?Lr.warn:Lr.error;s===Lr.error?n=Rr(e):report.stack&&(i+=" Found in "+(r=e.stack,(o=/@ (.+)/.exec(r))&&o[1])),t.notify(Dt.RAW_LOG_COLLECTED,{rawLogsEvent:{date:ae(),message:i,origin:pt.REPORT,error:n,status:s}})}))}(t,r);var c=Tr(r);if(qr(a,t,r,n,i),!pr()){var f=function(e,t,n,r,o){var i=lr(e,{endpoint:e.logsEndpoint,encoder:wr()},n,r,o.expireObservable);return t.subscribe(Dt.LOG_COLLECTED,(function(e){i.add(e)})),i}(t,r,i,s,a);o.push((function(){f.stop()}))}var l,d=(l=a,{get:function(e){var t=l.findTrackedSession(e);if(t)return{session:{id:t.id}}}});return{handleLog:c.handleLog,getInternalContext:d.get,stop:function(){o.forEach((function(e){e()}))}}}));ro=v(),io=ao,so=ro[oo="DATAFLUX_LOGS"],ro[oo]=io,so&&so.q&&k(so.q,(function(e){d(e,"onReady callback threw an error:")()}))}();
|
package/cjs/boot/buildEnv.js
CHANGED
|
@@ -61,7 +61,7 @@ function makeLogsPublicApi(startLogsImpl) {
|
|
|
61
61
|
return customLoggers[name];
|
|
62
62
|
}),
|
|
63
63
|
getInitConfiguration: (0, _browserCore.monitor)(function () {
|
|
64
|
-
return strategy.
|
|
64
|
+
return (0, _browserCore.deepClone)(strategy.initConfiguration);
|
|
65
65
|
}),
|
|
66
66
|
getInternalContext: (0, _browserCore.monitor)(function (startTime) {
|
|
67
67
|
return strategy.getInternalContext(startTime);
|
|
@@ -93,9 +93,7 @@ function createPostStartStrategy(initConfiguration, startLogsResult) {
|
|
|
93
93
|
init: function init(initConfiguration) {
|
|
94
94
|
(0, _browserCore.displayAlreadyInitializedError)('DATAFLUX_LOGS', initConfiguration);
|
|
95
95
|
},
|
|
96
|
-
|
|
97
|
-
return initConfiguration;
|
|
98
|
-
}
|
|
96
|
+
initConfiguration: initConfiguration
|
|
99
97
|
}, startLogsResult);
|
|
100
98
|
}
|
|
101
99
|
//# sourceMappingURL=logsPublicApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logsPublicApi.js","names":["_browserCore","require","_logger","_commonContext","_preStartLogs","LOGS_STORAGE_KEY","makeLogsPublicApi","startLogsImpl","globalContextManager","createContextManager","CustomerDataType","GlobalContext","userContextManager","User","getCommonContext","buildCommonContext","strategy","createPreStartStrategy","initConfiguration","configuration","storeContextsToLocal","storeContextManager","startLogsResult","createPostStartStrategy","customLoggers","mainLogger","Logger","handleLog","apply","arguments","makePublicApi","logger","init","monitor","getGlobalContext","getContext","setGlobalContext","context","setContext","setGlobalContextProperty","key","value","setContextProperty","removeGlobalContextProperty","removeContextProperty","clearGlobalContext","clearContext","createLogger","name","conf","sanitize","handler","level","getLogger","getInitConfiguration","getInternalContext","startTime","setUser","newUser","checkUser","sanitizeUser","getUser","removeUserProperty","setUserProperty","property","sanitizedProperty","clearUser","assign","displayAlreadyInitializedError"],"sources":["../../src/boot/logsPublicApi.js"],"sourcesContent":["import {\n createContextManager,\n makePublicApi,\n CustomerDataType,\n checkUser,\n sanitizeUser,\n monitor,\n storeContextManager,\n displayAlreadyInitializedError,\n assign\n} from '@cloudcare/browser-core'\nimport { Logger } from '../domain/logger'\nimport { buildCommonContext } from '../domain/contexts/commonContext'\nimport { createPreStartStrategy } from './preStartLogs'\nvar LOGS_STORAGE_KEY = 'logs'\nexport function makeLogsPublicApi(startLogsImpl) {\n var globalContextManager = createContextManager(\n CustomerDataType.GlobalContext\n )\n var userContextManager = createContextManager(CustomerDataType.User)\n\n function getCommonContext() {\n return buildCommonContext(globalContextManager, userContextManager)\n }\n var strategy = createPreStartStrategy(\n getCommonContext,\n function (initConfiguration, configuration) {\n if (initConfiguration.storeContextsToLocal) {\n storeContextManager(\n configuration,\n globalContextManager,\n LOGS_STORAGE_KEY,\n CustomerDataType.GlobalContext\n )\n storeContextManager(\n configuration,\n userContextManager,\n LOGS_STORAGE_KEY,\n CustomerDataType.User\n )\n }\n\n var startLogsResult = startLogsImpl(\n initConfiguration,\n configuration,\n getCommonContext\n )\n\n strategy = createPostStartStrategy(initConfiguration, startLogsResult)\n return startLogsResult\n }\n )\n var customLoggers = {}\n\n var mainLogger = new Logger(function () {\n return strategy.handleLog.apply(this, arguments)\n })\n\n return makePublicApi({\n logger: mainLogger,\n\n init: monitor(function (initConfiguration) {\n return strategy.init(initConfiguration)\n }),\n\n getGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n\n setGlobalContext: monitor(function (context) {\n return globalContextManager.setContext(context)\n }),\n\n setGlobalContextProperty: monitor(function (key, value) {\n return globalContextManager.setContextProperty(key, value)\n }),\n\n removeGlobalContextProperty: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n\n clearGlobalContext: monitor(function () {\n return globalContextManager.clearContext()\n }),\n\n createLogger: monitor(function (name, conf) {\n if (typeof conf == 'undefined') {\n conf = {}\n }\n customLoggers[name] = new Logger(\n function () {\n return strategy.handleLog.apply(this, arguments)\n },\n sanitize(name),\n conf.handler,\n conf.level,\n sanitize(conf.context)\n )\n return customLoggers[name]\n }),\n\n getLogger: monitor(function (name) {\n return customLoggers[name]\n }),\n\n getInitConfiguration: monitor(function () {\n return strategy.
|
|
1
|
+
{"version":3,"file":"logsPublicApi.js","names":["_browserCore","require","_logger","_commonContext","_preStartLogs","LOGS_STORAGE_KEY","makeLogsPublicApi","startLogsImpl","globalContextManager","createContextManager","CustomerDataType","GlobalContext","userContextManager","User","getCommonContext","buildCommonContext","strategy","createPreStartStrategy","initConfiguration","configuration","storeContextsToLocal","storeContextManager","startLogsResult","createPostStartStrategy","customLoggers","mainLogger","Logger","handleLog","apply","arguments","makePublicApi","logger","init","monitor","getGlobalContext","getContext","setGlobalContext","context","setContext","setGlobalContextProperty","key","value","setContextProperty","removeGlobalContextProperty","removeContextProperty","clearGlobalContext","clearContext","createLogger","name","conf","sanitize","handler","level","getLogger","getInitConfiguration","deepClone","getInternalContext","startTime","setUser","newUser","checkUser","sanitizeUser","getUser","removeUserProperty","setUserProperty","property","sanitizedProperty","clearUser","assign","displayAlreadyInitializedError"],"sources":["../../src/boot/logsPublicApi.js"],"sourcesContent":["import {\n createContextManager,\n makePublicApi,\n CustomerDataType,\n checkUser,\n sanitizeUser,\n monitor,\n storeContextManager,\n displayAlreadyInitializedError,\n assign,\n deepClone\n} from '@cloudcare/browser-core'\nimport { Logger } from '../domain/logger'\nimport { buildCommonContext } from '../domain/contexts/commonContext'\nimport { createPreStartStrategy } from './preStartLogs'\nvar LOGS_STORAGE_KEY = 'logs'\nexport function makeLogsPublicApi(startLogsImpl) {\n var globalContextManager = createContextManager(\n CustomerDataType.GlobalContext\n )\n var userContextManager = createContextManager(CustomerDataType.User)\n\n function getCommonContext() {\n return buildCommonContext(globalContextManager, userContextManager)\n }\n var strategy = createPreStartStrategy(\n getCommonContext,\n function (initConfiguration, configuration) {\n if (initConfiguration.storeContextsToLocal) {\n storeContextManager(\n configuration,\n globalContextManager,\n LOGS_STORAGE_KEY,\n CustomerDataType.GlobalContext\n )\n storeContextManager(\n configuration,\n userContextManager,\n LOGS_STORAGE_KEY,\n CustomerDataType.User\n )\n }\n\n var startLogsResult = startLogsImpl(\n initConfiguration,\n configuration,\n getCommonContext\n )\n\n strategy = createPostStartStrategy(initConfiguration, startLogsResult)\n return startLogsResult\n }\n )\n var customLoggers = {}\n\n var mainLogger = new Logger(function () {\n return strategy.handleLog.apply(this, arguments)\n })\n\n return makePublicApi({\n logger: mainLogger,\n\n init: monitor(function (initConfiguration) {\n return strategy.init(initConfiguration)\n }),\n\n getGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n\n setGlobalContext: monitor(function (context) {\n return globalContextManager.setContext(context)\n }),\n\n setGlobalContextProperty: monitor(function (key, value) {\n return globalContextManager.setContextProperty(key, value)\n }),\n\n removeGlobalContextProperty: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n\n clearGlobalContext: monitor(function () {\n return globalContextManager.clearContext()\n }),\n\n createLogger: monitor(function (name, conf) {\n if (typeof conf == 'undefined') {\n conf = {}\n }\n customLoggers[name] = new Logger(\n function () {\n return strategy.handleLog.apply(this, arguments)\n },\n sanitize(name),\n conf.handler,\n conf.level,\n sanitize(conf.context)\n )\n return customLoggers[name]\n }),\n\n getLogger: monitor(function (name) {\n return customLoggers[name]\n }),\n\n getInitConfiguration: monitor(function () {\n return deepClone(strategy.initConfiguration)\n }),\n\n getInternalContext: monitor(function (startTime) {\n return strategy.getInternalContext(startTime)\n }),\n setUser: monitor(function (newUser) {\n if (checkUser(newUser)) {\n userContextManager.setContext(sanitizeUser(newUser))\n }\n }),\n getUser: monitor(function () {\n return userContextManager.getContext()\n }),\n removeUserProperty: monitor(function (key) {\n return userContextManager.removeContextProperty(key)\n }),\n setUserProperty: monitor(function (key, property) {\n var newUser = {}\n newUser[key] = property\n var sanitizedProperty = sanitizeUser(newUser)[key]\n userContextManager.setContextProperty(key, sanitizedProperty)\n }),\n clearUser: monitor(function () {\n return userContextManager.clearContext()\n })\n })\n}\nfunction createPostStartStrategy(initConfiguration, startLogsResult) {\n return assign(\n {\n init: function (initConfiguration) {\n displayAlreadyInitializedError('DATAFLUX_LOGS', initConfiguration)\n },\n initConfiguration: initConfiguration\n },\n startLogsResult\n )\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAYA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAII,gBAAgB,GAAG,MAAM;AACtB,SAASC,iBAAiBA,CAACC,aAAa,EAAE;EAC/C,IAAIC,oBAAoB,GAAG,IAAAC,iCAAoB,EAC7CC,6BAAgB,CAACC,aACnB,CAAC;EACD,IAAIC,kBAAkB,GAAG,IAAAH,iCAAoB,EAACC,6BAAgB,CAACG,IAAI,CAAC;EAEpE,SAASC,gBAAgBA,CAAA,EAAG;IAC1B,OAAO,IAAAC,iCAAkB,EAACP,oBAAoB,EAAEI,kBAAkB,CAAC;EACrE;EACA,IAAII,QAAQ,GAAG,IAAAC,oCAAsB,EACnCH,gBAAgB,EAChB,UAAUI,iBAAiB,EAAEC,aAAa,EAAE;IAC1C,IAAID,iBAAiB,CAACE,oBAAoB,EAAE;MAC1C,IAAAC,gCAAmB,EACjBF,aAAa,EACbX,oBAAoB,EACpBH,gBAAgB,EAChBK,6BAAgB,CAACC,aACnB,CAAC;MACD,IAAAU,gCAAmB,EACjBF,aAAa,EACbP,kBAAkB,EAClBP,gBAAgB,EAChBK,6BAAgB,CAACG,IACnB,CAAC;IACH;IAEA,IAAIS,eAAe,GAAGf,aAAa,CACjCW,iBAAiB,EACjBC,aAAa,EACbL,gBACF,CAAC;IAEDE,QAAQ,GAAGO,uBAAuB,CAACL,iBAAiB,EAAEI,eAAe,CAAC;IACtE,OAAOA,eAAe;EACxB,CACF,CAAC;EACD,IAAIE,aAAa,GAAG,CAAC,CAAC;EAEtB,IAAIC,UAAU,GAAG,IAAIC,cAAM,CAAC,YAAY;IACtC,OAAOV,QAAQ,CAACW,SAAS,CAACC,KAAK,CAAC,IAAI,EAAEC,SAAS,CAAC;EAClD,CAAC,CAAC;EAEF,OAAO,IAAAC,0BAAa,EAAC;IACnBC,MAAM,EAAEN,UAAU;IAElBO,IAAI,EAAE,IAAAC,oBAAO,EAAC,UAAUf,iBAAiB,EAAE;MACzC,OAAOF,QAAQ,CAACgB,IAAI,CAACd,iBAAiB,CAAC;IACzC,CAAC,CAAC;IAEFgB,gBAAgB,EAAE,IAAAD,oBAAO,EAAC,YAAY;MACpC,OAAOzB,oBAAoB,CAAC2B,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEFC,gBAAgB,EAAE,IAAAH,oBAAO,EAAC,UAAUI,OAAO,EAAE;MAC3C,OAAO7B,oBAAoB,CAAC8B,UAAU,CAACD,OAAO,CAAC;IACjD,CAAC,CAAC;IAEFE,wBAAwB,EAAE,IAAAN,oBAAO,EAAC,UAAUO,GAAG,EAAEC,KAAK,EAAE;MACtD,OAAOjC,oBAAoB,CAACkC,kBAAkB,CAACF,GAAG,EAAEC,KAAK,CAAC;IAC5D,CAAC,CAAC;IAEFE,2BAA2B,EAAE,IAAAV,oBAAO,EAAC,UAAUO,GAAG,EAAE;MAClD,OAAOhC,oBAAoB,CAACoC,qBAAqB,CAACJ,GAAG,CAAC;IACxD,CAAC,CAAC;IAEFK,kBAAkB,EAAE,IAAAZ,oBAAO,EAAC,YAAY;MACtC,OAAOzB,oBAAoB,CAACsC,YAAY,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEFC,YAAY,EAAE,IAAAd,oBAAO,EAAC,UAAUe,IAAI,EAAEC,IAAI,EAAE;MAC1C,IAAI,OAAOA,IAAI,IAAI,WAAW,EAAE;QAC9BA,IAAI,GAAG,CAAC,CAAC;MACX;MACAzB,aAAa,CAACwB,IAAI,CAAC,GAAG,IAAItB,cAAM,CAC9B,YAAY;QACV,OAAOV,QAAQ,CAACW,SAAS,CAACC,KAAK,CAAC,IAAI,EAAEC,SAAS,CAAC;MAClD,CAAC,EACDqB,QAAQ,CAACF,IAAI,CAAC,EACdC,IAAI,CAACE,OAAO,EACZF,IAAI,CAACG,KAAK,EACVF,QAAQ,CAACD,IAAI,CAACZ,OAAO,CACvB,CAAC;MACD,OAAOb,aAAa,CAACwB,IAAI,CAAC;IAC5B,CAAC,CAAC;IAEFK,SAAS,EAAE,IAAApB,oBAAO,EAAC,UAAUe,IAAI,EAAE;MACjC,OAAOxB,aAAa,CAACwB,IAAI,CAAC;IAC5B,CAAC,CAAC;IAEFM,oBAAoB,EAAE,IAAArB,oBAAO,EAAC,YAAY;MACxC,OAAO,IAAAsB,sBAAS,EAACvC,QAAQ,CAACE,iBAAiB,CAAC;IAC9C,CAAC,CAAC;IAEFsC,kBAAkB,EAAE,IAAAvB,oBAAO,EAAC,UAAUwB,SAAS,EAAE;MAC/C,OAAOzC,QAAQ,CAACwC,kBAAkB,CAACC,SAAS,CAAC;IAC/C,CAAC,CAAC;IACFC,OAAO,EAAE,IAAAzB,oBAAO,EAAC,UAAU0B,OAAO,EAAE;MAClC,IAAI,IAAAC,sBAAS,EAACD,OAAO,CAAC,EAAE;QACtB/C,kBAAkB,CAAC0B,UAAU,CAAC,IAAAuB,yBAAY,EAACF,OAAO,CAAC,CAAC;MACtD;IACF,CAAC,CAAC;IACFG,OAAO,EAAE,IAAA7B,oBAAO,EAAC,YAAY;MAC3B,OAAOrB,kBAAkB,CAACuB,UAAU,CAAC,CAAC;IACxC,CAAC,CAAC;IACF4B,kBAAkB,EAAE,IAAA9B,oBAAO,EAAC,UAAUO,GAAG,EAAE;MACzC,OAAO5B,kBAAkB,CAACgC,qBAAqB,CAACJ,GAAG,CAAC;IACtD,CAAC,CAAC;IACFwB,eAAe,EAAE,IAAA/B,oBAAO,EAAC,UAAUO,GAAG,EAAEyB,QAAQ,EAAE;MAChD,IAAIN,OAAO,GAAG,CAAC,CAAC;MAChBA,OAAO,CAACnB,GAAG,CAAC,GAAGyB,QAAQ;MACvB,IAAIC,iBAAiB,GAAG,IAAAL,yBAAY,EAACF,OAAO,CAAC,CAACnB,GAAG,CAAC;MAClD5B,kBAAkB,CAAC8B,kBAAkB,CAACF,GAAG,EAAE0B,iBAAiB,CAAC;IAC/D,CAAC,CAAC;IACFC,SAAS,EAAE,IAAAlC,oBAAO,EAAC,YAAY;MAC7B,OAAOrB,kBAAkB,CAACkC,YAAY,CAAC,CAAC;IAC1C,CAAC;EACH,CAAC,CAAC;AACJ;AACA,SAASvB,uBAAuBA,CAACL,iBAAiB,EAAEI,eAAe,EAAE;EACnE,OAAO,IAAA8C,mBAAM,EACX;IACEpC,IAAI,EAAE,SAAAA,KAAUd,iBAAiB,EAAE;MACjC,IAAAmD,2CAA8B,EAAC,eAAe,EAAEnD,iBAAiB,CAAC;IACpE,CAAC;IACDA,iBAAiB,EAAEA;EACrB,CAAC,EACDI,eACF,CAAC;AACH","ignoreList":[]}
|
package/esm/boot/buildEnv.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContextManager, makePublicApi, CustomerDataType, checkUser, sanitizeUser, monitor, storeContextManager, displayAlreadyInitializedError, assign } from '@cloudcare/browser-core';
|
|
1
|
+
import { createContextManager, makePublicApi, CustomerDataType, checkUser, sanitizeUser, monitor, storeContextManager, displayAlreadyInitializedError, assign, deepClone } from '@cloudcare/browser-core';
|
|
2
2
|
import { Logger } from '../domain/logger';
|
|
3
3
|
import { buildCommonContext } from '../domain/contexts/commonContext';
|
|
4
4
|
import { createPreStartStrategy } from './preStartLogs';
|
|
@@ -55,7 +55,7 @@ export function makeLogsPublicApi(startLogsImpl) {
|
|
|
55
55
|
return customLoggers[name];
|
|
56
56
|
}),
|
|
57
57
|
getInitConfiguration: monitor(function () {
|
|
58
|
-
return strategy.
|
|
58
|
+
return deepClone(strategy.initConfiguration);
|
|
59
59
|
}),
|
|
60
60
|
getInternalContext: monitor(function (startTime) {
|
|
61
61
|
return strategy.getInternalContext(startTime);
|
|
@@ -87,9 +87,7 @@ function createPostStartStrategy(initConfiguration, startLogsResult) {
|
|
|
87
87
|
init: function init(initConfiguration) {
|
|
88
88
|
displayAlreadyInitializedError('DATAFLUX_LOGS', initConfiguration);
|
|
89
89
|
},
|
|
90
|
-
|
|
91
|
-
return initConfiguration;
|
|
92
|
-
}
|
|
90
|
+
initConfiguration: initConfiguration
|
|
93
91
|
}, startLogsResult);
|
|
94
92
|
}
|
|
95
93
|
//# sourceMappingURL=logsPublicApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logsPublicApi.js","names":["createContextManager","makePublicApi","CustomerDataType","checkUser","sanitizeUser","monitor","storeContextManager","displayAlreadyInitializedError","assign","Logger","buildCommonContext","createPreStartStrategy","LOGS_STORAGE_KEY","makeLogsPublicApi","startLogsImpl","globalContextManager","GlobalContext","userContextManager","User","getCommonContext","strategy","initConfiguration","configuration","storeContextsToLocal","startLogsResult","createPostStartStrategy","customLoggers","mainLogger","handleLog","apply","arguments","logger","init","getGlobalContext","getContext","setGlobalContext","context","setContext","setGlobalContextProperty","key","value","setContextProperty","removeGlobalContextProperty","removeContextProperty","clearGlobalContext","clearContext","createLogger","name","conf","sanitize","handler","level","getLogger","getInitConfiguration","getInternalContext","startTime","setUser","newUser","getUser","removeUserProperty","setUserProperty","property","sanitizedProperty","clearUser"],"sources":["../../src/boot/logsPublicApi.js"],"sourcesContent":["import {\n createContextManager,\n makePublicApi,\n CustomerDataType,\n checkUser,\n sanitizeUser,\n monitor,\n storeContextManager,\n displayAlreadyInitializedError,\n assign\n} from '@cloudcare/browser-core'\nimport { Logger } from '../domain/logger'\nimport { buildCommonContext } from '../domain/contexts/commonContext'\nimport { createPreStartStrategy } from './preStartLogs'\nvar LOGS_STORAGE_KEY = 'logs'\nexport function makeLogsPublicApi(startLogsImpl) {\n var globalContextManager = createContextManager(\n CustomerDataType.GlobalContext\n )\n var userContextManager = createContextManager(CustomerDataType.User)\n\n function getCommonContext() {\n return buildCommonContext(globalContextManager, userContextManager)\n }\n var strategy = createPreStartStrategy(\n getCommonContext,\n function (initConfiguration, configuration) {\n if (initConfiguration.storeContextsToLocal) {\n storeContextManager(\n configuration,\n globalContextManager,\n LOGS_STORAGE_KEY,\n CustomerDataType.GlobalContext\n )\n storeContextManager(\n configuration,\n userContextManager,\n LOGS_STORAGE_KEY,\n CustomerDataType.User\n )\n }\n\n var startLogsResult = startLogsImpl(\n initConfiguration,\n configuration,\n getCommonContext\n )\n\n strategy = createPostStartStrategy(initConfiguration, startLogsResult)\n return startLogsResult\n }\n )\n var customLoggers = {}\n\n var mainLogger = new Logger(function () {\n return strategy.handleLog.apply(this, arguments)\n })\n\n return makePublicApi({\n logger: mainLogger,\n\n init: monitor(function (initConfiguration) {\n return strategy.init(initConfiguration)\n }),\n\n getGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n\n setGlobalContext: monitor(function (context) {\n return globalContextManager.setContext(context)\n }),\n\n setGlobalContextProperty: monitor(function (key, value) {\n return globalContextManager.setContextProperty(key, value)\n }),\n\n removeGlobalContextProperty: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n\n clearGlobalContext: monitor(function () {\n return globalContextManager.clearContext()\n }),\n\n createLogger: monitor(function (name, conf) {\n if (typeof conf == 'undefined') {\n conf = {}\n }\n customLoggers[name] = new Logger(\n function () {\n return strategy.handleLog.apply(this, arguments)\n },\n sanitize(name),\n conf.handler,\n conf.level,\n sanitize(conf.context)\n )\n return customLoggers[name]\n }),\n\n getLogger: monitor(function (name) {\n return customLoggers[name]\n }),\n\n getInitConfiguration: monitor(function () {\n return strategy.
|
|
1
|
+
{"version":3,"file":"logsPublicApi.js","names":["createContextManager","makePublicApi","CustomerDataType","checkUser","sanitizeUser","monitor","storeContextManager","displayAlreadyInitializedError","assign","deepClone","Logger","buildCommonContext","createPreStartStrategy","LOGS_STORAGE_KEY","makeLogsPublicApi","startLogsImpl","globalContextManager","GlobalContext","userContextManager","User","getCommonContext","strategy","initConfiguration","configuration","storeContextsToLocal","startLogsResult","createPostStartStrategy","customLoggers","mainLogger","handleLog","apply","arguments","logger","init","getGlobalContext","getContext","setGlobalContext","context","setContext","setGlobalContextProperty","key","value","setContextProperty","removeGlobalContextProperty","removeContextProperty","clearGlobalContext","clearContext","createLogger","name","conf","sanitize","handler","level","getLogger","getInitConfiguration","getInternalContext","startTime","setUser","newUser","getUser","removeUserProperty","setUserProperty","property","sanitizedProperty","clearUser"],"sources":["../../src/boot/logsPublicApi.js"],"sourcesContent":["import {\n createContextManager,\n makePublicApi,\n CustomerDataType,\n checkUser,\n sanitizeUser,\n monitor,\n storeContextManager,\n displayAlreadyInitializedError,\n assign,\n deepClone\n} from '@cloudcare/browser-core'\nimport { Logger } from '../domain/logger'\nimport { buildCommonContext } from '../domain/contexts/commonContext'\nimport { createPreStartStrategy } from './preStartLogs'\nvar LOGS_STORAGE_KEY = 'logs'\nexport function makeLogsPublicApi(startLogsImpl) {\n var globalContextManager = createContextManager(\n CustomerDataType.GlobalContext\n )\n var userContextManager = createContextManager(CustomerDataType.User)\n\n function getCommonContext() {\n return buildCommonContext(globalContextManager, userContextManager)\n }\n var strategy = createPreStartStrategy(\n getCommonContext,\n function (initConfiguration, configuration) {\n if (initConfiguration.storeContextsToLocal) {\n storeContextManager(\n configuration,\n globalContextManager,\n LOGS_STORAGE_KEY,\n CustomerDataType.GlobalContext\n )\n storeContextManager(\n configuration,\n userContextManager,\n LOGS_STORAGE_KEY,\n CustomerDataType.User\n )\n }\n\n var startLogsResult = startLogsImpl(\n initConfiguration,\n configuration,\n getCommonContext\n )\n\n strategy = createPostStartStrategy(initConfiguration, startLogsResult)\n return startLogsResult\n }\n )\n var customLoggers = {}\n\n var mainLogger = new Logger(function () {\n return strategy.handleLog.apply(this, arguments)\n })\n\n return makePublicApi({\n logger: mainLogger,\n\n init: monitor(function (initConfiguration) {\n return strategy.init(initConfiguration)\n }),\n\n getGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n\n setGlobalContext: monitor(function (context) {\n return globalContextManager.setContext(context)\n }),\n\n setGlobalContextProperty: monitor(function (key, value) {\n return globalContextManager.setContextProperty(key, value)\n }),\n\n removeGlobalContextProperty: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n\n clearGlobalContext: monitor(function () {\n return globalContextManager.clearContext()\n }),\n\n createLogger: monitor(function (name, conf) {\n if (typeof conf == 'undefined') {\n conf = {}\n }\n customLoggers[name] = new Logger(\n function () {\n return strategy.handleLog.apply(this, arguments)\n },\n sanitize(name),\n conf.handler,\n conf.level,\n sanitize(conf.context)\n )\n return customLoggers[name]\n }),\n\n getLogger: monitor(function (name) {\n return customLoggers[name]\n }),\n\n getInitConfiguration: monitor(function () {\n return deepClone(strategy.initConfiguration)\n }),\n\n getInternalContext: monitor(function (startTime) {\n return strategy.getInternalContext(startTime)\n }),\n setUser: monitor(function (newUser) {\n if (checkUser(newUser)) {\n userContextManager.setContext(sanitizeUser(newUser))\n }\n }),\n getUser: monitor(function () {\n return userContextManager.getContext()\n }),\n removeUserProperty: monitor(function (key) {\n return userContextManager.removeContextProperty(key)\n }),\n setUserProperty: monitor(function (key, property) {\n var newUser = {}\n newUser[key] = property\n var sanitizedProperty = sanitizeUser(newUser)[key]\n userContextManager.setContextProperty(key, sanitizedProperty)\n }),\n clearUser: monitor(function () {\n return userContextManager.clearContext()\n })\n })\n}\nfunction createPostStartStrategy(initConfiguration, startLogsResult) {\n return assign(\n {\n init: function (initConfiguration) {\n displayAlreadyInitializedError('DATAFLUX_LOGS', initConfiguration)\n },\n initConfiguration: initConfiguration\n },\n startLogsResult\n )\n}\n"],"mappings":"AAAA,SACEA,oBAAoB,EACpBC,aAAa,EACbC,gBAAgB,EAChBC,SAAS,EACTC,YAAY,EACZC,OAAO,EACPC,mBAAmB,EACnBC,8BAA8B,EAC9BC,MAAM,EACNC,SAAS,QACJ,yBAAyB;AAChC,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,sBAAsB,QAAQ,gBAAgB;AACvD,IAAIC,gBAAgB,GAAG,MAAM;AAC7B,OAAO,SAASC,iBAAiBA,CAACC,aAAa,EAAE;EAC/C,IAAIC,oBAAoB,GAAGhB,oBAAoB,CAC7CE,gBAAgB,CAACe,aACnB,CAAC;EACD,IAAIC,kBAAkB,GAAGlB,oBAAoB,CAACE,gBAAgB,CAACiB,IAAI,CAAC;EAEpE,SAASC,gBAAgBA,CAAA,EAAG;IAC1B,OAAOT,kBAAkB,CAACK,oBAAoB,EAAEE,kBAAkB,CAAC;EACrE;EACA,IAAIG,QAAQ,GAAGT,sBAAsB,CACnCQ,gBAAgB,EAChB,UAAUE,iBAAiB,EAAEC,aAAa,EAAE;IAC1C,IAAID,iBAAiB,CAACE,oBAAoB,EAAE;MAC1ClB,mBAAmB,CACjBiB,aAAa,EACbP,oBAAoB,EACpBH,gBAAgB,EAChBX,gBAAgB,CAACe,aACnB,CAAC;MACDX,mBAAmB,CACjBiB,aAAa,EACbL,kBAAkB,EAClBL,gBAAgB,EAChBX,gBAAgB,CAACiB,IACnB,CAAC;IACH;IAEA,IAAIM,eAAe,GAAGV,aAAa,CACjCO,iBAAiB,EACjBC,aAAa,EACbH,gBACF,CAAC;IAEDC,QAAQ,GAAGK,uBAAuB,CAACJ,iBAAiB,EAAEG,eAAe,CAAC;IACtE,OAAOA,eAAe;EACxB,CACF,CAAC;EACD,IAAIE,aAAa,GAAG,CAAC,CAAC;EAEtB,IAAIC,UAAU,GAAG,IAAIlB,MAAM,CAAC,YAAY;IACtC,OAAOW,QAAQ,CAACQ,SAAS,CAACC,KAAK,CAAC,IAAI,EAAEC,SAAS,CAAC;EAClD,CAAC,CAAC;EAEF,OAAO9B,aAAa,CAAC;IACnB+B,MAAM,EAAEJ,UAAU;IAElBK,IAAI,EAAE5B,OAAO,CAAC,UAAUiB,iBAAiB,EAAE;MACzC,OAAOD,QAAQ,CAACY,IAAI,CAACX,iBAAiB,CAAC;IACzC,CAAC,CAAC;IAEFY,gBAAgB,EAAE7B,OAAO,CAAC,YAAY;MACpC,OAAOW,oBAAoB,CAACmB,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEFC,gBAAgB,EAAE/B,OAAO,CAAC,UAAUgC,OAAO,EAAE;MAC3C,OAAOrB,oBAAoB,CAACsB,UAAU,CAACD,OAAO,CAAC;IACjD,CAAC,CAAC;IAEFE,wBAAwB,EAAElC,OAAO,CAAC,UAAUmC,GAAG,EAAEC,KAAK,EAAE;MACtD,OAAOzB,oBAAoB,CAAC0B,kBAAkB,CAACF,GAAG,EAAEC,KAAK,CAAC;IAC5D,CAAC,CAAC;IAEFE,2BAA2B,EAAEtC,OAAO,CAAC,UAAUmC,GAAG,EAAE;MAClD,OAAOxB,oBAAoB,CAAC4B,qBAAqB,CAACJ,GAAG,CAAC;IACxD,CAAC,CAAC;IAEFK,kBAAkB,EAAExC,OAAO,CAAC,YAAY;MACtC,OAAOW,oBAAoB,CAAC8B,YAAY,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEFC,YAAY,EAAE1C,OAAO,CAAC,UAAU2C,IAAI,EAAEC,IAAI,EAAE;MAC1C,IAAI,OAAOA,IAAI,IAAI,WAAW,EAAE;QAC9BA,IAAI,GAAG,CAAC,CAAC;MACX;MACAtB,aAAa,CAACqB,IAAI,CAAC,GAAG,IAAItC,MAAM,CAC9B,YAAY;QACV,OAAOW,QAAQ,CAACQ,SAAS,CAACC,KAAK,CAAC,IAAI,EAAEC,SAAS,CAAC;MAClD,CAAC,EACDmB,QAAQ,CAACF,IAAI,CAAC,EACdC,IAAI,CAACE,OAAO,EACZF,IAAI,CAACG,KAAK,EACVF,QAAQ,CAACD,IAAI,CAACZ,OAAO,CACvB,CAAC;MACD,OAAOV,aAAa,CAACqB,IAAI,CAAC;IAC5B,CAAC,CAAC;IAEFK,SAAS,EAAEhD,OAAO,CAAC,UAAU2C,IAAI,EAAE;MACjC,OAAOrB,aAAa,CAACqB,IAAI,CAAC;IAC5B,CAAC,CAAC;IAEFM,oBAAoB,EAAEjD,OAAO,CAAC,YAAY;MACxC,OAAOI,SAAS,CAACY,QAAQ,CAACC,iBAAiB,CAAC;IAC9C,CAAC,CAAC;IAEFiC,kBAAkB,EAAElD,OAAO,CAAC,UAAUmD,SAAS,EAAE;MAC/C,OAAOnC,QAAQ,CAACkC,kBAAkB,CAACC,SAAS,CAAC;IAC/C,CAAC,CAAC;IACFC,OAAO,EAAEpD,OAAO,CAAC,UAAUqD,OAAO,EAAE;MAClC,IAAIvD,SAAS,CAACuD,OAAO,CAAC,EAAE;QACtBxC,kBAAkB,CAACoB,UAAU,CAAClC,YAAY,CAACsD,OAAO,CAAC,CAAC;MACtD;IACF,CAAC,CAAC;IACFC,OAAO,EAAEtD,OAAO,CAAC,YAAY;MAC3B,OAAOa,kBAAkB,CAACiB,UAAU,CAAC,CAAC;IACxC,CAAC,CAAC;IACFyB,kBAAkB,EAAEvD,OAAO,CAAC,UAAUmC,GAAG,EAAE;MACzC,OAAOtB,kBAAkB,CAAC0B,qBAAqB,CAACJ,GAAG,CAAC;IACtD,CAAC,CAAC;IACFqB,eAAe,EAAExD,OAAO,CAAC,UAAUmC,GAAG,EAAEsB,QAAQ,EAAE;MAChD,IAAIJ,OAAO,GAAG,CAAC,CAAC;MAChBA,OAAO,CAAClB,GAAG,CAAC,GAAGsB,QAAQ;MACvB,IAAIC,iBAAiB,GAAG3D,YAAY,CAACsD,OAAO,CAAC,CAAClB,GAAG,CAAC;MAClDtB,kBAAkB,CAACwB,kBAAkB,CAACF,GAAG,EAAEuB,iBAAiB,CAAC;IAC/D,CAAC,CAAC;IACFC,SAAS,EAAE3D,OAAO,CAAC,YAAY;MAC7B,OAAOa,kBAAkB,CAAC4B,YAAY,CAAC,CAAC;IAC1C,CAAC;EACH,CAAC,CAAC;AACJ;AACA,SAASpB,uBAAuBA,CAACJ,iBAAiB,EAAEG,eAAe,EAAE;EACnE,OAAOjB,MAAM,CACX;IACEyB,IAAI,EAAE,SAAAA,KAAUX,iBAAiB,EAAE;MACjCf,8BAA8B,CAAC,eAAe,EAAEe,iBAAiB,CAAC;IACpE,CAAC;IACDA,iBAAiB,EAAEA;EACrB,CAAC,EACDG,eACF,CAAC;AACH","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "@cloudcare/browser-logs",
|
|
3
3
|
"main": "cjs/index.js",
|
|
4
4
|
"module": "esm/index.js",
|
|
5
|
-
"version": "3.2.
|
|
5
|
+
"version": "3.2.4",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@cloudcare/browser-core": "3.2.
|
|
8
|
+
"@cloudcare/browser-core": "3.2.4"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "webpack serve --open --mode=development",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"author": "dataflux",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"description": "DataFlux RUM Web 端数据指标监控",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "9ff66fec6a7a5acb1a084562c6ce987b5bdf9e44"
|
|
35
35
|
}
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
monitor,
|
|
8
8
|
storeContextManager,
|
|
9
9
|
displayAlreadyInitializedError,
|
|
10
|
-
assign
|
|
10
|
+
assign,
|
|
11
|
+
deepClone
|
|
11
12
|
} from '@cloudcare/browser-core'
|
|
12
13
|
import { Logger } from '../domain/logger'
|
|
13
14
|
import { buildCommonContext } from '../domain/contexts/commonContext'
|
|
@@ -104,7 +105,7 @@ export function makeLogsPublicApi(startLogsImpl) {
|
|
|
104
105
|
}),
|
|
105
106
|
|
|
106
107
|
getInitConfiguration: monitor(function () {
|
|
107
|
-
return strategy.
|
|
108
|
+
return deepClone(strategy.initConfiguration)
|
|
108
109
|
}),
|
|
109
110
|
|
|
110
111
|
getInternalContext: monitor(function (startTime) {
|
|
@@ -138,9 +139,7 @@ function createPostStartStrategy(initConfiguration, startLogsResult) {
|
|
|
138
139
|
init: function (initConfiguration) {
|
|
139
140
|
displayAlreadyInitializedError('DATAFLUX_LOGS', initConfiguration)
|
|
140
141
|
},
|
|
141
|
-
|
|
142
|
-
return initConfiguration
|
|
143
|
-
}
|
|
142
|
+
initConfiguration: initConfiguration
|
|
144
143
|
},
|
|
145
144
|
startLogsResult
|
|
146
145
|
)
|