PageSourceSearch

https://www.fazwaz.co.th/build/js/chunks/NotificationPreferences.CVWrcxrl.js

js fazwaz.co.th collected 2026-10-02 21:36:24 UTC 8,529 bytes, 1 lines download raw bytes

1import{mapActions as r,mapState as l}from"./vuex.esm.browser.CyPgdje4.js";import{a}from"./element-ui.common.DLZOYq6p.js";import o from"./index.2Zt3HTln.js";import{T as m}from"./TuneRecommendations.BdprctVL.js";import{n as c}from"./_plugin-vue2_normalizer.D8LNvuNP.js";import"./isSymbol.CCC4HJaK.js";import"./vdom.yKOfpNgw.js";import"./vue.esm.o6jRrDkK.js";import"./networking.B2HGPy6s.js";import"./lazy-module.B4indqDa.js";import"./index.Dbgga_3F.js";import"./user.B2Swm8sd.js";import"./search.lVRWKT8r.js";import"./form.QSPCiVc1.js";import"./index.Df8aZhb0.js";import"./date.eYLZhx9n.js";import"./index.Cf2kvpR8.js";import"./getters.dtLDPNVp.js";import"./get.CGgyJR4r.js";import"./get.zby32VTy.js";import"./set.CbdmvOZS.js";import"./_assignValue.BzjPl8rz.js";import"./_defineProperty.BfkavV5c.js";import"./_isIndex.CQd-kExF.js";import"./_setToArray.C4WVGcsu.js";import"./_baseFindIndex.BxXzinCa.js";import"./_Set.B-Pz0seo.js";import"./index.DlxeQwLc.js";import"./joi-browser.CNwno9hB.js";import"./isNull.W24cW0Eh.js";import"./parsePhoneNumber_.9O12Jsb3.js";import"./user.BmGNNG4B.js";import"./validator.CqRVY6-F.js";import"./parsePhoneNumber.BpUq7HAz.js";import"./findIndex.C5imedhO.js";import"./findIndex.CZI1vTuP.js";import"./_baseIteratee.C2fYVCWY.js";import"./_getAllKeys.B18PlNjK.js";import"./isTypedArray.fFt0YmxV.js";import"./toNumber.x9MXpNBe.js";import"./intersectObjects.BgZgddSt.js";import"./debounce.BgibKyH_.js";import"./phone.DgPqiF2d.js";import"./DropDownInput.B9UpsRRh.js";import"./result.ChwR-x-O.js";import"./find.fq3cSto3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"v3.302.1"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c6035613-3710-43b9-9fd5-a3c96dec9efc",t._sentryDebugIdIdentifier="sentry-dbid-c6035613-3710-43b9-9fd5-a3c96dec9efc")}catch{}})();const f={name:"SmsNotificationPreferences",props:{smsNotification:{type:Object,default:()=>({options:[]})}},components:{"el-switch":a.Switch},data(){return{}},beforeCreate(){const t=this.$store;t&&t.state&&t.state.users||t.registerModule("users",o)},methods:{...r("users",["updateNotifications"]),getActiveOptions(t){return t.filter(e=>e.active!==!1)},toggleSwitch(t,e){this.updateNotifications({key:"sms_notifications_90",value:!t.value,type:e})}}};var u=function(){var e=this,i=e._self._c;return i("div",e._l(e.getActiveOptions(e.smsNotification.options),function(s){return i("div",{key:s.key,staticClass:"block-item preference"},[i("label",{staticClass:"block-item-label"},[i("strong",{staticClass:"block-item-strong"},[e._v(e._s(s.title))]),s.subTitle?i("span",[e._v(e._s(s.subTitle)),i("br")]):e._e(
1),i("span",{staticClass:"typeLowlight",domProps:{innerHTML:e._s(s.description)}})]),i("el-switch",{attrs:{"active-color":"#13ce66",value:s.value,"active-value":!0,"inactive-value":!1},on:{change:function(n){return e.toggleSwitch(s,"sms")}}})],1)}),0)},d=[],p=c(f,u,d,!1,null,"c609e40e");const v=p.exports;Vue.use(a.Loading.directive);const _={name:"NotificationPreferences",props:["searchUrl"],components:{TuneRecommendations:m,"el-switch":a.Switch,SmsNotificationPreferences:v},data(){return{activeTab:"sale",isMobile:window.site.isMobile,switchValues:{}}},beforeCreate(){const t=this.$store;t&&t.state&&t.state.users||t.registerModule("users",o)},async mounted(){await this.getNotificationPreferences();const t=new URL(window.location),e=t.searchParams.get("unsub")??"",i=t.searchParams.get("recommendations")??void 0;let s=e.split("_");s=s.length>1?s[0]:i,s&&(this.activeTab=s),i&&this.showRecommendationSettingsPopup(i),e&&this.unsubscribeFromNotifications(e,s)},methods:{...r("users",["getNotificationPreferences","updateNotifications"]),showRecommendationSettingsPopup(t){this.$modal.show("tune-recommendations-modal-"+t)},saveRecommendationSettings(t){this.updateNotifications({recommendationSettings:t})},isRecommendations(t){return t.indexOf("_recommendations")>0},switchTab(t){this.activeTab=t},getActiveOptions(t){return t.filter(e=>e.active!==!1)},toggleSwitch(t,e){this.updateNotifications({key:t.key,value:!t.value,type:e})},unsubscribeFromNotifications(t,e){this.updateNotifications({unsub:t,value:!1,unsubType:e})}},computed:{...l("users",{notificationPreferences:t=>t.notificationPreferences,translate:t=>t.translate,loading:t=>t.isGettingNotificationPreferences,success:t=>t.isGettingNotificationPreferencesSuccess}),filteredPreferences(){return Object.fromEntries(Object.entries(this.notificationPreferences).filter(([t])=>t!=="sms"))}}};var b=function(){var e=this,i=e._self._c;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"wrapper-content"},[i("h1",{staticClass:"wrapper-content__title"},[e._v(e._s(e.translate.notificationPreferencesViewHeader))]),i("div",{staticClass:"notification-sub-title"},[i("span",[e._v(e._s(e.translate.notificationPreferencesSubtitle))]),i("a",{staticClass:"typeLowlight",attrs:{href:""},on:{click:function(s){return s.preventDefault(),e.unsubscribeFromNotifications("all")}}},[e._v(e._s(e.translate.unsubscribeFromAllNotifications))])]),i("div",{staticClass:"tabs-Notifications"},e._l(e.filteredPreferences,function(s,n){return i("span",{key:n,class:{"tabs-Notifications__item":!0,"tabs-Notifications__item--active":e.activeTab===n},on:{click:function(w){return e.switchTab(n)}}},[e._v(" "+e._s(s.title)+" ")])}),0),e.activeTab==="sale"?i("div",e._l(e.getActiveOptions(e.notificationPreferences.sale.options),function(s){return i("div",{key:s.key,staticClass:"block-item preference"},[i("label",{staticClass:"block-item-label"},[i("strong",{staticClass:"block-item-strong"},[e._v(e._s(s.title))]),s.subTitle?i("span",[e._v(e._s(s.subTitle)),i("br")]):e._e(
1),i("span",{staticClass:"typeLowlight",domProps:{innerHTML:e._s(s.description)}})]),i("el-switch",{attrs:{"active-color":"#13ce66",value:s.value,"active-value":!0,"inactive-value":!1},on:{change:function(n){return e.toggleSwitch(s,"sale")}}}),e.isRecommendations(s.key)&&s.value?i("a",{staticClass:"tune-recommendations-btn",attrs:{href:""},on:{click:function(n){return n.preventDefault(),e.showRecommendationSettingsPopup("sale")}}},[e._v(" "+e._s(e.translate.recommendationOptions)+" ")]):e._e()],1)}),0):e._e(),e.activeTab==="rental"?i("div",e._l(e.getActiveOptions(e.notificationPreferences.rental.options),function(s){return i("div",{key:s.key,staticClass:"block-item preference"},[i("label",{staticClass:"block-item-label"},[i("strong",{staticClass:"block-item-strong"},[e._v(e._s(s.title))]),s.subTitle?i("span",[e._v(e._s(s.subTitle)),i("br")]):e._e(),i("span",{staticClass:"typeLowlight",domProps:{innerHTML:e._s(s.description)}})]),i("el-switch",{attrs:{"active-color":"#13ce66",value:s.value,"active-value":!0,"inactive-value":!1},on:{change:function(n){return e.toggleSwitch(s,"rental")}}}),e.isRecommendations(s.key)&&s.value?i("a",{staticClass:"tune-recommendations-btn",attrs:{href:""},on:{click:function(n){return n.preventDefault(),e.showRecommendationSettingsPopup("rental")}}},[e._v(" "+e._s(e.translate.recommendationOptions)+" ")]):e._e()],1)}),0):e._e(),e.activeTab==="sale"?i("div",[i("div",{staticClass:"link-footer"},[i("a",{staticClass:"typeLowlight",attrs:{href:""},on:{click:function(s){return s.preventDefault(),e.unsubscribeFromNotifications("sale")}}},[e._v(e._s(e.translate.unsubscribeFromSaleNotifications))])])]):e._e(),e.activeTab==="rental"?i("div",[i("div",{staticClass:"link-footer"},[i("a",{staticClass:"typeLowlight",attrs:{href:""},on:{click:function(s){return s.preventDefault(),e.unsubscribeFromNotifications("rental")}}},[e._v(e._s(e.translate.unsubscribeFromRentNotifications))])])]):e._e(),i("tune-recommendations",{attrs:{"is-for-sale":!1,"user-top-regions":e.notificationPreferences.rental.recommendationSettings.regions,"max-price-options":e.notificationPreferences.rental.recommendationSettings.maxPrice,"on-save":e.saveRecommendationSettings,translates:e.translate.recommendationSettingsModal}}),i("tune-recommendations",{attrs:{"is-for-sale":!0,"user-top-regions":e.notificationPreferences.sale.recommendationSettings.regions,"max-price-options":e.notificationPreferences.sale.recommendationSettings.maxPrice,"on-save":e.saveRecommendationSettings,translates:e.translate.recommendationSettingsModal}}),i("SmsNotificationPreferences",{attrs:{"sms-notification":e.notificationPreferences.sms}})],1)},g=[],h=c(_,b,g,!1,null,null);const de=h.exports;export{de as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.