{"version":3,"sources":["webpack:///./src/views/AgentProfileAppraisal.vue?56b9","webpack:///./node_modules/client-website-ts-library/plugins/view/index.ts","webpack:///./src/views/AgentProfileAppraisal.vue?1752","webpack:///./src/views/AgentProfileAppraisal.vue","webpack:///./src/views/AgentProfileAppraisal.vue?711c","webpack:///./src/views/AgentProfileAppraisal.vue?e408"],"names":["prolistAnalyticsService","ServiceManager","Get","Analytics","headService","Require","Head","evt","obj","this","getAnalyticsEvent","call","getAnalyticsData","$route","path","name","undefined","triggerAnalyticsEvent","event","GetAll","forEach","adapter","Record","result","head","bind","Promise","then","meta","Update","UpdateWithStatic","requestAnimationFrame","updateHead","updateAnalytics","$on","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","_v","_s","profile","FullName","Position","formData","_e","staticRenderFns","id","params","length","updateAgent","Slugs","Resolve","resolved","Type","Id","html","el","document","createElement","innerHTML","innerText","about","stripHtml","AboutAgent","substring","title","description","image","Photo","Preview","Url","Profiles","$emit","Items","Context","EnquiryTargetProfile","ClientWebsiteId","Website","WebsiteId","Settings","WebsiteLevel","resolveId","FromProfile","components","Masthead","Form","component"],"mappings":"kHAAA,yBAAof,EAAG,G,mSCcjf,EAAN,yG,0BACY,EAAAA,wBAA0BC,EAAA,KAAeC,IAA6B,OAAYC,UAAW,2BAC7F,EAAAC,YAAcH,EAAA,KAAeI,QAAqB,OAAYC,MAF1E,mEAKI,IAAIC,EAA6B,KAC7BC,EAAmC,KAED,qBAA3BC,KAAKC,kBACdH,EAAME,KAAKC,kBAAkBC,KAAKF,MACO,qBAA1BA,KAAKG,mBACpBJ,EAAMC,KAAKG,iBAAiBD,KAAKF,OAGvB,OAARF,IAAcA,EAAM,IAAIJ,EAAA,KAAkBM,KAAKI,OAAOC,KAAML,KAAKI,OAAOE,MAAQ,GAAIP,QAAOQ,IAE/FP,KAAKQ,sBAAsBV,KAhB/B,4CAmB+BW,GAC3BjB,EAAA,KAAekB,OAA0B,OAAYhB,WAAWiB,SAAQ,SAACC,GACv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c,OAAOH,QAAQE,SAAUC,mBA5D/C,gCAkEI5E,KAAK6E,cAlET,yCAsEI,OAAqB,OAAjB7E,KAAKoC,QAAyB,KAE3B1C,EAAA,KAAqBoF,YAAY9E,KAAKoC,aAxEjD,GAA0C,eAAO,SAA5B,EAAY,yBANhC,eAAU,CACT2C,WAAY,CACVC,WAAA,KACAC,OAAA,SAGiB,WCzC2X,I,wBCQ5YC,EAAY,eACd,EACAxD,EACAe,GACA,EACA,KACA,WACA,MAIa,aAAAyC,E","file":"js/chunk-7d23f0a8.4f9afc3a.js","sourcesContent":["import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=style&index=0&id=c5bdb734&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=style&index=0&id=c5bdb734&scoped=true&lang=css&\"","import Vue from \"vue\";\r\nimport { Component } from \"vue-property-decorator\";\r\nimport { AnalyticsEvent, AnalyticsEventObject, AnalyticsPageView, IAnalyticsAdapter, PROListAnalyticsAdapter } from \"../../services/Analytics\";\r\nimport { HeadService } from \"../../services/HeadService\";\r\nimport { ServiceManager, ServiceType } from \"../../services/ServiceManager\";\r\nimport { RouteMeta } from \"../meta\";\r\n\r\ninterface ViewBase {\r\n getAnalyticsEvent?(): AnalyticsEvent | null;\r\n getAnalyticsData?(): AnalyticsEventObject | null;\r\n head?(): RouteMeta | Promise | null;\r\n}\r\n\r\n@Component\r\nclass ViewBase extends Vue {\r\n protected prolistAnalyticsService = ServiceManager.Get(ServiceType.Analytics, 'PROListAnalyticsAdapter');\r\n protected headService = ServiceManager.Require(ServiceType.Head)!;\r\n\r\n public updateAnalytics() {\r\n let evt: AnalyticsEvent | null = null;\r\n let obj: AnalyticsEventObject | null = null;\r\n\r\n if (typeof this.getAnalyticsEvent !== 'undefined') {\r\n evt = this.getAnalyticsEvent.call(this);\r\n } else if(typeof this.getAnalyticsData !== 'undefined') {\r\n obj = this.getAnalyticsData.call(this);\r\n }\r\n\r\n if (evt === null) evt = new AnalyticsPageView(this.$route.path, this.$route.name || '', obj || undefined);\r\n\r\n this.triggerAnalyticsEvent(evt);\r\n }\r\n\r\n public triggerAnalyticsEvent(event: AnalyticsEvent) {\r\n ServiceManager.GetAll(ServiceType.Analytics).forEach((adapter) => {\r\n adapter.Record(event);\r\n });\r\n }\r\n\r\n public triggerCustomAnalyticsEvent(event: AnalyticsEvent) {\r\n if (this.prolistAnalyticsService !== null) this.prolistAnalyticsService.Record(event);\r\n }\r\n\r\n protected updateHead() {\r\n if ('head' in this) {\r\n const result = this.head!.bind(this)();\r\n\r\n if(result instanceof Promise) {\r\n result.then((meta: RouteMeta | null) => {\r\n this.headService.Update(meta);\r\n });\r\n } else {\r\n this.headService.Update(result as RouteMeta | null);\r\n }\r\n } else {\r\n this.headService.UpdateWithStatic(this.$route.path);\r\n }\r\n }\r\n}\r\n\r\n@Component\r\nclass View extends ViewBase {\r\n public mounted() {\r\n requestAnimationFrame(() => {\r\n this.updateHead();\r\n this.updateAnalytics();\r\n });\r\n }\r\n}\r\n\r\n@Component\r\nclass AsyncView extends ViewBase {\r\n public mounted() {\r\n this.$on('updateView', () => {\r\n requestAnimationFrame(() => {\r\n this.updateHead();\r\n this.updateAnalytics();\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport {\r\n View,\r\n AsyncView\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Page',[(_vm.profile)?[_c('Masthead',{staticClass:\"agent-profile__masthead\",attrs:{\"title\":\"Get an appraisal with\",\"image\":\"/assets/images/default/masthead.jpg\",\"relative-content\":true,\"darken\":true}},[_c('ContentContainer',{staticClass:\"agent-profile__header-wrap\"},[_c('div',{staticClass:\"agent-profile__header\"},[_c('div',{staticClass:\"agent-profile__header__details\"},[_c('h2',{staticClass:\"agent-profile__position\"},[_vm._v(\"Get an appraisal with\")]),_c('h1',{staticClass:\"agent-profile__name\"},[_vm._v(_vm._s(_vm.profile.FullName))]),_c('h2',{staticClass:\"agent-profile__position\"},[_vm._v(_vm._s(_vm.profile.Position))])])])])],1),_c('ContentRow',[_c('ContentContainer',[(_vm.formData)?_c('Form',{attrs:{\"context\":_vm.formData,\"type\":\"Generic.AppraisalRequestForm\"}}):_vm._e()],1)],1)]:_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Mixins } from 'vue-property-decorator';\r\nimport { Profile, ListingStatus, WebsiteLevel, Context } from 'client-website-ts-library/types';\r\nimport { API, Config } from 'client-website-ts-library/services';\r\nimport { AsyncView, RouteMeta } from 'client-website-ts-library/plugins';\r\n\r\nimport Masthead from '@/components/Common/Masthead.vue';\r\nimport { AnalyticsEventObject } from 'client-website-ts-library/services/Analytics';\r\nimport Form from '@/components/Forms/Form.vue';\r\nimport { ContextItemType } from 'client-website-ts-library/types/Context';\r\n\r\n@Component({\r\n components: {\r\n Masthead,\r\n Form,\r\n },\r\n})\r\nexport default class AgentProfile extends Mixins(AsyncView) {\r\n private profile: Profile | null = null;\r\n\r\n private formData: Context | null = null;\r\n\r\n resolveId() {\r\n const { id } = this.$route.params;\r\n\r\n if (id.length === 36) {\r\n // If the ID is 36 long we'll treat it as a guid\r\n\r\n this.updateAgent(id);\r\n } else {\r\n API.Slugs.Resolve(id).then((resolved) => {\r\n if (resolved.Type === 'Profile') {\r\n this.updateAgent(resolved.Id);\r\n }\r\n });\r\n }\r\n }\r\n\r\n stripHtml(html: string): string {\r\n const el = document.createElement('div');\r\n\r\n el.innerHTML = html;\r\n\r\n return el.innerText;\r\n }\r\n\r\n head(): RouteMeta | null {\r\n if (this.profile === null) return null;\r\n\r\n let about = this.stripHtml(this.profile.AboutAgent);\r\n\r\n if (about.length > 156) {\r\n about = `${about.substring(0, 156)}...`;\r\n }\r\n\r\n return {\r\n title: `Get an Appraisal - ${this.profile.FullName} - ${this.profile.Position}`,\r\n description: about,\r\n image: this.profile.Photo ? this.profile.Photo.Preview.Url : undefined,\r\n };\r\n }\r\n\r\n updateAgent(id: string) {\r\n this.formData = null;\r\n\r\n API.Profiles.Get(id).then((profile) => {\r\n this.profile = profile;\r\n\r\n this.$emit('updateView');\r\n\r\n this.formData = {\r\n Items: [{\r\n Type: ContextItemType.EnquiryTargetProfile,\r\n Id: profile.Id,\r\n }],\r\n ClientWebsiteId: Config.Website.Id,\r\n WebsiteId: Config.Website.Settings!.WebsiteId,\r\n WebsiteLevel: Config.Website.Settings!.WebsiteLevel,\r\n };\r\n });\r\n }\r\n\r\n mounted() {\r\n this.resolveId();\r\n }\r\n\r\n getAnalyticsData(): AnalyticsEventObject | null {\r\n if (this.profile === null) return null;\r\n\r\n return AnalyticsEventObject.FromProfile(this.profile);\r\n }\r\n}\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AgentProfileAppraisal.vue?vue&type=template&id=c5bdb734&scoped=true&\"\nimport script from \"./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"\nexport * from \"./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./AgentProfileAppraisal.vue?vue&type=style&index=0&id=c5bdb734&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"c5bdb734\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}