1import{g as t,ld as r}from"./chunk-GLMOMHUQ.js";var m=(()=>{class a{}return t(a,"MenuDropdownBlockType","MenuDropdownBlock"),t(a,"LinkIconBlockType","LinkIconBlock"),a})();var l=class a{constructor(){t(this,"Name");t(this,"ImageUrl");t(this,"ImageAltText");t(this,"Title");t(this,"Url");t(this,"RouteSegments");t(this,"Type")}static Map(e){let n={Name:e.Name,ImageUrl:e.Image.Url!=null?r(e.Image.Url):null,Title:e.Link.Text??e.Link.Title,Url:e.Link.Href,RouteSegments:e.Link.ContentLink?.Expanded?.RouteSegments,Type:m.LinkIconBlockType};return a.SetRouteSegmentIfInternalLink(n)}static MapFromLink(e){let n={Name:e.Title!=null?e.Title:e.ContentLink?.Expanded?.Name,ImageUrl:e.ContentLink?.Expanded?.MenuIcon?.Url!=null?r(e.ContentLink.Expanded.MenuIcon.Url):null,Title:e.Title,Url:e.Href,RouteSegments:e.ContentLink?.Expanded?.RouteSegments,Type:m.LinkIconBlockType};return a.SetRouteSegmentIfInternalLink(n)}static MapProductImageLink(e){switch(e.__typename){case"LinkIconBlock":return a.Map(e);default:let n={Name:e.Name,ImageUrl:r(e.Image.Url),ImageAltText:e.Image?.Expanded?.Caption&&e.Image.Expanded.Caption.trim()!==""?e.Image.Expanded.Caption:e.Name,Title:e.Name,Url:e.Url,RouteSegments:e.RouteSegments,Type:m.LinkIconBlockType};return a.SetRouteSegmentIfInternalLink(n)}}static SetRouteSegmentIfInternalLink(e){return e.Url&&!e.Url.startsWith("http")&&(e.RouteSegments=e.Url,e.Url=null),e}static MapWithImageFromHref(e){let n={Name:e.Title??e.ContentLink?.Expanded?.Name,ImageUrl:e.Href?r(e.Href):null,Title:e.Text??e.Title,Url:e.Href,RouteSegments:e.ContentLink?.Expanded?.RouteSegments,Type:m.LinkIconBlockType};return a.SetRouteSegmentIfInternalLink(n)}};export{m as a,l as b};
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.