1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7522],{17522:(e,r,n)=>{n.r(r),n.d(r,{default:()=>u});var s=n(33499),t=n(46001),i=n.n(t),l=n(22237),c=n(13691),d=n(63651),a=n(22077);function o({service:e}){let{t:r}=(0,d.Bd)(),{widget:n}=e,{data:t,error:i}=(0,a.A)(n,"status",{exchange:"US"});if(i||t?.error)return(0,s.jsx)(c.A,{service:e,error:i});if(!t)return(0,s.jsx)(c.A,{service:e,children:(0,s.jsx)(l.A,{value:r("stocks.loading")})});let{isOpen:o}=t;return o?(0,s.jsx)("span",{className:"inline-flex items-center rounded-md bg-green-500/10 px-2 py-1 text-xs font-medium text-green-400/90 ring-1 ring-inset ring-green-500/20",children:r("stocks.open")}):(0,s.jsx)("span",{className:"inline-flex items-center rounded-md bg-red-400/10 px-2 py-1 text-xs font-medium text-red-400/60 ring-1 ring-inset ring-red-400/10",children:r("stocks.closed")})}function x({service:e,ticker:r}){let{t:n}=(0,d.Bd)(),{widget:t}=e,{data:i,error:o}=(0,a.A)(t,"quote",{symbol:r});return o||i?.error?(0,s.jsx)(c.A,{service:e,error:o}):i?(0,s.jsxs)("div",{className:"bg-theme-200/50 dark:bg-theme-900/20 rounded-sm flex flex-1 items-center justify-between m-1 p-1 text-xs",children:[(0,s.jsx)("span",{className:"font-thin ml-2 flex-none",children:r}),(0,s.jsxs)("div",{className:"flex items-center flex-row-reverse mr-2 text-right",children:[(0,s.jsx)("span",{className:`font-bold ml-2 w-10 ${i.dp>0?"text-emerald-300":"text-rose-300"}`,children:i.dp?.toFixed(2)?`${i.dp?.toFixed(2)}%`:n("widget.api_error")}),(0,s.jsx)("span",{className:"font-bold",children:i.c?n("common.number",{value:i?.c,style:"currency",currency:"USD"}):n("widget.api_error")})]})]}):(0,s.jsx)(c.A,{service:e,children:(0,s.jsx)(l.A,{value:n("stocks.loading")})})}function u({service:e}){let{t:r}=(0,d.Bd)(),{widget:n}=e,{watchlist:t,showUSMarketStatus:a}=n;return t&&t.length&&!(t.length>28)&&new Set(t).size===t.length?(0,s.jsxs)(c.A,{service:e,children:[(0,s.jsx)("div",{className:i()(e.description?"-top-10":"-top-8","absolute right-1 z-20"),children:!0===a&&(0,s.jsx)(o,{service:e})}),(0,s.jsx)("div",{className:"flex flex-col w-full",children:t.map(r=>(0,s.jsx)(x,{service:e,ticker:r},r))})]}):(0,s.jsx)(c.A,{service:e,children:(0,s.jsx)(l.A,{value:r("stocks.invalidConfiguration")})})}},22077:(e,r,n)=>{n.d(r,{A:()=>i});var s=n(3696),t=n(70570);function i(e,...r){let n={};r&&r[1]?.refreshInterval&&(n.refreshInterval=r[1].refreshInterval);let l=(0,t.$C)(e,...r);""===r[0]&&(l=null);let{data:c,error:d,mutate:a}=(0,s.Ay)(l,n);return{data:c,error:c?.error??d,mutate:a}}},70570:(e,r,n)=>{function s(e,r){let n=new URLSearchParams({group:e.service_group,service:e.service_name,index:e.index});return r&&n.append("endpoint",r),n}function t(e,r,n){let t=s(e,r);return n&&t.append("query",JSON.stringify(n)),`/api/services/proxy?${t.toString()}`}n.d(r,{$C:()=>t,_V:()=>s})}}]);
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.