mono/reference/tiktok/files/common-monitors.1.16.3.js
2026-01-29 18:35:51 +01:00

2 lines
24 KiB
JavaScript

!function(){"use strict";var m=function(){return(m=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)};function _(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var r,o,i=e.call(n),u=[];try{for(;(void 0===t||0<t--)&&!(r=i.next()).done;)u.push(r.value)}catch(n){o={error:n}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return u}function s(n,t,e){if(e||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||((r=r||Array.prototype.slice.call(t,0,o))[o]=t[o]);return n.concat(r||Array.prototype.slice.call(t))}var g=function(){return{}};function l(n){return n}function r(n){return"object"==typeof n&&null!==n}var e=Object.prototype;function p(n){return"[object Array]"===e.toString.call(n)}function x(n){return"function"==typeof n}function d(n){return"string"==typeof n}function o(n){return"undefined"!=typeof Event&&function(n,t){try{return n instanceof t}catch(n){return}}(n,Event)}var i=function(e,n){return e&&r(e)?n.reduce(function(n,t){return n[t]=e[t],n},{}):e};function h(n){return p(n)&&n.length?function(n){for(var t=[],e=n.length,r=0;r<e;r++){var o=n[r];d(o)?t.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&t.push(o.source)}return new RegExp(t.join("|"),"i")}(n):null}function c(i,u,c,a){return void 0===a&&(a=!0),function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(!i)return g;var e=i[u],r=c.apply(void 0,s([e],_(n),!1)),o=r;return x(o)&&a&&(o=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return r.apply(this,t)}catch(n){return x(e)&&e.apply(this,t)}}),i[u]=o,function(n){n||(o===i[u]?i[u]=e:r=e)}}}function v(r,n){var t=[];try{t=n.reduce(function(n,t){try{var e=t(r);"function"==typeof e&&n.push(e)}catch(n){}return n},[])}catch(n){}return function(n){return v(n,t)}}function u(n){function t(n){c=function(n,t){if(!p(n))return n;var e=n.indexOf(t);if(0<=e){t=n.slice();return t.splice(e,1),t}return n}(c,n),f||s()}var e,r,o,i,u,c=[],a=[],f=!1,s=(r=function(){return c.length},o=function(){f=!0,e&&e[0](),a.forEach(function(n){return n()}),a.length=0,e=void 0},-1===(i=n=void(u=0)===n?3e5:n)?g:function(){if(r())return u&&clearTimeout(u),void(u=0);0===u&&(u=setTimeout(o,i))});return{next:function(n){return v(n,c)},complete:function(n){a.push(n)},attach:function(n,t){e=[n,t]},subscribe:function(n){if(f)throw new Error("Observer is closed");return c.push(n),e&&e[1]&&e[1](n),s(),function(){return t(n)}},unsubscribe:t}}var a=function(n,t,e){e=u(e);try{n(e.next,e.attach),t&&e.complete(t)}catch(n){}return[e.subscribe,e.unsubscribe]},y=function(n,t,e,r){return n.destroyAgent.set(t,e,r)};function b(n,t){return n.initSubject(t)}function w(n,t,e){var t=_(t,2),r=t[0],t=t[1],o=n.privateSubject||{};return o[r]||(o[r]=a(t,function(){o[r]=void 0},e)),o[r]}var E=function(){return Date.now()};function S(){if("object"==typeof window&&r(window))return window}function T(){if("object"==typeof document&&r(document))return document}function j(){if(S()&&r(window.performance))return window.performance}function R(){if(S()&&x(window.PerformanceObserver))return window.PerformanceObserver}function t(){var n=S()&&S()&&window.location;return n?n.href:""}function M(o){return function(e,n){function t(n){var t;n.viewId&&n.viewId!==(null===(t=o.config())||void 0===t?void 0:t.viewId)&&(e(r),r=m(m({},L(o)),k(n)))}var r=L(o);o.on("beforeConfig",t),n(function(){o.off("beforeConfig",t)})}}function f(n){if(n)return n.__SLARDAR_REGISTRY__||(n.__SLARDAR_REGISTRY__={Slardar:{plugins:[],errors:[],subject:{}}}),n.__SLARDAR_REGISTRY__.Slardar}var k=function(n){return{pid:n.pid,view_id:n.viewId,url:t()}},L=function(n){var t=n.config(),t=k(t);return t.context=n.context?n.context.toString():{},t},I=function(e){var n=e&&e.timing||void 0;return[n,function(){return e&&e.now?e.now():(Date.now?Date.now():+new Date)-(n&&n.navigationStart||0)},function(n){var t=(e||{}).getEntriesByType;return x(t)&&t.call(e,n)||[]},function(){var n=(e||{}).clearResourceTimings;x(n)&&n.call(e)},function(n){var t=(e||{}).getEntriesByName;return x(t)&&t.call(e,n)||[]}]},A="<unknown>";function O(n){try{for(var t,e=n,r=[],o=0,i=0,u=" > ".length;e&&o++<5&&!("html"===(t=function(n){var t,e,r,o,i,u=n,c=[];if(!u||!u.tagName)return"";if(c.push(u.tagName.toLowerCase()),u.id)return"#"+u.id;n=u.className;if(n&&d(n))for(e=n.split(/\s+/),i=0;i<e.length;i++)c.push("."+e[i]);var a=["type","name","title","alt"];for(i=0;i<a.length;i++)r=a[i],(o=u.getAttribute(r))&&c.push("["+r+'="'+o+'"]');var f=u,s=1,l=!0;for(;f=f.previousElementSibling;)(null===(t=f.tagName)||void 0===t?void 0:t.toLowerCase())===(null===(t=u.tagName)||void 0===t?void 0:t.toLowerCase())&&(f.className===u.className&&a.every(function(n){return u.getAttribute(n)===(null==f?void 0:f.getAttribute(n))})&&(l=!1),s++);1<s&&!l&&c.push(":nth-of-type("+s+")");return c.join("")}(e))||1<o&&256<=i+r.length*u+t.length);)r.push(t),i+=t.length,e=e.parentNode;return r.reverse().join(" > ")}catch(n){return A}}function N(n,t,e,r){return void 0===r&&(r=!1),n.addEventListener(t,e,r),function(){n.removeEventListener(t,e,r)}}function B(n,t,e,r){return void 0===r&&(r=!1),n.addEventListener(t,e,r),function(){n.removeEventListener(t,e,r)}}var D=function(n,t){return r(n)?m(m({},t),n):!!n&&t},P=["resource"],C=["longtask"],q=function(r,o,i){var u=r&&new r(function(n,r){n.getEntries?n.getEntries().forEach(function(n,t,e){return o(n,t,e,r)}):i&&i()});return[function(n){if(!r||!u)return i&&i();try{u.observe({entryTypes:n})}catch(n){return i&&i()}},function(n,t){if(!r||!u)return i&&i();try{var e={type:n,buffered:!0};void 0!==t&&(e.durationThreshold=t),u.observe(e)}catch(n){return i&&i()}u.observe({type:n,buffered:!1})},function(){return u&&u.disconnect()}]},H=function(n,t,e){n=_(q(n,t),3),t=n[0],n=n[2];return t(e),n},U=function(n,t,e,r){n=_(q(n,t),3),t=n[1],n=n[2];return t(e,r),n},G=["longtask_0",function(n,t){var e=R();e&&t(H(e,n,C))}],X=["resource_0",function(t,n){var e,r,o=R();o&&(r=new RegExp("\\/monitor_web\\/collect|\\/monitor_browser\\/collect\\/batch","i"),e=function(n){return r.test(n)},n(H(o,function(n){e(n.name)||t(n)},P)))}],F="js_error",W="http",Y="resource_error",$="resource",J="performance",V="performance_timing",z="performance_longtask";function K(t,e){return function(n){if(e)try{t(n)}catch(n){}}}function Q(o){function i(t,e){var r;return function(n){u=void 0,n&&r!==n&&e({event:r=n,name:t})}}var u;return[i,function(r){return function(n){var t;try{t=n.target}catch(n){return}var e=t&&t.tagName;e&&("INPUT"===e||"TEXTAREA"===e||t.isContentEditable)&&(u||i("input",r)(n),clearTimeout(u),u=window.setTimeout(function(){u=void 0},o))}}]}var Z="click",nn=["click_0",function(n,t){var e,r=T();r&&(e=B(r,Z,n,!0),t(function(){e()}))}],tn="keypress",en=["keypress_0",function(n,t){var e,r=T();r&&(e=B(r,tn,n,!0),t(function(){e()}))}],rn=function(n,t,e){var r,o=_(t,2),i=o[0],u=o[1],c=e.maxBreadcrumbs,a=e.onAddBreadcrumb,f=e.onMaxBreadcrumbs,t=e.dom,o=_(Q(100),2),e=o[0],o=o[1],a=_(function(e,r,o){void 0===e&&(e=20),void 0===r&&(r=l),void 0===o&&(o=function(n,t){return n.slice(-t)});var i=[];return[function(){return i},function(n){var t=r(n);t&&(n=m(m({},t),{timestamp:n.timestamp||E()}),i=0<=e&&i.length+1>e?o(s(s([],_(i),!1),[n],!1),e):s(s([],_(i),!1),[n],!1))}]}(c,a,f),2),f=a[0],a=a[1];return t&&(r=a,n.push(i[0](e(Z,K(e=function(n){var t;try{t=n.event.target?O(n.event.target):O(n.event)}catch(n){t=A}0!==t.length&&r({type:"dom",category:"ui."+n.name,message:t})},"dom")))),n.push(u[0](o(K(e,"dom"))))),[f,a]},on="breadcrumb",un={maxBreadcrumbs:20,dom:!0};function cn(n){var t;return!function(n){switch(Object.prototype.toString.call(n)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return 1;default:return n instanceof Error}}(n)?(function(n){if(r(n)){if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===e.toString.call(n);n=Object.getPrototypeOf(n);return n===e||null===n}}(n)||o(n)||d(n))&&(t={message:function(n){try{return d(n)?n:JSON.stringify(n)}catch(n){return"[FAILED_TO_STRINGIFY]:"+String(n)}}(n)}):t=i(n,vn),t}function an(n){var t=cn(n.error);if(!t)return t;var e=n.colno,r=n.lineno,n=n.filename;return e&&!t.colno&&(t.colno=String(e)),r&&!t.lineno&&(t.lineno=String(r)),n&&!t.filename&&(t.filename=n),t}function fn(n){var t;try{var e=void 0;if("reason"in n?e=n.reason:"detail"in n&&"reason"in n.detail&&(e=n.detail.reason),e){var r=cn(e);return m(m({},r),{name:null!==(t=r&&r.name)&&void 0!==t?t:"UnhandledRejection"})}}catch(n){}}function sn(n){return"[object ErrorEvent]"===Object.prototype.toString.call(n)?an(n):("[object PromiseRejectionEvent]"===Object.prototype.toString.call(n)?fn:cn)(n)}function ln(n,t){return n&&t&&n===t}function pn(){var r;return function(n){try{if(e=r,!(!(t=n)||!e)&&!(!ln(t.message,e.message)||!ln(t.stack,e.stack)))return void(r=n)}catch(n){!function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=f(S());e&&(e.errors||(e.errors=[]),e.errors.push(n))}(n)}var t,e;return r=n}}var vn=["name","message","stack","filename","lineno","colno"],dn=["EventTarget","Window","Node","ApplicationCache","ChannelMergerNode","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","MessagePort","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],hn=["setTimeout","setInterval","requestAnimationFrame","requestIdleCallback"],mn=["onload","onerror","onprogress","onreadystatechange"],gn="addEventListener",yn=["async_error_0",function(o,n){function u(n,e){if(!x(n))return n;var r={type:"capture-global",data:m({},e)},t=n._w_||(n._w_=function(){try{return(n.handleEvent&&x(n.handleEvent)?n.handleEvent:n).apply(this,[].map.call(arguments,function(n){return u(n,e)}))}catch(n){var t=cn(n);throw t&&o({source:r,error:t}),n}});return t._hook_=!0,t}var t=S(),e=function(){if("function"==typeof XMLHttpRequest&&x(XMLHttpRequest))return XMLHttpRequest}(),r=[];t&&r.push.apply(r,s([],_(hn.filter(function(n){return t[n]}).map(function(o){return c(t,o,function(r){return function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return r&&r.call.apply(r,s([this,u(n,{function:o})],_(t),!1))}},!1)()})),!1)),e&&e.prototype&&r.push(c(e.prototype,"send",function(r){return function(){for(var t=this,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return mn.filter(function(n){return t[n]&&!t[n]._hook_}).forEach(function(n){t[n]=u(t[n],{function:n})}),r.apply(this,n)}},!1)()),dn.forEach(function(i){var n=t&&t[i]&&t[i].prototype;n&&n[gn]&&(r.push(c(n,gn,function(o){return function(n,t,e){try{var r=t.handleEvent;x(r)&&(t.handleEvent=u(r,{function:"handleEvent",target:i}))}catch(n){}return o&&o.call(this,n,u(t,{function:gn,target:i}),e)}},!1)()),r.push(c(n,"removeEventListener",function(r){return function(n,t,e){return null!=t&&t._w_&&r.call(this,n,t._w_,e),r.call(this,n,t,e)}},!1)()))}),n(function(){return r.forEach(function(n){return n()})})}],bn=["err_0",function(n,t){var e,r=S();r&&(e=N(r,"error",n,!0),t(function(){e()}))}],wn=["perr_0",function(n,t){var e,r=S();r&&(e=N(r,"unhandledrejection",n,!0),t(function(){e()}))}],En=function(o,n,t,e){function r(n){var t=n.error,e=n.extra,r=n.react,n=n.source;!(t=s?p(t):t)||!t.message||l&&l.test(t.message)||o({ev_type:F,payload:{error:t,breadcrumbs:[],extra:e,react:r,source:n}})}var i=_(t,3),u=i[0],c=i[1],a=i[2],f=e.ignoreErrors,t=e.onerror,i=e.onunhandledrejection,s=e.dedupe,e=e.captureGlobalAsync,l=h(f),p=pn();return t&&n.push(u[0](function(n){return r({error:an(n),source:{type:"onerror"}})})),i&&n.push(c[0](function(n){return r({error:fn(n),source:{type:"onunhandledrejection"}})})),e&&n.push(a()[0](function(n){r(n)})),function(n,t,e){return r({error:sn(n),extra:t,react:e,source:{type:"manual"}})}},_n="jsError",xn={ignoreErrors:[],onerror:!0,onunhandledrejection:!0,captureGlobalAsync:!1,dedupe:!0};var Sn=function(n){return"hidden"===n.visibilityState},Tn=["hidden_3",function(t,n){var e,r,o,i=T(),u=S();i&&u&&(r=B(i,"visibilitychange",e=function(n){t("pagehide"===n.type||Sn(i))},!0),o=N(u,"pagehide",e,!0),n(function(){r(),o()},function(n){n(Sn(i))}))}],jn=["load_1",function(n,t){var e,r,o,i=S(),u=T();i&&u&&(e=!1,r=g,o=function(){setTimeout(function(){n(),e=!0},0)},"complete"===u.readyState?o():r=N(i,"load",o,!1),t(function(){r()},function(n){e&&n()}))}],Rn=["unload_0",function(n,t){var e,r,o,i,u,c=S();c&&(e=_((r=n,o=!1,[function(n){o||(o=!0,r&&r(n))}]),1)[0],i=function(){e()},u=[],["unload","beforeunload","pagehide"].forEach(function(n){u.push(N(c,n,i,!1))}),t(function(){u.forEach(function(n){return n()})}))}],Mn=["activated_0",function(n,t){var e,r,o,i=T();i&&(e=!1,r=g,o=function(){n(),e=!0},i&&i.prerendering?r=B(i,"prerenderingchange",o,!0):o(),t(function(){r()},function(n){e&&n()}))}],kn=["xmlhttprequest","fetch","beacon"],Ln=function(e,r,n,t){var o,i,u,c,a=_(n,2),n=a[0],f=a[1],s=j();s&&(a=t.ignoreUrls,o=t.slowSessionThreshold,i=t.ignoreTypes,u=h(a),c=function(n,t){void 0===t&&(t=!1),function(n,t){if(p(n)&&0!==n.length)for(var e=0;e<n.length;){if(n[e]===t)return 1;e++}}(i||kn,n.initiatorType)||u&&u.test(n.name)||(n={ev_type:$,payload:n},t&&(n.extra={sample_rate:1}),e(n))},r.push(n[0](function(){var n=_(I(s),3),t=n[0],n=n[2],e=function(){if(!t)return!1;var n=t.loadEventEnd-t.navigationStart;return o<n}();n("resource").forEach(function(n){return c(n,e)}),r.push(f()[0](function(n){c(n)}))})))},In="resource",An={ignoreUrls:[],slowSessionThreshold:4e3};function On(n){return n="link"===(t=n).tagName.toLowerCase()?"href":"src",x(t.getAttribute)?t.getAttribute(n)||"":t[n]||"";var t}function Nn(n,t){var e=n.url,r=n.tagName,o=n.xpath,e=(n=e,(e=T())&&n?((e=e.createElement("a")).href=n,e.href):""),t=t(e)[0];return{type:r.toLowerCase(),url:e,xpath:o,timing:t}}var Bn=function(e,n,t,r){var o=_(t,1)[0],i=S();if(i){var u=r.ignoreUrls,t=r.includeUrls,c=r.dedupe,a=r.gatherPath,f=h(t),s=h(u),l=_(I(j()),5)[4],p=void 0,v=function(n){var t=location&&location.href;t&&n.url===t||f&&!f.test(n.url)||s&&s.test(n.url)||n.url&&(c&&n.url===p||(p=n.url,(n=Nn(n,l))&&e({ev_type:Y,payload:n})))};return n.push(o[0](function(n){n=n||i.event;!n||(n=function(n,t){var e=n.target||n.srcElement;if(e){n=e.tagName;if(n&&d(n))return{url:On(e),tagName:n,xpath:t?O(e):void 0}}}(n,a))&&v(n)})),v}},Dn="resourceError",Pn={includeUrls:[],ignoreUrls:[],dedupe:!0,gatherPath:!1};function Cn(e){return function(n,t){e(Xn(n,t))}}function qn(t){var e=0,r=Un(n,0);return[function(){e=E()},function(){var n;n=E()-e,r.value=n,t&&t(Xn(r)),e=0}]}var Hn={isSupport:!0,isPolyfill:!1,isBounced:!1,isCustom:!1,type:"perf"},Un=function(n,t){return m({name:n,value:t},Hn)},Gn=function(t,e,r){var o=!1;return function(n){r.length&&r.forEach(function(n){n()}),r.length=0,o||(o=!0,e&&e(t(n)))}},Xn=function(n,t){return{ev_type:J,payload:n,overrides:t}},n="spa_load",Fn=function(){var n=j();return(0,_(I(n),3)[2])("navigation")[0]},Wn=function(){var n=Fn();return n&&n.activationStart||0};function Yn(n){var t,e,n=null===(n=null==n?void 0:n.sources)||void 0===n?void 0:n.filter(function(n){return!!n.node});if(n&&n.length){if(1===n.length)return n[0].node;var r,o=0;try{for(var i=function(n){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&"number"==typeof n.length)return{next:function(){return{value:(n=n&&r>=n.length?void 0:n)&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),u=i.next();!u.done;u=i.next()){var c=u.value,a=Jn(c);o<a&&(o=a,r=c.node)}}catch(n){t={error:n}}finally{try{u&&!u.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return r}}function $n(o,n,t,i,e){var r=(e=_(e,3))[0],u=e[1],c=e[2],a=R(),f=j(),s=T(),l=Un(n,0),p=Gn(Xn,t,i);if(!f||!a||!s)return l.isSupport=!1,void p(l);function v(){if(Sn(s))return l.isSupport=!1,void p(l);function t(n){var t=n.startTime,n=Wn();l.value=t<n?0:t-n,p(l)}var n,e,r=(0,_(I(f),5)[4])(o)[0];r?t(r):(i.push(H(a,function(n){n.name===o&&t(n)},[Vn])),r=c(),i.push(r[0](function(){l.isBounced=!0,p(l)})),n=function(n){n&&p(l)},e=u(),i.push(function(){return e[1](n)}),e[0](n))}i.push(function(){return r[1](v)}),r[0](v)}var Jn=function(n){var t,e,r,o,i,u,c,a,f=n.previousRect,s=n.currentRect,l=window.innerWidth*window.devicePixelRatio,p=window.innerHeight*window.devicePixelRatio;return(t=Math.max(s.left,f.left),e=Math.min(s.right,f.right),r=Math.max(s.top,f.top),o=Math.min(s.bottom,f.bottom),r=o-r,r=(t=e-t)<=0||r<=0?0:t*r,Math.min((s.width*s.height+f.width*f.height-r)/(p*l),1))*(i=0===s.x&&0===s.y&&0===s.width&&0===s.height?{x:s.x,y:p}:{x:s.x,y:s.y},u=i.x,c=i.y,a=0===f.x&&0===f.y&&0===f.width&&0===f.height?{x:f.x,y:p}:{x:f.x,y:f.y},i=a.x,a=a.y,c=Math.max(Math.abs(u-i),Math.abs(c-a)),a=Math.max(l,p),Math.min(c/a,1))},Vn="paint",zn=["fp",function(n,t,e){return $n("first-paint","fp",n,t,e)}],Kn=["fcp",function(n,t,e){return $n("first-contentful-paint","fcp",n,t,e)}],Qn=["keydown","click"],Zn=["lcp",function(n,o,t){var t=_(t,3),e=t[0],i=t[1],u=t[2],c=R(),a=T(),f=Un("lcp",0),s=Gn(Xn,n,o);if(!c||!a)return f.isSupport=!1,void s(f);function r(){if(Sn(a))return f.isSupport=!1,void s(f);function t(){setTimeout(function(){s(f)},0)}o.push(U(c,function(n){var t=n.startTime,e=n.element,n=Wn();if(f.value=t<n?0:t-n,e)try{f.extra={element:O(e)}}catch(n){}},"largest-contentful-paint")),Qn.forEach(function(n){o.push(B(a,n,t,!0))});var n=u();function e(n){n&&s(f)}o.push(n[0](function(){f.isBounced=!0,s(f)}));var r=i();o.push(function(){return r[1](e)}),r[0](e)}o.push(function(){return e[1](r)}),e[0](r)}],nt=["cls",function(n,t,e){var r=_(e,4),o=r[1],i=r[2],e=r[3],r=R(),u=Un("cls",0),c=Cn(n);if(!r)return u.isSupport=!1,void c(u);var a,f,s,n=_((f=[],s=void(a=0),[function(){a=0},function(n,t){var e,r;t.hadRecentInput||(e=f[0],r=f[f.length-1],s=a&&t.startTime-r<1e3&&t.startTime-e<5e3?(a+=t.value,f.push(t.startTime),t.value>s.value?t:s):(a=t.value,f=[t.startTime],t),n(a,s))}]),2),l=n[0],n=n[1].bind(null,function(n,t){if(n>u.value){u.value=n;try{var e=Yn(t);u.extra=e?{element:O(e)}:void 0}catch(n){}}});t.push(U(r,n,"layout-shift"));o=o();t.push(o[0](function(n){n&&l()}));e=e();t.push(e[0](function(n){c(u,n),l(),u=Un("cls",0)}));i=i();t.push(i[0](function(){c(u)}))}],tt="event",et=["inp",function(n,t,e){var r=_(e,4),e=r[0],o=r[2],i=r[3],u=R(),c=function(){if(S()&&x(window.PerformanceEventTiming))return window.PerformanceEventTiming}(),r=j(),a=Un("inp",0),f=Cn(n);if(!u||!c||!r)return a.isSupport=!1,void f(a);function s(){g=w(),y=[],b={}}function l(n){var t=y[y.length-1],e=b[n.interactionId],r=!y.length||n.duration>y[0].latency;(e||y.length<10||n.duration>t.latency)&&(e?(e.entries.push(n),e.latency=Math.max(e.latency,n.duration),r&&!e.element&&n.target&&(e.element=O(n.target))):(e={id:n.interactionId,latency:n.duration,entries:[n]},r&&n.target&&(e.element=O(n.target)),b[e.id]=e,y.push(e)),y.sort(function(n,t){return t.latency-n.latency}),y.splice(10).forEach(function(n){delete b[n.id]}))}function p(){var n=(n=Math.min(y.length-1,Math.floor(E()/50)),y[n]);n&&(a.value=n.latency,n.element?a.extra={element:n.element}:(n=n.entries[0].target)&&(a.extra={element:O(n)}))}function v(t){t.interactionId&&l(t),"first-input"!==t.entryType||y.some(function(n){return n.entries.some(function(n){return t.duration===n.duration&&t.startTime===n.startTime})})||l(t)}var d,h,m,g=0,y=[],b={},w=_((h=1/(d=0),m=0,t.push(U(u,function(n){n.interactionId&&(h=Math.min(h,n.interactionId),m=Math.max(m,n.interactionId),d=m?(m-h)/7+1:0)},tt,0)),[function(){return d}]),1)[0],E=function(){return w()-g};t.push(e[0](function(){t.push(U(u,v,tt,40)),"interactionId"in c.prototype&&t.push(U(u,v,"first-input"));var n=i();t.push(n[0](function(n){p(),f(a,n),s(),a=Un("inp",0)}));n=o();t.push(n[0](function(){p(),f(a)})),t.push(s)}))}],rt="longtask",ot=[rt,function(t,n,e){e=_(e,4)[3];n.push(e[0](function(n){t({ev_type:z,payload:{type:"perf",longtasks:[n]}})}))}],it=["timing",function(n,e,t){var r=_(t,3),o=r[0],i=r[1],t=r[2],r=j(),r=_(I(r),3),u=r[0],c=r[1],a=r[2],f=Gn(function(n){var t=a("navigation")[0],e=t&&t.responseStart;return(!e||e<=0||e>c())&&(t=void 0),{ev_type:V,payload:{isBounced:n,timing:u,navigation_timing:t}}},n,e);e.push(t[0](function(){f(!0)}));function s(){function n(){f(!1)}var t=i();e.push(function(){return t[1](n)}),t[0](n)}e.push(function(){return o[1](s)}),o[0](s)}];et[0];var ut,ct,at,ft={entries:[],observer:void 0},st="performance";ct=(null===(ut=function(){if(!document)return null;if(document.currentScript)return document.currentScript;try{throw new Error}catch(n){var t=0,e=/at\s+(.*)\s+\((.*):(\d*):(\d*)\)/i.exec(n.stack),r=e&&e[2]||!1,o=e&&e[3]||0,i=document.location.href.replace(document.location.hash,""),u="",c=document.getElementsByTagName("script");for(r===i&&(e=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(o-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),u=e.replace(o,"$1").trim());t<c.length;t++){if("interactive"===c[t].readyState)return c[t];if(c[t].src===r)return c[t];if(r===i&&c[t].innerHTML&&c[t].innerHTML.trim()===u)return c[t]}return null}}())||void 0===ut?void 0:ut.getAttribute("src"))||"",(at=T())&&ct&&((at=at.createElement("a")).href=ct,"/"!==(ct=at.pathname||"/")[0]&&(ct="/"+ct),at.href,at.protocol.slice(0,-1),at.hostname,at.search.substring(1),at.hash);var lt="1.16.3";function pt(n,t,e){var r;(e=void 0===e?f(S()):e)&&e.plugins&&(r=n,e.plugins.filter(function(n){return n.name===r&&n.version===lt})[0]||e.plugins.push({name:n,version:lt,apply:t}))}pt(on,function(u){u.on("init",function(){var n,t,e,r,o,i=null===(o=u.config())||void 0===o?void 0:o.plugins[on];n=u,(o=D(t=i,un))&&(o=(t=_(rn(i=[],[b(n,nn),b(n,en)],o),2))[0],e=t[1],n.on("report",r=function(n){return n.ev_type===W&&e({type:W,category:n.payload.api,message:"",data:{method:n.payload.request.method,url:n.payload.request.url,status_code:String(n.payload.response.status)},timestamp:n.payload.request.timestamp}),n}),i.push(function(){n.off("report",r)}),y(n,on,F,i),n.provide("getBreadcrumbs",o),n.provide("addBreadcrumb",e))})}),pt(_n,function(t){t.on("init",function(){var n=null===(n=t.config())||void 0===n?void 0:n.plugins[_n];!function(t,n){window.removeEventListener("error",t.pcErr,!0),window.removeEventListener("unhandledrejection",t.pcRej,!0);var e=D(n,xn);e&&(e=En(function(n){t.getBreadcrumbs&&(n.payload.breadcrumbs=t.getBreadcrumbs()),t.report(n)},n=[],[b(t,bn),b(t,wn),function(){return b(t,yn)}],e),y(t,_n,F,n),t.provide("captureException",e))}(t,n)})}),pt(st,function(h){h.on("init",function(){var n=h.pp||ft;null!==(t=n.observer)&&void 0!==t&&t.disconnect();var t,e,r,o,i,u,c,a,f,s,l,p,v,d=(p=st,l={},p=null===(t=(t=h).config())||void 0===t?void 0:t.plugins[p],D(p,l));d&&(e=function(){return b(h,Mn)},r=function(){return b(h,Tn)},o=function(){return b(h,Rn)},i=b(h,jn),u=b(h,G),c=void 0,w(h,["f_view_0",(a=h,function(n,t){var e=L(a);t(g,function(n){e&&n(e)})})],-1)[0](function(n){c=n})(),f=function(n){n=n.ev_type===J&&(n.payload.name===nt[0]||n.payload.name===et[0])||n.ev_type===z?n:m(m({},n),{overrides:c});h.report(n)},s=function(){return w(h,["view_0",M(h)])},[zn,Kn,Zn,et,nt].forEach(function(n){!1!==d[n[0]]&&(n[1](f,n=[],[e(),r,o,s]),y(h,st,J,n))}),[ot,it].forEach(function(n){var t;!1!==d[n[0]]&&(n[1](f,t=[],[i,e,o(),u]),n=n[0]===rt?z:"timing"===n[0]?V:J,y(h,st,n,t))}),l=(p=_(qn(h.report.bind(h)),2))[0],p=p[1],h.provide("performanceInit",l),h.provide("performanceSend",p),n.entries.length=0,v=function(n){var t=m(m(m({},Hn),n),{isCustom:!0}),n=function(n){var t;if("object"==typeof window&&window.__perfsee__){var e={};return null!==(t=Error.captureStackTrace)&&void 0!==t&&t.call(Error,e,n),e.stack}}(v);n&&Object.assign(t,{stacks:n}),h.report(Xn(t))},h.provide("sendCustomPerfMetric",v))})}),pt(Dn,function(r){r.on("init",function(){var n,t,e=null===(t=r.config())||void 0===t?void 0:t.plugins[Dn];n=r,(e=D(t=e,Pn))&&(t=[],e=Bn(n.report.bind(n),t,[b(n,bn)],e),y(n,Dn,Y,t),e&&n.provide("reportResourceError",e))})}),pt(In,function(r){r.on("init",function(){var n,t,e=null===(t=r.config())||void 0===t?void 0:t.plugins[In];n=r,(e=D(t=e,An))&&(t=[],Ln(n.report.bind(n),t,[b(n,jn),function(){return b(n,X)}],e),y(n,In,$,t))})})}();