1"use strict";(self.webpackChunkweb=self.webpackChunkweb||[]).push([[815],{2409(e,n,o){o.r(n),o.d(n,{NewsPage:()=>_,NewsPageView:()=>I});var t=o(50016),l=o(33651),r=o(27316),s=o(73428),i=o(84242),a=o(31356),c=o(26444),d=o(64205),g=o(29038),u=o(57417),b=o(96239),f=o(77429),w=o(90076);const p=e=>{const{style:n,selected:o,selectedStyle:l,labelStyle:r,useRemoveIcon:s=!0}=e,i=(0,t.useMemo)((()=>[m.container,...o?[m.selected]:[],n,...o?[l]:[]]),[o,n,l]);return(0,w.jsx)(f.j,{style:i,labelStyle:[m.label,r],disabledStyle:m.disabled,disabled:e.disabled,label:e.label,icon:o&&s?(0,w.jsx)(b.aL,{width:18,height:18}):void 0,iconStyle:m.iconStyle,iconSpacingOnRight:!1,onPress:e.onPress,children:e.children})},m=g.A.create({container:{alignItems:"center",height:40,backgroundColor:u.bL,borderColor:u.DO,borderStyle:"solid",borderWidth:1,borderRadius:20,paddingHorizontal:16},iconStyle:{marginLeft:-6,marginRight:4},selected:{backgroundColor:u.b5,borderColor:u.b5},disabled:{opacity:.6},label:{textTransform:"uppercase",fontFamily:u.Ov,fontSize:14,color:u.DO}});var h=o(81210),v=o(21039);const y=e=>{const{news:n,tags:o,onSelected:l}=e,[r,s]=(0,t.useState)(void 0),i=(0,t.useMemo)((()=>{if("All"===r||void 0===r)return n;const e=o.find((e=>"string"===typeof e?e===r:e.label===r));return"string"===typeof e?n.filter((n=>{var o;return null===(o=n.tags)||void 0===o?void 0:o.includes(e)})):e&&"tags"in e?n.filter((n=>e.tags.some((e=>{var o;return null===(o=n.tags)||void 0===o?void 0:o.includes(e)})))):n}),[n,r,o]),a=(0,t.useMemo)((()=>o.filter((e=>"string"===typeof e?n.some((n=>{var o;return null===(o=n.tags)||void 0===o?void 0:o.includes(e)})):"tags"in e&&e.tags.some((e=>n.some((n=>{var o;return null===(o=n.tags)||void 0===o?void 0:o.includes(e)}))))))),[o,n]);return(0,w.jsxs)(c.A,{style:S.container,children:[a.length>0&&(0,w.jsx)(d.A,{horizontal:!0,showsHorizontalScrollIndicator:(0,h.V)(!1,{web:!0}),style:S.scrollView,children:(0,w.jsx)(c.A,{style:S.tagContainer,children:["All",...a].map((e=>{const n="string"===typeof e?e:e.label;return(0,w.jsx)(p,{style:S.tagButton,selectedStyle:S.tagButtonSelected,label:n,selected:void 0!==r?r===n:"All"===n,useRemoveIcon:!1,onPress:()=>(e=>{s(r!==e?e:"All")})(n)},n)}))})}),(0,w.jsx)(v.e,{news:i,onSelected:l})]})},S=g.A.create({container:{marginHorizontal:16},scrollView:{flexShrink:0,flexGrow:0},tagContainer:{flexDirection:"row",marginBottom:16},tagButton:{marginHorizontal:4,marginVertical:4,backgroundColor:u.$t,borderWidth:0},tagButtonSelected:{backgroundColor:u.fu,borderWidth:0}});var x=o(97206),j=o(76966),k=o(47192),C=o(62296),A=o(9101),N=o(17116);const z=new C.Parser,P=e=>{const n=z.parse((0,N.Sy)(!1,e.config.appUrl,e.config.cdnUrl,`${window.location.pathname}${window.location.search}`,e.config.facebookConfig.appId,e.config.appleAppStoreId,e.config.package,e.config.appName,e.config.appLaunchProtocol,e.config.environment));return(0,w.jsx)(A.mg,{children:n})},_=e=>{const n=(0,l.d4)(j.z);return(0,w.jsxs)(t.Fragment,{children:[(0,w.jsx)(P,{config:n}),(0,w.jsx)(I,{...e,remoteNewsConfig:(0,l.d4)(i.Qj),news:(0,l.d4)(s.a)})]})},I=(0,t.memo)((e=>{const{news:n,remoteNewsConfig:o}=e,s=(0,l.wA)();(0,t.useEffect)((()=>{setTimeout((()=>{null!==n&&void 0!==n&&n.length&&s((0,r.setNewsRead)(n[0].created.toDate()))}),3e3)}),[s,n]),(0,t.useEffect)((()=>{(0,x.X3)("News page")}),[]);const i=(0,t.useCallback)(((e,n)=>{e&&((0,x.d4)("news_page_news_url_press"),window.open(e,"_blank"))}),[]);return(0,w.jsx)(k.L,{children:(0,w.jsx)("div",{className:(0,a.kY)("news-page__container"),children:(0,w.jsx)(y,{tags:o.tags,news:null!==n&&void 0!==n?n:[],onSelected:i})})})}))}}]);
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.