vendor: 15,756 bytes, line 1
1(()=>{"use strict";var e,t={7683:(e,t,r)=>{const n=window.React;var s=r.n(n),o=r(5338);const a=JSON.parse('{"UU":"turingtrader/market-vane"}'),i=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);s<128?t[r++]=s:s<2048?(t[r++]=s>>6|192,t[r++]=63&s|128):55296==(64512&s)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),t[r++]=s>>18|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128,t[r++]=63&s|128):(t[r++]=s>>12|224,t[r++]=s>>6&63|128,t[r++]=63&s|128)}return t},c={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t<e.length;t+=3){const s=e[t],o=t+1<e.length,a=o?e[t+1]:0,i=t+2<e.length,c=i?e[t+2]:0,l=s>>2,u=(3&s)<<4|a>>4;let h=(15&a)<<2|c>>6,d=63&c;i||(d=64,o||(h=64)),n.push(r[l],r[u],r[h],r[d])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(i(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){const s=e[r++];if(s<128)t[n++]=String.fromCharCode(s);else if(s>191&&s<224){const o=e[r++];t[n++]=String.fromCharCode((31&s)<<6|63&o)}else if(s>239&&s<365){const o=((7&s)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else{const o=e[r++],a=e[r++];t[n++]=String.fromCharCode((15&s)<<12|(63&o)<<6|63&a)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t<e.length;){const s=r[e.charAt(t++)],o=t<e.length?r[e.charAt(t)]:0;++t;const a=t<e.length?r[e.charAt(t)]:64;++t;const i=t<e.length?r[e.charAt(t)]:64;if(++t,null==s||null==o||null==a||null==i)throw new l;const c=s<<2|o>>4;if(n.push(c),64!==a){const e=o<<4&240|a>>2;if(n.push(e),64!==i){const e=a<<6&192|i;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class l extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const u=function(e){return function(e){const t=i(e);return c.encodeByteArray(t,!0)}(e).replace(/\./g,"")},h=()=>{try{return function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&function(e){try{return c.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},d=()=>{var e;return null===(e=h())||void 0===e?void 0:e.config};class p{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,r))}}}class f extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,f.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,g.prototype.create)}}class g{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){const r=t[0]||{},n=`${this.service}/${e}`,s=this.errors[e],o=s?function(e,t){return e.replace(m,((e,r)=>{const n=t[r];return null!=n?String(n):`<${r}?>`}))}(s,r):"Error",a=`${this.serviceName}: ${o} (${n}).`;return new f(n,a,r)}}const m=/\{\$([^}]+)}/g;function b(e,t){if(e===t)return!0;const r=Object.keys(e),n=Object.keys(t);for(const s of r){if(!n.includes(s))return!1;const r=e[s],o=t[s];if(_(r)&&_(o)){if(!b(r,o))return!1}else if(r!==o)return!1}for(const e of n)if(!r.includes(e))return!1;return!0}function _(e){return null!==e&&"object"==typeof e}function v(e){return e&&e._delegate?e._delegate:e}class w{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const E="[DEFAULT]";class y{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new p;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const r=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(r)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:r})}catch(e){if(n)return null;throw e}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:E})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(e){}}}}clearInstance(e=E){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e=E){return this.instances.has(e)}getOptions(e=E){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[e,t]of this.instancesDeferred.entries())r===this.normalizeInstanceIdentifier(e)&&t.resolve(n);return n}onInit(e,t){var r;const n=this.normalizeInstanceIdentifier(t),s=null!==(r=this.onInitCallbacks.get(n))&&void 0!==r?r:new Set;s.add(e),this.onInitCallbacks.set(n,s);const o=this.instances.get(n);return o&&e(o,n),()=>{s.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const n of r)try{n(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(n=e,n===E?void 0:n),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(e){}var n;return r||null}normalizeInstanceIdentifier(e=E){return this.component?this.component.multipleInstances?e:E:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class I{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new y(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const O=[];var C;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(C||(C={}));const k={debug:C.DEBUG,verbose:C.VERBOSE,info:C.INFO,warn:C.WARN,error:C.ERROR,silent:C.SILENT},D=C.INFO,R={[C.DEBUG]:"log",[C.VERBOSE]:"log",[C.INFO]:"info",[C.WARN]:"warn",[C.ERROR]:"error"},S=(e,t,...r)=>{if(t<e.logLevel)return;const n=(new Date).toISOString(),s=R[t];if(!s)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[s](`[${n}] ${e.name}:`,...r)},T=(e,t)=>t.some((t=>e instanceof t));let N,A;const L=new WeakMap,P=new WeakMap,x=new WeakMap,B=new WeakMap,U=new WeakMap;let M={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return P.get(e);if("objectStoreNames"===t)return e.objectStoreNames||x.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return $(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function j(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(A||(A=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(F(this),e),$(L.get(this))}:function(...e){return $(t.apply(F(this),e))}:function(e,...r){const n=t.call(F(this),e,...r);return x.set(n,e.sort?e.sort():[e]),$(n)}:(e instanceof IDBTransaction&&function(e){if(P.has(e))return;const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",o),e.removeEventListener("abort",o)},s=()=>{t(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",s),e.addEventListener("error",o),e.addEventListener("abort",o)}));P.set(e,t)}(e),T(e,N||(N=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,M):e);var t}function $(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("success",s),e.removeEventListener("error",o)},s=()=>{t($(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",s),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&L.set(t,e)})).catch((()=>{})),U.set(t,e),t}(e);if(B.has(e))return B.get(e);const t=j(e);return t!==e&&(B.set(e,t),U.set(t,e)),t}const F=e=>U.get(e),H=["get","getKey","getAll","getAllKeys","count"],V=["put","add","delete","clear"],z=new Map;function W(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(z.get(t))return z.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,s=V.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!s&&!H.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,s?"readwrite":"readonly");let a=o.store;return n&&(a=a.index(t.shift())),(await Promise.all([a[r](...t),s&&o.done]))[0]};return z.set(t,o),o}var q;q=M,M={...q,get:(e,t,r)=>W(e,t)||q.get(e,t,r),has:(e,t)=>!!W(e,t)||q.has(e,t)};class G{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const J="@firebase/app",K="0.9.27",X=new class{constructor(e){this.name=e,this._logLevel=D,this._logHandler=S,this._userLogHandler=null,O.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in C))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?k[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,C.DEBUG,...e),this._logHandler(this,C.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,C.VERBOSE,...e),this._logHandler(this,C.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,C.INFO,...e),this._logHandler(this,C.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,C.WARN,...e),this._logHandler(this,C.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,C.ERROR,...e),this._logHandler(this,C.ERROR,...e)}}("@firebase/app"),Z="[DEFAULT]",Y={[J]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},Q=new Map,ee=new Map;function te(e,t){try{e.container.addComponent(t)}catch(r){X.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function re(e){const t=e.name;if(ee.has(t))return X.debug(`There were multiple attempts to register component ${t}.`),!1;ee.set(t,e);for(const t of Q.values())te(t,e);return!0}const ne=new g("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invali
1d-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});class se{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new w("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw ne.create("app-deleted",{appName:this._name})}}function oe(e,t={}){let r=e;"object"!=typeof t&&(t={name:t});const n=Object.assign({name:Z,automaticDataCollectionEnabled:!1},t),s=n.name;if("string"!=typeof s||!s)throw ne.create("bad-app-name",{appName:String(s)});if(r||(r=d()),!r)throw ne.create("no-options");const o=Q.get(s);if(o){if(b(r,o.options)&&b(n,o.config))return o;throw ne.create("duplicate-app",{appName:s})}const a=new I(s);for(const e of ee.values())a.addComponent(e);const i=new se(r,n,a);return Q.set(s,i),i}function ae(e,t,r){var n;let s=null!==(n=Y[e])&&void 0!==n?n:e;r&&(s+=`-${r}`);const o=s.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const e=[`Unable to register library "${s}" with version "${t}":`];return o&&e.push(`library name "${s}" contains illegal characters (whitespace or "/")`),o&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void X.warn(e.join(" "))}re(new w(`${s}-version`,(()=>({library:s,version:t})),"VERSION"))}const ie="firebase-heartbeat-database",ce=1,le="firebase-heartbeat-store";let ue=null;function he(){return ue||(ue=function(e,t,{blocked:r,upgrade:n,blocking:s,terminated:o}={}){const a=indexedDB.open(e,t),i=$(a);return n&&a.addEventListener("upgradeneeded",(e=>{n($(a.result),e.oldVersion,e.newVersion,$(a.transaction),e)})),r&&a.addEventListener("blocked",(e=>r(e.oldVersion,e.newVersion,e))),i.then((e=>{o&&e.addEventListener("close",(()=>o())),s&&e.addEventListener("versionchange",(e=>s(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),i}(ie,ce,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(le)}catch(e){console.warn(e)}}}).catch((e=>{throw ne.create("idb-open",{originalErrorMessage:e.message})}))),ue}async function de(e,t){try{const r=(await he()).transaction(le,"readwrite"),n=r.objectStore(le);await n.put(t,pe(e)),await r.done}catch(e){if(e instanceof f)X.warn(e.message);else{const t=ne.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});X.warn(t.message)}}}function pe(e){return`${e.name}!${e.options.appId}`}class fe{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new me(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){var e,t;const r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),n=ge();if((null!=(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||(this._heartbeatsCache=await this._heartbeatsCachePromise,null!=(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)))&&this._heartbeatsCache.lastSentHeartbeatDate!==n&&!this._heartbeatsCache.heartbeats.some((e=>e.date===n)))return this._heartbeatsCache.heartbeats.push({date:n,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=ge(),{heartbeatsToSend:r,unsentEntries:n}=function(e,t=1024){const r=[];let n=e.slice();for(const s of e){const e=r.find((e=>e.agent===s.agent));if(e){if(e.dates.push(s.date),be(r)>t){e.dates.pop();break}}else if(r.push({agent:s.agent,dates:[s.date]}),be(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),s=u(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=t,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}}function ge(){return(new Date).toISOString().substring(0,10)}class me{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(e){return!1}}()&&new Promise(((e,t)=>{try{let r=!0;
1const n="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(n);s.onsuccess=()=>{s.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},s.onupgradeneeded=()=>{r=!1},s.onerror=()=>{var e;t((null===(e=s.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await he()).transaction(le),r=await t.objectStore(le).get(pe(e));return await t.done,r}catch(e){if(e instanceof f)X.warn(e.message);else{const t=ne.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});X.warn(t.message)}}}(this.app);return(null==e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return de(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const r=await this.read();return de(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function be(e){return u(JSON.stringify({version:2,heartbeats:e})).length}re(new w("platform-logger",(e=>new G(e)),"PRIVATE")),re(new w("heartbeat",(e=>new fe(e)),"PRIVATE")),ae(J,K,""),ae(J,K,"esm2017"),ae("fire-js",""),ae("firebase","10.8.0","app");const _e="firebasestorage.googleapis.com",ve="storageBucket";class we extends f{constructor(e,t,r=0){super(Ie(e),`Firebase Storage: ${t} (${Ie(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,we.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return Ie(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}\n${this.customData.serverResponse}`:this.message=this._baseMessage}}var Ee,ye;function Ie(e){return"storage/"+e}function Oe(){return new we(Ee.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function Ce(e){return new we(Ee.INVALID_ARGUMENT,e)}function ke(){return new we(Ee.APP_DELETED,"The Firebase app was deleted.")}function De(e){throw new we(Ee.INTERNAL_ERROR,"Internal error: "+e)}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(Ee||(Ee={}));class Re{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const 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=Re.makeFromUrl(e,t)}catch(t){return new Re(e,"")}if(""===r.path)return r;throw n=e,new we(Ee.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+n+"'.");var n}static makeFromUrl(e,t){let r=null;const n="([A-Za-z0-9.\\-_]+)",s=new RegExp("^gs://"+n+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}const a=t.replace(/[.]/g,"\\."),i=[{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:new RegExp(`^https?://${a}/v[A-Za-z0-9_]+/b/${n}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp(`^https?://${t===_e?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${n}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let t=0;t<i.length;t++){const n=i[t],s=n.regex.exec(e);if(s){const e=s[n.indices.bucket];let t=s[n.indices.path];t||(t=""),r=new Re(e,t),n.postModify(r);break}}if(null==r)throw function(e){return new we(Ee.INVALID_URL,"Invalid URL '"+e+"'.")}(e);return r}}class Se{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function Te(e){return"string"==typeof e||e instanceof String}function Ne(e,t,r,n){if(n<t)throw Ce(`Invalid value for '${e}'. Expected ${t} or greater.`);if(n>r)throw Ce(`Invalid value for '${e}'. Expected ${r} or less.`)}function Ae(e,t,r){let n=t;return null==r&&(n=`https://${t}`),`${r}://${n}/v0${e}`}function Le(e){const t=encodeURIComponent;let r="?";for(const n in e)e.hasOwnProperty(n)&&(r=r+(t(n)+"=")+t(e[n])+"&");return r=r.slice(0,-1),r}
1!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(ye||(ye={}));class Pe{constructor(e,t,r,n,s,o,a,i,c,l,u,h=!0){this.url_=e,this.method_=t,this.headers_=r,this.body_=n,this.successCodes_=s,this.additionalRetryCodes_=o,this.callback_=a,this.errorCallback_=i,this.timeout_=c,this.progressCallback_=l,this.connectionFactory_=u,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise(((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()}))}start_(){const e=(e,t)=>{const r=this.resolve_,n=this.reject_,s=t.connection;if(t.wasSuccessCode)try{const e=this.callback_(s,s.getResponse());void 0!==e?r(e):r()}catch(e){n(e)}else if(null!==s){const e=Oe();e.serverResponse=s.getErrorText(),this.errorCallback_?n(this.errorCallback_(s,e)):n(e)}else t.canceled?n(this.appDelete_?ke():new we(Ee.CANCELED,"User canceled the upload/download.")):n(new we(Ee.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))};this.canceled_?e(0,new xe(!1,null,!0)):this.backoffId_=function(e,t,r){let n=1,s=null,o=null,a=!1,i=0;function c(){return 2===i}let l=!1;function u(...e){l||(l=!0,t.apply(null,e))}function h(t){s=setTimeout((()=>{s=null,e(p,c())}),t)}function d(){o&&clearTimeout(o)}function p(e,...t){if(l)return void d();if(e)return d(),void u.call(null,e,...t);if(c()||a)return d(),void u.call(null,e,...t);let r;n<64&&(n*=2),1===i?(i=2,r=0):r=1e3*(n+Math.random()),h(r)}let f=!1;function g(e){f||(f=!0,d(),l||(null!==s?(e||(i=2),clearTimeout(s),h(0)):e||(i=1)))}return h(0),o=setTimeout((()=>{a=!0,g(!0)}),r),g}(((e,t)=>{if(t)return void e(!1,new xe(!1,null,!0));const r=this.connectionFactory_();this.pendingConnection_=r;const n=e=>{const 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.body_,this.headers_).then((()=>{null!==this.progressCallback_&&r.removeUploadProgressListener(n),this.pendingConnection_=null;const t=r.getErrorCode()===ye.NO_ERROR,s=r.getStatus();if(!t||function(e,t){const r=e>=500&&e<600,n=-1!==[408,429].indexOf(e),s=-1!==t.indexOf(e);return r||n||s}(s,this.additionalRetryCodes_)&&this.retry){const t=r.getErrorCode()===ye.ABORT;return void e(!1,new xe(!1,null,t))}const o=-1!==this.successCodes_.indexOf(s);e(!0,new xe(o,r))}))}),e,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 xe{constructor(e,t,r){this.wasSuccessCode=e,this.connection=t,this.canceled=!!r}}function Be(e){let t;try{t=JSON.parse(e)}catch(e){return null}return"object"!=typeof(r=t)||Array.isArray(r)?null:t;var r}function Ue(e){const t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function Me(e,t){return t}class je{constructor(e,t,r,n){this.server=e,this.local=t||e,this.writable=!!r,this.xform=n||Me}}let $e=null;function Fe(e,t,r){const n=Be(t);return null===n?null:function(e,t,r){const n={type:"file"},s=r.length;for(let e=0;e<s;e++){const s=r[e];n[s.local]=s.xform(n,t[s.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){const r=e.bucket,n=e.fullPath,s=new Re(r,n);return t._makeStorageReference(s)}})}(n,e),n}(e,n,r)}class He{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=[]}}function Ve(e,t){return function(r,n){const s=Fe(e,n,t);return function(e){if(!e)throw Oe()}(null!==s),function(e,t,r,n){const s=Be(t);if(null===s)return null;if(!Te(s.downloadTokens))return null;const o=s.downloadTokens;if(0===o.length)return null;const a=encodeURIComponent;return o.split(",").map((t=>{const s=e.bucket,o=e.fullPath;return Ae("/b/"+a(s)+"/o/"+a(o),r,n)+Le({alt:"media",token:t})}))[0]}(s,n,e.host,e._protocol)}}function ze(e){const t=function(e){return function(t,r){let n;var s,o;return 401===t.getStatus()?n=t.getErrorText().includes("Firebase App Check token is invali
1d")?new we(Ee.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new we(Ee.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,n=new we(Ee.QUOTA_EXCEEDED,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(s=e.path,n=new we(Ee.UNAUTHORIZED,"User does not have permission to access '"+s+"'.")):n=r,n.status=t.getStatus(),n.serverResponse=r.serverResponse,n}}(e);return function(r,n){let s=t(r,n);var o;return 404===r.getStatus()&&(o=e.path,s=new we(Ee.OBJECT_NOT_FOUND,"Object '"+o+"' does not exist.")),s.serverResponse=n.serverResponse,s}}let We=null;class qe{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=ye.NO_ERROR,this.sendPromise_=new Promise((e=>{this.xhr_.addEventListener("abort",(()=>{this.errorCode_=ye.ABORT,e()})),this.xhr_.addEventListener("error",(()=>{this.errorCode_=ye.NETWORK_ERROR,e()})),this.xhr_.addEventListener("load",(()=>{e()}))}))}send(e,t,r,n){if(this.sent_)throw De("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==n)for(const e in n)n.hasOwnProperty(e)&&this.xhr_.setRequestHeader(e,n[e].toString());return void 0!==r?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw De("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw De("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}}getResponse(){if(!this.sent_)throw De("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw De("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 Ge extends qe{initXhr(){this.xhr_.responseType="text"}}function Je(){return We?We():new Ge}class Ke{constructor(e,t){this._service=e,this._location=t instanceof Re?t:Re.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new Ke(e,t)}get root(){const e=new Re(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Ue(this._location.path)}get storage(){return this._service}get parent(){const e=function(e){if(0===e.length)return null;const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;const t=new Re(this._location.bucket,e);return new Ke(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw function(e){return new we(Ee.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').")}(e)}}function Xe(e){e._throwIfRoot("getDownloadURL");const t=function(e,t,r){const n=Ae(t.fullServerUrl(),e.host,e._protocol),s=e.maxOperationRetryTime,o=new He(n,"GET",Ve(e,r),s);return o.errorHandler=ze(t),o}(e.storage,e._location,function(){if($e)return $e;const e=[];e.push(new je("bucket")),e.push(new je("generation")),e.push(new je("metageneration")),e.push(new je("name","fullPath",!0));const t=new je("name");t.xform=function(e,t){return function(e){return!Te(e)||e.length<2?e:Ue(e)}(t)},e.push(t);const r=new je("size");return r.xform=function(e,t){return void 0!==t?Number(t):t},e.push(r),e.push(new je("timeCreated")),e.push(new je("updated")),e.push(new je("md5Hash",null,!0)),e.push(new je("cacheControl",null,!0)),e.push(new je("contentDisposition",null,!0)),e.push(new je("contentEncoding",null,!0)),e.push(new je("contentLanguage",null,!0)),e.push(new je("contentType",null,!0)),e.push(new je("metadata","customMetadata",!0)),$e=e,$e}());return e.storage.makeRequestWithTokens(t,Je).then((e=>{if(null===e)throw new we(Ee.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e}))}function Ze(e,t){if(e instanceof Qe){const r=e;if(null==r._bucket)throw new we(Ee.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+ve+"' property when initializing the app?");const n=new Ke(r,r._bucket);return null!=t?Ze(n,t):n}return void 0!==t?function(e,t){const r=function(e,t){const r=t.split("/").filter((e=>e.length>0)).join("/");return 0===e.length?r:e+"/"+r}(e._location.path,t),n=new Re(e._location.bucket,r);return new Ke(e.storage,n)}(e,t):e}function Ye(e,t){const r=null==t?void 0:t[ve];return null==r?null:Re.makeFromBucketSpec(r,e)}class Qe{constructor(e,t,r,n,s){this.app=e,this._authProvider=t,this._appCheckProvider=r,this._url=n,this._firebaseVersion=s,this._bucket=null,this._host=_e,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=n?Re.makeFromBucketSpec(n,this._host):Ye(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=Re.makeFromBucketSpec(this._url,e):this._bucket=Ye(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){Ne("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){Ne("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});
1return 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 Ke(this,e)}_makeRequest(e,t,r,n,s=!0){if(this._deleted)return new Se(ke());{const o=function(e,t,r,n,s,o,a=!0){const i=Le(e.urlParams),c=e.url+i,l=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(l,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(l,r),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!=t?t:"AppManager")}(l,o),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(l,n),new Pe(c,e.method,l,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,s,a)}(e,this._appId,r,n,t,this._firebaseVersion,s);return this._requests.add(o),o.getPromise().then((()=>this._requests.delete(o)),(()=>this._requests.delete(o))),o}}async makeRequestWithTokens(e,t){const[r,n]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,r,n).getPromise()}}const et="@firebase/storage",tt="0.12.1",rt="storage";function nt(e){return Xe(e=v(e))}re(new w(rt,(function(e,{instanceIdentifier:t}){const r=e.getProvider("app").getImmediate(),n=e.getProvider("auth-internal"),s=e.getProvider("app-check-internal");return new Qe(r,n,s,t,"10.8.0")}),"PUBLIC").setMultipleInstances(!0)),ae(et,tt,""),ae(et,tt,"esm2017");const st=e=>console.error(`PORTFOLIO-INFO: ${e}`),ot=3e5,at=function(e=function(e=Z){const t=Q.get(e);if(!t&&e===Z&&d())return oe();if(!t)throw ne.create("no-app",{appName:e});return t}(),t){const r=function(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}(e=v(e),rt).getImmediate({identifier:t}),n=(e=>{const t=(e=>{var t,r;return null===(r=null===(t=h())||void 0===t?void 0:t.emulatorHosts)||void 0===r?void 0:r[e]})(e);if(!t)return;const r=t.lastIndexOf(":");if(r<=0||r+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const n=parseInt(t.substring(r+1),10);return"["===t[0]?[t.substring(1,r-1),n]:[t.substring(0,r),n]})("storage");return n&&function(e,t,r,n={}){!function(e,t,r,n={}){e.host=`${t}:${r}`,e._protocol="http";const{mockUserToken:s}=n;s&&(e._overrideAuthToken="string"==typeof s?s:function(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const r=t||"demo-project",n=e.iat||0,s=e.sub||e.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:n,exp:n+3600,auth_time:n,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},e);return[u(JSON.stringify({alg:"none",type:"JWT"})),u(JSON.stringify(o)),""].join(".")}(s,e.app.options.projectId))}(e,t,r,n)}(r,...n),r}(oe({apiKey:"AIzaSyCCP4GVJ7soV4tejbhwsGUL451Nc4h0luY",authDomain:"turingtrader-com.firebaseapp.com",databaseURL:"https://turingtrader-com.firebaseio.com",projectId:"turingtrader-com",storageBucket:"turingtrader-com.appspot.com",messagingSenderId:"334637479764",appId:"1:334637479764:web:ee546e49b936a768847ac1",measurementId:"G-PTQ7VBBP8S"})),it=(e,t)=>{return r=t?`${t}/${e}`:e,function(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof Qe)return new Ke(e,t);throw Ce("To use ref(service, url), the first argument must be a Storage instance.")}return Ze(e,t)}(v(at),r);var r};var ct={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},lt=n.createContext&&n.createContext(ct),ut=["attr","size","title"];function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ht.apply(this,arguments)}function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?dt(Object(r),!0).forEach((function(t){var n,s,o;n=e,s=t,o=r[t],(s=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(s))in n?Object.defineProperty(n,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[s]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ft(e){return e&&e.map(((e,t)=>n.createElement(e.tag,pt({key:t},e.attr),ft(e.child))))}function gt(e){return t=>n.createElement(mt,ht({attr:pt({},e.attr)},t),ft(e.child))}function mt(e){var t=t=>{var r,{attr:s,size:o,title:a}=e,i=function(e,t){if(null==e)return{};var r,n,s=function(e,t){if(null==e)return{};var r,n,s={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}(e,ut),c=o||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",ht({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,s,i,{className:r,style:pt(pt({color:e.color||t.color},t.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&n.createElement("title",null,a),e.children)};return void 0!==lt?n.createElement(lt.Consumer,null,(e=>t(e))):t(ct)}function bt(e){return gt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"},child:[]}]})(e)}function _t(e){return gt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM464 96H345.94c-21.38 0-32.09 25.85-16.97 40.97l32.4 32.4L288 242.75l-73.37-73.37c-12.5-12.5-32.76-12.5-45.25 0l-68.69 68.69c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L192 237.25l73.37 73.37c12.5 12.5 32.76 12.5 45.25 0l96-96 32.4 32.4c15.12 15.12 40.97 4.41 40.97-16.97V112c.01-8.84-7.15-16-15.99-16z"},child:[]}]})(e)}const vt=({value:e,label:t})=>{const r=100*Math.max(0,Math.min(2.9,-.1-e))/2.9,s=100*Math.max(0,Math.min(9.9,e-.1))/9.9;return(0,n.createElement)("div",{className:"gauge-all"},(0,n.createElement)("div",{className:"gauge-graph"},(0,n.createElement)("div",{className:"gauge-neg-group",style:{width:"22.307692307692307%"}},(0,n.createElement)("div",{className:"gauge-neg-back"}),(0,n.createElement)("div",{className:"gauge-neg-border"}),(0,n.createElement)("div",{className:"gauge-neg-value",style:{width:`${r}%`}})),(0,n.createElement)("div",{className:"gauge-zero-group",style:{width:"1.5384615384615385%"}},(0,n.createElement)("div",{className:"gauge-zero-back"}),(0,n.createElement)("div",{className:"gauge-zero-border"})),(0,n.createElement)("div",{className:"gauge-pos-group",style:{width:"76.15384615384616%"}},(0,n.createElement)("div",{className:"gauge-pos-back"}),(0,n.createElement)("div",{className:"gauge-pos-border"}),(0,n.createElement)("div",{className:"gauge-pos-value",style:{width:`${s}%`}}))),(0,n.createElement)("div",{className:"gauge-label"},t))},wt=()=>{const e=(()=>{const[e,t]=((e,t)=>{const r=(0,n.useRef)(e),s=(0,n.useRef)(t),o=(0,n.useMemo)((()=>{const e="num-"+r.current;void 0===window[e]&&(window[e]=0);const t=window[e]+1;window[e]=t;const n=r.current+"#"+t;return r.current,n}),[r]),a=(0,n.useCallback)((()=>{const e=sessionStorage.getItem(r.current);if(e)try{return"undefined"===e?void 0:JSON.parse(e)}catch(t){((...e)=>{console.error("DATA-CACHE:",...e)})(t.message,"parsing",e)}return s.current,s.current}),[r,o,s]),i=(0,n.useMemo)((()=>
1a(!0)),[a]),[c,l]=(0,n.useState)(i),u=(0,n.useCallback)((e=>{const t=a(),n="object"!=typeof e||null===e?e:{...t,...e};return sessionStorage.setItem(r.current,JSON.stringify(n)),!!((e,t)=>{const r=(e,t,n)=>{if(typeof e!=typeof t)return`${n}/type`;if("object"!=typeof e)return e===t?null:`${n}/value`;const s=e?Object.getOwnPropertyNames(e):[],o=t?Object.getOwnPropertyNames(t):[];if(s.length!==o.length){const e=s.length>o.length?s:o,t=s.length<o.length?s:o;for(const r of e)if(!t.includes(r))return`${n}/${r}`}for(const o of s){const s=r(e[o],t?.[o],`${n.length>0?n+"."+o:o}`);if(s)return s}return null};return r(e,t,"")})(c,n)&&(l(n),!0)}),[r,o,a]),h=(0,n.useMemo)((()=>{const e=new BroadcastChannel("tt-data-channel");return e.onmessage=e=>{e.data.key===r.current&&(e.data.emitter,e.data.updateValue,u(e.data.updateValue))},e}),[r,o,a]),d=(0,n.useCallback)((e=>{u(e)&&h.postMessage({key:r.current,updateValue:e,emitter:o})}),[r,o,h,a]);return[c,d]})("marketCharts",{}),r=(0,n.useRef)({}),[s,o]=(0,n.useState)();return(0,n.useEffect)((()=>{const n=(n,s)=>((e,t,r,n,s)=>{const o=`${null!=t?t:"#"}/${e}`;return(void 0===s.current?.[o]||Date.now()-s.current>ot)&&(s.current[o]=Date.now(),nt(it(e,t)).then(fetch).then((e=>e.status>=200&&e.status<300?Promise.resolve(e):Promise.reject(new Error(e.statusText)))).then((t=>e.endsWith(".json")?t.json():t.text())).then((e=>n({...r,[o]:e}))).catch((r=>st(`loadFile error: ${r} ${e} @ ${t}`)))),r?.[o]})(n,s,e,t,r),s=(n,s)=>((e,t,r,n,s)=>{const o=`${null!=t?t:"#"}/${e}`;return(void 0===s.current?.[o]||Date.now()-s.current>ot)&&(s.current[o]=Date.now(),nt(it(e,t)).then((e=>n({...r,[o]:e}))).catch((r=>st(`fileUrl error: ${r} ${e} @ ${t}`)))),r?.[o]})(n,s,e,t,r);o({status:{get marketRegime(){const e=n("status.json","tt-market-vane");return e?parseFloat(e[1][1]):null},get stockMarketMomentum(){const e=n("status.json","tt-market-vane");return e?parseFloat(e[2][1]):null},get economicMomentum(){const e=n("status.json","tt-market-vane");return e?parseFloat(e[3][1]):null},get stocksOverBonds(){const e=n("status.json","tt-market-vane");return e?parseFloat(e[4][1]):null},get vixMargin(){const e=n("status.json","tt-market-vane");return e?parseFloat(e[5][1]):null},get drawdownMargin(){const e=n("status.json","tt-market-vane");return e?parseFloat(e[6][1]):null}},images:{get monthlyIndicators(){return s("monthly-indicators.jpg","tt-market-vane")},get dailyIndicators(){return s("daily-indicators.jpg","tt-market-vane")}}})}),[e,t]),s})();return(0,n.createElement)("div",{className:"widget"},(0,n.createElement)("div",{className:"result-pane"},e?.status?.marketRegime>0?(0,n.createElement)("div",{className:"result-icon-bull"},(0,n.createElement)(_t,null)):(0,n.createElement)("div",{className:"result-icon-bear"},(0,n.createElement)(bt,null)),(0,n.createElement)("div",null,(0,n.createElement)("strong",null,e?.status?.marketRegime>0?"Bullish Market Outlook":"Beearish Market Outlook"))),(0,n.createElement)("div",{className:"gauge-pane"},(0,n.createElement)("div",null,(0,n.createElement)(vt,{value:e?.status?.stockMarketMomentum,label:"Stock Market Momentum"}),(0,n.createElement)(vt,{value:e?.status?.stocksOverBonds,label:"Stock Outperformance of Bonds"}),(0,n.createElement)(vt,{value:e?.status?.economicMomentum,label:"Economic Health"})),(0,n.createElement)("div",null,(0,n.createElement)(vt,{value:e?.status?.vixMargin,label:"Volatility Budget"}),(0,n.createElement)(vt,{value:e?.status?.drawdownMargin,label:"Drawdown Budget"}))))};window.addEventListener("load",(()=>{const e=`wp-block-${a.UU.replace("/","-")}`;document.querySelectorAll(`.${e}`).forEach((e=>{o.createRoot(e).render((0,n.createElement)(s().StrictMode,null,(0,n.createElement)(wt,null)))}))}))},5338:(e,t,r)=>{var n=r(5795);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},5795:e=>{e.exports=window.ReactDOM}},r={};function n(e){var s=r[e];if(void 0!==s)return s.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.m=t,e=[],n.O=(t,r,s,o)=>{if(!r){var a=1/0;for(u=0;u<e.length;u++){r=e[u][0],s=e[u][1],o=e[u][2];for(var i=!0,c=0;c<r.length;c++)(!1&o||a>=o)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(i=!1,o<a&&(a=o));if(i){e.splice(u--,1);var l=s();void 0!==l&&(t=l)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,s,o]},n.n=e=>
1{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={6394:0,4130:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var s,o,a=r[0],i=r[1],c=r[2],l=0;if(a.some((t=>0!==e[t]))){for(s in i)n.o(i,s)&&(n.m[s]=i[s]);if(c)var u=c(n)}for(t&&t(r);l<a.length;l++)o=a[l],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(u)},r=self.webpackChunkturingtrader_wp=self.webpackChunkturingtrader_wp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var s=n.O(void 0,[4130],(()=>n(7683)));s=n.O(s)})();
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.