PageSourceSearch

https://thereserve.sg/_next/static/chunks/5902.0a699e669ca10bf2.js

js thereserve.sg collected 2026-10-02 10:47:28 UTC 13,256 bytes, 5 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5902],{76595:function(e,t){var n,r,o;/** @license
2 * eventsource.js
3 * Available under MIT License (MIT)
4 * https://github.com/Yaffle/EventSource/
5 */!function(i){"use strict";var a=i.setTimeout,s=i.clearTimeout,c=i.XMLHttpRequest,d=i.XDomainRequest,l=i.ActiveXObject,u=i.EventSource,p=i.document,h=i.Promise,f=i.fetch,v=i.Response,y=i.TextDecoder,E=i.TextEncoder,g=i.AbortController;if("undefined"==typeof window||void 0===p||"readyState"in p||null!=p.body||(p.readyState="loading",window.addEventListener("load",function(e){p.readyState="complete"},!1)),null==c&&null!=l&&(c=function(){return new l("Microsoft.XMLHTTP")}),void 0==Object.create&&(Object.create=function(e){function F(){}return F.prototype=e,new F}),Date.now||(Date.now=function(){return new Date().getTime()}),void 0==g){var T=f;f=function(e,t){var n=t.signal;return T(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then(function(e){var t=e.body.getReader();return n._reader=t,n._aborted&&n._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}})},g=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function TextDecoderPolyfill(){this.bitsNeeded=0,this.codePoint=0}TextDecoderPolyfill.prototype.decode=function(e){function valid(e,t,n){if(1===n)return e>=128>>t&&e<<t<=2047;if(2===n)return e>=2048>>t&&e<<t<=55295||e>=57344>>t&&e<<t<=65535;if(3===n)return e>=65536>>t&&e<<t<=1114111;throw Error()}function octetsCount(e,t){if(6===e)return t>>6>15?3:t>31?2:1;if(12===e)return t>15?3:2;if(18===e)return 3;throw Error()}for(var t="",n=this.bitsNeeded,r=this.codePoint,o=0;o<e.length;o+=1){var i=e[o];0!==n&&(i<128||i>191||!valid(r<<6|63&i,n-6,octetsCount(n,r)))&&(n=0,t+=String.fromCharCode(r=65533)),0===n?(i>=0&&i<=127?(n=0,r=i):i>=192&&i<=223?(n=6,r=31&i):i>=224&&i<=239?(n=12,r=15&i):i>=240&&i<=247?(n=18,r=7&i):(n=0,r=65533),0===n||valid(r,n,octetsCount(n,r))||(n=0,r=65533)):(n-=6,r=r<<6|63&i),0===n&&(r<=65535?t+=String.fromCharCode(r):t+=String.fromCharCode(55296+(r-65535-1>>10))+String.fromCharCode(56320+(r-65535-1&1023)))}return this.bitsNeeded=n,this.codePoint=r,t},(void 0==y||void 0==E||!function(){try{return"test"===new y().decode(new E().encode("test"),{stream:!0})}catch(e){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+e)}return!1}())&&(y=TextDecoderPolyfill);var k=function(){};function XHRWrapper(e){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=k,this.onload=k,this.onerror=k,this.onreadystatechange=k,this._contentType="",this._xhr=e,this._sendTimeout=0,this._abort=k}function toLowerCase(e){return e.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+32)})}function HeadersPolyfill(e){for(var t=Object.create(null),n=e.split("\r\n"),r=0;r<n.length;r+=1){var o=n[r].split(": "),i=o.shift(),a=o.join(": ");t[toLowerCase(i)]=a}this._map=t}function XHRTransport(){}function HeadersWrapper(e){this._headers=e}function FetchTransport(){}function EventTarget(){this._listeners=Object.create(null)}function throwError(e){a(function(){throw e},0)}function Event(e){this.type=e,this.target=void 0}function MessageEvent(e,t){Event.call(this,e),this.data=t.data,this.lastEventId=t.lastEventId}function ConnectionEvent(e,t){Event.call(this,e),this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}function ErrorEvent(e,t){Event.call(this,e),this.error=t.error}XHRWrapper.prototype.open=function(e,t){this._abort(!0);var n=this,r=this._xhr,o=1,i=0;this._abort=function(e){0!==n._sendTimeout&&(s(n._sendTimeout),n._sendTimeout=0),1!==o&&2!==o&&3!==o||(o=4,r.onload=k,r.onerror=k,r.onabort=k,r.onprogress=k,r.onreadystatechange=k,r.abort(),0!==i&&(s(i),i=0),e||(n.readyState=4,n.onabort(null),n.onreadystatechange())),o=0};var onStart=function(){if(1===o){var e=0,t="",i=void 0;if("contentType"in r)e=200,t="OK",i=r.contentType;else try{e=r.status,t=r.statusText,i=r.getResponseHeader("Content-Type")}catch(n){e=0,t="",i=void 0}0!==e&&(o=2,n.readyState=2,n.status=e,n.statusText=t,n._contentType=i,n.onreadystatechange())}},onProgress=function(){if(onStart(),2===o||3===o){o=3;var e="";try{e=r.responseText}catch(e){}n.readyState=3,n.responseText=e,n.onprogress()}},onFinish=function(e,t){if((null==t||null==t.preventDefault)&&(t={preventDefault:k}),onProgress(),1===o||2===o||3===o){if(o=4,0!==i&&(s(i),i=0),n.readyState=4,"load"===e)n.onload(t);
5else if("error"===e)n.onerror(t);else if("abort"===e)n.onabort(t);else throw TypeError();n.onreadystatechange()}},onReadyStateChange=function(e){void 0==r||(4===r.readyState?"onload"in r&&"onerror"in r&&"onabort"in r||onFinish(""===r.responseText?"error":"load",e):3===r.readyState?"onprogress"in r||onProgress():2===r.readyState&&onStart())},onTimeout=function(){i=a(function(){onTimeout()},500),3===r.readyState&&onProgress()};"onload"in r&&(r.onload=function(e){onFinish("load",e)}),"onerror"in r&&(r.onerror=function(e){onFinish("error",e)}),"onabort"in r&&(r.onabort=function(e){onFinish("abort",e)}),"onprogress"in r&&(r.onprogress=onProgress),"onreadystatechange"in r&&(r.onreadystatechange=function(e){onReadyStateChange(e)}),("contentType"in r||!("ontimeout"in c.prototype))&&(t+=(-1===t.indexOf("?")?"?":"&")+"padding=true"),r.open(e,t,!0),"readyState"in r&&(i=a(function(){onTimeout()},0))},XHRWrapper.prototype.abort=function(){this._abort(!1)},XHRWrapper.prototype.getResponseHeader=function(e){return this._contentType},XHRWrapper.prototype.setRequestHeader=function(e,t){var n=this._xhr;"setRequestHeader"in n&&n.setRequestHeader(e,t)},XHRWrapper.prototype.getAllResponseHeaders=function(){return void 0!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},XHRWrapper.prototype.send=function(){if((!("ontimeout"in c.prototype)||!("sendAsBinary"in c.prototype)&&!("mozAnon"in c.prototype))&&void 0!=p&&void 0!=p.readyState&&"complete"!==p.readyState){var e=this;e._sendTimeout=a(function(){e._sendTimeout=0,e.send()},4);return}var t=this._xhr;"withCredentials"in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(e){throw e}},HeadersPolyfill.prototype.get=function(e){return this._map[toLowerCase(e)]},null!=c&&null==c.HEADERS_RECEIVED&&(c.HEADERS_RECEIVED=2),XHRTransport.prototype.open=function(e,t,n,r,o,i,a){e.open("GET",o);var s=0;for(var d in e.onprogress=function(){var t=e.responseText.slice(s);s+=t.length,n(t)},e.onerror=function(e){e.preventDefault(),r(Error("NetworkError"))},e.onload=function(){r(null)},e.onabort=function(){r(null)},e.onreadystatechange=function(){if(e.readyState===c.HEADERS_RECEIVED){var n=e.status,r=e.statusText,o=e.getResponseHeader("Content-Type"),i=e.getAllResponseHeaders();t(n,r,o,new HeadersPolyfill(i))}},e.withCredentials=i,a)Object.prototype.hasOwnProperty.call(a,d)&&e.setRequestHeader(d,a[d]);return e.send(),e},HeadersWrapper.prototype.get=function(e){return this._headers.get(e)},FetchTransport.prototype.open=function(e,t,n,r,o,i,a){var s=null,c=new g,d=c.signal,l=new y;return f(o,{headers:a,credentials:i?"include":"same-origin",signal:d,cache:"no-store"}).then(function(e){return s=e.body.getReader(),t(e.status,e.statusText,e.headers.get("Content-Type"),new HeadersWrapper(e.headers)),new h(function(e,t){var readNextChunk=function(){s.read().then(function(t){t.done?e(void 0):(n(l.decode(t.value,{stream:!0})),readNextChunk())}).catch(function(e){t(e)})};readNextChunk()})}).catch(function(e){if("AbortError"!==e.name)return e}).then(function(e){r(e)}),{abort:function(){null!=s&&s.cancel(),c.abort()}}},EventTarget.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(void 0!=t)for(var n=t.length,r=0;r<n;r+=1){var o=t[r];try{"function"==typeof o.handleEvent?o.handleEvent(e):o.call(this,e)}catch(e){throwError(e)}}},EventTarget.prototype.addEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];void 0==r&&(r=[],n[e]=r);for(var o=!1,i=0;i<r.length;i+=1)r[i]===t&&(o=!0);o||r.push(t)},EventTarget.prototype.removeEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];if(void 0!=r){for(var o=[],i=0;i<r.length;i+=1)r[i]!==t&&o.push(r[i]);0===o.length?delete n[e]:n[e]=o}},MessageEvent.prototype=Object.create(Event.prototype),ConnectionEvent.prototype=Object.create(Event.prototype),ErrorEvent.prototype=Object.create(Event.prototype);var w=/^text\/event\-stream(;.*)?$/i,parseDuration=function(e,t){var n=null==e?t:parseInt(e,10);return n!=n&&(n=t),clampDuration(n)},clampDuration=function(e){return Math.min(Math.max(e,1e3),18e6)},fire=function(e,t,n){try{"function"==typeof t&&t.call(e,n)}catch(e){throwError(e)}};function EventSourcePolyfill(e,t){var n,r,o,i,l,u,p,h,f,v,y,E,g,T,S,b,m,_,x,R,P,H,D,O,N,A,X,j,I,W;EventTarget.call(this),t=t||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,n=this,r=e,o=t,r=String(r),i=!!o.withCredentials,l=o.lastEventIdQueryParameterName||"lastEventId",u=clampDuration(1e3),p=parseDuration(o.heartbeatTimeout,45e3),h="",f=u,v=!1,y=0,E=o.headers||{},g=o.Transport,T=C&&void 0==g?void 0:new XHRWrapper(void 0!=g?new g:void 0!=c&&"withCredentials"in c.prototype||void 0==d?new c:new d),S=null!=g&&"string"!=typeof g?new g:void 0==T?new FetchTransport:new XHRTransport,b=void 0,m=0,_=-1,x="",R="",P="",H="",D=0,O=0,N=0,A=function(e,t,r,o){if(0===_){if(200===e&&void 0!=r&&w.test(r)){_=1,v=Date.now(),f=u,n.readyState=1;var i=new ConnectionEvent("open",{status:e,statusText:t,headers:o});n.dispatchEvent(i),fire(n,n.onopen,i)}else{var a="";200!==e?(t&&(t=t.replace(/\s+/g," ")),a="EventSource's response has a status "+e+" "+t+" that is not 200. Aborting the connection."):a="EventSource's response has a Content-Type specifying an unsupported type: "+(void 0==r?"-":r.replace(/\s+/g," "))+". Aborting the connection.",I();var i=new ConnectionEvent("error",{status:e,statusText:t,headers:o});n.dispatchEvent(i),fire(n,n.onerror,i),console.error(a)}}},X=function(e){if(1===_){for(var t=-1,r=0;r<e.length;r+=1){var o=e.charCodeAt(r);(10===o||13===o)&&(t=r)}var i=(-1!==t?H:"")+e.slice(0,t+1);H=(-1===t?H:"")+e.slice(t+1),""!==e&&(v=Date.now(),y+=e.length);for(var c=0;c<i.length;c+=1){var o=i.charCodeAt(c);if(-1===D&&10===o)D=0;else if(-1===D&&(D=0),13===o||10===o){if(0!==D){1===D&&(N=c+1);var d=i.slice(O,N-1),l=i.slice(N+(N<c&&32===i.charCodeAt(N)?1:0),c);"data"===d?x+="\n"+l:"id"===d?R=l:"event"===d?P=l:"retry"===d?f=u=parseDuration(l,u):"heartbeatTimeout"===d&&(p=parseDuration(l,p),0!==m&&(s(m),m=a(function(){W()},p)))}
5if(0===D){if(""!==x){h=R,""===P&&(P="message");var E=new MessageEvent(P,{data:x.slice(1),lastEventId:R});if(n.dispatchEvent(E),"open"===P?fire(n,n.onopen,E):"message"===P?fire(n,n.onmessage,E):"error"===P&&fire(n,n.onerror,E),2===_)return}x="",P=""}D=13===o?-1:0}else 0===D&&(O=c,D=1),1===D?58===o&&(N=c+1,D=2):2===D&&(D=3)}}},j=function(e){if(1===_||0===_){_=-1,0!==m&&(s(m),m=0),m=a(function(){W()},f),f=clampDuration(Math.min(16*u,2*f)),n.readyState=0;var t=new ErrorEvent("error",{error:e});n.dispatchEvent(t),fire(n,n.onerror,t),void 0!=e&&console.error(e)}},I=function(){_=2,void 0!=b&&(b.abort(),b=void 0),0!==m&&(s(m),m=0),n.readyState=2},W=function(){if(m=0,-1!==_){if(v||void 0==b){var e=Math.max((v||Date.now())+p-Date.now(),1);v=!1,m=a(function(){W()},e)}else j(Error("No activity within "+p+" milliseconds. "+(0===_?"No response received.":y+" chars received.")+" Reconnecting.")),void 0!=b&&(b.abort(),b=void 0);return}v=!1,y=0,m=a(function(){W()},p),_=0,x="",P="",R=h,H="",O=0,N=0,D=0;var t=r;if("data:"!==r.slice(0,5)&&"blob:"!==r.slice(0,5)&&""!==h){var o=r.indexOf("?");t=(-1===o?r:r.slice(0,o+1)+r.slice(o+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(e,t){return t===l?"":e}))+((-1===r.indexOf("?")?"?":"&")+l)+"="+encodeURIComponent(h)}var i=n.withCredentials,s={};s.Accept="text/event-stream";var c=n.headers;if(void 0!=c)for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(s[d]=c[d]);try{b=S.open(T,A,X,j,t,i,s)}catch(e){throw I(),e}},n.url=r,n.readyState=0,n.withCredentials=i,n.headers=E,n._close=I,W()}var C=void 0!=f&&void 0!=v&&"body"in v.prototype;EventSourcePolyfill.prototype=Object.create(EventTarget.prototype),EventSourcePolyfill.prototype.CONNECTING=0,EventSourcePolyfill.prototype.OPEN=1,EventSourcePolyfill.prototype.CLOSED=2,EventSourcePolyfill.prototype.close=function(){this._close()},EventSourcePolyfill.CONNECTING=0,EventSourcePolyfill.OPEN=1,EventSourcePolyfill.CLOSED=2,EventSourcePolyfill.prototype.withCredentials=void 0;var S=u;void 0==c||void 0!=u&&"withCredentials"in u.prototype||(S=EventSourcePolyfill),function(i){if("object"==typeof e.exports){var a=i(t);void 0!==a&&(e.exports=a)}else r=[t],void 0!==(o="function"==typeof(n=i)?n.apply(t,r):n)&&(e.exports=o)}(function(e){e.EventSourcePolyfill=EventSourcePolyfill,e.NativeEventSource=u,e.EventSource=S})}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:this:globalThis)},25902:function(e,t,n){e.exports=n(76595).EventSourcePolyfill}}]);

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.