1import{l as e,u as t}from"./apiResponse-C8fEm_-L.js";function n(e){return{channelId:Number(e.channel_id),channelName:String(e.channel_name??``),channelTitle:String(e.channel_title??e.channel_name??``),description:String(e.description??``),coverUrl:e.cover_url?String(e.cover_url):void 0,memberCount:Number(e.member_count??0),followerCount:Number(e.follower_count??0),isMember:!!e.is_member,isFollowing:!!e.is_following}}function r(e){if(!e||typeof e!=`object`)return[];let t=e;return t.status===`error`||!Array.isArray(t.data?.channels)?[]:t.data.channels.map(n)}function i(e){return!e||typeof e!=`object`?null:e.data?.pagination||null}function a(n,r,i){return e(`/api/channel`,t({page:n,limit:i?.limit??12,sort:i?.sort??`follower_count`,order:i?.order??`desc`,keyword:i?.keyword},r))}function o(t,n){return e(`/api/channel/my/channels`,{token:n,page:t,limit:100})}function s(t,n){return e(`/api/channel/following`,{token:n,page:t,limit:100})}async function c(t,r,i){let a=[],o=0;for(;;){let s=e(`/api/channel/search`,{keyword:` `,owner_uid:t,offset:o,num:100,...r?{token:r}:{}}),c=await(await fetch(s,{signal:i,cache:`default`})).json();if(!c||typeof c!=`object`||c.status===`error`)break;let l=c.data?.channels;if(!Array.isArray(l))break;let u=l.filter(e=>!!e&&typeof e==`object`).map(n);if(a.push(...u),u.length<100)break;o+=100}return a}
1async function l(e,t){let n=[],a=1,o=!0;for(;o;){let s=await(await fetch(e(a),{signal:t,cache:`default`})).json(),c=r(s);n=[...n,...c];let l=i(s);l?(o=l.page<l.total_pages,a++):(o=c.length>=100,a++)}return n}export{c as a,i as c,l as i,s as n,n as o,o as r,r as s,a as t};
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.