if (!Object.hasOwn) { Object.defineProperty(Object, 'hasOwn', { value: function (obj, prop) { if (obj == null) { throw new TypeError('Cannot convert undefined or null to object'); } return Object.prototype.hasOwnProperty.call(obj, prop); }, writable: true, configurable: true, enumerable: false }); } var loader=function(){"use strict";function G(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function W(t){return function e(r){return arguments.length===0||G(r)?e:t.apply(this,arguments)}}function M(t){return function e(r,s){switch(arguments.length){case 0:return e;case 1:return G(r)?e:W(function(i){return t(r,i)});default:return G(r)&&G(s)?e:G(r)?W(function(i){return t(i,s)}):G(s)?W(function(i){return t(r,i)}):t(r,s)}}}function zs(t,e){t=t||[],e=e||[];var r,s=t.length,i=e.length,a=[];for(r=0;r=arguments.length)?l=e[o]:(l=arguments[i],i+=1),s[o]=l,G(l)?c=!0:a-=1,o+=1}return!c&&a<=0?r.apply(this,s):gt(Math.max(0,a),br(t,s,r))}}var ue=M(function(e,r){return e===1?W(r):gt(e,br(e,[],r))});function pe(t){return function e(r,s,i){switch(arguments.length){case 0:return e;case 1:return G(r)?e:M(function(a,o){return t(r,a,o)});case 2:return G(r)&&G(s)?e:G(r)?M(function(a,o){return t(a,s,o)}):G(s)?M(function(a,o){return t(r,a,o)}):W(function(a){return t(r,s,a)});default:return G(r)&&G(s)&&G(i)?e:G(r)&&G(s)?M(function(a,o){return t(a,o,i)}):G(r)&&G(i)?M(function(a,o){return t(a,s,o)}):G(s)&&G(i)?M(function(a,o){return t(r,a,o)}):G(r)?W(function(a){return t(a,s,i)}):G(s)?W(function(a){return t(r,a,i)}):G(i)?W(function(a){return t(r,s,a)}):t(r,s,i)}}}const Ft=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function vo(t){return t!=null&&typeof t["@@transducer/step"]=="function"}function Je(t,e,r){return function(){if(arguments.length===0)return r();var s=arguments[arguments.length-1];if(!Ft(s)){for(var i=0;i=0;)r=Js[s],Te(r,e)&&!Po(i,r)&&(i[i.length]=r),s-=1;return i}),Me=W(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function Zs(t,e,r,s){var i=Gs(t),a=Gs(e);function o(c,l){return wr(c,l,r.slice(),s.slice())}return!Vs(function(c,l){return!Vs(o,l,c)},a,i)}function wr(t,e,r,s){if(yt(t,e))return!0;var i=Me(t);if(i!==Me(e))return!1;if(typeof t["fantasy-land/equals"]=="function"||typeof e["fantasy-land/equals"]=="function")return typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e)&&typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t);if(typeof t.equals=="function"||typeof e.equals=="function")return typeof t.equals=="function"&&t.equals(e)&&typeof e.equals=="function"&&e.equals(t);switch(i){case"Arguments":case"Array":case"Object":if(typeof t.constructor=="function"&&_o(t.constructor)==="Promise")return t===e;break;case"Boolean":case"Number":case"String":if(!(typeof t==typeof e&&yt(t.valueOf(),e.valueOf())))return!1;break;case"Date":if(!yt(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(!(t.source===e.source&&t.global===e.global&&t.ignoreCase===e.ignoreCase&&t.multiline===e.multiline&&t.sticky===e.sticky&&t.unicode===e.unicode))return!1;break}for(var a=r.length-1;a>=0;){if(r[a]===t)return s[a]===e;a-=1}switch(i){case"Map":return t.size!==e.size?!1:Zs(t.entries(),e.entries(),r.concat([t]),s.concat([e]));case"Set":return t.size!==e.size?!1:Zs(t.values(),e.values(),r.concat([t]),s.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=Xe(t);if(o.length!==Xe(e).length)return!1;var c=r.concat([t]),l=s.concat([e]);for(a=o.length-1;a>=0;){var m=o[a];if(!(Te(m,e)&&wr(e[m],t[m],c,l)))return!1;a-=1}return!0}var He=M(function(e,r){return wr(e,r,[],[])});function Ao(t,e,r){var s,i;if(typeof t.indexOf=="function")switch(typeof e){case"number":if(e===0){for(s=1/e;r=0}function $t(t,e){for(var r=0,s=e.length,i=Array(s);r":Ys(o,c)},s=function(a,o){return $t(function(c){return _r(c)+": "+r(a[c])},o.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+$t(r,t).join(", ")+"))";case"[object Array]":return"["+$t(r,t).concat(s(t,jo(function(a){return/^\d+$/.test(a)},Xe(t)))).join(", ")+"]";case"[object Boolean]":return typeof t=="object"?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):_r(Eo(t)))+")";case"[object Map]":return"new Map("+r(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return typeof t=="object"?"new Number("+r(t.valueOf())+")":1/t===-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+r(Array.from(t).sort())+")";case"[object String]":return typeof t=="object"?"new String("+r(t.valueOf())+")":_r(t);case"[object Undefined]":return"undefined";default:if(typeof t.toString=="function"){var i=t.toString();if(i!=="[object Object]")return i}return"{"+s(t,Xe(t)).join(", ")+"}"}}var en=W(function(e){return Ys(e,[])}),tn=M(function(e,r){if(e===r)return r;function s(l,m){if(l>m!=m>l)return m>l?m:l}var i=s(e,r);if(i!==void 0)return i;var a=s(typeof e,typeof r);if(a!==void 0)return a===typeof e?e:r;var o=en(e),c=s(o,en(r));return c!==void 0&&c===o?e:r}),Lo=function(){function t(e,r){this.xf=r,this.f=e}return t.prototype["@@transducer/init"]=Ee.init,t.prototype["@@transducer/result"]=Ee.result,t.prototype["@@transducer/step"]=function(e,r){return this.xf["@@transducer/step"](e,this.f(r))},t}(),Fo=function(e){return function(r){return new Lo(e,r)}},kr=M(Je(["fantasy-land/map","map"],Fo,function(e,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return ue(r.length,function(){return e.call(this,r.apply(this,arguments))});case"[object Object]":return qt(function(s,i){return s[i]=e(r[i]),s},{},Xe(r));default:return $t(e,r)}}));const rn=Number.isInteger||function(e){return e<<0===e};function sn(t,e){var r=t<0?e.length+t:t;return e[r]}function Uo(t,e){if(e!=null)return rn(t)?sn(t,e):e[t]}var Ue=M(Uo),Bt=M(function(e,r){return kr(Ue(e),r)});function nn(t){return Object.prototype.toString.call(t)==="[object String]"}var $o=W(function(e){return Ft(e)?!0:!e||typeof e!="object"||nn(e)?!1:e.length===0?!0:e.length>0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1}),an=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function on(t,e,r){return function(i,a,o){if($o(o))return t(i,a,o);if(o==null)return a;if(typeof o["fantasy-land/reduce"]=="function")return e(i,a,o,"fantasy-land/reduce");if(o[an]!=null)return r(i,a,o[an]());if(typeof o.next=="function")return r(i,a,o);if(typeof o.reduce=="function")return e(i,a,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function qo(t,e,r){for(var s=0,i=r.length;sr)throw new Error("min must not be greater than max in clamp(min, max, value)");return sr?r:s});function ec(t){return new RegExp(t.source,t.flags?t.flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":"")+(t.dotAll?"s":""))}function Wt(t,e,r){if(r||(r=new rc),tc(t))return t;var s=function(a){var o=r.get(t);if(o)return o;r.set(t,a);for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&(a[c]=e?Wt(t[c],!0,r):t[c]);return a};switch(Me(t)){case"Object":return s(Object.create(Object.getPrototypeOf(t)));case"Array":return s(Array(t.length));case"Date":return new Date(t.valueOf());case"RegExp":return ec(t);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return t.slice();default:return t}}function tc(t){var e=typeof t;return t==null||e!="object"&&e!="function"}var rc=function(){function t(){this.map={},this.length=0}return t.prototype.set=function(e,r){var s=this.hash(e),i=this.map[s];i||(this.map[s]=i=[]),i.push([e,r]),this.length+=1},t.prototype.hash=function(e){var r=[];for(var s in e)r.push(Object.prototype.toString.call(e[s]));return r.join()},t.prototype.get=function(e){if(this.length<=180){for(var r in this.map)for(var o=this.map[r],s=0;sa?-1:ir}),wn=M(function(e,r){return e>=r}),Be=function(t,e){switch(arguments.length){case 0:return Be;case 1:return function(){return function r(s){switch(arguments.length){case 0:return r;default:return yt(t,s)}}}();default:return yt(t,e)}},_n=pe(function(e,r,s){return ue(Math.max(e.length,r.length,s.length),function(){return e.apply(this,arguments)?r.apply(this,arguments):s.apply(this,arguments)})}),Sc=M(Ut),St=pn(function(t,e){return e},null),wc=function(){function t(e,r){this.xf=r,this.f=e,this.set=new vn}return t.prototype["@@transducer/init"]=Ee.init,t.prototype["@@transducer/result"]=Ee.result,t.prototype["@@transducer/step"]=function(e,r){return this.set.add(this.f(r))?this.xf["@@transducer/step"](e,r):e},t}();function _c(t){return function(e){return new wc(t,e)}}var kc=M(Je([],_c,function(t,e){for(var r=new vn,s=[],i=0,a,o;i{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vt=typeof window>"u"||"Deno"in globalThis;function xe(){}function eu(t,e){return typeof t=="function"?t(e):t}function tu(t){return typeof t=="number"&&t>=0&&t!==1/0}function ru(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Cr(t,e){return typeof t=="function"?t(e):t}function su(t,e){return typeof t=="function"?t(e):t}function Rn(t,e){const{type:r="all",exact:s,fetchStatus:i,predicate:a,queryKey:o,stale:c}=t;if(o){if(s){if(e.queryHash!==Or(o,e.options))return!1}else if(!_t(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||i&&i!==e.state.fetchStatus||a&&!a(e))}function Dn(t,e){const{exact:r,status:s,predicate:i,mutationKey:a}=t;if(a){if(!e.options.mutationKey)return!1;if(r){if(wt(e.options.mutationKey)!==wt(a))return!1}else if(!_t(e.options.mutationKey,a))return!1}return!(s&&e.state.status!==s||i&&!i(e))}function Or(t,e){return(e?.queryKeyHashFn||wt)(t)}function wt(t){return JSON.stringify(t,(e,r)=>Rr(r)?Object.keys(r).sort().reduce((s,i)=>(s[i]=r[i],s),{}):r)}function _t(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>_t(t[r],e[r])):!1}function Mn(t,e){if(t===e)return t;const r=jn(t)&&jn(e);if(r||Rr(t)&&Rr(e)){const s=r?t:Object.keys(t),i=s.length,a=r?e:Object.keys(e),o=a.length,c=r?[]:{},l=new Set(s);let m=0;for(let f=0;f{setTimeout(e,t)})}function iu(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Mn(t,e):e}function au(t,e,r=0){const s=[...t,e];return r&&s.length>r?s.slice(1):s}function ou(t,e,r=0){const s=[e,...t];return r&&s.length>r?s.slice(0,-1):s}var Dr=Symbol();function Fn(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Dr?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var cu=class extends Gt{#e;#t;#r;constructor(){super(),this.#r=t=>{if(!Vt&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#r=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Un=new cu,uu=class extends Gt{#e=!0;#t;#r;constructor(){super(),this.#r=t=>{if(!Vt&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#r=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#e}},Kt=new uu;function lu(){let t,e;const r=new Promise((i,a)=>{t=i,e=a});r.status="pending",r.catch(()=>{});function s(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{s({status:"fulfilled",value:i}),t(i)},r.reject=i=>{s({status:"rejected",reason:i}),e(i)},r}function hu(t){return Math.min(1e3*2**t,3e4)}function $n(t){return(t??"online")==="online"?Kt.isOnline():!0}var qn=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Mr(t){return t instanceof qn}function Hn(t){let e=!1,r=0,s=!1,i;const a=lu(),o=I=>{s||(v(new qn(I)),t.abort?.())},c=()=>{e=!0},l=()=>{e=!1},m=()=>Un.isFocused()&&(t.networkMode==="always"||Kt.isOnline())&&t.canRun(),f=()=>$n(t.networkMode)&&t.canRun(),p=I=>{s||(s=!0,t.onSuccess?.(I),i?.(),a.resolve(I))},v=I=>{s||(s=!0,t.onError?.(I),i?.(),a.reject(I))},w=()=>new Promise(I=>{i=E=>{(s||m())&&I(E)},t.onPause?.()}).then(()=>{i=void 0,s||t.onContinue?.()}),_=()=>{if(s)return;let I;const E=r===0?t.initialPromise:void 0;try{I=E??t.fn()}catch(C){I=Promise.reject(C)}Promise.resolve(I).then(p).catch(C=>{if(s)return;const ee=t.retry??(Vt?0:3),Ae=t.retryDelay??hu,Fe=typeof Ae=="function"?Ae(r,C):Ae,qe=ee===!0||typeof ee=="number"&&rm()?void 0:w()).then(()=>{e?v(C):_()})})};return{promise:a,cancel:o,continue:()=>(i?.(),a),cancelRetry:c,continueRetry:l,canStart:f,start:()=>(f()?_():w().then(_),a)}}var du=t=>setTimeout(t,0);function mu(){let t=[],e=0,r=c=>{c()},s=c=>{c()},i=du;const a=c=>{e?t.push(c):i(()=>{r(c)})},o=()=>{const c=t;t=[],c.length&&i(()=>{s(()=>{c.forEach(l=>{r(l)})})})};return{batch:c=>{let l;e++;try{l=c()}finally{e--,e||o()}return l},batchCalls:c=>(...l)=>{a(()=>{c(...l)})},schedule:a,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{i=c}}}var me=mu(),Bn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tu(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Vt?1/0:300*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},fu=class extends Bn{#e;#t;#r;#i;#s;#n;#o;constructor(t){super(),this.#o=!1,this.#n=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#r=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=gu(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(t){this.options={...this.#n,...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const r=iu(this.state.data,t,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t,e){this.#a({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(xe).catch(xe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>su(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Cr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ru(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#o?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}fetch(t,e){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const l=this.observers.find(m=>m.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,s=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#o=!0,r.signal)})},i=()=>{const l=Fn(this.options,e),f=(()=>{const p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(p),p})();return this.#o=!1,this.options.persister?this.options.persister(l,f,this):l(f)},o=(()=>{const l={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return s(l),l})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#a({type:"fetch",meta:o.fetchOptions?.meta});const c=l=>{Mr(l)&&l.silent||this.#a({type:"error",error:l}),Mr(l)||(this.#r.config.onError?.(l,this),this.#r.config.onSettled?.(this.state.data,l,this)),this.scheduleGc()};return this.#s=Hn({initialPromise:e?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:l=>{if(l===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(l)}catch(m){c(m);return}this.#r.config.onSuccess?.(l,this),this.#r.config.onSettled?.(l,this.state.error,this),this.scheduleGc()},onError:c,onFail:(l,m)=>{this.#a({type:"failed",failureCount:l,error:m})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#s.start()}#a(t){const e=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...pu(r.data,this.options),fetchMeta:t.meta??null};case"success":return this.#t=void 0,{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Mr(s)&&s.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=e(this.state),me.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function pu(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$n(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function gu(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,s=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var yu=class extends Gt{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,r){const s=e.queryKey,i=e.queryHash??Or(s,e);let a=this.get(i);return a||(a=new fu({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(r=>Rn(e,r))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(r=>Rn(t,r)):e}notify(t){me.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vu=class extends Bn{#e;#t;#r;constructor(t){super(),this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#e=[],this.state=t.state||bu(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})};this.#r=Hn({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(i,a)=>{this.#i({type:"failed",failureCount:i,error:a})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",s=!this.#r.canStart();try{if(r)e();else{this.#i({type:"pending",variables:t,isPaused:s}),await this.#t.config.onMutate?.(t,this);const a=await this.options.onMutate?.(t);a!==this.state.context&&this.#i({type:"pending",context:a,variables:t,isPaused:s})}const i=await this.#r.start();return await this.#t.config.onSuccess?.(i,t,this.state.context,this),await this.options.onSuccess?.(i,t,this.state.context),await this.#t.config.onSettled?.(i,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(i,null,t,this.state.context),this.#i({type:"success",data:i}),i}catch(i){try{throw await this.#t.config.onError?.(i,t,this.state.context,this),await this.options.onError?.(i,t,this.state.context),await this.#t.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,i,t,this.state.context),i}finally{this.#i({type:"error",error:i})}}finally{this.#t.runNext(this)}}#i(t){const e=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),me.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function bu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Su=class extends Gt{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(t,e,r){const s=new vu({mutationCache:this,mutationId:++this.#r,options:t.defaultMutationOptions(e),state:r});return this.add(s),s}add(t){this.#e.add(t);const e=Qt(t);if(typeof e=="string"){const r=this.#t.get(e);r?r.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Qt(t);if(typeof e=="string"){const r=this.#t.get(e);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Qt(t);if(typeof e=="string"){const s=this.#t.get(e)?.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){const e=Qt(t);return typeof e=="string"?this.#t.get(e)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){me.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(r=>Dn(e,r))}findAll(t={}){return this.getAll().filter(e=>Dn(t,e))}notify(t){me.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return me.batch(()=>Promise.all(t.map(e=>e.continue().catch(xe))))}};function Qt(t){return t.options.scope?.id}function Nn(t){return{onFetch:(e,r)=>{const s=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,a=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let c={pages:[],pageParams:[]},l=0;const m=async()=>{let f=!1;const p=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(e.signal.aborted?f=!0:e.signal.addEventListener("abort",()=>{f=!0}),e.signal)})},v=Fn(e.options,e.fetchOptions),w=async(_,I,E)=>{if(f)return Promise.reject();if(I==null&&_.pages.length)return Promise.resolve(_);const ee=(()=>{const Ws={client:e.client,queryKey:e.queryKey,pageParam:I,direction:E?"backward":"forward",meta:e.options.meta};return p(Ws),Ws})(),Ae=await v(ee),{maxPages:Fe}=e.options,qe=E?ou:au;return{pages:qe(_.pages,Ae,Fe),pageParams:qe(_.pageParams,I,Fe)}};if(i&&a.length){const _=i==="backward",I=_?wu:Wn,E={pages:a,pageParams:o},C=I(s,E);c=await w(E,C,_)}else{const _=t??a.length;do{const I=l===0?o[0]??s.initialPageParam:Wn(s,c);if(l>0&&I==null)break;c=await w(c,I),l++}while(l<_)}return c};e.options.persister?e.fetchFn=()=>e.options.persister?.(m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=m}}}function Wn(t,{pages:e,pageParams:r}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,r[s],r):void 0}function wu(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}var _u=class{#e;#t;#r;#i;#s;#n;#o;#a;constructor(t={}){this.#e=t.queryCache||new yu,this.#t=t.mutationCache||new Su,this.#r=t.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#o=Un.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Kt.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=this.#e.build(this,e),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Cr(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:r})=>{const s=r.data;return[e,s]})}setQueryData(t,e,r){const s=this.defaultQueryOptions({queryKey:t}),a=this.#e.get(s.queryHash)?.state.data,o=eu(e,a);if(o!==void 0)return this.#e.build(this,s).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return me.batch(()=>this.#e.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,r)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;me.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=this.#e;return me.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},s=me.batch(()=>this.#e.findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(xe).catch(xe)}invalidateQueries(t,e={}){return me.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},s=me.batch(()=>this.#e.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(xe)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(xe)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=this.#e.build(this,e);return r.isStaleByTime(Cr(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(xe).catch(xe)}fetchInfiniteQuery(t){return t.behavior=Nn(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(xe).catch(xe)}ensureInfiniteQueryData(t){return t.behavior=Nn(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Kt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(t){this.#r=t}setQueryDefaults(t,e){this.#i.set(wt(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],r={};return e.forEach(s=>{_t(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,e){this.#s.set(wt(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#s.values()],r={};return e.forEach(s=>{_t(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#r.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Or(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Dr&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#r.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},jr;function Lr(t){return{lang:t?.lang??jr?.lang,message:t?.message,abortEarly:t?.abortEarly??jr?.abortEarly,abortPipeEarly:t?.abortPipeEarly??jr?.abortPipeEarly}}var ku;function Iu(t){return ku?.get(t)}var Pu;function Au(t){return Pu?.get(t)}var Eu;function Tu(t,e){return Eu?.get(t)?.get(e)}function Ye(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function F(t,e,r,s,i){const a=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,c=i?.received??Ye(a),l={kind:t.kind,type:t.type,input:a,expected:o,received:c,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${c}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},m=t.kind==="schema",f=i?.message??t.message??Tu(t.reference,l.lang)??(m?Au(l.lang):null)??s.message??Iu(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),m&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function B(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Lr())}}}function zn(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Jt(t,e){const r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}function xu(t){if(t.path){let e="";for(const r of t.path)if(typeof r.key=="string"||typeof r.key=="number")e?e+=`.${r.key}`:e+=r.key;else return null;return e}return null}var Cu=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}},Ou=/^\d+$/u,Ru=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu,Du=/^#(?:[\da-fA-F]{3,4}|[\da-fA-F]{6}|[\da-fA-F]{8})$/u,Mu=/^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/iu;function Xt(t,e){return{kind:"validation",type:"check",reference:Xt,async:!1,expects:null,requirement:t,message:e,"~run"(r,s){return r.typed&&!this.requirement(r.value)&&F(this,"input",r,s),r}}}function Gn(t){return{kind:"validation",type:"digits",reference:Gn,async:!1,expects:null,requirement:Ou,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&F(this,"digits",e,r),e}}}function Vn(t){return{kind:"validation",type:"email",reference:Vn,expects:null,async:!1,requirement:Ru,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&F(this,"email",e,r),e}}}function We(t){return{kind:"transformation",type:"filter_items",reference:We,async:!1,operation:t,"~run"(e){return e.value=e.value.filter(this.operation),e}}}var ju={md4:32,md5:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8,adler32:8};function Kn(t,e){return{kind:"validation",type:"hash",reference:Kn,expects:null,async:!1,requirement:RegExp(t.map(r=>`^[a-f0-9]{${ju[r]}}$`).join("|"),"iu"),message:e,"~run"(r,s){return r.typed&&!this.requirement.test(r.value)&&F(this,"hash",r,s),r}}}function Qn(t){return{kind:"validation",type:"hex_color",reference:Qn,async:!1,expects:null,requirement:Du,message:t,"~run"(e,r){return e.typed&&!this.requirement.test(e.value)&&F(this,"hex color",e,r),e}}}function Jn(t,e){const r=Ye(t);return{kind:"validation",type:"includes",reference:Jn,async:!1,expects:r,requirement:t,message:e,"~run"(s,i){return s.typed&&!s.value.includes(this.requirement)&&F(this,"content",s,i,{received:`!${r}`}),s}}}function ge(t){return{kind:"transformation",type:"map_items",reference:ge,async:!1,operation:t,"~run"(e){return e.value=e.value.map(this.operation),e}}}function Xn(t,e){return{kind:"validation",type:"min_length",reference:Xn,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,s){return r.typed&&r.value.length=${t instanceof Date?t.toJSON():Ye(t)}`,requirement:t,message:e,"~run"(r,s){return r.typed&&!(r.value>=this.requirement)&&F(this,"value",r,s,{received:r.value instanceof Date?r.value.toJSON():Ye(r.value)}),r}}}function Zt(t){return{kind:"validation",type:"non_empty",reference:Zt,async:!1,expects:"!0",message:t,"~run"(e,r){return e.typed&&e.value.length===0&&F(this,"length",e,r,{received:"0"}),e}}}function Lu(t,e){if(t.issues)for(const r of e)for(const s of t.issues){let i=!1;const a=Math.min(r.length,s.path?.length??0);for(let o=0;or.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return B(this)},"~run"(r,s){let i,a,o;for(const c of this.options){const l=c["~run"]({value:r.value},s);if(l.typed)if(l.issues)a?a.push(l):a=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(a){if(a.length===1)return a[0];F(this,"type",r,s,{issues:ni(a)}),r.typed=!0}else{if(o?.length===1)return o[0];F(this,"type",r,s,{issues:ni(o)})}return r}}}function T(){return{kind:"schema",type:"unknown",reference:T,expects:"unknown",async:!1,get"~standard"(){return B(this)},"~run"(t){return t.typed=!0,t}}}function ii(t,e,r){return{kind:"schema",type:"variant",reference:ii,expects:"Object",async:!1,key:t,options:e,message:r,get"~standard"(){return B(this)},"~run"(s,i){const a=s.value;if(a&&typeof a=="object"){let o,c=0,l=this.key,m=[];const f=(p,v)=>{for(const w of p.options){if(w.type==="variant")f(w,new Set(v).add(w.key));else{let _=!0,I=0;for(const E of v){const C=w.entries[E];if(E in a?C["~run"]({typed:!1,value:a[E]},{abortEarly:!0}).issues:C.type!=="exact_optional"&&C.type!=="optional"&&C.type!=="nullish"){_=!1,l!==E&&(ce.toLowerCase():e=>e.toLocaleLowerCase(t)}function zu(t,e={}){const r=e.split??(e.separateNumbers?Nu:li),s=e.prefixCharacters??ui,i=e.suffixCharacters??ui;let a=0,o=t.length;for(;aa;){const c=o-1,l=t.charAt(c);if(!i.includes(l))break;o=c}return[t.slice(0,a),r(t.slice(a,o)),t.slice(o)]}/*! js-cookie v3.0.5 | MIT */function sr(t){for(var e=1;e"u")){o=sr({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var l in o)o[l]&&(c+="; "+l,o[l]!==!0&&(c+="="+o[l].split(";")[0]));return document.cookie=i+"="+t.write(a,i)+c}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},c=0;c>>32-s},rotr:function(r,s){return r<<32-s|r>>>s},endian:function(r){if(r.constructor==Number)return e.rotl(r,8)&16711935|e.rotl(r,24)&4278255360;for(var s=0;s0;r--)s.push(Math.floor(Math.random()*256));return s},bytesToWords:function(r){for(var s=[],i=0,a=0;i>>5]|=r[i]<<24-a%32;return s},wordsToBytes:function(r){for(var s=[],i=0;i>>5]>>>24-i%32&255);return s},bytesToHex:function(r){for(var s=[],i=0;i>>4).toString(16)),s.push((r[i]&15).toString(16));return s.join("")},hexToBytes:function(r){for(var s=[],i=0;i>>6*(3-o)&63)):s.push("=");return s.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/ig,"");for(var s=[],i=0,a=0;i>>6-a*2);return s}};Wr.exports=e}()),Wr.exports}var zr,di;function mi(){if(di)return zr;di=1;var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var r=[],s=0;s * @license MIT */var Gr,fi;function Qu(){if(fi)return Gr;fi=1,Gr=function(r){return r!=null&&(t(r)||e(r)||!!r._isBuffer)};function t(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function e(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&t(r.slice(0,0))}return Gr}var pi;function Ju(){return pi||(pi=1,function(){var t=Ku(),e=mi().utf8,r=Qu(),s=mi().bin,i=function(a,o){a.constructor==String?o&&o.encoding==="binary"?a=s.stringToBytes(a):a=e.stringToBytes(a):r(a)?a=Array.prototype.slice.call(a,0):!Array.isArray(a)&&a.constructor!==Uint8Array&&(a=a.toString());for(var c=t.bytesToWords(a),l=a.length*8,m=1732584193,f=-271733879,p=-1732584194,v=271733878,w=0;w>>24)&16711935|(c[w]<<24|c[w]>>>8)&4278255360;c[l>>>5]|=128<>>9<<4)+14]=l;for(var _=i._ff,I=i._gg,E=i._hh,C=i._ii,w=0;w>>0,f=f+Ae>>>0,p=p+Fe>>>0,v=v+qe>>>0}return t.endian([m,f,p,v])};i._ff=function(a,o,c,l,m,f,p){var v=a+(o&c|~o&l)+(m>>>0)+p;return(v<>>32-f)+o},i._gg=function(a,o,c,l,m,f,p){var v=a+(o&l|c&~l)+(m>>>0)+p;return(v<>>32-f)+o},i._hh=function(a,o,c,l,m,f,p){var v=a+(o^c^l)+(m>>>0)+p;return(v<>>32-f)+o},i._ii=function(a,o,c,l,m,f,p){var v=a+(c^(o|~l))+(m>>>0)+p;return(v<>>32-f)+o},i._blocksize=16,i._digestsize=16,Nr.exports=function(a,o){if(a==null)throw new Error("Illegal argument "+a);var c=t.wordsToBytes(i(a,o));return o&&o.asBytes?c:o&&o.asString?s.bytesToString(c):t.bytesToHex(c)}}()),Nr.exports}var Xu=Ju();const Zu=Vu(Xu),ce=[];for(let t=0;t<256;++t)ce.push((t+256).toString(16).slice(1));function Yu(t,e=0){return(ce[t[e+0]]+ce[t[e+1]]+ce[t[e+2]]+ce[t[e+3]]+"-"+ce[t[e+4]]+ce[t[e+5]]+"-"+ce[t[e+6]]+ce[t[e+7]]+"-"+ce[t[e+8]]+ce[t[e+9]]+"-"+ce[t[e+10]]+ce[t[e+11]]+ce[t[e+12]]+ce[t[e+13]]+ce[t[e+14]]+ce[t[e+15]]).toLowerCase()}let Vr;const el=new Uint8Array(16);function tl(){if(!Vr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Vr=crypto.getRandomValues.bind(crypto)}return Vr(el)}const gi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ot(t,e,r){if(gi.randomUUID&&!t)return gi.randomUUID();t=t||{};const s=t.random??t.rng?.()??tl();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Yu(s)}var z=(t=>(t.production="production",t.staging="staging",t))(z||{}),tt=(t=>(t.floor="floor",t.ceiling="ceiling",t.round="round",t))(tt||{});const yi=R(["outfit-landing-page","outfits","trending-bundles"]);[...yi.options];var Z=(t=>(t.strikethrough="strikethrough",t.salesPriceOnly="sales-price-only",t))(Z||{});const rt=R(["control","present","test"]),bi="__stylitics",nr="__unused-target",Si=R(["StyliticsAnchorItemsGalleryWidget","StyliticsBeautyWidget","StyliticsClassicWidget","StyliticsControlWidget","StyliticsComplementaryItemsWidget","StyliticsCrossSellWidget","StyliticsDimensionCollageWidget","StyliticsDynamicGalleriesWidget","StyliticsGalleryWidget","StyliticsGridWidget","StyliticsHotspotsWidget","StyliticsListWidget","StyliticsNikeWidget","StyliticsShopSimilarWidget","StyliticsShopTheOutfitWidget","StyliticsShopTheSetWidget","StyliticsSimilarStylesWidget","StyliticsStyledForYouWidget","StyliticsV3ClassicWidget","StyliticsV3HotspotsWidget","StyliticsVibeWidget"]),ir=R(["top-left","top-right","bottom-left","bottom-right"]),rl=[[0,{}],[640,{}],[1023,{}],[1280,{}],[1536,{}]],sl="https://widget-api.stylitics.com",nl="https://widget-api-staging.stylitics.com";function il(t){return t===z.staging?ol:al}const al="https://datastream.stylitics.com/api/engagements",ol="https://datastream-staging.stylitics.com/api/engagements",cl=new Set(["debug","error","info","log","warn"]),wi="[Stylitics]: ",A=new Proxy(globalThis.console,{get(t,e,r){const s=Reflect.get(t,e,r);return typeof s=="function"&&cl.has(e)?function(...i){return i.length>0&&typeof i[0]=="string"?i[0]=wi+i[0]:i.unshift(wi),s.apply(t,i)}:s}}),ul=bt(kn);function ct(t){return Tr(JSON.parse,Nt(void 0))(t??"")}function ll(t){return t instanceof Map?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):Object.fromEntries(Object.entries(t))}function hl(t){return Object.entries(ll(t)).reduce((e,[r,s])=>s===void 0?e:Object.assign(e,{[r]:typeof s=="object"&&!Array.isArray(s)?JSON.stringify(s):String(s)}),{})}function dl(t){return t instanceof URLSearchParams?t:typeof t=="string"||t==null?new URLSearchParams(t):new URLSearchParams(hl(t))}function ml(t=[],e){if(t.length===0)return!1;const r=Math.ceil(t.length/2),s=lc(zt,t);return wn(Ar(0,e,s),r)}function ve(t){return t instanceof Error?t:Error(String(t))}function Ce(t,e="log"){switch(e){case"debug":A.debug(t);break;case"error":A.error(t);break;case"log":A.log(t);break;case"warn":A.warn(t);break;default:A.log(t)}return t}class _i{static new(){return new this}constructor(){this.stack=[]}stack=[];clear=()=>{this.length=0};get length(){return this.stack.length}set length(e){this.stack.length=e}pop=()=>this.stack.pop();push=e=>{this.stack.push(e)};run=()=>{this.pop()?.()};runAll=()=>{for(;this.length>0;)this.run()}}function fl(){return new URL(window.location.href).searchParams.get("stylitics-debug")==="true"}function Kr(t,e){return{kind:"schema",type:"filter_array",reference:Kr,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return B(this)},"~run"(r,s){const i=r.value,a=r,o=function(){try{if(fl())return structuredClone(r)}catch{}return null}();if(Array.isArray(i)){a.typed=!0,a.value=[];for(const c of i){const l=this.item["~run"]({typed:!1,value:c},s);l.issues?o&&(o.issues?o.issues=[...o.issues,...l.issues]:o.issues=l.issues):a.value.push(l.value)}}else F(this,"type",a,s);return o?.issues?.length&&A.debug("filteredArray debug:",ti(o.issues)),a}}}function P(t,e){const r=we(t,e);if(r.error)throw r.error;return r.output}function we(t,e){const r=oi(t,e);return r.success?{...r,error:void 0}:{...r,error:pl(r.issues)}}function je(t,e,r){try{return rr(e,r)}catch{return t}}function pl(t){const e=JSON.stringify(ti(t),null,2);return new gl(e)}function x(t){return b(g(si(t)),y(e=>e??void 0))}class gl extends Error{name="StyliticsValidationError";stack=void 0}class te{type="CookieStore";static keys={sessionId:"styliticsWidgetSession",widgetData:"styliticsWidgetData"};static new(e={}){return new this(e)}static getDefaultAttributes(){return{domain:yl(window.location.host),path:"/",sameSite:"none",secure:!0}}constructor(e){this._enableStorage=e.enableStorage??!0}attributes=Ge.attributes;converter=Ge.converter;_enableStorage;get enableStorage(){return this._enableStorage}set enableStorage(e){e===!0&&(this._enableStorage=!0),e===!1&&(this._enableStorage=!1,this.clear())}getSessionId(){return this.get(te.keys.sessionId)}setSessionId(e,r){return this.set(te.keys.sessionId,e,r),this}deleteSessionId(){return this.remove(te.keys.sessionId),this}getWidgetData(){return this.get(te.keys.widgetData)}setWidgetData(e,r){return this.set(te.keys.widgetData,e,r),this}deleteWidgetData(){return this.remove(te.keys.widgetData),this}clear(e){Object.values(te.keys).forEach(r=>Ge.remove(r,{...te.getDefaultAttributes(),...e}))}forEach(e,r){this.toMap().forEach((s,i,a)=>{e.apply(r,[i,s,a])})}get(e){return Ge.get(e)}remove(e,r){Ge.remove(e,{...te.getDefaultAttributes(),...r})}set(e,r,s){if(this.enableStorage){const i=te.getDefaultAttributes();return e===te.keys.sessionId&&(i.expires=1e3),Ge.set(e,r,{...i,...s})}}toMap(){const e=Object.values(te.keys).reduce((r,s)=>{const i=this.get(s);return i!=null&&r.push([s,i]),r},[]);return new Map(e)}withAttributes=Ge.withAttributes;withConverter=Ge.withConverter}function yl(t=""){if(t.includes("localhost"))return"localhost";switch(t.split(".").length){case 1:return"";case 2:return t;default:return t.slice(t.indexOf(".")+1)}}class V{type="LocalStore";static keys={browsedItems:"StyliticsBrowsedItems",campaignIds:"styliticsCampaignIds",experienceConfig:"StyliticsExperienceConfig",sessionId:"StyliticsSessionID",testOverride:"StyliticsTestOverride"};static keySet=new Set(Object.values(V.keys));static new(e={}){return new this(e)}constructor(e){this._enableStorage=e.enableStorage??!0,this.store=e.store??window.localStorage}store;_enableStorage;get enableStorage(){return this._enableStorage}set enableStorage(e){e===!0&&(this._enableStorage=!0),e===!1&&(this._enableStorage=!1,this.clear())}getCampaignIds(){return this.get(V.keys.campaignIds)}setCampaignIds(e){return this.set(V.keys.campaignIds,e),this}deleteCampaignIds(){return this.store.removeItem(V.keys.campaignIds),this}getBrowsedItems(){return this.get(V.keys.browsedItems)}setBrowsedItems(e){return this.set(V.keys.browsedItems,e),this}deleteBrowsedItems(){return this.store.removeItem(V.keys.browsedItems),this}getPurchasedItems(e){return this.get(e)}setPurchasedItems(e,r){return this.set(e,r),this}deletePurchasedItems(e){return this.store.removeItem(e),this}getExperienceConfig(){return this.get(V.keys.experienceConfig)}setExperienceConfig(e){return this.set(V.keys.experienceConfig,e),this}deleteExperienceConfig(){return this.store.removeItem(V.keys.experienceConfig),this}getSessionId(){return this.get(V.keys.sessionId)}setSessionId(e){return this.set(V.keys.sessionId,e),this}deleteSessionId(){return this.store.removeItem(V.keys.sessionId),this}getTestOverride(){return this.get(V.keys.testOverride)}setTestOverride(e){return this.set(V.keys.testOverride,e),this}deleteTestOverride(){return this.store.removeItem(V.keys.testOverride),this}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return`LocalStore {size: ${this.size}}`}clear(){this.forEach((e,r)=>{this.store.removeItem(r)})}delete(e){const r=this.has(e);return this.store.removeItem(e),r}entries(){return this.toMap().entries()}forEach(e,r){this.toMap().forEach((s,i,a)=>{e.apply(r,[s,i,a])})}get(e){return this.store.getItem(e)??void 0}has(e){return this.toMap().has(e)}keys(){return this.toMap().keys()}set(e,r){return this.enableStorage&&this.store.setItem(e,r),this}get size(){return localStorage.length}values(){return this.toMap().values()}toMap(){return Object.entries(this.store).reduce((e,[r,s])=>(this.isLocalStoreKey(r)&&s!=null&&e.set(r,s),e),new Map)}isLocalStoreKey(e){return V.keySet.has(e)||e.startsWith(ki)}}const ki="styliticsVisitorBoughtItems";class Ii{type="ParamsStore";static new(e={}){return new this(e)}constructor(e){this.store=e.store??new URLSearchParams(window.location.search)}store;clear(){this.forEach(this.store.delete)}delete(e){const r=this.has(e);return this.store.delete(e),r}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return this.toParams.toString()}entries(){return this.store.entries()}forEach(e,r){this.toMap().forEach((s,i,a)=>{e.apply(r,[s,i,a])})}get(e){return this.store.get(e)??void 0}has(e){return this.store.has(e)}keys(){return this.store.keys()}set(e,r){return this.store.set(e,r),this}get size(){return this.store.size}values(){return this.store.values()}toHref(){return this.toUrl().href}toParams(){return this.store}toString(){return this.store.toString()}toUrl(){const e=new URL(window.location.href);return e.search=this.toString(),e}toMap(){return new Map(this.store)}}const Pi=Hr(S({browsed_at:et(h()),item_number:et(h()),product_id:et(u()),purchased_at:et(h()),remote_id:et(u()),timestamp:et(h())})),Ai=k(Pi),vl=J(u(),Ai);function Ei(t,e){return bl(vc(t,e),e)}function bl(t,e){return t===-1?e:hc(t,1,e)}function Et(t){return{browsed_at:t.browsed_at??t.timestamp??void 0,item_number:t.item_number??void 0,product_id:t.product_id??void 0,purchased_at:t.purchased_at??void 0,remote_id:t.remote_id??void 0,timestamp:void 0}}function Ti(t,e,r){if(!Sl(t))throw t;const s=r==="first"?wl:_l;return e.length===1?e:s(e)}function Sl(t){return t instanceof Error&&t.name===El}function wl(t){return t.slice(1)}function _l(t){return t.slice(0,-1)}function kl(t){return Er(/,/g,"",t)}function xi(t){return P(Pl,t)}function Ci(t){return P(Il,t)}const Oi=b(u(),y(kl)),Il=n(b(k(b(Q({...Pi.entries,remote_id:n(x(Oi),void 0)}),y(Et))),We(t=>Cn(t.remote_id))),[]),Pl=n(b(k(Oi),We(t=>Cn(t)),ge(t=>Et({remote_id:t}))),[]);function Al(t,e,r){const s=new Map,i=new Map;return t.forEach(a=>{if(Qr.has(a.type)){const{browsed:o=[],purchased:c=[]}=a.params;xi(o).forEach(l=>s.set(l.remote_id,l)),xi(c).forEach(l=>i.set(l.remote_id,l))}}),Ci(e).forEach(a=>s.set(a.remote_id,a)),Ci(r).forEach(a=>i.set(a.remote_id,a)),{browsed:Array.from(s.values()),purchased:Array.from(i.values())}}const El="QuotaExceededError",Qr=new Set(["anchor-items-gallery","cross-sell","dynamic-galleries","styled-for-you"]);class ar{static new(e,r,s={}){return new this(e,r,s)}constructor(e,r,s){this.client=e,this.store=r,this.limit=s.limit??100}client;limit;store;get(){return(this.getAll()[this.client]||[]).map(Et)}set(e){const{item_number:r,product_id:s,remote_id:i}=e;if(wo(Ie,[r,s,i])){A.warn("No item id values provided.");return}const a={item_number:r,remote_id:i,product_id:s,browsed_at:Date.now()},o=this.getAll(),c=this.get(),l=Ei(m=>m.remote_id===a.remote_id,c).concat([a]).slice(-this.limit).map(Et);o[this.client]=l;try{this.store.setBrowsedItems(JSON.stringify(o))}catch(m){o[this.client]=Ti(m,l,"first"),this.store.setBrowsedItems(JSON.stringify(o))}}getAll(){const e=this.store.getBrowsedItems();if(!e)return{};const r=ct(e),s=we(vl,r);return s.success?s.output:{}}}class or{static new(e,r){return new this(e,r)}constructor(e,r){this.client=e,this.store=r,this.key=`${ki}.${e}`}client;key;store;get(){const e=this.store.get(this.key);if(!e)return[];const r=ct(e),s=we(Tl,r);if(s.success)return s.output.map(a=>({remote_id:a}));const i=we(Ai,r);return i.success?i.output.map(Et):[]}set(e){const r=e.map(a=>({remote_id:a,purchased_at:Date.now()})),s=r.reduce((a,o)=>Ei(c=>c.remote_id===o.remote_id,a),this.get()),i=r.concat(s).slice(0,100);try{this.store.set(this.key,JSON.stringify(i))}catch(a){const o=Ti(a,i,"last");this.store.set(this.key,JSON.stringify(o))}return this}delete(){return this.store.delete(this.key),this}}const Tl=k(u());function Ri(t){const e=t?.split(".").filter(Boolean)||[];if(ul(e)){const r=Rc(e,window);if(xn(r)||Tn(r))return String(r)}}var xl=Array.isArray,Cl=Object.defineProperty;const ut=()=>{};function Di(t){for(var e=0;e{e===lt&&Rl()})}lt.push(t)}function Ml(t){try{return t()}finally{}}let Jr=!1;function jl(t){var e=Jr;try{return Jr=!0,t()}finally{Jr=e}}function Ll(t,e,r,s={}){function i(a){if(s.capture||Ul.call(e,a),!a.cancelBubble)return Ml(()=>r?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Dl(()=>{e.addEventListener(t,i,s)}):e.addEventListener(t,i,s),i}function Fl(t,e,r,s={}){var i=Ll(e,t,r,s);return()=>{t.removeEventListener(e,i,s)}}let Mi=null;function Ul(t){var e=this,r=e.ownerDocument,s=t.type,i=t.composedPath?.()||[],a=i[0]||t.target;Mi=t;var o=0,c=Mi===t&&t.__root;if(c){var l=i.indexOf(c);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var m=i.indexOf(e);if(m===-1)return;l<=m&&(o=l)}if(a=i[o]||t.target,a!==e){Cl(t,"currentTarget",{configurable:!0,get(){return a||r}});try{for(var f,p=[];a!==null;){var v=a.assignedSlot||a.parentNode||a.host||null;try{var w=a["__"+s];if(w!=null&&(!a.disabled||t.target===a))if(xl(w)){var[_,...I]=w;_.apply(a,[t,...I])}else w.call(a,t)}catch(E){f?p.push(E):f=E}if(t.cancelBubble||v===e||v===null)break;a=v}if(f){for(let E of p)queueMicrotask(()=>{throw E});throw f}}finally{t.__root=e,delete t.currentTarget}}}function ji(t,e,r){if(t==null)return e(void 0),r&&r(void 0),ut;const s=jl(()=>t.subscribe(e,r));return s.unsubscribe?()=>s.unsubscribe():s}const ht=[];function $l(t,e){return{subscribe:Ve(t,e).subscribe}}function Ve(t,e=ut){let r=null;const s=new Set;function i(c){if(Ol(t,c)&&(t=c,r)){const l=!ht.length;for(const m of s)m[1](),ht.push(m,t);if(l){for(let m=0;m{s.delete(m),s.size===0&&r&&(r(),r=null)}}return{set:i,update:a,subscribe:o}}function ql(t,e,r){const s=!Array.isArray(t),i=s?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=e.length<2;return $l(r,(o,c)=>{let l=!1;const m=[];let f=0,p=ut;const v=()=>{if(f)return;p();const _=e(s?m[0]:m,o,c);a?o(_):p=typeof _=="function"?_:ut},w=i.map((_,I)=>ji(_,E=>{m[I]=E,f&=~(1<{f|=1<e=r)(),e}function Hl(t){const e=Ve(t?.clientHeight||0),r=Ve(t?.clientWidth||0);let s;const i=new ResizeObserver(a=>{const[{contentRect:o}]=a;s=window.requestAnimationFrame(()=>{e.set(o.height),r.set(o.width)})});return{heightStore:dt(e),widthStore:dt(r),get stores(){return{heightStore:this.heightStore,widthStore:this.widthStore}},get height(){return st(this.heightStore)},get width(){return st(this.widthStore)},observe(){return i.observe(t),this},unobserve(){return i.unobserve(t),this.cancelAnimationFrame(),this},disconnect(){return i.disconnect(),this.cancelAnimationFrame(),this},cancelAnimationFrame(){return s!==void 0&&window.cancelAnimationFrame(s),this}}}class Bl{onResize;onTouch;screenHeightStore;screenWidthStore;touchConfirmedStore;touchEnabledStore;resizeAbortController=new AbortController;touchAbortController=new AbortController;animationFrameRequestId=void 0;constructor({onResize:e,onTouch:r,screen_height:s=document.documentElement.clientHeight,screen_width:i=document.documentElement.clientWidth,touch_device:a=Wl(window.navigator.userAgent),touch_device_confirmed:o=!1}={}){this.onResize=e,this.onTouch=r,this.screenHeightStore=Ve(s),this.screenWidthStore=Ve(i),this.touchConfirmedStore=Ve(o),this.touchEnabledStore=Ve(a),this.animationFrameRequestId=void 0}get state(){return{screen_height:this.screen_height,screen_width:this.screen_width,touch_device:this.touch_device,touch_device_confirmed:this.touch_device_confirmed}}get stores(){return{screenHeightStore:dt(this.screenHeightStore),screenWidthStore:dt(this.screenWidthStore),touchConfirmedStore:dt(this.touchConfirmedStore),touchEnabledStore:dt(this.touchEnabledStore),viewportStore:ql([this.screenHeightStore,this.screenWidthStore],([e,r])=>({screen_height:e,screen_width:r}))}}get screen_height(){return st(this.screenHeightStore)}set screen_height(e){this.screenHeightStore.set(e)}get screen_width(){return st(this.screenWidthStore)}set screen_width(e){this.screenWidthStore.set(e)}get touch_device(){return st(this.touchEnabledStore)}set touch_device(e){this.touchEnabledStore.set(e)}get touch_device_confirmed(){return st(this.touchConfirmedStore)}set touch_device_confirmed(e){this.touchConfirmedStore.set(e)}addEventListeners(){return this.addTouchListener().addResizeListener()}removeEventListeners(){return this.touchAbortController.abort(),this.resizeAbortController.abort(),this.cancelAnimationFrame(),this}cancelAnimationFrame(){this.animationFrameRequestId&&window.cancelAnimationFrame(this.animationFrameRequestId)}addTouchListener(){return window.addEventListener("touchstart",()=>{this.touch_device=!0,this.touch_device_confirmed=!0,this.onTouch?.(this.touch_device),this.touchAbortController.abort()},{signal:this.touchAbortController.signal}),this}addResizeListener(){return window.addEventListener("resize",()=>{this.animationFrameRequestId=window.requestAnimationFrame(()=>{const{clientHeight:e,clientWidth:r}=document.documentElement;this.screen_height!==e&&(this.screen_height=e),this.screen_width!==r&&(this.screen_width=r),this.onResize?.({screen_width:this.screen_width,screen_height:this.screen_height})})},{signal:this.resizeAbortController.signal}),this}}let Tt;function Nl(){if(Tt!==void 0)return Tt;const t=window.navigator,e=t.vendor,r=typeof window.opr<"u",s=t.userAgent.indexOf("Edge")>-1;return t.userAgent.match("CriOS")?(Tt=!1,!1):e==="Google Inc."&&r===!1&&s===!1?(Tt=!0,!0):(Tt=!1,!1)}function Wl(t){return Gl()||zl(t)}function zl(t){return t.includes("iPhone")||t.includes("iPad")||t.includes("Android")||t.includes("Touch")}function Gl(){const t=navigator.maxTouchPoints>0,e=window.matchMedia&&window.matchMedia("(any-pointer: fine)").matches;return t&&!e}function Vl(){const t=window.navigator.userAgent;return t.includes("Firefox")?"Firefox":t.includes("SamsungBrowser")?"Samsung Internet":t.includes("Opera")||t.includes("OPR")?"Opera":t.includes("Trident")?"Internet Explorer":t.includes("Edge")?"Edge (Legacy)":t.includes("Edg")?"Edge (Chromium)":t.includes("Chrome")?"Chrome":t.includes("Safari")?"Safari":"unknown"}function Kl(){return document.referrer}var xt=(t=>(t.caES="ca-ES",t.csCZ="cs-CZ",t.daDK="da-DK",t.deAT="de-AT",t.deBE="de-BE",t.deCH="de-CH",t.deDE="de-DE",t.deLU="de-LU",t.elGR="el-GR",t.enAT="en-AT",t.enAU="en-AU",t.enBE="en-BE",t.enBG="en-BG",t.enCA="en-CA",t.enCH="en-CH",t.enCZ="en-CZ",t.enDE="en-DE",t.enDK="en-DK",t.enES="en-ES",t.enEU="en-EU",t.enFI="en-FI",t.enFR="en-FR",t.enGB="en-GB",t.enHR="en-HR",t.enHU="en-HU",t.enID="en-ID",t.enIE="en-IE",t.enIL="en-IL",t.enIN="en-IN",t.enJP="en-JP",t.enLU="en-LU",t.enMY="en-MY",t.enNL="en-NL",t.enNO="en-NO",t.enPH="en-PH",t.enPT="en-PT",t.enRO="en-RO",t.enSE="en-SE",t.enSG="en-SG",t.enSI="en-SI",t.enSK="en-SK",t.enUS="en-US",t.enVN="en-VN",t.enZA="en-ZA",t.esES="es-ES",t.esMX="es-MX",t.fiFI="fi-FI",t.frBE="fr-BE",t.frCA="fr-CA",t.frCH="fr-CH",t.frFR="fr-FR",t.frLU="fr-LU",t.huHU="hu-HU",t.isIS="is-IS",t.itCH="it-CH",t.itIT="it-IT",t.jaJP="ja-JP",t.nlBE="nl-BE",t.nlNL="nl-NL",t.noNO="no-NO",t.plPL="pl-PL",t.ptPT="pt-PT",t.svSE="sv-SE",t.thTH="th-TH",t.trTR="tr-TR",t.zhTW="zh-TW",t.enKR="en-KR",t.koKR="ko-KR",t.enHK="en-HK",t.enCN="en-CN",t.zhHansCN="zh-Hans-CN",t.zhHantTW="zh-Hant-TW",t))(xt||{}),Li=(t=>(t.AUD="AUD",t.BGN="BGN",t.CAD="CAD",t.CHF="CHF",t.CZK="CZK",t.DKK="DKK",t.EUR="EUR",t.GBP="GBP",t.HRK="HRK",t.ILS="ILS",t.ISK="ISK",t.INR="INR",t.JPY="JPY",t.MXN="MXN",t.NOK="NOK",t.PLN="PLN",t.RON="RON",t.SEK="SEK",t.TRY="TRY",t.USD="USD",t.ZAR="ZAR",t))(Li||{});const Ql={"ca-ES":"EUR","cs-CZ":"CZK","da-DK":"DKK","de-AT":"EUR","de-BE":"EUR","de-CH":"CHF","de-DE":"EUR","de-LU":"EUR","el-GR":"EUR","en-AT":"EUR","en-AU":"AUD","en-BE":"EUR","en-BG":"BGN","en-CA":"CAD","en-CH":"CHF","en-CN":"USD","en-CZ":"CZK","en-DE":"EUR","en-DK":"DKK","en-ES":"EUR","en-EU":"EUR","en-FI":"EUR","en-FR":"EUR","en-GB":"GBP","en-HK":"USD","en-HR":"HRK","en-HU":"EUR","en-ID":"USD","en-IE":"EUR","en-IL":"ILS","en-IN":"INR","en-JP":"JPY","en-KR":"USD","en-LU":"EUR","en-MY":"USD","en-NL":"EUR","en-NO":"NOK","en-PH":"USD","en-PT":"EUR","en-RO":"RON","en-SE":"SEK","en-SG":"USD","en-SI":"EUR","en-SK":"EUR","en-US":"USD","en-VN":"USD","en-ZA":"ZAR","es-ES":"EUR","es-MX":"MXN","fi-FI":"EUR","fr-BE":"EUR","fr-CA":"CAD","fr-CH":"CHF","fr-FR":"EUR","fr-LU":"EUR","hu-HU":"EUR","is-IS":"ISK","it-CH":"CHF","it-IT":"EUR","ja-JP":"JPY","ko-KR":"USD","nl-BE":"EUR","nl-NL":"EUR","no-NO":"NOK","pl-PL":"PLN","pt-PT":"EUR","sv-SE":"SEK","th-TH":"USD","tr-TR":"TRY","zh-Hans-CN":"USD","zh-Hant-TW":"USD","zh-TW":"USD"};function Jl(t){return Ql[t]??"USD"}function Xr(t,e="en-US",{hideDoubleZeroCents:r}={}){if(typeof t=="string")return t;const s=t,i=Xl(e);r&&Zl(s)&&(i.maximumFractionDigits=0,i.minimumFractionDigits=0);try{return new Intl.NumberFormat(e,i).format(s)}catch(a){return A.warn(`Stylitics locale ${e} was not set properly. Defaulting to en-US`,a),Xr(s,"en-US",{hideDoubleZeroCents:r})}}function Xl(t){const e={style:"currency",currency:Jl(t)};return t==="fr-CA"&&Nl()&&(e.currencyDisplay="narrowSymbol"),e}function Zl(t){return t%1===0}function Fi(t){return Zu(t)}var Oe=(t=>(t.slideout="slideout",t.flip="flip",t.crossfade="crossfade",t.modal="modal",t.click="click",t.hover="hover",t))(Oe||{});const Ui=b(u(),Kn(["md5"])),$i=b(le([u(),h()]),y(String)),Yl=n(g(b($i,Zt())),void 0),eh=n(g(b(le([Ui,b($i,Zt(),y(Fi))]))),void 0),qi=R(["_self","_blank","new-tab","same-tab"]),th=R(["account","cart","checkout","clp","gallery","homepage","mini-cart","order-confirmation","outfit-landing-page","pdp","wishlist"]),Hi=R(["colorway","sku"]),be=R(["h1","h2","h3","h4","h5","h6"]),rh={"new-tab":"_blank","same-tab":"_self",_blank:"_blank",_self:"_self"},Bi=y(t=>rh[t]);var Ni=(t=>(t.boxyBlack="boxyBlack",t.boxyRed="boxyRed",t.brightMinimal="brightMinimal",t.graySophisticated="graySophisticated",t.giftBox="giftBox",t.raisedGray="raisedGray",t.softMinimal="softMinimal",t.tropicalGradient="tropicalGradient",t.whiteMinimalist="whiteMinimalist",t))(Ni||{});const Wi=n(le([$(Ni),b(R([2,"2","blackMinimalist"]),y(()=>"boxyBlack")),b(R([3,"3","colorful"]),y(()=>"whiteMinimalist")),b(R([6,"6","whiteBlackSupport"]),y(()=>"softMinimal")),b(R([8,"8"]),y(()=>"graySophisticated"))]),t=>(A.warn("Invalid Label Style provided to schema",t?.value),"boxyBlack"));xt.enUS;const sh=n(b(u(),Xt(t=>(oi($(xt),t).success||A.warn(`received an unrecognized locale of "${t}". We will use the provided value, but please ensure it is correct.`),!0))),xt.enUS),he=n(k(u()),[]),ie=b(n(h(),1),y(t=>Math.max(1,t))),nh=n(g(th),t=>(t?.issues?.[0]&&q(t?.value)&&A.warn("received an unrecognized placement value. We will use the provided value, but please ensure it is correct."),t?.value)),ih=b(n(g(le([b(h(),y(String)),u()])),void 0),y(_n(Bc,zt,String))),ah=n(b(le([d(),J(u(),b(le([u(),k(u())]),y(On)))]),y(t=>typeof t=="boolean"?t?{__true__:[]}:{__false__:[]}:t)),{}),oh=n(g(R(["frequency","purchases","views"])),void 0),zi=n(h(),100),cr=n(g(b(u(),Jn("%v","Stylitics Validation Error: No dynamic value placeholder"))),void 0),Gi=n(R(["auto","on-hover"]),"auto"),K=b(S({addToCartCTA:n(u(),"Add to Cart"),addToCartDescription:n(u(),"Select Size"),clickItemLinkDesktop:b(n(qi,"_blank"),Bi),clickItemLinkMobile:b(n(qi,"_self"),Bi),clientOriginalImages:n(d(),!1),clientUserId:n(g(le([h(),u()])),void 0),combinedDiscountPercentage:n(d(),!1),ctaButtonContrast:n(d(),!1),dataSource:n(yi,"outfits"),desktopHorizontalScroll:n(d(),!1),dialogAsModal:n(d(),!0),editorialAnchorItem:n(d(),!1),enableStorage:n(d(),!0),enableTracking:n(d(),!0),env:n($(z),z.production),gutterWidth:n(h(),16),hideAnchorItem:n(d(),!1),hideDoubleZeroCents:n(d(),!1),item_number_type:n(g(Hi),void 0),item_number:ih,itemDetailsModalHeader:n(u(),"Product List"),itemDiscountImageLabel:n(d(),!1),itemDiscountPercentage:n(d(),!1),itemDiscountText:n(g(u()),void 0),itemDiscountThreshold:n(h(),5),itemLinkCTA:n(u(),"Shop"),labelStyle:n(g(Wi),void 0),locale:sh,maxResults:n(h(),10),minResults:n(h(),1),mixAndMatch:n(d(),!1),mixAndMatchRow:n(d(),!1),modalHeading:n(u(),"Shop This Look"),modalHeadingLevel:n(be,"h4"),moduleHeading:n(g(u()),void 0),moduleHeadingLevel:n(g(be),void 0),moduleSubHeading:n(g(u()),void 0),nextOutfitPeek:n(h(),0),outfitDiscountPercentage:n(d(),!1),outfitDiscountText:n(u(),"Up to"),outfitDiscountThreshold:n(h(),20),outfitPromoIndicators:n(d(),!1),outfitPromoThreshold:n(h(),3),placement:nh,previousOutfitPeek:n(h(),0),profileId:n(g(le([h(),u()])),void 0),profileIdPath:n(g(u()),void 0),promoIndicators:ah,regulatedDiscountPercentage:n(d(),!1),responsive:n(k(U([h(),S({})])),rl),roundingStyle:n(g($(tt)),void 0),salesPriceStyle:n($(Z),Z.strikethrough),showCarouselDots:n(d(),!1),sizeDropdown:n(d(),!1),socialProofItemLabel:cr,socialProofOutfitLabel:cr,socialProofThreshold:zi,tags:n(g(u()),void 0),trackingEnv:n($(z),z.production),useFixture:n(d(),!1),videoPlayMode:Gi}),y(L)),ch=D(K);function Vi(){return le([u(),...uh().options])}function uh(){return le([Pt(Element),Pt(Document),Pt(ShadowRoot)])}function j(t){return P(b(n(le([b(J(u(),T()),Xt(lh),y(hh)),J(u(),T())]),{}),y(ph),y(dh),y(mh),y(fh)),t)}function lh(t){return Object.keys(t).some(r=>Ki.has(r))}function hh(t){return Object.entries(t).reduce((e,[r,s])=>{const i=Ki.has(r)&&typeof s=="object"?s:{[r]:s};return{...e,...i}},{})}function dh(t){const e={...t},r=je(null,d(),e.disableMnM),s=je(null,d(),e.mixAndMatch);return q(s)?e.mixAndMatch=s:q(r)&&(e.mixAndMatch=!r),delete e.disableMnM,e}function mh(t){const e={...t},r=je(null,d(),e.disableLocalStorageAndCookies),s=je(null,d(),e.enableStorage);return q(s)?e.enableStorage=s:q(r)&&(e.enableStorage=!r),delete e.disableLocalStorageAndCookies,e}function fh(t){const e={...t},r=je(null,d(),e.doNotTrack),s=je(null,d(),e.enableTracking);return q(s)?e.enableTracking=s:q(r)&&(e.enableTracking=!r),delete e.doNotTrack,e}function ph(t){const e={...t},r=je(null,h(),e.minResults)??je(null,h(),e.min),s=je(null,h(),e.maxResults)??je(null,h(),e.max);return q(r)&&(e.minResults=r),q(s)&&(e.maxResults=s),delete e.min,delete e.max,e}const Ki=new Set(["analytics","api","customer","display","internal","navigation","price","text"]);function L(t){const e={...t},r=P(Yl,t.clientUserId??t.profileId??Ri(t.profileIdPath));return r&&(e.clientUserId=r),e}function _e(t){return q(t.item_number)||q(t.tags)}function H(t){return{...t,maxResults:Math.max(t.minResults,t.maxResults)}}function gh(t){return Yt(S({item_number:qr(K.entries.item_number)}),t)?"item_number":Yt(S({tags:qr(K.entries.tags)}),t)?"tags":"unknown"}function Ct(t){return t?.enableStorage!==!1}function ur(t){return t?.enableTracking!==!1}function Qi(t,e){return e===void 0?t:(yh[e]||(s=>s))(t)}const yh={floor:Math.floor,ceiling:Math.ceil,round:Math.round};function vh(t,e){return Sh(t,e)&&(e??0)>0}function bh(t,e){return typeof t=="number"&&t>0&&t>(e??0)}function Sh(t,e){return!bh(t,e)}function wh(t,e){return typeof e=="number"&&e>0&&e<(t||1/0)}const Zr={"Indoor Dinnerware":"Dinnerware",Flatware:"Flatware","Table Runners & Tablecloth":"Tabletop Decor","Placemats & Chargers":"Tabletop Decor","Napkins & Napkin Rings":"Tabletop Decor","Indoor Drinkware":"Everyday Glassware","Indoor Stemware":"Everyday Glassware",Serveware:"Servingware"},Yr={"Comforters & Duvets":"Comforters & Duvets","Duvet Covers":"Comforters & Duvets","Bedding Sets":"Comforters & Duvets","Quilts & Coverlets":"Quilts & Coverlets",Sheets:"Sheets","Pillowcases & Shams":"Sheets","Indoor Pillows":"Indoor Pillow","Pillow Inserts":"Pillow Insert","Mattresses & Bases":"Mattress Pads & Toppers"};({...Yr,...Zr});const _h=b(S({price_localized:At(),price_value:At(),price:x(h()),sale_price_localized:At(),sale_price_value:At(),sale_price:x(h())}),y(({price:t,sale_price:e})=>({price:t,salePrice:e,priceLocalized:void 0,salePriceLocalized:void 0}))),kh=b(S({price_value:x(h()),price:x(u()),sale_price_value:x(h()),sale_price:x(u())}),y(({price_value:t,sale_price_value:e})=>({price:t,salePrice:e,priceLocalized:void 0,salePriceLocalized:void 0}))),Ih=b(S({price_localized:x(u()),price:x(h()),sale_price_localized:x(u()),sale_price:x(h())}),y(({price:t,sale_price:e,price_localized:r,sale_price_localized:s})=>({price:t,salePrice:e,priceLocalized:r,salePriceLocalized:s}))),Ph=le([Ih,kh,_h]),es=n(S({height:h(),width:h(),x:h(),y:h(),z:h()}),()=>({x:0,y:0,z:0,height:0,width:0})),Ji=n(S({image_height:h(),image_width:h(),outfit_height:h(),outfit_width:h()}),()=>({image_height:0,image_width:0,outfit_height:0,outfit_width:0})),Xi=n(Q({product_count:n(g(h()),void 0)}),{product_count:void 0}),Ah=n(le([tr(),b(u(),Yn(),Zn(),y(t=>t.startsWith("#")?t:`#${t}`),Qn(),y(t=>t.length===4?"#"+t.split("").slice(1).map(e=>e+e).join(""):t))]),void 0),nt=Q({_exp_suppressed_promotions:n(k(u()),[]),"collage-dimensions":Ji,"line1-name":x(u()),"line2-name":x(u()),account_id:h(),account_username:u(),affiliate_link:x(u()),base_image_url:u(),brand:x(u()),buy_url:g(u()),category:u(),client_original_image_url:x(u()),color_hex:x(Ah),color:x(u()),coords:es,cover_image_url:x(u()),department:u(),frequency:n(h(),0),gender:u(),image_url:u(),item_id:h(),item_promo_texts:n(k(u()),[]),large_image_url:u(),lookbook_image_url:x(u()),name:u(),original_image_url:x(u()),other_client_item_ids:Xi,pattern:x(u()),position:g(h()),price_localized:g(T()),price_value:g(T()),price:g(T()),product_id:x(u()),promo_text:x(u()),promotions:n(k(u()),[]),purchases:n(h(),0),remote_id:u(),retailer_category:x(u()),retailer_color:x(u()),retailer_material:x(u()),retailer_patterns:n(k(u()),[]),retailer_style:x(u()),retailer:x(u()),sale_price_localized:g(T()),sale_price_value:g(T()),sale_price:g(T()),sku:x(u()),skus:n(k(u()),[]),small_image_url:u(),social_proof_label:g(u()),stocked:n(d(),!0),style:u(),tags:n(k(u()),[]),transparent_image_url:g(u()),username:u(),views:n(h(),0)}),ts=Q({_exp_suppressed_label:g(u()),account_id:h(),account_username:u(),ai_generated_imagery:n(d(),!1),background:g(T()),base_image_url:u(),caption:x(u()),cover_image_url:x(u()),id:h(),image_url:u(),item_ids:n(k(h()),[]),items_count:g(h()),items:Kr(nt),label:g(u()),large_image_url:g(u()),lookbook_caption:x(u()),lookbook_image_url:u(),lookbook_title:x(u()),nbr_oos:g(h()),"on-model-image":g(d(),!1),outfit_id:g(h()),outfit_version_id:g(h()),position:g(h()),primary_remote_id:g(u()),primary_requested_id:g(u()),primary_stylitics_item_id:g(h()),relative_boost:g(u()),social_proof_label:g(u()),static_image:x(d()),tags:n(k(u()),[]),title:g(u()),transparent_image_url:g(u()),username:u()}),Eh=Q({account_username:u(),affiliate_link:x(u()),brand:x(u()),category:u(),client_original_image_url:x(u()),"collage-dimensions":Ji,coords:es,gender:u(),id:h(),image_url:u(),item_id:h(),large_image_url:u(),name:u(),other_client_item_ids:Xi,price_localized:g(T()),price_value:g(T()),price:g(T()),product_id:x(u()),promotions:k(u()),remote_id:u(),retailer_style:x(u()),retailer:x(u()),sale_price_localized:g(T()),sale_price_value:g(T()),sale_price:g(T()),sku:x(u()),skus:n(k(u()),[]),small_image_url:u(),style:u(),username:u(),_exp_suppressed_promotions:n(k(u()),[]),"line1-name":x(u()),"line2-name":x(u()),account_id:x(h()),base_image_url:n(u(),""),buy_url:g(u()),color_hex:x(u()),color:x(u()),cover_image_url:x(u()),department:n(u(),""),frequency:n(h(),0),item_promo_texts:n(k(u()),[]),lookbook_image_url:n(u(),""),original_image_url:x(u()),pattern:n(u(),""),position:x(h()),promo_text:x(u()),purchases:n(h(),0),retailer_category:x(u()),retailer_color:x(u()),retailer_material:x(u()),retailer_patterns:n(k(u()),[]),stocked:n(d(),!0),tags:n(k(u()),[]),transparent_image_url:g(u()),views:n(h(),0)});function lr(t){return b(nt,y(e=>({...e,...it(e,t),collage_dimensions:e["collage-dimensions"],__type:"normalized-item"})))}function hr(t){return b(Q({...ts.entries,items:b(Kr(lr(t)),y(e=>{const{socialProofItemLabel:r,socialProofAction:s,socialProofThreshold:i}=t;return r&&s&&i?e.map((a,o)=>({...ra(a,{socialProofItemLabel:r,socialProofAction:s,socialProofThreshold:i}),index:o})):e.map((a,o)=>({...a,index:o}))}))}),y(e=>({...e,onModelImage:e["on-model-image"]})))}function Th(t){return b(Eh,y(e=>({...e,...it(e,t),collage_dimensions:e["collage-dimensions"],__type:"normalized-item"})))}function it(t,e){return P(b(Ph,y(r=>xh(r,e))),t)}function xh(t,e){{const r=q(t.salePrice)?Qi(t.salePrice,e.roundingStyle):void 0,s=q(t.price)?Qi(t.price,e.roundingStyle):wh(t.price,r)?r:void 0,i=q(t.priceLocalized)?t.priceLocalized:q(s)?Xr(s,e.locale,e):void 0,a=q(t.salePriceLocalized)?t.salePriceLocalized:q(r)?Xr(r,e.locale,e):void 0;return vh(s,r)?{price:t.salePrice,salePrice:void 0,roundedPrice:r,roundedSalePrice:void 0,formattedPrice:a,formattedSalePrice:void 0}:{price:t.price,salePrice:t.salePrice,formattedPrice:i,formattedSalePrice:a,roundedPrice:s,roundedSalePrice:r}}}const Zi=3,Yi=6,Ch=yn(Ar(-1/0,"browsed_at")),Oh=yn(Ar(-1/0,"purchased_at")),ea=Xc(Fc(Zi,Yi+1)),ta=Dc(ea,["outfits","length"]),Rh=zo([ta,q]),rs={minResults:Zi,maxResults:Yi,byBrowsedAtDescending:Ch,byPurchasedAtDescending:Oh,includedInRange:ea,outfitLengthIsValid:ta,isValidAnchorItem:Rh};function mt(t,{minResults:e=1,emitWarnings:r=!1}){return t.length>=e?t:(r&&A.warn("API response does not satisfy the min results parameter."),[])}function ra(t,e){const{socialProofItemLabel:r,socialProofThreshold:s,socialProofAction:i}=e;return{...t,...t[i]>=s&&{social_proof_label:r.replace("%v",t[i].toString())}}}function ss(t,e){return P(Dh(e),t)}function Dh(t){return b(S({"upsell-items":b(Mh(t))}),y(e=>({upsellItems:e["upsell-items"]})))}function Mh(t){const e=new Set;return b(k(jh),y(r=>mt(r,t)),We(r=>e.has(r.remote_id)?!1:(e.add(r.remote_id),!0)),ge((r,s)=>({...r,...it(r,t),index:s})))}const jh=Q(ze(nt,["account_id","account_username","affiliate_link","base_image_url","brand","category","client_original_image_url","color_hex","color","department","gender","image_url","item_id","large_image_url","lookbook_image_url","name","other_client_item_ids","pattern","price_localized","price","product_id","promotions","remote_id","retailer_category","retailer_color","retailer_style","retailer","sale_price_localized","sale_price","sku","skus","small_image_url","stocked","style","tags","transparent_image_url","username"]).entries);function sa(t,e){return P(Lh(e),t)}function Lh(t){const e=Fh(t),r=J(u(),na);return b(S({complementary_items:g(e,{}),requested_items:g(J(u(),Hr(na)),{})}),y(({complementary_items:s,requested_items:i})=>{const a={anchorItem:void 0,departments:{}};if(!Yt(r,i)){const[f]=Object.keys(i);return m(`requested item with id "${f}" is not available.`),a}const o=Object.values(s);if(o.length===0)return m("no complementary_items present."),a;const[c]=o,l=Object.entries(c);if(l.length===0)return m("no departments in complementary_items."),a;for(const[f,p]of l)if(p.length===0)return m(`"${f}" has no items.`),a;function m(f){t.emitWarnings&&A.warn(f)}return{anchorItem:Object.values(i)?.[0],departments:c}}))}function Fh(t){return J(u(),J(u(),b(k(Uh),ge((e,r)=>({...e,...it(e,t),index:r})))))}const Uh=Q({...ze(nt,["affiliate_link","brand","category","client_original_image_url","department","image_url","item_id","name","price","product_id","remote_id","sale_price","style"]).entries,guided:d(),index:g(h()),promotions:g(k(u()),[]),relevance:h()}),na=Q({account_id:h(),affiliate_link:u(),image_url:u(),item_id:h(),remote_id:u()});function ns(t,e){return P($h(e),t)}function $h(t){return b(S({bundles:b(k(qh(t)),y(e=>mt(e,t)))}),y(e=>({outfits:e.bundles})))}function qh(t){return Q({...Nh.entries,items:b(k(Hh(t)),ge((e,r)=>({...e,index:r})))})}function Hh(t){return b(ia,y(e=>({...e,...it(e,t)})))}const ia=ze(nt,["account_username","affiliate_link","base_image_url","color_hex","item_id","name","other_client_item_ids","price_localized","price","promotions","remote_id","sale_price_localized","sale_price","stocked"]),aa=Q({id:h(),name:u(),pairing_message:u()}),Bh=Q({browsed_items:g(k(aa),[]),purchased_items:g(k(aa),[]),"cold-start-vector":g(d(),!1)}),Nh=Q({...ze(ts,["account_id","account_username","base_image_url","cover_image_url","id","image_url","large_image_url","lookbook_image_url","primary_remote_id","primary_stylitics_item_id","transparent_image_url","username"]).entries,items:k(ia),personalization:n(Bh,{browsed_items:[],purchased_items:[],"cold-start-vector":!1})}),ae=S({cssExperiment:g(u()),cssTheme:g(u()),enableLogging:n(d(),!1),itemDiscountImage:n(d(),!1),itemImageHover:n(d(),!1),itemInfoStatic:n(d(),!1),itemInfoStaticMobile:n(d(),!1),itemLinkCta:n(g(u()),void 0),labelPresenceTest:n(g(rt),void 0),macysCategory:n(d(),!1),macysCategoryAll:n(d(),!1),mixAndMatchCollage:n(d(),!1),mobileGallery:n(d(),!1),mobileItemsExposed:n(d(),!1),mobileModalList:n(d(),!1),originalItemOrder:n(d(),!1),plusIcon:n(d(),!1),productListType:n(g($(Oe)),void 0),recipeInfoPresenceTest:n(g(rt),void 0),setCookie:n(d(),!1),shopButtonExpanded:n(d(),!1),shopButtonLarge:n(d(),!1),shopButtonPosition:n(g(ir),void 0),shopSimilarHotspots:n(d(),!1),smallItemImage:n(d(),!1),testPresence:n(g(rt),void 0),v3Classic:n(d(),!1),v3Hotspots:n(d(),!1),verticalAnchorGrid:n(d(),!1),widgetVariant:n(g(Si),void 0),...K.entries}),oa=b(S({...ae.entries,browsed:he,maxBrowsedItems:n(h(),10),maxPurchasedItems:n(h(),10),purchased:he,responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:3}],[550,{columns:3}],[730,{columns:4}],[900,{columns:5}]]),sessionId:n(u(),""),itemDetailsModalHeader:n(u(),"Product List"),shopThisLookCTA:n(u(),"Shop This Look")}),y(H),y(L)),Wh={defaults:D(S({...oa.entries})),parse:t=>P(oa,j(t))},ca=b(S({...ae.entries,item_number:u(),maxResults:n(N(1),1),minResults:n(N(1),1),addAllToCartCTAPosition:n(R(["bottom","top"]),"bottom"),shoppableAnchorItem:n(d(),!1),showCarouselCardSeparator:n(d(),!0),showCarouselDots:n(d(),!0),salesPriceStyle:n($(Z),Z.strikethrough),addAllToCartCTA:n(u(),"Add All Items to Cart"),modalHeading:n(u(),"Mix & Match"),swapButton:n(u(),"Swap"),swapItemHeading:n(u(),"Swapping")}),y(H),y(L)),zh={defaults:D(S({...ca.entries})),parse:t=>P(ca,j(t))},ua=b(S({...ae.entries,minResults:n(h(),3),cardAspectRatio:n(h(),1.25),carouselAdvancementRate:ie,editorialAspectRatio:n(h(),1),gutterWidth:n(h(),16),isGallery:n(d(),!1),nextOutfitPeek:n(h(),.1),previousOutfitPeek:n(h(),0),productListRevealType:n($(Oe),Oe.slideout),shopTheModelAI:n(d(),!1),showCarouselDots:n(d(),!1),showMobileArrows:n(d(),!1),sizeDropdown:n(d(),!1),mixAndMatchRow:n(d(),!1),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1023,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),backToLookCTA:n(u(),"Back To Look"),seeMoreOptionsCTA:n(u(),"See More Options"),viewDetailsCTA:n(u(),"Shop The Look")}),ye(fe([["item_number"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Gh={defaults:D(S({...ua.entries})),parse:t=>P(ua,j(t))},la=b(S({...ae.entries,apparelOnly:n(d(),!1),maxDepartments:n(h(),5),cardAspectRatio:n(h(),1.5),carouselAdvancementRate:ie,gutterWidth:n(h(),12),imageOnHover:n(d(),!1),isGallery:n(d(),!1),nextOutfitPeek:n(h(),0),showAllDepartments:n(d(),!1),showMobileArrows:n(d(),!0),sizeDropdown:n(d(),!1),sessionId:n(u(),""),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:3}],[640,{columns:4}],[1023,{columns:4}],[1280,{columns:5}],[1536,{columns:5}]]),tablistHeading:n(u(),"Style it with"),tablistHeadingLevel:n(be,"h2")}),y(H),y(L)),Vh={defaults:D(S({...la.entries})),parse:t=>P(la,j(t))},ha=b(ae,y(L)),da={defaults:D(S({...ha.entries})),parse:t=>P(ha,j(t))},ma=b(S({...ae.entries,brand:n(g(u()),void 0),browsed:he,category:n(g(u()),void 0),department:n(g(u()),void 0),from_accounts:n(g(u()),void 0),gender:n(g(u()),void 0),item_number:n(g(u()),void 0),maxItems:n(g(h()),20),maxPrice:n(g(h()),void 0),maxResults:n(h(),20),minPrice:n(g(h()),void 0),minResults:n(h(),3),purchased:he,style:n(g(u()),void 0),tags:n(g(u()),void 0),cardAspectRatio:n(h(),1.6),carouselAdvancementRate:ie,gutterWidth:n(h(),16),imageOnHover:n(d(),!1),layout:n(R(["gallery","horizontal","vertical"]),"horizontal"),nextOutfitPeek:n(h(),.3),previousOutfitPeek:n(h(),0),showCarouselDots:n(d(),!1),showMobileArrows:n(d(),!1),sizeDropdown:n(d(),!1),sessionId:n(u(),""),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:2}],[425,{columns:3}],[640,{columns:4}],[1023,{columns:5}],[1280,{columns:6}],[1536,{columns:7}]])}),y(H),y(L)),Kh={defaults:D(S({...ma.entries})),parse:t=>P(ma,j(t))},fa=b(S({...ae.entries,minResults:n(h(),3),carouselAdvancementRate:ie,dynamicOutfitBackground:n(d(),!1),gutterWidth:n(h(),16),horizontalProductList:n(d(),!1),mixAndMatchRow:n(d(),!1),nextOutfitPeek:n(h(),0),previousOutfitPeek:n(h(),0),showMobileArrows:n(d(),!0),sizeDropdown:n(d(),!1),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1023,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),seeMoreOptionsCTA:n(u(),"See More Options"),viewDetailsCTA:n(u(),"View Details")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Qh={defaults:D(S({...fa.entries})),parse:t=>P(fa,j(t))},pa=b(S({...ae.entries,ids:n(u(),""),minResults:n(h(),3),page:b(n(u(),()=>ga(globalThis?.location?.href??"")),y(ga)),carouselAdvancementRate:ie,gutterWidth:n(h(),16),nextOutfitPeek:n(h(),0),previousOutfitPeek:n(h(),0),browsed:he,purchased:he,sessionId:n(u(),""),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1024,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),viewItemsCTAText:n(u(),"View Details")}),y(H),y(L)),Jh={defaults:D(S({...pa.entries})),parse:t=>P(pa,j(t))};function ga(t){return Er(/^http(s?):\/\//i,"",t)}const ya=b(S({...ae.entries,minResults:n(h(),3),cardAspectRatio:n(h(),1.4),collageAnchorItem:n(d(),!1),editorialAnchorItem:n(d(),!1),editorialFirstAnchorItem:n(d(),!1),gapWidth:n(h(),5),gridPeek:n(d(),!1),gridStarter:n(d(),!1),gutterWidthMobile:n(h(),14),hideAnchorItemCard:n(d(),!1),itemInfoAnimation:n(R(["fade","slide"]),"slide"),itemInfoAnimationDuration:n(h(),200),itemInfoImage:n(d(),!1),itemInfoStatic:n(d(),!1),maxGridSize:n(h(),7),mobileItemsCarousel:n(d(),!1),nextOutfitPeekMobile:n(h(),.05),nonEditorialImages:n(d(),!1),originalItemOrder:n(d(),!1),shopTheModelEditorial:n(d(),!1),showMobileArrows:n(d(),!1),showPlusIcon:n(d(),!1),smallItemScaling:n(d(),!1),squareAspectRatio:n(d(),!1),typeScaledGrid:n(d(),!1),verticalAnchorAspectRatio:n(h(),1.4),verticalAnchorLayout:n(d(),!1),verticalLayout:n(d(),!1),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1023,{columns:3}],[1190,{columns:3}],[1536,{columns:4}]]),counterHeading:n(u(),"Look"),counterHeadingLevel:n(be,"h4"),itemLinkCTA:n(u(),"Shop"),mobileItemsCarouselCTA:n(u(),"Back to Model"),swapCTA:n(u(),"Swap")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Xh={defaults:D(S({...ya.entries})),parse:t=>P(ya,j(t))},va=b(S({...ae.entries,minResults:n(h(),3),cardAspectRatio:n(h(),1.25),carouselAdvancementRate:ie,gutterWidth:n(h(),16),largeItemImage:n(d(),!1),mixAndMatchRow:n(d(),!1),mobileItemsCarousel:n(d(),!1),nextOutfitPeek:n(h(),.1),previousOutfitPeek:n(h(),0),productListRevealType:n($(Oe),Oe.slideout),showMobileArrows:n(d(),!1),sizeDropdown:n(d(),!1),smallItemImage:n(d(),!1),staticItemInfo:n(d(),!1),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[480,{columns:2}],[1023,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),modalHeading:n(u(),"Shop The Look"),seeMoreOptionsCTA:n(u(),"Alternative Options"),viewDetailsCTA:n(u(),"Shop The Look")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Zh={defaults:D(S({...va.entries})),parse:t=>P(va,j(t))},ba=b(S({...ae.entries,minResults:n(h(),1),gutterWidth:n(h(),16),imageAspectRatio:n(h(),1.2),imageOnHover:n(d(),!1),listLayout:n(R(["vertical","horizontal","mobile-gallery","vertical-anchor"]),"horizontal"),mobileVerticalList:n(d(),!1),mobileVisibleCardCount:n(h(),2.5),originalItemOrder:n(d(),!1),shopTheModelAI:n(d(),!1),showPlusIcon:n(d(),!1),sizeDropdown:n(d(),!1),counterDeterminator:n(u(),"of"),counterHeading:n(u(),"look"),counterHeadingLevel:n(be,"h4"),itemLinkCTA:n(u(),""),modalHeading:n(u(),"Similar Items"),modalHeadingLevel:n(be,"h4"),similarItemsButton:n(u(),"Similar Items")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Yh={defaults:D(S({...ba.entries})),parse:t=>P(ba,j(t))},Sa=b(S({...ae.entries,minResults:n(h(),3),hideDoubleZeroCents:n(d(),!0),roundingStyle:n(g($(tt)),tt.ceiling),salesPriceStyle:n($(Z),Z.salesPriceOnly),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1024,{columns:3}]]),itemDetailsModalHeader:n(u(),"Complete the look"),viewDetailsCTA:n(u(),"View entire look")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),ed={defaults:D(S({...Sa.entries})),parse:t=>P(Sa,j(t))},wa=b(S({...ae.entries,outfit_id:b(h(),Fr(1)),salesPriceStyle:n($(Z),Z.salesPriceOnly)}),y(H),y(L)),td={defaults:D(S({...wa.entries})),parse:t=>P(wa,j(t))},_a=b(S({...ae.entries,allowOutOfStock:n(d(),!0),maxPerItem:n(h(),6),minPerItem:n(h(),3),reMatch:n(d(),!1),retryCount:b(n(h(),0),y(mn(0,10))),carouselAdvancementRate:ie,hotspotsOverlay:n(d(),!1),parentSelector:g(u()),shopButtonMargin:n(h(),5),shopButtonExpanded:n(d(),!1),shopButtonPosition:n(ir,"bottom-right"),skipModeration:n(d(),!1),responsive:n(k(U([h(),S({height:h()})])),[[0,{height:44}],[200,{height:44}],[300,{height:44}],[400,{height:44}]]),anchorItemHeading:n(u(),"Currently Viewing"),anchorItemHeadingLevel:n(be,"h4"),anchorItemLabel:n(u(),"This Item"),itemsHeading:n(u(),"Similar Items"),itemsHeadingLevel:n(be,"h4"),modalHeading:n(u(),"Shop The Look"),shopButtonText:n(u(),"Shop The Look"),viewDetailsCTA:n(u(),"View Details")}),y(L)),rd={defaults:D(S({..._a.entries})),parse:t=>P(_a,j(t))},ka=b(S({...ae.entries,item_number:u(),maxResults:n(h(),5),minResults:n(h(),2)}),y(t=>{const e=Math.max(2,t.minResults),r=Math.max(e,t.maxResults);return{...t,maxResults:r,minResults:e}}),y(L)),sd={defaults:D(S({...ka.entries})),parse:t=>P(ka,j(t))},Ia=b(S({...ae.entries,minResults:n(h(),1),cardAspectRatio:n(h(),1.55),carouselAdvancementRate:ie,gutterWidth:n(h(),16),imageOnHover:n(d(),!1),nextOutfitPeek:n(h(),.2),showCarouselDots:n(d(),!1),showMobileArrows:n(d(),!1),sizeDropdown:n(d(),!1),salesPriceStyle:n($(Z),Z.salesPriceOnly),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:2}],[640,{columns:3}],[864,{columns:4}],[1199,{columns:5}]])}),y(H),y(L)),nd={defaults:D(S({...Ia.entries})),parse:t=>P(Ia,j(t))},Pa=b(S({...ae.entries,maxBrowsedItems:n(h(),10),maxPurchasedItems:n(h(),10),personalizedResults:n(d(),!0),browsed:he,purchased:he,carouselAdvancementRate:b(n(h(),1),y(t=>Math.max(1,t))),defaultTab:n(R(["purchased","browsed"]),"purchased"),sessionId:n(u(),""),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1024,{columns:2}],[1280,{columns:2}]]),fullPageLinkText:n(u(),""),fullPageLinkUrl:n(u(),""),shopThisLookCTA:n(u(),"Shop This Look")}),y(L)),id={defaults:D(S({...Pa.entries})),parse:t=>P(Pa,j(t))},Aa=b(S({...ae.entries,minResults:n(h(),1),backgroundColor:n(R(["consistent","expressive"]),"expressive"),backgroundPattern:n(g(R(["grainy","leaves","scribbles","waves","plaid"])),void 0),badgeType:n(g(R(["mood","season","interior","trend"])),void 0),cardAspectRatio:n(h(),1.4),cardDesign:n(R(["clean","eclectic"]),"eclectic"),carouselAdvancementRate:ie,clientOriginalImages:n(d(),!1),editorialAnchorItem:n(d(),!1),gutterWidth:n(h(),16),hideAnchorItem:n(d(),!1),itemOrder:n(R(["default","random"]),"default"),nextOutfitPeek:n(h(),.1),productType:n(R(["apparel","home"]),"apparel"),shopTheModelEditorial:n(d(),!1),showCarouselDots:n(d(),!1),showMobileArrows:n(d(),!1),hideDoubleZeroCents:n(d(),!0),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1023,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]])}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),ad={defaults:D(S({...Aa.entries})),parse:t=>P(Aa,j(t))};function dr(t,e){return P(od(e),t)}function od(t){const e=cd(t);return S({browsed:b(e,y(r=>Ea("browsed",r,t)),Ur(rs.byBrowsedAtDescending),y(r=>r.slice(0,t.maxBrowsedItems))),purchased:b(e,y(r=>Ea("purchased",r,t)),Ur(rs.byPurchasedAtDescending),y(r=>r.slice(0,t.maxPurchasedItems)))})}function cd(t){const e=b(k(ud(t)),We(r=>rs.isValidAnchorItem(r)));return b(S({additional:e,requested:e}),y(({additional:r,requested:s})=>s.concat(r)))}function ud(t){return b(Q({base_image_url:u(),browsed_at:g(u()),name:u(),bundles:k(ld(t)),remote_id:u(),purchased_at:g(u())}),y(e=>{const{bundles:r,...s}=e;return{...s,outfits:e.bundles}}))}function ld(t){const{account_id:e,cover_image_url:r,id:s,image_url:i}=hr(t).entries;return Q({account_id:e,cover_image_url:r,id:s,image_url:i,account_username:u(),base_image_url:u(),items:hd(t),large_image_url:u(),lookbook_image_url:u(),primary_remote_id:u(),primary_stylitics_item_id:h(),relative_boost:g(u()),similar_item_remote_id:x(u()),transparent_image_url:u(),username:u()})}function hd(t){return b(k(b(dd,y(e=>({...e,...it(e,t),collage_dimensions:e["collage-dimensions"],__type:"normalized-item"})))),ge((e,r)=>({...e,index:r})))}function Ea(t,e,r){const s=St(Ue("remote_id"),r.browsedItems),i=St(Ue("remote_id"),r.purchasedItems),a=St(Ue("remote_id"),e.flatMap(o=>o.outfits.flatMap(c=>c.items.map(l=>({...l,isSimilarItem:!!(l.remote_id&&c.similar_item_remote_id)&&l.remote_id===c.similar_item_remote_id})))));return e.map(o=>{const c=o.browsed_at?Number(new Date(o.browsed_at)):s[o.remote_id]?.browsed_at,l=o.purchased_at?Number(new Date(o.purchased_at)):i[o.remote_id]?.purchased_at;return{...o,...a[o.remote_id],itemType:t,browsed_at:c,purchased_at:l,outfits:o.outfits.map((m,f)=>{const p=m.items.map(_=>({..._,isSimilarItem:a[_.remote_id].isSimilarItem})),v=p.findIndex(_=>_.remote_id===o.remote_id||_.isSimilarItem),w=p[v];return{...m,anchorItemType:t,anchorItemId:w?.item_id??-1,items:w?.stocked?p.slice(0,v).concat(p.slice(v+1)).concat([p[v]]):p,position:f+1}})}})}const dd=ze(nt,["account_username","affiliate_link","base_image_url","buy_url","collage-dimensions","item_id","name","price_localized","price","promotions","remote_id","sale_price_localized","sale_price","stocked"]);function is(t,e){return P(as(e),t)}function as(t){return J(u(),b(k(Th(t)),ge((e,r)=>({...e,index:r}))))}function os(t,e){return P(md(e),t)}function md(t){return b(S({items:g(b(k(lr(t)),y(e=>mt(e,t)),ge((e,r)=>({...e,index:r}))),[]),outfit:g(b(Fu(ts,["items"]),y(e=>({...e,onModelImage:e["on-model-image"]})))),replacements:g(as(t),{}),similar_outfits:g(b(k(hr(t)),ge((e,r)=>({...e,position:e.position??r}))),[])}),y(e=>({anchorItem:void 0,outfit:e.outfit?{...e.outfit,items:e.items}:void 0,outfits:e.similar_outfits,replacements:e.replacements})))}function Re(t,e){return P(fd(e),t)}function fd(t){return b(pd(t),y(e=>gd(e,t.anchorItemRemoteId)),y(e=>({...e,outfits:yd(e.outfits,t)})))}function pd(t){return S({anchor_item:g(b(lr(t),y(e=>{const{socialProofItemLabel:r,socialProofAction:s,socialProofThreshold:i}=t;return r&&s&&i?ra(e,{socialProofItemLabel:r,socialProofAction:s,socialProofThreshold:i}):e}))),outfits:b(k(hr(t)),y(e=>mt(e,t)),ge((e,r)=>({...e,position:e.position??r}))),replacements:g(as(t),{})})}function gd(t,e){const{anchor_item:r,...s}=t,i=s;if(q(r))for(const a of t.outfits){const o=a.items.find(c=>c.remote_id===r.remote_id);if(o){i.anchorItem={...r,index:o.index};break}}else if(q(e))for(const a of t.outfits){const o=a.items.find(c=>c.remote_id===e);i.anchorItem=o;break}return i}function yd(t,e){const{socialProofAction:r,socialProofOutfitLabel:s,socialProofThreshold:i=100}=e;return!r||!s?t:t.map(a=>{const o=a.items.reduce((c,l)=>c+=l[r]>=i?l[r]:0,0);return{...a,...o>0&&{social_proof_label:s.replace("%v",o.toString())}}})}function cs(t,e){return P(vd(e),t)}function vd(t){return S({localization:g(u()),matches:n(bd(t),{}),version:g(u())})}function bd(t){return b(J(u(),S({account_id:h(),feature_groups:n(Sd(t),{}),image_url:g(u()),status:g(u())})),y(e=>Object.entries(e)),We(([e,r])=>{const s=Object.values(r.feature_groups).length>0;return!s&&t.emitWarnings&&A.warn(`image URL "${e}" does not have feature groups`),s}),y(e=>Object.fromEntries(e)))}function Sd(t){return b(J(u(),S({features:n(wd(t),{})})),y(e=>Object.entries(e)),We(([,e])=>Object.values(e.features).length>0),y(e=>Object.fromEntries(e)))}function wd(t){return b(J(u(),S({category:u(),coords:b(S({...es.entries,z:n(h(),0)})),items:n(b(k(_d(t)),ge((e,r)=>({...e,index:r}))),[]),"pdp-feature":n(d(),!1)})),y(e=>Object.entries(e)),We(([,e])=>e.items.length>0),ge(([e,r])=>[e,{...r,featureId:e}]),y(e=>Object.fromEntries(e)))}function _d(t){return b(Q({...ze(nt,["account_id","affiliate_link","brand","client_original_image_url","item_id","name","original_image_url","price","promotions","remote_id","sale_price","stocked"]).entries,base_image_url:x(u())}),y(e=>({...e,...it(e,t),collage_dimensions:e["collage-dimensions"],__type:"normalized-item"})))}function us(t,e){return P(kd(e),t)}function kd(t){const e=n(b(k(lr(t)),y(r=>mt(r,t)),ge((r,s)=>({...r,index:s}))),[]);return b(S({account_id:h(),item_sets:n(U([e,e]),[[],[]])}),y(r=>({accountId:r.account_id,currentBottomItem:r.item_sets[1][0],currentTopItem:r.item_sets[0][0],itemGroups:r.item_sets})))}function Ta(t,e){return P(Id(e),t)}function Id(t){return S({htmlSelector:g(u()),modules:k(Pd(t)),screenSize:R(["desktop","mobile","tablet"]),stylesheetUrl:u()})}function Pd(t){return ii("type",[S({...re.entries,type:N("anchor-items-gallery"),params:b(T(),y(Wh.parse)),data:b(T(),y(e=>dr(e,t)))}),S({...re.entries,type:N("beauty"),params:b(T(),y(zh.parse)),data:b(T(),y(e=>Re(e,t)))}),S({...re.entries,type:N("classic"),params:b(T(),y(Gh.parse)),data:b(T(),y(e=>Re(e,t)))}),S({...re.entries,type:N("control"),params:b(T(),y(da.parse)),data:n(g(tr()),void 0)}),S({...re.entries,type:N("complementary-items"),params:b(T(),y(Vh.parse)),data:b(T(),y(e=>Re(e,t)))}),S({...re.entries,type:N("cross-sell"),params:b(T(),y(Kh.parse)),data:b(T(),y(e=>ss(e,t)))}),S({...re.entries,type:N("dimension-collage"),params:b(T(),y(Qh.parse)),data:b(T(),y(e=>Re(e,t)))}),S({...re.entries,type:N("dynamic-galleries"),params:b(T(),y(Jh.parse)),data:b(T(),y(e=>ns(e,t)))}),S({...re.entries,type:N("grid"),params:b(T(),y(Xh.parse)),data:b(T(),y(e=>Re(e,t)))}),S({...re.entries,type:N("hotspots"),params:b(T(),y(Zh.parse)),data:b(T(),y(e=>Re(e,t)))}),S({...re.entries,type:N("list"),params:b(T(),y(Yh.parse)),data:b(T(),y(e=>Re(e,t)))}),S({...re.entries,type:N("moodboard"),params:b(T(),y(da.parse)),data:n(g(tr()),void 0)}),S({...re.entries,type:N("nike"),params:b(T(),y(ed.parse)),data:b(T(),y(e=>Re(e,t)))}),S({...re.entries,type:N("shop-similar"),params:b(T(),y(rd.parse)),data:b(T(),y(e=>cs(e,t)))}),S({...re.entries,type:N("shop-the-outfit"),params:b(T(),y(td.parse)),data:b(T(),y(e=>os(e,t)))}),S({...re.entries,type:N("shop-the-set"),params:b(T(),y(sd.parse)),data:b(T(),y(e=>us(e,t)))}),S({...re.entries,type:N("similar-styles"),params:b(T(),y(nd.parse)),data:b(T(),y(e=>is(e,t)))}),S({...re.entries,type:N("styled-for-you"),params:b(T(),y(id.parse)),data:b(T(),y(e=>dr(e,t)))}),S({...re.entries,type:N("vibe"),params:b(T(),y(ad.parse)),data:b(T(),y(e=>Re(e,t)))})])}const re=S({configId:u(),configProvenance:J(u(),T()),htmlSelector:g(u()),moduleIndex:n(h(),0),on:g(J(u(),er()),{}),override:g(J(u(),er()),{}),target:g(ri(Vi)),testPresence:g(rt),username:u()});function xa(t,e){return P(Ad(e),t)}function Ad(t){return b(S({"trending-bundles":b(k(hr(t)),y(e=>mt(e,t)),ge((e,r)=>({...e,position:e.position??r})))}),y(e=>({anchorItem:void 0,outfits:e["trending-bundles"],replacements:{}})))}class Ot{constructor(e=new Map){this.callbacks=e}callbacks;get=(e,r)=>{const s=this.buildKeyFor(e,r);return this.callbacks.get(s)};set=(e,r,s)=>{const i=this.buildKeyFor(e,r);return this.callbacks.set(i,s),this};delete=(e,r)=>{const s=this.buildKeyFor(e,r);return this.callbacks.delete(s),this};execute=(e,r,...s)=>(this.get(e,r)?.(...s),this);entries=()=>Array.from(this.entries());keys=()=>Array.from(this.callbacks.keys());values=()=>Array.from(this.values());get size(){return this.callbacks.size}buildKeyFor(e,r){return Ca(e,r).replace("bundle","outfit")}}function Ca(t,e){return`${t}.${e}`}var Y=(t=>(t.addAllToCart="add-all-to-cart",t.addToCart="add-to-cart",t.carousel="carousel",t.click="click",t.collapseSeeMoreOptions="collapse-see-more-options",t.create="create",t.expandSeeMoreOptions="expand-see-more-options",t.hide="hide",t.hover="hover",t.hoverEnd="hover-end",t.hoverStart="hover-start",t.interaction="interaction",t.load="load",t.mount="mount",t.suppress="suppress",t.swap="swap",t.view="view",t.visit="visit",t.zoom="zoom",t))(Y||{}),se=(t=>(t.addToCartButton="add-to-cart-button",t.bundle="bundle",t.bundles="bundles",t.collection="collection",t.data="data",t.fullPageLink="full-page-link",t.heroItem="hero-item",t.hotspot="hotspot",t.item="item",t.jumplink="jumplink",t.label="label",t.mnmCollapse="mnm-collapse",t.mnmExpand="mnm-expand",t.outfit="outfit",t.outfits="outfits",t.page="page",t.replacement="replacement",t.replacements="replacements",t.script="script",t.set="set",t.shop="shop",t.sizeButton="size-button",t.tab="tab",t.target="target",t.theme="theme",t.thumbnail="thumbnail",t.widget="widget",t))(se||{});const Ed=$(Y);function Td(t){const{success:e}=we(Ed,t);return e}const xd=$(se);function Cd(t){const{success:e}=we(xd,t);return e}function Od(t){return Sn(Tr)(e=>{const r=e instanceof Error?e:new Error(`Stylitics: caught unknown exception: ${String(e)}`);t.error(r)})}Od(globalThis.console);var Oa=(t=>(t.gallery="gallery",t.insights="insights",t.module="module",t.pdp="pdp",t.widget="widget",t))(Oa||{});class Rd{cleanupStack=_i.new();engagementQueue;engagementCache;_env;timeoutId;#e=()=>{};constructor(e={}){this._env=e.env??z.production,this.engagementQueue=e.engagementQueue??[],this.engagementCache=e.engagementCache??new Set,this.#e=e.onError??this.#e,this.cleanupStack.push(()=>{this.flushEngagements(),this.#i(),this.removeEventListeners()})}get env(){return this._env}set env(e){this._env=e}get endpoint(){return il(this.env)}cleanup=()=>{this.cleanupStack.runAll()};queueEngagement=e=>{const r=this.#t(e);if(r)return r;const s=P(n(b(u(),y(Number)),1e3),new URL(window.location.href).searchParams.get("stylitics-event-delay"));this.timeoutId=window.setTimeout(this.flushEngagements,s)};sendEngagement=e=>{const r=this.#t(e);if(r)return r;this.flushEngagements()};flushEngagements=()=>{if(this.engagementQueue.length===0)return this;try{P(b(k(T()),y($e(this.#r)),$r({},"Received unserializable engagement value"),y(e=>Da(this.endpoint,{requestInit:{body:e},onError:this.#e}))),this.engagementQueue)}catch(e){A.error(ve(e))}return this};addEventListeners=()=>this.#s().#o();removeEventListeners=()=>this.#n().#a();isDuplicateEvent=e=>{const r=typeof e=="object"?Ra(e):e;return this.engagementCache.has(r)&&jd(r)};#t=e=>{if(!Dd(e))return new Error("Stylitics: Invalid Action or Subject");const r=Ra(e),s=Oc(["__pkid"],e);this.isDuplicateEvent(r)||(this.engagementQueue.push(s),this.engagementCache.add(r),this.#i())};#r=()=>(this.engagementQueue.length=0,this);#i=()=>{this.timeoutId!=null&&window.clearTimeout(this.timeoutId)};#s=()=>(window.addEventListener("beforeunload",this.flushEngagements),this.cleanupStack.push(this.#n),this);#n=()=>(window.removeEventListener("beforeunload",this.flushEngagements),this);#o=()=>(window.document.addEventListener("visibilitychange",this.#c),this.cleanupStack.push(this.#a),this);#a=()=>(window.document.removeEventListener("visibilitychange",this.#c),this);#c=()=>(window.document.visibilityState==="hidden"&&this.flushEngagements(),this)}function Dd(t){return Td(t.action)&&Cd(t.subject)}function Md(t,e,r=void 0){const s=Ca(t,e);return r?`${s}.${r}`:s}function Ra(t){return Md(t.action,t.subject,t.__pkid)}function jd(t){return!Ld.some(e=>t.includes(e))}const Ld=["add-to-cart","carousel","click","collapse-see-more-options","expand-see-more-options","hover-end","hover-start","interaction"];class mr{queryClient=new _u({defaultOptions:{queries:{staleTime:1/0}}});constructor({env:e,origin:r}={}){this.env=e||Ud(),this._origin=r}env;_origin;response=void 0;get origin(){return this._origin||$d(this.env)}async fetchComplementary({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){return this.queryClient.fetchQuery({queryKey:["complementary",s,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(c=>typeof c=="function"?c():De()).then(c=>sa(c,i)).then(Pe).catch(c=>Ce(ke(c),"error"));const o=await de({url:oe({href:this.origin,path:"/api/items/complementary",searchParams:s}),validate:async c=>sa(await c.json(),i),...a});return o.error&&i.emitWarnings&&A.warn(o.error.message),this.response=o},...e})}async fetchDynamicGalleries({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){const o=Le(s);return this.queryClient.fetchQuery({queryKey:["dynamic-galleries",o,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(l=>typeof l=="function"?l():De()).then(l=>ns(l,i)).then(Pe).catch(l=>Ce(ke(l),"error"));const c=await de({url:oe({href:this.origin,path:"/api/dynamic-galleries",searchParams:o}),validate:async l=>ns(await l.json(),i),...a});return c.error&&i.emitWarnings&&A.warn(c.error.message),this.response=c},...e})}async fetchExperiences({fetchQueryOptions:e={},sessionId:r,useFixture:s,searchParams:i,...a}){const o=Le(i);return this.fetch({queryKey:["experiences",r,o,s],queryFn:()=>{const c=oe({href:this.origin,path:`/api/experiences/${r}`,searchParams:o});return de({url:c,...a})},...e},s)}async fetchOrchestrator({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){return this.queryClient.fetchQuery({queryKey:["outfits",s,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(c=>typeof c=="function"?c():De()).then(c=>Ta(c,i)).then(Pe).catch(c=>Ce(ke(c),"error"));const o=await de({url:oe({href:this.origin,path:"/api/orchestrator",searchParams:s}),validate:async c=>Ta(await c.json(),i),...a});return o.error&&i.emitWarnings&&A.warn(o.error.message),this.response=o},...e})}async fetchOutfitLandingPage({fetchQueryOptions:e={},outfitId:r,useFixture:s,searchParams:i,parseOptions:a,...o}){const c=Le(i);return this.queryClient.fetchQuery({queryKey:["outfit-landing-page",r,c,s],queryFn:async()=>{if(s)return Promise.resolve(s).then(m=>typeof m=="function"?m():De()).then(m=>os(m,a)).then(Pe).catch(m=>Ce(ke(m),"error"));const l=await de({url:oe({href:this.origin,path:`/api/outfit-landing-page/${r}`,searchParams:c}),validate:async m=>os(await m.json(),a),...o});return l.error&&a.emitWarnings&&A.warn(l.error.message),this.response=l},...e})}async fetchOutfits({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){const o=Le(s);return this.queryClient.fetchQuery({queryKey:["outfits",o,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(l=>typeof l=="function"?l():De()).then(l=>Re(l,i)).then(Pe).catch(l=>Ce(ke(l),"error"));const c=await de({url:oe({href:this.origin,path:"/api/outfits",searchParams:o}),validate:async l=>Re(await l.json(),i),...a});return c.error&&i.emitWarnings&&A.warn(c.error.message),this.response=c},...e})}fetchFromDataSource(e,r){switch(e){case"trending-bundles":return this.fetchTrendingBundles(r);case"outfit-landing-page":{const{outfitId:s,...i}=r;return s!==void 0?this.fetchOutfitLandingPage({...i,outfitId:s}):this.fetchOutfits(r)}default:return this.fetchOutfits(r)}}async fetchReplacements({fetchQueryOptions:e={},itemIds:r,itemNumbers:s,useFixture:i,searchParams:a,parseOptions:o,...c}){const l={...P(fr,a),ids:r,item_number:s};function m(f){o.emitWarnings&&A.warn(f)}return this.queryClient.fetchQuery({queryKey:["replacements",l,i],queryFn:async()=>{if(i)return Promise.resolve(i).then(p=>typeof p=="function"?p():De()).then(p=>is(p,o)).then(Pe).catch(p=>Ce(ke(p),"error"));const f=await de({url:oe({href:this.origin,path:"/api/items/replacements",searchParams:l}),validate:async p=>is(await p.json(),o),...c});return f.error?m(f.error.message):Object.keys(f.data).length===0&&m("No replacements available"),this.response=f},...e})}async fetchShopTheImage({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){return this.queryClient.fetchQuery({queryKey:["shop-the-image",s,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(c=>typeof c=="function"?c():De()).then(c=>cs(c,i)).then(Pe).catch(c=>Ce(ke(c),"error"));const o=await de({url:oe({href:this.origin,path:"/api/shop-the-image",searchParams:s}),validate:async c=>cs(await c.json(),i),...a});return o.error&&i.emitWarnings&&A.warn(o.error.message),this.response=o},...e})}async fetchShopTheSet({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){const o=Le(s);return this.queryClient.fetchQuery({queryKey:["shop-the-set",o,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(l=>typeof l=="function"?l():De()).then(l=>us(l,i)).then(Pe).catch(l=>Ce(ke(l),"error"));const c=await de({url:oe({href:this.origin,path:"/api/shop-the-set",searchParams:o}),validate:async l=>us(await l.json(),i),...a});return c.error&&i.emitWarnings&&A.warn(c.error.message),this.response=c},...e})}async fetchStyledForYou({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){const o=Le(s);return this.queryClient.fetchQuery({queryKey:["styled-for-you",o,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(l=>typeof l=="function"?l():De()).then(l=>dr(l,i)).then(Pe).catch(l=>Ce(ke(l),"error"));const c=await de({url:oe({href:this.origin,path:"/api/styled-for-you",searchParams:o}),validate:async l=>dr(await l.json(),i),...a});return c.error&&i.emitWarnings&&A.warn(c.error.message),this.response=c},...e})}async fetchTrendingBundles({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){const o=Le(s);return this.queryClient.fetchQuery({queryKey:["trending-bundles",o,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(l=>typeof l=="function"?l():De()).then(l=>xa(l,i)).then(Pe).catch(l=>Ce(ke(l),"error"));const c=await de({url:oe({href:this.origin,path:"/api/trending-bundles",searchParams:o}),validate:async l=>xa(await l.json(),i),...a});return c.error&&i.emitWarnings&&A.warn(c.error.message),this.response=c},...e})}async fetchUpsells({fetchQueryOptions:e={},useFixture:r,searchParams:s,parseOptions:i,...a}){const o=Le(s);return this.queryClient.fetchQuery({queryKey:["upsells",o,r],queryFn:async()=>{if(r)return Promise.resolve(r).then(l=>typeof l=="function"?l():De()).then(l=>ss(l,i)).then(Pe).catch(l=>Ce(ke(l),"error"));const c=await de({url:oe({href:this.origin,path:"/api/upsells",searchParams:o}),validate:async l=>ss(await l.json(),i),...a});return c.error&&i.emitWarnings&&A.warn(c.error.message),this.response=c},...e})}async fetchOutfitLandingPageLegacy({fetchQueryOptions:e={},outfitId:r,useFixture:s,searchParams:i,...a}){const o=Le(i);return this.fetch({queryKey:["outfit-landing-page",r,o,s],queryFn:()=>{const c=oe({href:this.origin,path:`/api/outfit-landing-page/${r}`,searchParams:o});return de({url:c,...a})},...e},s)}async fetchOutfitsLegacy({fetchQueryOptions:e={},useFixture:r,searchParams:s,...i}={}){const a=Le(s);return this.fetch({queryKey:["outfits",a,r],queryFn:()=>{const o=oe({href:this.origin,path:"/api/outfits",searchParams:a});return de({url:o,...i})},...e},r)}async fetchReplacementsLegacy({fetchQueryOptions:e={},itemIds:r,itemNumbers:s,useFixture:i,searchParams:a,...o}){const c={...P(fr,a),ids:r,item_number:s};return this.fetch({queryKey:["replacements",c,i],queryFn:()=>{const l=oe({href:this.origin,path:"/api/items/replacements",searchParams:c});return de({url:l,...o})},...e},i)}async fetchShopTheSetLegacy({fetchQueryOptions:e={},itemIds:r,itemNumbers:s,useFixture:i,searchParams:a,...o}){const c={...P(fr,a),ids:r,item_number:s};return this.fetch({queryKey:["shop-the-set",c,i],queryFn:()=>{const l=oe({href:this.origin,path:"/api/shop-the-set",searchParams:c});return de({url:l,...o})},...e},i)}async fetch(e,r){let s;return s=e.queryFn,this.response=await this.queryClient.fetchQuery({...e,queryFn:s})}}function oe({href:t="http://localhost:5173/",...e}={href:"http://localhost:5173/"}){const r=new URL(t||"http://localhost:5173/");return e.hash&&(r.hash=e.hash),e.host&&(r.host=e.host),e.password&&(r.password=e.password),e.path&&(r.pathname=e.path),e.port&&(r.port=String(e.port)),e.protocol&&(r.protocol=e.protocol),e.searchParams&&(r.search=dl(e.searchParams).toString()),e.username&&(r.username=e.username),r}async function de({url:t,validate:e=Fd,requestInit:r={},timeout:s=5e3}){const i=new URL(t),a=new AbortController,o=setTimeout(()=>a.abort(),s);try{const c=await fetch(i.href,{...r,signal:a.signal}).catch(Bd).finally(()=>clearTimeout(o)),{status:l,statusText:m}=c;return c.ok?Pe(await e(c),c):ke(new Error(`Stylitics: Error fetching from ${i.origin}: ${l} - ${m}`),l===504?"timeout":"API-error",c)}catch(c){return ke(c)}}async function Fd(t){return t.json()}function Ud(){return z.production!=="production"?z.staging:z.production}function $d(t){return t!==z.production?nl:sl}function Le(t){return{...P(fr,t),...P(qd,t)}}const qd=n(b(J(u(),T()),y(t=>Object.fromEntries(Object.entries(t).filter(([e])=>e.startsWith("exp."))))),{}),fr=b(n(S({"p.b":n(g(le([u(),k(u())])),void 0),"p.p":n(g(le([u(),k(u())])),void 0),ab_exceptions:n(g(b(k(S({applies_to:u(),description:u(),id:u(),reason:u(),timestamp:h()})),Xn(1))),void 0),brand:n(g(u()),void 0),category:n(g(u()),void 0),client_user_id:n(g(u()),void 0),department:n(g(u()),void 0),from_accounts:n(g(d()),void 0),gender:n(g(u()),void 0),ids:n(g(u()),void 0),item_number:n(g(u()),void 0),item_number_type:n(g(Hi),void 0),locale:n(g(u()),void 0),max:n(g(h()),void 0),max_items:n(g(h()),void 0),max_price:n(g(h()),void 0),min:n(g(h()),void 0),min_price:n(g(h()),void 0),page:n(g(u()),void 0),price_hide_double_zero_cents:n(g(d()),void 0),price_rounding:n(g(u()),void 0),profile:n(g(u()),void 0),return_object:n(g(d()),void 0),session_id:n(g(u()),void 0),style:n(g(u()),void 0),tags:n(g(u()),void 0),total:n(g(h()),void 0),username:n(g(u()),void 0),with_item_coords:n(g(d()),void 0)}),{}),y(t=>Object.fromEntries(Object.entries(t).sort())));function Hd({browsedItems:t,experienceConfig:e,purchasedItems:r,sessionId:s}){const i={};for(const a in e)if(a.match(/previous|engagement|label-presence|pz/)){{const o=Bt("remote_id",t);o&&o.length&&Object.assign(i,{"p.b":o,session_id:s})}{const o=Bt("remote_id",r);o&&o.length&&Object.assign(i,{"p.p":o})}break}return i}function Bd(t){const e=ve(t);if(e.name==="AbortError")return new Response(null,{status:504,statusText:e.message});throw t}function Pe(t,e){return{data:t,error:null,errorReason:null,httpResponse:e}}function ke(t,e,r){const s=ve(t),i=/invalid/i.test(s.message);return{data:null,error:s,errorReason:e??(i?"validation error":"unknown"),httpResponse:r}}function Da(t,e){if(!window.navigator.sendBeacon(t,e.requestInit.body)){const r="Failed to send data via sendBeacon. Trying fetch.";A.warn(r),e.onError?.(ve(r)),window.fetch(t,ne({method:"POST",headers:{"Content-Type":"application/json"}},e.requestInit)).then(s=>{if(!s.ok){const i=ve(`Fetch fallback was unsuccessful: ${s.status} - ${s.statusText}`);e.onError?.(i),A.error(i)}}).catch(s=>{const i=ve(s);i.message=`Error while sending via fetch fallback. Cause: ${i.message}`,e.onError?.(i),A.error(i)})}}async function De(t){throw new Error("Stylitics: loading fixture in production is not supported.")}Object.values({floor:{name:"floor",departments:["bath mats","indoor rugs","indoor/outdoor rugs","kitchen rugs & mats","outdoor rugs"],priority:0},seating:{name:"seating",departments:["desk chairs","indoor benches","indoor dining seating","indoor lounge chairs","indoor sofas & sectionals","indoor/outdoor dining seating","indoor/outdoor lounge chairs","indoor/outdoor ottomans & stools","indoor/outdoor sofas & sectionals","living room sets","nursery seating","beds","nursery cribs"],priority:1},surface:{name:"surface",departments:["console tables & sideboards","indoor accent tables","indoor coffee tables","indoor dining tables","desks","nightstands","indoor/outdoor accent tables","indoor/outdoor coffee tables","indoor/outdoor dining tables","tv stands & media consoles","outdoor kitchen & bar furniture"],priority:2},storage:{name:"storage",departments:["bathroom furniture","entryway storage accessories","entryway storage furniture","home storage accessories","home storage furniture","nursery furniture","recycling & trash"],priority:3},lighting:{name:"lighting",departments:["indoor lighting","indoor/outdoor lighting","outdoor lighting","lighting accessories"],priority:4},wall:{name:"wall",departments:["decorative mirrors","wall organization","wall treatments","window treatments","mailboxes, house numbers, & door knockers"],priority:5},soft:{name:"soft",departments:["bathroom linens","bedding","indoor furniture cushions","indoor pillows","throw blankets","nursery bedding","outdoor furniture cushions"],priority:6},kitchen:{name:"kitchen",departments:["beverage & food items","coffee & tea","indoor dinnerware","indoor drinkware","kitchen accessories","kitchen electrics","kitchen tools & prep","ovenware & bakeware","pots & pans","servingware","utensils","wine & cocktails"],priority:7},decor:{name:"decor",departments:["botanicals","entertainment","fitness","gear","holiday","home cleaning","home electrics","indoor home decor","indoor/outdoor decor","office accessories","outdoor accessories","outdoor fire pits & heaters","outdoor recreation","pets","rug & fabric swatches","tabletop decor","travel","wellness"],priority:8}}).reduce((t,e)=>(e.departments.forEach(r=>{t[r]=e}),t),{});const Nd=["face wash","face peel","face exfoliator","toner","essence","skin patch","face serum","face treatment","face gel","face oil","sleep mask","eye mask","eye serum","face moisturizer","day cream","night cream","neck cream","eye cream","sunscreen"],Wd=["shampoo","colored hair shampoo","conditioner","colored hair conditioner","hair mask","colored hair mask","hair treatment","detangler spray","leave-in conditioner","hair oil","hair serum","heat protectant","hair cream","hair curl cream","hair styling cream","hair mousse","hair gel","hair texture spray","hair mist","humidity spray","hairspray","dry shampoo","hair comb","hair brush","hair dryer","blow out brush","hair rollers","hair clips","flat iron","curling iron"],zd=["primer","foundation","cream foundation","liquid foundation","powder foundation","face powder","under eye concealer","concealer","spot concealer","color corrector","tinted moisturizer","bb cream","cc cream","blush","cream blush","powder blush","bronzer","contour palette","contour stick","highlighter","translucent powder","eyeshadow primer","eyebrow primer","liquid eyeliner","pencil eyeliner","eyebrow gel","eyebrow pencil","brow powder","pencil eyeshadow","liquid eyeshadow","eyeshadow stick","powder eyeshadow","eyeshadow palette","eyelash curler","false eyelashes","mascara primer","mascara","lip liner","lipstick","lip crayon","lip gloss & lipstick set","lip gloss","lip balm","lip oil","lip treatment","lip palette","setting spray"],Gd=["face wash","hand wash","soap","body wash","shower gel","body scrub","body exfoliator","bath oil","bath salts","shaving cream","after shave cream","after shave gel","beard oil","beard balm","body oil","body lotion","deodorant","face mask","face moisturizer","hand cream","hair cream","hair oil","hair mist","body spray","cologne","perfume"],Vd=["nail polish remover","cuticle exfoliator","nail scrub","cuticle pusher","cuticle clipper","nail scissors","nail clipper","nail buffer","nail file","nail tool set","base coat","false nails","nail tinted moisturizer","nail veil","nail polish","nail polish set","nail lacquer","nail embellishment","nail pen","top coat","quick dry drops","nail treatment","cuticle oil"];function Rt(t){return t.reduce((e,r,s)=>e.set(r,s),new Map)}const Ma=Rt(Wd),ja=Rt(Gd),Kd=Rt(zd),La=Rt(Vd),Qd=Rt(Nd),Fa=new Map([["fragrance",ja],["hair",Ma],["haircare",Ma],["hygiene",ja],["makeup",Kd],["nail",La],["nails",La],["skincare",Qd]]);function Jd(t){function e(s){return s==null?String(s):Array.isArray(s)?s.filter(Nc).map(e).join(","):String(s)}return Object.entries(Ua(t)).map(([s,i])=>`${s}=${e(i)}`).join("&")}function Ua(t,e=""){return Object.keys(t).reduce((r,s)=>{const i=t[s];if(i===null)return r;const a=e?`${e}.${s}`:s;if(i instanceof Set){const o=[...i];r[a]=o}else typeof i=="object"&&!Array.isArray(i)?Object.assign(r,Ua(i,a)):r[a]=i;return r},{})}Lc("transform","propertyName");const Xd="https://web-assets.stylitics.com/";function Zd(){return"style.css"}function Yd(){return Xd}function em(t){const{host:e=Yd(),path:r=Zd(),urlArgs:s}=t;return new URL(`${e}${r}?${Jd(Zc(i=>i===void 0,s))}`)}class pr{_id;cookieStore;localStore;constructor(e={}){this.cookieStore=e.cookieStore??te.new({enableStorage:!0}),this.localStore=e.localStore??V.new({enableStorage:!0}),this._id=e.id??this.findOrReplaceId()}get id(){return this._id}syncStoredSessionIds(){return this.cookieSessionId=this.id,this.localSessionId=this.id,this}set enableCookieStorage(e){this.cookieStore.enableStorage=e,this.syncStoredSessionIds()}set id(e){this._id=e,this.cookieSessionId=e,this.localSessionId=e}get cookieSessionId(){return this.cookieStore.getSessionId()}set cookieSessionId(e){this.cookieStore.setSessionId(e,{expires:1e3})}get localSessionId(){return this.localStore.getSessionId()}set localSessionId(e){this.localStore.setSessionId(e)}findOrReplaceId(){return this.id=this.findOrCreateSessionId()}findOrCreateSessionId(){return this.localSessionId||this.cookieSessionId||ot()}}function tm(t,e=1){return parseInt(t.substring(0,8),16)%100{if(typeof r=="string"&&r.includes("web-assets.stylitics.com")&&window.location.href.startsWith("http")){const i=ve(e);return i.message=s,this.error(i)}};#o(e){return this.#n.#e.push({error:e,meta:this.metadata}),this.#c(),this.#n.#r=window.setTimeout(this.#u,1e3),this}#a(e){return this.#n.#t.push({data:e,meta:this.metadata}),this.#c(),this.#n.#r=window.setTimeout(this.#u,1e3),this}#c=()=>{const e=this.#n.#r;return e&&window.clearTimeout(e),this.#n.#r=void 0,this};#u=()=>{this.#l(),this.#h()};#l(){if(this.#n.#e.length===0)return;const e=this.#n.#e;return this.#n.#e=[],this.#d("ERROR",e)}#h(){if(this.#n.#t.length===0)return;const e=this.#n.#t;return this.#n.#t=[],this.#d("INFO",e)}#d(e,r){if(this.enableLogging)try{P(b(T(),$r({},"Received unserializable engagement value"),y(s=>Da(this.#f(e),{requestInit:{body:s}}))),r)}catch(s){A.error("Failed to POST to log-api",ve(s))}}#m(e){return this.#s=e,this}#f(e){return`${this.#g}/${this.#p(e)}`}#p(e){const r=e==="ERROR"?"logError":"logData",s=this.env===z.staging?"_staging":"";return`${r}${s}`}#g="https://us-east1-tranquil-petal-272922.cloudfunctions.net"}function sm(t){return{message:t.message,stack:t.stack??"unknown"}}class Ke{static getOrInit=()=>window[bi]??=this.#e();static destroy(){delete window[bi]}static#e(){return new this}#t=te.new();#r=rm.new();#i=z.production;#s=!0;#n=V.new();#o=gr.new(this);#a={};#c=new pr({cookieStore:this.#t,localStore:this.#n});constructor(){}get cookieStore(){return this.#t}get env(){return this.#i}set env(e){this.#i=e}get localStore(){return this.#n}get logger(){return this.#o}get metadata(){return{browser:Vl(),href:window.location.href,is_lower:nm(window.location.href),origin:window.location.origin,session_id:this.sessionId,user_agent:window.navigator.userAgent}}get session(){return this.#c}get sessionId(){return this.session.id}get isStorageEnabled(){return this.cookieStore.enableStorage||this.localStore.enableStorage}enableStorage(){return this.cookieStore.enableStorage=!0,this.localStore.enableStorage=!0,this}disableStorage(){return this.cookieStore.enableStorage=!1,this.localStore.enableStorage=!1,this}get isTrackingEnabled(){return this.#s}enableTracking(){return this.#s=!0,this}disableTracking(){return this.#s=!1,this}syncStoredSessionIds(){return this.#c.syncStoredSessionIds(),this}getPdpItemRemoteId(e){return this.#r.getPdpItemRemoteId(e)}hasPdpItemRemoteId(e){return this.#r.hasPdpItemRemoteId(e)}setPdpItemRemoteId(e,r){return this.#r.setPdpItemRemoteId(e,r),this}addItem(e){return this.#r.addItem(e),this}removeItem(e){return this.#r.removeItem(e),this}hasItem(e){return this.#r.hasItem(e)}getItemByItemId(e){return this.#r.getItemByItemId(e)}getItemByRemoteId(e){return this.#r.getItemByRemoteId(e)}registerModule(e,r){return this.#a[e]??=r,this}getModule(e){return this.#a[e]||A.error(`Module with key of "${e}" has not been registered.`),this.#a[e]}}function nm(t){return["web-assets.stylitics.com","localhost","staging","development"].some(e=>t.includes(e))}const im=Ke.getOrInit;class am{context;constructor(e){this.context=e}get api(){return this.context.engagementsApi}get clientCallbacks(){return this.context.clientCallbacks}get contextData(){return this.context.eventContextData}get isTrackingEnabled(){return this.context.isTrackingEnabled}queueEvent(e){return this.processEvent(e)}processEvent(e){if(!this.isTrackingEnabled)return;const r=this.api.queueEngagement({...this.contextData,...e});return r instanceof Error&&A.warn(r),r}addReferrerIfPresent(e){const r=Kl();return r?{...e,referrer:r}:e}getItemPayload(e){const r=this.getDatabaseItem(e.item),i={__pkid:e.outfit?`${r.item_id}-${e.outfit.id}`:String(r.item_id),item_id:r.item_id,item_position:e.position,item_price:r.price,item_remote_id:r.remote_id,item_sale_price:r.salePrice,outfit_id:e.outfit?.id,relative_boost:e.outfit?.relative_boost,subject:se.item};return i.item_position&&=Number(i.item_position),i}getDatabaseItem(e){const r=Ke.getOrInit();if(e.item_id===void 0&&e.remote_id!==void 0){const s=r.getItemByRemoteId(e.remote_id);return{...e,item_id:s?.item_id}}if(e.item_id!==void 0&&e.remote_id===void 0){const s=r.getItemByItemId(e.item_id);return{...e,remote_id:s?.remote_id}}return e}}const $a=R(["main","widget"]),om=R([...$a.options,"jumplink"]),cm=R(["item","item-hotspot","item-image","item-name","item-price","item-shop","item-size","hero-item",...om.options]);function qa(t,e,r=`Invalid ui_component value received: ${e}`){const s=we(t,e);return s.success||A.warn(r),s}function um(t,e,r=`Invalid value type received: ${e}`){const s=we(t,e);return s.success||A.warn(r),s}class lm extends am{onAddItemToCart=e=>{const{currency:r=Li.USD,item:s,placement:i="main",pkid:a,price:o}=e,c=s.price??s.salePrice;qa($a,i,`Invalid placement value received: ${i}`),um(u(),r,`Invalid Currency value received: ${r}`);const l=Tr(Se(String,parseFloat,gn(c)),Nt(c)),m=this.getDatabaseItem(s),f={__pkid:a??m.item_id??m.remote_id,action:Y.addToCart,currency:r,item_id:m.item_id,item_price:l(o),item_remote_id:m.remote_id,subject:se.item,ui_component:i};this.queueEvent(f),this.clientCallbacks.execute(f.action,f.subject,e)};onDataLoad=e=>this.clientCallbacks.get(Y.load,se.data)?.(e);onItemClick=e=>{qa(cm,e.uiComponent);const r={...this.getItemPayload(e),action:Y.click,outfit_position:e.outfitPosition,relative_boost:e.outfit?.relative_boost,ui_component:e.uiComponent};this.queueEvent(r),this.clientCallbacks.execute(r.action,r.subject,e)};onItemView=e=>{const{itemImageType:r="client_original_image"}=e,s={...this.getItemPayload(e),action:Y.view,item_image_type:r};this.queueEvent(s),this.clientCallbacks.execute(s.action,s.subject,e)};onJumpLinkClick=()=>{this.queueEvent({__pkid:this.contextData.instance_id,action:Y.click,subject:se.jumplink})};onOutfitMount=e=>{const r=this.clientCallbacks.get(Y.mount,se.outfit),s=this.clientCallbacks.get(Y.mount,se.bundle),i=r||s,a=e.outfit||e.bundle;i?.({...e,bundle:a,outfit:a})};onOutfitLabelClick=e=>{const r={__pkid:`${e.outfit.id}_label`,action:Y.click,context_type:e.labelStyle,outfit_id:e.outfit.id,outfit_position:e.outfitPosition,relative_boost:e.outfit.relative_boost,sort_label:e.sortLabel,subject:se.outfit,ui_component:"label"};this.queueEvent(r),this.clientCallbacks.execute(r.action,r.subject,e)};onOutfitsMount=e=>{const r=this.clientCallbacks.get(Y.mount,se.outfits),s=this.clientCallbacks.get(Y.mount,se.bundles),i=r||s,a=e.outfits||e.bundles;i?.({...e,bundles:a,outfits:a})};onPageVisit=()=>{this.queueEvent(this.addReferrerIfPresent({__pkid:window.location.href,action:Y.visit,subject:se.page}))};onTargetHide=({nonIntersectableAt:e})=>{this.queueEvent(this.addReferrerIfPresent({__pkid:e,action:Y.hide,subject:se.target}))};onTargetView=()=>{this.queueEvent(this.addReferrerIfPresent({__pkid:this.contextData.instance_id,action:Y.view,subject:se.target}))};onWidgetInteraction=e=>{this.queueEvent({__pkid:this.contextData.instance_id,action:Y.interaction,subject:se.widget,event_time:e.event_time})};onWidgetLoad=e=>{this.queueEvent({__pkid:this.contextData.instance_id,action:Y.load,subject:se.widget})};onWidgetSuppress=()=>{this.queueEvent({__pkid:this.contextData.instance_id,action:Y.suppress,subject:se.widget})}}class ls{static new(e,r){return new this(e,r)}time;ttl;constructor(e,r){this.time=e,this.ttl=r}get isLive(){return this.time>=this.oldestLiveTime}get isExpired(){return!this.isLive}get oldestLiveTime(){return Date.now()-this.ttl}}class Dt{static async initialize(e){return this.new(e).fetchConfigIfExpired()}static new(e){return new this(e)}api;client;context;lookup;overrides;schema;session;store;_fullConfig;constructor(e){this.api=e.api,this.client=e.client,this.context=e.context,this.session=e.session,this.store=e.store,this.overrides=fs.new(this.client,{context:this.context,store:this.store}),this.schema=hs(this.client),this._fullConfig=this.getStoredConfig(),this.lookup=this.buildLookup(),this.syncEnableCookieStorage()}get abExceptions(){return Object.values(this.lookup).reduce((e,r)=>{const{abException:s}=r;return s&&e.push(s),e},[])}get createdAt(){return this.clientConfig.timestamp}get clientConfig(){return this.fullConfig.client[this.client]}get experiences(){return this.clientConfig.experiences}get fullConfig(){return this._fullConfig}set fullConfig(e){this._fullConfig=e,this.storeConfig(),this.lookup=this.buildLookup(),this.syncEnableCookieStorage()}syncEnableCookieStorage(){this.session.enableCookieStorage=this.getValueFor("set-cookie")??this.session.cookieStore.enableStorage}get config(){return Object.values(this.lookup).reduce((e,r)=>Object.assign(e,r.rawEntry),{})}get isLive(){return ls.new(this.createdAt,yr).isLive}get isInControlGroup(){return this.getValueFor("test-presence")==="control"}get isInExperimentGroup(){return this.getValueFor("test-presence")==="present"}get isInLabelExperimentGroup(){return this.getValueFor("label-presence-test")==="present"}get isInRecipeInfoExperimentGroup(){return this.getValueFor("recipe-info-presence-test")==="present"}async fetchConfigIfExpired(){return this.isLive?this:(this.fullConfig=await this.fetchConfig(),this)}async fetchFreshConfig(){return this.fullConfig=await this.fetchConfig(),this}async fetchConfig(){const e=n(J(u(),T()),{});try{const r=await this.api.fetchExperiences({sessionId:this.session.id,searchParams:{username:this.client},validate:async s=>P(e,await s.json())});return r.error?this.fullConfig:{client:{...this.fullConfig.client,[this.client]:{experiences:r.data,timestamp:Date.now()}}}}catch(r){return A.error(r),this.fullConfig}}getStoredConfig(){const e=this.store.getExperienceConfig();return P(hs(this.client),ct(e))}storeConfig(){return this.store.setExperienceConfig(JSON.stringify(this.fullConfig)),this.overrides.syncToStore(),this}get(e){return this.lookup[e]}getValueFor(e){return this.get(e).value}getOverrideFor(e){return this.overrides.get(e)}buildLookup(){return jt.options.reduce((e,r)=>Object.assign(e,{[r]:e[r]||Ha.new({client:this.client,experiments:this,name:r,scope:ds()})}),hm(this))}}function hs(t){return n(S({client:Q({[t]:n(S({experiences:n(J(u(),T()),{}),timestamp:n(h(),ms)}),()=>({experiences:{},timestamp:ms()}))})}),()=>({client:{[t]:{experiences:{},timestamp:ms()}}}))}function hm(t){const{client:e}=t,r=RegExp(`^exp\\.(?${e})\\.(?${Na}*)(?:\\?(?.*))?$`),s=RegExp(`^exp\\.(?${e})\\.(?${Na})-(?${dm})$`),i=S({client:N(e),name:jt,scope:b(g(u()),y(ds))}),a=b(S({client:N(e),name:jt,moduleType:g(u())}),y(({moduleType:f,...p})=>P(i,f?{...p,scope:`moduleType=${f}`}:p)));function o(f){const p=we(a,f.match(s)?.groups);if(p.success)return p.output;const v=we(i,f.match(r)?.groups);if(v.success)return v.output}function c(f,p){return we(ze(Mt,[f.name]),{[f.name]:p})}const m=P(hs(t.client),t.fullConfig).client[t.client].experiences;return Object.entries(m).reduce((f,[p,v])=>{const w=o(p);if(!w)return f;const _=c(w,v);if(!_.success)return f;const I=w.name,E=_.output[I];return Object.assign(f,{[I]:Ha.new({client:w.client,name:I,experiments:t,scope:w.scope??ds(),value:E})})},{})}class Ha{static new(e){return new this(e)}_value;client;experiments;name;scope;constructor(e){this._value=e.value,this.client=e.client,this.experiments=e.experiments,this.name=e.name,this.scope=e.scope}get abException(){if(this.override.abException&&this.hasOperantOverride)return this.override.abException}get documentWidth(){return this.experiments.context.documentWidth}get itemCategory(){return this.experiments.context.itemCategory}get moduleType(){return this.experiments.context.moduleType}get productGroupType(){return this.experiments.context.productGroupType}get rawEntry(){return{[this.rawKey]:this.value}}get rawKey(){return`exp.${this.client}.${this.name}`}get override(){return this.experiments.getOverrideFor(this.name)}get value(){const e=this.override.value;if(q(e))return e;if(this.satisfiesAllScopes)return this._value}get satisfiesAllScopes(){return this.satisfiesModuleTypeScope(this.moduleType)&&this.satisfiesItemCategoryScope(this.itemCategory)&&this.satisfiesProductGroupTypeScope(this.productGroupType)&&this.satisfiesScreenSizeScope(this.documentWidth)}satisfiesItemCategoryScope(e){return Ie(e)||this.isUnscopedBy("itemCategory")||this.scope.itemCategory.has(e)}satisfiesModuleTypeScope(e){return this.isUnscopedBy("moduleType")||this.scope.moduleType.has(e)}satisfiesProductGroupTypeScope(e){return this.isUnscopedBy("productGroupType")||this.scope.productGroupType.has(e)}satisfiesScreenSizeScope(e){try{return this.isUnscopedBy("screenSize")||this.scope.screenSize.has(Wa(e))}catch{return!0}}isUnscopedBy(e){return this.scope[e].size===0}get hasOperantOverride(){return this.override.hasOverride&&this.override.value!==this._value}}const Ba=R(["anchor-items-gallery","beauty","classic","control","complementary-items","cross-sell","dimension-collage","dynamic-galleries","gallery","grid","hotspots","list","moodboard","nike","shop-similar","shop-the-outfit","shop-the-set","similar-styles","styled-for-you","v3-classic","v3-hotspots","vibe"]),Mt=S({"beauty-widget-apply":n(d(),!1),"bust-cache":n(d(),!1),"carousel-dots":n(d(),!1),"client-original-images":n(d(),!1),"collage-anchor-item":n(d(),!1),"combined-discount-percentage":n(d(),!1),"css-experiment":g(u()),"css-theme":g(u()),"cta-button-contrast":n(d(),!1),"editorial-anchor-item":n(d(),!1),"enable-logging":n(d(),!1),"grid-peek":n(d(),!1),"grid-starter":n(d(),!1),"hide-anchor-item":n(d(),!1),"hide-double-zero-cents":n(g(d()),void 0),"image-aspect-ratio":n(g(u()),void 0),"item-discount-percentage":n(d(),!1),"item-discount-image":n(d(),!1),"item-image-hover":n(d(),!1),"item-info-static":n(d(),!1),"item-info-static-mobile":n(d(),!1),"item-link-cta":n(g(u()),void 0),"item-modal-static":n(d(),!1),"label-presence-test":rt,"label-style":Wi,"large-item-image":n(d(),!1),"macys-category":n(d(),!1),"macys-category-all":n(d(),!1),"enhanced-list-plus":n(d(),!1),"max-results":n(g(b(u(),Gn(),y(Number))),void 0),"mix-and-match":n(d(),!1),"mix-and-match-collage":n(d(),!1),"mix-and-match-row":n(d(),!1),"mobile-arrows":n(d(),!1),"mobile-gallery":n(d(),!1),"mobile-items-carousel":n(d(),!1),"mobile-items-exposed":n(d(),!1),"mobile-modal-list":n(d(),!1),"mobile-vertical-list":n(d(),!1),orchestrator:n(d(),!1),"original-item-order":n(d(),!1),"outfit-discount-percentage":n(d(),!1),"outfit-promo-indicators":n(d(),!1),"plus-icon":n(d(),!1),"product-list-type":n(g($(Oe)),void 0),"profile-id-path":u(),"promo-indicators":n(d(),!1),"recipe-info-presence-test":rt,"regulated-discount-percentage":n(d(),!1),"rounding-style":n(g($(tt)),void 0),"sales-price-style":n(g($(Z)),void 0),"scaled-grid":n(d(),!1),"set-cookie":n(d(),!1),"shop-button-expanded":n(d(),!1),"shop-button-large":n(d(),!1),"shop-button-position":ir,"shop-the-model-ai":n(d(),!1),"shop-the-model-editorial":n(d(),!1),"shop-similar-hotspots":n(d(),!1),"small-item-image":n(d(),!1),"social-proof-action":oh,"social-proof-item-label":cr,"social-proof-outfit-label":cr,"social-proof-threshold":zi,"test-presence":rt,"track-purchase-log-percentage":n(g(h()),void 0),"vertical-anchor-grid":n(d(),!1),"video-play-mode":Gi,"v3-classic":n(d(),!1),"v3-hotspots":n(d(),!1),"widget-variant":Si}),jt=ai(Mt),Na=jt.options.join("|"),dm=Ba.options.join("|");function mm({documentWidth:t,itemCategory:e,moduleType:r,productGroupType:s}={}){return{get documentWidth(){return t??document.documentElement.clientWidth},itemCategory:e,moduleType:r??"unknown",productGroupType:s??"unknown"}}const fm={mobile:xr(-1/0,500),tablet:xr(500,950),desktop:xr(950,1/0)},{mobile:pm,tablet:gm}=fm;function Wa(t){return pm(t)?"mobile":gm(t)?"tablet":"desktop"}function ds(t){const e=new URLSearchParams(t);return{itemCategory:new Set(e.getAll("itemCategory")),moduleType:new Set(e.getAll("moduleType")),productGroupType:new Set(e.getAll("productGroupType")),screenSize:new Set(e.getAll("screenSize"))}}function ms(){return Date.now()-yr-1}const yr=3600*1e3;class fs{static new(e,r){return new this(e,r)}static keys={param:"styliticsoverride",store:V.keys.testOverride};constructor(e,r){this.client=e,this.store=r.store,this.context=r.context,this.schema=this.buildSchema(),this.lookup=this.buildLookup(),this.config=this.getStoredConfig(),this.syncToStore()}get(e){return this.lookup[e]}config;client;context;lookup;schema;store;syncToStore(){return this.overrides.forEach(e=>{e.shouldClearTimestamp?delete this.config[this.client][e.name]:e.shouldStoreTimestamp&&(this.config[this.client][e.name]=Date.now())}),this.store.setTestOverride(JSON.stringify(this.config)),this}getTimestampFor(e){return this.config[this.client][e]}get overrides(){return Object.values(this.lookup)}buildSchema(){return n(Q({[this.client]:bm}),{[this.client]:{}})}buildLookup(){return jt.options.reduce((e,r)=>{const s=ym.new(r,this);return Object.assign(e,{[r]:s})},{})}getStoredConfig(){const e=this.store.getTestOverride(),r=ct(e);return P(this.schema,r)}}class ym{static new(e,r){return new this(e,r)}constructor(e,r){this.name=e,this.overrides=r,this.metadata=Sm[this.name]}name;metadata;overrides;get abException(){if(!(!this.metadata||this.hasHardOverrideValue||!this.hasSoftOverride))return{...vm(this.metadata),timestamp:this.timestamp??Date.now()}}get value(){return this.hardOverrideValue??this.softOverrideValue}get hardOverrideValue(){const e=Ii.new(),r=this.name.replaceAll("-",""),s=e.get(`stylitics-experience-${this.name}-${this.moduleType}`)??e.get(`stylitics-experience-${this.name}`)??e.get(`stylitics-${this.name}`)??e.get(`stylitics-${r}`)??void 0;if(Ie(s))return;let i;switch(this.dataType){case"boolean":i=Qc;break;case"number":i=xn;break;case"string":i=Tn;break;default:i=Nt(!1)}const a=ct(s)||s,o=i(a)?a:i(s)?s:void 0,c=we(Mt.entries[this.name],o);if(c.success)return c.output}get softOverrideValue(){return this.hasSoftOverride?this.metadataValue:void 0}get hasOverride(){return q(this.value)}get hasHardOverrideValue(){return q(this.hardOverrideValue)}get hasSoftOverride(){return this.hasOverrideSearchParam||this.isLive}get shouldStoreTimestamp(){return this.hasOverrideSearchParam}get shouldClearTimestamp(){return!this.hasOverrideSearchParam&&this.isExpired}get context(){return this.overrides.context}get moduleType(){return this.context.moduleType}get hasOverrideSearchParam(){return q(this.searchParamValue)&&q(this.metadata)&&this.searchParamValue===this.metadata.id}get timestamp(){return this.overrides.getTimestampFor(this.name)}get isExpired(){return q(this.timestamp)&&ls.new(this.timestamp,yr).isExpired}get isLive(){return q(this.timestamp)&&ls.new(this.timestamp,yr).isLive}get searchParamValue(){if(!this.metadata)return;const e=Ii.new().get(fs.keys.param),r=we(N(this.metadata.id),e);return r.success?r.output:void 0}get metadataValue(){return this.metadata?.value}get dataType(){const e=Mt.entries[this.name],s=(e.type==="optional"?Uu(e):e).expects;return s.includes(" | ")?typeof ct(s.replaceAll(/[()]/g,"").split(" | ")[0]):s}}const vm=Mc(["applies_to","description","id","reason"]),bm=J(ai(Mt),h()),Sm={"test-presence":{applies_to:"presence",description:"Exclude user from presence test",id:"001",name:"test-presence",reason:"email marketing",value:"present"}};function za(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}za("7c833cef8f876dd0d6b04213"),za("694ba0e109e5fdfe4ac3cbadf27095e75c89590ac83f6ac2631933a8cb29acdf");class Ga{set;update;subscribe;constructor(e=ot()){const{set:r,update:s,subscribe:i}=Ve(e);this.set=r,this.update=s,this.subscribe=i}get value(){return st(this)}refresh(e=ot()){return this.set(P(wm,e)),e}}const wm=b(u(),ei("Stylitics Global Store: Invalid instanceId provided")),_m=n(S({instanceId:Pt(Ga)}),()=>({instanceId:new Ga}));function km(){return globalThis.StyliticsGlobalStore??=kt(_m)}const Va=km(),ps=b(S({...K.entries,browsed:he,maxBrowsedItems:n(h(),10),maxPurchasedItems:n(h(),10),purchased:he,responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:3}],[550,{columns:3}],[730,{columns:4}],[900,{columns:5}]]),sessionId:n(u(),""),itemDetailsModalHeader:n(u(),"Product List"),shopThisLookCTA:n(u(),"Shop This Look")}),y(H),y(L)),Im={defaults:D(S({...ps.entries})),parse:t=>P(ps,j(t)),Schema:ps},gs=b(S({...K.entries,item_number:u(),maxResults:n(N(1),1),minResults:n(N(1),1),addAllToCartCTAPosition:n(R(["bottom","top"]),"bottom"),shoppableAnchorItem:n(d(),!1),showCarouselCardSeparator:n(d(),!0),showCarouselDots:n(d(),!0),salesPriceStyle:n($(Z),Z.strikethrough),addAllToCartCTA:n(u(),"Add All Items to Cart"),modalHeading:n(u(),"Mix & Match"),swapButton:n(u(),"Swap"),swapItemHeading:n(u(),"Swapping")}),y(H),y(L)),Pm={defaults:D(S({...gs.entries})),parse:t=>P(gs,j(t)),Schema:gs},ys=b(S({...K.entries,minResults:n(h(),3),outfit_id:n(g(h()),void 0),cardAspectRatio:n(h(),1.25),carouselAdvancementRate:ie,editorialAspectRatio:n(h(),1),gutterWidth:n(h(),16),isGallery:n(d(),!1),nextOutfitPeek:n(h(),.1),previousOutfitPeek:n(h(),0),productListRevealType:n($(Oe),Oe.slideout),shopTheModelAI:n(d(),!1),showCarouselDots:n(d(),!1),showMobileArrows:n(d(),!1),sizeDropdown:n(d(),!1),mixAndMatchRow:n(d(),!1),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1023,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),backToLookCTA:n(u(),"Back To Look"),seeMoreOptionsCTA:n(u(),"See More Options"),viewDetailsCTA:n(u(),"Shop The Look")}),ye(fe([["item_number"]],Am,"Invalid input: Must provide either item_number, outfit_id, or tags"),["item_number"]),y(H),y(L)),vs={defaults:D(S({...ys.entries})),parse:t=>P(ys,j(t)),Schema:ys};function Am(t){return He(t.dataSource,"trending-bundles")||He(t.dataSource,"outfit-landing-page")&&q(t.outfit_id)||q(t.item_number)||q(t.tags)}const bs=b(S({...K.entries,apparelOnly:n(d(),!1),maxDepartments:n(h(),5),cardAspectRatio:n(h(),1.5),carouselAdvancementRate:ie,gutterWidth:n(h(),12),imageOnHover:n(d(),!1),isGallery:n(d(),!1),nextOutfitPeek:n(h(),0),showAllDepartments:n(d(),!1),showMobileArrows:n(d(),!0),sizeDropdown:n(d(),!1),sessionId:n(u(),""),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:3}],[640,{columns:4}],[1023,{columns:4}],[1280,{columns:5}],[1536,{columns:5}]]),tablistHeading:n(u(),"Style it with"),tablistHeadingLevel:n(be,"h2")}),y(H),y(L)),Em={defaults:D(S({...bs.entries})),parse:t=>P(bs,j(t)),Schema:bs},Ss=b(S({...K.entries,brand:n(g(u()),void 0),browsed:he,category:n(g(u()),void 0),department:n(g(u()),void 0),from_accounts:n(g(u()),void 0),gender:n(g(u()),void 0),item_number:n(g(u()),void 0),maxItems:n(g(h()),20),maxPrice:n(g(h()),void 0),maxResults:n(h(),20),minPrice:n(g(h()),void 0),minResults:n(h(),3),purchased:he,style:n(g(u()),void 0),tags:n(g(u()),void 0),cardAspectRatio:n(h(),1.6),carouselAdvancementRate:ie,gutterWidth:n(h(),16),imageOnHover:n(d(),!1),layout:n(R(["gallery","horizontal","vertical"]),"horizontal"),nextOutfitPeek:n(h(),.3),previousOutfitPeek:n(h(),0),showCarouselDots:n(d(),!1),showMobileArrows:n(d(),!1),sizeDropdown:n(d(),!1),sessionId:n(u(),""),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:2}],[425,{columns:3}],[640,{columns:4}],[1023,{columns:5}],[1280,{columns:6}],[1536,{columns:7}]])}),y(H),y(L)),Tm={defaults:D(S({...Ss.entries})),parse:t=>P(Ss,j(t)),Schema:Ss},ws=b(S({...K.entries,minResults:n(h(),3),carouselAdvancementRate:ie,dynamicOutfitBackground:n(d(),!1),gutterWidth:n(h(),16),horizontalProductList:n(d(),!1),mixAndMatchRow:n(d(),!1),nextOutfitPeek:n(h(),0),previousOutfitPeek:n(h(),0),showMobileArrows:n(d(),!0),sizeDropdown:n(d(),!1),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1023,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),seeMoreOptionsCTA:n(u(),"See More Options"),viewDetailsCTA:n(u(),"View Details")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),xm={defaults:D(S({...ws.entries})),parse:t=>P(ws,j(t)),Schema:ws},_s=b(S({...K.entries,ids:n(u(),""),minResults:n(h(),3),page:b(n(u(),()=>Ka(globalThis?.location?.href??"")),y(Ka)),carouselAdvancementRate:ie,gutterWidth:n(h(),16),nextOutfitPeek:n(h(),0),previousOutfitPeek:n(h(),0),browsed:he,purchased:he,sessionId:n(u(),""),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1024,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),viewItemsCTAText:n(u(),"View Details")}),y(H),y(L)),Cm={defaults:D(S({..._s.entries})),parse:t=>P(_s,j(t)),Schema:_s};function Ka(t){return Er(/^http(s?):\/\//i,"",t)}const ks=b(S({...K.entries,minResults:n(h(),3),cardAspectRatio:n(h(),1.4),collageAnchorItem:n(d(),!1),editorialFirstAnchorItem:n(d(),!1),gapWidth:n(h(),5),gridPeek:n(d(),!1),gridStarter:n(d(),!1),gutterWidthMobile:n(h(),14),hideAnchorItemCard:n(d(),!1),itemInfoAnimation:n(R(["fade","slide"]),"slide"),itemInfoAnimationDuration:n(h(),200),itemInfoImage:n(d(),!1),itemInfoStatic:n(d(),!1),maxGridSize:n(h(),7),mobileItemsCarousel:n(d(),!1),nextOutfitPeekMobile:n(h(),.05),nonEditorialImages:n(d(),!1),originalItemOrder:n(d(),!1),shopTheModelEditorial:n(d(),!1),showMobileArrows:n(d(),!1),showPlusIcon:n(d(),!1),smallItemScaling:n(d(),!1),squareAspectRatio:n(d(),!1),typeScaledGrid:n(d(),!1),verticalAnchorAspectRatio:n(h(),1),verticalAnchorLayout:n(d(),!1),verticalLayout:n(d(),!1),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1023,{columns:3}],[1190,{columns:3}],[1536,{columns:4}]]),counterHeading:n(u(),"Look"),counterHeadingLevel:n(be,"h4"),itemLinkCTA:n(u(),"Shop"),mobileItemsCarouselCTA:n(u(),"Back to Model"),swapCTA:n(u(),"Swap")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Om={defaults:D(S({...ks.entries})),parse:t=>P(ks,j(t)),Schema:ks},Is=b(S({...K.entries,minResults:n(h(),3),cardAspectRatio:n(h(),1.25),carouselAdvancementRate:ie,gutterWidth:n(h(),16),largeItemImage:n(d(),!1),mixAndMatchRow:n(d(),!1),mobileItemsCarousel:n(d(),!1),nextOutfitPeek:n(h(),.1),previousOutfitPeek:n(h(),0),productListRevealType:n($(Oe),Oe.slideout),showMobileArrows:n(d(),!1),sizeDropdown:n(d(),!1),smallItemImage:n(d(),!1),staticItemInfo:n(d(),!1),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[480,{columns:2}],[1023,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),modalHeading:n(u(),"Shop The Look"),seeMoreOptionsCTA:n(u(),"Alternative Options"),viewDetailsCTA:n(u(),"Shop The Look")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Rm={defaults:D(S({...Is.entries})),parse:t=>P(Is,j(t)),Schema:Is},Ps=b(S({...K.entries,minResults:n(h(),1),editorialAnchorItem:n(d(),!1),editorialFirstAnchorItem:n(d(),!1),editorialShopTheModel:n(d(),!1),gutterWidth:n(h(),16),imageAspectRatio:n(h(),1.2),imageOnHover:n(d(),!1),listLayout:n(R(["vertical","horizontal","mobile-gallery","vertical-anchor"]),"horizontal"),mobileVerticalList:n(d(),!1),mobileVisibleCardCount:n(h(),2.5),originalItemOrder:n(d(),!1),shopTheModelAI:n(d(),!1),showPlusIcon:n(d(),!1),sizeDropdown:n(d(),!1),counterDeterminator:n(u(),"of"),counterHeading:n(u(),"look"),counterHeadingLevel:n(be,"h4"),itemLinkCTA:n(u(),""),modalHeading:n(u(),"Similar Items"),modalHeadingLevel:n(be,"h4"),similarItemsButton:n(u(),"Similar Items")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Dm={defaults:D(S({...Ps.entries})),parse:t=>P(Ps,j(t)),Schema:Ps},As=b(S({...K.entries,minResults:n(h(),3),hideDoubleZeroCents:n(d(),!0),roundingStyle:n(g($(tt)),tt.ceiling),salesPriceStyle:n($(Z),Z.salesPriceOnly),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1024,{columns:3}]]),itemDetailsModalHeader:n(u(),"Complete the look"),viewDetailsCTA:n(u(),"View entire look")}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Mm={defaults:D(S({...As.entries})),parse:t=>P(As,j(t)),Schema:As},Es=b(S({...K.entries,allowOutOfStock:n(d(),!0),maxPerItem:n(h(),6),minPerItem:n(h(),3),reMatch:n(d(),!1),retryCount:b(n(h(),0),y(mn(0,10))),carouselAdvancementRate:ie,hotspotsOverlay:n(d(),!1),parentSelector:g(u()),shopButtonMargin:n(h(),5),shopButtonExpanded:n(d(),!1),shopButtonPosition:n(ir,"bottom-right"),skipModeration:n(d(),!1),responsive:n(k(U([h(),S({height:h()})])),[[0,{height:44}],[200,{height:44}],[300,{height:44}],[400,{height:44}]]),anchorItemHeading:n(u(),"Currently Viewing"),anchorItemHeadingLevel:n(be,"h4"),anchorItemLabel:n(u(),"This Item"),itemsHeading:n(u(),"Similar Items"),itemsHeadingLevel:n(be,"h4"),modalHeading:n(u(),"Shop The Look"),shopButtonText:n(u(),"Shop The Look"),viewDetailsCTA:n(u(),"View Details")}),y(L)),jm={defaults:D(S({...Es.entries})),parse:t=>P(Es,j(t)),Schema:Es},Ts=b(S({...K.entries,outfit_id:b(h(),Fr(1)),salesPriceStyle:n($(Z),Z.salesPriceOnly)}),y(H),y(L)),Lm={defaults:D(S({...Ts.entries})),parse:t=>P(Ts,j(t)),Schema:Ts},xs=b(S({...K.entries,item_number:u(),maxResults:n(h(),5),minResults:n(h(),2)}),y(t=>{const e=Math.max(2,t.minResults),r=Math.max(e,t.maxResults);return{...t,maxResults:r,minResults:e}}),y(L)),Fm={defaults:D(S({...xs.entries})),parse:t=>P(xs,j(t)),Schema:xs},Cs=b(S({...K.entries,minResults:n(h(),1),cardAspectRatio:n(h(),1.55),carouselAdvancementRate:ie,gutterWidth:n(h(),16),imageOnHover:n(d(),!1),nextOutfitPeek:n(h(),.2),showCarouselDots:n(d(),!1),showMobileArrows:n(d(),!1),sizeDropdown:n(d(),!1),salesPriceStyle:n($(Z),Z.salesPriceOnly),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:2}],[640,{columns:3}],[864,{columns:4}],[1199,{columns:5}]])}),y(H),y(L)),Um={defaults:D(S({...Cs.entries})),parse:t=>P(Cs,j(t)),Schema:Cs},Os=b(S({...K.entries,maxBrowsedItems:n(h(),10),maxPurchasedItems:n(h(),10),personalizedResults:n(d(),!0),browsed:he,purchased:he,carouselAdvancementRate:b(n(h(),1),y(t=>Math.max(1,t))),defaultTab:n(R(["purchased","browsed"]),"purchased"),sessionId:n(u(),""),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1024,{columns:2}],[1280,{columns:2}]]),fullPageLinkText:n(u(),""),fullPageLinkUrl:n(u(),""),shopThisLookCTA:n(u(),"Shop This Look")}),y(L)),$m={defaults:D(S({...Os.entries})),parse:t=>P(Os,j(t)),Schema:Os},Rs=b(Q({...K.entries,trackingEnv:n($(z),z.production),from_accounts:n(g(u()),void 0),minResults:n(h(),1),bundleBackgroundColor:n(u(),"#fff"),bundleProductList:n(R(["slideout-on-click","product-list-on-click","product-list-on-hover"]),"slideout-on-click"),clickableCarouselAdvancementRate:n(h(),1),clickableCarouselDots:n(d(),!1),clickableCarouselGutterWidth:n(h(),16),clickableCarouselNextItemPeek:n(h(),0),clickableCarouselPreviousItemPeek:n(h(),0),clickableImageMnM:n(d(),!1),mixAndMatch:n(g(d()),void 0),productListMnM:n(d(),!1),swipeableCarouselArrows:n(d(),!1),swipeableCarouselDots:n(d(),!1),swipeableCarouselGutterWidth:n(h(),16),swipeableCarouselLeftPadding:n(h(),0),swipeableCarouselNextItemPeek:n(h(),.275),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1024,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]]),backToLookCTA:n(g(u()),void 0),itemLinkCTA:n(u(),"SHOP"),mnmClose:n(g(u()),void 0),seeMoreOptionsCTA:n(g(u()),void 0),viewDetailsCTA:n(g(u()),void 0)}),y(H),y(L)),qm={defaults:D(S({...Rs.entries})),parse:t=>P(Rs,j(t)),Schema:Rs},Ds=b(Q({...K.entries,trackingEnv:n($(z),z.production),from_accounts:n(g(u()),void 0),minResults:n(h(),1),bundleBackgroundColor:n(u(),"#fff"),bundleProductList:n(R(["slideout-on-click","product-list-on-click","product-list-on-hover"]),"slideout-on-click"),clickableCarouselAdvancementRate:n(h(),1),clickableCarouselDots:n(d(),!1),clickableCarouselGutterWidth:n(h(),16),clickableCarouselNextItemPeek:n(h(),0),clickableCarouselPreviousItemPeek:n(h(),0),clickableImageMnM:n(d(),!1),mixAndMatch:n(g(d()),void 0),itemDetailsModalFooter:n(g(u()),void 0),mobileGalleryLayout:n(d(),!1),productListMnM:n(d(),!1),swipeableCarouselArrows:n(d(),!1),swipeableCarouselDots:n(d(),!1),swipeableCarouselGutterWidth:n(h(),16),swipeableCarouselLeftPadding:n(h(),0),swipeableCarouselNextItemPeek:n(h(),.275),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[600,{columns:2}],[1040,{columns:3}],[1300,{columns:4}]]),responsiveMobile:n(k(U([h(),S({columns:h()})])),[[0,{columns:2}],[600,{columns:3}],[1040,{columns:3}],[1300,{columns:3}]]),backToLookCTA:n(g(u()),void 0),itemDetailsModalFooterCTA:n(g(u()),void 0),itemDetailsModalHeader:n(g(u()),void 0),itemLinkCTA:n(u(),"SHOP"),mnmClose:n(g(u()),void 0),seeMoreOptionsCTA:n(g(u()),void 0),viewDetailsCTA:n(g(u()),void 0)}),y(H),y(L)),Hm={defaults:D(S({...Ds.entries})),parse:t=>P(Ds,j(t)),Schema:Ds},Ms=b(Q({...K.entries,trackingEnv:n($(z),z.production),from_accounts:n(g(u()),void 0),minResults:n(h(),1),with_item_coords:n(d(),!0),bundleBackgroundColor:n(u(),"#fff"),clickableCarouselAdvancementRate:n(h(),1),clickableCarouselDots:n(d(),!1),clickableCarouselNextItemPeek:n(h(),0),clickableCarouselPreviousItemPeek:n(h(),0),hideAnchorItem:n(d(),!0),hotspotsAppearOnLoad:n(g(d()),!1),hotspotsIcon:n(g(u()),"eye"),hotspotsOverlayOrder:n(k(k(u())),[["name"],["name","price"]]),hotspotsPersist:n(g(d()),!1),hotspotsShowProductListCTA:n(d(),!0),swipeableCarouselLeftPadding:n(h(),0),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1100,{columns:3}]]),itemDetailsModalHeader:n(g(u()),void 0),itemLinkCTA:n(u(),"SHOP"),viewDetailsCTA:n(g(u()),void 0)}),y(H),y(L)),Bm={defaults:D(S({...Ms.entries})),parse:t=>P(Ms,j(t)),Schema:Ms},js=b(S({...K.entries,minResults:n(h(),1),backgroundColor:n(R(["consistent","expressive"]),"expressive"),backgroundPattern:n(g(R(["grainy","leaves","scribbles","waves","plaid"])),void 0),badgeType:n(g(R(["mood","season","interior","trend"])),void 0),cardAspectRatio:n(h(),1.4),cardDesign:n(R(["clean","eclectic"]),"eclectic"),carouselAdvancementRate:ie,clientOriginalImages:n(d(),!1),editorialAnchorItem:n(d(),!1),gutterWidth:n(h(),16),hideAnchorItem:n(d(),!1),itemOrder:n(R(["default","random"]),"default"),nextOutfitPeek:n(h(),.1),productType:n(R(["apparel","home"]),"apparel"),shopTheModelEditorial:n(d(),!1),showCarouselDots:n(d(),!1),showMobileArrows:n(d(),!1),hideDoubleZeroCents:n(d(),!0),responsive:n(k(U([h(),S({columns:h()})])),[[0,{columns:1}],[640,{columns:2}],[1023,{columns:3}],[1280,{columns:4}],[1536,{columns:5}]])}),ye(fe([["item_number"],["tags"]],_e,"Invalid input: Must provide either item_number or tags"),["item_number"]),y(H),y(L)),Nm={defaults:D(S({...js.entries})),parse:t=>P(js,j(t)),Schema:js};z.staging+"",z.production+"";function Ls(t){let e,r;return typeof t=="string"?(r=document.getElementById(t)??document.querySelector(t)??void 0,e=t):(r=t,e=t.constructor.name),r==null&&A.error(`Could not find target ID/element for provided target: "${e}"`),r}class at{static from(e){if(e===nr)return new Fs(document.createElement("div"),document);if(typeof e=="string")return at.from(Ls(e));if(e instanceof Element){const r=e.getRootNode();return r instanceof Document?new Fs(e,r):r instanceof ShadowRoot?new Wm(e,r):(A.warn("The root node of the provided target is not of type ShadowDom or Document. Falling back to Document as the root."),new Fs(e,document))}throw new Error(`Stylitics: target must be an instance of Element. Received: "${e}"`)}cleanupStack;scriptParent;target;constructor(e){this.target=e,this.cleanupStack=_i.new(),this.scriptParent=document.body}attachScript(e){return this.scriptParent.append(e),e}createScript(e){const{src:r,type:s="module",async:i=!0,onload:a}=e;return Object.assign(document.createElement("script"),{async:i,onload:a,src:r,type:s})}removeScript(e){return this.scriptParent.contains(e)?this.scriptParent.removeChild(e):A.warn("Attempted to remove a script that is not attached to the document body."),e}attachStylesheet(e){return Array.from(this.stylesheetParent.querySelectorAll('link[rel="stylesheet"]')).some(r=>r.href===e.href)?(A.warn("Stylesheet already attached, skipping attachment."),e):(this.stylesheetParent.appendChild(e),this.cleanupStack.push(()=>this.removeStylesheet(e)),e)}attachStylesheetFromHref(e){const r=this.createStylesheet(e);return this.attachStylesheet(r)}createStylesheet(e){return Object.assign(document.createElement("link"),{href:e,rel:"stylesheet",type:"text/css"})}removeStylesheet(e){return this.stylesheetParent.contains(e)?this.stylesheetParent.removeChild(e):A.warn("Attempted to remove a stylesheet that is not attached to the root element."),e}cleanup(){this.cleanupStack.runAll()}getTarget(e){if(e===void 0)return;let r;if(typeof e=="string"){const s=/^[a-zA-Z][a-zA-Z0-9\-_:.]*$/;let i;e.startsWith("#")?i=e:s.test(e)?i=`#${e}`:i=e;try{r=this.root.querySelector(i)??void 0}catch(a){A.warn(`Invalid selector: ${i}`,a),r=void 0}}else r=e;return r}}class Fs extends at{root;stylesheetParent;constructor(e,r){super(e),this.root=r,this.stylesheetParent=this.root.head,this.target=e}get visibleRoot(){return this.root.body}}class Wm extends at{root;stylesheetParent;constructor(e,r){if(r.mode!=="open")throw new Error("Stylitics: ShadowRoot must be in open mode.");super(e),this.root=r,this.stylesheetParent=this.root,this.target=e}get visibleRoot(){return this.root}}function zm(t){return t.extend({api:({env:e},r)=>r(new mr({env:e})),baseUiContext:({clientCallbacks:e,clientOverrides:r,enrichedItemDataLookup:s,enrichedOutfitDataLookup:i,logger:a,resizeObserver:o,windowListener:c},l)=>l({clientCallbacks:e,clientOverrides:r,enrichedItemDataLookup:s,enrichedOutfitDataLookup:i,logger:a,...o.stores,...c.stores}),browsedItems:({client:e,localStore:r},s)=>s(ar.new(e,r)),client:"demo",clientCallbacks:({},e)=>e(new Ot),clientOverrides:({},e)=>e(new Ot),consoleDebug:async({},e)=>{const r=vi.spyOn(A,"debug").mockImplementation(vi.fn());await e(r),r.mockRestore()},consoleError:async({},e)=>{const r=vi.spyOn(A,"error").mockImplementation(vi.fn());await e(r),r.mockRestore()},consoleInfo:async({},e)=>{const r=vi.spyOn(A,"info").mockImplementation(vi.fn());await e(r),r.mockRestore()},consoleLog:async({},e)=>{const r=vi.spyOn(A,"log").mockImplementation(vi.fn());await e(r),r.mockRestore()},consoleWarn:async({},e)=>{const r=vi.spyOn(A,"warn").mockImplementation(vi.fn());await e(r),r.mockRestore()},cookieStore:({enableStorage:e},r)=>r(te.new({enableStorage:e})),enableStorage:!0,enableTracking:!0,env:({},e)=>e(z.staging),experimentContext:({},e)=>e({documentWidth:1e3,productGroupType:"item_number",moduleType:"classic"}),locale:xt.enUS,localStore:({enableStorage:e},r)=>r(V.new({enableStorage:e})),logger:({stylitics:e},r)=>r(e.logger),engagementsApi:async({env:e},r)=>{const s=new Rd({env:e});vi.spyOn(s,"queueEngagement").mockReturnValue(void 0),vi.spyOn(s,"sendEngagement").mockReturnValue(void 0),await r(s)},enrichedItemDataLookup:({},e)=>e(new Map),enrichedOutfitDataLookup:({},e)=>e(new Map),engagementsHandler:({eventContext:e},r)=>r(new lm(e)),eventContext:({engagementsApi:e,eventContextData:r},s)=>s({clientCallbacks:new Ot,engagementsApi:e,eventContextData:r,isTrackingEnabled:!0}),eventContextData:({locale:e},r)=>r({account_id:960,amp_account_id:960,amp_account_username:"test-username",client_user_id:"asdf",experience_config:{},instance_id:"asdf",locale:e,page_url:"http://localhost:3000/",placement:"cart",screen_height:456,screen_width:123,session_id:"qwerty",touch_device:!0,widget_subtype:Oa.module,widget_type:"widget_type",widget_version:"widget_version"}),experiments:({api:e,client:r,experimentContext:s,session:i,localStore:a},o)=>o(Dt.new({api:e,client:r,context:s,session:i,store:a})),pdpEventContext:({eventContext:e,pdpEventContextData:r},s)=>s(ne(e,{eventContextData:r})),pdpEventContextData:({eventContextData:e},r)=>r(ne(e,{pdp_item_id:1234,pdp_item_remote_id:"asdf"})),purchasedItems:({client:e,localStore:r},s)=>s(or.new(e,r)),resizeObserver:({target:e},r)=>r(Hl(e)),session:({cookieStore:e,localStore:r},s)=>s(new pr({cookieStore:e,localStore:r})),stylitics:async({},e)=>{await e(Ke.getOrInit()),Ke.destroy(),V.new().clear(),te.new().clear()},target:async({},e)=>{const r=globalThis.document.createElement("div");globalThis.document.body.appendChild(r),await e(r),r.remove()},windowListener:({},e)=>e(new Bl)})}Se(zm,Gm);function Gm(t){throw new Error("You are trying to use `extendItWithApiData` in production. This is not allowed. Please remove this from your code.")}Ne(Map),Ne(Function),Ne(Set),Ne(Symbol),ln([Ne(String),Ne(Number),Ne(Boolean),Ne(Symbol)]);var Us=(t=>(t.composer="composer",t.loader="loader",t))(Us||{});const Qe="https://web-assets.stylitics.com/",X="2025.10.30.421477a2ea",O="421477a2ea",Cf="http://localhost:9999",ft={"anchor-items-gallery":{type:"anchor-items-gallery",classname:"StyliticsAnchorItemsGalleryWidget",css:`anchor-items-gallery/${O}/anchor-items-gallery.css?version=${X}`,js:`anchor-items-gallery/${O}/anchor-items-gallery.internal.js`,Params:Im},beauty:{type:"beauty",classname:"StyliticsBeautyWidget",css:`beauty/${O}/beauty.css?version=${X}`,js:`beauty/${O}/beauty.internal.js`,Params:Pm},classic:{type:"classic",classname:"StyliticsClassicWidget",css:`classic/${O}/classic.css?version=${X}`,js:`classic/${O}/classic.internal.js`,Params:vs},control:{type:"control",classname:"StyliticsControlWidget",css:`control/${O}/control.css?version=${X}`,js:`control/${O}/control.internal.js`,Params:vs},"complementary-items":{type:"complementary-items",classname:"StyliticsComplementaryItemsWidget",css:`complementary-items/${O}/complementary-items.css?version=${X}`,js:`complementary-items/${O}/complementary-items.internal.js`,Params:Em},"cross-sell":{type:"cross-sell",classname:"StyliticsCrossSellWidget",css:`cross-sell/${O}/cross-sell.css?version=${X}`,js:`cross-sell/${O}/cross-sell.internal.js`,Params:Tm},"dimension-collage":{type:"dimension-collage",classname:"StyliticsDimensionCollageWidget",css:`dimension-collage/${O}/dimension-collage.css?version=${X}`,js:`dimension-collage/${O}/dimension-collage.internal.js`,Params:xm},"dynamic-galleries":{type:"dynamic-galleries",classname:"StyliticsDynamicGalleriesWidget",css:`dynamic-galleries/${O}/dynamic-galleries.css?version=${X}`,js:`dynamic-galleries/${O}/dynamic-galleries.internal.js`,Params:Cm},gallery:{type:"gallery",classname:"StyliticsGalleryWidget",css:`v3-gallery/${O}/gallery.css?version=${X}`,js:`v3-gallery/${O}/gallery.internal.js`,Params:Hm},grid:{type:"grid",classname:"StyliticsGridWidget",css:`grid/${O}/grid.css?version=${X}`,js:`grid/${O}/grid.internal.js`,Params:Om},hotspots:{type:"hotspots",classname:"StyliticsHotspotsWidget",css:`hotspots/${O}/hotspots.css?version=${X}`,js:`hotspots/${O}/hotspots.internal.js`,Params:Rm},list:{type:"list",classname:"StyliticsListWidget",css:`list/${O}/list.css?version=${X}`,js:`list/${O}/list.internal.js`,Params:Dm},moodboard:{type:"control",classname:"StyliticsControlWidget",css:`control/${O}/control.css?version=${X}`,js:`control/${O}/control.internal.js`,Params:vs},nike:{type:"nike",classname:"StyliticsNikeWidget",css:`nike/${O}/nike.css?version=${X}`,js:`nike/${O}/nike.internal.js`,Params:Mm},"shop-similar":{type:"shop-similar",classname:"StyliticsShopSimilarWidget",css:`shop-similar/${O}/shop-similar.css?version=${X}`,js:`shop-similar/${O}/shop-similar.internal.js`,Params:jm},"shop-the-outfit":{type:"shop-the-outfit",classname:"StyliticsShopTheOutfitWidget",css:`shop-the-outfit/${O}/shop-the-outfit.css?version=${X}`,js:`shop-the-outfit/${O}/shop-the-outfit.internal.js`,Params:Lm},"shop-the-set":{type:"shop-the-set",classname:"StyliticsShopTheSetWidget",css:`shop-the-set/${O}/shop-the-set.css?version=${X}`,js:`shop-the-set/${O}/shop-the-set.internal.js`,Params:Fm},"similar-styles":{type:"similar-styles",classname:"StyliticsSimilarStylesWidget",css:`similar-styles/${O}/similar-styles.css?version=${X}`,js:`similar-styles/${O}/similar-styles.internal.js`,Params:Um},"styled-for-you":{type:"styled-for-you",classname:"StyliticsStyledForYouWidget",css:`styled-for-you/${O}/styled-for-you.css?version=${X}`,js:`styled-for-you/${O}/styled-for-you.internal.js`,Params:$m},"v3-classic":{type:"v3-classic",classname:"StyliticsV3ClassicWidget",css:`v3-classic/${O}/v3-classic.css?version=${X}`,js:`v3-classic/${O}/v3-classic.internal.js`,Params:qm},"v3-hotspots":{type:"v3-hotspots",classname:"StyliticsV3HotspotsWidget",css:`v3-hotspots/${O}/v3-hotspots.css?version=${X}`,js:`v3-hotspots/${O}/v3-hotspots.internal.js`,Params:Bm},vibe:{type:"vibe",classname:"StyliticsVibeWidget",css:`vibe/${O}/vibe.css?version=${X}`,js:`vibe/${O}/vibe.internal.js`,Params:Nm}},Qa=St(Ue("classname"),Object.values(ft));function Ja(t,e){return ft[t].Params.parse(e)}const pt={...ft,"shop-similar":{...ft["shop-similar"],classname:"StyliticsShopSimilarWidgetCompat"}},Vm={...St(Ue("classname"),Object.values(pt)),StyliticsShopSimilarWidget:pt["shop-similar"]},vr=J(u(),er()),Xa=ze(Q({...K.entries}),["env","enableStorage","enableTracking","trackingEnv"]);function Km(t){return rr(Xa,{...D(Xa),...t})}const Za=Vi(),Ya=n(b(J(u(),T()),y(j)),{});function eo(t){return b(S({client:b(u(),N(t)),username:g(b(u(),N(t))),env:g($(z),z.production),target:g(Za,void 0),htmlSelector:g(u()),config:S({on:g(vr,{}),override:g(vr,{}),sharedParams:g(Ya,{}),modules:k(S({client:g(u()),configId:g(u()),on:g(vr,{}),override:g(vr,{}),params:g(Ya,{}),target:g(Za),htmlSelector:g(u()),type:Ba}))})}),Xt(e=>{const r=e.config.modules.filter(o=>o.type==="nike");if(!(r.length>0))return!0;const i=r.every(o=>!o.client||o.client.includes("nike"));return e.client.includes("nike")&&i},"Invalid module type received."))}function $s(t){return b(eo(t),y(e=>({...e,target:Jm(e.config.modules,e.target)})),y(e=>{const r=rr(n($(z),e.env),e.config.sharedParams.env??e.config.sharedParams.trackingEnv);return{...e,config:{...e.config,sharedParams:Km({...e.config.sharedParams,env:r,trackingEnv:r})}}}),y(e=>({...e,config:{...e.config,modules:e.config.modules.map(r=>({...r,params:ne(r.params,e.config.sharedParams)}))}})))}function to(t,e){const r=eo(t).entries.config.entries,s=Hr(r.modules.item),i=S({...r,modules:g(k(s),[])});return b(i,y(a=>{const o=e.modules,c=a.modules,l={...e,...a,modules:o,on:{...e.on,...a.on},override:{...e.override,...a.override},sharedParams:ne(e.sharedParams,a.sharedParams)};return a.modules.some(f=>q(f.configId))??!1?c.forEach((f,p)=>{if(!f.configId){A.warn(`config.modules[${p}].configId was not provided. Skipping refresh for this module.`);return}const v=o.findIndex(_=>_.configId===f.configId);if(v===-1){A.warn(`No current module exists with configId of "${f.configId}". Skipping refresh for this module.`);return}const w=o[v];l.modules[v]=ro(w,f,a.sharedParams)}):o.forEach((f,p)=>{const v=c[p];if(v)l.modules[p]=ro(f,v,a.sharedParams);else{const w=ne(f,{params:a.sharedParams});l.modules[p]=w}}),l}))}function ro(t,e,r={}){return{...t,...e,on:ne(t.on,e.on??{}),override:ne(t.override,e.override??{}),params:Qm(t.params,e.params,r)}}function Qm(t,e={},r={}){const s=xc(t,e);return ne(s,r)}function Jm(t,e){if(e!==void 0)return e;if(!(t.length===1&&t[0].type==="shop-similar"))throw new Error("Stylitics: target is required");const s=document.createElement("div");return s.id="stylitics-unused-composer-root-target",s}function so(t,e,r){if((e.type==="beauty"||e.params.showPlusIcon===!0)&&["macys","bloomingdales"].includes(t.client))return e;const s=t.getValueFor("widget-variant"),i=t.context.productGroupType==="tags",a=Ie(s)||i?e.type:r[s].type;return t.context.moduleType=a,{...e,type:a}}function no(t,e){if(!(e.type==="hotspots"&&t.getValueFor("v3-hotspots")))return e;const s="v3-hotspots";return t.context.moduleType=s,{...e,type:s}}function io(t,e){if(!(e.type==="classic"&&t.getValueFor("v3-classic")))return e;const s="v3-classic";return t.context.moduleType=s,{...e,type:s}}function ao({moduleConfig:t,experimentData:e}){let r=t.type;const s=(e.taxonomies.itemDepartment??"").toLowerCase();return Fa.has(s)&&(r="beauty"),{...t,type:r}}function oo({experiments:t,moduleConfig:e,experimentData:r}){const s=t.getValueFor("macys-category"),i=t.getValueFor("macys-category-all");if(s){let a="Pair it with",o="list";const c=(r.taxonomies.itemDepartment??"").toLowerCase(),l=ml(r.taxonomies.allItemsDepartments,"fragrance"),m=r.taxonomies.allRetailerCategories.some(f=>!["health & beauty","cosmetics"].includes(f));return Fa.has(c)&&!l&&!m&&i&&(o="beauty",a="Enjoy every step of your routine"),c==="fragrance"&&l&&["macys","bloomingdales"].includes(t.client)&&(a="More of what you're looking for"),t.context.moduleType=o,{...e,type:o,params:{...e.params,counterHeading:"Bundle",hideAnchorItemCard:!1,moduleHeading:a,moduleHeadingLevel:"h3",shoppableAnchorItem:!0,showCarouselDots:!0}}}return t.context.moduleType=e.type,e}function co({experiments:t,moduleConfig:e,experimentData:r}){let s=e.type,i="Pair it with";const a="h3";let o=e.params.maxResults,c=e.params.minResults,l=e.params.showPlusIcon;const m=r.taxonomies.itemCategory??"";function f(_,I){const E=[];for(const C of _){if(!Object.keys(I).includes(C.category)||E.includes(I[C.category]))return!1;E.push(I[C.category])}return!0}const p=r.outfits?.[0]?.items??[],v=Object.keys(Zr).includes(m)&&p.length===5&&f(p,Zr),w=Object.keys(Yr).includes(m)&&p.length===5&&f(p,Yr);return v?i="Set your table":w&&(i="Build your bed"),(v||w)&&(t.context.moduleType=s,o=1,c=1,s="list",l=!0),{...e,type:s,params:{...e.params,maxResults:o,minResults:c,moduleHeading:i,moduleHeadingLevel:a,showPlusIcon:l}}}function uo(t,e){const r=t.getValueFor("mix-and-match");return Ie(r)?e:ne(e,{params:{mixAndMatch:r}})}function Xm(t,e){const r=t.getValueFor("item-link-cta");return Ie(r)?e:ne(e,{params:{itemLinkCTA:r}})}function Zm(t,e){return ne(e,{params:Tc((r,s)=>s??r,e.params,{hideDoubleZeroCents:t.getValueFor("hide-double-zero-cents"),roundingStyle:t.getValueFor("rounding-style"),salesPriceStyle:t.getValueFor("sales-price-style")})})}function qs(t,e){const r=Qr.has(t.type)?"pz":gh(t.params);return{documentWidth:document.documentElement.clientWidth,moduleType:t.type,productGroupType:r,...e}}async function lo({api:t,browsedItems:e,client:r,experiments:s,moduleConfig:i,purchasedItems:a,sessionId:o}){const c={taxonomies:{allItemsCategories:[],allItemsDepartments:[],allRetailerCategories:[],itemCategory:void 0,itemDepartment:void 0}};if(Ie(i.params.item_number))return c;const l={client_user_id:Ym(s,i.params),item_number_type:i.params.item_number_type,item_number:i.params.item_number,locale:i.params.locale,max:i.params.maxResults,min:i.params.minResults,price_hide_double_zero_cents:i.params.hideDoubleZeroCents,price_rounding:i.params.roundingStyle,profile:i.type,return_object:!0,session_id:o,tags:i.params.tags,total:i.params.maxResults,username:r,with_item_coords:!0,...Hd({browsedItems:e,purchasedItems:a,experienceConfig:s.experiences,sessionId:o}),...s.experiences,...s.config},m=i.params.item_number;let f,p,v=[];if(i.type==="shop-the-set"){const w=await t.fetchShopTheSet({useFixture:!1,searchParams:{...l,with_item_coords:!1},parseOptions:i.params});w.data&&(v=w.data.itemGroups.flat())}else if(["gallery","v3-classic","v3-hotspots"].includes(i.type)){const w=await t.fetchOutfitsLegacy({searchParams:l});if(w.data){const _=w.data.outfits?.[0]||{};v=_?.items||[],f=_?.primary_stylitics_item_id,p=_?.primary_remote_id}}else{const w=await t.fetchOutfits({useFixture:!1,searchParams:l,parseOptions:i.params});if(w.data){c.outfits=w.data.outfits;const _=w.data.outfits?.[0]||{};v=_?.items||[],f=_?.primary_stylitics_item_id,p=_?.primary_remote_id}}for(const w of v)w.category&&c.taxonomies.allItemsCategories.push(w.category.toLowerCase()),w.department&&c.taxonomies.allItemsDepartments.push(w.department.toLowerCase()),w.retailer_category&&c.taxonomies.allRetailerCategories.push(w.retailer_category.split(" > ")[0].toLowerCase()),[w.item_id,w.remote_id,w.product_id].some(_=>_&&[m,f,p].includes(_))&&(c.taxonomies.itemCategory=w.category,c.taxonomies.itemDepartment=w.department);return c}function Ym(t,e){return rr(b(S({profileIdPath:n(g(u()),void 0),clientUserId:n(g(b(u(),Zt())),void 0)}),y(({profileIdPath:r,clientUserId:s})=>{const i=t.getValueFor("profile-id-path")??r,a=(Ri(i)||s)?.toString();return a&&Fi(a)})),e)}function ef(t,e,r){let s=e,i;return{construct(a,o){i=nf(e,o),["macys","bloomingdales"].includes(i[0])&&(i[2]=ne(e.appliedExperimentParameters,i[2]));const[c,l,m]=i,f=at.from(l);if(s=sf(s,t,m),t.beforeLoad({moduleInstanceRecord:r,moduleRecord:e,moduleParams:i,rootManager:f}),t.registerModule(e,!0),r.queue.push(()=>{const{source:p}=e;p&&(r.instance=Reflect.construct(p,[...i,{api:t.api,session:t.session}]),t.afterLoad({moduleInstanceRecord:r,moduleRecord:e,moduleParams:i,rootManager:f}))}),e.source)r.instance=Reflect.construct(e.source,[...i,{api:t.api,session:t.session}]),t.afterLoad({moduleInstanceRecord:r,moduleRecord:e,moduleParams:i,rootManager:f});else{if(e.downloading)return r.proxy;e.downloading=!0,t.getExperiments(i).then(async p=>{const[v,w]=await rf({api:t.api,sessionId:t.session.id,client:c,experiments:p,moduleRecord:e,params:m});s=t.moduleIndex[v]||e,e.appliedExperimentParameters=w,i=[c,l,w];const _=tf({classnameAlias:s.classname,experiments:p,moduleInstanceRecord:r,loader:t,moduleParams:i,moduleRecord:e,rootManager:f});t.attachModuleScript(s,_),t.duringLoad({moduleRecord:s,moduleInstanceRecord:r,experiments:p,rootManager:f})})}return e.downloading=!1,r.proxy},apply:()=>r.proxy,get(a,o){return o==="isProxy"?!0:Object.prototype.hasOwnProperty.call(r,"instance")?(...c)=>{if((r?.instance||{})[o])return Reflect.apply((r?.instance||{})[o],r.instance,c)}:function(...c){r.queue.push(()=>{(r?.instance||{})[o]&&Reflect.apply((r?.instance||{})[o],r.instance,c)})}}}}function tf({classnameAlias:t,experiments:e,loader:r,moduleInstanceRecord:s,moduleRecord:i,moduleParams:a,rootManager:o}){return function(){i.source=window[t||i.classname],r.onLoad({moduleRecord:i,moduleInstanceRecord:s,experiments:e,rootManager:o}),Object.values(i.instanceRecords).map(l=>{let m;for(;m=l.queue.shift(),m;)window.requestAnimationFrame(m)}),r.afterLoad({moduleInstanceRecord:s,moduleRecord:i,moduleParams:a,rootManager:o})}}async function rf({api:t,client:e,experiments:r,moduleRecord:s,params:i,sessionId:a}){const o=P($s(e).entries.config.entries.modules.item,{type:Qa[s.classname].type,params:i});let c={taxonomies:{allItemsCategories:[],allItemsDepartments:[],allRetailerCategories:[],itemCategory:void 0,itemDepartment:void 0}};function l(m){r.context=qs(m,c.taxonomies)}return Promise.resolve(o).then(Se($e(l),m=>no(r,m),m=>io(r,m),$e(l))).then(async m=>{const f={...m,params:Ja(m.type,i)};c=await lo({api:t,browsedItems:ar.new(e,r.store).get(),client:e,experiments:r,moduleConfig:f,purchasedItems:or.new(e,r.store).get(),sessionId:a});const p=r.getValueFor("beauty-widget-apply"),v=r.getValueFor("enhanced-list-plus");return p?ao({moduleConfig:m,experimentData:c}):v?co({experiments:r,moduleConfig:m,experimentData:c}):oo({experiments:r,moduleConfig:m,experimentData:c})}).then(Se($e(l),m=>so(r,m,Qa),m=>uo(r,m),m=>Zm(r,m),m=>Xm(r,m),$e(l),m=>{const{classname:f}=ft[m.type],p=ne(o.params||{},m.params||{});return[f,p]}))}function sf(t,e,r){const s=P(n(d(),!1),r.enableDimensionUI);return new Set(["StyliticsClassicWidget","StyliticsV3ClassicWidget"]).has(t.classname)&&s?e.moduleIndex.StyliticsDimensionCollageWidget:t}function nf(t,e){if(t.type==="shop-similar"){const[o,c]=e,l=j(c);return[o,nr,l]}const[r,s,i]=e,a=j(i);return[r,s,a]}function af(t,e){if([...document.scripts].some(i=>i?.src?.includes("moderation")))return;const r=document.createElement("script");if(r.async=!0,r.type="module",r.onload=()=>setTimeout(()=>{of(t,e).catch(A.error)},500),r.src=ho.js,document.body.insertAdjacentElement("beforeend",r),[...document.styleSheets].some(i=>i?.href?.includes("moderation")))return;const s=document.createElement("link");s.rel="stylesheet",s.href=ho.css,document.head.insertAdjacentElement("beforeend",s)}const ho={js:`${Qe}moderation/${O}/moderation.internal.js`,css:`${Qe}moderation/${O}/moderation.css`};async function of(t,e){(await window.StyliticsModerationWidget.initialize({client:t,params:e})).render()}function cf(){const t=new URLSearchParams(window.location.search).get("stylitics-moderator");return t&&P(lf,t)?t:null}const uf={key:{user:"StyliticsModerationUser",state:"StyliticsModerationState"},get(){return{user:localStorage.getItem(this.key.user),state:localStorage.getItem(this.key.state)}},set(){const t=cf();return t&&(localStorage.setItem(this.key.user,t),localStorage.setItem(this.key.state,"enabled")),this}},lf=b(u(),Vn());function mo({experiments:t,moduleRecords:e,pattern:r=df,rootManager:s}){const a=[...s.root.querySelectorAll('link[rel="stylesheet"]')].some(p=>p?.href?.match(r)),o=e.length>1||t.getValueFor("css-theme")||t.getValueFor("css-experiment"),c=Qe;new URL(`${c}${e[0].type}.css`);const l=new URL(e[0].css),m=em({host:c,urlArgs:{base:mf(e),experiments:t.getValueFor("css-experiment"),theme:t.getValueFor("css-theme"),version:O}}),f=o?m:l;if(!a){const p=s.createStylesheet(f.href),v=setTimeout(()=>{p.remove(),A.error(`Timeout loading CSS file ${f.href}`)},1e4);p.addEventListener("load",()=>clearTimeout(v)),p.addEventListener("error",w=>{clearTimeout(v),p.remove(),A.error("Failed to load stylesheet",w),A.log("Attempting to load fallback stylesheet"),e.forEach(_=>hf(_,s))}),s.attachStylesheet(p)}}function hf(t,e){const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=new URL(t.css).href,e.attachStylesheet(r)}const df=new RegExp(`(stylitics|localhost).*style(-.*)?.css$|stylitics.+(${O}|style.css)$`);function mf(t){return t.map(e=>e.js.includes("v3")&&!e.type.includes("v3")?`v3-${e.type}`:e.type).join(",")}const ff="stylitics-product-loader",pf=/(?:\/)[^/?#]+(?=[^/]*$)/,Lt="stylitics-loader-preloading";class Hs{api;async;callbacks;events={};moduleIndex;script;session;cookieStore;localStore;env=z.production;constructor({async:e,callbacks:r,debug:s=!1,id:i=ff}={}){this.cookieStore=te.new(),this.localStore=V.new(),this.session=new pr({localStore:this.localStore}),this.api=new mr({env:this.env}),this.async=e===void 0?!0:e,this.script=document.getElementById(i)||document.currentScript,this.callbacks=r||{},this.moduleIndex=hn(ft).reduce((a,o)=>({...a,[o.classname]:{...o,appliedExperimentParameters:{},css:Qe+o.css,downloading:!1,instanceRecords:[],js:Qe+(s?o.js.replace("release","debug"):o.js)}}),{}),hn(this.moduleIndex).forEach(a=>this.registerModule(a))}registerModule(e,r=!1){const s={queue:[]};e.instanceRecords.push(s);const i=ef(this,e,s);s.proxy=new Proxy(class{},i),window[e.classname]?window[e.classname]?.isProxy?r&&(window[e.classname]=s.proxy):e.source=window[e.classname]:window[e.classname]=s.proxy}pageHasMatchingScript(e){const r=e.js.match(pf)?.toString()||"",s=new RegExp(`stylitics.+${O}${r}$`);return[...document.scripts].some(a=>a?.src?.match(s))}attachModuleScript(e,r){const s=this.script;if(!this.pageHasMatchingScript(e)){const i=document.createElement("script");i.async=this.async,i.type="module",i.onload=r,i.src=e.js,s&&s.insertAdjacentElement("afterend",i),this.pageHasMatchingScript(e)||document.head.insertAdjacentElement("beforeend",i)}}async getExperiments([e,,r]){const s=e,i=mm({moduleType:"loader",productGroupType:"unknown"}),a=Ct(r);return this.localStore.enableStorage=a,this.cookieStore.enableStorage=a,Dt.initialize({api:this.api,client:s,context:i,session:this.session,store:this.localStore}).catch(o=>(A.error("Failed to fetch experiences.",o),Dt.new({api:this.api,client:s,context:i,session:this.session,store:this.localStore})))}on(e,r,s){this.events[e]||=[],this.events[e].push(s?[On(s),r]:r)}emit(e,r,s){this.events[e]||=[],this.events[e].map(i=>{(typeof i=="function"?i:i[0].includes(s)?i[1]:zt)(r||[],s)})}onLoad(e){this.callbacks.onLoad?.({...e,loader:this})}duringLoad({experiments:e,moduleInstanceRecord:r,moduleRecord:s,rootManager:i}){this.callbacks.duringLoad?.({experiments:e,loader:this,moduleRecord:s,moduleInstanceRecord:r,rootManager:i}),mo({experiments:e,moduleRecords:[s],rootManager:i})}beforeLoad({moduleInstanceRecord:e,moduleParams:r,moduleRecord:s,rootManager:i}){if(this.callbacks.beforeLoad?.({loader:this,moduleInstanceRecord:e,moduleParams:r,moduleRecord:s,rootManager:i}),!document.getElementById(Lt)){const o=document.createElement("style");o.textContent=` .${Lt} { display: block; width: 100%; height: 540px; }`,o.id=Lt,document.head.appendChild(o)}const[,a]=r;if(a!==nr){const o=Ls(a);o&&"classList"in o&&o.classList.add(Lt)}}afterLoad({moduleInstanceRecord:e,moduleParams:r,moduleRecord:s,rootManager:i}){this.callbacks.afterLoad?.({loader:this,moduleInstanceRecord:e,moduleParams:r,moduleRecord:s,rootManager:i});const[a,o,c]=r;if(o!==nr){const f=Ls(o);f&&"classList"in f&&f.classList.remove(Lt)}const{user:l,state:m}=uf.set().get();l&&m=="enabled"&&af(a,c)}}const gf=/(\S+)|(.)/g,yf=/[\.#][\p{L}\p{N}]/u,vf=new RegExp("\\p{Ll}(?=[\\p{Lu}])","u"),bf=/[\p{L}\p{N}]+/gu,Sf=new RegExp("^([^\\p{L}])*(?:\\p{L}\\.){2,}([^\\p{L}])*$","u"),wf=new Set(["—","–","-","―","/"]),fo=new Set([".","!","?"]),_f=new Set([...fo,":",'"',"'","”"]),kf=new Set(["a","an","and","as","at","because","but","by","en","for","if","in","neither","nor","of","on","only","or","over","per","so","some","than","that","the","to","up","upon","v","versus","via","vs","when","with","without","yet"]);function Of(t,e={}){const{locale:r=void 0,sentenceCase:s=!1,sentenceTerminators:i=fo,titleTerminators:a=_f,smallWords:o=kf,wordSeparators:c=wf}=typeof e=="string"||Array.isArray(e)?{locale:e}:e,l=s?i:a;let m="",f=!0;for(const p of t.matchAll(gf)){const{1:v,2:w,index:_=0}=p;if(w){m+=w;continue}if(yf.test(v)){const I=v.match(Sf);if(I){const[E,C="",ee=""]=I;m+=s&&!f?v:po(v,C.length,r),f=l.has(ee.charAt(0));continue}m+=v,f=l.has(v.charAt(v.length-1))}else{const I=Array.from(v.matchAll(bf));let E=v,C=!1;for(let ee=0;ee0&&(!c.has(v.charAt(Fe-1))||o.has(Ae)&&c.has(qe)))continue}E=po(E,Fe,r)}m+=E,f=C||l.has(v.charAt(v.length-1))}}return m}function po(t,e,r){return t.slice(0,e)+t.charAt(e).toLocaleUpperCase(r)+t.slice(e+1)}const go="composer",yo="421477a2ea";class Bs{static async initialize(e){const{client:r,config:s,env:i,target:a}=P($s(e.client),e),o=Ct(s.sharedParams),c=ur(s.sharedParams),l=new mr({env:i}),m=fs.new(r,{context:{documentWidth:document.documentElement.clientWidth,moduleType:"composer",productGroupType:"unknown"},store:Ke.getOrInit().localStore});return Promise.resolve(new Bs({api:l,client:r,config:s,env:i,isStorageEnabled:o,isTrackingEnabled:c,overrides:m,target:a}))}#e=new Ot;client;config;env;modules=[];name="StyliticsOrchestrator";target;type=go;version=yo;api;browsedItems;overrides;instanceIdStore=Va.instanceId;previousConfig;purchasedItems;rootManager;_isTrackingEnabled=!0;_clientUserIdHash;constructor({api:e,client:r,config:s,env:i,isStorageEnabled:a,isTrackingEnabled:o,overrides:c,target:l}){this.api=e,this.client=r,this.config=s,this.env=i,this.overrides=c,this.previousConfig=null,this.target=l,this.setStorage(a),this.setTracking(o),this.browsedItems=ar.new(this.client,this.localStore),this.purchasedItems=or.new(this.client,this.localStore),this.rootManager=at.from(this.target),this.#t()}get stylitics(){return Ke.getOrInit()}get cookieStore(){return this.stylitics.cookieStore}get localStore(){return this.stylitics.localStore}get session(){return this.stylitics.session}get root(){return A.warn("StyliticsComposer.root is a private property and should not be accessed."),this.rootManager.target}get instanceId(){return this.instanceIdStore.value}on=(e,r,s)=>{this.#e.set(e,r,s)};async start(){this.debug("Starting Composer"),this.previousConfig=[this.target,Ze(this.config)];const e=Object.assign(document.createElement("h3"),{textContent:"Loading..."});try{const r=await this.fetchData();if(r.error){A.error("composer.start() failed.",r.error);return}await Promise.all([this.attachStylesheet(r.data.stylesheetUrl),...r.data.modules.map((s,i)=>this.attachScript(s,i))]),this.debug("Composer started")}catch(r){A.error(ve(r))}finally{e.remove()}}async destroy(){this.debug("Destroying"),await Promise.all(this.modules.map(e=>e.destroy())),this.rootManager.cleanup(),this.debug("Destroyed")}async refresh(e){if(this.config=P(to(this.client,this.config),e),this.configsAreEqual)return this.logSkipRefresh();this.instanceId=ot(),this.previousConfig=[this.target,Ze(this.config)],this.setStorage(Ct(this.config.sharedParams)),this.setTracking(ur(this.config.sharedParams));const r=await this.fetchData();if(r.error){A.error("composer.refresh() failed.",r.error);return}this.#t();try{await Promise.all(r.data.modules.map((s,i)=>this.modules[i]?.refresh(s.params,s.data))),this.debug("Modules refreshed.")}catch(s){A.error(s)}}attachStylesheet(e){return new Promise(r=>{const s=oe({href:e});oe({protocol:"http",host:"localhost",port:"8787",path:"style-staging.css",searchParams:new URL(e).searchParams});const i=s;i.searchParams.append("version",this.version);const a=this.rootManager.createStylesheet(i.href),o=setTimeout(()=>{a.remove(),A.error(`Timeout loading CSS file ${e}`)},1e4);a.addEventListener("load",()=>{clearTimeout(o),r()}),this.rootManager.attachStylesheet(a)})}attachScript(e,r){return new Promise((s,i)=>{try{const a=e.target&&this.rootManager.getTarget(e.target),o=e.htmlSelector&&this.rootManager.getTarget(e.htmlSelector),c=a||o,m=c||(()=>{const w=typeof e.htmlSelector=="string"?e.htmlSelector:`stylitics-${e.type}-${r}`;let _=1,I=w;for(;this.rootManager.getTarget(I);)I=`${w}-${_}`,_++;return Object.assign(document.createElement("section"),{id:I})})();c||this.rootManager.target.appendChild(m);const f=pt[e.type],p=this.rootManager.createScript({src:`${Qe}${f.js}`,onload:async()=>{try{const w=Ke.getOrInit().getModule(e.type)?.Widget;if(!w)return i(new Error(`Module of type "${e.type}" is not available.`));const _=new w({username:e.username,target:m,data:e.data,params:e.params,opts:{api:this.api,configProvenance:e.configProvenance,cookieStore:this.cookieStore,localStore:this.localStore,metadata:{loaderType:Us.composer},moduleIndex:r,overrides:this.overrides,session:this.session,type:e.type}});_.deriveInstanceId(this.instanceIdStore),Object.entries(ne(this.config.on,e.on??{})).forEach(([I,E])=>{const[C,ee]=I.split(".");_.on(C,ee,E)}),Object.entries(ne(this.config.override,e.override??{})).forEach(([I,E])=>{const[C,ee]=I.split(".");_.override(C,ee,E)}),this.modules.push(_),this.debug(`Starting ${f.classname}`),await _.start(),this.debug(`${f.classname} started`),s()}catch(w){i(ve(w))}}}),v=this.#r.onCreateScript(p);this.rootManager.attachScript(v)}catch(a){i(ve(a))}})}get isInitialStart(){return Ie(this.previousConfig)}get configsAreEqual(){return He(this.previousConfig,[this.target,Ze(this.config)])}set instanceId(e){this.instanceIdStore.refresh(e)}debug(e){}logSkipRefresh(){A.debug("called start/refresh with the same configuration. Skipping.")}disableTracking(){return this.isTrackingEnabled=!1,this}enableTracking(){return this.isTrackingEnabled=!0,this}doNotTrack(){return this.disableTracking()}doTrack(){return this.enableTracking()}get isTrackingEnabled(){return this._isTrackingEnabled}set isTrackingEnabled(e){e===!0&&(this._isTrackingEnabled=!0,this.modules.forEach(r=>r.enableTracking())),e===!1&&(this._isTrackingEnabled=!1,this.modules.forEach(r=>r.disableTracking()))}disableStorage(){return this.localStore.enableStorage=!1,this.cookieStore.enableStorage=!1,this.modules.forEach(e=>e.disableStorage()),this}enableStorage(){return this.localStore.enableStorage=!0,this.cookieStore.enableStorage=!0,this.modules.forEach(e=>e.enableStorage()),this.session.syncStoredSessionIds(),this.overrides.syncToStore(),this}disableLocalStorageAndCookies(){return this.localStore.enableStorage=!1,this.cookieStore.enableStorage=!1,this.modules.forEach(e=>e.disableStorage()),this}enableLocalStorageAndCookies(){return this.localStore.enableStorage=!0,this.cookieStore.enableStorage=!0,this.modules.forEach(e=>e.enableStorage()),this.session.syncStoredSessionIds(),this.overrides.syncToStore(),this}get isStorageEnabled(){return this.cookieStore.enableStorage||this.localStore.enableStorage}setTracking(e){return e?this.enableTracking():this.disableTracking(),this}setStorage(e){return e?this.enableStorage():this.disableStorage(),this}async fetchData(){const e=new Map,r=Al(this.config.modules,this.browsedItems.get(),this.purchasedItems.get()),s={browsed:r.browsed.map(o=>o.remote_id),purchased:r.purchased.map(o=>o.remote_id)},i=this.config.modules.map(o=>{const c={client_user_id:this.clientUserIdHash,item_number_type:o.params.item_number_type,item_number:o.params.item_number,locale:o.params.locale,max:o.params.maxResults,min:o.params.minResults,price_hide_double_zero_cents:o.params.hideDoubleZeroCents,price_rounding:o.params.roundingStyle,profile:o.type,return_object:!0,session_id:this.session.id,tags:o.params.tags,total:o.params.maxResults,username:o.client??this.client,with_item_coords:!0,...Qr.has(o.type)&&s,...o.type==="styled-for-you"&&{personalized_results:o.params.personalizedResults,session_id:o.params.sessionId||this.session.id}},l={...o,...c,configId:o.configId??ot()};return e.set(l.configId,l),{...l,on:void 0,override:void 0,target:void 0}}),a=await this.api.fetchOrchestrator({useFixture:new URL(location.href).searchParams.get("stylitics-orc-fixture")==="true",searchParams:{config:{browsed:s.browsed,modules:i,pageUrl:this.pageUrl.href,purchased:s.purchased,screenSize:Wa(document.body.clientWidth),sessionId:this.session.id}},parseOptions:{...ch,emitWarnings:!0,browsedItems:r.browsed,purchasedItems:r.purchased,maxBrowsedItems:1/0,maxPurchasedItems:1/0}});return a.data&&a.data.modules.forEach(o=>{const c=e.get(o.configId);Object.assign(o,{on:c?.on??{},override:c?.override??{},target:c?.target??void 0})}),a}updateClientUserIdHash(){const e=P(eh,this.config.sharedParams.clientUserId);this.clientUserIdHash=e}get clientUserIdHash(){return Ie(this._clientUserIdHash)&&this.updateClientUserIdHash(),this._clientUserIdHash}set clientUserIdHash(e){Yt(Ui,e)&&(this._clientUserIdHash=e)}get pageUrl(){const e=new URL(location.href);return this.overrides.get("test-presence").abException?.id==="001"&&e.searchParams.set("styliticsoverride","001"),e}#t=()=>{Object.entries(this.config.on).forEach(([e,r])=>{const[s,i]=e.split(".");this.#e.set(s,i,r)})};#r={onCreateScript:e=>{const s=(this.#e.get(Y.create,se.script)??(()=>e))(e);return s instanceof HTMLScriptElement?s:(A.warn("create.script callback did not return an HTMLScriptElement. Ignoring returned value."),e)}}}class Ns{static async initialize(e){const{client:r,config:s,env:i,target:a}=P($s(e.client),e),o=Ct(s.sharedParams),c=ur(s.sharedParams),l=V.new({enableStorage:o}),m=te.new({enableStorage:o}),f=new mr({env:i}),p=new pr({cookieStore:m,localStore:l}),v=Dt.new({api:f,client:r,context:{documentWidth:document.documentElement.clientWidth,moduleType:"unknown",productGroupType:"unknown"},session:p,store:l});return await(["demo","lilacblonde"].some(w=>r.includes(w))?v.fetchFreshConfig():v.fetchConfigIfExpired()),v.getValueFor("orchestrator")??!1?await Bs.initialize(e):new Ns({api:f,client:r,env:i,experiments:v,config:s,session:p,target:a,cookieStore:m,localStore:l,isStorageEnabled:o,isTrackingEnabled:c})}#e=new Ot;client;config;env;modules=[];name="StyliticsComposer";target;type=go;version=yo;api;get stylitics(){return Ke.getOrInit()}get cookieStore(){return this.stylitics.cookieStore}get localStore(){return this.stylitics.localStore}get session(){return this.stylitics.session}experiments;instanceIdStore=Va.instanceId;previousConfig;rootManager;_isTrackingEnabled=!0;constructor({api:e,client:r,config:s,env:i,experiments:a,isStorageEnabled:o,isTrackingEnabled:c,target:l}){this.api=e,this.client=r,this.config=s,this.env=i,this.experiments=a,this.previousConfig=null,this.target=l,this.setStorage(o),this.setTracking(c),this.rootManager=at.from(this.target),this.#t()}get root(){return A.warn("StyliticsComposer.root is a private property and should not be accessed."),this.rootManager.target}get instanceId(){return this.instanceIdStore.value}on=(e,r,s)=>{this.#e.set(e,r,s)};async start(){this.debug("Starting Composer"),this.previousConfig=[this.target,Ze(this.config)];const e=Object.assign(document.createElement("h3"),{textContent:"Loading..."});try{const r=await this.processModuleConfigs();mo({experiments:this.experiments,moduleRecords:r.map(s=>({...pt[s.type],css:Qe+pt[s.type].css})),rootManager:this.rootManager}),await Promise.all(r.map(this.attachScript.bind(this))),this.debug("Composer started")}catch(r){A.error(ve(r))}finally{e.remove()}}async destroy(){this.debug("Destroying"),await Promise.all(this.modules.map(e=>e.destroy())),this.rootManager.cleanup(),this.debug("Detroyed")}async refresh(e){if(this.config=P(to(this.client,this.config),e),this.configsAreEqual)return this.logSkipRefresh();this.instanceId=ot(),this.previousConfig=[this.target,Ze(this.config)],this.setStorage(Ct(this.config.sharedParams)),this.setTracking(ur(this.config.sharedParams)),this.#t();try{await Promise.all(this.config.modules.map((r,s)=>this.modules[s]?.refresh(r.params))),this.debug("Modules refreshed.")}catch(r){A.error(r)}}attachScript(e,r){return new Promise((s,i)=>{try{const a=e.target&&this.rootManager.getTarget(e.target),c=a||(()=>{const p=typeof e.target=="string"?e.target:`stylitics-${e.type}-${r}`;let v=1,w=p;for(;this.rootManager.getTarget(w);)w=`${p}-${v}`,v++;return Object.assign(document.createElement("section"),{id:w})})();a||this.rootManager.target.appendChild(c);const l=pt[e.type],m=this.rootManager.createScript({src:`${Qe}${l.js}`,onload:async()=>{try{const p=e.client||this.client,v=this.stylitics.getModule(e.type)?.WidgetLegacy;if(!v)return i(new Error(`Module of type "${e.type}" is not available.`));const w=new v(p,c,e.params,{api:this.api,cookieStore:this.cookieStore,localStore:this.localStore,metadata:{loaderType:Us.composer},session:this.session});w.deriveInstanceId(this.instanceIdStore),Object.entries(ne(this.config.on,e.on??{})).forEach(([_,I])=>{const[E,C]=_.split(".");w.on(E,C,I)}),Object.entries(ne(this.config.override,e.override??{})).forEach(([_,I])=>{const[E,C]=_.split(".");w.override(E,C,I)}),this.modules.push(w),this.debug(`Starting ${l.classname}`),await w.start(),this.debug(`${l.classname} started`),s()}catch(p){i(ve(p))}}}),f=this.#r.onCreateScript(m);this.rootManager.attachScript(f)}catch(a){i(ve(a))}})}get configsAreEqual(){return He(this.previousConfig,[this.target,Ze(this.config)])}set instanceId(e){this.instanceIdStore.refresh(e)}debug(e){}logSkipRefresh(){A.debug("Called start/refresh with the same configuration. Skipping.")}isSingleModuleType(){return kc(Ue("type"),this.config.modules).length===1}applyWidgetVariantExperiment=e=>this.isSingleModuleType()?so(this.experiments,e,Vm):e;processModuleConfigs(){return Promise.all(this.config.modules.map(async e=>{let r={taxonomies:{allItemsCategories:[],allItemsDepartments:[],allRetailerCategories:[],itemCategory:void 0,itemDepartment:void 0}};const s=i=>{this.experiments.context=qs(i,r.taxonomies)};return Promise.resolve(Ze(e)).then(Se($e(s),i=>no(this.experiments,i),i=>io(this.experiments,i),$e(s))).then(async i=>{const a=i.client??this.client;this.experiments=a===this.client?this.experiments:await Dt.initialize({api:this.api,client:a,context:this.experiments.context,session:this.session,store:this.localStore});const o={...i,params:Ja(i.type,i.params)};r=await lo({api:this.api,browsedItems:ar.new(a,this.experiments.store).get(),client:this.client,experiments:this.experiments,moduleConfig:o,purchasedItems:or.new(a,this.experiments.store).get(),sessionId:this.session.id});const c=this.experiments.getValueFor("beauty-widget-apply"),l=this.experiments.getValueFor("enhanced-list-plus");return c?ao({moduleConfig:i,experimentData:r}):l?co({experiments:this.experiments,moduleConfig:i,experimentData:r}):oo({experiments:this.experiments,moduleConfig:i,experimentData:r})}).then(Se($e(s),this.applyWidgetVariantExperiment,i=>uo(this.experiments,i),$e(s)))}))}setExperimentContext=e=>{this.experiments.context=qs(e)};disableTracking(){return this.isTrackingEnabled=!1,this}enableTracking(){return this.isTrackingEnabled=!0,this}doNotTrack(){return this.disableTracking()}doTrack(){return this.enableTracking()}get isTrackingEnabled(){return this._isTrackingEnabled}set isTrackingEnabled(e){e===!0&&(this._isTrackingEnabled=!0,this.modules.forEach(r=>r.enableTracking())),e===!1&&(this._isTrackingEnabled=!1,this.modules.forEach(r=>r.disableTracking()))}disableStorage(){return this.localStore.enableStorage=!1,this.cookieStore.enableStorage=!1,this.modules.forEach(e=>e.disableStorage()),this}enableStorage(){return this.localStore.enableStorage=!0,this.cookieStore.enableStorage=!0,this.modules.forEach(e=>e.enableStorage()),this.session.syncStoredSessionIds(),this.experiments.storeConfig(),this}disableLocalStorageAndCookies(){return this.localStore.enableStorage=!1,this.cookieStore.enableStorage=!1,this.modules.forEach(e=>e.disableStorage()),this}enableLocalStorageAndCookies(){return this.localStore.enableStorage=!0,this.cookieStore.enableStorage=!0,this.modules.forEach(e=>e.enableStorage()),this.session.syncStoredSessionIds(),this.experiments.storeConfig(),this}get isStorageEnabled(){return this.cookieStore.enableStorage||this.localStore.enableStorage}setTracking(e){return e?this.enableTracking():this.disableTracking(),this}setStorage(e){return e?this.enableStorage():this.disableStorage(),this}#t=()=>{Object.entries(this.config.on).forEach(([e,r])=>{const[s,i]=e.split(".");this.#e.set(s,i,r)})};#r={onCreateScript:e=>{const s=(this.#e.get(Y.create,se.script)??(()=>e))(e);return s instanceof HTMLScriptElement?s:(A.warn("create.script callback did not return an HTMLScriptElement. Ignoring returned value."),e)}}}return window.StyliticsComposer||=Ns,window.StyliticsProductLoader||=Hs,new Hs,Hs}();