File Manager

Path: /home/liffinac1/domains/fxinvestcapital.us/public_html/db_files/a_data/

Viewing File: 42.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{INgx:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return l}));var o,r=n("j+67"),s=n("YFKU"),i=((o={})[r.b.Red]=Object(s.t)("Red list"),o[r.b.Green]=Object(s.t)("Green list"),o[r.b.Orange]=Object(s.t)("Orange list"),o[r.b.Purple]=Object(s.t)("Purple list"),o[r.b.Blue]=Object(s.t)("Blue list"),o);function c(t){return i[t]}function u(t){return{type:"colored",id:t.color,color:t.color,symbols:t.symbols,name:t.name||c(t.color),isHotlist:!1}}function l(t){var e=-1===t?-1/0:1/0;return function(n,o){var r=a(n,e),s=a(o,e);return r===s?0:t*(r-s)}}function a(t,e){return null===t?e:r.a.indexOf(t)}},SGSq:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return s}));var o=n("+GxX");function r(){return"enable_non_unique_watch_sections"}function s(){return Object(o.isFeatureEnabled)("enable_non_unique_watch_sections")}},ehHn:function(t,e,n){"use strict";n.d(e,"m",(function(){return m})),n.d(e,"p",(function(){return b})),n.d(e,"d",(function(){return y})),n.d(e,"a",(function(){return _})),n.d(e,"n",(function(){return p})),n.d(e,"b",(function(){return g})),n.d(e,"l",(function(){return v})),n.d(e,"e",(function(){return S})),n.d(e,"q",(function(){return O})),n.d(e,"f",(function(){return N})),n.d(e,"i",(function(){return x})),n.d(e,"c",(function(){return E})),n.d(e,"r",(function(){return P})),n.d(e,"k",(function(){return L})),n.d(e,"o",(function(){return k})),n.d(e,"j",(function(){return T})),n.d(e,"h",(function(){return M})),n.d(e,"g",(function(){return q})),n.d(e,"s",(function(){return H}));var o=n("Eyy1"),r=n("YFKU"),s=n("Kxc7"),i=n("fZEr"),c=n("TsgZ"),u=n("txPx"),l=n("8woN"),a=n("1pWb"),h=n("JWMC"),f=n("INgx"),d=n("tEuG");function m(t,e,n){return!("colored"===e&&!n)&&Object(a.b)(t)}function b(t){return t.replace(a.a,"")}function y(t){return a.a+t}function _(t,e,n){void 0===n&&(n=!0);var o=new Set(t),r=n?" 1":"";if(!o.has(e+r))return e+r;for(var s=2,i="";s<=2e3&&(i=e+" "+s,o.has(i));)s+=1;return i}var p=Object(u.getLogger)("Platform.Model.Watchlist");function g(){return s.enabled("multiple_watchlists")&&window.user&&Boolean(window.user.is_pro)}function v(t){return"string"==typeof t&&!/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/.test(t)&&!/^[\r\n\t,]*$/.test(t)}function S(t){return function(){return new Promise((function(e){Object(i.showRename)({title:t,text:Object(r.t)("Symbol list name")+":",maxLength:128,onRename:function(t){var n=t.newValue,o=t.dialogClose;e(n),o()}})}))}}function C(t){return t.replace("−","-")}function O(t,e,n,r){var s=function(t){var e=[],n=[];t.forEach((function(t,e){Object(a.b)(t)&&n.push(e)}));var o=0;n.forEach((function(n){e.push({values:t.slice(o,n),separator:t[n]}),o=n+1}));var r=n[n.length-1],s=t.slice(r+1);return s.length>0&&e.push({values:s,separator:null}),e}(e);return s.forEach((function(e){e.values.sort((function(e,s){if("flag"===n){var i=Object(d.a)().getSymbolColor(e),u=Object(d.a)().getSymbolColor(s);return Object(f.b)(r)(i,u)}
var l=c.a.get(t).getLastSymbolData(e),a=c.a.get(t).getLastSymbolData(s),h=j(l),m=j(a),b=l&&"flag"!==n?l.values[n]:void 0,y=a&&"flag"!==n?a.values[n]:void 0;return function(t,e){var n=-1===e?-1/0:1/0;return function(r,s,i,c){if("rchp"!==t){if(void 0===r&&void 0===s)return 0;if(void 0===r)return-e;if(void 0===s)return e}switch(t){case"short_name":return e*(r===s?0:Object(o.ensureDefined)(r)<Object(o.ensureDefined)(s)?-1:1);case"rchp":return i||(r=void 0),c||(s=void 0),w(r,s,e,n);case"last_price":case"change":case"change_percent":return w(r,s,e,n);case"volume":var u=Object(o.ensureDefined)(r)>=1e100?n:Number(r),l=Object(o.ensureDefined)(s)>=1e100?n:Number(s);return e*(u-l);default:return Object(o.ensureDefined)(r)>Object(o.ensureDefined)(s)?-1:1}}}(n,r)(b,y,h,m)}))})),function(t){var e=[];return t.forEach((function(t){var n=t.values,o=t.separator;e.push.apply(e,n),null!==o&&e.push(o)})),e}(s)}function j(t){if(!t)return!1;var e="pre_market"===t.values.current_session,n="post_market"===t.values.current_session;return e||n}function w(t,e,n,o){var r=parseFloat(C(String(t))),s=parseFloat(C(String(e)));return n*((r=isNaN(r)?o:r)-(s=isNaN(s)?o:s))}function N(t,e){return t+"."+e}function x(t){return"colored"===t.type?t.name||Object(f.a)(t.color):t.title}function E(t,e){return t===e||Object(l.shortName)(t)===e}function P(t){return{symbol:t.symbol,side:t.side,qty:t.qty,avgPrice:t.avgPrice}}function L(t,e){return t===e||void 0!==t&&void 0!==e&&(t.side===e.side&&t.qty===e.qty&&t.avgPrice===e.avgPrice&&t.symbol===e.symbol)}function k(t){try{return Object(l.shortName)(t)}catch(e){return t}}function T(t){for(var e=new Map,n=0;n<t.length;n++){var r=t[n].toUpperCase(),s=k(r);if(e.has(s)){var i=Object(o.ensureDefined)(e.get(s));if(i.has(r)||i.has(s)||r===s)return!0;i.add(r),e.set(s,i)}else e.set(s,new Set([r]))}return!1}function M(t,e){if(e.includes(t))return t}function q(t,e,n){for(var o="next"===n,r=t;o?r<e.length:r>=0;o?r++:r--)if(!Object(a.b)(e[r]))return e[r];for(var s=o?0:e.length-1;o?s<t:s>t;o?s++:s--)if(!Object(a.b)(e[s]))return e[s]}function H(t){t?Object(h.trackEvent)("Watchlist","Multi select","Remove"):Object(h.trackEvent)("Watchlist","Remove")}},lnbc:function(t,e,n){"use strict";n("bSeV");var o=n("Eyy1"),r=n("j+67"),s=n("TkhF");class i{constructor(t){this._executing=null,this._destroyed=!1,this._handleChange=()=>{if(this._destroyed)return;const t=this._getCommands();if(t.length>0){if(null!==this._executing)return;const[e,...n]=t;switch(e.type){case"append":this._executing=this._api.appendSymbols(e.color,e.symbols);break;case"remove":this._executing=this._api.removeSymbols(e.color,e.symbols);break;case"replace":this._executing=this._api.replaceSymbols(e.color,e.symbols);break;case"reset":this._executing=this._api.resetSymbols(e.symbols);break;case"rename":this._executing=this._api.renameList(e.color,e.name);break;case"reset-all":this._executing=this._api.resetAll()}this._executing.then(()=>{if(this._executing=null,this._destroyed)return;const[t]=this._getCommands();t===e?this._store.dispatch(Object(r.s)({count:1
})):(this._onWarn(`Command: ${JSON.stringify(e)} was sent to the server but is not found in the state`),n.length>0&&this._onWarn(`Commands: ${JSON.stringify(n)} was dropped from state without syncing with server`)),this._handleChange()},t=>{this._destroyed||this._onError(e,t)})}};const{root:e,selector:n,onError:o,onWarn:s,api:i}=t;this._store=e,this._selector=n,this._subscription=this._store.subscribe(this._handleChange),this._onError=o,this._onWarn=s,this._api=i,this._handleChange()}destroy(){this._subscription(),this._destroyed=!0}_getCommands(){const t=this._selector(this._store.getState());return Object(r.e)(t)}}var c=n("txPx"),u=n("BHQF");function l(t){return t.ok?204===t.status?Promise.resolve():t.json():t.json().then((function(t){throw new Error(t.detail||"not ok")}))}var a=Object(c.getLogger)("MarkedSymbols.Api"),h=function(){function t(){}return t.prototype.getLists=function(){return Object(u.fetch)("/api/v1/symbols_list/colored/").then(l)},t.prototype.removeSymbols=function(t,e){return 0===e.length?Promise.resolve():(a.logNormal("Sending request to remove symbols from "+t+"-list: "+e),function(t,e){return Object(u.fetch)("/api/v1/symbols_list/colored/"+t+"/remove/",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(l)}(t,e))},t.prototype.appendSymbols=function(t,e){return 0===e.length?Promise.resolve():(a.logNormal("Sending request to append symbols to "+t+"-list: "+e),function(t,e){return Object(u.fetch)("/api/v1/symbols_list/colored/"+t+"/append/",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(l)}(t,e))},t.prototype.replaceSymbols=function(t,e){return 0===e.length?Promise.resolve():(a.logNormal("Sending request to replace symbols in "+t+"-list: "+e),function(t,e){return Object(u.fetch)("/api/v1/symbols_list/colored/"+t+"/replace/?unsafe=true",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(l)}(t,e))},t.prototype.resetSymbols=function(t){return 0===t.length?Promise.resolve():(a.logNormal("Sending request to reset symbols: "+t),function(t){return Object(u.fetch)("/api/v1/symbols_list/colored/bulk_remove/",{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then(l)}(t))},t.prototype.resetAll=function(){return a.logNormal("Sending request to reset ALL symbols"),Object(u.fetch)("/api/v1/symbols_list/colored/",{method:"DELETE"}).then(l)},t.prototype.renameList=function(t,e){return a.logNormal("Sending request to rename "+t+"-list: "+e),function(t,e){return Object(u.fetch)("/api/v1/symbols_list/colored/"+t+"/rename/",{method:"POST",body:JSON.stringify({name:e}),headers:{"Content-Type":"application/json"}}).then(l)}(t,e)},t}(),f=n("TxTq"),d=n.n(f),m=n("PfBM"),b=n("dm8g"),y=(n("NNtz"),n("J/x9")),_=n("ehHn"),p=n("IWXC"),g=n("NP3r"),v=n("bKsZ"),S=n("oOPW"),C=n("SGSq");n.d(e,"d",(function(){return j})),n.d(e,"c",(function(){return x})),n.d(e,"a",(function(){return E})),n.d(e,"b",(function(){return L}));var O,j=500,w=Object(c.getLogger)("MarkedSymbols.Model"),N=null
;function x(t){return t.markedLists}var E=function(){function t(t){var e,n,i=this;this._promise=Object(y.a)(),this._service=null,this._executor=null,this._subscription=null,this._state=null,this._sync=null,this._destroyed=!1,this._recover=!1,this._onPushStreamChange=function(t){window.user&&window.user.session_hash!==t&&(w.logNormal("Cross browser sync"),i.syncSymbols())},this._onPushStreamStatus=function(t){var e=Date.now();t===m.ConnectionStatus.Open&&N===m.ConnectionStatus.Closed?(window.is_authenticated&&(O=setTimeout((function(){var t=null!==i._state?Object(r.i)(i._state):null;null===t||t<e?(w.logNormal("Reconnect sync"),i.syncSymbols()):w.logNormal("Reconnect sync handled by another tab")}),30*Math.random()*1e3+3e4)),N=t):t===m.ConnectionStatus.Closed&&(N=t,clearTimeout(O))},this._handleChange=function(){var t,e;if(!i._destroyed){var n=Object(o.ensureNotNull)(i._service).store,r=Object(o.ensureNotNull)(x(n.getState()));if(i._state!==r)try{null===(e=(t=i._opts).onChange)||void 0===e||e.call(t,r,Object(o.ensureNotNull)(i._state))}finally{i._state=r}}},this._handleExecutorError=function(t){i._destroyed||(w.logError("Failed to execute "+t.type),i._recover=!0,i.syncSymbols())},this._opts=t,this._api=t.api||new h,this._session=t.quoteSession||Object(p.getQuoteSessionInstance)("simple"),this._restrictedMarkSymbols=function(t){const{limit:e,colors:n,onLimit:o,onRestrictedColor:i,selector:c}=t;return t=>(u,l)=>{var a,h;const f=l(),d=c(f),{color:m,symbols:b,separators:y}=t;if(null!==m){if(!n().includes(m))return void i();const t=null!==(h=null===(a=d.lists.byColor[m])||void 0===a?void 0:a.symbols)&&void 0!==h?h:[],c=new Set(t),u=r.l.castMany([]);for(const e of new Set(b))!y&&Object(s.a)(e)||c.has(e)||u.push(e);if(u.length+c.size>e())return void o()}u(Object(r.k)(t))}}({selector:function(t){return Object(o.ensureNotNull)(x(t))},limit:null!==(e=t.limit)&&void 0!==e?e:function(){return j},onLimit:function(){var t,e;w.logNormal("LimitReached"),null===(e=(t=i._opts).onLimit)||void 0===e||e.call(t)},colors:null!==(n=t.colors)&&void 0!==n?n:function(){return r.a.filter(P)},onRestrictedColor:function(){var t,e;null===(e=(t=i._opts).onRestrictedColor)||void 0===e||e.call(t)}}),this._promise.then((function(t){if(!i._destroyed){i._service=t;var e=t.store;i._state=Object(o.ensureNotNull)(x(e.getState())),i._subscription=e.subscribe(i._handleChange)}})),this.connect()}return t.prototype.destroy=function(){this._destroyed=!0,this._sync=null,this._subscription&&this._subscription(),this._executor&&this._executor.destroy(),this.closeConnection()},t.prototype.getSymbolsByColor=function(t){var e;if(null===this._service)return[];var n=x(this._service.store.getState());return null===n?[]:null!==(e=Object(r.h)(n,t))&&void 0!==e?e:[]},t.prototype.getLists=function(){var t=this;return r.a.reduce((function(e,n){return e.set(n,new Set(t.getSymbolsByColor(n))),e}),new Map)},t.prototype.setSymbolsColor=function(t,e){if(w.logNormal("Set symbols color "+e),null!==this._service){var n=this._restrictedMarkSymbols({symbols:t,color:e,separators:!1})
;this._service.store.dispatch(n)}},t.prototype.markMany=function(t){if(w.logNormal("Mark many symbols: "+t.color),null!==this._service){var e=this._restrictedMarkSymbols(t);this._service.store.dispatch(e)}},t.prototype.getSymbolColor=function(t){if(null===this._service)return null;var e=x(this._service.store.getState());return null===e?null:Object(r.g)(e,t)},t.prototype.clearAllSymbolsColor=function(){w.logNormal("Clear all symbols color"),null!==this._service&&this._service.store.dispatch(Object(r.q)({}))},t.prototype.syncSymbols=function(){var t=this;if(null===this._sync)var e=this._sync=this._synchronize({assert:function(){if(t._sync!==e)throw new Error("ROUTINE_CANCELLED")},cancel:function(){t._sync=null}}).then((function(){t._sync=null}),(function(e){throw t._sync=null,e}));return this._sync},t.prototype.activateSeparators=function(t){null!==this._service&&this._service.store.dispatch(Object(r.c)({value:t}))},t.prototype.anonymize=function(){null!==this._service&&this._service.store.dispatch(Object(r.r)({timestamp:Date.now(),lists:[],separators:Object(C.a)()}))},t.prototype.connect=function(){this._subscribeOnPushStream()},t.prototype.closeConnection=function(){this._unsubscribeOnPushStream()},t.prototype._resolve=function(t){for(var e=this,n=new Set,o=0,r=t;o<r.length;o++){var s=r[o];if(void 0!==s.symbols)for(var i=0,c=s.symbols;i<c.length;i++){var u=c[i];Object(_.o)(u)===u&&n.add(u)}}var l=Array.from(n).map((function(t){return e._session.snapshot(t).then((function(e){return e.pro_name||t}),(function(){return t})).then((function(e){return[t,e]}))}));return Promise.all(l).then((function(e){var n=new Map(e);return t.map((function(t){var e,o=null!==(e=t.symbols)&&void 0!==e?e:[];return{id:t.id,name:t.name,color:t.color,symbols:o.map((function(t){var e;return null!==(e=n.get(t))&&void 0!==e?e:t}))}}))}))},t.prototype._synchronize=function(t){var e=this;return null!==this._executor&&(this._executor.destroy(),this._executor=null,w.logNormal("Executor was destroyed.")),Promise.all([this._api.getLists(),this._promise,this._recover?Object(b.a)("marked-symbols"):Promise.resolve()]).then((function(n){var o=n[0];return t.assert(),Promise.all([e._resolve(o),Promise.resolve(Date.now())])})).then((function(n){var s=n[0],i=n[1];t.assert(),e._recover=!1;var c=Object(o.ensureNotNull)(e._service).store;null===e._executor&&e._createExecutor();var u=null!==e._state?Object(r.i)(e._state):null;if(!(null!==u&&u>=i)){var l=Object(r.r)({lists:s.map((function(t){var e;return{name:null!==(e=t.name)&&void 0!==e?e:null,color:t.color,symbols:t.symbols}})),timestamp:i,separators:Object(C.a)()});c.dispatch(l)}})).catch((function(t){if(!(t instanceof Error&&(w.logError("Sync symbols error: "+t.message),"ROUTINE_CANCELLED"===t.message)))throw t}))},t.prototype._createExecutor=function(){var t=Object(o.ensureNotNull)(this._service).store;this._executor=new i({root:t,selector:function(t){return Object(o.ensureNotNull)(x(t))},api:this._api,onError:this._handleExecutorError,onWarn:function(t){w.logWarn(t)}}),w.logNormal("Executor was created")},
t.prototype._subscribeOnPushStream=function(){d.a.on("marked-symbols",this._onPushStreamChange),d.a.onPrivateStatus(this._onPushStreamStatus)},t.prototype._unsubscribeOnPushStream=function(){d.a.off("marked-symbols",this._onPushStreamChange),d.a.offStatus(this._onPushStreamStatus),clearTimeout(O),N=null},t}();function P(t){return r.b.Red===t||Object(g.enabled)(v.ProductFeatures.MULTIFLAGGED_SYMBOLS_LISTS)}function L(t){return!!P(t)||(Object(S.createGoProDialog)({feature:"flaggedSymbols"}),!1)}},tEuG:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));n("bSeV");var o=n("j+67"),r=n("YFKU"),s=n("lnbc"),i=n("brCa"),c=n("SGSq"),u=n("+GxX"),l=function(){function t(t){var e=this;this._symbolChangeHandlers=new Map,this._listChangeHandlers=[],this._initHandlers=[],this._sync=null,this._inited=!1,this._handleChange=function(t,n){if(t.lists!==n.lists){e._listChangeHandlers.forEach((function(e){try{e(t,n)}catch(i){}}));for(var r=function(e,r){var s=Object(o.g)(t,e),c=Object(o.g)(n,e);s!==c&&r.forEach((function(t){try{t(s,c)}catch(i){}}))},s=0,i=Array.from(e._symbolChangeHandlers.entries());s<i.length;s++){var c=i[s];r(c[0],c[1])}}},this._onLoginStateChange=function(){var t;e._model.closeConnection(),window.is_authenticated?(e._model.connect(),t=e._syncSymbols()):(e._model.anonymize(),e._inited=!1,t=Promise.resolve()),t.then(e._fireInit)},this._fireInit=function(){e._initHandlers.forEach((function(t){return t()}))},this._runWithSync=function(t){e._sync?e._sync.then(t):t()},this._model=new s.a({api:t?t.api:void 0,quoteSession:t?t.quoteSession:void 0,onChange:this._handleChange,limit:null==t?void 0:t.limit,onLimit:h,colors:null==t?void 0:t.colors}),u.FeatureToggle.onFeaturesStateChanged().subscribe(this,(function(){e._model.activateSeparators(Object(c.a)())})),this._subscribeLoginStateChange(),this._syncSymbols().then(this._fireInit)}return t.prototype.getSymbolsByColor=function(t){return this._model.getSymbolsByColor(t)},t.prototype.setSymbolsColor=function(t,e){var n=this;0!==t.length&&this._runWithSync((function(){n._model.setSymbolsColor(t,e)}))},t.prototype.getSymbolColor=function(t){return this._model.getSymbolColor(t)},t.prototype.markMany=function(t){var e=this;this._runWithSync((function(){e._model.markMany(t)}))},t.prototype.clearAllSymbolsColor=function(){var t=this;this._runWithSync((function(){t._model.clearAllSymbolsColor()}))},t.prototype.onSymbolChange=function(t,e){var n=this._symbolChangeHandlers.get(t);n?n.push(e):this._symbolChangeHandlers.set(t,[e])},t.prototype.offSymbolChange=function(t,e){var n=this._symbolChangeHandlers.get(t);if(n){var o=n.filter((function(t){return t!==e}));o.length>0?this._symbolChangeHandlers.set(t,o):this._symbolChangeHandlers.delete(t)}},t.prototype.onListChange=function(t){this._listChangeHandlers.push(t)},t.prototype.offListChange=function(t){this._listChangeHandlers=this._listChangeHandlers.filter((function(e){return e!==t}))},t.prototype.onInit=function(t){this._initHandlers.push(t)},t.prototype.offInit=function(t){
this._initHandlers=this._initHandlers.filter((function(e){return e!==t}))},t.prototype.destroy=function(){u.FeatureToggle.onFeaturesStateChanged().unsubscribeAll(this),this._model.closeConnection(),this._unsubscribeLoginStateChange()},t.prototype.isInited=function(){return this._inited},t.prototype._subscribeLoginStateChange=function(){window.loginStateChange&&window.loginStateChange.subscribe(this,this._onLoginStateChange)},t.prototype._unsubscribeLoginStateChange=function(){window.loginStateChange&&window.loginStateChange.unsubscribe(this,this._onLoginStateChange)},t.prototype._syncSymbols=function(){var t=this;if(window.is_authenticated){this._sync=this._model.syncSymbols();var e=function(){t._sync=null,t._inited=!0};return this._sync.then(e).catch(e)}return Promise.resolve()},t}(),a=null;function h(){a||(a=Object(i.createNoticeDialog)({title:r.t("Issue With Flagging"),content:r.t("Unable to flag all selected symbols since it exceeds the maximum amount ({limit}).").format({limit:String(s.d)})})).then((function(t){t.on("afterClose",(function(){a=null})),t.open()}))}var f=null;function d(){return null===f&&(f=new l),f}}}]);