PageSourceSearch

https://www.delfi.ee/_nuxt/CNFStBZT.js

js delfi.ee collected 2026-09-24 08:37:04 UTC 11,100 bytes, 57 lines download raw bytes

1import{am as W,d as E,o as c,c as p,F as Y,x as J,a as v,k as g,_ as X,ao as Z,q as ee,G as te,af as ae,ag as ie,m as ne,ap as se,H as D,I as oe,w as x,z as L,u as h,B as re,h as T,C as le,ev as de}from"./B5iH8GD1.js";import{R as ce,F as ue,a as me,u as ke,c as B}from"./BCFuw86a.js";import{S as ve,u as ge}from"./Dvj2AC7C.js";import{P as he}from"./C83jx0qC.js";import{S}from"./j5588ckU.js";import{_ as pe}from"./Bk6BqeEM.js";import{u as fe}from"./D-XmqQJv.js";import"./BITWCVP_.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"1.13.69"};var t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="3f40bdd2-e38e-423d-90e1-10cb5a57c110",a._sentryDebugIdIdentifier="sentry-dbid-3f40bdd2-e38e-423d-90e1-10cb5a57c110")}catch{}})();const ye=`query portal_root_getBookmarksHeadlines(
2  $id: [Int!],
3) {
4  headlines: getArticles(
5    input: {
6      id: $id,
7    }
8  ) {
9    items {
10      id
11      slug
12      publishAt
13      content {
14        title {
15          text
16        }
17        subtitle {
18          text
19        }
20      }
21      settings: attributes(
22        input: { key: ["contentMarketing", "trending", "articleTemplate"] }
23      ) {
24        key
25        value
26      }
27      comments: attributes(
28        input: {
29          key: ["disableComments", "onlyRegisteredUsersAllowedToComment"]
30        }
31      ) {
32        key
33        value
34      }
35      primaryCategory {
36        channel {
37          domain
38          language
39        }
40      }
41      metaImage {
42        id
43        attributes
44      }
45      relatedEntities {
46        hasVideo
47        hasAudio
48        hasStream
49        hasGallery
50      }
51      statistics {
52        comments
53      }
54    }
55  }
56}
57`,be={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"portal_root_getBookmarksHeadlines"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"headlines"},name:{kind:"Name",value:"getArticles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publishAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"subtitle"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]}]}}]}},{kind:"Field",alias:{kind:"Name",value:"settings"},name:{kind:"Name",value:"attributes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"ListValue",values:[{kind:"StringValue",value:"contentMarketing",block:!1},{kind:"StringValue",value:"trending",block:!1},{kind:"StringValue",value:"articleTemplate",block:!1}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"comments"},name:{kind:"Name",value:"attributes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"}
57,value:{kind:"ListValue",values:[{kind:"StringValue",value:"disableComments",block:!1},{kind:"StringValue",value:"onlyRegisteredUsersAllowedToComment",block:!1}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"primaryCategory"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"channel"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"language"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"metaImage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attributes"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"relatedEntities"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasVideo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasAudio"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasStream"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasGallery"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"statistics"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:953,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:ye}}};class Se extends ce{constructor(t){super(t)}}class _e extends ue{_idList=[];constructor(t){super(t),this._idList=t.idList}get idList(){return this._idList}set idList(t){this._idList=t}}var A=(a=>(a.Unknown="Bookmarks fetch error with unknown reason",a.NoData="Bookmarks fetch with no data",a))(A||{});class Ne extends ve{constructor(t,{state:s}){super(t),this.clientMessage="bookmarks.error.not_found";const e={cause:{reason:A.NoData},data:{refetchType:s.refetchType}},l={apiType:"content",responseCode:500};this.setInitialContexts(e),this.setInitialTags(l)}}class Fe extends me{constructor(t,s){super(t,s)}async handleFetch(t){if(!this.state.idList?.length)return this.successResponse({headlines:[],pager:{}});const[s,e]=await t.fetch(this.state);if(e){const r=new Ne("Bookmarks fetch error - invalid headlines data",{state:this.state});return r.sync(e),this.errorResponse(r)}const l=s.headlines.items;return this.successResponse({headlines:l})}}class we extends W{async fetch(t){const s={id:t.idList||[]},e=Object.assign({query:be},{variables:s}),l=async u=>{const m=this.createProvider("GraphQL");m.selectAPI("content-api-v3").setLinkOptions({useAutomaticPersistedQueries:!1,useGETAutomaticPersistedQueries:!1});const[k]=await m.query(u);return this.throwGraphqlOrApolloErrorIfExists(k),k.data},r=await this.requestWrapperHandler(()=>l(e));return r instanceof Error?[null,this.generateErrorData(r)]:[r,null]}}const De={class:"bookmarks-page-skeleton-loader row justify-content-center"},xe={class:"row"},Le={class:"bookmarks-page-skeleton-loader__img-col"},Te={class:"bookmarks-page-skeleton-loader__description-col bookmarks-page-skeleton-loader__item-description"},Be=E({__name:"BookmarksPageSkeletonLoader",setup(a){return(t,s)=>(c(),p("div",De,[(c(),p(Y,null,J(6,e=>v("div",{key:e,class:"col-12 col-lg-9 bookmarks-page-skeleton-loader__item"},[v("div",xe,[v("div",Le,[g(S,{height:90,width:130})]),v("div",Te,[g(S,{height:16,width:545,space:{bottom:"12px"},type:"rounded"}),g(S,{width:420,height:16,"max-width":"70%",type:"rounded"})])])])),64))]))}}),Ce=X(Be,[["__scopeId","data-v-2435f8b6"]]),Ee={class:"container"},Ae={key:1,class:"row justify-content-center"},Ie={class:"col-12"},C=50,Ge=E({__name:"bookmarks",async setup(a){let t,s;const e=Z("customer-bookmarks",()=>({bookmarks:null,headlines:{items:[],pager:{limit:C,offset:0}},headlineSettings:{icons:!1,contentSeparator:!0},customerDataService:null,pager:{limit:C,offset:0,count:0},updateKey:Date.now()})),{$store:l,$channelConfig:r,$eventHandler:u,$config:m}=ee(),k=te(),{refetch:I,fetchStatus:V,startFetching:P,stopFetching:R,handleFetchError:$,addRefetchToQuery:_,watchRefetchQuery:q}=ke(),{handlePageError:H,watchFetchStatus:O,watchFetchError:j}=ge(),d=L(()=>l.state.piano.token),N=L(()=>k.query.page);ae(async()=>{e.value.customerDataService=new ie({config:m}),d.value&&(e.value.customerDataService.setCustomerToken(d.value),await f())}),ne(()=>{u.on("delete-bookmark",F)});const{refresh:G,status:Q,error:M}=([t,s]=se(async()=>fe("customer-bookmarks",async()=>{const n=new _e({refetchType:I.value.activeType,idList:e.value.bookmarks?.items.map(w=>Number(w.value))||null}),o=new Se({channel:r("config"),route:k}),i=new Fe(n,o);P(i.state.fetchStatus);const[y,b]=await i.handleFetch(new we({config:m}));if(b)return $(i.state.fetchStatus,b)||H(b),!0;const{headlines:z}=y;return e.value.headlines.items=z,R(i.state.fetchStatus),e.value.updateKey=Date.now(),!0},{server:!1})),t=await t,s(),t);j(M),q(G),O(Q),D(d,async()=>{e.value.customerDataService?.setCustomerToken(d.value),e.value.headlines.items=[],e.value.bookmarks=null,d.value&&await f()}),D(N,async()=>{e.value.headlines.items=[],e.value.bookmarks=null,d.value&&await f()}),oe(()=>{u.off("delete-bookmark",F)});async function f(){const n=U(),o=e.value.pager.limit,i=(n-1)*o;await K(o,i),_(B.Force)}function U(){let n=Number(N.value);return(!n||n<1)&&(n=1,window.history.replaceState(null,"",`${window.location.pathname}?page=${n}`)),n}async function K(n,o){const i=await e.value.customerDataService?.get({key:"bookmark",limit:n??e.value.pager.limit,offset:o??e.value.pager.offset})||null;i?.customerData.items.length&&(i.customerData.items=i.customerData.items.filter(y=>Number(y.value))),e.value.bookmarks=i?.customerData||null}async function F(n){const o=e.value.bookmarks?.items.findIndex(i=>i.value===String(n));if(o!==void 0&&o>=0){const i=e.value.bookmarks.items.splice(o,1)[0];_(B.Force);try{await e.value.customerDataService?.delete({id:i.id})}catch{console.error("Failed to delete bookmark")}}}return(n,o)=>(c(),p("div",Ee,[g(pe,null,{default:x(({data:i})=>[h(V)==="pending"?re((c(),T(Ce,{key:0},null,512)),[[le,i.isLoggedIn]]):(c(),p("div",Ae,[v("div",Ie,[(c(),T(de,{key:h(e).updateKey,type:"BookmarksHeadline",list:h(e).headlines,pagination:!0,settings:h(e).headlineSettings},{header:x(()=>[g(he,{title:n.$t("bookmark.read_later")},null,8,["title"])]),_:1},8,["list","settings"]))])]))]),_:1})]))}});
57export{Ge 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.