PageSourceSearch

https://studio.sir.ai/assets/index-CeEQL9tx.js

js sir.ai collected 2026-10-05 15:50:34 UTC 15,372 bytes, 1 lines download raw bytes

1import{r as m,c as T,g as K,u as B,_ as Q,a as G,b as ee,j as t,F as C,f as te,d as P,H as re,e as ae,h as ne,i as se,l as le,k as oe,m as ie,R as W,n as ce,C as de,o as ue,p as fe,q as me,s as ge,t as he,v as xe,M as be,w as ve,x as je,y as pe,z as we,A as ye,B as R}from"./index-RJtbsvkA.js";import{S as Le,a as Ce,b as Ne,c as Te,d as Se,e as Ee}from"./select-DOJEWmrC.js";import{d as Ie}from"./debounce-BHzqAXKd.js";import{u as $e,g as ke}from"./useEffectWithTarget-DitnwhKC.js";import"./index-Cxy5zc9C.js";import"./toNumber-BxGvLaV2.js";import"./index-DjwhK-aA.js";const Re=e=>e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop,Oe=e=>e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),_e=e=>e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight);var He=function(e){return function(r,a){var n=m.useRef(!1);e(function(){return function(){n.current=!1}},[]),e(function(){if(!n.current)n.current=!0;else return r()},a)}};const Me=He(m.useEffect);function Ve(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var $=Ve,Ae=typeof T=="object"&&T&&T.Object===Object&&T,Fe=Ae,Ue=Fe,Be=typeof self=="object"&&self&&self.Object===Object&&self,Ge=Ue||Be||Function("return this")(),D=Ge,Pe=D,We=function(){return Pe.Date.now()},De=We,Ze=/\s/;function ze(e){for(var r=e.length;r--&&Ze.test(e.charAt(r)););return r}var Xe=ze,qe=Xe,Ye=/^\s+/;function Je(e){return e&&e.slice(0,qe(e)+1).replace(Ye,"")}var Ke=Je,Qe=D,et=Qe.Symbol,Z=et,O=Z,z=Object.prototype,tt=z.hasOwnProperty,rt=z.toString,L=O?O.toStringTag:void 0;function at(e){var r=tt.call(e,L),a=e[L];try{e[L]=void 0;var n=!0}catch{}var s=rt.call(e);return n&&(r?e[L]=a:delete e[L]),s}var nt=at,st=Object.prototype,lt=st.toString;function ot(e){return lt.call(e)}var it=ot,_=Z,ct=nt,dt=it,ut="[object Null]",ft="[object Undefined]",H=_?_.toStringTag:void 0;function mt(e){return e==null?e===void 0?ft:ut:H&&H in Object(e)?ct(e):dt(e)}var gt=mt;function ht(e){return e!=null&&typeof e=="object"}var xt=ht,bt=gt,vt=xt,jt="[object Symbol]";function pt(e){return typeof e=="symbol"||vt(e)&&bt(e)==jt}var wt=pt,yt=Ke,M=$,Lt=wt,V=NaN,Ct=/^[-+]0x[0-9a-f]+$/i,Nt=/^0b[01]+$/i,Tt=/^0o[0-7]+$/i,St=parseInt;function Et(e){if(typeof e=="number")return e;if(Lt(e))return V;if(M(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=M(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=yt(e);var a=Nt.test(e);return a||Tt.test(e)?St(e.slice(2),a?2:8):Ct.test(e)?V:+e}var It=Et,$t=$,E=De,A=It,kt="Expected a function",Rt=Math.max,Ot=Math.min;function _t(e,r,a){var n,s,l,o,i,u,f=0,b=!1,g=!1,h=!0;if(typeof e!="function")throw new TypeError(kt);r=A(r)||0,$t(a)&&(b=!!a.leading,g="maxWait"in a,l=g?Rt(A(a.maxWait)||0,r):l,h="trailing"in a?!!a.trailing:h);function x(d){var v=n,y=s;return n=s=void 0,f=d,o=e.apply(y,v),o}function p(d){return f=d,i=setTimeout(j,r),b?x(d):o}function c(d){var v=d-u,y=d-f,k=r-v;return g?Ot(k,l-y):k}function w(d){var v=d-u,y=d-f;return u===void 0||v>=r||v<0||g&&y>=l}function j(){var d=E();if(w(d))return N(d);i=setTimeout(j,c(d))}function N(d){return i=void 0,h&&n?x(d):(n=s=void 0,o)}function Y(){i!==void 0&&clearTimeout(i),f=0,n=u=s=i=void 0}function J(){return i===void 0?o:N(E())}function S(){var d=E(),v=w(d);if(n=arguments,s=this,u=d,v){if(i===void 0)return p(u);if(g)return clearTimeout(i),i=setTimeout(j,r),x(u)}return i===void 0&&(i=setTimeout(j,r)),o}return S.cancel=Y,S.flush=J,S}var Ht=_t,Mt=Ht,Vt=$,At="Expected a function";function Ft(e,r,a){var n=!0,s=!0;if(typeof e!="function")throw new TypeError(At);return Vt(a)&&(n="leading"in a?!!a.leading:n,s="trailing"in a?!!a.trailing:s),Mt(e,r,{leading:n,maxWait:r,trailing:s})}var Ut=Ft;const Bt=K(Ut);function Gt(e,r,a){a===void 0&&(a={});var n=a.enable,s=n===void 0?!0:n,l=B(r);$e(function(){if(s){var o=ke(a.target,window);if(o!=null&&o.addEventListener){var i=function(u){return l.current(u)};return o.addEventListener(e,i,{capture:a.capture,once:a.once,passive:a.passive}),function(){o.removeEventListener(e,i,{capture:a.capture})}}}},[e,a.capture,a.once,a.passive,s],a.target)}function Pt(e,r){var a,n=B(e),s=(a=r==null?void 0:r.wait)!==null&&a!==void 0?a:1e3,l=m.useMemo(function(){return Bt(function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.current.apply(n,Q([],G(o),!1))},s,r)},[]);return ee(function(){l.cancel()}),{run:l,cancel:l.cancel,flush:l.flush}}function Wt(e,r,a){var n=G(m.useState({}),2),s=n[0],l=n[1],o=Pt(function(){l({})},a).run;m.useEffect(function(){return o()},r),Me(e,[s])}const Dt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%3e%3cpath%20id='Vector'%20d='M22.9792%2022.281C22.9792%2022.3515%2022.9792%2022.3515%2022.9792%2022.281C22.9792%2023.2703%2022.2727%2024.0473%2021.2843%2023.976H1.9995C1.0815%2023.976%200.375%2023.199%200.375%2022.281V10.4138C0.375%209.91878%200.58725%209.42453%201.011%209.07128L10.6178%200.384035C11.3242%20-0.181465%2012.2422%20-0.110965%2012.8783%200.525035L22.485%209.28503C22.767%209.63753%2022.9792%2010.0613%2022.9792%2010.485V22.2818V22.281ZM20.8597%2021.9285V10.626L11.6775%202.14953L2.4945%2010.4843V21.9278H20.8597V21.9285ZM7.4385%2016.9823H15.9158V19.1018H7.4385V16.9823Z'%20fill='%23222222'/%3e%3c/g%3e%3c/svg%3e",Zt=()=>t.jsxs("div",{className:"flex gap-4 entry py-4 px-6 m-4 rounded-sm",children:[t.jsx("img",{src:Dt}),"Home"]}),zt=e=>t.jsx("a",{href:`/podcasting/?show_id=${e.id}`,children:t.jsxs("li",{className:"flex gap-2 items-center hover:bg-slate-100 pl-4 py-2 rounded-xl cursor-pointer",children:[t.jsx("img",{src:e.cover,className:"w-8 h-8 rounded-full"}),t.jsx("span",{className:"text-xs",children:e.name})]})},e.id),Xt=({recentList:e})=>t.jsx("ul",{className:"grow space-y-2 mt-2 max-h-full overflow-y-auto",children:e.map(r=>zt(r))}),qt=()=>t.jsxs("div",{className:"border border-solid border-[#181818] rounded-sm color-[#181818] opacity-40 p-2 pl-4 ml-4 mr-16",children:[t.jsx(C,{icon:te})," En"]}),I="data:image/svg+xml,%3csvg%20width='25'%20height='25'%20viewBox='0%200%2025%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector'%20d='M13.1522%200.821689C12.7704%20-0.273896%2012.1659%20-0.273896%2011.7841%200.821689L9.66831%207.01413C9.30242%208.10972%208.09338%209.31645%206.9798%209.69752L0.823258%2011.7934C-0.274419%2012.1745%20-0.274419%2012.7779%200.823258%2013.1589L6.94798%2015.2866C8.04566%2015.6677%209.25469%2016.8744%209.63649%2017.97L11.7841%2024.1783C12.1659%2025.2739%2012.7704%2025.2739%2013.1522%2024.1783L15.2362%2018.0017C15.6021%2016.9062%2016.8112%2015.6994%2017.9088%2015.3184L24.1767%2013.1748C25.2744%2012.7937%2025.2744%2012.1904%2024.1767%2011.8093L18.0043%209.72928C16.9066%209.36408%2015.6976%208.15735%2015.3158%207.06177C15.2999%207.07764%2013.1522%200.821689%2013.1522%200.821689Z'%20fill='%23D9C2F0'/%3e%3c/svg%3e",Yt=e=>`/podcasting${e}`,Jt=[{name:"Profile",href:Yt("/profile"),icon:oe},{name:"Logout",href:"logout",icon:ie}],Kt=({userName:e})=>{const r=P();return t.jsxs(re,{children:[t.jsx(ae,{children:t.jsxs("div",{className:"flex justify-center items-center gap-4 mx-4 mb-4 rounded-sm py-4 cursor-pointer hover:bg-slate-100",children:[t.jsxs("div",{className:"relative initial-icon w-10 h-10 flex justify-center items-center font-black text-2xl",children:[e==null?void 0:e.charAt(0).toUpperCase(),t.jsx("img",{src:I,className:"absolute w-5 h-5 -top-2 -right-4"}),t.jsx("img",{src:I,className:"absolute w-2 h-2 -top-4 -right-4"}),t.jsx("img",{src:I,className:"absolute w-2 h-2 top-2 -right-4"})]}),e,t.jsx(C,{icon:ne})]})}),t.jsx(se,{side:"right",className:"p-2",children:t.jsx("ul",{className:"space-y-2",children:Jt.map(a=>t.jsx("a",{onClick:async()=>
1{if(a.href==="logout"){localStorage.removeItem("token"),localStorage.removeItem("useInfo"),localStorage.removeItem("user"),await le(),window.location.href="/podcasting/login";return}r(a.href)},children:t.jsxs("li",{className:"flex items-center gap-2 hover:bg-slate-100 p-2 cursor-pointer rounded-xs",children:[t.jsx(C,{icon:a.icon}),t.jsx("span",{className:"text-sm",children:a.name})]})},a.name))})})]})},X=W.forwardRef(({className:e,type:r,icon:a,onShow:n,...s},l)=>{const[o,i]=m.useState(s.value||"");m.useEffect(()=>{s.value!==null&&s.value!==o&&i(s.value)},[s.value,o]);const u=f=>{const b=f.target.value;i(b),s.onChange&&s.onChange(f)};return t.jsxs("div",{className:ce("flex h-10 items-center rounded-full border border-input bg-[#e3ebf8] pl-3 pr-2 text-sm hover:ring focus-visible:ring",e),children:[t.jsx("span",{onClick:n,className:" cursor-pointer",children:a}),t.jsx("input",{type:r,className:"w-full bg-[#e3ebf8] p-2 placeholder:text-muted-foreground focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",ref:l,...s,value:o,onChange:u}),o&&t.jsx("span",{onClick:()=>{var f;(f=s.onChange)==null||f.call(s,{target:{value:""}})},className:"p-1 rounded-lg cursor-pointer text-gray-400 hover:bg-gray-100",children:t.jsx(de,{})}),!o&&t.jsx("span",{className:"w-[23px]"})]})});X.displayName="Input";const F=({direction:e,onClick:r})=>t.jsxs("button",{onClick:r,className:"shrink-0 bg-white/50 w-10 h-10 flex justify-center items-center rounded-full shadow-sm hover:bg-white ",children:[e==="left"&&t.jsx(ue,{}),e==="right"&&t.jsx(fe,{})]}),U=20,q=me((e,r)=>({...{searchValue:"",labelList:[],flag:"All",offset:0,total:0,selectedCategory:"",selectedLabel:"",categoryList:[],roleListLoading:!0,roleMoreLoading:!1,roleList:[]},initLabels:async()=>{try{const n=await ge();n.code===1e3&&(e(()=>({labelList:n.data,selectedCategory:n.data[0].id+"",categoryList:n.data[0].labels,selectedLabel:""})),r().refresh())}catch(n){console.error(n)}},setLabelList:n=>{const s=+n,l=r().labelList.find(i=>i.id===s);let o;(l==null?void 0:l.flag)!=="All"&&(o=(l==null?void 0:l.labels[0].id)+""),e(()=>({searchValue:"",flag:l==null?void 0:l.flag,selectedCategory:n,categoryList:l==null?void 0:l.labels,selectedLabel:o})),r().refresh()},setLabel:n=>{e(()=>({searchValue:"",selectedLabel:n,flag:"label"})),r().refresh()},updateSearchValue:n=>{e(()=>({searchValue:n})),r().refresh()},refreshRoleList:async(n=!1)=>{try{if(n){const{roleList:h,total:x}=r();if(h.length>=x)return}const{searchValue:s,offset:l,selectedLabel:o,flag:i}=r(),f={limit:U,offset:n?l+U:0,lang:"en"},b=(s==null?void 0:s.length)>0?{...f,keyword:s}:{...f,flag:i,[i]:o===""||!o?0:+o},g=await he(b);if(g.code===1e3){const h=g.data.list||[],x=n?r().roleList.concat(h):h;e(()=>({roleList:x,total:g.data.total,offset:g.data.offset}))}}catch(s){console.error(s)}},refresh:async()=>{e(()=>({roleListLoading:!0})),await r().refreshRoleList(),e(()=>({roleListLoading:!1}))},loadMore:Ie(async()=>{e(()=>({roleMoreLoading:!0})),await r().refreshRoleList(!0),e(()=>({roleMoreLoading:!1}))},500)})),Qt=({scrollTop:e,userName:r})=>{const[a,n]=W.useState(""),s=m.useRef(null),{initLabels:l,labelList:o,categoryList:i,selectedLabel:u,selectedCategory:f,setLabelList:b,setLabel:g,updateSearchValue:h}=q();xe(async()=>{await l()}),Wt(()=>{h(a)},[a],{wait:1e3});const x=m.useCallback(()=>{s.current&&(s.current.scrollLeft-=100)},[]),p=m.useCallback(()=>{s.current&&(s.current.scrollLeft+=100)},[]);return t.jsxs("nav",{className:`absolute ${e>10?"backdrop-blur-lg bg-white/30":""}   left-4 right-4 min-w-[44rem]`,children:[t.jsxs("div",{className:"w-full flex h-40 items-center",children:[t.jsxs("div",{className:"w-2/3 flex items-center gap-8",children:[t.jsx("h1",{className:"font-black text-4xl",children:"Welcome"}),t.jsx("h2",{className:"font-extralight text-4xl",children:r})]}),t.jsx(X,{className:"w-1/3",icon:t.jsx(be,{}),value:a,onChange:c=>{n(c.target.value)},placeholder:"Search for Characters..."})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsxs(Le,{value:f,onValueChange:c=>b(c),children:[t.jsx(Ce,{className:"w-[180px] border border-solid border-black",children:t.jsx(Ne,{placeholder:"Select category"})}),t.jsx(Te,{children:t.jsx(Se,{children:o.map(c=>t.jsx(Ee,{value:c.id+"",children:c.name},c.id))})})]}),t.jsxs("div",{className:"w-[calc(100%-200px)] flex",children:[t.jsx(F,{direction:"left",onClick:x}),t.jsx("div",{ref:s,className:"grow flex-1 basis-0 overflow-x-scroll max-w-full flex mx-2 space-x-2 scroll-smooth",children:i.map(c=>t.jsx("div",{onClick:()=>{g(c.id+"")},className:`shrink-0 rounded-full flex justify-center items-center px-4 border border-solid border-black hover:bg-black/10 cursor-pointer ${+u===c.id?"bg-black text-white":""}`,children:c.name},c.id))}),t.jsx(F,{direction:"right",onClick:p})]})]})]})},er=({id:e,avatar:r,name:a,desc:n})=>{const s=P(),l=ve();return t.jsxs("div",{className:"bg-[#fff9] break-inside-avoid curs
1or-pointer border border-white border-solid rounded-md px-2 pt-6 pb-2 shadow-lg hover:shadow-xl hover:bg-[#fff3] transition-all duration-200 flex flex-col items-center gap-4 ",onClick:()=>{s(`/record/${e}`,{state:{prevRoute:l}})},children:[t.jsx("img",{src:r,className:"w-32 h-32 rounded-full object-cover"}),t.jsx("h1",{className:"",children:a}),t.jsx("p",{className:"text-sm font-light text-center pb-8",children:n.map(o=>t.jsxs(m.Fragment,{children:[t.jsx("span",{children:o}),t.jsx("br",{})]},o))})]})},ir=()=>{const e=m.useRef(null),{recentList:r,initUserInfo:a,getRecent:n,name:s}=je(c=>c),[l,o]=m.useState(!1),{roleList:i,roleListLoading:u,loadMore:f,roleMoreLoading:b}=q(),[g,h]=m.useState(0);m.useEffect(()=>{(async()=>await n())()},[a,n]);const x=50,p=()=>{const c=e.current,w=Re(c);h(w);const j=Oe(c),N=_e(c);j-w<=N+x&&f()};return Gt("scroll",()=>{u||p()},{target:e.current}),t.jsxs("div",{className:"flex w-full h-screen",children:[t.jsxs("aside",{className:`nav overflow-x-hidden transition-all duration-100 inset-y-0 left-0 ${l?"min-w-52":"w-0"} bg-white border-r border-gray-200 ${l?"animate-width-change":""} flex flex-col`,children:[t.jsxs("div",{className:"m-4 flex justify-between",children:[t.jsx("img",{src:pe}),t.jsx("button",{onClick:()=>o(!1),className:"focus:outline-none",children:t.jsx(C,{icon:we})})]}),t.jsx(Zt,{}),t.jsx("div",{className:"mx-4",children:t.jsx("p",{className:"text-xs text-gray-500",children:"Recent"})}),t.jsx(Xt,{recentList:r}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(qt,{}),t.jsx(Kt,{userName:s})]})]}),t.jsxs("main",{className:"flex-1 relative gradient-bg flex justify-center",children:[!l&&t.jsx("button",{onClick:()=>o(!0),className:"hover:bg-slate-100 w-10 h-10 rounded-sm absolute top-2 left-2",children:t.jsx(C,{icon:ye})}),t.jsxs("div",{className:"min-w-[44rem] w-full mx-16 relative",children:[t.jsx(Qt,{userName:s,scrollTop:g}),t.jsxs("div",{ref:e,className:"overflow-y-auto h-screen",children:[u&&t.jsx("div",{className:"w-full h-full flex justify-center items-center",children:t.jsx(R,{color:"rgba(0, 0, 0, 0.3)",size:"small",text:"",textColor:""})}),!u&&t.jsx("div",{className:"p-4 pb-10 pt-56 columns-3 gap-2 sm:columns-3 sm:gap-4 md:columns-3 lg:columns-4  [&>div:not(:first-child)]:mt-4",children:i.map(c=>t.jsx(er,{id:c.id,avatar:c.image,name:c.name,desc:c.tags},c.id))}),t.jsx("div",{className:"w-full h-20 pb-10 flex justify-center items-center",children:b&&t.jsx(R,{color:"rgba(0, 0, 0, 0.3)",size:"small",text:"",textColor:""})})]})]})]})]})};export{ir 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.