1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3340],{67326:function(e,t,n){"use strict";n.d(t,{Z:function(){return CodeTagLink}});var r=n(15861);n(67294);var s=n(11057),i=n(5616),a=n(41664),l=n.n(a),c=n(11961),o=n(47516),d=n(85893);function CodeTagLink(e){var t=e.tag;return(0,d.jsx)(l(),{href:t.url,children:(0,d.jsx)(s.Z,{variant:"outlined",fullWidth:!0,startIcon:"lang"===t.type?(0,d.jsx)(o.wEI,{style:{fontSize:18}}):(0,d.jsx)(c.Z,{}),sx:{justifyContent:"left",px:1,py:.5},children:(0,d.jsxs)(i.Z,{sx:{display:"flex",width:"calc(100% - 24px)"},children:[(0,d.jsx)(i.Z,{title:"".concat(t.key," code examples"),sx:{flexGrow:1,textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.key}),(0,d.jsx)(i.Z,{children:(0,d.jsx)(r.Z,{color:"text.secondary",variant:"caption",children:t.count})})]})})})}},54594:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return V},default:function(){return Page}});var r=n(59499),s=n(5994),i=n(15861),a=n(57913),l=n(5616),c=n(11057),o=n(86886),d=n(12963),x=n(68540),h=n(34386),u=n(70872),p=n(6964),m=n(23795);n(67294);var j=n(11961),f=n(41664),g=n.n(f),Z=n(90250),v=n(76638),w=n(77984),y=n(14458),b=n(2962),P=n(53854),O=n(47516),_=n(21519),I=n(96486),N=n.n(I),C=n(67326),E=n(10637);n(43726);var S=n(69111);function htmlEncode(e){return(0,S.encode)(e)}var k=n(85893);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var z=["votes","newest"],V=!0;function Page(e){var t=e.tag,n=e.tagType,f=e.tagUrl,I=e.name,S=e.sort,V=e.page,B=e.total,D=e.totalPage,M=e.items,T=e.codeTagMap,L=e.userMap,R=e.codeUserVotedMap,U=e.userLovedCodeIds,A=e.requestInfo,Y=e.relatedItems,$=e.langs;I=N().trim(I," .,");var H="".concat(I),K=(0,Z.gV)(t,I,S,1,A.hostUrl),X=H,q=(0,E._I)(new Date,null,"YYYY-MM-DD"),F=y.$P.appName;if(M.length>0){var G=M[0]._source;X=G.code,X=N().truncate(X,{length:500}),q=G.createdAt,L&&L[G.userId]&&(F=L[G.userId].name)}return(0,k.jsx)(s.Z,{children:(0,k.jsxs)(l.Z,{sx:{px:{xs:1,sm:1.5,md:2},py:{xs:1,sm:1.5,md:2}},children:[(0,k.jsx)(b.PB,{title:"".concat(H," - ").concat(y.$P.appName),description:X,canonical:K}),(0,k.jsx)(b.dX,{url:K,title:htmlEncode(H),images:[],datePublished:q,description:htmlEncode(X),authorName:htmlEncode(F),publisherName:y.$P.appName,publisherL
1ogo:"".concat(A.hostUrl,"/assets/favicon/apple-touch-icon.png")}),(0,k.jsx)(i.Z,{variant:"h1",sx:{mt:0,overflow:"hidden",textOverflow:"ellipsis"},children:H}),(0,k.jsxs)(o.ZP,{container:!0,spacing:1,sx:{mb:1},children:[(0,k.jsx)(o.ZP,{item:!0,md:8,children:(0,k.jsxs)(d.Z,{"aria-label":"breadcrumb",children:[(0,k.jsx)(g(),{href:"/",children:(0,k.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,k.jsx)(v.Z,{sx:{mr:.5,mb:.5}}),(0,k.jsx)(l.Z,{children:"Home"})]})}),(0,k.jsx)(g(),{href:"/code",children:(0,k.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,k.jsx)(P.oT$,{style:{fontSize:24,marginRight:"4px",marginBottom:"4px"}}),(0,k.jsx)(l.Z,{children:"Codes"})]})}),null!==n&&(0,k.jsx)(g(),{href:f,children:(0,k.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:["lang"===n?(0,k.jsx)(O.wEI,{style:{fontSize:18,marginRight:"4px",marginBottom:"4px"}}):(0,k.jsx)(j.Z,{fontSize:"small",sx:{mr:.5,mb:.5}}),(0,k.jsx)(l.Z,{children:t})]})})]})}),B>1&&(0,k.jsx)(o.ZP,{item:!0,md:4,width:1,sx:{alignSelf:"flex-end"},children:(0,k.jsxs)(l.Z,{sx:{textAlign:"right"},children:[(0,k.jsxs)(i.Z,{variant:"span",color:"text.secondary",fontSize:16,sx:{mr:1,verticalAlign:"middle"},children:["(",B,")"]}),(0,k.jsxs)(x.Z,{size:"small",children:[(0,k.jsx)(g(),{href:(0,Z.gV)(t,I),children:(0,k.jsx)(h.Z,{title:"Results with best match",children:(0,k.jsx)(c.Z,{size:"small",variant:z.includes(S)?"text":"contained",children:"Relevance"})})}),(0,k.jsx)(g(),{href:(0,Z.gV)(t,I,"votes"),children:(0,k.jsx)(h.Z,{title:"Highest voted results",children:(0,k.jsx)(c.Z,{size:"small",variant:"votes"!==S?"text":"contained",children:"Votes"})})}),(0,k.jsx)(g(),{href:(0,Z.gV)(t,I,"newest"),children:(0,k.jsx)(h.Z,{title:"Newest results",children:(0,k.jsx)(c.Z,{size:"small",variant:"newest"!==S?"text":"contained",children:"Newest"})})})]})]})})]}),M.map(function(e){return(0,k.jsx)(w.Z,{requestInfo:A,item:e,codeTagMap:T,userMap:L,codeUserVotedMap:R,userLovedCodeIds:U},e._id+(0,a.ig)())}),(0,k.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center"},children:D>1&&(0,k.jsx)(u.Z,{showFirstButton:!0,showLastButton:!0,hidePrevButton:!0,hideNextButton:!0,count:D,page:V,siblingCount:1,boundaryCount:0,variant:"text",size:"large",color:"primary",renderItem:function(e){return(0,k.jsx)(g(),{href:(0,Z.gV)(t,I,S,e.page),children:(0,k.jsx)(p.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e))})}})}),Y.length>0&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(_.Z,{sx:{mt:2,mb:3}}),(0,k.jsx)(i.Z,{variant:"h3",children:"Related code examples"}),(0,k.jsx)(o.ZP,{container:!0,spacing:.5,children:Y.map(function(e){return(0,k.jsx)(o.ZP,{item:!0,sm:12,md:6,lg:4,width:1,children:(0,k.jsx)(g(),{passHref:!0,href:(0,Z.gV)(e.tag,e.name),legacyBehavior:!0,children:(0,k.jsx)(m.Z,{title:"".concat(I," code examples"),sx:{textDecorationColor:"transparent",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},href:e.url,children:e.name})})},"related-".concat(e.id))})})]}),(0,k.jsx)(_.Z,{sx:{mt:2,mb:3}}),(0,k.jsx)(i.Z,{variant:"h3",children:"Code examples by languages"}),(0,k.jsx)(o.ZP,{container:!0,spacing:2,children:$.map(function(e){return(0,k.jsx)(o.ZP,{item:!0,xs:6,sm:4,md:3,lg:2,children:(0,k.jsx)(C.Z,{tag:e})},e.key)})})]})})}},64632:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/code/[tag]/[name]",function(){return n(54594)}])}},function(e){e.O(0,[5445,4885,3874,4617,6556,9254,1474,872,5848,4157,250,18,9095,9774,2888,179],function(){return e(e.s=64632)}),_N_E=e.O()}]);
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.