{"version":3,"sources":["webpack:///./src/views/AgentProfileListings.vue?bdc0","webpack:///./src/components/Listings.vue?eaba","webpack:///./src/views/AgentProfileListings.vue?af51","webpack:///./src/views/AgentProfileListings.vue","webpack:///./src/views/AgentProfileListings.vue?c5d8","webpack:///./src/views/AgentProfileListings.vue?4f22","webpack:///./src/components/Listings.vue?8858","webpack:///./src/components/Listings.vue","webpack:///./src/components/Listings.vue?5b1e","webpack:///./src/components/Listings.vue?c557"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","_v","_s","profile","FullName","Position","PROLISTPhoto","Preview","Url","_e","FirstName","charAt","length","toLowerCase","currentListingFilter","on","$event","hasCurrentListings","staticRenderFns","id","$route","params","updateAgent","Slugs","Resolve","then","resolved","Type","Id","html","el","document","createElement","innerHTML","innerText","about","stripHtml","AboutAgent","substring","title","description","image","Photo","undefined","Profiles","Get","$emit","SearchLevel","Profile","SearchGuid","Statuses","Current","UnderContract","OrderByStatements","CreateDateDesc","PageSize","resolveId","Analytics","FromProfile","components","Masthead","Listings","component","listings","_l","listing","key","loading","noListingsText","infiniteScroll","more","directives","name","rawName","value","callback","loadMore","throttle","threshold","expression","errored","filterUpdateDebounce","Promise","resolve","reject","Search","filter","data","Pages","Page","push","Items","Count","catch","load","update","clearTimeout","window","setTimeout","default","ListingCard","Loader"],"mappings":"kHAAA,W,kFCAA,W,yCCAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,OAAO,CAAEJ,EAAW,QAAE,CAACI,EAAG,WAAW,CAACE,YAAY,0BAA0BC,MAAM,CAAC,MAAQ,uCAAuC,oBAAmB,EAAK,QAAS,IAAO,CAACH,EAAG,mBAAmB,CAACE,YAAY,8BAA8B,CAACF,EAAG,MAAM,CAACE,YAAY,yBAAyB,CAACF,EAAG,MAAM,CAACE,YAAY,kCAAkC,CAACF,EAAG,KAAK,CAACE,YA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KAAKqE,SAAW,GAEhBiC,aAAatG,KAAKuF,sBAElBvF,KAAKuF,qBAAuBgB,OAAOC,YAAW,WAC5C,EAAK/B,SAAU,EAEf,EAAK4B,WACJ,SA1EP,GAAsC,QAEpC,yBADC,kB,6BAID,yBADC,eAAK,CAAEI,SAAS,K,qCAIjB,yBADC,eAAK,CAAEA,QAAS,wB,qCAyDjB,yBAFC,eAAM,kBACN,eAAM,oB,wCAYN,MA3EkB,EAAQ,yBAT5B,eAAU,CACTxC,WAAY,CACVyC,cAAA,KACAC,SAAA,MAEF9B,WAAY,CACV,qBAAsB,WAGL,WClC8W,I,wBCQ/XT,EAAY,eACd,EACAtE,EACA0B,GACA,EACA,KACA,WACA,MAIa,OAAA4C,E","file":"js/chunk-c9e8f86a.ce536fe4.js","sourcesContent":["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!./AgentProfileListings.vue?vue&type=style&index=0&id=5a60c2cd&scoped=true&lang=css&\"","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!./Listings.vue?vue&type=style&index=0&id=dae1b5c4&scoped=true&lang=css&\"","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:{\"image\":\"/assets/images/photos/profile-bg.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('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))])]),(_vm.profile.PROLISTPhoto)?_c('div',{staticClass:\"agent-profile__header__image\"},[_c('img',{staticClass:\"agent-profile__img\",attrs:{\"src\":_vm.profile.PROLISTPhoto.Preview.Url}})]):_vm._e()])])],1),(_vm.hasCurrentListings)?_c('ContentRow',[_c('ContentContainer',[_c('SectionTitle',[_vm._v(_vm._s(_vm.profile.FirstName)+_vm._s(_vm.profile.FirstName.charAt(_vm.profile.FirstName.length - 1).toLowerCase() === 's' ? '\\'' : '\\'s')+\" Listings\")]),_c('Listings',{attrs:{\"filter\":_vm.currentListingFilter},on:{\"got_listing_count\":function($event){_vm.hasCurrentListings = $event > 0}}})],1)],1):_vm._e()]:_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\n\n\n\n\nimport { Component, Mixins } from 'vue-property-decorator';\nimport { Profile, ListingStatus, WebsiteLevel } from 'client-website-ts-library/types';\nimport { API } from 'client-website-ts-library/services';\nimport { ListingFilter, ListingOrderBy } from 'client-website-ts-library/filters';\nimport { AsyncView, RouteMeta } from 'client-website-ts-library/plugins';\n\nimport Masthead from '@/components/Common/Masthead.vue';\nimport Listings from '@/components/Listings.vue';\nimport { AnalyticsEventObject } from 'client-website-ts-library/services/Analytics';\n\n@Component({\n components: {\n Masthead,\n Listings,\n },\n})\nexport default class AgentProfile extends Mixins(AsyncView) {\n private profile: Profile | null = null;\n\n private currentListingFilter: ListingFilter | null = null;\n\n private hasCurrentListings = true;\n\n resolveId() {\n const { id } = this.$route.params;\n\n if (id.length === 36) {\n // If the ID is 36 long we'll treat it as a guid\n\n this.updateAgent(id);\n } else {\n API.Slugs.Resolve(id).then((resolved) => {\n if (resolved.Type === 'Profile') {\n this.updateAgent(resolved.Id);\n }\n });\n }\n }\n\n stripHtml(html: string): string {\n const el = document.createElement('div');\n\n el.innerHTML = html;\n\n return el.innerText;\n }\n\n head(): RouteMeta | null {\n if (this.profile === null) return null;\n\n let about = this.stripHtml(this.profile.AboutAgent);\n\n if (about.length > 156) {\n about = `${about.substring(0, 156)}...`;\n }\n\n return {\n title: `${this.profile.FullName}'s Listings - ${this.profile.Position}`,\n description: about,\n image: this.profile.Photo ? this.profile.Photo.Preview.Url : undefined,\n };\n }\n\n updateAgent(id: string) {\n API.Profiles.Get(id).then((profile) => {\n this.profile = profile;\n\n this.$emit('updateView');\n\n this.currentListingFilter = new ListingFilter({\n SearchLevel: WebsiteLevel.Profile,\n SearchGuid: this.profile!.Id,\n Statuses: [\n ListingStatus.Current,\n ListingStatus.UnderContract,\n ],\n OrderByStatements: [\n ListingOrderBy.CreateDateDesc,\n ],\n PageSize: 6,\n });\n });\n }\n\n mounted() {\n this.resolveId();\n }\n\n getAnalyticsData(): AnalyticsEventObject | null {\n if (this.profile === null) return null;\n\n return AnalyticsEventObject.FromProfile(this.profile);\n }\n}\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!./AgentProfileListings.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!./AgentProfileListings.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AgentProfileListings.vue?vue&type=template&id=5a60c2cd&scoped=true&\"\nimport script from \"./AgentProfileListings.vue?vue&type=script&lang=ts&\"\nexport * from \"./AgentProfileListings.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./AgentProfileListings.vue?vue&type=style&index=0&id=5a60c2cd&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 \"5a60c2cd\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"listings\"},[(_vm.listings.length)?_c('Cards',{staticClass:\"cards--listings\"},_vm._l((_vm.listings),function(listing){return _c('ListingCard',{key:listing.Id,attrs:{\"listing\":listing}})}),1):(!_vm.loading)?_c('div',{staticClass:\"listings__no-listings\"},[_vm._v(\" \"+_vm._s(_vm.noListingsText)+\" \")]):_vm._e(),_c('Loader',{staticClass:\"listings__loader\",attrs:{\"loading\":_vm.loading}}),(_vm.infiniteScroll && _vm.more)?_c('div',{directives:[{name:\"observe-visibility\",rawName:\"v-observe-visibility\",value:({callback: _vm.loadMore, throttle: 1000, threshold: 0.5}),expression:\"{callback: loadMore, throttle: 1000, threshold: 0.5}\"}],staticClass:\"listings__visibility-checker\"}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { ObserveVisibility } from 'vue-observe-visibility';\nimport { Component, Vue, Prop, Watch } from 'vue-property-decorator';\nimport { ListingFilter } from 'client-website-ts-library/filters/ListingFilter';\nimport { Listing } from 'client-website-ts-library/types/Listing';\nimport { API } from 'client-website-ts-library/services';\n\nimport ListingCard from './ListingCard.vue';\nimport Loader from './UI/Loader.vue';\n\n@Component({\n components: {\n ListingCard,\n Loader,\n },\n directives: {\n 'observe-visibility': ObserveVisibility,\n },\n})\nexport default class Listings extends Vue {\n @Prop()\n private readonly filter!: ListingFilter;\n\n @Prop({ default: true })\n private readonly infiniteScroll!: boolean;\n\n @Prop({ default: 'No listings found.' })\n private readonly noListingsText!: string;\n\n private loading = false;\n\n private errored = false;\n\n private listings: Listing[] = [];\n\n private more = true;\n\n load(): Promise {\n return new Promise((resolve, reject) => {\n if (this.loading || !this.more) resolve(false);\n\n this.loading = true;\n\n API.Listings.Search(this.filter).then((data) => {\n this.more = data.Pages > this.filter.Page;\n\n this.listings.push(...data.Items);\n\n resolve();\n\n this.$emit('got_listing_count', data.Count);\n }).catch(reject);\n });\n }\n\n loadMore(): void {\n if (this.loading) return;\n\n this.filter.Page += 1;\n\n this.load().then(() => {\n this.loading = false;\n });\n }\n\n update(): void {\n this.listings = [];\n this.more = true;\n this.loading = false;\n\n this.load().then(() => {\n this.loading = false;\n });\n }\n\n mounted() {\n this.update();\n }\n\n private filterUpdateDebounce: number | undefined = undefined;\n\n @Watch('filter.Suburbs')\n @Watch('filter.SearchId')\n handleFilterParamsUpdated(): void {\n this.loading = true;\n this.listings = [];\n\n clearTimeout(this.filterUpdateDebounce);\n\n this.filterUpdateDebounce = window.setTimeout(() => {\n this.loading = false;\n\n this.update();\n }, 1000);\n }\n}\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!./Listings.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!./Listings.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Listings.vue?vue&type=template&id=dae1b5c4&scoped=true&\"\nimport script from \"./Listings.vue?vue&type=script&lang=ts&\"\nexport * from \"./Listings.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Listings.vue?vue&type=style&index=0&id=dae1b5c4&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 \"dae1b5c4\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}