{"version":3,"sources":["question.js","question-group.js","faq-viewmodel.js"],"names":["define","ko","Question","question","self","this","Answer","IsExpanded","observable","prototype","toggleExpanded","$","QuestionGroup","group","Name","Questions","map","item","IsSelected","select","unselect","FaqViewModel","data","model","QuestionGroups","Groups","SelectedGroup","length","selectGroup"],"mappings":"CAAAA,E,kBAAA,2BAAA,CAAA,qCAAA,SAAAC,GAEQ,SAAAC,EAAAC,GACI,IAAAC,EAAAC,KAIAD,EAAAF,UAFAC,EAAAA,GAAA,IAEAD,SACAE,EAAAE,OAAAH,EAAAG,OAEAF,EAAAG,WAAAN,EAAAO,WAAA,CAAA,CAAA,CACJ,CAKA,OAJAN,EAAAO,UAAAC,eAAA,WACIL,KACAE,WAAA,CADAF,KACAE,WAAA,CAAA,CACJ,EACAL,CACJ,CAAA,GCjBJF,E,kBAAA,iCAAA,CAAA,oCAAA,uBAAA,4BAAA,SAAAC,EAAAU,EAAAT,GAMQ,SAAAU,EAAAC,GACI,IAAAT,EAAAC,KAIAD,EAAAU,MAFAD,EAAAA,GAAA,IAEAC,KACAV,EAAAW,UAAAJ,EAAAK,IAAAH,EAAAE,WAAA,GAAA,SAAAE,GAEgB,OAAA,IAAAf,EAAAe,CAAA,CACJ,CAAA,EACZb,EAAAc,WAAAjB,EAAAO,WAAA,CAAA,CAAA,CACJ,CAOA,OANAI,EAAAH,UAAAU,OAAA,WACId,KAAAa,WAAA,CAAA,CAAA,CACJ,EACAN,EAAAH,UAAAW,SAAA,WACIf,KAAAa,WAAA,CAAA,CAAA,CACJ,EACAN,CACJ,CAAA,GCzBJZ,E,kBAAA,gCAAA,CAAA,uBAAA,kCAAA,SAAAW,EAAAC,GAMQ,SAAAS,EAAAC,GACI,IAAAlB,EAAAC,KAEAkB,GADAD,EAAAA,GAAA,IACAC,OAAA,GAEAnB,EAAAoB,eAAAb,EAAAK,IAAAO,EAAAE,QAAA,GAAA,SAAAR,GAEgB,OAAA,IAAAL,EAAAK,CAAA,CACJ,CAAA,EAEZb,EAAAsB,cAAAzB,GAAAO,WAAA,EAEA,EAAAJ,EAAAoB,eAAAG,QACIvB,EAAAwB,YAAAxB,EAAAoB,eAAA,EAAA,CACJ,CASJ,OAPAH,EAAAZ,UAAAmB,YAAA,SAAAf,GACI,IAAAT,EAAAC,KACAD,EAAAsB,cAAA,GACItB,EAAAsB,cAAA,EAAAN,SAAA,EAA+BP,EAAAM,OAAA,EAEnCf,EAAAsB,cAAAb,CAAA,CACJ,EACAQ,CACJ,CAAA","file":"../home-faq-d6180690ed.js","sourcesContent":["define([\"knockout\"],\r\n function (ko) {\r\n var Question = function (question) {\r\n var self = this;\r\n\r\n question = question || {};\r\n\r\n self.Question = question.Question;\r\n self.Answer = question.Answer;\r\n\r\n self.IsExpanded = ko.observable(false);\r\n }\r\n Question.prototype.toggleExpanded = function () {\r\n var self = this;\r\n self.IsExpanded(!self.IsExpanded());\r\n }\r\n return Question;\r\n }\r\n);","define([\r\n \"knockout\",\r\n \"jquery\",\r\n \"scripts/home/question\"\r\n ],\r\n function (ko, $, Question) {\r\n var QuestionGroup = function (group) {\r\n var self = this;\r\n\r\n group = group || {};\r\n\r\n self.Name = group.Name;\r\n self.Questions = $.map(group.Questions || [],\r\n function (item) {\r\n return new Question(item);\r\n });\r\n self.IsSelected = ko.observable(false);\r\n }\r\n QuestionGroup.prototype.select = function () {\r\n this.IsSelected(true);\r\n }\r\n QuestionGroup.prototype.unselect = function () {\r\n this.IsSelected(false);\r\n }\r\n return QuestionGroup;\r\n }\r\n);","define(\r\n [\r\n \"jquery\",\r\n \"scripts/home/question-group\"\r\n ],\r\n function ($, QuestionGroup) {\r\n var FaqViewModel = function(data) {\r\n var self = this;\r\n data = data || {};\r\n var model = data.model || {}; \r\n\r\n self.QuestionGroups = $.map(model.Groups || [],\r\n function (item) {\r\n return new QuestionGroup(item);\r\n });\r\n\r\n self.SelectedGroup = ko.observable();\r\n\r\n if (self.QuestionGroups.length > 0) {\r\n self.selectGroup(self.QuestionGroups[0]);\r\n }\r\n }\r\n FaqViewModel.prototype.selectGroup = function (group) {\r\n var self = this;\r\n if (self.SelectedGroup())\r\n self.SelectedGroup().unselect();\r\n group.select();\r\n self.SelectedGroup(group);\r\n }\r\n return FaqViewModel;\r\n }\r\n);"]}