1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[6895],{31568:(e,t,o)=>{o.d(t,{Ay:()=>b});var a=o(55462),i=o(19115),n=o(53507),c=o(86710),l=o(38537),r=o(60571),d=o(68759),p=o(73373);const s={size:"tiny",variant:"tertiary"},m=function(e){const{couponCode:t,couponCodeLabel:o,copyIcon:i,copyToClipAction:m,copyClipAccessibilityLabel:u,copiedClipAccessibilityLabel:b,copiedToClipLabel:y,withCodeLabel:_=!0,withCopyIcon:A=!0,buttonProps:h=s}=e,[g,T]=(0,a.useState)(!1),E=window.navigator?.clipboard,L=(0,l.a)(),[P]=(0,r.Z)(),v=(0,a.useMemo)(()=>C({couponCode:t,copyToClipAction:m}),[t,m]);return a.createElement("div",{className:"CopyToClipboard"},_&&o&&t&&a.createElement("span",{className:"CopyToClipboard__codeLabel"},a.createElement(c.Ay,{htmlTag:"span",textStyle:"body-1"},o),a.createElement(c.Ay,{htmlTag:"span",textStyle:"body-1"},t)),m?.label&&E&&L&&a.createElement("span",{className:"CopyToClipboard__copyToClipAction",title:g?b:u,"aria-live":"polite",role:"status"},g?a.createElement(n.Ay,{iconImage:"Check",iconSize:"s",label:y,size:h.size,variant:h.variant}):a.createElement(n.Ay,{action:v,iconImage:A?"copy":void 0,iconSize:"s",label:m.label,onClick:()=>{(async(e,t)=>{const{couponCode:o,copyToClipAction:a}=e||{},{setIsCopied:i,timeout:n}=t||{};if(!o||!a||!i||!n)return null;a?.clientActionType!==d.D2.COPYTEXT_CLICK&&await(0,p.eM)(o),i(!0),n(()=>i(!1),5e3)})({couponCode:t,copyToClipAction:m},{setIsCopied:T,timeout:P})},size:h.size,variant:h.variant})))},C=e=>{const{couponCode:t,copyToClipAction:o}=e;let a=o;return!o?.copyText&&t&&(a={...a,copyText:t}),a},u={buttonProps:i.shape({size:i.string,variant:i.string}),copiedToClipLabel:i.string,copyToClipAction:i.object,copyClipAccessibilityLabel:i.string,copiedClipAccessibilityLabel:i.string,couponCodeLabel:i.string,couponCode:i.string,copyIcon:i.string,withCodeLabel:i.bool,withCopyIcon:i.bool};m.propTypes=u;const b=m},24563:(e,t,o)=>{o.r(t),o.d(t,{FeaturedPromotedCompactCard:()=>_,default:()=>g,defaultProps:()=>h,propTypes:()=>A});var a=o(55462),i=o(44545),n=o(19115),c=o(53507),l=o(19747),r=o(15638),d=o(7034),p=o(86710),s=o(21367),m=o(34237),C=o(83058),u=o(52792),b=o(31568),y=o(57445);const _=function(e){const t=(0,a.useRef)(null),{backgroundColor:o,couponDetail:n,headline:y,subheadline:_,image:A,linkAction:g,buttonAction:T,rootMargin:E=h.rootMargin,root:L=h.root,threshold:P=h.threshold}=e;if((0,m.BL)(t,{root:L,rootMargin:E,threshold:P},(0,u.eP)(e)),!y||!_)return null;const v=n?.copyText,F=n?.couponAppliedLabel,I=v&&F,N=g&&g.label,x=T&&T.label,S=N&&x;return a.createElement("div",{className:"FeaturedPromotedCompactCard",ref:t},a.createElement(l.Ay,null,a.createElement("div",{className:i("FeaturedPromotedCompactCard__content",{[`FeaturedPromotedCompactCard__content--${o}`]:o,"FeaturedPromotedCompactCard__content--noImageWithLinkOption":N&&!x&&!A,"FeaturedPromotedCompactCard__content--noImageWithButtonOption":!N&&x&&!A,"FeaturedPromotedCompactCard__content--imageWithLinkOption":N&&!x&&A,"FeaturedPromotedCompactCard__content--imageWithButtonOption":!N&&x&&A,"FeaturedPromotedCompactCard__content--noCallToActionWithImage":!N&&!x&&A,"FeaturedPromotedCompactCard__content--noCallToActionNoImage":!N&&!x&&!A,"FeaturedPromotedCompactCard__content--hasMultiActions":S&&A,"FeaturedPromotedCompactCard__content--hasMultiActionsNoImage":S&&!A})},A&&a.createElement("div",{className:"FeaturedPromotedCompactCard__image"},a.createElement(s.Ay,(0,C.iU)({...A}))),y&&a.createElement("div",{className:"FeaturedPromotedCompactCard__titleContainer"},a.createElement("div",{className:i("FeaturedPromotedCompactCard__headline",{"FeaturedPromotedCompactCard__headline--position":A})},a.createElement("div",{className:"FeaturedPromotedCompactCard__headline--top"},a.createElement(p.Ay,{htmlTag:y.htmlTag,textStyle:y.textStyle?y.textStyle:"title-6",color:y.color,textAlign:y.textAlign},y.text),y.spacerValue&&a.createElement(d.Ay,{value:y.spacerValue})),_&&a.createElement(p.Ay,{htmlTag:"span",textStyle:"body-2",color:"neutral-800"},_))),x&&a.createElement("div",{className:i("FeaturedPromotedCompactCard__button",{"FeaturedPromotedCompactCard__button--position":A})}
1,I?a.createElement(b.Ay,{withCodeLabel:!1,withCopyIcon:!1,buttonProps:{variant:"secondary",size:"compact"},couponCode:v,couponCodeLabel:T.label,copyToClipAction:T,copyClipAccessibilityLabel:`${T.label} ${v}`,copiedClipAccessibilityLabel:`${F} ${v}`,copiedToClipLabel:F}):a.createElement(c.Ay,{compact:!0,secondary:!0,label:T.label,withHover:!0,ariaLabel:`${T.label} ${y.text}`,action:T})),N&&a.createElement("div",{className:i("FeaturedPromotedCompactCard__link",{"FeaturedPromotedCompactCard__link--position":A})},a.createElement(r.Ay,{action:g,withHover:!0,ariaLabel:g.label+" "+y.text},g.label)))))},A={backgroundColor:n.string,buttonAction:n.object,couponDetail:n.object,headline:n.object,image:n.object,linkAction:n.object,subheadline:n.string};_.propTypes=A;const h={...y.A.INTERSECTION_OBSERVER_OPTIONS};_.defaultProps=h;const g=_}}]); 2//# sourceMappingURL=ulta-modules-FeaturedPromotedCompactCard-FeaturedPromotedCompactCard-js.67c078ea.chunk.js.map
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.