{"version":3,"sources":["inoMsEtfSummary.js","inoMsEtfSummary.tmpl.js","inoMsStockRecentTrades.js","inoMsStockRecentTrades.tmpl.js"],"names":["inovestor","ms","etf","summary","config","apiRelativeUrl","ko","viewModels","summaryViewModel","plugin","self","this","pdfReportUrl","options","pdfHandler","observable","resources","hasError","isInvalidIdentifier","hasValidData","computed","formattedLowHighWeeks","low","low52Weeks","high","high52Weeks","bindingHandlers","currency","format","formattedDayRange","formattedBidAsk","bid","ask","formattedVolume","volume","avgVolume","averageVolume30Days","number","updateResources","currentResource","core","currentLanguage","isNullOrUndefined","downloadPdf","libRef","jQuery","$","pluginName","Plugin","element","_name","_defaults","fn","inoMsEtfSummary","defaults","extend","_viewModel","symbol","init","prototype","fileName","fileCacheKey","instances","register","update","templatePaths","filePath","isEmptyString","templateRootUrl","match","getTemplate","then","template","html","buildCache","bindEvents","render","bindModel","search","always","$element","trigger","destroy","unbindEvents","removeData","on","onReady","call","off","apiErrorHandler","apiError","onError","result","generateError","errors","invalidIdentifierHandler","invalidIdentifier","etfSummaryUrl","stringFormat","ajaxApi","type","contentType","error","data","requestStatus","valueHasMutated","applyBindings","each","asOf","assetClass","bidAsk","totalAssetInfo","dataDelayedBy","dataRealTime","dayRange","dividend","earningsPerShareTTM","fiftyTwoWeek","previousClose","riskRating","category","managementFeesRatio","managementFees","aum","ranking","inceptionDate","open","totalAssests","currentYield","unitsOutstanding","distributionYield","distributionYieldInfo","riskRatings","lowToMedium","medium","mediumToHigh","null","window","stock","recentTrades","recentTradesViewModel","observableArray","date","setData","numPages","processedData","latestTrade","map","x","copy","moment","toDate","filter","sort","a","b","getTime","dataLength","length","$pagination","twbsPagination","pageLimit","currentPageIndex","totalPages","visiblePages","initiateStartPageClick","startPage","first","pagination","firstPage","prev","previousPage","next","nextPage","last","lastPage","onPageClick","event","page","currentPageItems","pureComputed","startIndex","slice","currentPageInfo","start","end","total","paginationInfo","inoMsStockRecentTrades","url","tradeSummary","timeAndSales","time","price","shares","exchangeMarket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SAAA,sCACAnC,WAAA,CACAmB,eAAA,uDACAd,SAAA,WACAF,aAAA,YACAF,UAAA,UACAM,SAAA,SACA,CACA,CACA,EAAA/K,UAAAC,GAAAyI,KAAA,EC/VAD,OAAA,oBAAAA,OAAA,qBAAA,GACAA,OAAA,oBAAA,4CAAA","file":"../inoMsEtfRecentTrades.min.js","sourcesContent":["; (function (inovestor, undefined) {\n // Setup dependencies for this plugin\n // Normally we would add jQuery and knockout but ms-core, which we depend on, already register them so it's useless\n\n // Create plugin namespace with any desired config variable\n inovestor.ms.etf = inovestor.ms.etf || {};\n})(inovestor);\n\n\n; (function (etf, undefined) {\n // Create plugin namespace with any desired config variable\n etf.summary = {\n config: {\n apiRelativeUrl: 'etfs/summary?symbol={symbol}',\n }\n };\n\n})(inovestor.ms.etf);\n\n\n; (function ($, ko, inovestor, undefined) {\n inovestor.ms.etf.summary.viewModels = {};\n\n inovestor.ms.etf.summary.viewModels.summaryViewModel = function (plugin) {\n var self = this;\n\n self.pdfReportUrl = plugin.options.pdfReportUrl;\n self.pdfHandler = plugin.options.pdfHandler;\n\n self.summary = ko.observable();\n self.resources = ko.observable();\n self.hasError = ko.observable(false);\n self.isInvalidIdentifier = ko.observable(false);\n self.hasValidData = ko.computed(function () {\n return !self.hasError() && !self.isInvalidIdentifier() && self.summary() != null;\n }, this);\n\n self.formattedLowHighWeeks = ko.computed(function () {\n var low = self.summary()?.low52Weeks;\n var high = self.summary()?.high52Weeks;\n\n if (low === null && high === null) {\n return '-';\n }\n return ko.bindingHandlers.currency.format(low, true, true, false, 2) + \" - \" + ko.bindingHandlers.currency.format(high, true, true, false, 2)\n });\n\n self.formattedDayRange = ko.computed(function () {\n var low = self.summary()?.low\n var high = self.summary()?.high\n\n if (low === null && high === null) {\n return '-'\n }\n\n return ko.bindingHandlers.currency.format(low, true, true, false, 2) + \" - \" + ko.bindingHandlers.currency.format(high, true, true, false, 2)\n })\n self.formattedBidAsk = ko.computed(function () {\n var bid = self.summary()?.bid\n var ask = self.summary()?.ask\n\n if (bid === null && ask === null) {\n return '-'\n }\n\n return ko.bindingHandlers.currency.format(bid, true, true, false, 2) + \" - \" + ko.bindingHandlers.currency.format(ask, true, true, false, 2)\n })\n self.formattedVolume = ko.computed(function () {\n var volume = self.summary()?.volume\n var avgVolume = self.summary()?.averageVolume30Days\n\n if (volume === null && avgVolume === null) {\n return '-'\n }\n \n return ko.bindingHandlers.number.format(volume, true, 2, true, 1, true) + \" / \" + ko.bindingHandlers.number.format(avgVolume, true, 2, true, 1, true)\n })\n\n self.updateResources = function () {\n // Update main resources\n var currentResource = inovestor.ms.etf.summary.resources[inovestor.ms.core.currentLanguage];\n if (inovestor.ms.core.isNullOrUndefined(currentResource))\n currentResource = null;\n self.resources(currentResource);\n };\n\n self.downloadPdf = function () {\n\n };\n }\n\n})(inovestor.ms.libRef.jQuery, inovestor.ms.libRef.ko, inovestor);\n; (function ($, ko, inovestor, undefined) {\n\n var pluginName = 'inoMsEtfSummary';\n\n // Create the plugin constructor\n function Plugin(element, options) {\n\n this.element = element;\n this._name = pluginName;\n this._defaults = $.fn.inoMsEtfSummary.defaults;\n \n // Merge options with defaults\n this.options = $.extend({}, this._defaults, options);\n\n this._viewModel = new inovestor.ms.etf.summary.viewModels.summaryViewModel(this);\n\n // Make sure required variables are set\n if (inovestor.ms.core.isNullOrUndefined(this.options.symbol))\n throw \"symbol is required\";\n\n // Call init\n this.init();\n }\n\n $.extend(Plugin.prototype, {\n\n // Initialization logic\n init: function () {\n var plugin = this;\n\n // Setup what plugin needs to do on language change\n inovestor.ms.core.instances.register(this, function () {\n plugin.update();\n });\n\n // Plugin overrides for template = cacheKey and path are the same\n var fileCacheKey = plugin.options.templatePaths.summary;\n var filePath = plugin.options.templatePaths.summary;\n // Default behavior (if no template path is set by plugin)\n if (inovestor.ms.core.isEmptyString(fileCacheKey)) {\n var fileName = 'summary.html';\n fileCacheKey = pluginName + '.' + fileName;\n filePath = (inovestor.ms.core.isEmptyString(inovestor.ms.core.config.templateRootUrl) ? '' : inovestor.ms.core.config.templateRootUrl) +\n (inovestor.ms.core.isEmptyString(inovestor.ms.core.config.templateRootUrl) || inovestor.ms.core.config.templateRootUrl.match(/\\/$/) != null ? '' : '/') + // check if templateRootUrl ends in slash\n (this._name + '/' + fileName);\n }\n\n // Get main template file\n inovestor.ms.core.getTemplate(fileCacheKey, filePath).then(function (template) {\n $(plugin.element).html(template);\n plugin.buildCache();\n plugin.bindEvents();\n plugin.render();\n plugin.bindModel();\n }).then(function () {\n // Call Search\n plugin.search(plugin.options.symbol).always(function () {\n // When search is completed, trigger onReady event\n plugin.$element.trigger('ready' + '.' + plugin._name);\n });\n });\n },\n\n // Remove plugin instance completely\n destroy: function () {\n this.unbindEvents();\n this.$element.removeData();\n },\n\n // Cache DOM nodes for performance\n buildCache: function () {\n this.$element = $(this.element);\n },\n\n // Bind events that trigger methods\n bindEvents: function () {\n var plugin = this;\n plugin.$element.on('ready' + '.' + plugin._name, function () {\n var onReady = plugin.options.onReady;\n if (typeof onReady === 'function')\n onReady.call(plugin.$element);\n });\n },\n\n // Unbind events that trigger methods\n unbindEvents: function () {\n this.$element.off('.' + this._name);\n },\n\n // API error handler\n apiErrorHandler: function (apiError) {\n var plugin = this;\n var onError = plugin.options.onError;\n if (typeof onError === 'function') {\n var result = onError.call(inovestor.ms.core.generateError(inovestor.ms.core.errors.apiError, apiError, plugin));\n // If callback returns false, do not execute default behavior\n if (!inovestor.ms.core.isNullOrUndefined(result) && result === false)\n return;\n }\n\n plugin._viewModel.hasError(true);\n },\n\n // Invalid Identifier error handler\n invalidIdentifierHandler: function () {\n var plugin = this;\n var onError = plugin.options.onError;\n if (typeof onError === 'function') {\n var result = onError.call(inovestor.ms.core.generateError(inovestor.ms.core.errors.invalidIdentifier, null, plugin));\n // If callback returns false, do not execute default behavior\n if (!inovestor.ms.core.isNullOrUndefined(result) && result === false)\n return;\n }\n\n plugin._viewModel.isInvalidIdentifier(true);\n },\n\n // Search for a particular etf\n search: function (symbol) {\n var plugin = this;\n\n // Make sure required variables are set\n if (inovestor.ms.core.isNullOrUndefined(symbol))\n throw \"symbol is required\";\n\n // Update options\n plugin.options.symbol = symbol;\n\n // Setup API url with term\n var etfSummaryUrl = inovestor.ms.core.stringFormat(inovestor.ms.etf.summary.config.apiRelativeUrl, { symbol: symbol });\n //var etfSummaryUrl = inovestor.ms.core.stringFormat(inovestor.ms.etf.summary.config.apiRelativeUrl, {});\n\n // Reset relevant Data before calling API\n plugin._viewModel.summary(null);\n plugin._viewModel.hasError(false);\n plugin._viewModel.isInvalidIdentifier(false);\n\n // Call API and bind model\n var options = { type: 'GET', contentType: 'application/json', error: function (error) { plugin.apiErrorHandler(error); } };\n return inovestor.ms.core.ajaxApi(etfSummaryUrl, options).then(function (data) {\n if (!inovestor.ms.core.isNullOrUndefined(data)) {\n if (data.requestStatus === 'invalidIdentifier')\n plugin.invalidIdentifierHandler();\n plugin._viewModel.summary(data);\n\n }\n plugin.update();\n });\n },\n\n // Renders html template and binds model (should be called once)\n render: function () {\n var plugin = this;\n plugin._viewModel.updateResources();\n },\n\n // Update resources\n update: function () {\n var plugin = this;\n // Update view model resources\n plugin._viewModel.updateResources();\n plugin._viewModel.summary.valueHasMutated();\n },\n\n // Applies knockout bindings to element. (Should be done only once)\n bindModel: function () {\n var plugin = this;\n ko.applyBindings(plugin._viewModel, plugin.element);\n },\n });\n\n // JQuery Plugin wrapper\n $.fn.inoMsEtfSummary = function (options) {\n this.each(function () {\n if (!$.data(this, pluginName)) {\n // Store instance of plugin in \"$.data\"\n $.data(this, pluginName, new Plugin(this, options));\n }\n });\n\n // return plugin to support JQuery chaining\n return this;\n };\n\n // Default options for plugin\n $.fn.inoMsEtfSummary.defaults = {\n symbol: null,\n onError: null,\n onReady: null,\n pdfReportUrl: null,\n pdfHandler: null,\n templatePaths: {\n summary: null\n }\n };\n\n})(inovestor.ms.libRef.jQuery, inovestor.ms.libRef.ko, inovestor);\n; (function (etf, undefined) {\n etf.summary.resources = etf.summary.resources || {};\n etf.summary.resources[\"en\"] = {\n asOf: 'As of',\n assetClass: 'Asset Class',\n bidAsk: 'Bid / Ask',\n currency: 'Currency',\n totalAssetInfo: 'For this ETF Series only',\n dataDelayedBy: 'Data delayed by {minutes} minutes',\n dataRealTime: 'Real-time data',\n dayRange: \"Day Range\",\n dividend: \"Dividend (yield)\",\n earningsPerShareTTM: 'Earnings / Share',\n fiftyTwoWeek: \"52-Week Range\",\n previousClose: \"Previous Close\",\n riskRating: \"Risk Rating\",\n volume: \"Vol / Avg\",\n category: 'Category',\n managementFeesRatio: \"MER\",\n managementFees: \"Management Fees\",\n aum: 'AUM',\n ranking: \"Ranking\",\n inceptionDate: \"Inception Date\",\n open: \"Open\",\n totalAssests: \"Total Assets\",\n currentYield: \"Current Yield\",\n unitsOutstanding: \"Units Outstanding\",\n distributionYield: \"Distribution\\r\\nYield (TTM)\",\n distributionYieldInfo: \"TTM Distribution Yield refers to trailing twelve months distribution divided by the previous day close.\",\n downloadPdf: \"DOWNLOAD PDF\",\n riskRatings: {\n low: 'Low',\n lowToMedium: 'Low to Medium',\n medium: 'Medium',\n mediumToHigh: 'Medium to High',\n high: 'High',\n null: '-'\n }\n };\n})(inovestor.ms.etf);\n\n; (function (etf, undefined) {\n etf.summary.resources = etf.summary.resources || {};\n etf.summary.resources[\"fr\"] = {\n asOf: 'Au',\n assetClass: 'Classe d\\'actifs',\n bidAsk: 'Cours achet. / Cours vend.',\n currency: 'Devise',\n totalAssetInfo: 'Pour cette série de FNB seulement',\n dataDelayedBy: 'Données différées de {minutes} minutes',\n dataRealTime: 'Données en temps réel',\n dayRange: \"Var. jour\",\n dividend: \"Dividende (rendement)\",\n earningsPerShareTTM: 'Bénéfice par action',\n fiftyTwoWeek: \"Var. 52 semaines\",\n previousClose: \"Clôture\",\n riskRating: \"Cote de risque\",\n volume: \"Vol / Moy.\",\n category: \"Catégorie\",\n managementFeesRatio: \"RFG\",\n managementFees: \"Frais de gestion\",\n aum: 'Actifs sous gestion',\n ranking: \"Classement\",\n inceptionDate: \"Date de création\",\n open: \"Ouverture\",\n totalAssests: \"Actifs\",\n currentYield: \"Revenu actuel\",\n unitsOutstanding: \"Parts en circulation\",\n distributionYield: \"Revenu de distribution (DDM)\",\n distributionYieldInfo: \"Rendement des distributions sur 12 mois (TTM) fait référence à la distribution des douze derniers mois, divisée par la clôture de la veille.\",\n downloadPdf: \"TÉLÉCHARGER PDF\",\n riskRatings: {\n low: 'Faible',\n lowToMedium: 'Faible à moyen',\n medium: 'Moyen',\n mediumToHigh: 'Moyen à élevé',\n high: 'Élevé',\n null: '-'\n }\n };\n})(inovestor.ms.etf);","window[\"inoMsTemplatesCache\"] = window[\"inoMsTemplatesCache\"] || {};\nwindow[\"inoMsTemplatesCache\"][\"inoMsEtfSummary.summary.html\"] = \"

()

0\\\" class=\\\"fa fa-arrow-up text-success\\\">
0, 'text-danger' : summary().percentChange < 0 }\\\">
/
0, 'text-danger' : summary().percentChange < 0 }\\\">
0\\\">

 
 
 
\"; ","; (function (inovestor, undefined) {\n // Setup dependencies for this plugin\n // Normally we would add jQuery and knockout but ms-core, which we depend on, already register them so it's useless\n\n // Create plugin namespace with any desired config variable\n inovestor.ms.stock = inovestor.ms.stock || {};\n})(inovestor);\n\n\n; (function (stock, undefined) {\n // Create plugin namespace with any desired config variable\n stock.recentTrades = {\n config: {\n apiRelativeUrl: 'stocks/recentTrades?symbol={symbol}'\n }\n };\n\n})(inovestor.ms.stock);\n\n\n; (function ($, ko, inovestor, undefined) {\n\n inovestor.ms.stock.recentTrades.viewModels = {};\n\n inovestor.ms.stock.recentTrades.viewModels.recentTradesViewModel = function () {\n var self = this;\n\n self.data = ko.observable();\n self.recentTrades = ko.observableArray();\n self.date = ko.observable();\n\n self.setData = function (data) {\n var processedData = $.extend(true, {}, data)\n processedData.recentTrades = processedData.recentTrades == null ? null : processedData.recentTrades.map(function (x) {\n var copy = $.extend(true, {}, x)\n copy.date = copy.date == null ? null : moment(copy.date).toDate()\n return copy\n })\n\n self.data(processedData)\n self.recentTrades(processedData.recentTrades)\n\n var latestTrade = processedData.recentTrades.filter(function (x) { return x.date != null }).sort(function (a, b) {\n return b.date.getTime() - a.date.getTime()\n })[0]\n\n if (latestTrade != null) {\n self.date(latestTrade.date)\n }\n\n setupPagination(processedData.recentTrades.length)\n }\n\n self.pageLimit = 20;\n self.currentPageIndex = ko.observable(0);\n self.currentPageItems = ko.pureComputed(function () {\n var startIndex = self.currentPageIndex() * self.pageLimit;\n return (self.recentTrades() || []).slice(startIndex, startIndex + self.pageLimit);\n });\n self.currentPageInfo = ko.pureComputed(function () {\n var start = self.currentPageIndex() * self.pageLimit + 1;\n var end = self.currentPageIndex() * self.pageLimit + self.currentPageItems().length;\n var total = (self.recentTrades() || []).length;\n return inovestor.ms.core.stringFormat(self.resources().pagination.paginationInfo, { start: start, end: end, total: total });\n });\n\n self.resources = ko.observable();\n self.hasError = ko.observable(false);\n self.isInvalidIdentifier = ko.observable(false);\n self.hasValidData = ko.computed(function () {\n return !self.hasError() && !self.isInvalidIdentifier() && self.data() != null;\n }, this);\n\n self.updateResources = function () {\n // Update main resources\n var currentResource = inovestor.ms.stock.recentTrades.resources[inovestor.ms.core.currentLanguage];\n if (inovestor.ms.core.isNullOrUndefined(currentResource))\n currentResource = null;\n self.resources(currentResource);\n };\n\n function setupPagination(dataLength) {\n var $pagination = $('#payments-pagination');\n $pagination.twbsPagination('destroy');\n\n if (!dataLength || dataLength === 0)\n return;\n\n var numResults = dataLength;\n var numPages = numResults / self.pageLimit;\n if (numResults % self.pageLimit > 0)\n numPages++;\n\n if (self.currentPageIndex() > (numPages - 1))\n self.currentPageIndex(numPages - 1);\n\n $pagination.twbsPagination({\n totalPages: numPages,\n visiblePages: 5,\n initiateStartPageClick: false,\n startPage: self.currentPageIndex() + 1,\n first: self.resources().pagination.firstPage,\n prev: self.resources().pagination.previousPage,\n next: self.resources().pagination.nextPage,\n last: self.resources().pagination.lastPage,\n onPageClick: function (event, page) {\n self.currentPageIndex(page - 1);\n }\n });\n }\n }\n\n})(inovestor.ms.libRef.jQuery, inovestor.ms.libRef.ko, inovestor);\n; (function ($, ko, inovestor, undefined) {\n\n var pluginName = 'inoMsStockRecentTrades';\n\n // Create the plugin constructor\n function Plugin(element, options) {\n\n this.element = element;\n this._name = pluginName;\n this._defaults = $.fn.inoMsStockRecentTrades.defaults;\n this._viewModel = new inovestor.ms.stock.recentTrades.viewModels.recentTradesViewModel();\n\n // Merge options with defaults\n this.options = $.extend({}, this._defaults, options);\n\n // Make sure required variables are set\n if (inovestor.ms.core.isNullOrUndefined(this.options.symbol))\n throw \"symbol is required\";\n\n // Call init\n this.init();\n }\n\n $.extend(Plugin.prototype, {\n\n // Initialization logic\n init: function () {\n var plugin = this;\n\n // Setup what plugin needs to do on language change\n inovestor.ms.core.instances.register(this, function () {\n plugin.update();\n });\n\n // Plugin overrides for template = cacheKey and path are the same\n var fileCacheKey = plugin.options.templatePaths.recentTrades;\n var filePath = plugin.options.templatePaths.recentTrades;\n // Default behavior (if no template path is set by plugin)\n if (inovestor.ms.core.isEmptyString(fileCacheKey)) {\n var fileName = 'recentTrades.html';\n fileCacheKey = pluginName + '.' + fileName;\n filePath = (inovestor.ms.core.isEmptyString(inovestor.ms.core.config.templateRootUrl) ? '' : inovestor.ms.core.config.templateRootUrl) +\n (inovestor.ms.core.isEmptyString(inovestor.ms.core.config.templateRootUrl) || inovestor.ms.core.config.templateRootUrl.match(/\\/$/) != null ? '' : '/') + // check if templateRootUrl ends in slash\n (this._name + '/' + fileName);\n }\n\n // Get main template file\n inovestor.ms.core.getTemplate(fileCacheKey, filePath).then(function (template) {\n $(plugin.element).html(template);\n plugin.buildCache();\n plugin.bindEvents();\n plugin.render();\n plugin.bindModel();\n }).then(function () {\n // Call Search\n plugin.search(plugin.options.symbol).always(function () {\n // When search is completed, trigger onReady event\n plugin.$element.trigger('ready' + '.' + plugin._name);\n });\n });\n },\n\n // Remove plugin instance completely\n destroy: function () {\n this.unbindEvents();\n this.$element.removeData();\n },\n\n // Cache DOM nodes for performance\n buildCache: function () {\n this.$element = $(this.element);\n },\n\n // Bind events that trigger methods\n bindEvents: function () {\n var plugin = this;\n plugin.$element.on('ready' + '.' + plugin._name, function () {\n var onReady = plugin.options.onReady;\n if (typeof onReady === 'function')\n onReady.call(plugin.$element);\n });\n },\n\n // Unbind events that trigger methods\n unbindEvents: function () {\n this.$element.off('.' + this._name);\n },\n\n // API error handler\n apiErrorHandler: function (apiError) {\n var plugin = this;\n var onError = plugin.options.onError;\n if (typeof onError === 'function') {\n var result = onError.call(inovestor.ms.core.generateError(inovestor.ms.core.errors.apiError, apiError, plugin));\n // If callback returns false, do not execute default behavior\n if (!inovestor.ms.core.isNullOrUndefined(result) && result === false)\n return;\n }\n\n plugin._viewModel.hasError(true);\n },\n\n // Invalid Identifier error handler\n invalidIdentifierHandler: function () {\n var plugin = this;\n var onError = plugin.options.onError;\n if (typeof onError === 'function') {\n var result = onError.call(inovestor.ms.core.generateError(inovestor.ms.core.errors.invalidIdentifier, null, plugin));\n // If callback returns false, do not execute default behavior\n if (!inovestor.ms.core.isNullOrUndefined(result) && result === false)\n return;\n }\n\n plugin._viewModel.isInvalidIdentifier(true);\n },\n\n search: function (symbol) {\n var plugin = this;\n\n // Make sure required variables are set\n if (inovestor.ms.core.isNullOrUndefined(symbol))\n throw \"symbol is required\";\n\n // Update options\n plugin.options.symbol = symbol;\n\n // Setup API url with term\n var url = inovestor.ms.core.stringFormat(inovestor.ms.stock.recentTrades.config.apiRelativeUrl, { symbol: symbol });\n\n // Call API and bind model\n var options = { type: 'GET', contentType: 'application/json', error: function (error) { plugin.apiErrorHandler(error); } };\n return inovestor.ms.core.ajaxApi(url, options).then(function (data) {\n if (!inovestor.ms.core.isNullOrUndefined(data)) {\n if (data.requestStatus === 'invalidIdentifier')\n plugin.invalidIdentifierHandler();\n else \n plugin._viewModel.setData(data);\n }\n });\n },\n\n // Renders html template and binds model (should be called once)\n render: function () {\n var plugin = this;\n plugin._viewModel.updateResources();\n },\n\n // Update resources\n update: function () {\n var plugin = this;\n plugin._viewModel.updateResources();\n },\n\n // Applies knockout bindings to element. (Should be done only once)\n bindModel: function () {\n var plugin = this;\n ko.applyBindings(plugin._viewModel, plugin.element);\n },\n });\n\n // JQuery Plugin wrapper\n $.fn.inoMsStockRecentTrades = function (options) {\n this.each(function () {\n if (!$.data(this, pluginName)) {\n // Store instance of plugin in \"$.data\"\n $.data(this, pluginName, new Plugin(this, options));\n }\n });\n\n // return plugin to support JQuery chaining\n return this;\n };\n\n // Default options for plugin\n $.fn.inoMsStockRecentTrades.defaults = {\n symbol: null,\n onError: null,\n onReady: null,\n templatePaths: {\n recentTrades: null\n }\n };\n\n})(inovestor.ms.libRef.jQuery, inovestor.ms.libRef.ko, inovestor);\n; (function (stock, undefined) {\n stock.recentTrades.resources = stock.recentTrades.resources || {};\n stock.recentTrades.resources[\"en\"] = {\n tradeSummary: 'Trade Summary',\n timeAndSales: \"Time and Sales\",\n time: 'Time',\n price: 'Price',\n shares: 'Shares',\n exchangeMarket: 'Exch/Mkt',\n buyer: 'Buyer',\n buyerToolTip: 'These are Buyers\\' trading numbers, please use the TSX member firm directory link above to look up company names',\n seller: 'Seller',\n sellerToolTip: 'These are Sellers\\' trading numbers, please use the TSX member firm directory link above to look up company names',\n viewTsxMember: \"VIEW TSX MEMBER FIRM DIRECTORY\",\n trades: 'Trades:',\n volume: 'Volume:',\n vwap: 'VWAP:',\n noTrades: 'There is no recent trade',\n pagination: {\n paginationInfo: 'Showing {start} to {end} of {total} trades',\n nextPage: 'Next',\n previousPage: 'Previous',\n firstPage: 'First',\n lastPage: 'Last'\n }\n };\n})(inovestor.ms.stock);\n\n; (function (stock, undefined) {\n stock.recentTrades.resources = stock.recentTrades.resources || {};\n stock.recentTrades.resources[\"fr\"] = {\n tradeSummary: 'Sommaire des transactions',\n timeAndSales: \"Temps et ventes\",\n time: 'Heure',\n price: 'Prix',\n shares: 'Parts',\n exchangeMarket: 'Éch/Mar',\n buyer: 'Acheteur',\n buyerToolTip: 'Voici les numéros de trading des acheteurs, veuillez utiliser le lien de l\\'annuaire des firmes membres de la TSX ci-dessus pour rechercher les noms des entreprises.',\n seller: 'Vendeur',\n sellerToolTip: 'Voici les numéros de trading des vendeurs, veuillez utiliser le lien de l\\'annuaire des firmes membres de la TSX ci-dessus pour rechercher les noms des entreprises.',\n viewTsxMember: 'VOIR LES ORGANISATIONS PARTICIPANTES DU TSX',\n trades: 'Transactions:',\n volume: 'Volume:',\n vwap: 'VWAP:',\n noTrades: 'Il n\\'y a pas de transaction récente',\n pagination: {\n paginationInfo: 'Affichage de {start} à {end} de {total} transactions',\n nextPage: 'Prochain',\n previousPage: 'Précédent',\n firstPage: 'Premier',\n lastPage: 'Dernier',\n }\n };\n})(inovestor.ms.stock);\n","window[\"inoMsTemplatesCache\"] = window[\"inoMsTemplatesCache\"] || {};\nwindow[\"inoMsTemplatesCache\"][\"inoMsStockRecentTrades.recentTrades.html\"] = \"

= 1000, decimalPlaces: data().volume >= 1000 ? 2 : 0\\\">

    \"; "]}