diff --git a/blocks/header/searchbar.js b/blocks/header/searchbar.js index f4a8e341fc..b2d4d799ee 100644 --- a/blocks/header/searchbar.js +++ b/blocks/header/searchbar.js @@ -2,13 +2,14 @@ import { loadScript } from '../../scripts/aem.js'; import { getConfigValue } from '../../scripts/configs.js'; (async () => { - const widgetProd = '/scripts/widgets/LiveSearchAutocomplete.js'; + const widgetProd = '/scripts/widgets/SearchAsYouType.js'; await loadScript(widgetProd); const storeDetails = { environmentId: await getConfigValue('commerce-environment-id'), environmentType: (await getConfigValue('commerce-endpoint')).includes('sandbox') ? 'testing' : '', apiKey: await getConfigValue('commerce-x-api-key'), + apiUrl: await getConfigValue('commerce-endpoint'), websiteCode: await getConfigValue('commerce-website-code'), storeCode: await getConfigValue('commerce-store-code'), storeViewCode: await getConfigValue('commerce-store-view-code'), diff --git a/scripts/widgets/LiveSearchAutocomplete.js b/scripts/widgets/LiveSearchAutocomplete.js deleted file mode 100644 index a2b95f3252..0000000000 --- a/scripts/widgets/LiveSearchAutocomplete.js +++ /dev/null @@ -1,43 +0,0 @@ -/*! livesearch-autocomplete@v1.0.0 */ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{var e={819:(e,t,n)=>{const r=n(820);e.exports=function(e){if("string"!=typeof e)return;const t=e.toUpperCase();return Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0},e.exports.currencySymbolMap=r},820:e=>{e.exports={AED:"د.إ",AFN:"؋",ALL:"L",AMD:"֏",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"₼",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"₿",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"¥",CNY:"¥",COP:"$",COU:"COU",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",ETH:"Ξ",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JOD:"JD",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KWD:"KD",KYD:"$",KZT:"₸",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTC:"Ł",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"S$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",STN:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"лв",VEF:"Bs",VES:"Bs.S",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",XSU:"Sucre",XUA:"XUA",YER:"﷼",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"}},281:(e,t,n)=>{"use strict";var r=n(892),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=c(n);p&&(a=a.concat(p(n)));for(var s=l(t),_=l(n),m=0;m{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,_=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,S=n?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case p:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case _:case l:return e;default:return t}}case o:return t}}}function w(e){return b(e)===p}t.AsyncMode=c,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=m,t.Memo=_,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return w(e)||b(e)===c},t.isConcurrentMode=w,t.isContextConsumer=function(e){return b(e)===u},t.isContextProvider=function(e){return b(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return b(e)===d},t.isFragment=function(e){return b(e)===i},t.isLazy=function(e){return b(e)===m},t.isMemo=function(e){return b(e)===_},t.isPortal=function(e){return b(e)===o},t.isProfiler=function(e){return b(e)===s},t.isStrictMode=function(e){return b(e)===a},t.isSuspense=function(e){return b(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===_||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===g||e.$$typeof===y||e.$$typeof===S||e.$$typeof===v)},t.typeOf=b},892:(e,t,n)=>{"use strict";e.exports=n(651)},821:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),p=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case d:case f:return e;default:switch(e=e&&e.$$typeof){case c:case u:case p:case _:case h:case l:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===a||e===d||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=v},338:(e,t,n)=>{"use strict";e.exports=n(821)},160:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{default:()=>Cr});var e,t,o,i,a,s,l,u,c={},p=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function h(e,t){for(var n in t)e[n]=t[n];return e}function _(e){var t=e.parentNode;t&&t.removeChild(e)}function m(t,n,r){var o,i,a,s={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return v(t,s,o,i,null)}function v(e,n,r,i,a){var s={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++o:a};return null==a&&null!=t.vnode&&t.vnode(s),s}function g(e){return e.children}function y(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&i.sort(l));C.__r=0}function k(e,t,n,r,o,i,a,s,l,u,d){var h,_,m,y,b,w,C,k,A,D=0,N=r&&r.__k||p,M=N.length,I=M,R=t.length;for(n.__k=[],h=0;h0?v(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)?(y.__=n,y.__b=n.__b+1,-1===(k=P(y,N,C=h+D,I))?m=c:(m=N[k]||c,N[k]=void 0,I--),E(e,y,m,o,i,a,s,l,u,d),b=y.__e,(_=y.ref)&&m.ref!=_&&(m.ref&&O(m.ref,null,y),d.push(_,y.__c||b,y)),null!=b&&(null==w&&(w=b),(A=m===c||null===m.__v)?-1==k&&D--:k!==C&&(k===C+1?D++:k>C?I>R-C?D+=k-C:D--:D=k(null!=l?1:0))for(;a>=0||s=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(s2&&(l.children=arguments.length>3?e.call(arguments,2):r),v(t.type,l,o||t.key,i||t.ref,null)}e=p.slice,t={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},o=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},n),this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),w(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),w(this))},y.prototype.render=g,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},C.__r=0,u=0;var B,H,V,W,Y=0,G=[],K=[],q=t.__b,Z=t.__r,Q=t.diffed,X=t.__c,J=t.unmount;function ee(e,n){t.__h&&t.__h(H,e,Y||n),Y=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:K}),r.__[e]}function te(e){return Y=1,ne(_e,e)}function ne(e,t,n){var r=ee(B++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):_e(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};H.u=!0;var i=H.shouldComponentUpdate,a=H.componentWillUpdate;H.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},H.shouldComponentUpdate=o}return r.__N||r.__}function re(e,n){var r=ee(B++,3);!t.__s&&he(r.__H,n)&&(r.__=e,r.i=n,H.__H.__h.push(r))}function oe(e,n){var r=ee(B++,4);!t.__s&&he(r.__H,n)&&(r.__=e,r.i=n,H.__h.push(r))}function ie(e){return Y=5,ae((function(){return{current:e}}),[])}function ae(e,t){var n=ee(B++,7);return he(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function se(e,t){return Y=8,ae((function(){return e}),t)}function le(e){var t=H.context[e.__c],n=ee(B++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(H)),t.props.value):e.__}function ue(){for(var e;e=G.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(de),e.__H.__h.forEach(fe),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}}t.__b=function(e){H=null,q&&q(e)},t.__r=function(e){Z&&Z(e),B=0;var t=(H=e.__c).__H;t&&(V===H?(t.__h=[],H.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=K,e.__N=e.i=void 0}))):(t.__h.forEach(de),t.__h.forEach(fe),t.__h=[],B=0)),V=H},t.diffed=function(e){Q&&Q(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==G.push(n)&&W===t.requestAnimationFrame||((W=t.requestAnimationFrame)||pe)(ue)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==K&&(e.__=e.__V),e.i=void 0,e.__V=K}))),V=H=null},t.__c=function(e,n){n.some((function(e){try{e.__h.forEach(de),e.__h=e.__h.filter((function(e){return!e.__||fe(e)}))}catch(r){n.some((function(e){e.__h&&(e.__h=[])})),n=[],t.__e(r,e.__v)}})),X&&X(e,n)},t.unmount=function(e){J&&J(e);var n,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{de(e)}catch(e){n=e}})),r.__H=void 0,n&&t.__e(n,r.__v))};var ce="function"==typeof requestAnimationFrame;function pe(e){var t,n=function(){clearTimeout(r),ce&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ce&&(t=requestAnimationFrame(n))}function de(e){var t=H,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),H=t}function fe(e){var t=H;e.__c=e.__(),H=t}function he(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function _e(e,t){return"function"==typeof t?t(e):t}function me(e,t){for(var n in t)e[n]=t[n];return e}function ve(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function ge(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function ye(e){this.props=e}(ye.prototype=new y).isPureReactComponent=!0,ye.prototype.shouldComponentUpdate=function(e,t){return ve(this.props,e)||ve(this.state,t)};var Se=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Se&&Se(e)};var be="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var we=function(e,t){return null==e?null:A(A(e).map(t))},Ce={map:we,forEach:we,count:function(e){return e?A(e).length:0},only:function(e){var t=A(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:A},ke=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);ke(e,t,n,r)};var xe=t.unmount;function Ae(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=me({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ae(e,t,n)}))),e}function Le(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Le(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Pe(){this.__u=0,this.t=null,this.__b=null}function De(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ne(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),xe&&xe(e)},(Pe.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=De(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Le(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Pe.prototype.componentWillUnmount=function(){this.t=[]},Pe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ae(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&m(g,null,e.fallback);return o&&(o.__h=null),[m(g,null,t.__a?null:e.children),o]};var Me=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),U(m(Ie,{context:t.context},e.__v),t.l)}(Ne.prototype=new y).__a=function(e){var t=this,n=De(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Me(t,e,r)):o()};n?n(i):i()}},Ne.prototype.render=function(e){this.u=null,this.o=new Map;var t=A(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Ne.prototype.componentDidUpdate=Ne.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Me(e,n,t)}))};var Re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Te=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Oe=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,je=/[A-Z0-9]/g,$e="undefined"!=typeof document,Ue=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ze(e,t,n){return null==t.__k&&(t.textContent=""),U(e,t),"function"==typeof n&&n(),e?e.__c:null}function Fe(e,t,n){return z(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Be=t.event;function He(){}function Ve(){return this.cancelBubble}function We(){return this.defaultPrevented}t.event=function(e){return Be&&(e=Be(e)),e.persist=He,e.isPropagationStopped=Ve,e.isDefaultPrevented=We,e.nativeEvent=e};var Ye,Ge={enumerable:!1,configurable:!0,get:function(){return this.class}},Ke=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||$e&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Ue(t.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":Oe.test(o)?o=a:-1===n.indexOf("-")&&Te.test(o)?o=o.replace(je,"-$&").toLowerCase():null===i&&(i=void 0):a=o="oninput","oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=A(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=A(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Ge)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Re,Ke&&Ke(e)};var qe=t.__r;t.__r=function(e){qe&&qe(e),Ye=e.__c};var Ze=t.diffed;t.diffed=function(e){Ze&&Ze(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Ye=null};var Qe={ReactCurrentDispatcher:{current:{readContext:function(e){return Ye.__n[e.__c].props.value}}}};function Xe(e){return!!e&&e.$$typeof===Re}function Je(e){return!!e.__k&&(U(null,e),!0)}function et(e){e()}var tt={useState:te,useId:function(){var e=ee(B++,11);if(!e.__){for(var t=H.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useReducer:ne,useEffect:re,useLayoutEffect:oe,useInsertionEffect:oe,useTransition:function(){return[!1,et]},useDeferredValue:function(e){return e},useSyncExternalStore:function(e,t){var n=t(),r=te({h:{__:n,v:t}}),o=r[0].h,i=r[1];return oe((function(){o.__=n,o.v=t,ge(o.__,t())||i({h:o})}),[e,n,t]),re((function(){return ge(o.__,o.v())||i({h:o}),e((function(){ge(o.__,o.v())||i({h:o})}))}),[e]),n},startTransition:et,useRef:ie,useImperativeHandle:function(e,t,n){Y=6,oe((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))},useMemo:ae,useCallback:se,useContext:le,useDebugValue:function(e,n){t.useDebugValue&&t.useDebugValue(n?n(e):e)},version:"17.0.2",Children:Ce,render:ze,hydrate:Fe,unmountComponentAtNode:Je,createPortal:function(e,t){var n=m(Ee,{__v:e,i:t});return n.containerInfo=t,n},createElement:m,createContext:function(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,w(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return m.bind(null,e)},cloneElement:function(e){return Xe(e)?F.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:g,isValidElement:Xe,isElement:Xe,isFragment:function(e){return Xe(e)&&e.type===g},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:y,PureComponent:ye,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:ve(this.props,e)}function r(t){return this.shouldComponentUpdate=n,m(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function t(t){var n=me({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=be,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:g,Suspense:Pe,SuspenseList:Ne,lazy:function(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return m(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qe};var nt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const rt=(e,t=3,n=!1)=>{const r=ie(null),o=ie(null),i=ie(null),[a,s]=te(!1),[l,u]=te(""),[c,p]=te(),[d,f]=te(!1),[h,_]=te(!1),m=se((r=>nt(void 0,void 0,void 0,(function*(){const o=null==r?void 0:r.trim();if("string"!=typeof o||(null==o?void 0:o.length)()=>{n.current&&clearTimeout(n.current)}),[]),(...r)=>{const o=setTimeout((()=>{e(...r)}),t);clearTimeout(n.current),n.current=o}}((e=>m(e)),250)),g=se((e=>{var t;u(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)}),[u]),y=se((e=>{const t=new FormData(e.target).get("search");m(t)}),[m]),S=ae((()=>({onSubmit:y})),[y]),b=ae((()=>({onChange:g})),[g]);return re((()=>{const e=null==l?void 0:l.trim();if("string"!=typeof e||(null==e?void 0:e.length)e?{}:e));_(!0),v.current(e)}),[m,l]),{active:a,formProps:S,formRef:r,inputProps:b,inputRef:o,loading:d,minQueryLengthHit:h,searchTerm:l,results:c,resultsRef:i,setActive:s,setLoading:f,setResults:p,setSearchTerm:u,setMinQueryLengthHit:_}},ot={Popover:{suggestions:"Suggestions",aria:"Search term suggestions",all:"View all"}},it={default:ot,bg_BG:{Popover:{suggestions:"Предложения",aria:"Предложения за термини за търсене",all:"Преглед на всички"}},ca_ES:{Popover:{suggestions:"Suggeriments",aria:"Suggeriments de termes de cerca",all:"Mostra tot"}},cs_CZ:{Popover:{suggestions:"Návrhy",aria:"Návrhy vyhledávacích výrazů",all:"Zobrazit všechny"}},da_DK:{Popover:{suggestions:"Forslag",aria:"Forslag til søgeord",all:"Vis alle"}},de_DE:{Popover:{suggestions:"Vorschläge",aria:"Begriffsvorschläge suchen",all:"Alle anzeigen"}},el_GR:{Popover:{suggestions:"Προτάσεις",aria:"Προτάσεις όρων αναζήτησης",all:"Προβολή όλων"}},en_GB:{Popover:{suggestions:"Suggestions",aria:"Search term suggestions",all:"View all"}},en_US:ot,es_ES:{Popover:{suggestions:"Sugerencias",aria:"Sugerencias de términos de búsqueda",all:"Ver todo"}},et_EE:{Popover:{suggestions:"Soovitused",aria:"Otsingusõnade soovitused",all:"Vaata kõiki"}},eu_ES:{Popover:{suggestions:"Iradokizunak",aria:"Bilaketa-terminoen iradokizunak",all:"Ikusi guztiak"}},fa_IR:{Popover:{suggestions:"پیشنهادها",aria:"جستجوی پیشنهادهای اصطلاح",all:"مشاهده همه"}},fi_FI:{Popover:{suggestions:"Ehdotukset",aria:"Ehdotetut hakusanat",all:"Näytä kaikki"}},fr_FR:{Popover:{suggestions:"Suggestions",aria:"Suggestions de termes de recherche",all:"Tout afficher"}},gl_ES:{Popover:{suggestions:"Suxestións",aria:"Buscar suxestións de termos",all:"Ver todos"}},hi_IN:{Popover:{suggestions:"सुझाव",aria:"शब्द सुझाव खोजें",all:"सभी देखे"}},hu_HU:{Popover:{suggestions:"Javaslatok",aria:"Keresési kifejezésre vonatkozó javaslatok",all:"Az összes megtekintése"}},id_ID:{Popover:{suggestions:"Saran",aria:"Saran istilah pencarian",all:"Lihat semua"}},it_IT:{Popover:{suggestions:"Suggerimenti",aria:"Suggerimenti sui termini di ricerca",all:"Visualizza tutto"}},ja_JP:{Popover:{suggestions:"候補",aria:"検索語の候補",all:"すべて表示"}},ko_KR:{Popover:{suggestions:"제안",aria:"검색어 제안",all:"모두 보기"}},lt_LT:{Popover:{suggestions:"Pasiūlymai",aria:"Ieškos terminų pasiūlymai",all:"Peržiūrėti viską"}},lv_LV:{Popover:{suggestions:"Ieteikumi",aria:"Meklēšanas vienumu ieteikumi",all:"Skatīt visus"}},nb_NO:{Popover:{suggestions:"Forslag",aria:"Forslag til søkeord",all:"Vis alle"}},nl_NL:{Popover:{suggestions:"Suggesties",aria:"Suggesties voor zoektermen",all:"Alles weergeven"}},pt_BR:{Popover:{suggestions:"Sugestões",aria:"Sugestões de termos de pesquisa",all:"Exibir tudo"}},pt_PT:{Popover:{suggestions:"Sugestões",aria:"Sugestões de termos de pesquisa",all:"Ver tudo"}},ro_RO:{Popover:{suggestions:"Sugestii",aria:"Sugestii de termeni de căutare",all:"Vizualizați tot"}},ru_RU:{Popover:{suggestions:"Варианты",aria:"Предложения по поисковым запросам",all:"Все"}},sv_SE:{Popover:{suggestions:"Förslag",aria:"Söktermsförslag",all:"Visa allt"}},th_TH:{Popover:{suggestions:"เสนอแนะ",aria:"คำค้นหาที่เสนอแนะ",all:"ดูทั้งหมด"}},tr_TR:{Popover:{suggestions:"Öneriler",aria:"Arama terimi önerileri",all:"Tümünü göster"}},zh_Hans_CN:{Popover:{suggestions:"建议单词",aria:"搜索单词建议",all:"查看全部"}},zh_Hant_TW:{Popover:{suggestions:"建議",aria:"搜尋字詞建議",all:"檢視全部"}}},at=e=>{const t=null!=e?e:"";return Object.keys(it).includes(t)?t:"default"},st={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let lt;const ut=new Uint8Array(16);function ct(){if(!lt&&(lt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lt(ut)}const pt=[];for(let e=0;e<256;++e)pt.push((e+256).toString(16).slice(1));function dt(e,t=0){return pt[e[t+0]]+pt[e[t+1]]+pt[e[t+2]]+pt[e[t+3]]+"-"+pt[e[t+4]]+pt[e[t+5]]+"-"+pt[e[t+6]]+pt[e[t+7]]+"-"+pt[e[t+8]]+pt[e[t+9]]+"-"+pt[e[t+10]]+pt[e[t+11]]+pt[e[t+12]]+pt[e[t+13]]+pt[e[t+14]]+pt[e[t+15]]}const ft=function(e,t,n){if(st.randomUUID&&!t&&!e)return st.randomUUID();const r=(e=e||{}).random||(e.rng||ct)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return dt(r)},ht=e=>{if(!e)return[];return e.map(((e,t)=>{var n,r,o;return{name:e.product.name,sku:e.product.sku,url:null!==(n=e.product.canonical_url)&&void 0!==n?n:"",imageUrl:null!==(o=null===(r=e.product.image)||void 0===r?void 0:r.url)&&void 0!==o?o:"",price:e.product.price_range.minimum_price.final_price.value,rank:t}}))},_t=e=>{if(!e)return[];return e.map(((e,t)=>({suggestion:e,rank:t})))},mt=e=>{if(!e)return[];return e.map((e=>({attribute:e.attribute,title:e.title,type:e.type||"PINNED",buckets:e.buckets.map((e=>e))})))};var vt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class gt{constructor({environmentId:e,environmentType:t,websiteCode:n,storeCode:r,storeViewCode:o,searchUnitId:i,apiKey:a,config:s,context:l}){var u,c,p;if(this.performSearch=(e,t)=>vt(this,void 0,void 0,(function*(){var n;const r=ft(),o=[{attribute:"visibility",in:["Search","Catalog, Search"]}],i={attribute:"inStock",eq:"true"};t&&o.push(i),((e,t,n,r,o)=>{window.adobeDataLayer.push((i=>{var a,s;const l=null!==(a=i.getState("searchInputContext"))&&void 0!==a?a:{units:[]},u={searchUnitId:e,searchRequestId:t,queryTypes:["products","suggestions"],phrase:n,pageSize:o,currentPage:1,filter:r,sort:[]},c=null===(s=null==l?void 0:l.units)||void 0===s?void 0:s.findIndex((t=>(null==t?void 0:t.searchUnitId)===e));void 0===c||c<0?l.units.push(u):l.units[c]=u,i.push({searchInputContext:l})}))})(this.searchUnitId,r,e,o,this.pageSize),window.adobeDataLayer.push((e=>{e.push({event:"search-request-sent",eventInfo:Object.assign(Object.assign({},e.getState()),{searchUnitId:this.searchUnitId})})}));const a=(e=>({"Magento-Environment-Id":e.environmentId,"Magento-Website-Code":e.websiteCode,"Magento-Store-Code":e.storeCode,"Magento-Store-View-Code":e.storeViewCode,"X-Api-Key":e.apiKey,"Content-Type":e.contentType,"X-Request-Id":e.xRequestId}))({environmentId:this.search.environmentId,websiteCode:this.search.websiteCode,storeCode:this.search.storeCode,storeViewCode:this.search.storeViewCode,apiKey:this.search.apiKey,contentType:"application/json",xRequestId:r}),s={phrase:null!=e?e:"",pageSize:this.pageSize,filter:o,context:this.context},l=yield fetch(this.apiUrl,{method:"POST",headers:a,body:JSON.stringify({query:"\n query quickSearch(\n $phrase: String!\n $pageSize: Int = 20\n $currentPage: Int = 1\n $filter: [SearchClauseInput!]\n $sort: [ProductSearchSortInput!]\n $context: QueryContextInput\n ) {\n productSearch(\n phrase: $phrase\n page_size: $pageSize\n current_page: $currentPage\n filter: $filter\n sort: $sort\n context: $context\n ){\n items {\n ...Product\n productView {\n urlKey\n }\n }\n page_info {\n current_page\n page_size\n total_pages\n }\n }\n }\n \n fragment Product on ProductSearchItem {\n product {\n __typename\n sku\n name\n canonical_url\n small_image {\n url\n }\n image {\n url\n }\n thumbnail {\n url\n }\n price_range {\n minimum_price {\n fixed_product_taxes {\n amount {\n value\n currency\n }\n label\n }\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n maximum_price {\n fixed_product_taxes {\n amount {\n value\n currency\n }\n label\n }\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n }\n }\n }\n\n",variables:Object.assign({},s)})}),u=yield l.json();return((e,t,n)=>{window.adobeDataLayer.push((r=>{var o,i,a,s;const l=null!==(o=r.getState("searchResultsContext"))&&void 0!==o?o:{units:[]},u=null===(i=null==l?void 0:l.units)||void 0===i?void 0:i.findIndex((t=>(null==t?void 0:t.searchUnitId)===e)),c={searchUnitId:e,searchRequestId:t,products:ht(null==n?void 0:n.items),categories:[],suggestions:_t(null==n?void 0:n.suggestions),page:(null===(a=null==n?void 0:n.page_info)||void 0===a?void 0:a.current_page)||1,perPage:(null===(s=null==n?void 0:n.page_info)||void 0===s?void 0:s.page_size)||6,facets:mt(null==n?void 0:n.facets)};void 0===u||u<0?l.units.push(c):l.units[u]=c,r.push({searchResultsContext:l})}))})(this.searchUnitId,r,null===(n=null==u?void 0:u.data)||void 0===n?void 0:n.productSearch),window.adobeDataLayer.push((e=>{e.push({event:"search-response-received",eventInfo:Object.assign(Object.assign({},e.getState()),{searchUnitId:this.searchUnitId})})})),window.adobeDataLayer.push((e=>{e.push({event:"search-results-view",eventInfo:Object.assign(Object.assign({},e.getState()),{searchUnitId:this.searchUnitId})})})),u})),this.minQueryLength=null!==(u=null==s?void 0:s.minQueryLength)&&void 0!==u?u:3,this.pageSize=Number(null==s?void 0:s.pageSize)?Number(null==s?void 0:s.pageSize):6,this.currencyCode=null!==(c=null==s?void 0:s.currencyCode)&&void 0!==c?c:"",this.currencyRate=null!==(p=null==s?void 0:s.currencyRate)&&void 0!==p?p:"1",this.displayInStockOnly="1"!=(null==s?void 0:s.displayOutOfStock),this.searchUnitId=i,this.context=l||{customerGroup:""},this.context.userViewHistory=(()=>{const e=localStorage.getItem("ds-view-history-time-decay")?JSON.parse(localStorage.getItem("ds-view-history-time-decay")):null;return Array.isArray(e)?e.slice(-200).map((e=>({sku:e.sku,dateTime:e.date}))):[]})()||[],this.apiUrl="testing"===(null==t?void 0:t.toLowerCase())?"https://catalog-service-sandbox.adobe.io/graphql":"https://catalog-service.adobe.io/graphql",!(e&&n&&r&&o))throw new Error("Store details not found.");this.search={environmentId:e,websiteCode:n,storeCode:r,storeViewCode:o,apiKey:a,contentType:"application/json",apiUrl:this.apiUrl}}}const yt=window.matchMedia("only screen and (max-width: 768px)").matches,St=e=>{const t=e.classList;t.contains(It)?(t.remove(It),e.setAttribute("aria-haspopup","false"),document.body.style.overflowY="inherit",e.style.removeProperty("display")):(t.add(It),e.setAttribute("aria-haspopup","true"),e.style.display="none",document.body.style.overflowY="hidden")};const bt="livesearch-popover",wt="livesearch popover-container",Ct="livesearch product-result",kt="livesearch products-container",xt="livesearch product-link",At="livesearch product-name",Lt="livesearch product-price",Pt="livesearch suggestion",Dt="livesearch suggestions-container",Nt="livesearch suggestions-header",Mt="livesearch view-all-footer",It="active";var Et=n(819),Rt=n.n(Et);const Tt=(e,t,n,r)=>{let o=e.product.price_range.minimum_price.regular_price.currency;t&&(o=t);const i=e.product.price_range.minimum_price.final_price.value,a=n?i*parseFloat(n):i;return null===i?"":((e,t="USD",n="en-US")=>{let r=n.replaceAll("_","-");"zh-Hans-CN"===r?r="zh-CN":"zh-Hant-TW"===r&&(r="zh-TW");const o=new Intl.NumberFormat(r,{style:"currency",currency:t}).format(Number(e));return null!=o?o:`${Rt()(t)}${e}`})(a.toFixed(2),o,r)},Ot=e=>(new DOMParser).parseFromString(e,"text/html").documentElement.textContent;var jt=n(338),$t=n(160),Ut=n.n($t);const zt=function(e){function t(e,r,l,u,d){for(var f,h,_,m,S,w=0,C=0,k=0,x=0,A=0,I=0,R=_=f=0,O=0,j=0,$=0,U=0,z=l.length,F=z-1,B="",H="",V="",W="";Of)&&(U=(B=B.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var an=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&on(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=un&&(un=t+1),sn.set(e,t),ln.set(t,e)},fn="style["+tn+'][data-styled-version="5.3.11"]',hn=new RegExp("^"+tn+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),_n=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(tn))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(tn,"active"),r.setAttribute("data-styled-version","5.3.11");var a=vn();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},yn=function(){function e(e){var t=this.element=gn(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+",")})),r+=""+s+l+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),xn=/(a)(d)/gi,An=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ln(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=An(t%52)+n;return(An(t%52)+n).replace(xn,"$1-$2")}var Pn=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Dn=function(e){return Pn(5381,e)};function Nn(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,u=Pn(this.baseHash,n.hash),c="",p=0;p>>0);if(!t.hasNameForId(r,_)){var m=n(c,"."+_,void 0,r);t.insertRules(r,_,m)}o.push(_)}}return o.join(" ")},e}(),En=/^\s*\/\/.*$/gm,Rn=[":","[",".","#"];function Tn(e){var t,n,r,o,i=void 0===e?Qt:e,a=i.options,s=void 0===a?Qt:a,l=i.plugins,u=void 0===l?Zt:l,c=new zt(s),p=[],d=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,l,u,c,p){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){p.push(e)})),f=function(e,r,i){return 0===r&&-1!==Rn.indexOf(i[n.length])||i.match(o)?e:"."+t};function h(e,i,a,s){void 0===s&&(s="&");var l=e.replace(En,""),u=i&&a?a+" "+i+" { "+l+" }":l;return t=s,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),c(a||!i?"":i,u)}return c.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},d,function(e){if(-2===e){var t=p;return p=[],t}}])),h.hash=u.length?u.reduce((function(e,t){return t.name||on(15),Pn(e,t.name)}),5381).toString():"",h}var On=tt.createContext(),jn=(On.Consumer,tt.createContext()),$n=(jn.Consumer,new kn),Un=Tn();function zn(){return le(On)||$n}function Fn(){return le(jn)||Un}function Bn(e){var t=te(e.stylisPlugins),n=t[0],r=t[1],o=zn(),i=ae((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),a=ae((function(){return Tn({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return re((function(){Ut()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),tt.createElement(On.Provider,{value:i},tt.createElement(jn.Provider,{value:a},e.children))}var Hn=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Un);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return on(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Un),this.name+e.hash},e}(),Vn=/([A-Z])/,Wn=/([A-Z])/g,Yn=/^ms-/,Gn=function(e){return"-"+e.toLowerCase()};function Kn(e){return Vn.test(e)?e.replace(Wn,Gn).replace(Yn,"-ms-"):e}var qn=function(e){return null==e||!1===e||""===e};function Zn(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,tr=/(^-|-$)/g;function nr(e){return e.replace(er,"-").replace(tr,"")}var rr=function(e){return Ln(Dn(e)>>>0)};function or(e){return"string"==typeof e&&!0}var ir=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},ar=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function sr(e,t,n){var r=e[n];ir(t)&&ir(r)?lr(r,t):e[n]=t}function lr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(or(e)?e:nr(Jt(e)));return pr(e,Gt({},o,{attrs:d,componentId:i}),n)},Object.defineProperty(h,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?lr({},e.defaultProps,t):t}}),Object.defineProperty(h,"toString",{value:function(){return"."+h.styledComponentId}}),o&&Yt()(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),h}var dr=function(e){return function e(t,n,r){if(void 0===r&&(r=Qt),!(0,jt.isValidElementType)(n))return on(1,String(n));var o=function(){return t(n,r,Xn.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,Gt({},r,{},o))},o.attrs=function(o){return e(t,n,Gt({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(pr,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){dr[e]=dr(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Nn(e),kn.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var o=r(Zn(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&kn.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=vn();return""},this.getStyleTags=function(){return e.sealed?on(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return on(2);var n=((t={})[tn]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=vn();return r&&(n.nonce=r),[tt.createElement("style",Gt({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new kn({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?on(2):tt.createElement(Bn,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return on(3)}}();const fr=dr,hr=fr.span.withConfig({displayName:"StyledText",componentId:"sc-kc1g4b"})` - font-weight: ${e=>e.customFontWeight}; - font-size: ${e=>e.customFontSize}; - line-height: ${e=>e.customLineHeight}; - color: ${e=>e.color}; - padding: ${e=>e.padding}; - text-align: ${e=>e.textAlign}; - text-transform: ${e=>e.textTransform}; - user-select: ${e=>e.userSelect}; - align-self: center; - - &:hover { - background-color: ${e=>e.hoverColor}; - cursor: ${e=>e.hoverPointer}; - } -`,_r=fr.a.withConfig({displayName:"StyledLink",componentId:"sc-s84w4z"})` - color: inherit !important; - text-decoration: none !important; - &:visited, - &:hover, - &:active { - color: inherit !important; - text-decoration: none !important; - } -`,mr=fr.img.withConfig({displayName:"ProductImage",componentId:"sc-r6p7z"})` - object-fit: cover; - grid-area: ${e=>e.gridArea}; - max-height: ${e=>{var t;return null!==(t=e.maxHeight)&&void 0!==t?t:"100%"}}; - width: ${e=>e.customWidth}; - max-width: 100%; - vertical-align: middle; - align-self: center; -`,vr=fr.div.withConfig({displayName:"Grid",componentId:"sc-nsk1nd"})` - ${e=>(delete e.children,e)} - - display: grid; - &:hover { - background-color: ${e=>e.hoverColor}; - cursor: ${e=>e.hoverPointer}; - font-weight: ${e=>e.hoverFontWeight}; - } -`,gr=({product:e,updateAndSubmit:t,currencyCode:n,currencyRate:r,locale:o,route:i})=>{const a=(e=>{const t=e.product;let n=null;return t.thumbnail?n=t.thumbnail.url:t.small_image?n=t.small_image.url:t.image&&(n=t.image.url),null!=n?n:""})(e),s=i?i({urlKey:e.productView.urlKey,sku:e.product.sku}):e.product.canonical_url;return tt.createElement(_r,{className:xt,href:s||"",rel:"noopener noreferrer"},tt.createElement(vr,{className:Ct,gridTemplateAreas:yt?'"image" "productName" "price"':'"image productName" "image price"',gridTemplateColumns:yt?"1fr":"1fr 4fr",gridTemplateRows:yt?"1fr 3.5rem 3.5rem":"repeat(2, 1fr)",columnGap:"16px",alignSelf:"center",height:yt?"auto":"80px",minWidth:yt?"auto":"192px",hoverColor:"#f5f5f5",hoverPointer:"pointer",padding:yt?"16px":"unset",boxSizing:yt?"border-box":"inherit",onClick:()=>{window.adobeDataLayer.push((t=>{t.push({event:"search-product-click",eventInfo:Object.assign(Object.assign({},t.getState()),{searchUnitId:bt,sku:e.product.sku})})})),i||e.product.canonical_url||t(e.product.name)}},tt.createElement(mr,{gridArea:"image",customWidth:"100%",src:a||"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI3NCIgdmlld0JveD0iMCAwIDYwIDc0Ij48cGF0aCBkPSJNMjYsODVINzBhOC4wMDksOC4wMDksMCwwLDAsOC04VjI5Ljk0MWE3Ljk0Nyw3Ljk0NywwLDAsMC0yLjM0My01LjY1N0w2NC43MTYsMTMuMzQzQTcuOTQ2LDcuOTQ2LDAsMCwwLDU5LjA1OSwxMUgyNmE4LjAwOSw4LjAwOSwwLDAsMC04LDhWNzdhOC4wMDksOC4wMDksMCwwLDAsOCw4Wk0yMCwxOWE2LjAwNyw2LjAwNywwLDAsMSw2LTZINTkuMDU5QTUuOTYsNS45NiwwLDAsMSw2My4zLDE0Ljc1N0w3NC4yNDIsMjUuN0E1Ljk2LDUuOTYsMCwwLDEsNzYsMjkuOTQxVjc3YTYuMDA3LDYuMDA3LDAsMCwxLTYsNkgyNmE2LjAwNyw2LjAwNywwLDAsMS02LTZabTYuNjE0LDUxLjA2aDBMNjgsNjkuOThhLjc1Ljc1LDAsMCwwLC41NDUtMS4yNjNMNTcuNjcsNTcuMTI5YTEuOTksMS45OSwwLDAsMC0yLjgwOC0uMDI4TDUxLjYsNjAuNDY3bC0uMDI0LjAyNi03LjA4Ny03LjU0M2ExLjczLDEuNzMsMCwwLDAtMS4yMjktLjUzNSwxLjc2NSwxLjc2NSwwLDAsMC0xLjI0OS41TDI2LjA4NCw2OC43NzhhLjc1Ljc1LDAsMCwwLC41MjksMS4yODFabTI2LjA2MS04LjU0OCwzLjI1Mi0zLjM1NGEuMzMzLjMzMywwLDAsMSwuMzMyLS4xMjMuNDYzLjQ2MywwLDAsMSwuMzI0LjEyNkw2Ni4yNyw2OC40ODRsLTcuMTc3LjAxNC02LjUtNi45MTZhLjczNS43MzUsMCwwLDAsLjA3OC0uMDcxWm0tOS42MTEtNy41MjZhLjIzNS4yMzUsMCwwLDEsLjE2OC0uMDY5LjIxMi4yMTIsMCwwLDEsLjE2OC4wNjhMNTcuMDM5LDY4LjVsLTI4LjYwNi4wNTVabTIwLjA1LS40M2guMDc5YTUuMDg3LDUuMDg3LDAsMCwwLDMuNTgzLTEuNDcsNS4xNDYsNS4xNDYsMCwxLDAtNy4yNzktLjEwOSw1LjA4OSw1LjA4OSwwLDAsMCwzLjYxNywxLjU3OVptLTIuNDU2LTcuODM5YTMuNiwzLjYsMCwwLDEsMi41MzQtMS4wNDJoLjA1NmEzLjcsMy43LDAsMCwxLDIuNDc4LDYuMzQsMy41MSwzLjUxLDAsMCwxLTIuNTg5LDEuMDQxLDMuNiwzLjYsMCwwLDEtMi41NTctMS4xMTgsMy43MTUsMy43MTUsMCwwLDEsLjA3OS01LjIyMVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOCAtMTEpIiBmaWxsPSIjOGU4ZThlIi8+PC9zdmc+"}),tt.createElement(vr,{gridArea:"productName",alignSelf:yt?"center":"end"},tt.createElement(hr,{customFontWeight:600,className:At},Ot(e.product.name))),tt.createElement(vr,{gridArea:"price",className:Lt},Tt(e,n,r,o))))},yr=({active:e,response:t,formRef:n,inputRef:r,resultsRef:o,pageSize:i=6,currencyCode:a="USD",currencyRate:s="1",locale:l="en_US",minQueryLengthHit:u,route:c})=>{var p,d,f,h;const _=null!==(d=null===(p=null==t?void 0:t.data)||void 0===p?void 0:p.productSearch.items)&&void 0!==d?d:[],m=null!==(h=null===(f=null==t?void 0:t.data)||void 0===f?void 0:f.productSearch.suggestions)&&void 0!==h?h:[],v=(e=>{const[t,n]=te(at(e));return re((()=>{const t=at(e);n(t)}),[e,t]),it[t]})(l);!o.current||!e&&yt||(o.current.style.cssText="\n display: flex;\n right: 0px;\n margin-top: 5px;\n box-shadow: 0px 0px 6px 0px #cacaca;\n ");const g=e=>{const t=r.current,o=n.current;e&&t&&(t.value=e),null==o||o.dispatchEvent(new Event("submit")),setTimeout((()=>null==o?void 0:o.submit()),0)},y=m.map(((e,t)=>{if(t<=4)return tt.createElement(hr,{className:Pt,customFontSize:"90%",customLineHeight:"95%",key:e,onClick:()=>(e=>{window.adobeDataLayer.push((t=>{t.push({event:"search-suggestion-click",eventInfo:Object.assign(Object.assign({},t.getState),{searchUnitId:bt,suggestion:e})})})),g(e)})(e),hoverColor:"#f5f5f5",hoverPointer:"pointer",padding:"4px"},Ot(e))}));return _.length<=0||!e||!u?tt.createElement(tt.Fragment,null):tt.createElement(vr,{className:wt,width:yt?"100%":m.length>0?"700px":"530px",height:yt?`calc(100vh - ${(()=>{var e,t;return null!==(t=null===(e=o.current)||void 0===e?void 0:e.getBoundingClientRect().top)&&void 0!==t?t:150})()}px)`:"auto",backgroundColor:"#fff",gridTemplateAreas:yt?'"suggestions""previews""viewall"':'"suggestions previews" "viewall viewall"',rowGap:"16px",columnGap:m.length>0?"16px":"0px",gridTemplateColumns:yt?"1fr":"auto 3fr",gridTemplateRows:yt?"auto 1fr 36px":"1fr 36px",overflowY:yt?"scroll":"auto",overflowX:"hidden"},m.length>0&&tt.createElement(vr,{className:Dt,gridArea:"suggestions",width:yt?"auto":"max-content",maxWidth:yt?"none":"150px",gridTemplateRows:yt?`repeat(${m.length+1}, 3.5rem)`:`repeat(${i}, 1fr) minmax(0px, 20px);`,padding:yt?"16px 32px 0px 32px":"16px 0px 8px 16px",margin:yt?"auto 0px":"unset",textAlign:yt?"center":"unset"},tt.createElement(hr,{customFontWeight:600,className:Nt},v.Popover.suggestions),y),tt.createElement(vr,{className:kt,gridArea:"previews",gridTemplateColumns:"1fr 1fr",gridTemplateRows:yt?`repeat(${Math.ceil(_.length/2)}, 1fr)`:"repeat(3, 1fr)",gap:"4px",padding:yt?"0px 16px":"16px",paddingBottom:"0px",alignSelf:"start"},_.map(((e,t)=>{if(tg(),hoverColor:"#f0f0f0",hoverFontWeight:600,hoverPointer:"pointer"},v.Popover.all))},Sr=e=>{const{performSearch:t,pageSize:n,minQueryLength:r,currencyCode:o,currencyRate:i,formSelector:a,inputSelector:s,resultsSelector:l,displayInStockOnly:u,locale:c,route:p,searchRoute:d}=e,{active:f,formProps:h,formRef:_,inputProps:m,inputRef:v,results:g,resultsRef:y,minQueryLengthHit:S,setActive:b}=rt(t,r,u),w=(({formRef:e,resultsRef:t,setActive:n})=>{const r=se((e=>{e.stopPropagation();const t=e||window.event,r=t.target||t.srcElement,o=["search-autocomplete","input-text","popover-container","products-container"];let i=!0;for(let e=0;e{e.stopPropagation();const{key:t}=e;("Escape"===t||"Esc"===t)&&n(!1)}),[e,t,n]),i=se((e=>{var r;e.stopPropagation();const o=t.current;(null===(r=null==o?void 0:o.querySelectorAll(".product-result"))||void 0===r?void 0:r.length)&&n(!0)}),[e,t,n]),a=se((()=>{var r,o;const{activeElement:i}=document,a=t.current,s=null===(r=e.current)||void 0===r?void 0:r.contains(i),l=(null===(o=null==a?void 0:a.parentElement)||void 0===o?void 0:o.querySelector(":hover"))===a;n(s||l)}),[e,t,n]);return ae((()=>({onBlur:i,onFocus:a,onKeyDown:o,onClick:r})),[a])})({formRef:_,resultsRef:y,setActive:b});return(({focusProps:e,formId:t,formProps:n,formRef:r,inputId:o,inputProps:i,inputRef:a,resultsId:s,resultsRef:l})=>{re((()=>{const u=document.getElementById(t),c=document.getElementById(o),p=document.getElementById(s);return null===document||void 0===document||document.addEventListener("click",e.onClick),r.current=u,a.current=c,l.current=p,null==u||u.addEventListener("focusin",e.onFocus),null==u||u.addEventListener("focusout",e.onBlur),null==u||u.addEventListener("keydown",e.onKeyDown),null==u||u.addEventListener("submit",n.onSubmit),null==c||c.addEventListener("input",i.onChange),()=>{null===document||void 0===document||document.removeEventListener("click",e.onClick),null==u||u.removeEventListener("focusin",e.onFocus),null==u||u.removeEventListener("focusout",e.onBlur),null==u||u.removeEventListener("keydown",e.onKeyDown),null==u||u.removeEventListener("submit",n.onSubmit),null==c||c.removeEventListener("input",i.onChange)}}),[e,t,n,r,o,i])})({focusProps:w,formId:null!=a?a:"search_mini_form",formProps:h,formRef:_,inputId:null!=s?s:"search",inputProps:m,inputRef:v,resultsId:null!=l?l:"search_autocomplete",resultsRef:y}),re((()=>{const e=_.current,t=v.current;d&&(null==e?void 0:e.action)&&(null==t?void 0:t.name)&&(e.action=d.route,t.name=d.query)}),[d]),tt.createElement(yr,Object.assign({active:f,resultsRef:y,formRef:_,inputRef:v,response:g,pageSize:n,currencyCode:o,currencyRate:i,locale:c,minQueryLengthHit:S,route:p},w))};function br(e){return{render(t){ze(t,e)},unmount(){Je(e)}}}class wr{constructor(e,t=3,n="search_mini_form",r="search",o="search_autocomplete"){var i,a,s,l,u,c,p,d,f,h,_,m,v,g;this.storeDetails=e,this.formSelector=n,this.inputSelector=r,this.resultsSelector=o,this.minQueryLength=null!==(a=null===(i=e.config)||void 0===i?void 0:i.minQueryLength)&&void 0!==a?a:t,this.pageSize=Number(null===(s=e.config)||void 0===s?void 0:s.pageSize)?Number(null===(l=e.config)||void 0===l?void 0:l.pageSize):6,this.currencyCode=null!==(c=null===(u=e.config)||void 0===u?void 0:u.currencyCode)&&void 0!==c?c:"USD",this.currencyRate=null!==(d=null===(p=e.config)||void 0===p?void 0:p.currencyRate)&&void 0!==d?d:"1",this.displayOutOfStock=null!==(h=null===(f=e.config)||void 0===f?void 0:f.displayOutOfStock)&&void 0!==h?h:"1",this.locale=null!==(m=null===(_=e.config)||void 0===_?void 0:_.locale)&&void 0!==m?m:"en_US",this.context=e.context,this.search=new gt({environmentId:this.storeDetails.environmentId,environmentType:this.storeDetails.environmentType,websiteCode:this.storeDetails.websiteCode,storeCode:this.storeDetails.storeCode,storeViewCode:this.storeDetails.storeViewCode,searchUnitId:bt,config:{minQueryLength:this.minQueryLength,pageSize:this.pageSize,currencyCode:this.currencyCode,currencyRate:this.currencyRate,displayOutOfStock:this.displayOutOfStock},apiKey:this.storeDetails.apiKey,context:this.context,route:this.storeDetails.route});const{performSearch:y,displayInStockOnly:S}=this.search;this.searchButton=null===(v=document.getElementById(this.formSelector))||void 0===v?void 0:v.querySelector("label"),null===(g=this.searchButton)||void 0===g||g.addEventListener("click",(()=>{return e=this.searchButton,void(yt&&St(e));var e}));br(document.getElementById(this.resultsSelector)).render(tt.createElement(Sr,{performSearch:y,formSelector:this.formSelector,inputSelector:this.inputSelector,resultsSelector:this.resultsSelector,pageSize:this.pageSize,minQueryLength:this.minQueryLength,currencyCode:this.currencyCode,currencyRate:this.currencyRate,displayInStockOnly:S,locale:this.locale,route:this.storeDetails.route,searchRoute:this.storeDetails.searchRoute}))}}"undefined"!=typeof window&&(window.LiveSearchAutocomplete=wr);const Cr=wr})(),r})())); \ No newline at end of file diff --git a/scripts/widgets/SearchAsYouType.js b/scripts/widgets/SearchAsYouType.js new file mode 100644 index 0000000000..af16233257 --- /dev/null +++ b/scripts/widgets/SearchAsYouType.js @@ -0,0 +1,43 @@ +/*! storefront-search-as-you-type@v0.3.14 */ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{var e={463:(e,t,n)=>{const r=n(411);e.exports=function(e){if("string"!=typeof e)return;const t=e.toUpperCase();return Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0},e.exports.currencySymbolMap=r},411:e=>{e.exports={AED:"د.إ",AFN:"؋",ALL:"L",AMD:"֏",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"₼",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"₿",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"¥",CNY:"¥",COP:"$",COU:"COU",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",ETH:"Ξ",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JOD:"JD",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KWD:"KD",KYD:"$",KZT:"₸",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTC:"Ł",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"S$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",STN:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"лв",VEF:"Bs",VES:"Bs.S",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",XSU:"Sucre",XUA:"XUA",YER:"﷼",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"}},679:(e,t,n)=>{"use strict";var r=n(296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=d(n);o&&o!==h&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=c(t),_=c(n),m=0;m{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,_=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case l:case f:case i:case s:case a:case d:return e;default:switch(e=e&&e.$$typeof){case u:case p:case m:case _:case c:return e;default:return t}}case o:return t}}}function w(e){return S(e)===f}t.AsyncMode=l,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=c,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=m,t.Memo=_,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=d,t.isAsyncMode=function(e){return w(e)||S(e)===l},t.isConcurrentMode=w,t.isContextConsumer=function(e){return S(e)===u},t.isContextProvider=function(e){return S(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return S(e)===p},t.isFragment=function(e){return S(e)===i},t.isLazy=function(e){return S(e)===m},t.isMemo=function(e){return S(e)===_},t.isPortal=function(e){return S(e)===o},t.isProfiler=function(e){return S(e)===s},t.isStrictMode=function(e){return S(e)===a},t.isSuspense=function(e){return S(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===s||e===a||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===_||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===y||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v)},t.typeOf=S},296:(e,t,n)=>{"use strict";e.exports=n(103)},921:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case p:case d:return e;default:switch(e=e&&e.$$typeof){case l:case u:case f:case _:case h:case c:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===a||e===p||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=v},864:(e,t,n)=>{"use strict";e.exports=n(921)},774:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{default:()=>Sr});var e,t,o,i,a,s,c,u,l={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function h(e,t){for(var n in t)e[n]=t[n];return e}function _(e){var t=e.parentNode;t&&t.removeChild(e)}function m(t,n,r){var o,i,a,s={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return v(t,s,o,i,null)}function v(e,n,r,i,a){var s={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++o:a};return null==a&&null!=t.vnode&&t.vnode(s),s}function y(e){return e.children}function g(e,t){this.props=e,this.context=t}function b(e,t){if(null==t)return e.__?b(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&i.sort(c));C.__r=0}function k(e,t,n,r,o,i,a,s,c,u,p){var h,_,m,g,S,w,C,k,A,M=0,N=r&&r.__k||f,I=N.length,E=I,R=t.length;for(n.__k=[],h=0;h0?v(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)?(g.__=n,g.__b=n.__b+1,-1===(k=D(g,N,C=h+M,E))?m=l:(m=N[k]||l,N[k]=void 0,E--),P(e,g,m,o,i,a,s,c,u,p),S=g.__e,(_=g.ref)&&m.ref!=_&&(m.ref&&T(m.ref,null,g),p.push(_,g.__c||S,g)),null!=S&&(null==w&&(w=S),(A=m===l||null===m.__v)?-1==k&&M--:k!==C&&(k===C+1?M++:k>C?E>R-C?M+=k-C:M--:M=k(null!=c?1:0))for(;a>=0||s=0){if((c=t[a])&&o==c.key&&i===c.type)return a;a--}if(s2&&(c.children=arguments.length>3?e.call(arguments,2):r),v(t.type,c,o||t.key,i||t.ref,null)}e=f.slice,t={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},o=0,g.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},n),this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),w(this))},g.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),w(this))},g.prototype.render=y,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},C.__r=0,u=0;var B,H,W,V,Y=0,G=[],K=[],q=t.__b,Z=t.__r,Q=t.diffed,X=t.__c,J=t.unmount;function ee(e,n){t.__h&&t.__h(H,e,Y||n),Y=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:K}),r.__[e]}function te(e){return Y=1,ne(_e,e)}function ne(e,t,n){var r=ee(B++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):_e(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};H.u=!0;var i=H.shouldComponentUpdate,a=H.componentWillUpdate;H.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},H.shouldComponentUpdate=o}return r.__N||r.__}function re(e,n){var r=ee(B++,3);!t.__s&&he(r.__H,n)&&(r.__=e,r.i=n,H.__H.__h.push(r))}function oe(e,n){var r=ee(B++,4);!t.__s&&he(r.__H,n)&&(r.__=e,r.i=n,H.__h.push(r))}function ie(e){return Y=5,ae((function(){return{current:e}}),[])}function ae(e,t){var n=ee(B++,7);return he(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function se(e,t){return Y=8,ae((function(){return e}),t)}function ce(e){var t=H.context[e.__c],n=ee(B++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(H)),t.props.value):e.__}function ue(){for(var e;e=G.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(de),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}}t.__b=function(e){H=null,q&&q(e)},t.__r=function(e){Z&&Z(e),B=0;var t=(H=e.__c).__H;t&&(W===H?(t.__h=[],H.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=K,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(de),t.__h=[],B=0)),W=H},t.diffed=function(e){Q&&Q(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==G.push(n)&&V===t.requestAnimationFrame||((V=t.requestAnimationFrame)||fe)(ue)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==K&&(e.__=e.__V),e.i=void 0,e.__V=K}))),W=H=null},t.__c=function(e,n){n.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||de(e)}))}catch(r){n.some((function(e){e.__h&&(e.__h=[])})),n=[],t.__e(r,e.__v)}})),X&&X(e,n)},t.unmount=function(e){J&&J(e);var n,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{pe(e)}catch(e){n=e}})),r.__H=void 0,n&&t.__e(n,r.__v))};var le="function"==typeof requestAnimationFrame;function fe(e){var t,n=function(){clearTimeout(r),le&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);le&&(t=requestAnimationFrame(n))}function pe(e){var t=H,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),H=t}function de(e){var t=H;e.__c=e.__(),H=t}function he(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function _e(e,t){return"function"==typeof t?t(e):t}function me(e,t){for(var n in t)e[n]=t[n];return e}function ve(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function ye(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function ge(e){this.props=e}(ge.prototype=new g).isPureReactComponent=!0,ge.prototype.shouldComponentUpdate=function(e,t){return ve(this.props,e)||ve(this.state,t)};var be=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),be&&be(e)};var Se="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var we=function(e,t){return null==e?null:A(A(e).map(t))},Ce={map:we,forEach:we,count:function(e){return e?A(e).length:0},only:function(e){var t=A(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:A},ke=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);ke(e,t,n,r)};var xe=t.unmount;function Ae(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=me({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ae(e,t,n)}))),e}function Le(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Le(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function De(){this.__u=0,this.t=null,this.__b=null}function Me(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ne(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),xe&&xe(e)},(De.prototype=new g).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Me(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Le(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},De.prototype.componentWillUnmount=function(){this.t=[]},De.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ae(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&m(y,null,e.fallback);return o&&(o.__h=null),[m(y,null,t.__a?null:e.children),o]};var Ie=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),U(m(Ee,{context:t.context},e.__v),t.l)}(Ne.prototype=new g).__a=function(e){var t=this,n=Me(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Ie(t,e,r)):o()};n?n(i):i()}},Ne.prototype.render=function(e){this.u=null,this.o=new Map;var t=A(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Ne.prototype.componentDidUpdate=Ne.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Ie(e,n,t)}))};var Re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Te=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,je=/[A-Z0-9]/g,$e="undefined"!=typeof document,Ue=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ze(e,t,n){return null==t.__k&&(t.textContent=""),U(e,t),"function"==typeof n&&n(),e?e.__c:null}function Fe(e,t,n){return z(e,t),"function"==typeof n&&n(),e?e.__c:null}g.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(g.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Be=t.event;function He(){}function We(){return this.cancelBubble}function Ve(){return this.defaultPrevented}t.event=function(e){return Be&&(e=Be(e)),e.persist=He,e.isPropagationStopped=We,e.isDefaultPrevented=Ve,e.nativeEvent=e};var Ye,Ge={enumerable:!1,configurable:!0,get:function(){return this.class}},Ke=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||$e&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Ue(t.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":Te.test(o)?o=a:-1===n.indexOf("-")&&Oe.test(o)?o=o.replace(je,"-$&").toLowerCase():null===i&&(i=void 0):a=o="oninput","oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=A(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=A(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Ge)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Re,Ke&&Ke(e)};var qe=t.__r;t.__r=function(e){qe&&qe(e),Ye=e.__c};var Ze=t.diffed;t.diffed=function(e){Ze&&Ze(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Ye=null};var Qe={ReactCurrentDispatcher:{current:{readContext:function(e){return Ye.__n[e.__c].props.value}}}};function Xe(e){return!!e&&e.$$typeof===Re}function Je(e){return!!e.__k&&(U(null,e),!0)}function et(e){e()}var tt={useState:te,useId:function(){var e=ee(B++,11);if(!e.__){for(var t=H.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useReducer:ne,useEffect:re,useLayoutEffect:oe,useInsertionEffect:oe,useTransition:function(){return[!1,et]},useDeferredValue:function(e){return e},useSyncExternalStore:function(e,t){var n=t(),r=te({h:{__:n,v:t}}),o=r[0].h,i=r[1];return oe((function(){o.__=n,o.v=t,ye(o.__,t())||i({h:o})}),[e,n,t]),re((function(){return ye(o.__,o.v())||i({h:o}),e((function(){ye(o.__,o.v())||i({h:o})}))}),[e]),n},startTransition:et,useRef:ie,useImperativeHandle:function(e,t,n){Y=6,oe((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))},useMemo:ae,useCallback:se,useContext:ce,useDebugValue:function(e,n){t.useDebugValue&&t.useDebugValue(n?n(e):e)},version:"17.0.2",Children:Ce,render:ze,hydrate:Fe,unmountComponentAtNode:Je,createPortal:function(e,t){var n=m(Pe,{__v:e,i:t});return n.containerInfo=t,n},createElement:m,createContext:function(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,w(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return m.bind(null,e)},cloneElement:function(e){return Xe(e)?F.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:y,isValidElement:Xe,isElement:Xe,isFragment:function(e){return Xe(e)&&e.type===y},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:g,PureComponent:ge,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:ve(this.props,e)}function r(t){return this.shouldComponentUpdate=n,m(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function t(t){var n=me({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Se,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:y,Suspense:De,SuspenseList:Ne,lazy:function(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return m(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qe};var nt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const rt=(e,t=3,n=!1)=>{const r=ie(null),o=ie(null),i=ie(null),[a,s]=te(!1),[c,u]=te(""),[l,f]=te(),[p,d]=te(!1),[h,_]=te(!1),m=se((r=>nt(void 0,void 0,void 0,(function*(){const o=null==r?void 0:r.trim();if("string"!=typeof o||(null==o?void 0:o.length)()=>{n.current&&clearTimeout(n.current)}),[]),(...r)=>{const o=setTimeout((()=>{e(...r)}),t);clearTimeout(n.current),n.current=o}}((e=>m(e)),250)),y=se((e=>{var t;u(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)}),[u]),g=se((e=>{const t=new FormData(e.target).get("search");m(t)}),[m]),b=ae((()=>({onSubmit:g})),[g]),S=ae((()=>({onChange:y})),[y]);return re((()=>{const e=null==c?void 0:c.trim();if("string"!=typeof e||(null==e?void 0:e.length)e?{}:e));_(!0),v.current(e)}),[m,c]),{active:a,formProps:b,formRef:r,inputProps:S,inputRef:o,loading:p,minQueryLengthHit:h,searchTerm:c,results:l,resultsRef:i,setActive:s,setLoading:d,setResults:f,setSearchTerm:u,setMinQueryLengthHit:_}},ot={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let it;const at=new Uint8Array(16);function st(){if(!it&&(it="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!it))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return it(at)}const ct=[];for(let e=0;e<256;++e)ct.push((e+256).toString(16).slice(1));function ut(e,t=0){return ct[e[t+0]]+ct[e[t+1]]+ct[e[t+2]]+ct[e[t+3]]+"-"+ct[e[t+4]]+ct[e[t+5]]+"-"+ct[e[t+6]]+ct[e[t+7]]+"-"+ct[e[t+8]]+ct[e[t+9]]+"-"+ct[e[t+10]]+ct[e[t+11]]+ct[e[t+12]]+ct[e[t+13]]+ct[e[t+14]]+ct[e[t+15]]}const lt=function(e,t,n){if(ot.randomUUID&&!t&&!e)return ot.randomUUID();const r=(e=e||{}).random||(e.rng||st)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return ut(r)},ft=e=>{if(!e)return[];return e.map(((e,t)=>{var n,r,o;return{name:e.product.name,sku:e.product.sku,url:null!==(n=e.product.canonical_url)&&void 0!==n?n:"",imageUrl:null!==(o=null===(r=e.product.image)||void 0===r?void 0:r.url)&&void 0!==o?o:"",price:e.product.price_range.minimum_price.final_price.value,rank:t}}))},pt=e=>{if(!e)return[];return e.map(((e,t)=>({suggestion:e,rank:t})))},dt=e=>{if(!e)return[];return e.map((e=>({attribute:e.attribute,title:e.title,type:e.type||"PINNED",buckets:e.buckets.map((e=>e))})))};var ht=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};class _t{constructor({environmentId:e,environmentType:t,websiteCode:n,storeCode:r,storeViewCode:o,searchUnitId:i,config:a,context:s,apiUrl:c,apiKey:u}){var l,f,p;if(this.performSearch=(e,t)=>ht(this,void 0,void 0,(function*(){var n;const r=lt(),o=[{attribute:"visibility",in:["Search","Catalog, Search"]}],i={attribute:"inStock",eq:"true"};t&&o.push(i),((e,t,n,r,o)=>{window.adobeDataLayer.push((i=>{var a,s;const c=null!==(a=i.getState("searchInputContext"))&&void 0!==a?a:{units:[]},u={searchUnitId:e,searchRequestId:t,queryTypes:["products","suggestions"],phrase:n,pageSize:o,currentPage:1,filter:r,sort:[]},l=null===(s=null==c?void 0:c.units)||void 0===s?void 0:s.findIndex((t=>(null==t?void 0:t.searchUnitId)===e));void 0===l||l<0?c.units.push(u):c.units[l]=u,i.push({searchInputContext:c})}))})(this.searchUnitId,r,e,o,this.pageSize),window.adobeDataLayer.push((e=>{e.push({event:"search-request-sent",eventInfo:Object.assign(Object.assign({},e.getState()),{searchUnitId:this.searchUnitId})})}));const a=(e=>({"Magento-Environment-Id":e.environmentId,"Magento-Website-Code":e.websiteCode,"Magento-Store-Code":e.storeCode,"Magento-Store-View-Code":e.storeViewCode,"X-Api-Key":e.apiKey,"Content-Type":e.contentType,"X-Request-Id":e.xRequestId}))({environmentId:this.search.environmentId,websiteCode:this.search.websiteCode,storeCode:this.search.storeCode,storeViewCode:this.search.storeViewCode,apiKey:this.search.apiKey,contentType:"application/json",xRequestId:r}),s={phrase:null!=e?e:"",pageSize:this.pageSize,filter:o,context:this.context},c=yield fetch(this.apiUrl,{method:"POST",headers:a,body:JSON.stringify({query:"\n query quickSearch(\n $phrase: String!\n $pageSize: Int = 20\n $currentPage: Int = 1\n $filter: [SearchClauseInput!]\n $sort: [ProductSearchSortInput!]\n $context: QueryContextInput\n ) {\n productSearch(\n phrase: $phrase\n page_size: $pageSize\n current_page: $currentPage\n filter: $filter\n sort: $sort\n context: $context\n ){\n items {\n ...Product\n productView {\n urlKey\n }\n }\n page_info {\n current_page\n page_size\n total_pages\n }\n }\n }\n \n fragment Product on ProductSearchItem {\n product {\n __typename\n sku\n name\n canonical_url\n small_image {\n url\n }\n image {\n url\n }\n thumbnail {\n url\n }\n price_range {\n minimum_price {\n fixed_product_taxes {\n amount {\n value\n currency\n }\n label\n }\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n maximum_price {\n fixed_product_taxes {\n amount {\n value\n currency\n }\n label\n }\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n }\n }\n }\n }\n\n",variables:Object.assign({},s)})}),u=yield c.json();return((e,t,n)=>{window.adobeDataLayer.push((r=>{var o,i,a,s;const c=null!==(o=r.getState("searchResultsContext"))&&void 0!==o?o:{units:[]},u=null===(i=null==c?void 0:c.units)||void 0===i?void 0:i.findIndex((t=>(null==t?void 0:t.searchUnitId)===e)),l={searchUnitId:e,searchRequestId:t,products:ft(null==n?void 0:n.items),categories:[],suggestions:pt(null==n?void 0:n.suggestions),page:(null===(a=null==n?void 0:n.page_info)||void 0===a?void 0:a.current_page)||1,perPage:(null===(s=null==n?void 0:n.page_info)||void 0===s?void 0:s.page_size)||6,facets:dt(null==n?void 0:n.facets)};void 0===u||u<0?c.units.push(l):c.units[u]=l,r.push({searchResultsContext:c})}))})(this.searchUnitId,r,null===(n=null==u?void 0:u.data)||void 0===n?void 0:n.productSearch),window.adobeDataLayer.push((e=>{e.push({event:"search-response-received",eventInfo:Object.assign(Object.assign({},e.getState()),{searchUnitId:this.searchUnitId})})})),window.adobeDataLayer.push((e=>{e.push({event:"search-results-view",eventInfo:Object.assign(Object.assign({},e.getState()),{searchUnitId:this.searchUnitId})})})),u})),this.minQueryLength=null!==(l=null==a?void 0:a.minQueryLength)&&void 0!==l?l:3,this.pageSize=Number(null==a?void 0:a.pageSize)?Number(null==a?void 0:a.pageSize):6,this.currencySymbol=null!==(f=null==a?void 0:a.currencySymbol)&&void 0!==f?f:"",this.currencyRate=null!==(p=null==a?void 0:a.currencyRate)&&void 0!==p?p:"1",this.displayInStockOnly="1"!==(null==a?void 0:a.displayOutOfStock),this.searchUnitId=i,this.context=s||{customerGroup:""},this.context.userViewHistory=(()=>{const e=localStorage.getItem("ds-view-history-time-decay")?JSON.parse(localStorage.getItem("ds-view-history-time-decay")):null;return Array.isArray(e)?e.slice(-200).map((e=>({sku:e.sku,dateTime:e.date}))):[]})()||[],this.apiUrl=c||("testing"===(null==t?void 0:t.toLowerCase())?"https://catalog-service-sandbox.adobe.io/graphql":"https://catalog-service.adobe.io/graphql"),!(e&&n&&r&&o))throw new Error("Store details not found.");this.search={environmentId:e,websiteCode:n,storeCode:r,storeViewCode:o,apiKey:u,contentType:"application/json",apiUrl:this.apiUrl}}}const mt=window.matchMedia("only screen and (max-width: 768px)").matches,vt=e=>{const t=e.classList;t.contains(Dt)?(t.remove(Dt),e.setAttribute("aria-haspopup","false"),document.body.style.overflowY="inherit",e.style.removeProperty("display")):(t.add(Dt),e.setAttribute("aria-haspopup","true"),e.style.display="none",document.body.style.overflowY="hidden")};const yt="livesearch-popover",gt="livesearch popover-container",bt="livesearch product-result",St="livesearch products-container",wt="livesearch product-name",Ct="livesearch product-price",kt="livesearch suggestion",xt="livesearch suggestions-container",At="livesearch suggestions-header",Lt="livesearch view-all-footer",Dt="active";var Mt=n(463),Nt=n.n(Mt);const It=e=>(new DOMParser).parseFromString(e,"text/html").documentElement.textContent;var Et=n(864),Pt=n(774),Rt=n.n(Pt);const Ot=function(e){function t(e,r,c,u,p){for(var d,h,_,m,b,w=0,C=0,k=0,x=0,A=0,E=0,R=_=d=0,T=0,j=0,$=0,U=0,z=c.length,F=z-1,B="",H="",W="",V="";Td)&&(U=(B=B.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var en=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&Jt(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=rn&&(rn=t+1),tn.set(e,t),nn.set(t,e)},cn="style["+Zt+'][data-styled-version="5.3.11"]',un=new RegExp("^"+Zt+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),ln=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(Zt))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(Zt,"active"),r.setAttribute("data-styled-version","5.3.11");var a=pn();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},hn=function(){function e(e){var t=this.element=dn(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+",")})),r+=""+s+c+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),bn=/(a)(d)/gi,Sn=function(e){return String.fromCharCode(e+(e>25?39:97))};function wn(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Sn(t%52)+n;return(Sn(t%52)+n).replace(bn,"$1-$2")}var Cn=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},kn=function(e){return Cn(5381,e)};function xn(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,u=Cn(this.baseHash,n.hash),l="",f=0;f>>0);if(!t.hasNameForId(r,_)){var m=n(l,"."+_,void 0,r);t.insertRules(r,_,m)}o.push(_)}}return o.join(" ")},e}(),Dn=/^\s*\/\/.*$/gm,Mn=[":","[",".","#"];function Nn(e){var t,n,r,o,i=void 0===e?Yt:e,a=i.options,s=void 0===a?Yt:a,c=i.plugins,u=void 0===c?Vt:c,l=new Ot(s),f=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,c,u,l,f){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),d=function(e,r,i){return 0===r&&-1!==Mn.indexOf(i[n.length])||i.match(o)?e:"."+t};function h(e,i,a,s){void 0===s&&(s="&");var c=e.replace(Dn,""),u=i&&a?a+" "+i+" { "+c+" }":c;return t=s,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),l(a||!i?"":i,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,d))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),h.hash=u.length?u.reduce((function(e,t){return t.name||Jt(15),Cn(e,t.name)}),5381).toString():"",h}var In=tt.createContext(),En=(In.Consumer,tt.createContext()),Pn=(En.Consumer,new gn),Rn=Nn();function On(){return ce(In)||Pn}function Tn(){return ce(En)||Rn}function jn(e){var t=te(e.stylisPlugins),n=t[0],r=t[1],o=On(),i=ae((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),a=ae((function(){return Nn({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return re((function(){Rt()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),tt.createElement(In.Provider,{value:i},tt.createElement(En.Provider,{value:a},e.children))}var $n=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Rn);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return Jt(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Rn),this.name+e.hash},e}(),Un=/([A-Z])/,zn=/([A-Z])/g,Fn=/^ms-/,Bn=function(e){return"-"+e.toLowerCase()};function Hn(e){return Un.test(e)?e.replace(zn,Bn).replace(Fn,"-ms-"):e}var Wn=function(e){return null==e||!1===e||""===e};function Vn(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,Zn=/(^-|-$)/g;function Qn(e){return e.replace(qn,"-").replace(Zn,"")}var Xn=function(e){return wn(kn(e)>>>0)};function Jn(e){return"string"==typeof e&&!0}var er=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},tr=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function nr(e,t,n){var r=e[n];er(t)&&er(r)?rr(r,t):e[n]=t}function rr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(Jn(e)?e:Qn(Kt(e)));return ar(e,Bt({},o,{attrs:p,componentId:i}),n)},Object.defineProperty(h,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?rr({},e.defaultProps,t):t}}),Object.defineProperty(h,"toString",{value:function(){return"."+h.styledComponentId}}),o&&Ft()(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),h}var sr=function(e){return function e(t,n,r){if(void 0===r&&(r=Yt),!(0,Et.isValidElementType)(n))return Jt(1,String(n));var o=function(){return t(n,r,Gn.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,Bt({},r,{},o))},o.attrs=function(o){return e(t,n,Bt({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(ar,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){sr[e]=sr(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=xn(e),gn.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var o=r(Vn(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&gn.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=pn();return""},this.getStyleTags=function(){return e.sealed?Jt(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return Jt(2);var n=((t={})[Zt]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=pn();return r&&(n.nonce=r),[tt.createElement("style",Bt({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new gn({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?Jt(2):tt.createElement(jn,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return Jt(3)}}();const cr=sr,ur=cr.span.withConfig({displayName:"StyledText",componentId:"sc-kc1g4b"})` + font-weight: ${e=>e.customFontWeight}; + font-size: ${e=>e.customFontSize}; + line-height: ${e=>e.customLineHeight}; + color: ${e=>e.color}; + padding: ${e=>e.padding}; + text-align: ${e=>e.textAlign}; + text-transform: ${e=>e.textTransform}; + user-select: ${e=>e.userSelect}; + align-self: center; + + &:hover { + background-color: ${e=>e.hoverColor}; + cursor: ${e=>e.hoverPointer}; + } +`,lr=cr.a.withConfig({displayName:"StyledLink",componentId:"sc-s84w4z"})` + color: inherit !important; + text-decoration: none !important; + &:visited, + &:hover, + &:active { + color: inherit !important; + text-decoration: none !important; + } +`,fr=cr.img.withConfig({displayName:"ProductImage",componentId:"sc-r6p7z"})` + object-fit: cover; + grid-area: ${e=>e.gridArea}; + max-height: ${e=>{var t;return null!==(t=e.maxHeight)&&void 0!==t?t:"100%"}}; + width: ${e=>e.customWidth}; + max-width: 100%; + vertical-align: middle; + align-self: center; +`,pr=cr.div.withConfig({displayName:"Grid",componentId:"sc-nsk1nd"})` + ${e=>(delete e.children,e)} + + display: grid; + &:hover { + background-color: ${e=>e.hoverColor}; + cursor: ${e=>e.hoverPointer}; + font-weight: ${e=>e.hoverFontWeight}; + } +`,dr="Suggestions",hr="View all",_r=({product:e,updateAndSubmit:t,currencySymbol:n,currencyRate:r,route:o})=>{const i=(e=>{const t=e.product;let n=null;return t.thumbnail?n=t.thumbnail.url:t.small_image?n=t.small_image.url:t.image&&(n=t.image.url),null!=n?n:""})(e),a=o?o({urlKey:e.productView.urlKey,sku:e.product.sku}):e.product.canonical_url;return tt.createElement(lr,{href:a||"",rel:"noopener noreferrer"},tt.createElement(pr,{className:bt,gridTemplateAreas:mt?'"image" "productName" "price"':'"image productName" "image price"',gridTemplateColumns:mt?"1fr":"1fr 4fr",gridTemplateRows:mt?"1fr 3.5rem 3.5rem":"repeat(2, 1fr)",columnGap:"16px",alignSelf:"center",height:mt?"auto":"80px",minWidth:mt?"auto":"192px",hoverColor:"#f5f5f5",hoverPointer:"pointer",padding:mt?"16px":"unset",boxSizing:mt?"border-box":"inherit",onClick:()=>{window.adobeDataLayer.push((t=>{t.push({event:"search-product-click",eventInfo:Object.assign(Object.assign({},t.getState()),{searchUnitId:yt,sku:e.product.sku})})})),o||e.product.canonical_url||t(e.product.name)}},tt.createElement(fr,{gridArea:"image",customWidth:"100%",src:i||"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI3NCIgdmlld0JveD0iMCAwIDYwIDc0Ij48cGF0aCBkPSJNMjYsODVINzBhOC4wMDksOC4wMDksMCwwLDAsOC04VjI5Ljk0MWE3Ljk0Nyw3Ljk0NywwLDAsMC0yLjM0My01LjY1N0w2NC43MTYsMTMuMzQzQTcuOTQ2LDcuOTQ2LDAsMCwwLDU5LjA1OSwxMUgyNmE4LjAwOSw4LjAwOSwwLDAsMC04LDhWNzdhOC4wMDksOC4wMDksMCwwLDAsOCw4Wk0yMCwxOWE2LjAwNyw2LjAwNywwLDAsMSw2LTZINTkuMDU5QTUuOTYsNS45NiwwLDAsMSw2My4zLDE0Ljc1N0w3NC4yNDIsMjUuN0E1Ljk2LDUuOTYsMCwwLDEsNzYsMjkuOTQxVjc3YTYuMDA3LDYuMDA3LDAsMCwxLTYsNkgyNmE2LjAwNyw2LjAwNywwLDAsMS02LTZabTYuNjE0LDUxLjA2aDBMNjgsNjkuOThhLjc1Ljc1LDAsMCwwLC41NDUtMS4yNjNMNTcuNjcsNTcuMTI5YTEuOTksMS45OSwwLDAsMC0yLjgwOC0uMDI4TDUxLjYsNjAuNDY3bC0uMDI0LjAyNi03LjA4Ny03LjU0M2ExLjczLDEuNzMsMCwwLDAtMS4yMjktLjUzNSwxLjc2NSwxLjc2NSwwLDAsMC0xLjI0OS41TDI2LjA4NCw2OC43NzhhLjc1Ljc1LDAsMCwwLC41MjksMS4yODFabTI2LjA2MS04LjU0OCwzLjI1Mi0zLjM1NGEuMzMzLjMzMywwLDAsMSwuMzMyLS4xMjMuNDYzLjQ2MywwLDAsMSwuMzI0LjEyNkw2Ni4yNyw2OC40ODRsLTcuMTc3LjAxNC02LjUtNi45MTZhLjczNS43MzUsMCwwLDAsLjA3OC0uMDcxWm0tOS42MTEtNy41MjZhLjIzNS4yMzUsMCwwLDEsLjE2OC0uMDY5LjIxMi4yMTIsMCwwLDEsLjE2OC4wNjhMNTcuMDM5LDY4LjVsLTI4LjYwNi4wNTVabTIwLjA1LS40M2guMDc5YTUuMDg3LDUuMDg3LDAsMCwwLDMuNTgzLTEuNDcsNS4xNDYsNS4xNDYsMCwxLDAtNy4yNzktLjEwOSw1LjA4OSw1LjA4OSwwLDAsMCwzLjYxNywxLjU3OVptLTIuNDU2LTcuODM5YTMuNiwzLjYsMCwwLDEsMi41MzQtMS4wNDJoLjA1NmEzLjcsMy43LDAsMCwxLDIuNDc4LDYuMzQsMy41MSwzLjUxLDAsMCwxLTIuNTg5LDEuMDQxLDMuNiwzLjYsMCwwLDEtMi41NTctMS4xMTgsMy43MTUsMy43MTUsMCwwLDEsLjA3OS01LjIyMVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOCAtMTEpIiBmaWxsPSIjOGU4ZThlIi8+PC9zdmc+Cg=="}),tt.createElement(pr,{gridArea:"productName",alignSelf:mt?"center":"end"},tt.createElement(ur,{customFontWeight:600,className:wt},It(e.product.name))),tt.createElement(pr,{gridArea:"price",className:Ct},((e,t,n)=>{var r;let o=e.product.price_range.minimum_price.regular_price.currency;o=t||(null!==(r=Nt()(o))&&void 0!==r?r:"");const i=e.product.price_range.minimum_price.final_price.value,a=n?i*parseFloat(n):i;return null===i?"":`${o}${a.toFixed(2)}`})(e,n,r))))},mr=({active:e,response:t,formRef:n,inputRef:r,resultsRef:o,pageSize:i=6,currencySymbol:a="",currencyRate:s="1",minQueryLengthHit:c,route:u})=>{var l,f,p,d;const h=null!==(f=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.productSearch.items)&&void 0!==f?f:[],_=null!==(d=null===(p=null==t?void 0:t.data)||void 0===p?void 0:p.productSearch.suggestions)&&void 0!==d?d:[];!o.current||!e&&mt||(o.current.style.cssText="\n display: flex;\n right: 0px;\n margin-top: 5px;\n box-shadow: 0px 0px 6px 0px #cacaca;\n ");const m=e=>{const t=r.current,o=n.current;e&&t&&(t.value=e),null==o||o.dispatchEvent(new Event("submit")),setTimeout((()=>null==o?void 0:o.submit()),0)},v=_.map(((e,t)=>{if(t<=4)return tt.createElement(ur,{className:kt,customFontSize:"90%",customLineHeight:"95%",key:e,onClick:()=>(e=>{window.adobeDataLayer.push((t=>{t.push({event:"search-suggestion-click",eventInfo:Object.assign(Object.assign({},t.getState()),{searchUnitId:yt,suggestion:e})})})),m(e)})(e),hoverColor:"#f5f5f5",hoverPointer:"pointer",padding:"4px"},It(e))}));return h.length<=0||!e||!c?tt.createElement(tt.Fragment,null):tt.createElement(pr,{className:gt,width:mt?"100%":_.length>0?"700px":"530px",height:mt?`calc(100vh - ${(()=>{var e,t;return null!==(t=null===(e=o.current)||void 0===e?void 0:e.getBoundingClientRect().top)&&void 0!==t?t:150})()}px)`:"auto",backgroundColor:"#fff",gridTemplateAreas:mt?'"suggestions""previews""viewall"':'"suggestions previews" "viewall viewall"',rowGap:"16px",columnGap:_.length>0?"16px":"0px",gridTemplateColumns:mt?"1fr":"auto 3fr",gridTemplateRows:mt?"auto 1fr 36px":"1fr 36px",overflowY:mt?"scroll":"auto",overflowX:"hidden"},_.length>0&&tt.createElement(pr,{className:xt,gridArea:"suggestions",width:mt?"auto":"max-content",maxWidth:mt?"none":"150px",gridTemplateRows:mt?`repeat(${_.length+1}, 3.5rem)`:`repeat(${i}, 1fr) minmax(0px, 20px);`,padding:mt?"16px 32px 0px 32px":"16px 0px 8px 16px",margin:mt?"auto 0px":"unset",textAlign:mt?"center":"unset"},tt.createElement(ur,{customFontWeight:600,className:At},dr),v),tt.createElement(pr,{className:St,gridArea:"previews",gridTemplateColumns:"1fr 1fr",gridTemplateRows:mt?`repeat(${Math.ceil(h.length/2)}, 1fr)`:"repeat(3, 1fr)",gap:"4px",padding:mt?"0px 16px":"16px",paddingBottom:"0px",alignSelf:"start"},h.map(((e,t)=>{if(tm(),hoverColor:"#f0f0f0",hoverFontWeight:600,hoverPointer:"pointer"},hr))},vr=e=>{const{performSearch:t,pageSize:n,minQueryLength:r,currencySymbol:o,currencyRate:i,formSelector:a,inputSelector:s,resultsSelector:c,displayInStockOnly:u,route:l,searchRoute:f}=e,{active:p,formProps:d,formRef:h,inputProps:_,inputRef:m,results:v,resultsRef:y,minQueryLengthHit:g,setActive:b}=rt(t,r,u),S=(({formRef:e,resultsRef:t,setActive:n})=>{const r=se((e=>{e.stopPropagation();const t=e||window.event,r=t.target||t.srcElement,o=["search-autocomplete","input-text","popover-container","products-container"];let i=!0;for(let e=0;e{e.stopPropagation();const{key:t}=e;("Escape"===t||"Esc"===t)&&n(!1)}),[e,t,n]),i=se((e=>{var r;e.stopPropagation();const o=t.current;(null===(r=null==o?void 0:o.querySelectorAll(".product-result"))||void 0===r?void 0:r.length)&&n(!0)}),[e,t,n]),a=se((()=>{var r,o;const{activeElement:i}=document,a=t.current,s=null===(r=e.current)||void 0===r?void 0:r.contains(i),c=(null===(o=null==a?void 0:a.parentElement)||void 0===o?void 0:o.querySelector(":hover"))===a;n(s||c)}),[e,t,n]);return ae((()=>({onBlur:i,onFocus:a,onKeyDown:o,onClick:r})),[a])})({formRef:h,resultsRef:y,setActive:b});return(({focusProps:e,formId:t,formProps:n,formRef:r,inputId:o,inputProps:i,inputRef:a,resultsId:s,resultsRef:c})=>{re((()=>{const u=document.getElementById(t),l=document.getElementById(o),f=document.getElementById(s);return null===document||void 0===document||document.addEventListener("click",e.onClick),r.current=u,a.current=l,c.current=f,null==u||u.addEventListener("focusin",e.onFocus),null==u||u.addEventListener("focusout",e.onBlur),null==u||u.addEventListener("keydown",e.onKeyDown),null==u||u.addEventListener("submit",n.onSubmit),null==l||l.addEventListener("input",i.onChange),()=>{null===document||void 0===document||document.removeEventListener("click",e.onClick),null==u||u.removeEventListener("focusin",e.onFocus),null==u||u.removeEventListener("focusout",e.onBlur),null==u||u.removeEventListener("keydown",e.onKeyDown),null==u||u.removeEventListener("submit",n.onSubmit),null==l||l.removeEventListener("input",i.onChange)}}),[e,t,n,r,o,i])})({focusProps:S,formId:null!=a?a:"search_mini_form",formProps:d,formRef:h,inputId:null!=s?s:"search",inputProps:_,inputRef:m,resultsId:null!=c?c:"search_autocomplete",resultsRef:y}),re((()=>{const e=h.current,t=m.current;f&&(null==e?void 0:e.action)&&(null==t?void 0:t.name)&&(e.action=f.route,t.name=f.query)}),[f]),tt.createElement(mr,Object.assign({active:p,resultsRef:y,formRef:h,inputRef:m,response:v,pageSize:n,currencySymbol:o,currencyRate:i,minQueryLengthHit:g,route:l},S))},yr=vr;function gr(e){return{render(t){ze(t,e)},unmount(){Je(e)}}}class br{constructor(e,t=3,n="search_mini_form",r="search",o="search_autocomplete"){var i,a,s,c,u,l,f,p,d,h,_,m;this.storeDetails=e,this.formSelector=n,this.inputSelector=r,this.resultsSelector=o,this.minQueryLength=null!==(a=null===(i=e.config)||void 0===i?void 0:i.minQueryLength)&&void 0!==a?a:t,this.pageSize=Number(null===(s=e.config)||void 0===s?void 0:s.pageSize)?Number(null===(c=e.config)||void 0===c?void 0:c.pageSize):6,this.currencySymbol=null!==(l=null===(u=e.config)||void 0===u?void 0:u.currencySymbol)&&void 0!==l?l:"$",this.currencyRate=null!==(p=null===(f=e.config)||void 0===f?void 0:f.currencyRate)&&void 0!==p?p:"1",this.displayOutOfStock=null!==(h=null===(d=e.config)||void 0===d?void 0:d.displayOutOfStock)&&void 0!==h?h:"1",this.context=e.context,this.search=new _t({environmentId:this.storeDetails.environmentId,environmentType:this.storeDetails.environmentType,websiteCode:this.storeDetails.websiteCode,storeCode:this.storeDetails.storeCode,storeViewCode:this.storeDetails.storeViewCode,searchUnitId:yt,config:{minQueryLength:this.minQueryLength,pageSize:this.pageSize,currencySymbol:this.currencySymbol,currencyRate:this.currencyRate,displayOutOfStock:this.displayOutOfStock},apiKey:this.storeDetails.apiKey,context:this.context,apiUrl:this.storeDetails.apiUrl?this.storeDetails.apiUrl:"https://catalog-service.adobe.io/graphql",route:this.storeDetails.route});const{performSearch:v,displayInStockOnly:y}=this.search;this.searchButton=null===(_=document.getElementById(this.formSelector))||void 0===_?void 0:_.querySelector("label"),null===(m=this.searchButton)||void 0===m||m.addEventListener("click",(()=>{return e=this.searchButton,void(mt&&vt(e));var e}));gr(document.getElementById(this.resultsSelector)).render(tt.createElement(yr,{performSearch:v,formSelector:this.formSelector,inputSelector:this.inputSelector,resultsSelector:this.resultsSelector,pageSize:this.pageSize,minQueryLength:this.minQueryLength,currencySymbol:this.currencySymbol,currencyRate:this.currencyRate,displayInStockOnly:y,route:this.storeDetails.route,searchRoute:this.storeDetails.searchRoute}))}}"undefined"!=typeof window&&(window.LiveSearchAutocomplete=br);const Sr=br})(),r})())); \ No newline at end of file