1"use strict";(self.webpackChunkuds_styleguide=self.webpackChunkuds_styleguide||[]).push([[950],{2555:(function(h,l,u){var s=u(9493),m=u(4139);const n=100;class o{constructor(t){this.element=t,this.init()}init(){this.initTime(),this.setCalloutButton()}initTime(){const t=this.element.querySelector(".hero-banner-callout__heading > span > span > span"),e=this.element.querySelector(".hero-banner-callout__publish-time"),i=this.element.querySelector(".hero-banner-callout__publish-time span"),c=new URLSearchParams(window.location.search),b=c.get("authorName"),d=c.get("categoryName"),f=window.CQ!==void 0;i&&e&&(i.textContent=(0,m.b)(e.dataset.publishTime||"")),t&&b!==null?f&&(t.textContent=b.substring(0,n)):t&&d!==null&&(t.textContent=d.substring(0,n))}setCalloutButton(){const t=this.element.querySelector(".hero-banner-callout__inner"),e=this.element.querySelector(".uds-brand-button"),i=this.element.querySelector(".hero-banner-callout__heading-anchor");t&&e&&i&&this.element.classList.add("hero-banner-callout--has-button")}}const a=new s.q('[data-cmp-is="hero-banner"]',r=>new o(r));a.init(),a.observe()}),4139:(function(h,l,u){u.d(l,{b:function(){return m}});const s=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(r=null){const t=new Date;let e=r!==null?n(r):void 0;if(r!==null&&(e===void 0||Number.isNaN(e.getTime()))){const i=r.replace("T"," ").trim().split(" "),c=o(i[1]);c!==-1&&c!==void 0&&(e=new Date(`${i[2]}/${a(c+1)}/${a(i[0])}`))}if(e&&!Number.isNaN(e.getTime())){const i=(t.getTime()-e.getTime())/1e3;return i<3600?`${Math.ceil(i/60)} minutes ago`:i<86400?`${Math.ceil(i/60/60)} hours ago`:i<172800?"Yesterday":`${e.getDate()} ${s[e.getMonth()]} ${e.getFullYear()}`}return r||""}function n(r){const t=r.trim();let e=new Date(t);if(!Number.isNaN(e.getTime())||(e=new Date(t.replace("T"," ")),!Number.isNaN(e.getTime())))return e;const i=t.lastIndexOf(" ");if(e=new Date(`${t.substring(0,i)}T${t.substring(i+1)}`),!Number.isNaN(e.getTime()))return e}function o(r){if(!r)return-1;const t=s.indexOf(r);return t!==-1?t:s.indexOf(s.filter(e=>r===e.substring(0,3))[0])}function a(r){const t=parseInt(String(r),10);return`${t<10?"0":""}${t}`}}),9493:(function(h,l,u){u.d(l,{q:function(){return s}});class s{constructor(n,o){this.selector=n,this.createComponent=o}init(n=document){n.querySelectorAll(this.selector).forEach(o=>{this.initElement(o)})}observe(){const n=document.querySelector("body");if(!n)return;new MutationObserver(a=>{a.forEach(r=>{Array.from(r.addedNodes).forEach(t=>{this.initNode(t)})})}).observe(n,{childList:!0,subtree:!0})}initNode(n){if(n instanceof Element){n.matches(this.selector)&&this.initElement(n),this.init(n);return}n instanceof DocumentFragment&&this.init(n)}initElement(n){n.removeAttribute("data-cmp-is"),this.createComponent(n)}}})}]);
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.