(function(){u8.Crm.Widgets.PortfolioSurveyConductModel=function(o){this.SurveyConductModel(o)};u8.Crm.Widgets.PortfolioSurveyConductModel.makeClass({name:"PortfolioSurveyConductModel",deriveFrom:u8.Crm.Widgets.SurveyConductModel});u8.Crm.Widgets.PortfolioSurveyConductModel.override({load:function(o,r){var e=this;o(function(o,t){if(t.error){return r&&r(e,t)}if(e.survey.type===0){return u8.services.notification.error($t("TXT_Question_Text_53"))}var i={processId:e.processId};u8.services.portfolios.getChartInfo(i,function(o){if(o.error){return r&&r(e,o)}if(!o.sectors){return u8.services.notification.error($t("TXT_Question_Text_54"))}e.portfolioChartInfo=o;e.calculatePortfolio(function(o){if(o.error){return r&&r(e,o)}e.portfolioResult=o.result;return r&&r(e,t)})})})}});$.extend(u8.Crm.Widgets.PortfolioSurveyConductModel.prototype,{calculatePortfolio:function(o){var r=this;u8.services.portfolios.calculate({processId:this.processId},function(e){if(e.error){return o&&o(e)}r.portfolioResult=e;return o&&o({result:e})})}})})();