PageSourceSearch

https://assets.zawya.com/prod/BookmarksListing.0cc766974976367ddefd.js

js zawya.com collected 2026-10-01 07:53:50 UTC 4,722 bytes, 1 lines download raw bytes

1(self.webpackChunkzawya_glide_deliver=self.webpackChunkzawya_glide_deliver||[]).push([[6386],{Ox3x(e,a,n){"use strict";n.r(a),n.d(a,{default:()=>g,onLoad:()=>u});var t=n("nKUr"),o=n("q1tI"),i=(n("MKec"),n("EbEg")),r=n("eycB"),s=n("Hxum");const l=n("NXED"),c=n("fOpk"),d=e=>{if(!e)return"";return new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})},m=async e=>{var a,n;if(await new Promise(e=>{if(window.nexa)return e();const a=setInterval(()=>{window.nexa&&(clearInterval(a),e())},200);setTimeout(()=>{clearInterval(a),e()},1e4)}),!(null==(n=null==(a=window.nexa)?void 0:a.profile)?void 0:n.interactions))return[];try{const a=await window.nexa.profile.interactions.list({page_size:100});return((null==a?void 0:a.hits)||[]).filter(a=>{var n;return"bookmark"===a.action_name&&(null==(n=a.metadata)?void 0:n.locale)===e}).map(e=>{var a;return{id:e.id,articleId:e.external_id||"",bookmarkName:e.title||"",dateAdded:e.sys_created_at||e.sys_updated_at||"",url:(null==(a=e.metadata)?void 0:a.url)||""}}).sort((e,a)=>new Date(a.dateAdded).getTime()-new Date(e.dateAdded).getTime())}catch(e){return console.error("[BookmarksListing] Failed to fetch bookmarks from SDK:",e),[]}},p=({locale:e})=>{const[a,i]=(0,o.useState)([]),[p,k]=(0,o.useState)(!0),u=r.BookmarksListingTranslation[e]||r.BookmarksListingTranslation[s.y3.EN];return(0,o.useEffect)(()=>{m(e).then(e=>{i(e),k(!1)}),window.handleActionMenuVisibility||Promise.all([n.e(3633),n.e(4707),n.e(6452),n.e(718),n.e(4228),n.e(4080)]).then(n.bind(n,"zlLh")).catch(()=>{})},[]),p?(0,t.jsx)("div",{className:"bookmarks-listing-page-content",children:(0,t.jsx)("p",{children:"Loading bookmarks..."})}):(0,t.jsx)(t.Fragment,{children:a.length>0?(0,t.jsx)("div",{className:"bookmarks-listing-page-content",children:a.map(a=>(0,t.jsxs)("div",{className:"bookmakrs-listing-page-content-wrapper",children:[(0,t.jsxs)("div",{className:"bookmarks-listing-page-content-header",children:[(0,t.jsxs)("div",{className:"bookmarks-listing-page-content-header-text",children:[(0,t.jsx)("p",{className:"bookmarks-listing-page-content-header-text-custom-name",children:a.bookmarkName}),(0,t.jsxs)("p",{className:"bookmarks-listing-page-content-header-text-custom-date",children:["|   Added:   ",d(a.dateAdded)]})]}),(0,t.jsx)("div",{className:"bookmarks-listing-page-content-header-actions",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{className:"zawya-action-menu","data-page-type":"DEFAULT",children:[(0,t.jsx)("button",{className:"zawya-action-menu__btn",onClick:e=>{var a;e.nativeEvent.stopImmediatePropagation(),null==(a=window.handleActionMenuVisibility)||a.call(window,e.currentTarget)}}),(0,t.jsxs)("div",{className:"zawya-action-menu-wrapper",children:[(0,t.jsxs)("button",{className:"zawya-action-menu__option","data-popup-name":"edit_bookmark","data-component-config":encodeURIComponent(JSON.stringify({articleId:a.articleId,articleHeadline:a.bookmarkName})),onClick:e=>{var a;return null==(a=window.handlePopUpVisibility)?void 0:a.call(window,e.currentTarget)},children:[(0,t.jsx)("span",{className:"zawya-action-menu__option-label",children:u.editBookmark}),(0,t.jsx)("img",{className:"zawya-action-menu__option-icon",src:l,alt:"action menu icon"})]}),(0,t.jsxs)("button",{className:"zawya-action-menu__option","data-popup-name":"remove_bookmark","data-component-config":encodeURIComponent(JSON.stringify({articleId:a.articleId})),onClick:e=>{var a;return null==(a=window.handlePopUpVisibility)?void 0:a.call(window,e.currentTarget)},children:[(0,t.jsx)("span",{className:"zawya-action-menu__option-label",children:u.deleteBookmark}),(0,t.jsx)("img",{className:"zawya-action-menu__option-icon",src:c,alt:"action menu icon"})]})]}),(0,t.jsx)("div",{className:"zawya-action-menu__popup-container"})]})})]}),(0,t.jsx)("div",{className:"bookmarks-listing-page-content-item",children:(0,t.jsx)("h4",{children:(0,t.jsx)("a",{href:a.url||`/${e}/article/${a.articleId}`,children:a.bookmarkName})})})]},a.id))}):(0,t.jsxs)("div",{className:"bookmarks-listing-page-no-bookmarks-wrapper",children:[(0,t.jsx)("h2",{children:u.noAddedBookmarks}),(0,t.jsx)("p",{children:u.youHaveNotAddedAnyBookmarksYet}),(0,t.jsx)("a",{href:`/${e}`,children:u.exploreTopNews})]})})};let k=0;function u(){k++;try{const e=document.getElementById("bookmarks-listing-page-outher-wrapper");if(!e)throw new Error("BookmarksListing hydration error");{const a=e.getAttribute("data-configuration"),{locale:n="en"}=a?JSON.parse(a):{};e.innerHTML="",(0,i.H)(e).render((0,t.jsx)(p,{locale:n}))}}catch(e){k<100&&setTimeout(()=>u(),500)}}const g=p},fOpk(e,a,n){e.exports=n.p+"assets/delete.362b7752.svg"},NXED(e,a,n){e.exports=n.p+"assets/icon-stylus.6dfd3fbe.svg"},MKec(){}}]);

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.