PageSourceSearch

https://www.swiss-arc.ch/user/edit/assets/index.d556bd24.js

js swiss-arc.ch collected 2026-10-09 22:42:10 UTC 5,540 bytes, 1 lines download raw bytes

1var F=Object.defineProperty;var M=(t,s,e)=>s in t?F(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var b=(t,s,e)=>(M(t,typeof s!="symbol"?s+"":s,e),e),_=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var S=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)};var E=(t,s,e)=>(_(t,s,"access private method"),e);import{c0 as N,c1 as w,bS as T,l as j,c2 as G,j as p,F as c,U as m,ab as Q}from"./index.3ec72d2e.js";import{H as q}from"./harvest-scheduler.67ce376d.js";import{A as P}from"./aggregate-base.0695104a.js";import{g as U,n as l,a as v,b as H}from"./bel-serializer.402b0b7b.js";import{g as D}from"./info.d5329f52.js";import{M as O}from"./agent-constants.7157acc7.js";import{E as I}from"./event-buffer.9a33d263.js";import"./shared-context.ae8b129f.js";import"./page-visibility.2f62fa7f.js";import"./configure.2bbcfbcf.js";function z(t){return t?.constructor==={}.constructor}function k({body:t,query:s}={}){if(!(!t&&!s))try{const e=X(R(t));if(e)return e;const i=B(C(s));if(i)return i}catch{}}function B(t){if(typeof t!="object"||!t.query||typeof t.query!="string")return;const s=t.query.trim().match(/^(query|mutation|subscription)\s?(\w*)/),e=s?.[1];return e?{operationName:t.operationName||s?.[2]||"Anonymous",operationType:e,operationFramework:"GraphQL"}:void 0}function X(t){if(!t)return;Array.isArray(t)||(t=[t]);const s=[],e=[];for(let i of t){const n=B(i);!n||(s.push(n.operationName),e.push(n.operationType))}if(!!e.length)return{operationName:s.join(","),operationType:e.join(","),operationFramework:"GraphQL"}}function R(t){let s;if(!t||typeof t!="string"&&typeof t!="object"||(typeof t=="string"?s=JSON.parse(t):s=t,!z(s)&&!Array.isArray(s)))return;let e=!1;if(Array.isArray(s)?e=s.some(i=>L(i)):e=L(s),!!e)return s}function C(t){if(!t||typeof t!="string")return;const s=new URLSearchParams(t);return R(Object.fromEntries(s))}function L(t){return!(typeof t!="object"||!t.query||typeof t.query!="string")}class Y{constructor(s,e){this.addString=U(e.agentIdentifier),this.events=s,this.payload="bel.7;";for(let i=0;i<s.length;i++){const n=s[i],r=[l(n.startTime),l(n.endTime-n.startTime),l(0),l(0),this.addString(n.method),l(n.status),this.addString(n.domain),this.addString(n.path),l(n.requestSize),l(n.responseSize),n.type==="fetch"?1:"",this.addString(0),v(n.spanId,this.addString,!0)+v(n.traceId,this.addString,!0)+v(n.spanTimestamp,l,!1)];let d="2,";const a=D(e.agentIdentifier).jsAttributes,f=H({...a||{},...n.gql||{}},this.addString);
1r.unshift(l(f.length)),d+=r.join(","),f&&f.length>0&&(d+=";"+f.join(";")),i+1<s.length&&(d+=";"),this.payload+=d}this.tooBig=this.payload.length*2>O}}var y,x;class J extends P{constructor(e){super(e,N);S(this,y);const i=e.init.ajax.harvestTimeSeconds||10;w(e.runtime.denyList),this.ajaxEvents=new I,this.spaAjaxEvents={};const n=this;this.ee.on("interactionDone",(r,d)=>{!this.spaAjaxEvents[r.id]?.hasData||(d||this.ajaxEvents.merge(this.spaAjaxEvents[r.id]),delete this.spaAjaxEvents[r.id])}),T("returnAjax",r=>this.ajaxEvents.add(r),this.featureName,this.ee),T("xhr",function(){n.storeXhr(...arguments,this)},this.featureName,this.ee),this.waitForFlags([]).then(()=>{new q("events",{onFinished:this.onEventsHarvestFinished.bind(this),getPayload:this.prepareHarvest.bind(this)},this).startTimer(i),this.drain()})}storeXhr(e,i,n,r,d,a){i.time=n;let f;e.cat?f=j([e.status,e.cat]):f=j([e.status,e.host,e.pathname]);const u=G(e),o=this.agentRef.init.feature_flags?.includes("ajax_metrics_deny_list");if((u||!o)&&this.agentRef.sharedAggregator.store("xhr",f,e,i),!u){e.hostname===this.agentRef.info.errorBeacon||this.agentRef.init.proxy?.beacon&&e.hostname===this.agentRef.init.proxy.beacon?(p(m,["Ajax/Events/Excluded/Agent"],void 0,c.metrics,this.ee),o&&p(m,["Ajax/Metrics/Excluded/Agent"],void 0,c.metrics,this.ee)):(p(m,["Ajax/Events/Excluded/App"],void 0,c.metrics,this.ee),o&&p(m,["Ajax/Metrics/Excluded/App"],void 0,c.metrics,this.ee));return}p("bstXhrAgg",["xhr",f,e,i],void 0,c.sessionTrace,this.ee);const h={method:e.method,status:e.status,domain:e.host,path:e.pathname,requestSize:i.txSize,responseSize:i.rxSize,type:d,startTime:n,endTime:r,callbackDuration:i.cbTime};if(a.dt&&(h.spanId=a.dt.spanId,h.traceId=a.dt.traceId,h.spanTimestamp=Math.floor(this.agentRef.runtime.timeKeeper.correctAbsoluteTimestamp(a.dt.timestamp))),h.gql=e.gql=k({body:a.body,query:a.parsedOrigin?.search}),h.gql&&p(m,["Ajax/Events/GraphQL/Bytes-Added",j(h.gql).length],void 0,c.metrics,this.ee),Boolean(Q(this.agentIdentifier)?.features?.[c.softNav]))p("ajax",[h],void 0,c.softNav,this.ee);else if(a.spaNode){const A=a.spaNode.interaction.id;this.spaAjaxEvents[A]??=new I,this.spaAjaxEvents[A].add(h)}else this.ajaxEvents.add(h)}prepareHarvest(e){if(e=e||{},this.ajaxEvents.buffer.length===0)return null;const i=E(this,y,x).call(this,this.ajaxEvents.buffer),n=[];for(let r=0;r<i.length;r++)n.push({body:{e:i[r]}});return e.retry?this.ajaxEvents.hold():this.ajaxEvents.clear(),n}onEventsHarvestFinished(e){e.retry&&this.ajaxEvents.held.hasData?this.ajaxEvents.unhold():this.ajaxEvents.held.clear()}}y=new WeakSet,x=function(e,i){i=i||1;const n=[],r=e.length/i,d=f.call(this,e,r);let a=!1;for(let u=0;u<d.length;u++){const o=d[u];if(o.tooBig){if(o.events.length>1){a=!0;break}}else n.push(o.payload)}return a?E(this,y,x).call(this,e,++i):n;function f(u,o){o=o||u.length;const h=[];for(let g=0,A=u.length;g<A;g+=o)h.push(new Y(u.slice(g,g+o),this));return h}},b(J,"featureName",N);export{J as Aggregate};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.