0% found this document useful (0 votes)
39 views

Exercise 14

This document contains code from a JavaScript file. The code defines several constants related to features, events, and other values. It also defines classes and functions for interacting with an API and collecting telemetry data from a web application.

Uploaded by

Tuan Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Exercise 14

This document contains code from a JavaScript file. The code defines several constants related to features, events, and other values. It also defines classes and functions for interacting with an API and collecting telemetry data from a web application.

Uploaded by

Tuan Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

e)n.

call(e,i)&&(r[o]=t(i,e[i]),o+=1);return r}},9226:(e,t,r)=>{"use
strict";r.d(t,{$c:()=>u,Ng:()=>d,RR:()=>c});var
n=r(6562),i=r(9557),o=r(9548),a=r(8610),s={regex:/^file:\/\/(.*)/,replacement:"file://OBFUSCATED"};clas
s c extends i.w{constructor(e){super(e)}shouldObfuscate(){return
u(this.sharedContext.agentIdentifier).length>0}obfuscateString(e){if(!e||"string"!=typeof e)return
e;for(var t=u(this.sharedContext.agentIdentifier),r=e,n=0;n<t.length;n++){var
i=t[n].regex,o=t[n].replacement||"*";r=r.replace(i,o)}return r}}function u(e){var
t=[],r=(0,n.Mt)(e,"obfuscate")||[];return t=t.concat(r),o.T.isFileProtocol()&&t.push(s),t}function
d(e){for(var t=!1,r=!1,n=0;n<e.length;n++){"regex"in e[n]?"string"!=typeof
e[n].regex&&e[n].regex.constructor!==RegExp&&((0,a.Z)('An obfuscation replacement rule contains a
"regex" value with an invalid type (must be a string or RegExp)'),r=!0):((0,a.Z)('An obfuscation
replacement rule was detected missing a "regex" value.'),r=!0);var
i=e[n].replacement;i&&"string"!=typeof i&&((0,a.Z)('An obfuscation replacement rule contains a
"replacement" value with an invalid type (must be a string)'),t=!0)}return!t&&!r}},2650:(e,t,r)=>{"use
strict";r.d(t,{K:()=>a,b:()=>o});var n=r(8544);function i(){return"undefined"==typeof
document||"complete"===document.readyState}function o(e,t){if(i())return
e();(0,n.bP)("load",e,t)}function a(e){if(i())return
e();(0,n.iz)("DOMContentLoaded",e)}},6797:(e,t,r)=>{"use
strict";r.d(t,{EZ:()=>u,Qy:()=>c,ce:()=>o,fP:()=>a,gG:()=>d,mF:()=>s});var n=r(2053),i=r(2374);const
o={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net"};function a(){return
i._A.NREUM||(i._A.NREUM={}),void
0===i._A.newrelic&&(i._A.newrelic=i._A.NREUM),i._A.NREUM}function s(){let e=a();return
e.o||(e.o={ST:i._A.setTimeout,SI:i._A.setImmediate,CT:i._A.clearTimeout,XHR:i._A.XMLHttpRequest,REQ
:i._A.Request,EV:i._A.Event,PR:i._A.Promise,MO:i._A.MutationObserver,FETCH:i._A.fetch}),e}function
c(e,t,r){let i=a();const o=i.initializedAgents||{},s=o[e]||{};return
Object.keys(s).length||(s.initializedAt={ms:(0,n.zO)(),date:new
Date}),i.initializedAgents={...o,[e]:{...s,[r]:t}},i}function u(e,t){a()[e]=t}function d(){return function(){let
e=a();const t=e.info||{};e.info={beacon:o.beacon,errorBeacon:o.errorBeacon,...t}}(),function(){let
e=a();const t=e.init||{};e.init={...t}}(),s(),function(){let e=a();const
t=e.loader_config||{};e.loader_config={...t}}(),a()}},6998:(e,t,r)=>{"use strict";r.d(t,{N:()=>i,e:()=>o});var
n=r(8544);function i(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return
void(0,n.iz)("visibilitychange",r);function
r(){if(t){if("hidden"!=document.visibilityState)return;e()}e(document.visibilityState)}}function
o(){return"hidden"===document.visibilityState?-1:1/0}},6408:(e,t,r)=>{"use strict";r.d(t,{W:()=>i});var
n=r(2374);function i(){return"function"==typeof n._A?.PerformanceObserver}},8675:(e,t,r)=>{"use
strict";r.d(t,{t:()=>n});const n=r(2325).D.ajax},8322:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,t:()=>n});const
n=r(2325).D.jserrors,i="nr@seenError"},6034:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const
n=r(2325).D.metrics},6486:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const
n=r(2325).D.pageAction},2484:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const
n=r(2325).D.pageViewEvent},6382:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});const
n=r(2325).D.pageViewTiming},2628:(e,t,r)=>{"use
strict";r.r(t),r.d(t,{ADD_EVENT_LISTENER:()=>a,BST_RESOURCE:()=>u,BST_TIMER:()=>g,END:()=>l,FEATU
RE_NAME:()=>i,FN_END:()=>p,FN_START:()=>h,ORIG_EVENT:()=>m,PUSH_STATE:()=>v,REMOVE_EVENT_
LISTENER:()=>s,RESOURCE:()=>d,RESOURCE_TIMING_BUFFER_FULL:()=>c,START:()=>f,learResourceTimin
gs:()=>o});var n=r(6562);const
i=r(2325).D.sessionTrace,o="learResourceTimings",a="addEventListener",s="removeEventListener",c="r
esourcetimingbufferfull",u="bstResource",d="resource",f="-start",l="-
end",h="fn"+f,p="fn"+l,g="bstTimer",v="pushState",m=n.Yu.EV},755:(e,t,r)=>{"use
strict";r.r(t),r.d(t,{ADD_EVENT_LISTENER:()=>S,BODY:()=>x,CB_END:()=>O,CB_START:()=>d,END:()=>T,FE
ATURE_NAME:()=>o,FETCH:()=>_,FETCH_BODY:()=>b,FETCH_DONE:()=>m,FETCH_START:()=>v,FN_END:(
)=>u,FN_START:()=>c,INTERACTION:()=>h,INTERACTION_API:()=>f,INTERACTION_EVENTS:()=>a,JSONP_E
ND:()=>y,JSONP_NODE:()=>g,JS_TIME:()=>A,LOCATION:()=>D,MAX_TIMER_BUDGET:()=>s,REMAINING:()
=>l,SPA_NODE:()=>p,START:()=>E,WIN:()=>N,originalSetTimeout:()=>w});var n=r(6562),i=r(2374);const
o=r(2325).D.spa,a=["click","submit","keypress","keydown","keyup","change"],s=999,c="fn-start",u="fn-
end",d="cb-start",f="api-ixn-",l="remaining",h="interaction",p="spaNode",g="jsonpNode",v="fetch-
start",m="fetch-done",b="fetch-body-",y="jsonp-end",w=n.Yu.ST,E="-start",T="-end",x="-
body",O="cb"+T,A="jsTime",_="fetch",S="addEventListener",N=i._A,D=N.location},1509:(e,t,r)=>{"use
strict";r.d(t,{W:()=>s});var n=r(6562),i=r(3752),o=r(2384),a=r(6797);class
s{constructor(e,t,r){this.agentIdentifier=e,this.aggregator=t,this.ee=i.ee.get(e,(0,n.OP)(this.agentIdentifi
er).isolatedBacklog),this.featureName=r,this.blocked=!1,this.checkConfiguration()}checkConfiguration(){
if(!(0,n.lF)(this.agentIdentifier)){let
e={...(0,a.gG)().info?.jsAttributes};try{e={...e,...(0,n.C5)(this.agentIdentifier)?.jsAttributes}}catch(e){}(0,o.j
)(this.agentIdentifier,{...(0,a.gG)(),info:{...(0,a.gG)().info,jsAttributes:e}})}}}},2384:(e,t,r)=>{"use
strict";r.d(t,{j:()=>y});var
n=r(8683),i=r.n(n),o=r(2325),a=r(6562),s=r(9252),c=r(7022),u=r(3752),d=r(2053),f=r(4329),l=r(2650),h=r(
2374);function p(e,t,n){n||(0,f.R)(e,"api"),function(e){function t(t){for(var r=arguments.length,n=new
Array(r>1?r-1:0),i=1;i<r;i++)n[i-
1]=arguments[i];Object.values(e.initializedAgents).forEach((e=>{e.exposed&&e.api[t]&&e.api[t](...n)}))}[
"setErrorHandler","finished","addToTrace","inlineHit","addRelease","addPageAction","setCurrentRoute
Name","setPageViewName","setCustomAttribute","interaction","noticeError"].forEach((r=>{e[r]=functio
n(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t(r,...n)}}))}(t);var
p=u.ee.get(e),g=p.get("tracer"),v="api-",m="api-ixn-";function
b(){}(0,c.D)(["setErrorHandler","finished","addToTrace","inlineHit","addRelease"],(function(e,r){t[r]=w(v,
r,!0,"api")})),t.addPageAction=w(v,"addPageAction",!0,o.D.pageAction),t.setCurrentRouteName=w(v,"ro
uteName",!0,o.D.spa),t.setPageViewName=function(t,r){if("string"==typeof
t)return"/"!==t.charAt(0)&&(t="/"+t),(0,a.OP)(e).customTransaction=(r||"http://custom.transaction")+t,
w(v,"setPageViewName",!0,"api")()},t.setCustomAttribute=function(t,r){const
n=(0,a.C5)(e);return(0,a.CX)(e,{...n,jsAttributes:{...n.jsAttributes,[t]:r}}),w(v,"setCustomAttribute",!0,"api
")()},t.interaction=function(){return(new b).get()};var y=b.prototype={createTracer:function(e,t){var
r={},n=this,i="function"==typeof t;return(0,s.p)("api-ixn-
tracer",[(0,d.zO)(),e,r],n,o.D.spa,p),function(){if(g.emit((i?"":"no-")+"fn-
start",[(0,d.zO)(),n,i],r),i)try{return t.apply(this,arguments)}catch(e){throw g.emit("fn-
err",[arguments,this,"string"==typeof e?new Error(e):e],r),e}finally{g.emit("fn-
end",[(0,d.zO)()],r)}}}};function w(e,t,r,n){return function(){return(0,s.p)("record-
supportability",["API/"+t+"/called"],void
0,o.D.metrics,p),(0,s.p)(e+t,[(0,d.zO)()].concat(i()(arguments)),r?null:this,n,p),r?void 0:this}}function
E(){r.e(692).then(r.bind(r,5692)).then((t=>{let{setAPI:r}=t;r(e),(0,f.L)(e,"api")}))}(0,c.D)("actionText,setNa
me,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),(function(e,t){y[t]=w(m,t,void

You might also like