PageSourceSearch

https://www.ria.com/_nuxt4/pUyaClOy.js

js ria.com collected 2026-10-01 10:34:36 UTC 12,380 bytes, 1 lines download raw bytes

1import{_ as $}from"./C2hCVKqV.js";import{aG as b,aI as f,aJ as c,bc as A,aT as I,aQ as N,aR as O,aY as U,aK as s,a_ as k,b3 as B,aM as m,aL as d,b2 as C,a$ as M,aP as g,aZ as V,aN as y,aS as u,aX as p,b1 as S}from"./Duq0Yqab.js";import{S as z}from"./8_WIQb_j.js";import{T as E}from"./b6yWvfrj.js";import{P as L}from"./CGI8e2u0.js";import{_ as R}from"./D31hZUl6.js";import{S as j}from"./BGtVNfBW.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:"bb082cde4d1a2072e36f45763ce4b2e1c8ea0cc5"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="5a39dd6b-a05a-4fc2-8691-0805b88ccd47",t._sentryDebugIdIdentifier="sentry-dbid-5a39dd6b-a05a-4fc2-8691-0805b88ccd47")})()}catch{}const F={name:"EmptySection"},q={class:"pt-48 pb-48 text-c"};function H(t,n,a,l,e,i){return c(),f("div",q,[A(t.$slots,"empty-block-content")])}const Y=Object.assign(b(F,[["render",H]]),{__name:"CommonEmptyBlock"}),G={name:"TabsContent",props:{activeTab:{type:[String,Number],required:!0}}},J={class:"tabs-content"};function K(t,n,a,l,e,i){return c(),f("div",J,[A(t.$slots,"default",{activeTab:a.activeTab})])}const Q=Object.assign(b(G,[["render",K]]),{__name:"CommonTabsContent"}),W={setup(){return{nuxtApp:I()}},name:"NotificationContent",props:{notifications:{type:Array},selectedOption:Number},emits:["update-params","updateSelectAll"],data(){return{locale:this.$i18n.locale,activeItem:"all_notifications",openedId:null,selectedIds:[]}},watch:{selectedOption(t){t===2?this.selectAllNotifications():t||(this.selectedIds=[])},selectedIds(t){t.length===this.notifications.length?this.$emit("updateSelectAll",2):t.length<this.notifications.length&&this.$emit("updateSelectAll",1)},notifications(){this.selectedIds=[]}},methods:{isActive(t){return this.activeItem===t},toggleSelection(t){const n=this.selectedIds.indexOf(t);n===-1?this.selectedIds.push(t):this.selectedIds.splice(n,1)},selectAllNotifications(){const t=this.notifications;this.selectedIds=t.map(n=>n.id)},async deleteNotification(t){await this.$axios.post("psp/cabinet/notifications/deleteNotification/",{id:t}),this.$nextTick(()=>{this.$emit("update-params")})},async toggleBlock(t,n){this.openedId=this.openedId===t?null:t;const a=this.notifications.findIndex(e=>e.id===t);let l=0;a!==-1&&(l=this.notifications[a].is_open),l||await this.$axios.post("psp/cabinet/notifications/executeNotifications/",{ids:[t],notification_ids:[n],action:2,select_all:1}),a!==-1&&(this.notifications[a].is_open=1)},getSvgIconName(t){switch(t){case 1:return"notice-system";case 2:return"notice-status";case 3:return"notice-top";case 4:return"notice-mail";case 5:return"notice-shop";default:return"notice-system"}},getSvgIconClass(t){switch(t){case 1:return"system";case 2:return"status";case 3:return"top";case 4:return"mail";case 5:return"shop";default:return"system"}},formattedDate(t){return this.nuxtApp.$utils?this.nuxtApp.$utils.formattedDate(t):t}}},X={class:"notification-section"},Z=["data-id","onClick"],tt={class:"structure-row gap-14"},et={class:"shrink-0 notification-section__check"},nt=["id","value","onClick"],it=["for"],st={class:"notification-section__icon shrink-0 mhide"},ot={class:"flex-1"},at={class:"notification-section__title"},ct={class:"notification-section__nav structure-row ai-center gap-12 shrink-0"},lt={class:"size13 grey date"},rt={class:"structure-row gap-6 ai-center"},dt=["onClick"],ut={class:"notification-section__description"},ht=["innerHTML"],pt=["href"];function ft(t,n,a,l,e,i){const r=R;return c(),f("section",X,[(c(!0),f(N,null,O(a.notifications,o=>(c(),f("div",{class:"notification-section__item","data-id":o.id,key:o.id,onClick:U(_=>i.toggleBlock(o.id,o.notification_id),["stop"])},[s("div",{class:C(["structure-row gap-16 jc-between py-14 relative notification-section__box",{read:o.is_open===1}])},[s("div",tt,[s("div",et,[k(s("input",{type:"checkbox",name:"",id:`
1item-${o.id}`,"onUpdate:modelValue":n[0]||(n[0]=_=>e.selectedIds=_),value:o.id,onClick:_=>i.toggleSelection(o.id)},null,8,nt),[[B,e.selectedIds]]),s("label",{for:`item-${o.id}`},null,8,it)]),s("div",st,[m(r,{icon:i.getSvgIconName(o.type_id),classes:"size20 svg-icon-notice--"+i.getSvgIconClass(o.type_id)},null,8,["icon","classes"])]),s("div",ot,[s("div",at,d(o.text_uk),1)])]),s("div",ct,[s("div",lt,d(i.formattedDate(o.created_at)),1),s("div",rt,[s("span",{class:C(["mp-symbol arrow",{active:e.openedId===o.id}])},null,2),s("span",{class:"mp-symbol close",onClick:_=>i.deleteNotification(o.id)},null,8,dt)])])],2),k(s("div",ut,[s("span",{class:"display-b mb-10 break-all",innerHTML:o.description_uk},null,8,ht),o.description_urls?(c(),f("a",{key:0,href:o.description_urls.url_uk,target:"_blank",class:"button w-content size16 _transparent"},d(o.description_urls.text_uk),9,pt)):g("",!0)],512),[[M,e.openedId===o.id]])],8,Z))),128))])}const _t=Object.assign(b(W,[["render",ft],["__scopeId","data-v-d8fe62f6"]]),{__name:"NotificationsNotificationContent"}),mt={setup(){return{nuxtApp:I()}},name:"notifications",components:{TabsContent:Q,TabsNav:E,Select:z,Pagination:L,EmptyBlock:Y,NotificationContent:_t,ShowMore:j,Loader:V},async mounted(){await this.sendLabel()},data(){return{loader:0,activeItem:0,isVisible:!1,openedId:null,page:1,notifications:[],notifications_count:[],pagination:{},selectedOption:1,selectedAction:0,isButtonDisabled:!0}},async created(){this.page=(this._.provides[S]||this.$route).query.page,await this.fetchData()},computed:{locale(){return this.$i18n.locale},tabItems(){const t=this.getTotalCount(0),n=this.getTotalCount(1);return[{key:"all",label:this.$t("notifications.All"),slot:"all",count:n+t},{key:"unread",label:this.$t("notifications.Unread"),slot:"unread",count:t},{key:"read",label:this.$t("notifications.Read"),slot:"read",count:n}]},allNotifications(){return this.notifications},unreadNotifications(){return this.notifications.filter(t=>t.is_open===0)},readNotifications(){return this.notifications.filter(t=>t.is_open===1)}},methods:{async fetchData(){this.loader=1;let{data:t}=await this.$axios.get(`psp/cabinet/notifications/getAllNotifications/?page=${this.page}&read=${this.activeItem}`);this.pagination=t.pagination,this.notifications=t.notifications.data,this.notifications_count=t.notifications_count,this.loader=0},toggleVisible(){this.isVisible=!this.isVisible},toggleBlock(t){this.openedId=this.openedId===t?null:t},handleSelectChange(t){this.selectedOption=Number(this.normalizeSelectValue(t))},handleSelectChangeAction(t){this.selectedAction=Number(this.normalizeSelectValue(t)),this.updateButtonDisabledState()},updateButtonDisabledState(){this.selectedAction===1||this.selectedAction===2?this.isButtonDisabled=!1:this.isButtonDisabled=!0},async executeAction(){this.loader=1;const t=Number(this.selectedOption),n=Number(this.selectedAction),a=this.$refs.content,l=Array.isArray(a)?a[0]:a;let e=[];
1if(t===1){const r=Array.isArray(l?.selectedIds)?l.selectedIds:[];e=Array.isArray(r[0])?r[0]:r}else(t===2||t===3)&&(e=this.notifications.map(r=>r.id));const i={action:n,select_all:t,ids:[e]};await this.$axios.post("psp/cabinet/notifications/executeNotifications/",i),this.page=1,this.selectedOption=3,this.selectedAction=0,this.updateButtonDisabledState(),await this.fetchData(),this.loader=0},async showMore(){const t=this.pagination.nextPage;t&&t<=this.pagination.maxPage&&(this.page=t,await this.updateRouteAndFetchData(),this.scrollToTop())},async handlePageChanged(t){this.page=t<2?1:t,await this.updateRouteAndFetchData(),this.scrollToTop()},async updateRouteAndFetchData(){const t=this.page>1?{page:this.page}:{};await this.$router.push({path:(this._.provides[S]||this.$route).path,query:t}),await this.fetchData()},scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})},async sendLabel(){{const n=window.location.href;var t={event_id:1552,project_id:5,form_type:3,menu_id:10,category_id:n.includes("zapchasti")?1:0,user_id:this.$store.state?.auth?.user_id||0,web_id:this.$store.state?.auth?.web_id||0,browser_height:window.innerHeight,browser_width:window.innerWidth,current_url:n,previous_url:document.referrer||""};await this.nuxtApp.$utils.analyticsService(t)}},onTabChange(t){this.activeItem=t,this.page=1,this.loader=1,this.fetchData()},getTotalCount(t){const n=this.notifications_count.find(a=>a.is_open===t);return n?n.count:0},normalizeSelectValue(t){return t&&t.target?t.target.value:t}}},gt={class:"structure-row ai-center jc-between gap-10 mb-16 lh1_3 p-15-20"},bt={class:"display-if size18-24 bold mb-0"},vt=["href"],yt={class:"account-tabs mb20"},wt={class:"light-box mb12"},kt={class:"structure-col-row gap-10 ai-center mb-12"},Ct=["disabled"],St={class:"light-box mb-12"},At={class:"size20 mb-10 normal"},It={class:"size15 mt-0 mb-20"},Nt=["href"],xt={class:"pagination-section w-full mb-20 round-small"};function Tt(t,n,a,l,e,i){const r=u("Loader"),o=$,_=u("TabsNav"),w=u("Select"),v=u("NotificationContent"),x=u("TabsContent"),T=u("EmptyBlock"),D=u("ShowMore"),P=u("Pagination");return c(),f(N,null,[m(o,null,{default:y(()=>[e.loader?(c(),p(r,{key:0})):g("",!0)]),_:1}),s("div",gt,[s("h1",bt,d(t.$t("notifications.My notifications")),1),s("a",{href:(i.locale==="uk"?"/uk":"")+"/cabinet/notifications/settings/",target:"_blank",class:"display-if gap-6 link size15 shrink-0"},d(t.$t("notifications.Manage notifications")),9,vt)]),s("div",yt,[s("div",wt,[m(_,{tabs:i.tabItems,activeItem:e.activeItem,"onUpdate:activeItem":n[0]||(n[0]=h=>e.activeItem=h),onChange:i.onTabChange},null,8,["tabs","activeItem","onChange"])]),s("nav",kt,[m(w,{modelValue:e.selectedOption,"onUpdate:modelValue":n[1]||(n[1]=h=>e.selectedOption=h),values:[{value:3,name:t.$t("notifications.Select all")},{value:1,name:t.$t("notifications.Select marked")},{value:2,name:t.$t("notifications.On the page")}],class:"w-full",onChange:i.handleSelectChange},null,8,["modelValue","values","onChange"]),m(w,{modelValue:e.selectedAction,"onUpdate:modelValue":n[2]||(n[2]=h=>e.selectedAction=h),values:[{value:0,name:t.$t("notifications.Choose an option")},{value:1,name:t.$t("notifications.Remove")},{value:2,name:t.$t("notifications.Mark as read")}],class:"w-full",onChange:i.handleSelectChangeAction},null,8,["modelValue","values","onChange"]),s("button",{class:"button w-content _grey size16 shrink-0",disabled:e.isButtonDisabled,onClick:n[3]||(n[3]=(...h)=>i.executeAction&&i.executeAction(...h))},d(t.$t("notifications.Apply")),9,Ct)]),s("div",St,[e.notifications.length?(c(),p(x,{key:0,activeTab:e.activeItem,onUpdateSelectAll:i.handleSelectChange,onUpdateParams:i.fetchData},{default:y(()=>[e.activeItem===0?(c(),p(v,{key:0,notifications:i.allNotifications,selectedOption:e.selectedOption,onUpdateSelectAll:i.handleSelectChange,onUpdateParams:i.fetchData,ref:"content"},null,8,["notifications","selectedOption","onUpdateSelectAll","onUpdateParams"])):e.activeItem===1?(c(),p(v,{key:1,notifications:i.unreadNotifications,selectedOption:e.selectedOption,onUpdateSelectAll:i.handleSelectChange,onUpdateParams:i.fetchData,ref:"content"},null,8,["notifications","selectedOption","onUpdateSelectAll","onUpdateParams"])):e.activeItem===2?(c(),p(v,{key:2,notifications:i.readNotifications,selectedOption:e.selectedOption,onUpdateSelectAll:i.handleSelectChange,onUpdateParams:i.fetchData,ref:"content"},null,8,["notifications","selectedOption","onUpdateSelectAll","onUpdateParams"])):g("",!0)]),_:1},8,["activeTab","onUpdateSelectAll","onUpdateParams"])):(c(),p(T,{key:1},{"empty-block-content":y(()=>[s("h2",At,d(t.$t("notifications.NoNewNotifications")),1),s("p",It,d(t.$t("notifications.You currently have no notifications")),1),s("a",{target:"_blank",href:(i.locale==="ru"?"":"/uk")+"/cabinet/notifications/settings/",class:"button-add"},d(t.$t("notifications.Manage notifications")),9,Nt)]),_:1}))])]),s("div",xt,[e.pagination.currentPage!==e.pagination.maxPage&&e.pagination.maxPage!==0?(c(),p(D,{key:0,onShowMore:i.showMore},null,8,["onShowMore"])):g("",!0),m(P,{all:e.pagination.maxPage,current:e.pagination.currentPage,next:e.pagination.nextPage,prev:e.pagination.prevPage,onPageChanged:i.handlePageChanged},null,8,["all","current","next","prev","onPageChanged"])])],64)}const Vt=b(mt,[["render",Tt]]);export{Vt 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.