PageSourceSearch

https://trains.fyi/_next/static/chunks/5750-a89889370bc0ae09.js

js trains.fyi collected 2026-09-24 09:54:48 UTC 16,178 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5750],{4402:()=>{},22128:(e,t,r)=>{"use strict";r.d(t,{qk:()=>V,c7:()=>K,KR:()=>j});var n,s,i,o,a=r(36672),l=r(76653),u=r(21610);let h="firebasestorage.googleapis.com",c="storageBucket";class d extends l.g{constructor(e,t,r=0){super(p(e),`Firebase Storage: ${t} (${p(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,d.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return p(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}
2${this.customData.serverResponse}`:this.message=this._baseMessage}}function p(e){return"storage/"+e}function _(){return new d(i.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function g(e){return new d(i.INVALID_ARGUMENT,e)}function f(){return new d(i.APP_DELETED,"The Firebase app was deleted.")}function m(e){throw new d(i.INTERNAL_ERROR,"Internal error: "+e)}(n=i||(i={})).UNKNOWN="unknown",n.OBJECT_NOT_FOUND="object-not-found",n.BUCKET_NOT_FOUND="bucket-not-found",n.PROJECT_NOT_FOUND="project-not-found",n.QUOTA_EXCEEDED="quota-exceeded",n.UNAUTHENTICATED="unauthenticated",n.UNAUTHORIZED="unauthorized",n.UNAUTHORIZED_APP="unauthorized-app",n.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",n.INVALID_CHECKSUM="invalid-checksum",n.CANCELED="canceled",n.INVALID_EVENT_NAME="invalid-event-name",n.INVALID_URL="invalid-url",n.INVALID_DEFAULT_BUCKET="invalid-default-bucket",n.NO_DEFAULT_BUCKET="no-default-bucket",n.CANNOT_SLICE_BLOB="cannot-slice-blob",n.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",n.NO_DOWNLOAD_URL="no-download-url",n.INVALID_ARGUMENT="invalid-argument",n.INVALID_ARGUMENT_COUNT="invalid-argument-count",n.APP_DELETED="app-deleted",n.INVALID_ROOT_OPERATION="invalid-root-operation",n.INVALID_FORMAT="invalid-format",n.INTERNAL_ERROR="internal-error",n.UNSUPPORTED_ENVIRONMENT="unsupported-environment";class R{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let r;try{r=R.makeFromUrl(e,t)}catch(t){return new R(e,"")}if(""===r.path)return r;throw new d(i.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")}static makeFromUrl(e,t){let r=null,n="([A-Za-z0-9.\\-_]+)",s=RegExp("^gs://"+n+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}let a=t.replace(/[.]/g,"\\."),l=RegExp(`^https?://${a}/v[A-Za-z0-9_]+/b/${n}/o(/([^?#]*).*)?$`,"i"),u=t===h?"(?:storage.googleapis.com|storage.cloud.google.com)":t,c=[{regex:s,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:l,indices:{bucket:1,path:3},postModify:o},{regex:RegExp(`^https?://${u}/${n}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let t=0;t<c.length;t++){let n=c[t],s=n.regex.exec(e);if(s){let e=s[n.indices.bucket],t=s[n.indices.path];t||(t=""),r=new R(e,t),n.postModify(r);break}}if(null==r)throw new d(i.INVALID_URL,"Invalid URL '"+e+"'.");return r}}class E{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function k(e){return"string"==typeof e||e instanceof String}function w(e,t,r,n){if(n<t)throw g(`Invalid value for '${e}'. Expected ${t} or greater.`);if(n>r)throw g(`Invalid value for '${e}'. Expected ${r} or less.`)}function b(e,t,r){let n=t;return null==r&&(n=`https://${t}`),`${r}://${n}/v0${e}`}function T(e){let t=encodeURIComponent,r="?";for(let n in e)e.hasOwnProperty(n)&&(r=r+(t(n)+"=")+t(e[n])+"&");return r.slice(0,-1)}(s=o||(o={}))[s.NO_ERROR=0]="NO_ERROR",s[s.NETWORK_ERROR=1]="NETWORK_ERROR",s[s.ABORT=2]="ABORT";class v{constructor(e,t,r,n,s,i,o,a,l,u,h,c=!0,d=!1){this.url_=e,this.method_=t,this.headers_=r,this.body_=n,this.successCodes_=s,this.additionalRetryCodes_=i,this.callback_=o,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=u,this.connectionFactory_=h,this.retry=c,this.isUsingEmulator=d,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((e,t)=>
2{this.resolve_=e,this.reject_=t,this.start_()})}start_(){let e=(e,t)=>{if(t)return void e(!1,new O(!1,null,!0));let r=this.connectionFactory_();this.pendingConnection_=r;let n=e=>{let t=e.loaded,r=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,r)};null!==this.progressCallback_&&r.addUploadProgressListener(n),r.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{var t;let s,i,a;null!==this.progressCallback_&&r.removeUploadProgressListener(n),this.pendingConnection_=null;let l=r.getErrorCode()===o.NO_ERROR,u=r.getStatus();!l||(t=this.additionalRetryCodes_,s=u>=500&&u<600,i=-1!==[408,429].indexOf(u),a=-1!==t.indexOf(u),(s||i||a)&&this.retry)?e(!1,new O(!1,null,r.getErrorCode()===o.ABORT)):e(!0,new O(-1!==this.successCodes_.indexOf(u),r))})},t=(e,t)=>{let r=this.resolve_,n=this.reject_,s=t.connection;if(t.wasSuccessCode)try{let e=this.callback_(s,s.getResponse());void 0!==e?r(e):r()}catch(e){n(e)}else if(null!==s){let e=_();e.serverResponse=s.getErrorText(),n(this.errorCallback_?this.errorCallback_(s,e):e)}else n(t.canceled?this.appDelete_?f():new d(i.CANCELED,"User canceled the upload/download."):new d(i.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))};this.canceled_?t(!1,new O(!1,null,!0)):this.backoffId_=function(e,t,r){let n=1,s=null,i=null,o=!1,a=0,l=!1;function u(...e){l||(l=!0,t.apply(null,e))}function h(t){s=setTimeout(()=>{s=null,e(d,2===a)},t)}function c(){i&&clearTimeout(i)}function d(e,...t){let r;if(l)return void c();if(e||2===a||o){c(),u.call(null,e,...t);return}n<64&&(n*=2),1===a?(a=2,r=0):r=(n+Math.random())*1e3,h(r)}let p=!1;function _(e){p||(p=!0,c(),!l&&(null!==s?(e||(a=2),clearTimeout(s),h(0)):e||(a=1)))}return h(0),i=setTimeout(()=>{o=!0,_(!0)},r),_}(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class O{constructor(e,t,r){this.wasSuccessCode=e,this.connection=t,this.canceled=!!r}}function C(e){var t;let r;try{r=JSON.parse(e)}catch(e){return null}return"object"!=typeof(t=r)||Array.isArray(t)?null:r}function N(e){let t=e.lastIndexOf("/",e.length-2);return -1===t?e:e.slice(t+1)}function U(e,t){return t}class I{constructor(e,t,r,n){this.server=e,this.local=t||e,this.writable=!!r,this.xform=n||U}}let A=null;class x{constructor(e,t,r,n){this.url=e,this.method=t,this.handler=r,this.timeout=n,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}class y{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=o.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=o.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=o.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,t,r,n,s){if(this.sent_)throw m("cannot .send() more than once");if((0,l.zJ)(e)&&r&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==s)for(let e in s)s.hasOwnProperty(e)&&this.xhr_.setRequestHeader(e,s[e].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw m("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw m("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return -1}}getResponse(){if(!this.sent_)throw m("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw m("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class D extends y{initXhr(){this.xhr_.responseType="text"}}function L(){return new D}class P{constructor(e,t){this._service=e,t instanceof R?this._location=t:this._location=R.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new P(e,t)}get root(){let e=new R(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return N(this._location.path)}get storage(){return this._service}get parent(){let e=function(e){if(0===e.length)return null;let t=e.lastIndexOf("/");return -1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;let t=new R(this._location.bucket,e);return new P(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw new d(i.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}}function S(e,t){let r=t?.[c];return null==r?null:R.makeFromBucketSpec(r,e)}class F{constructor(e,t,r,n,s,i=!1){this.app=e,this._authProvider=t,this._appCheckProvider=r,this._url=n,this._firebaseVersion=s,this._isUsingEmulator=i,this._bucket=null,this._host=h,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,null!=n?this._bucket=R.makeFromBucketSpec(n,this._host):this._bucket=S(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=R.makeFromBucketSpec(this._url,e):this._bucket=S(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){w("time",0,1/0,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){w("time",0,1/0,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let e=this._authProvider.getImmediate({optional:!0});if(e){let t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){if((0,a.xZ)(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=this._appCheckProvider.getImmediate({optional:!0});
2return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new P(this,e)}_makeRequest(e,t,r,n,s=!0){if(this._deleted)return new E(f());{let i=function(e,t,r,n,s,i,o=!0,a=!1){let l=T(e.urlParams),u=e.url+l,h=Object.assign({},e.headers);return t&&(h["X-Firebase-GMPID"]=t),null!==r&&r.length>0&&(h.Authorization="Firebase "+r),h["X-Firebase-Storage-Version"]="webjs/"+(i??"AppManager"),null!==n&&(h["X-Firebase-AppCheck"]=n),new v(u,e.method,h,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,s,o,a)}(e,this._appId,r,n,t,this._firebaseVersion,s,this._isUsingEmulator);return this._requests.add(i),i.getPromise().then(()=>this._requests.delete(i),()=>this._requests.delete(i)),i}}async makeRequestWithTokens(e,t){let[r,n]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,r,n).getPromise()}}let M="@firebase/storage",$="0.14.0",B="storage";function V(e){var t,r,n,s;let o,a,u,h,c;return(t=e=(0,l.Ku)(e))._throwIfRoot("getDownloadURL"),r=t.storage,n=t._location,s=function(){if(A)return A;let e=[];e.push(new I("bucket")),e.push(new I("generation")),e.push(new I("metageneration")),e.push(new I("name","fullPath",!0));let t=new I("name");t.xform=function(e,t){return!k(t)||t.length<2?t:N(t)},e.push(t);let r=new I("size");return r.xform=function(e,t){return void 0!==t?Number(t):t},e.push(r),e.push(new I("timeCreated")),e.push(new I("updated")),e.push(new I("md5Hash",null,!0)),e.push(new I("cacheControl",null,!0)),e.push(new I("contentDisposition",null,!0)),e.push(new I("contentEncoding",null,!0)),e.push(new I("contentLanguage",null,!0)),e.push(new I("contentType",null,!0)),e.push(new I("metadata","customMetadata",!0)),A=e}(),o=b(n.fullServerUrl(),r.host,r._protocol),a=r.maxOperationRetryTime,u=new x(o,"GET",function(e,t){let n,i=null===(n=C(t))?null:function(e,t,r){let n={};n.type="file";let s=r.length;for(let e=0;e<s;e++){let s=r[e];n[s.local]=s.xform(n,t[s.server])}return Object.defineProperty(n,"ref",{get:function(){let t=new R(n.bucket,n.fullPath);return e._makeStorageReference(t)}}),n}(r,n,s);if(null===i)throw _();return function(e,t,r,n){let s=C(t);if(null===s||!k(s.downloadTokens))return null;let i=s.downloadTokens;if(0===i.length)return null;let o=encodeURIComponent;return i.split(",").map(t=>{let s=e.bucket,i=e.fullPath;return b("/b/"+o(s)+"/o/"+o(i),r,n)+T({alt:"media",token:t})})[0]}(i,t,r.host,r._protocol)},a),h=function(e,t){var r,s;let o;return 401===e.getStatus()?o=e.getErrorText().includes("Firebase App Check token is invalid")?new d(i.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new d(i.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(r=n.bucket,o=new d(i.QUOTA_EXCEEDED,"Quota for bucket '"+r+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(s=n.path,o=new d(i.UNAUTHORIZED,"User does not have permission to access '"+s+"'.")):o=t,o.status=e.getStatus(),o.serverResponse=t.serverResponse,o},u.errorHandler=function(e,t){var r;let s=h(e,t);return 404===e.getStatus()&&(r=n.path,s=new d(i.OBJECT_NOT_FOUND,"Object '"+r+"' does not exist.")),s.serverResponse=t.serverResponse,s},c=u,t.storage.makeRequestWithTokens(c,L).then(e=>{if(null===e)throw new d(i.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e})}function j(e,t){var r=e=(0,l.Ku)(e);if(!(t&&/^[A-Za-z]+:\/\//.test(t)))return function e(t,r){var n;let s,o,a;if(t instanceof F){if(null==t._bucket)throw new d(i.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+c+"' property when initializing the app?");let n=new P(t,t._bucket);return null!=r?e(n,r):n}if(void 0===r)return t;return n=t._location.path,s=r.split("/").filter(e=>e.length>0).join("/"),o=0===n.length?s:n+"/"+s,a=new R(t._location.bucket,o),new P(t.storage,a)}(r,t);if(r instanceof F)return new P(r,t);throw g("To use ref(service, url), the first argument must be a Storage instance.")}function K(e=(0,a.Sx)(),t){e=(0,l.Ku)(e);let r=(0,a.j6)(e,B).getImmediate({identifier:t}),n=(0,l.yU)("storage");return n&&function(e,t,r,n={}){!function(e,t,r,n={}){e.host=`${t}:${r}`;let s=(0,l.zJ)(t);s&&((0,l.gE)(`https://${e.host}/b`),(0,l.P1)("Storage",!0)),e._isUsingEmulator=!0,e._protocol=s?"https":"http";let{mockUserToken:i}=n;i&&(e._overrideAuthToken="string"==typeof i?i:(0,l.Fy)(i,e.app.options.projectId))}(e,t,r,n)}(r,...n),r}(0,a.om)(new u.uA(B,function(e,{instanceIdentifier:t}){return new F(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),t,a.MF)},"PUBLIC").setMultipleInstances(!0)),(0,a.KO)(M,$,""),(0,a.KO)(M,$,"esm2020")},77808:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(14232);let s=n.forwardRef(function({title:e,titleId:t,...r},s){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},r),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"}))})}}]);

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.