PageSourceSearch

https://search.worldcat.org/_next/static/chunks/1598-50f525817571c168.js

js worldcat.org collected 2026-09-24 07:38:20 UTC 9,351 bytes, 5 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1598],{4867:()=>{},55192:(e,t,r)=>{"use strict";r.d(t,{v:()=>s});let s=["error","warn","info","http","verbose","debug","silly"].reduce((e,t)=>(e[t]=function(){return console["silly"===t?"debug":t]?console["silly"===t?"debug":t](...arguments):console.log(...arguments)},e),{})},61598:(e,t,r)=>{"use strict";r.d(t,{t:()=>C});var s=r(47175),n=r(16013),o=r(50171),a=r.n(o);let i={timeout:6e3,errorThresholdPercentage:25,resetTimeout:1e4};class c{constructor(){throw Error("Use WSKeyCircuitBreaker.getInstance()")}static getInstance(e,t,r){if(!c.instance){let s=new(a())(e,t);s.on("success",e=>{console.log(JSON.stringify({message:"SUCCESS: The circuit breaker call for WSKey Access Tokens is successful.",source_application:"WCNG"})),r(e)}),s.on("failure",()=>{console.error(JSON.stringify({message:"FAILED: The circuit breaker call for WSKey Access Tokens failed!",source_application:"WCNG"}))}),s.on("timeout",()=>{console.error(JSON.stringify({message:"TIMED_OUT: The circuit breaker call for WSKey Access Tokens timed out!",source_application:"WCNG"}))}),s.on("reject",()=>{console.error(JSON.stringify({message:"REJECTED: The circuit breaker call for WSKey Access Tokens is open. Failing fast!",source_application:"WCNG"}))}),s.on("open",()=>{console.error(JSON.stringify({message:"OPEN: The circuit breaker call for WSKey Access Tokens just opened!",source_application:"WCNG"}))}),s.on("halfOpen",()=>{console.log(JSON.stringify({message:"HALF_OPEN: The circuit breaker call for WSKey Access Tokens is just half opened.",source_application:"WCNG"}))}),s.on("close",()=>{console.log(JSON.stringify({message:"CLOSE: The circuit breaker call for WSKey Access Tokens has closed. Service OK.",source_application:"WCNG"}))}),c.instance=s}return c.instance}}var l=r(55192);r(4867),r(99742),r(63426);var u=r(99742);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}u.env.ACCESS_TOKEN_CACHE_TTL_MS&&parseInt(u.env.ACCESS_TOKEN_CACHE_TTL_MS,10),u.env.ACCESS_TOKEN_CACHE_MAX_SIZE&&parseInt(u.env.ACCESS_TOKEN_CACHE_MAX_SIZE,10);let d=u.env.ACCESS_TOKEN_CACHE_CLEANUP_INTERVAL_MS?parseInt(u.env.ACCESS_TOKEN_CACHE_CLEANUP_INTERVAL_MS,10):3e5,S=new Map;setInterval(()=>{let e=Date.now();for(let[t,r]of S.entries())e>r.expiresAt&&S.delete(t)},d);let g=(e,t,r,n,o,a)=>{l.v.info(JSON.stringify(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){(0,s.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},{request_url:e,request_method:n,source_request_id:o,apiName:t,cmdbName:r,message:a,source_application:"WCNG"})))};async function E(e,t,r,s,o){g(e,t,r,s,o,`Getting new anon WSKEY Token to access API ${t}`);let a={client:{id:u.env.WSKEY_CLIENT_ID,secret:u.env.WSKEY_SECRET},auth:{tokenHost:u.env.WSKEY_TOKEN_HOST,tokenPath:u.env.WSKEY_TOKEN_PATH}},i=new n.ClientCredentials(a),c={scope:[`${u.env.WSKEY_SCOPES}`]},f={};try{f=await i.getToken(c,{Accept:"application/json"}),l.v.info(JSON.stringify({message:"retrieveToken - Got successful Access Token response from WSKEY"}))}catch(e){throw l.v.error(JSON.stringify({message:`retrieveToken - Error while getting Access Token response from WSKEY ${e} for ${o}`})),e}return f}let _=e=>{u.env.API_ACCESS_TOKEN=e?.token?.access_token,u.env.API_ACCESS_TOKEN_EXPIRES=e?.token?.expires_at};async function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=u.env.API_ACCESS_TOKEN_EXPIRES?(new Date(u.env.API_ACCESS_TOKEN_EXPIRES)-new Date)/1e3:0,a=Math.floor(600*Math.random())+600;if(!u.env.API_ACCESS_TOKEN||!u.env.API_ACCESS_TOKEN_EXPIRES||o<a)try{let e=c.getInstance(E,i,_);await e.fire()}catch(o){g(e,t,r,s,n,`Error in getting new anon WSKEY Token for API ${t}`),u.env.API_ACCESS_TOKEN="",u.env.API_ACCESS_TOKEN_EXPIRES="",o&&o.data?l.v.error(`Unable to obtain WSKey token: ${o.data?.payload}`):o&&o.output?l.v.error(`Unable to obtain WSKey token: ${o.output}`):l.v.error("Unable to obtain WSKey token - no http response")}return u.env.API_ACCESS_TOKEN}var O=r(99742);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?h(Object(r),!0).forEach(function(t){(0,s.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let A=function(e,t,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0,u=arguments.length>8?arguments[8]:void 0,f=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0,S={request_url:e,request_method:o,source_request_id:i,apiName:t,cmdbName:s,response_status_text:n.statusText,response_status_code:n.status,request_duration:a,self_request_id:crypto.randomUUID(),source_application:"WCNG",cfConnectingIP:c,xOriginalForwardedForIP:u,xForwardedForIP:f,accessToken:d};if("function"!=typeof setImmediate&&(r.g.setImmediate=e=>setTimeout(e,0)),"GET"===o)if(200!==n.status&&206!==n.status)return l.v.error(JSON.stringify(v(v({},S),{},{message:t?`${t} API call failed or retrieved bad results`:"API call failed or retrieved bad results"})));else return l.v.info(JSON.stringify(v(v({},S),{},{message:t?`${t} API call is Successful`:"API call is Successful"})));if("POST"===o)if(200!==n.status&&201!==n.status)return l.v.error(JSON.stringify(v(v({},S),{},{message:t?`${t} API call failed or retrieved bad results`:"API call failed or retrieved bad results"})));else return l.v.info(JSON.stringify(v(v({},S),{},{message:t?`${t} API call is Successful`:"API call is Successful"})));return 200!==n.status&&204!==n.status?l.v.error(JSON.stringify(v(v({},S),{},{message:t?`${t} API call failed or retrieved bad results`:"API call failed or retrieved bad results"}))):l.v.info(JSON.stringify(v(v({},S),{},{message:t?`${t} API call is Successful`:"API call is Successful"})))};async function C(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,{method:o="GET",headers:a={},timeout:i=1e4,authorize:c=!1,logFirefly:l=!1,data:u={},accessToken:f=null,authorizeUser:d=!1,apiName:S=null,cmdbName:g=null}=r;if("PROD"!==O.env.OCLC_ENV&&s?.headers){let e=s.url||"",t=s.headers["x-return-status-path"]||null;if(e.startsWith(t)){let e=s.headers["x-return-status-time"]||null;e&&await new Promise(t=>setTimeout(t,e));let r=parseInt(s.headers["x-return-status-code"])||null;if(r)return{status:r,statusText:`Error generated by x-return-status-code for ${t}`}}}let E=null,_=null;s&&s.cookies&&(E=s.cookies.wc_source_request_id,_=s.cookies.wc_atoken);let h={Accept:"application/json","Content-Type":"application/json"};l&&(h=v(v({},h),{},{"X-OCLC-DataSource-Debug":!0})),c&&(h=v(v({},h),{},{Authorization:`Bearer ${await p(e,S,g,o,E)}`})),d&&f&&(h=v(v({},h),{},{Authorization:`Bearer ${f}`})),s&&n&&s.headers?.["x-show-target-url"]&&n.setHeader("X-Target-Url",e);let C=null,T=null,y=null;s&&s.headers&&(C=s.headers?.["cf-connecting-ip"],T=s.headers?.["x-original-forwarded-for"],y=s.headers?.["x-forwarded-for"]);let P=null,b=new Date().getTime();try{let r={method:o,headers:new Headers(v(v({},h),a)),timeout:i};t="POST"===o||"PATCH"===o?await fetch(e,v(v({},r),{},{body:JSON.stringify(u)})):await fetch(e,r)}catch(e){if(e?.type==="request-timeout")return{status:504,statusText:e?.message||"Timeout Error Occurred"};P={status:500,statusText:e?.message||"Error Occurred"}}finally{if(P)A(e,S,g,P,o,new Date().getTime()-b,E,C,T,y,_);else A(e,S,g,t,o,new Date().getTime()-b,E,C,T,y,_)}return t.status<300&&function(e){let{logFirefly:t,result:r,url:s}=e;if(!t)return;let n=new Date,o="";o+="\n====================================================================================================\n"+n+"\n\n--------- U R L -----------\n"+s.replace(/&/g,"\n&")+"\n\n----- F I R E   F L Y   H U M A N   R E A D A B L E -----\n",r?.headers?.forEach((e,t)=>{if("x-oclc-datasourceurl"===t){let t=e.split("&"),r=0;t?.forEach(e=>{let s=e.split("="),n=t.length===r+1;0==r++?o+=`${s[0]}=${s[1]}? 
2`:o+=`${s[0]}=${s[1]}${n?"":"&"}  
3`})}}),o+="\n--------------- F I R E   F L Y   U R L -----------------\n",r?.headers?.forEach((e,t)=>{"x-oclc-datasourceurl"===t&&(console.log(decodeURI(e)),o+=`${decodeURI(e)}
4`)}),console.log(`${o}
5`)}({logFirefly:l,result:t,url:e}),t}}}]);

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.