PageSourceSearch

https://nbmedical.com/chunk-WPPFTPXU.js

js nbmedical.com collected 2026-09-24 20:34:42 UTC 3,157 bytes, 1 lines download raw bytes

1import{e as O,q as A}from"./chunk-2FG6YCVK.js";import{d as C,e as T}from"./chunk-IZQOVDKO.js";import"./chunk-6IZLXKZM.js";var w=function(e){return e===void 0?!1:typeof e=="boolean"?e:e.enabled!==!1},L=function(e){var t;return typeof e=="object"&&e!==null?{allowlist:(t=e.allowlist)!==null&&t!==void 0?t:[],excludelist:e.excludelist||e.blocklist||[]}:{allowlist:[],excludelist:[]}},M=function(e,t,r){if(t.length===0&&r.length===0)return e;var o=t.length>0?t:["/**"];try{var i=JSON.parse(e);return A(i,o,r),JSON.stringify(i)}catch(a){return e}},E=function(e,t,r,o){var i=L(t),a=i.allowlist,u=i.excludelist,n=M(e,a,u);return o(n,r)};var F=10240,R=["image/","audio/","video/","application/octet-stream","font/"];function Y(e){return e?R.some(function(t){return e.toLowerCase().startsWith(t)}):!1}function I(e){if(e!=null){if(typeof e=="string")return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){var t=[];return e.forEach(function(r,o){t.push("".concat(o,"=").concat(typeof r=="string"?r:"[File]"))}),t.join("&")}}}function N(e,t){if(new Blob([e]).size<=t)return{value:e,truncated:!1};for(var r=0,o=Math.min(e.length,t);r<o;){var i=Math.ceil((r+o)/2);new Blob([e.slice(0,i)]).size<=t?r=i:o=i-1}return r>0&&e.charCodeAt(r-1)>=55296&&e.charCodeAt(r-1)<=56319&&(r-=1),{value:e.slice(0,r),truncated:!0}}var X=(function(){function e(){this.fetchObserver=null}return e.prototype.start=function(t,r){this.eventCallback=t,this.networkConfig=r,this.observeFetch()},e.prototype.stop=function(){var t;(t=this.fetchObserver)===null||t===void 0||t.call(this),this.fetchObserver=null,this.eventCallback=void 0,this.networkConfig=void 0},e.prototype.notifyEvent=function(t){var r;(r=this.eventCallback)===null||r===void 0||r.call(this,t)},e.prototype.observeFetch=function(){var t=this,r=O();if(r){var o=r.fetch;o&&(r.fetch=function(i,a){return C(t,void 0,void 0,function(){var u,n,s,h,_,l,f,v,S,g,p,f,y,k=this,m,b;return T(this,function(d){switch(d.label){case 0:u=Date.now(),n={timestamp:u,type:"fetch",method:a?.method||"GET",url:i.toString(),requestHeaders:a?.headers},s=(m=this.networkConfig)===null||m===void 0?void 0:m.body,s&&w(s.request)&&(h=I(a?.body),h!==void 0&&(_=(b=s.maxBodySizeBytes)!==null&&b!==void 0?b:F,n.requestBody=E(h,s.request,_,N).value)),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,o(i,a)];case 2:return l=d.sent(),f=Date.now(),n.status=l.status,n.duration=f-u,v={},l.headers.forEach(function(B,c){v[c]=B}),n.responseHeaders=v,s&&w(s.response)?(S=v["content-type"]||null,Y(S)?(n.responseBodyStatus="skipped_binary",this.notifyEvent(n)):(g=l.clone(),g.text().then(function(B){var c,q=(c=s.maxBodySizeBytes)!==null&&c!==void 0?c:F,x=E(B,s.response,q,N),z=x.value,D=x.truncated;n.responseBody=z,n.responseBodyStatus=D?"truncated":"captured",k.notifyEvent(n)},function(){n.responseBodyStatus="error",k.notifyEvent(n)}))):this.notifyEvent(n),[2,l];case 3:throw p=d.sent(),f=Date.now(),n.duration=f-u,y=p,n.error={name:y.name||"UnknownError",message:y.message||"An unknown error occurred"},this.notifyEvent(n),p;case 4:return[2]}})})},this.fetchObserver=function(){r.fetch=o})}},e})();export{X as NetworkObservers};

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.