PageSourceSearch

https://ezcollegeapp.com/assets/ExpertNetwork-C47KPPmf.js

js ezcollegeapp.com collected 2026-09-24 14:13:42 UTC 13,437 bytes, 1 lines download raw bytes

1import{r as o,j as e,L as j,d as A}from"./react-vendor-zQZQejYb.js";import{u as E}from"./query-vendor-BZK5hxKT.js";import{u as M,a as R,bV as Q}from"./index-B6OEjisV.js";import{l as D,g as q}from"./counselors-Bhd2Vg0m.js";import{aP as T,aQ as _,ab as I,S as $,X as z,x as V}from"./icons-vendor-D-B0TJjP.js";import"./jspdf-vendor-3_3_SuWG.js";import"./graph-vendor-EJKc4302.js";import"./editor-vendor-3719hrbx.js";const H={en:{pageTitle:"Expert Network | EZCollegeApp",title:"Expert Network",intro:"Browse verified specialists by focus, background, and consultation topics before deciding whom to contact.",verifiedBefore:"Verified before publication",profileIncludes:"Background, focus, consultation topics, and booking details",editMine:"Edit my profile",manage:"Manage consultations",myBookings:"My reservations",directory:"Published experts",directoryHint:"Compare the information each specialist has chosen to publish.",directoryStatus:"Only verified profiles appear here.",searchLabel:"Search experts",searchPlaceholder:"Search by name, field, institution, or topic",categories:"Filter by field",allCategories:"All fields",clearSearch:"Clear search",clearFilters:"Clear filters",noResultsTitle:"No experts match these filters",noResults:"Try another keyword or browse all fields.",resultCount:(i,a)=>`${i} of ${a} experts`,verified:"Verified",topics:"Consultation topics",focus:"Academic focus",questions:"Questions this expert can help you explore",perspective:"Perspective this expert brings",principles:"How this expert approaches an answer",bestFit:"Best use of this perspective",disclosure:"Scope and disclosure",sources:"Verified sources",view:"View profile",loading:"Loading published profiles…",loadError:"Expert profiles could not be loaded. Please try again.",emptyTitle:"No published profiles yet",empty:"New verified profiles will appear here after publication.",book:"Book consultation",close:"Close expert profile"},zh:{pageTitle:"专家网络 | EZCollegeApp",title:"专家网络",intro:"在联系专家之前,先了解其专业方向、背景与可咨询主题。",verifiedBefore:"发布前完成认证",profileIncludes:"背景、专业方向、咨询主题与预约信息",editMine:"编辑我的资料",manage:"管理咨询",myBookings:"我的预约",directory:"已发布专家",directoryHint:"直接比较每位专家选择公开的信息。",directoryStatus:"这里只展示已认证的公开资料。",searchLabel:"搜索专家",searchPlaceholder:"按姓名、领域、机构或咨询主题搜索",categories:"按专业领域筛选",allCategories:"全部领域",clearSearch:"清除搜索",clearFilters:"清除筛选",noResultsTitle:"没有符合条件的专家",noResults:"请尝试其他关键词,或浏览全部领域。",resultCount:(i,a)=>`显示 ${i} 位,共 ${a} 位专家`,verified:"已认证",topics:"可咨询主题",focus:"专业方向",questions:"适合向这位专家了解的问题",perspective:"这位专家能提供的视角",principles:"回答问题的原则",bestFit:"最适合的咨询范围",disclosure:"范围与披露",sources:"核验来源",view:"查看资料",loading:"正在加载公开资料…",loadError:"暂时无法加载专家资料,请稍后重试。",emptyTitle:"目前还没有公开资料",empty:"新的已认证资料发布后会显示在这里。",book:"预约咨询",close:"关闭专家资料"}},K={"Natural Sciences":"自然科学","Data & AI":"数据与人工智能",Engineering:"工程","Health & Medicine":"健康与医学",Agriculture:"农业",Business:"商业","Education & Learning":"教育与学习","Language & Culture":"语言与文化",Environment:"环境","Arts & Media":"艺术与媒体",Forestry:"林业",Journalism:"新闻传播",Sports:"体育"};function B(i){return i.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase().trim()}function U(i){return B([i.displayName,i.profileLabel,i.roleTitle,i.credentials,i.affiliation,i.organization,i.discipline,i.focus,i.shortBio,i.bestFit,...i.topics,...i.exampleQuestions,...i.perspectiveBenefits].filter(Boolean).join(" "))}function S({profile:i,compact:a=!1}){const[y,f]=o.useState(!1),u=i.displayName.trim().charAt(0).toUpperCase()||"E";return e.jsx("div",{className:a?"expert-photo expert-photo--row":"expert-photo expert-photo--modal",children:i.photoUrl&&!y?e.jsx("img",{src:i.photoUrl,alt:i.imageAlt||i.displayName,onError:()=>f(!0)}):e.jsx("span",{"aria-hidden":"true",children:u})})}function O(i){const a=i.match(/^(.+?):\s*(https?:\/\/\S+)$/i);return a?{label:a[1].trim(),url:a[2]}:{label:i,url:""}}function re(){const{lang:i}=M(),{isLoggedIn:a,token:y}
1=R(),f=Q(y),u=i==="zh"?"zh":"en",r=H[u],[t,h]=o.useState(null),[x,g]=o.useState(""),[c,b]=o.useState(""),k=o.useRef(null),w=o.useRef(null),p=E({queryKey:["counselor-profiles"],queryFn:D,staleTime:6e4}),L=E({queryKey:["counselor-profile","me",f||"anonymous"],queryFn:q,enabled:a,retry:!1,staleTime:6e4});o.useEffect(()=>{const s=document.title;return document.title=r.pageTitle,()=>{document.title=s}},[r.pageTitle]),o.useEffect(()=>{var n;if(!t)return;const s=document.body.style.overflow;document.body.style.overflow="hidden",(n=w.current)==null||n.focus();const l=m=>{m.key==="Escape"&&h(null)};return window.addEventListener("keydown",l),()=>{var m;document.body.style.overflow=s,window.removeEventListener("keydown",l),(m=k.current)==null||m.focus()}},[t]);const d=p.data||[],F=o.useMemo(()=>{const s=new Map;return d.forEach(l=>{l.discipline&&s.set(l.discipline,(s.get(l.discipline)||0)+1)}),Array.from(s,([l,n])=>({name:l,count:n})).sort((l,n)=>n.count-l.count||l.name.localeCompare(n.name))},[d]),v=B(x),N=o.useMemo(()=>d.filter(s=>{const l=!c||s.discipline===c,n=!v||U(s).includes(v);return l&&n}),[c,v,d]),P=!!(c||x),C=!p.isLoading&&!p.isError&&d.length>0;return e.jsxs("main",{id:"top",className:"expert-network-page",children:[e.jsxs("div",{className:"expert-network-shell",children:[e.jsxs("header",{className:"expert-network-hero","aria-labelledby":"expert-network-title",children:[e.jsx("img",{className:"expert-network-hero__image",src:"/editorial/expert-network-study.webp",alt:"A quiet university study table with notebooks and research materials"}),e.jsx("div",{className:"expert-network-hero__shade","aria-hidden":"true"}),e.jsxs("div",{className:"expert-network-hero__copy",children:[e.jsx("h1",{id:"expert-network-title",children:r.title}),e.jsx("p",{children:r.intro}),e.jsxs("div",{className:"expert-network-hero__facts",children:[e.jsxs("span",{children:[e.jsx(T,{size:16,"aria-hidden":"true"}),r.verifiedBefore]}),e.jsx("i",{"aria-hidden":"true"}),e.jsx("span",{children:r.profileIncludes})]})]})]}),e.jsxs("div",{className:`expert-directory${C?" expert-directory--with-tools":""}`,"aria-labelledby":"expert-directory-title",children:[e.jsxs("div",{className:"expert-directory__heading",children:[e.jsxs("div",{children:[e.jsx("h2",{id:"expert-directory-title",children:r.directory}),e.jsx("p",{children:r.directoryHint})]}),e.jsxs("div",{className:"expert-directory__actions",children:[e.jsx("span",{children:r.directoryStatus}),a?e.jsxs(j,{className:"expert-reservations-link",to:"/expert-network/bookings",children:[e.jsx(_,{size:17,"aria-hidden":"true"}),r.myBookings]}):null,L.data?e.jsxs(e.Fragment,{children:[e.jsxs(j,{className:"expert-edit-link",to:"/expert-network/manage",children:[e.jsx(_,{size:15,"aria-hidden":"true"}),r.manage]}),e.jsxs(j,{className:"expert-edit-link",to:"/expert-network/edit",children:[e.jsx(I,{size:15,"aria-hidden":"true"}),r.editMine]})]}):null]})]}),C?e.jsxs("div",{className:"expert-directory-tools",children:[e.jsxs("div",{className:"expert-search",children:[e.jsx($,{size:18,"aria-hidden":"true"}),e.jsx("label",{className:"sr-only",htmlFor:"expert-search-input",children:r.searchLabel}),e.jsx("input",{id:"expert-search-input",type:"search",value:x,placeholder:r.searchPlaceholder,autoComplete:"off","aria-controls":"expert-profile-results",onChange:s=>g(s.target.value)}),x?e.jsx("button",{type:"button",onClick:()=>g(""),"aria-label":r.clearSearch,children:e.jsx(z,{size:17,"aria-hidden":"true"})}):null]}),e.jsxs("div",{className:"expert-category-filter","aria-label":r.categories,children:[e.jsxs("button",{type:"button",className:c?"":"is-active","aria-pressed":!c,"aria-controls":"expert-profile-results",onClick:()=>b(""),children:[e.jsx("span",{children:r.allCategories}),e.jsx("small",{children:d.length})]}),F.map(s=>e.jsxs("button",{type:"button",className:c===s.name?"is-active":"","aria-pressed":c===s.name,"aria-controls":"expert-profile-results",onClick:()=>b(s.name),children:[e.jsx("span",{children:u==="zh"&&K[s.name]||s.name}),e.jsx("small",{children:s.count})]},s.name))]}),e.jsx("div",{className:"expert-result-summary","aria-live":"polite",children:r.resultCount(N.length,d.length)})]}):null,e.jsx("div",{className:"expert-directory__content",id:"expert-profile-results",children:p.isLoading?e.jsx("div",{className:"expert-directory-state",role:"status",children:r.loading}):p.isError?e.jsx("div",{className:"expert-directory-state expert-directory-state--error",role:"alert",children:r.loadError}):d.length===0?e.jsxs("div",{className:"expert-directory-state expert-directory-state--empty",children:[e.jsx("strong",{children:r.emptyTitle}),e.jsx("span",{children:r.empty})]}):N.length===0?e.jsxs("div",{className:"expert-directory-state expert-directory-state--empty expert-directory-state--filtered",children:[e.jsx("strong",{children:r.noResultsTitle}),e.jsx("span",{children:r.noResults}),P?e.jsx("button",{type:"button",onClick:()=>{g(""),b("")},children:r.clearFilters}):null]}):e.jsx("div",{className:"expert-list",children:N.map(s=>e.jsxs("button",{type:"button",className:"expert-row",onClick:l=>{k.current=l.currentTarget,h(s)},children:[e.jsx(S,{profile:s,compact:!0}),e.jsxs("div",{className:"expert-row__identity",children:[e.jsx("h3",{children:s.displayName}),e.jsx("p",{children:s.profileLabel||s.roleTitle}),s.organization?e.jsx("span",{children:s.organization}):null]}),e.jsxs("div",{className:"expert-row__details",children:[e.jsx("p",{children:s.shortBio}),e.jsxs("div",{"aria-label":r.topics,children:[e.jsx("strong",{children:r.topics}),e.jsx("span",{children:s.discipline||s.topics.slice(0,4).join(" · ")})]})]}),e.jsxs("span",{className:"expert-row__open",children:[r.view,e.jsx(V,{size:17,"aria-hidden":"true"})]})]},s.id))})})]})]}),t&&typeof document<"u"?A.createPortal(e.jsx("div",{className:"expert-modal-backdrop",onMouseDown:s=>{s.target===s.currentTarget&&h(null)},children:e.jsxs("div",{className:"expert-modal",role:"dialog","aria-modal":"true","aria-labelledby":"expert-profile-title",children:[e.jsx("button",{ref:w,type:"button",className:"expert-modal__close",onClick:()=>h(null),"aria-label":r.close,children:e.jsx(z,{size:21,"aria-hidden":"true"})}),e.jsxs("div",{className:"expert-modal__profile",children:[e.jsxs("div",{className:"expert-modal__rail",children:[e.jsx(S,{profile:t}),e.jsx("div",{className:"expert-modal__booking",children:e.jsxs(j,{to:`/expert-network/book/${t.slug}`,className:"expert-book-button",children:[e.jsx(_,{size:18,"aria-hidden":"true"}),r.book]})})]}),e.jsxs("div",{className:"expert-modal__information",children:[e.jsxs("div",{className:"expert-modal__verified",children:[e.jsx(T,{size:16,"aria-hidden":"true"}),r.verified]}),e.jsx("p",{className:"expert-modal__role",children:t.profileLabel||t.roleTitle}),e.jsx("h2",{id:"expert-profile-title",children:t.displayName}),t.roleTitle?e.jsx("p",{className:"expert-modal__credential",children:t.roleTitle}):null,t.affiliation?e.jsx("p",{className:"expert-modal__organization",children:t.affiliation}):null,t.organization?e.jsx("p",{className:"expert-modal__organization",children:t.organization}):null]}),e.jsxs("div",{className:"expert-modal__longform",children:[e.jsx("p",{className:"expert-modal__bio",children:t.shortBio}),t.discipline||t.focus?e.jsxs("section",{className:"expert-modal__section",children:[e.jsx("h3",{children:r.focus}),t.discipline?e.jsx("strong",{children:t.discipline}):null,t.focus?e.jsx("p",{children:t.focus}):null]}):null,t.exampleQuestions.length?e.jsxs("section",{className:"expert-modal__section",children:[e.jsx("h3",{children:r.questions}),e.jsx("ul",{children:t.exampleQuestions.map(s=>e.jsx("li",{children:s},s))})]}):null,t.perspectiveBenefits.length?e.jsxs("section",{className:"expert-modal__section",children:[e.jsx("h3",{children:r.perspective}),e.jsx("ul",{children:t.perspectiveBenefits.map(s=>e.jsx("li",{children:s},s))})]}):null,t.answerPrinciples.length?e.jsxs("section",{className:"expert-modal__section",children:[e.jsx("h3",{children:r.principles}),e.jsx("ul",{children:t.answerPrinciples.map(s=>e.jsx("li",{children:s},s))})]}):null,t.bestFit?e.jsxs("section",{className:"expert-modal__section",children:[e.jsx("h3",{children:r.bestFit}),e.jsx("p",{children:t.bestFit})]}
1):null,t.limitations?e.jsxs("section",{className:"expert-modal__section",children:[e.jsx("h3",{children:r.disclosure}),e.jsx("p",{children:t.limitations})]}):null,t.sources.length?e.jsxs("section",{className:"expert-modal__section expert-modal__sources",children:[e.jsx("h3",{children:r.sources}),t.sourceCheck?e.jsx("p",{children:t.sourceCheck}):null,e.jsx("ul",{children:t.sources.map(s=>{const l=O(s);return e.jsx("li",{children:l.url?e.jsx("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",children:l.label}):l.label},s)})})]}):null]})]})]})}),document.body):null]})}export{re 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.