PageSourceSearch

https://www.seeed.cc/_next/static/chunks/1292-9f4177087648f941.js

js seeed.cc collected 2026-10-02 06:17:45 UTC 11,610 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1292],{31292:(e,t,r)=>{r.d(t,{SolutionNavigationPanel:()=>b,Ay:()=>y,o0:()=>v});var l=r(42355),n=r(55475),a=r(61169),s=r(1611),i=r(17907),o=r(79112),c=r(43262),d=r.n(c),x=r(90930),m=r(73462),u=r(41147);let h=e=>{try{var t;return JSON.parse((null==(t=e.customFields)?void 0:t.solution_json_data)||"{}")}catch(e){return{}}},p=e=>e.endsWith("-zh-hans")?e.slice(0,-8):e.endsWith("-ja")?e.slice(0,-3):e,f=e=>{if(null==e?void 0:e.url)return{url:e.url,isExternal:/^https?:\/\//i.test(e.url)};if(null==e?void 0:e.solutionMeta)return e.solutionMeta.externalUrl?{url:e.solutionMeta.externalUrl,isExternal:!0}:{url:"/solutions/".concat(e.solutionMeta.slug),isExternal:!1};let t=h(e);return t.external_url?{url:t.external_url,isExternal:!0}:{url:"/solutions/".concat(p(e.slug)),isExternal:!1}};r(53430);let g=()=>({technologies:[],solutions:[],error:!1,truncated:!1});function v(e){let[t,r]=(0,n.useState)(g),[l,a]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{let e=new AbortController;return a(!0),fetch("/solutions/nav-data?locale=".concat(encodeURIComponent((0,u.JK)())),{signal:e.signal}).then(e=>{if(!e.ok)throw Error("Navigation unavailable");return e.json()}).then(t=>{e.signal.aborted||r(t)}).catch(()=>{e.signal.aborted||r({...g(),error:!0})}).finally(()=>{e.signal.aborted||a(!1)}),()=>e.abort()},[e.url]),{data:t,loading:l}}function b(e){let{data:t,loading:r,mobile:s=!1,variant:i="nav",onNavigate:c,galleryTitle:u,galleryTitleClassName:h,gallerySubtitle:p}=e,g=(0,o.c)("nav.solutionTab"),v="gallery"===i,[b,y]=(0,n.useState)(""),{technology:j,posts:w,highlightedIds:N}=function(e,t){var r;let l=e.technologies.find(e=>e.id===t);return{technology:l,posts:e.solutions,highlightedIds:null!=(r=null==l?void 0:l.relatedIds)?r:[]}}(t,b),k=v?"w-full min-w-0 py-4":"mx-auto w-full max-w-[1080px] min-w-0 p-4",E=v?"text-base font-semibold leading-6":"text-base font-semibold leading-6 text-zinc-900",z=v?"group relative block rounded-lg border border-transparent bg-white pl-0 pr-2 py-3 text-sm transition-colors":"group relative block rounded-[7px] border border-transparent bg-white pl-0 pr-2 py-2.5 text-[13px] font-semibold leading-[1.35] transition-colors",_=v?"block p-3 text-[13.5px] font-medium tracking-[-0.01em]":"block flex-1 p-2.5 text-[12px] font-medium leading-[1.35]";return v?(0,l.jsxs)("div",{className:k,children:[r?(0,l.jsx)("p",{role:"status",className:"py-8 text-sm text-gray-500",children:g("loading")}):(0,l.jsxs)(l.Fragment,{children:[(u||p)&&(0,l.jsx)("div",{className:"mb-5 flex min-h-[44px] flex-wrap items-center justify-between gap-4",children:(0,l.jsxs)("div",{className:"min-w-0",children:[u&&(0,l.jsx)("h2",{className:h||"text-[28px] font-bold leading-tight text-zinc-900",children:u}),p&&(0,l.jsx)("p",{className:"mt-2 max-w-[600px] text-[14px] leading-6 text-zinc-500",children:p})]})}),t.technologies.length>0&&(0,l.jsxs)("div",{className:"flex min-h-[47px] flex-wrap items-end gap-x-5 border-b border-zinc-200",role:"group","aria-label":g("tech"),children:[t.technologies.map(e=>{let t=(null==j?void 0:j.id)===e.id;return(0,l.jsx)("button",{type:"button","aria-pressed":t,onClick:()=>y(t?"":e.id),className:"relative min-h-[44px] whitespace-nowrap px-0 py-2 text-[15px] font-semibold leading-6 transition-colors after:absolute after:bottom-0 after:left-0 after:h-0.5 after:bg-primary after:transition-all ".concat(t?"text-active after:w-full":"text-zinc-700 after:w-0 hover:text-active hover:after:w-full"),children:e.title},e.id)}),j&&(0,l.jsxs)(a.T,{as:d(),href:f(j).url,target:f(j).isExternal?"_blank":void 0,rel:f(j).isExternal?"noopener noreferrer":void 0,color:"primary",radius:"full",variant:"bordered",className:"mb-[10px] ml-auto h-9 min-h-0 shrink-0 text-[13px] font-medium",children:[g("exploreTechnology",{title:j.title}),(0,l.jsx)(m.GoIcon,{"aria-hidden":"true",className:"ml-0.5",size:.75})]})]}),w.length>0?(0,l.jsx)("div",{className:"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:w.map(e=>{var t,r;let n=f(e),a=null==(r=e.featuredImage)||null==(t=r.node)?void 0:t.mediaItemUrl,s=N.includes(e.id);return(0,l.jsxs)(d(),{href:n.url,target:n.isExternal?"_blank":void 0,rel:n.isExternal?"noopener noreferrer":void 0,className:"min-w-0 overflow-hidden rounded-lg border bg-white transition-all hover:-translate-y-0.5 hover:shadow-md ".concat(s?"border-primary ring-1 ring-primary/60":"border-zinc-200 hover:border-primary/60"),children:[(0,l.jsx)("div",{className:"relative aspect-video bg-zinc-100",children:a&&(0,l.jsx)(x.default,{src:a,alt:e.title,fill:!0,sizes:"(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw",className:"object-cover"})}),(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("span",{className:"block text-[15px] font-semibold leading-6 text-zinc-900",children:[e.title,n.isExternal?" ↗":""]}),e.summary&&(0,l.jsx)("span",{className:"mt-1 block line-clamp-2 text-[13px] leading-5 text-zinc-500",children:e.summary})]})]},e.id)})}):(0,l.jsx)("p",{role:"status",className:"py-6 text-sm text-gray-500",children:j?g("noRelated"):g("empty")})]}),!r&&(t.error||t.truncated)&&(0,l.jsx)("p",{role:"status",className:"mt-4 text-xs text-gray-500",children:g("partial")})]}):(0,l.jsxs)("div",{className:k,style:v?void 0:{fontFamily:'"PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif'},children:[r?(0,l.jsx)("p",{role:"status",className:"py-8 text-sm text-gray-500",children:g("loading")}):(0,l.jsxs)("div",{className:s?"flex flex-col gap-4":"flex flex-col gap-4 md:min-h-0 md:items-start ".concat(t.technologies.length>0?"md:grid md:grid-cols-[288px_minmax(0,1fr)] md:gap-6":""),children:[t.technologies.length>0&&(0,l.jsxs)("div",{role:"group",className:s?"flex w-full shrink-0 flex-col border-r border-gray-100":"flex w-full shrink-0 flex-col border-r border-gray-100 pr-4 md:max-h-[min(560px,calc(100vh-var(--nav-height)-120px))] md:overflow-y-auto","aria-label":g("tech"),children:[(0,l.jsx)("div",{className:"mb-3 flex min-h-[20px] items-center",children:(0,l.jsx)("h3",{className:E,
1children:g("tech")})}),(0,l.jsx)("div",{className:"flex flex-col divide-y [&>*+*]:border-t-zinc-100",children:t.technologies.map(e=>{let t=f(e),r="".concat(z," ").concat((null==j?void 0:j.id)===e.id?"bg-[#f5f9f1] text-[#365314]":"text-zinc-800 hover:bg-[#f5f8f2] hover:text-[#365314]");return s?(0,l.jsxs)("button",{type:"button","aria-pressed":(null==j?void 0:j.id)===e.id,onClick:()=>y(e.id),className:"".concat(r," w-full text-left"),children:[(0,l.jsxs)("span",{className:"flex items-center justify-between gap-2",children:[(0,l.jsxs)("span",{className:"min-w-0",children:[(0,l.jsx)("span",{className:v?"block font-medium":"block font-semibold",children:e.title}),e.navSubline?(0,l.jsx)("span",{className:"mt-1 block text-[11px] font-normal leading-4 text-zinc-500",children:e.navSubline}):null]}),(0,l.jsx)("span",{"aria-hidden":"true",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full border text-[14px] leading-none transition-colors ".concat((null==j?void 0:j.id)===e.id?"border-primary bg-primary text-white":"border-zinc-200 text-zinc-500 group-hover:border-primary group-hover:bg-primary group-hover:text-white"),children:"›"})]}),(0,l.jsxs)("span",{className:"sr-only",children:[" — ",g("selectTechnology")]})]},e.id):(0,l.jsx)(d(),{href:t.url,target:t.isExternal?"_blank":void 0,rel:t.isExternal?"noopener noreferrer":void 0,onClick:c,onMouseEnter:()=>y(e.id),onFocus:()=>y(e.id),onMouseLeave:()=>y(""),onBlur:()=>y(""),className:r,children:(0,l.jsxs)("span",{className:"flex items-center justify-between gap-2",children:[(0,l.jsxs)("span",{className:"min-w-0",children:[(0,l.jsx)("span",{className:v?"block font-medium":"block font-semibold",children:e.title}),e.navSubline?(0,l.jsx)("span",{className:"mt-1 block text-[11px] font-normal leading-4 text-zinc-500",children:e.navSubline}):null]}),(0,l.jsx)("span",{"aria-hidden":"true",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full border text-[14px] leading-none transition-colors ".concat((null==j?void 0:j.id)===e.id?"border-primary bg-primary text-white":"border-zinc-200 text-zinc-500 group-hover:border-primary group-hover:bg-primary group-hover:text-white"),children:"›"})]})},e.id)})})]}),(0,l.jsxs)("div",{className:"min-w-0 md:max-h-[min(560px,calc(100vh-var(--nav-height)-120px))] md:overflow-y-auto md:pr-1",children:[(0,l.jsxs)("div",{className:"mb-3 flex min-h-[20px] flex-wrap items-center justify-between gap-2",children:[(0,l.jsx)("h3",{className:E,children:g("solution")}),s&&j&&(0,l.jsxs)(d(),{href:f(j).url,target:f(j).isExternal?"_blank":void 0,rel:"noopener noreferrer",onClick:c,className:"text-sm text-active",children:[g("openTechnology")," →"]}),!v&&(0,l.jsxs)(d(),{href:"/solutions",onClick:c,className:"text-sm text-active",children:[g("overview")," →"]})]}),w.length>0?(0,l.jsx)("div",{className:"grid gap-3 ".concat(s?"grid-cols-2":"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"),children:w.map(e=>{var t,r;let n=f(e),a=null==(r=e.featuredImage)||null==(t=r.node)?void 0:t.mediaItemUrl,s=N.includes(e.id);return(0,l.jsxs)(d(),{href:n.url,target:n.isExternal?"_blank":void 0,rel:n.isExternal?"noopener noreferrer":void 0,onClick:c,className:"group flex min-w-0 flex-col overflow-hidden rounded-lg border bg-white transition-colors ".concat(s?"border-primary bg-[#edf7e5] ring-inset ring-2 ring-primary/60":"border-gray-200 hover:border-primary"),children:[(0,l.jsx)("div",{className:"relative aspect-video bg-gray-50",children:a&&(0,l.jsx)(x.default,{src:a,alt:e.title,fill:!0,sizes:"240px",className:"object-cover"})}),(0,l.jsxs)("span",{className:"".concat(_," ").concat(s?"bg-[#edf7e5] text-[#365314]":""),children:[e.title,n.isExternal?" ↗":"",v&&e.summary&&(0,l.jsx)("span",{className:"mt-1 block line-clamp-2 text-xs font-normal text-gray-500",children:e.summary})]})]},e.id)})}):(0,l.jsx)("p",{role:"status",className:"py-6 text-sm text-gray-500",children:j?g("noRelated"):g("empty")})]})]}),!r&&(t.error||t.truncated)&&(0,l.jsx)("p",{role:"status",className:"mt-4 text-xs text-gray-500",children:g("partial")})]})}let y=function(e){let{navItem:t}
1=e,[r,a]=(0,n.useState)(!1),o=(0,n.useRef)(null),c=(0,i.usePathname)(),{data:x,loading:u}=v(t);return(0,n.useEffect)(()=>a(!1),[c]),(0,n.useEffect)(()=>{if(!r)return;let e=e=>{var t;"Escape"===e.key&&(null==(t=o.current)?void 0:t.contains(document.activeElement))&&a(!1)};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},[r]),(0,l.jsx)(s.I,{isOpen:r,onOpenChange:e=>{if(e)return void a(!0);queueMicrotask(()=>{var e;(null==(e=o.current)?void 0:e.contains(document.activeElement))||a(!1)})},closeDelay:100,delay:200,offset:1,radius:"none",triggerScaleOnOpen:!1,shouldCloseOnBlur:!1,classNames:{base:"z-[100] w-full top-[var(--nav-height)] fixed left-0",content:"shadow block w-[var(--screen-w)] max-w-full bg-white p-0 max-h-[calc(100vh-var(--nav-height)-60px)] overflow-auto"},content:(0,l.jsx)("div",{ref:o,className:"mx-auto w-full max-w-[1440px]",onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||a(!1)},children:(0,l.jsx)(b,{data:x,loading:u,onNavigate:()=>a(!1)})}),children:(0,l.jsxs)(d(),{href:t.url,onKeyDown:e=>{if(r&&"Tab"===e.key&&!e.shiftKey){var t;let r=null==(t=o.current)?void 0:t.querySelector("a[href]");r&&(e.preventDefault(),r.focus())}},className:"nav_menu_label ".concat(c===t.url?"active_route":""," ").concat(r?"active_focus":""),children:[t.title,(0,l.jsx)(m.ChevronDownIcon,{className:"ml-[-2px] menu_icon",size:.8})]})})}}}]);

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.