import{_ as ft}from"./CxWpzdqe.js";import{p as it,C as mt,q as lt,ae as rt,a6 as vt,a5 as _t,r as ht,a9 as b,h as x,y as et,U as G,g as _,e as pt,f as bt,l as gt,j as kt,o as M,c as P,F as N,a as s,b as z,w as V,s as B,H as L,d as W,t as $,x as ot,n as wt,v as yt,_ as ct,a3 as $t}from"./DamWCzlT.js";import{_ as St}from"./BsjD7IaS.js";function Tt(t,n){return vt()?(_t(t,n),!0):!1}const Et=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ct=t=>t!=null,Lt=Object.prototype.toString,Mt=t=>Lt.call(t)==="[object Object]",F=()=>{};function ut(t,n){function o(...e){return new Promise((a,i)=>{Promise.resolve(t(()=>n.apply(this,e),{fn:n,thisArg:this,args:e})).then(a).catch(i)})}return o}function Ot(t,n={}){let o,e,a=F;const i=m=>{clearTimeout(m),a(),a=F};let u;return m=>{const p=b(t),d=b(n.maxWait);return o&&i(o),p<=0||d!==void 0&&d<=0?(e&&(i(e),e=void 0),Promise.resolve(m())):new Promise((v,k)=>{a=n.rejectOnCancel?k:v,u=m,d&&!e&&(e=setTimeout(()=>{o&&i(o),e=void 0,v(u())},d)),o=setTimeout(()=>{e&&i(e),e=void 0,v(m())},p)})}}function Dt(...t){let n=0,o,e=!0,a=F,i,u,g,m,p;!ht(t[0])&&typeof t[0]=="object"?{delay:u,trailing:g=!0,leading:m=!0,rejectOnCancel:p=!1}=t[0]:[u,g=!0,m=!0,p=!1]=t;const d=()=>{o&&(clearTimeout(o),o=void 0,a(),a=F)};return k=>{const c=b(u),l=Date.now()-n,w=()=>i=k();return d(),c<=0?(n=Date.now(),w()):(l>c?(n=Date.now(),(m||!e)&&w()):g&&(i=new Promise((f,h)=>{a=p?h:f,o=setTimeout(()=>{n=Date.now(),e=!0,f(w()),d()},Math.max(0,c-l))})),!m&&!o&&(o=setTimeout(()=>e=!0,c)),e=!1,i)}}function X(t){return Array.isArray(t)?t:[t]}function Pt(t){return rt()}function xt(t,n=200,o={}){return ut(Ot(n,o),t)}function jt(t,n=200,o=!1,e=!0,a=!1){return ut(Dt(n,o,e,a),t)}function Rt(t,n=!0,o){Pt()?it(t,o):n?t():mt(t)}function Wt(t,n,o){return lt(t,n,{...o,immediate:!0})}const q=Et?window:void 0;function U(t){var n;const o=b(t);return(n=o?.$el)!==null&&n!==void 0?n:o}function nt(...t){const n=(e,a,i,u)=>(e.addEventListener(a,i,u),()=>e.removeEventListener(a,i,u)),o=x(()=>{const e=X(b(t[0])).filter(a=>a!=null);return e.every(a=>typeof a!="string")?e:void 0});return Wt(()=>{var e,a;return[(e=(a=o.value)===null||a===void 0?void 0:a.map(i=>U(i)))!==null&&e!==void 0?e:[q].filter(i=>i!=null),X(b(o.value?t[1]:t[0])),X(_(o.value?t[2]:t[1])),b(o.value?t[3]:t[2])]},([e,a,i,u],g,m)=>{if(!e?.length||!a?.length||!i?.length)return;const p=Mt(u)?{...u}:u,d=e.flatMap(v=>a.flatMap(k=>i.map(c=>n(v,k,c,p))));m(()=>{d.forEach(v=>v())})},{flush:"post"})}function Ft(){const t=G(!1),n=rt();return n&&it(()=>{t.value=!0},n),t}function Ht(t){const n=Ft();return x(()=>(n.value,!!t()))}function At(t,n,o={}){const{window:e=q,...a}=o;let i;const u=Ht(()=>e&&"MutationObserver"in e),g=()=>{i&&(i.disconnect(),i=void 0)},m=lt(x(()=>{const v=X(b(t)).map(U).filter(Ct);return new Set(v)}),v=>{g(),u.value&&v.size&&(i=new MutationObserver(n),v.forEach(k=>i.observe(k,a)))},{immediate:!0,flush:"post"}),p=()=>i?.takeRecords(),d=()=>{m(),g()};return Tt(d),{isSupported:u,stop:d,takeRecords:p}}const st=1;function Nt(t,n={}){const{throttle:o=0,idle:e=200,onStop:a=F,onScroll:i=F,offset:u={left:0,right:0,top:0,bottom:0},observe:g={mutation:!1},eventListenerOptions:m={capture:!1,passive:!0},behavior:p="auto",window:d=q,onError:v=r=>{}}=n,k=typeof g=="boolean"?{mutation:g}:g,c=G(0),l=G(0),w=x({get(){return c.value},set(r){h(r,void 0)}}),f=x({get(){return l.value},set(r){h(void 0,r)}});function h(r,C){var S,j,R,A;if(!d)return;const y=b(t);if(!y)return;(S=y instanceof Document?d.document.body:y)===null||S===void 0||S.scrollTo({top:(j=b(C))!==null&&j!==void 0?j:f.value,left:(R=b(r))!==null&&R!==void 0?R:w.value,behavior:b(p)});const O=(y==null||(A=y.document)===null||A===void 0?void 0:A.documentElement)||y?.documentElement||y;w!=null&&(c.value=O.scrollLeft),f!=null&&(l.value=O.scrollTop)}const H=G(!1),T=et({left:!0,right:!1,top:!0,bottom:!1}),E=et({left:!1,right:!1,top:!1,bottom:!1}),Y=r=>{H.value&&(H.value=!1,E.left=!1,E.right=!1,E.top=!1,E.bottom=!1,a(r))},dt=xt(Y,o+e),I=r=>{var C;if(!d)return;const S=(r==null||(C=r.document)===null||C===void 0?void 0:C.documentElement)||r?.documentElement||U(r),{display:j,flexDirection:R,direction:A}=d.getComputedStyle(S),y=A==="rtl"?-1:1,O=S.scrollLeft;E.left=O<c.value,E.right=O>c.value;const K=Math.abs(O*y)<=(u.left||0),Q=Math.abs(O*y)+S.clientWidth>=S.scrollWidth-(u.right||0)-st;j==="flex"&&R==="row-reverse"?(T.left=Q,T.right=K):(T.left=K,T.right=Q),c.value=O;let D=S.scrollTop;r===d.document&&!D&&(D=d.document.body.scrollTop),E.top=D<l.value,E.bottom=D>l.value;const Z=Math.abs(D)<=(u.top||0),tt=Math.abs(D)+S.clientHeight>=S.scrollHeight-(u.bottom||0)-st;j==="flex"&&R==="column-reverse"?(T.top=tt,T.bottom=Z):(T.top=Z,T.bottom=tt),l.value=D},J=r=>{var C;d&&(I((C=r.target.documentElement)!==null&&C!==void 0?C:r.target),H.value=!0,dt(r),i(r))};return nt(t,"scroll",o?jt(J,o,!0,!1):J,m),Rt(()=>{try{const r=b(t);if(!r)return;I(r)}catch(r){v(r)}}),k?.mutation&&t!=null&&t!==d&&t!==document&&At(t,()=>{const r=b(t);r&&I(r)},{attributes:!0,childList:!0,subtree:!0}),nt(t,"scrollend",Y,m),{x:w,y:f,isScrolling:H,arrivedState:T,directions:E,measure(){const r=b(t);d&&r&&I(r)}}}function Vt(t={}){const{window:n=q,...o}=t;return Nt(n,o)}const zt={class:"header__container"},It={class:"header__left"},Bt=["src"],Gt={class:"nav-desktop"},Xt={class:"nav-dropdown"},qt={class:"header__right"},Ut={class:"relevant-links"},Yt={class:"relevant-links__btn"},Jt={class:"relevant-links__dropdown"},Kt={class:"relevant-links__content"},Qt={href:"http://www.chinafuda.com/",target:"_blank",class:"relevant-links__item"},Zt={href:"http://219.159.108.231:9090/",target:"_blank",class:"relevant-links__item"},te={href:"https://mail.chinafuda.com/",target:"_blank",class:"relevant-links__item"},ee={href:"https://mail.glfoto.cn/",target:"_blank",class:"relevant-links__item"},oe={href:"https://cnxiangliao.com/",target:"_blank",class:"relevant-links__item relevant-links__item--last"},ne={class:"lang-switcher"},se={class:"lang-switcher__btn"},ae={class:"lang-switcher__dropdown"},ie={class:"lang-switcher__content"},le={class:"mobile-drawer__content"},re={class:"mobile-drawer__header"},ce={class:"mobile-drawer__body"},ue={class:"mobile-nav-item__links"},de={class:"mobile-drawer__footer"},fe={key:0,class:"header-spacer"},at="/images/20260409/logo_red.webp",me="/images/20260410/logo_white.webp",ve=pt({__name:"Header",setup(t){const{locale:n,setLocale:o}=bt(),e=gt(),a=kt(),{y:i}=Vt(),u=x(()=>{const c=e("/");return a.path===c?i.value<=50:!1}),g=x(()=>a.path===e("/")),m=yt(!1),p=[{title:"footer.about.title",to:"/about/about-profile",links:[{name:"footer.about.links.profile",to:"/about/about-profile"},{name:"footer.about.links.management",to:"/about/about-management"},{name:"footer.about.links.service",to:"/about/about-service"},{name:"footer.about.links.responsibility",to:"/about/about-responsibility"}]},{title:"footer.news.title",to:"/news",links:[{name:"footer.news.links.dynamic",to:"/news"},{name:"footer.news.links.video",to:"/news/video"}]},{title:"footer.products.title",to:"/product",links:[{name:"footer.products.links.engine",to:"/product/product-crankshaft"},{name:"footer.products.links.new_energy",to:"/product/product-gear"},{name:"footer.products.links.forging",to:"/product/product-forging"},{name:"footer.products.links.clutch",to:"/product/product-clutch"},{name:"footer.products.links.gear",to:"/product/product-spiral-gear"},{name:"footer.products.links.robot",to:"/product/product-robot"}]},{title:"footer.innovation.title",to:"/innovation",links:[{name:"footer.innovation.links.development",to:"/innovation",hash:"#development"},{name:"footer.innovation.links.testing",to:"/innovation",hash:"#testing"},{name:"footer.innovation.links.manufacturing",to:"/innovation",hash:"#manufacturing"},{name:"footer.innovation.links.solutions",to:"/innovation",hash:"#solutions"}]},{title:"footer.careers.title",to:"/careers",links:[{name:"footer.careers.links.work",to:"/careers"},{name:"footer.careers.links.social",to:"/careers/social"},{name:"footer.careers.links.campus",to:"/careers/campus"}]},{title:"footer.investors.title",to:"/investors",links:[{name:"footer.investors.links.stock",to:"/investors",hash:"#intraday-chart-breaks"},{name:"footer.investors.links.announcement",to:"/investors",hash:"#stock-announcements"}]},{title:"footer.contact.title",to:"/contact",links:[{name:"footer.contact.links.contact_us",to:"/contact"}]}];function d(){o(n.value==="zh"?"en":"zh")}function v(c){const l=`/${c.to.split("/")[1]}`;return a.path.startsWith(l)}function k(c){const l=a.path===e(c.to);return c.hash?l&&a.hash===c.hash:l}return(c,l)=>{const w=ft;return M(),P(N,null,[s("header",{class:L(["header",{"header--transparent":_(u),"header--solid":!_(u)}])},[s("div",zt,[s("div",It,[z(w,{to:_(e)("/"),class:"header__logo"},{default:V(()=>[s("img",{src:_(u)?me:at,alt:"Fuda Logo",class:"header__logo-img"},null,8,Bt)]),_:1},8,["to"]),s("nav",Gt,[(M(),P(N,null,B(p,f=>s("div",{key:f.title,class:L(["nav-item",{"nav-item--active":v(f)}])},[z(w,{to:_(e)(f.to),class:L(["nav-item__link",{"nav-item__link--active":v(f)&&!_(u)}])},{default:V(()=>[W($(c.$t(f.title))+" ",1),l[6]||(l[6]=s("span",{class:"nav-item__arrow"},"▼",-1))]),_:2},1032,["to","class"]),s("div",Xt,[(M(!0),P(N,null,B(f.links,h=>(M(),ot(w,{key:h.name,to:{path:_(e)(h.to),hash:h.hash},class:L(["nav-dropdown__item",{"nav-dropdown__item--active":k(h)}])},{default:V(()=>[W($(c.$t(h.name)),1)]),_:2},1032,["to","class"]))),128))])],2)),64))])]),s("div",qt,[s("div",Ut,[s("button",Yt,[W($(c.$t("common.relevant_links"))+" ",1),l[7]||(l[7]=s("span",{class:"relevant-links__arrow"},"▼",-1))]),s("div",Jt,[s("div",Kt,[s("a",Qt,$(c.$t("common.fuda_holding_group")),1),s("a",Zt,$(c.$t("common.fuda_holding_oa")),1),s("a",te,$(c.$t("common.fuda_holding_email")),1),s("a",ee,$(c.$t("common.fuda_stock_email")),1),s("a",oe,$(c.$t("common.cnxiangliao")),1)])])]),s("div",ne,[s("button",se,[W($(_(n)==="zh"?"中文":"EN")+" ",1),l[8]||(l[8]=s("span",{class:"lang-switcher__arrow"},"▼",-1))]),s("div",ae,[s("div",ie,[s("button",{class:L(["lang-switcher__item",{"lang-switcher__item--active":_(n)==="zh"}]),onClick:l[0]||(l[0]=f=>_(o)("zh"))}," 中文 ",2),s("button",{class:L(["lang-switcher__item",{"lang-switcher__item--active":_(n)==="en"}]),onClick:l[1]||(l[1]=f=>_(o)("en"))}," EN ",2)])])]),s("button",{class:"mobile-menu-btn",onClick:l[2]||(l[2]=f=>m.value=!0)},[...l[9]||(l[9]=[s("span",{class:"mobile-menu-btn__icon"},"☰",-1)])])])])],2),s("div",{class:L(["mobile-drawer",{"mobile-drawer--open":_(m)}])},[s("div",{class:"mobile-drawer__backdrop",onClick:l[3]||(l[3]=f=>m.value=!1)}),s("div",le,[s("div",re,[s("img",{src:at,alt:"Fuda Logo",class:"mobile-drawer__logo"}),s("button",{class:"mobile-drawer__close",onClick:l[4]||(l[4]=f=>m.value=!1)}," ✕ ")]),s("div",ce,[(M(),P(N,null,B(p,f=>s("div",{key:f.title,class:"mobile-nav-item"},[z(w,{to:_(e)(f.to),class:L(["mobile-nav-item__title",{"mobile-nav-item__title--active":v(f)}])},{default:V(()=>[W($(c.$t(f.title)),1)]),_:2},1032,["to","class"]),s("div",ue,[(M(!0),P(N,null,B(f.links,h=>(M(),ot(w,{key:h.name,to:{path:_(e)(h.to),hash:h.hash},class:L(["mobile-nav-item__link",{"mobile-nav-item__link--active":k(h)}]),onClick:l[5]||(l[5]=H=>m.value=!1)},{default:V(()=>[W($(c.$t(h.name)),1)]),_:2},1032,["to","class"]))),128))])])),64))]),s("div",de,[s("button",{class:"mobile-drawer__lang-btn",onClick:d}," 🌐 "+$(_(n)==="zh"?"Switch to English":"切换到中文"),1)])])],2),_(g)?wt("",!0):(M(),P("div",fe))],64)}}}),_e=Object.assign(ct(ve,[["__scopeId","data-v-3e8a5a33"]]),{__name:"Header"}),he={},pe={class:""};function be(t,n){const o=_e,e=St;return M(),P("main",pe,[z(o),$t(t.$slots,"default"),z(e)])}const ye=ct(he,[["render",be]]);export{ye as default};
