{"version":3,"sources":["webpack:///../WCC.UI/App/components/avatar/person/person.html?8e4e","webpack:///../WCC.UI/App/components/avatar/person/person.scss?3ccd","webpack:///../WCC.UI/App/components/avatar/person/person.ts","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/components/avatar/person/person.scss","webpack:///../WCC.UI/App/components/avatar/person/person.html"],"names":["content","expose","__esModule","default","api","module","i","options","exports","locals","PersonAvatarVM","constructor","config","info","person","ko","flattenComputed","imageUrl","proxy","u","imageURL","isModerator","pluck","isObserver","this","avatarConfig","applyBindingsToNode","element","isNotNull","__decorate","injectable","__param","inject","wccModules","componentConfig","componentInfo","system","SystemHelpers","html","getTemplatesAndResources","forEach","node","document","head","appendChild","___CSS_LOADER_API_IMPORT___","push"],"mappings":"wIAAA,UAAO,CACC,wGACA,wDAIC,KAJ4C,EAAF,SAAYA,EAASC,GAG5D,OADAA,EADAD,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,GAE1CA,GACV,4B,qECNT,IAAII,EAAM,EAAQ,gFACFJ,EAAU,EAAQ,mJAIC,iBAFvBA,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,KAG/CA,EAAU,CAAC,CAACK,EAAOC,EAAIN,EAAS,MAG9C,IAAIO,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEPH,EAAIJ,EAASO,GAI1BF,EAAOG,QAAUR,EAAQS,QAAU,I,4vBCLnC,IAAqBC,EAArB,MAGIC,YACwCC,EACFC,GAElC,MAAMC,EAASC,EAAGC,gBAAgBJ,EAAOE,QAEnCG,EAAWH,EAAOI,MAAMC,GAAKA,EAAEC,UAE/BC,EAAcP,EAAOQ,MAAMH,GAAKA,EAAEE,aAAa,GAC/CE,EAAaT,EAAOQ,MAAMH,GAAKA,EAAEI,YAAY,GAEnDC,KAAKC,aAAe,CAChBR,SAAUA,EACVI,YAAaA,EACbE,WAAYA,GAGhBR,EAAGW,oBAAoBb,EAAKc,QAAS,CACjC,QAAWb,EAAOc,YAElB,IAAO,CACH,iBAAiB,OAxBZlB,EAAcmB,EAAA,CADlCC,cAKQC,EAAA,EAAAC,YAAOC,IAAWC,kBAClBH,EAAA,EAAAC,YAAOC,IAAWE,iBALNzB,gB,sICbrB,WAOC,KAPD,aACI,MAAM0B,EAAS,EAAQ,mCAAkBC,cAEzC,OAAO,SAAUC,GACbF,EAAOG,yBAAyBD,GAC3BE,SAAQ,SAAUC,GAAQC,SAASC,KAAKC,YAAYH,QAEhE,+B,mKCLDjC,EADkC,EAAQ,wDAChCqC,EAA4B,IAE9BC,KAAK,CAACzC,EAAOC,EAAI,+BAAgC,KAEzDD,EAAOG,QAAUA,G,mHCHjBH,EAAOG,QAFI","file":"272.d320a49668c4223b0691.js","sourcesContent":["define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./person.html\", \n \"!../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./person.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { SubscribableOrNullableValue } from 'knockout';\r\nimport { Person } from '../../../models/person';\r\nimport AvatarConfig from '../avatar/avatarConfig';\r\nimport './person.html';\r\nimport './person.scss';\r\n\r\nexport interface PersonAvatarVMConfig {\r\n person: SubscribableOrNullableValue\r\n}\r\n\r\n@injectable()\r\nexport default class PersonAvatarVM {\r\n avatarConfig: AvatarConfig\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) config: PersonAvatarVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo,\r\n ) {\r\n const person = ko.flattenComputed(config.person);\r\n\r\n const imageUrl = person.proxy(u => u.imageURL);\r\n\r\n const isModerator = person.pluck(u => u.isModerator, false);\r\n const isObserver = person.pluck(u => u.isObserver, false);\r\n\r\n this.avatarConfig = {\r\n imageUrl: imageUrl,\r\n isModerator: isModerator,\r\n isObserver: isObserver\r\n }\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'visible': person.isNotNull(),\r\n\r\n 'css': {\r\n 'person-avatar': true\r\n }\r\n });\r\n }\r\n}","define(function () {\r\n const system = require('helpers/system').SystemHelpers;\r\n\r\n return function (html) {\r\n system.getTemplatesAndResources(html)\r\n .forEach(function (node) { document.head.appendChild(node) });\r\n }\r\n});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".person-avatar{display:flex}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}