1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{92:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(53843)}])},476:(e,t,r)=>{"use strict";r.d(t,{Dx:()=>c,NP:()=>u,wR:()=>d});var n=r(37876),i=r(18847),o=r.n(i),a=r(14232);let s=async e=>{switch(e){case"mnn":return(await r.e(4269).then(r.bind(r,54269))).default;case"oal":return(await r.e(1354).then(r.bind(r,61354))).default;case"lal":return(await r.e(8323).then(r.bind(r,48323))).default;case"ib":return(await r.e(889).then(r.bind(r,889))).default;case"tgr":return(await r.e(8755).then(r.bind(r,48755))).default;case"sett":return(await r.e(7746).then(r.bind(r,57746))).default}},l={mnn:o()(()=>Promise.all([r.e(4113),r.e(5018)]).then(r.bind(r,85018)),{loadableGenerated:{webpack:()=>[85018]},ssr:!0}),oal:o()(()=>Promise.all([r.e(1843),r.e(4303)]).then(r.bind(r,24303)),{loadableGenerated:{webpack:()=>[24303]},ssr:!0}),lal:o()(()=>Promise.all([r.e(5754),r.e(9980)]).then(r.bind(r,19980)),{loadableGenerated:{webpack:()=>[19980]},ssr:!0}),ib:o()(()=>Promise.all([r.e(1446),r.e(8968)]).then(r.bind(r,78968)),{loadableGenerated:{webpack:()=>[78968]},ssr:!0}),tgr:o()(()=>Promise.all([r.e(6333),r.e(4896)]).then(r.bind(r,44896)),{loadableGenerated:{webpack:()=>[44896]},ssr:!0}),sett:o()(()=>Promise.all([r.e(7554),r.e(5113)]).then(r.bind(r,35113)),{loadableGenerated:{webpack:()=>[35113]},ssr:!0})},c=(0,a.createContext)(void 0),u=e=>{let{initialTheme:t,initialThemeConfig:r,children:i}=e,[o,u]=(0,a.useState)(t),[d,p]=(0,a.useState)(null),h=l[o],f=async e=>{try{var t,r,n;let[,,i]=await Promise.all([(e=>"undefined"==typeof document||document.querySelector('link[data-theme-css="'.concat(e,'"]'))?Promise.resolve():new Promise((t,r)=>{let n=document.createElement("link");n.rel="stylesheet",n.href="/themes/".concat(e,".css"),n.dataset.themeCss=e,n.onload=()=>t(),n.onerror=()=>r(Error("Failed to load /themes/".concat(e,".css"))),document.head.appendChild(n)}))(e),null!=(n=null==(t=(r=l[e]).preload)?void 0:t.call(r))?n:Promise.resolve(),s(e)]);"undefined"!=typeof document&&document.documentElement.setAttribute("data-theme",e),u(e),p(i)}catch(e){console.error("Failed to load theme:",e)}};return(0,n.jsxs)(c.Provider,{value:{currentTheme:o,setTheme:f,themeConfig:d||r},children:[(0,n.jsx)(h,{}),i]})},d=()=>{let e=(0,a.useContext)(c);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}},617:(e,t,r)=>{"use strict";r.d(t,{L:()=>i});var n=r(97268);let i=()=>{var e,t;let r=null!=(t=null==(e=globalThis.location)?void 0:e.pathname)?t:"",[i]=(0,n.MO)(r);return({homepage:"homepage",products:"product_page",categories:"category_page","shopping-cart":"cart_page","contact-information":"contact_page","my-account":"account_page",articles:"article_page",subbrand:"subbrand_page"})[i||"homepage"]||void 0}},1066:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(8106),i=r(4319),o=r(38248),a=r(51284),s=r(12584),l=r(65835);let c=async(e,t,r)=>{try{let n=await fetch(e,{headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"},method:"PUT",body:JSON.stringify(r)});if(!n.ok)throw Error("Failed to update user profile");return n.json()}catch(e){throw e}},u=async(e,t)=>{try{var r;let n=await fetch(e,{headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"},method:"GET"});if(!n.ok)return null;return null!=(r=await n.json())?r:null}catch(e){return null}},d=(0,n.v)()((0,i.lt)((e,t)=>({error:null,isLoggedIn:!1,isLoading:!1,authPopupVisible:!1,authPopupMode:"signin",welcomeMessageVisible:!1,user:null,oidcOptions:null,initialized:!1,openAuthPopup:t=>e(()=>({authPopupVisible:!0,authPopupMode:t})),closeAuthPopup:()=>e(()=>({authPopupVisible:!1})),setPopupMode:t=>e(()=>({authPopupMode:t,error:null})),showWelcomeMessage:()=>e(()=>({welcomeMessageVisible:!0})),hideWelcomeMessage:()=>e(()=>({welcomeMessageVisible:!1})),initializeHandler:async r=>{if(!r.accountsEndpoint)return void e({siteData:r,initialized:!0});let n=(0,a.Y)(r);if(!n)return void e({siteData:r,initialized:!0});e({oidcOptions:n,siteData:r,isLoading:!0}),n.userManager.events.addAccessTokenExpiring(()=>{t().refreshUserInfo()});try{await (0,s.ws)(n),await t().refreshUserInfo()}catch(e){}finally{e({isLoading:!1,initialized:!0})}},refreshUserInfo:async function(){var r,n,i,o,a,s,l,c,u,d;let p=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{getUserInfo:h}=t(),f=await (null==(n=t().oidcOptions)||null==(r=n.userManager)?void 0:r.getUser()),g=await h();if(null!=f){let t=(o=f.profile,a=null==g?void 0:g.phoneNumber,s=null!=(i=null==g?void 0:g.birthdate)?i:"",{firstName:null!=(l=o.given_name)?l:"",lastName:null!=(c=o.family_name)?c:"",email:null!=(u=o.email)?u:"",gender:null!=(d=o.gender)?d:"",phone:null!=a?a:"",birthdate:null!=s?s:""});return e({user:t,isLoading:!1,isLoggedIn:!0,welcomeMessageVisible:p}),t}return null},updateUserInfo:async r=>{try{e({isLoading:!0});let{getUserAccessToken:n,oidcOptions:i,refreshUserInfo:o}=t();if(!i)return void e({isLoading:!1,error:"Failed to retrieve url"});let a=await n(),s=i.authUrls.updateUser;await c(s,a,r),await o(),e({isLoading:!1,error:null})}catch(t){console.error("Error in update user info ",t),e({isLoading:!1,error:"Error in update user info"});return}},getUserInfo:async()=>{try{let{getUserAccessToken:e,oidcOptions:r,siteData:n}=t();if(!r)return null;let i=await e();return await u(r.authUrls.updateUser,i)}catch(e){return console.error("Error fetching user info from api/user",e),null}},getUserAccessToken:async()=>{let{oidcOptions:e}=t(),r=await (null==e?void 0:e.userManager.getUser());if(!r||!r.access_token)throw Error("Access token is unavailable");return r.access_token},signUpEmail:async function(r){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{oidcOptions:i,closeAuthPopup:o,refreshUserInfo:a}=t();if(i)try{e({user:null,isLoading:!0,isLoggedIn:!1,error:null}),await (0,s.Uv)(r,i,n),await a(!0),o()}catch(t){console.error(t),e({isLoading:!1,error:(0,l.ch)(t)})}}
1,signInEmail:async r=>{let{oidcOptions:n,refreshUserInfo:i,closeAuthPopup:o}=t();if(n)try{e({user:null,isLoading:!0,isLoggedIn:!1,error:null}),await (0,s.I8)(r,n),await i(!0),o()}catch(t){console.error(t),e({isLoading:!1,error:(0,l.ch)(t)})}},signOut:async()=>{let{oidcOptions:r,closeAuthPopup:n}=t();if(r)try{await (0,s.d8)(r),(0,o.deleteCookie)(r.legacyHintCookie),e({user:null,isLoading:!1,isLoggedIn:!1,error:null}),n()}catch(t){console.error(t),e({isLoading:!1,error:(0,l.ch)(t)})}},forgotPassword:async(r,n)=>{let{email:i}=n,{oidcOptions:o}=t();if(o)try{e({isLoading:!0,error:null});let t="".concat(r.url,"/").concat("my-account/reset-password");await (0,l.sc)(o.authUrls.forgotPassword,JSON.stringify({email:i,absoluteReturnUrl:t})),e({isLoading:!1})}catch(t){console.error(t),e({isLoading:!1,error:(0,l.ch)(t)})}},toggleFakeAuthentication:()=>e(e=>({isLoggedIn:!e.isLoggedIn,user:e.isLoggedIn?null:{firstName:"Assaf",lastName:"Edri",email:"[email protected]",phone:"",birthdate:"",gender:"male"},isLoading:!1}))})))},1285:(e,t,r)=>{"use strict";r.d(t,{NR:()=>s,Yn:()=>a,uC:()=>o});var n=r(90198),i=r(47626);function o(e){let t,r=Error(e);return r.name="HandlingStack",(0,n.um)(()=>{let e=(0,i.T)(r);e.stack=e.stack.slice(2),t=a(e)}),t}function a(e){let t=s(e);return e.stack.forEach(e=>{let r="?"===e.func?"<anonymous>":e.func,n=e.args&&e.args.length>0?`(${e.args.join(", ")})`:"",i=e.line?`:${e.line}`:"",o=e.line&&e.column?`:${e.column}`:"";t+=` 2 at ${r}${n} @ ${e.url}${i}${o}`}),t}function s(e){return`${e.name||"Error"}: ${e.message}`}},1838:(e,t,r)=>{"use strict";r.d(t,{e:()=>n});let n=(0,r(15714).A)("category")},2564:(e,t,r)=>{"use strict";r.d(t,{I5:()=>i,db:()=>n});let n=e=>{let{crossed_price:t,selling_price:r,discount_percentage:n}=e,i="number"==typeof n&&n>0?"percentage":"fixed",o=0;return"fixed"===i?o=t?t-r:0:"percentage"===i&&(o=t?100-100*r/t:0),{selling:r,discountType:i,discountAmount:+o.toFixed(2)}},i=e=>{let{itemEditor:{catalogProduct:t}}=e,r=(e=>{let{itemEditor:{catalogProduct:t,userSelections:r}}=e,{pgbSelectedImage:n}=((e,t)=>{var r,n;if(!e||!t)return{pgbSelectedImage:void 0,pgbSelectedCategoryOption:void 0};let i=e.categories.find(e=>e.labels.find(e=>"PersonalizedGBImage"===e.name)),o=i?null==t?void 0:t.find(e=>e.category_uid==i.uid):void 0,a=o&&i?null==(r=i.options)?void 0:r.find(e=>e.id==o.value):void 0;return{pgbSelectedImage:null==a||null==(n=a.image)?void 0:n.url,pgbSelectedCategoryOption:a}})(t,r);if(n){var i,o;return{src:n,alt:(null==(i=e.image)?void 0:i.alt)||"",title:(null==(o=e.image)?void 0:o.title)||""}}return null})(e);if(r)return r;if(e.image)return e.image;let n=(e=>{var t;return null==(t=(e=>{var t,r,n;let i=null==(t=e.media)?void 0:t.default_item_id,o=(null!=(n=null==(r=e.media)?void 0:r.items)?n:[]).find(e=>e.id===i);return(null==o?void 0:o.type)==="cdn_image"?o.cdn_images.original:void 0})(e))?void 0:t.path})(t);return n?{src:n,alt:"",title:""}:null}},4319:(e,t,r)=>{"use strict";r.d(t,{KU:()=>d,Zr:()=>h,eh:()=>u,lt:()=>l});let n=e=>!!e.dispatchFromDevtools&&"function"==typeof e.dispatch,i=new Map,o=e=>{let t=i.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([e,t])=>[e,t.getState()])):{}},a=/.+ (.+) .+/,s=/^([^@]+)@/,l=(e,t={})=>(r,l,u)=>{let d,{enabled:p,anonymousActionType:h,store:f,...g}=t;try{d=(null==p||p)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!d)return e(r,l,u);let{connection:m,...y}=((e,t,r)=>{if(void 0===e)return{type:"untracked",connection:t.connect(r)};let n=i.get(r.name);if(n)return{type:"tracked",store:e,...n};let o={connection:t.connect(r),stores:{}};return i.set(r.name,o),{type:"tracked",store:e,...o}})(f,d,g),v=!0;u.setState=(e,t,n)=>{let i=r(e,t);if(!v)return i;let c=void 0===n?{type:h||function(e){var t,r,n;if(!e)return;let i=e.split("\n"),o=i.findIndex(e=>e.includes("api.setState"));if(o<0)return;let l=(null==(t=i[o+1])?void 0:t.trim())||"";return(null==(r=a.exec(l))?void 0:r[1])||(null==(n=s.exec(l))?void 0:n[1])}(Error().stack)||"anonymous"}:"string"==typeof n?{type:n}:n;return void 0===f?null==m||m.send(c,l()):null==m||m.send({...c,type:`${f}/${c.type}`},{...o(g.name),[f]:u.getState()}),i},u.devtools={cleanup:()=>{m&&"function"==typeof m.unsubscribe&&m.unsubscribe(),((e,t)=>{if(void 0===t)return;let r=i.get(e);r&&(delete r.stores[t],0===Object.keys(r.stores).length&&i.delete(e))})(g.name,f)}};let _=(...e)=>{let t=v;v=!1,r(...e),v=t},b=e(u.setState,l,u);if("untracked"===y.type?null==m||m.init(b):(y.stores[y.store]=u,null==m||m.init(Object.fromEntries(Object.entries(y.stores).map(([e,t])=>[e,e===y.store?b:t.getState()])))),n(u)){let e=!1,t=u.dispatch;u.dispatch=(...r)=>{"__setState"!==r[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...r)}}return m.subscribe(e=>{var t;switch(e.type){case"ACTION":if("string"!=typeof e.payload)return void console.error("[zustand devtools middleware] Unsupported action format");return c(e.payload,e=>{if("__setState"===e.type){if(void 0===f)return void _(e.state);1!==Object.keys(e.state).length&&console.error(` 3 [zustand devtools middleware] Unsupported __setState action format. 4 When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), 5 and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } 6 `);let t=e.state[f];return void(null==t||JSON.stringify(u.getState())!==JSON.stringify(t)&&_(t))}n(u)&&u.dispatch(e)});case"DISPATCH":switch(e.payload.type){case"RESET":if(_(b),void 0===f)return null==m?void 0:m.init(u.getState());return null==m?void 0:m.init(o(g.name));
6case"COMMIT":if(void 0===f){null==m||m.init(u.getState());break}return null==m?void 0:m.init(o(g.name));case"ROLLBACK":return c(e.state,e=>{if(void 0===f){_(e),null==m||m.init(u.getState());return}_(e[f]),null==m||m.init(o(g.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return c(e.state,e=>{if(void 0===f)return void _(e);JSON.stringify(u.getState())!==JSON.stringify(e[f])&&_(e[f])});case"IMPORT_STATE":{let{nextLiftedState:r}=e.payload,n=null==(t=r.computedStates.slice(-1)[0])?void 0:t.state;if(!n)return;void 0===f?_(n):_(n[f]),null==m||m.send(null,r);break}case"PAUSE_RECORDING":return v=!v}return}}),b},c=(e,t)=>{let r;try{r=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==r&&t(r)},u=e=>(t,r,n)=>{let i=n.subscribe;return n.subscribe=(e,t,r)=>{let o=e;if(t){let i=(null==r?void 0:r.equalityFn)||Object.is,a=e(n.getState());o=r=>{let n=e(r);if(!i(a,n)){let e=a;t(a=n,e)}},(null==r?void 0:r.fireImmediately)&&t(a,a)}return i(o)},e(t,r,n)};function d(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(n=r.getItem(e))?n:null;return o instanceof Promise?o.then(i):i(o)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}let p=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>p(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>p(t)(e)}}},h=(e,t)=>(r,n,i)=>{let o,a={storage:d(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=0,c=new Set,u=new Set,h=a.storage;if(!h)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,i);let f=()=>{let e=a.partialize({...n()});return h.setItem(a.name,{state:e,version:a.version})},g=i.setState;i.setState=(e,t)=>(g(e,t),f());let m=e((...e)=>(r(...e),f()),n,i);i.getInitialState=()=>m;let y=()=>{var e,t;if(!h)return;let i=++l;s=!1,c.forEach(e=>{var t;return e(null!=(t=n())?t:m)});let d=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=n())?e:m))||void 0;return p(h.getItem.bind(h))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(i!==l)return;let[s,c]=e;if(r(o=a.merge(c,null!=(t=n())?t:m),!0),s)return f()}).then(()=>{i===l&&(null==d||d(n(),void 0),o=n(),s=!0,u.forEach(e=>e(o)))}).catch(e=>{i===l&&(null==d||d(void 0,e))})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(h=e.storage)},clearStorage:()=>{null==h||h.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},a.skipHydration||y(),o||m}},4328:(e,t,r)=>{"use strict";r.d(t,{q:()=>i});var n=r(35428);function i(){var e;let t=n.J2.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:null==(e=t.connection)?void 0:e.effectiveType}}},4815:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(50310);let i=e=>{if(e)return n.A.find(t=>t.siteId===Number(e))||null}},5489:(e,t,r)=>{"use strict";r.d(t,{WW:()=>a,_m:()=>n,iH:()=>i,wh:()=>s});let n=1024,i=1048576,o=/[^\u0000-\u007F]/;function a(e){return o.test(e)?void 0!==window.TextEncoder?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function s(e){if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}},6851:(e,t,r)=>{"use strict";r.d(t,{L2:()=>L});var n=r(23963),i=r(35428),o=r(44103),a=r(27627),s=r(93487),l=r(7972),c=r(42236),u=r(5489);function d(e,t,r){let n,i=0,o=[],a=!0,s=0,l=[],{stop:d}=(0,c.q)(e,t,"message",({data:e})=>{if("wrote"!==e.type||e.streamId!==r)return;let t=l[0];t&&(t.id===e.id?(l.shift(),i+=e.additionalBytesCount,o.push(e.result),n=e.trailer,t.writeCallback?t.writeCallback(e.result.byteLength):t.finishCallback&&t.finishCallback()):t.id<e.id&&d())});function p(){let e=0===o.length?new Uint8Array(0):(0,u.wh)(o.concat(n)),t={rawBytesCount:i,output:e,outputBytesCount:e.byteLength,encoding:"deflate"};return i=0,o=[],t}function h(){a||(t.postMessage({action:"reset",streamId:r}),a=!0)}return{isAsync:!0,get isEmpty(){return a},write(e,n){t.postMessage({action:"write",id:s,data:e,streamId:r}),l.push({id:s,writeCallback:n,data:e}),a=!1,s+=1}
6,finish(e){h(),l.length?(l.forEach(e=>{delete e.writeCallback}),l[l.length-1].finishCallback=()=>e(p())):e(p())},finishSync(){h();let e=l.map(e=>e.data).join("");return l.length=0,{...p(),pendingData:e}},estimateEncodedBytesCount:e=>e.length/8,stop(){d()}}}var p=r(32068),h=r(11782),f=r(74349),g=r(13938),m=r(61608);function y({configuredUrl:e,error:t,source:r,scriptType:n}){var i;if(g.Vy.error(`${r} failed to start: an error occurred while initializing the ${n}:`,t),t instanceof Event||t instanceof Error&&((i=t.message).includes("Content Security Policy")||i.includes("requires 'TrustedScriptURL'"))){let t;t=e?`Please make sure the ${n} URL ${e} is correct and CSP is correctly configured.`:"Please make sure CSP is correctly configured.",g.Vy.error(`${t} See documentation at ${g.fH}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else"worker"===n&&(0,m.VJ)(t)}let v=30*p.OY;function _(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;
vendor: 4,849 bytes, line 6
6)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]
vendor: 12,699 bytes, line 6
6);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);
6i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.33.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let b={status:0};function w(e,t,r){switch(0===b.status&&function(e,t){try{let r=(0,h.B)(_)(e),{stop:n}=(0,c.q)(e,r,"error",r=>{S(e,t,r)}),{stop:i}=(0,c.q)(e,r,"message",({data:r})=>{var n;"errored"===r.type?S(e,t,r.error,r.streamId):"initialized"===r.type&&(n=r.version,1===b.status&&(b={status:3,worker:b.worker,stop:b.stop,version:n}))});r.postMessage({action:"init"}),(0,f.wg)(()=>{var e;return e=t,void(1===b.status&&(g.Vy.error(`${e} failed to start: a timeout occurred while initializing the Worker`),b.initializationFailureCallbacks.forEach(e=>e()),b={status:2}))},v),b={status:1,worker:r,stop:()=>{n(),i()},initializationFailureCallbacks:[]}}catch(r){S(e,t,r)}}(e,t),b.status){case 1:return b.initializationFailureCallbacks.push(r),b.worker;case 3:return b.worker}}function S(e,t,r,n){1===b.status||0===b.status?(y({configuredUrl:e.workerUrl,error:r,source:t,scriptType:"worker"}),1===b.status&&b.initializationFailureCallbacks.forEach(e=>e()),b={status:2}):(0,m.VJ)(r,{worker_version:3===b.status&&b.version,stream_id:n})}function k(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}var C=r(61885),E=r(80959),A=r(90198);async function I(){try{return await (0,h.B)(x)()}catch(e){y({error:e,source:"Recorder",scriptType:"module"})}}async function x(){return(await r.e(9777).then(r.bind(r,87809))).startRecording}async function T(e,t,r){try{return await r}finally{e.notify(t)}}var P=r(67238);async function O(){try{return await (0,h.B)(R)()}catch(e){y({error:e,source:"Profiler",scriptType:"module"})}}async function R(){return(await r.e(12).then(r.bind(r,20190))).createRumProfiler}let N=function(){let e;if((0,a.d0)()&&!(0,a.Ww)("records")||!k())return{start:s.l,stop:s.l,getReplayStats:()=>void 0,onRumStart:s.l,isRecording:()=>!1,getSessionReplayLink:()=>void 0};let{strategy:t,shouldStartImmediately:r}=(e=0,{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:s.l},shouldStartImmediately:t=>1===e||0===e&&!t.startSessionReplayRecordingManually});return{start:e=>t.start(e),stop:()=>t.stop(),getSessionReplayLink:()=>t.getSessionReplayLink(),onRumStart:function(e,n,i,a,l,c){let u;t=function(e,t,r,n,i,a){let l,c=0;t.subscribe(9,()=>{(2===c||3===c)&&(f(),c=1)}),t.subscribe(10,()=>{1===c&&h()});let u=new C.cP;!function(e,t){let r,n,i;if(!e.metricsEnabled)return s.l;let{unsubscribe:o}=t.subscribe(e=>{switch(e.type){case"start":r={forced:e.forced,timestamp:(0,p.nx)()},n=void 0,i=void 0;break;case"document-ready":r&&(n=(0,p.vk)(r.timestamp,(0,p.nx)()));break;
6case"recorder-settled":r&&(i=(0,p.vk)(r.timestamp,(0,p.nx)()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":var t,a,s,l;o(),r&&(0,m.Gk)("Recorder init metrics",{metrics:(t=r.forced,a=i,s=(0,p.vk)(r.timestamp,(0,p.nx)()),l=e.type,{forced:t,loadRecorderModuleDuration:a,recorderInitDuration:s,result:l,waitForDocReadyDuration:n})})}})}(a,u);let d=async o=>{u.notify({type:"start",forced:o});let[s]=await Promise.all([T(u,{type:"recorder-settled"},I()),T(u,{type:"document-ready"},(0,E.N)(e,"interactive"))]);if(2!==c)return void u.notify({type:"aborted"});if(!s){c=0,u.notify({type:"recorder-load-failed"});return}let d=i();if(!d){c=0,u.notify({type:"deflate-encoder-load-failed"});return}({stop:l}=s(t,e,r,n,d,a)),c=3,u.notify({type:"succeeded"})};function h(e){var t,n,i,o,a;let s=r.findTrackedSession();if(t=s,n=e,!t||0===t.sessionReplay&&(!n||!n.force)){c=1;return}if(2===(i=c)||3===i)return;c=2;let l=(o=s,(a=e)&&a.force&&0===o.sessionReplay||!1);d(l).catch(A.Dx),l&&r.setForcedReplay()}function f(){3===c&&(null==l||l()),c=0}return{start:h,stop:f,getSessionReplayLink:()=>(function(e,t,r,n){var i,a;let s=t.findTrackedSession(),l=(i=s,a=n,k()?i?0===i.sessionReplay?"incorrect-session-plan":a?void 0:"replay-not-started":"rum-not-tracked":"browser-not-supported"),c=r.findView();return(0,o.dx)(e,{viewContext:c,errorType:l,session:s})})(e,r,n,0!==c),isRecording:()=>3===c}}(n,e,i,a,function(){return!u&&(null!=l||(l=w(n,"Datadog Session Replay",()=>t.stop())),l&&(u=d(n,l,1))),u},c),r(n)&&t.start()},isRecording:()=>3===b.status&&t.isRecording(),getReplayStats:e=>3===b.status?(0,l.lv)(e):void 0}}(),D=function(){let e;return{onRumStart:function(t,r,n,a,s,l){let c,u=a.findTrackedSession();if(!u||!(0,o.$5)(u.id,n.profilingSampleRate))return;let d=(c={status:"starting"},r.register(0,({eventType:e})=>e!==o.bb.VIEW&&e!==o.bb.LONG_TASK&&e!==o.bb.ACTION&&e!==o.bb.VITAL?P.$O:{type:e,_dd:{profiling:c}}),{get:()=>c,set:e=>{c=e}});if(void 0===(0,i.VZ)().Profiler)return void d.set({status:"error",error_reason:"not-supported-by-browser"});O().then(r=>{if(!r)return void d.set({status:"error",error_reason:"failed-to-lazy-load"});(e=r(n,t,a,d,l,s,void 0)).start()}).catch(A.Dx)},stop:()=>{null==e||e.stop()}}}(),L=(0,o.AB)(N,D,{startDeflateWorker:w,createDeflateEncoder:d,sdkName:"rum"});(0,n.Z)((0,i.VZ)(),"DD_RUM",L)},7253:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});let n=e=>e?e.reduce((e,t)=>(e[t.param_name]=t.param_value,e),{}):{},i=(e,t)=>{try{if(!t)throw Error("Missing data from TG analytics event.");let r=n(t.event_parameters),i=n(t.user_props),o={...t,event_parameters:r,user_props:i};fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}).catch(e=>{console.error("Error with TG analytics POST request:",e)})}catch(e){console.error("Error with TG analytics POST request:",e)}}},7972:(e,t,r)=>{"use strict";let n;function i(e){return c(e).segments_count}function o(e){c(e).segments_count+=1}function a(e){c(e).records_count+=1}function s(e,t){c(e).segments_total_raw_size+=t}function l(e){return null==n?void 0:n.get(e)}function c(e){let t;return n||(n=new Map),n.has(e)?t=n.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},n.set(e,t),n.size>1e3&&function(){if(!n)return;let e=n.keys().next().value;e&&n.delete(e)}()),t}r.d(t,{$1:()=>a,H5:()=>o,K_:()=>i,L7:()=>s,lv:()=>l})},8106:(e,t,r)=>{"use strict";r.d(t,{v:()=>l,P:()=>a});var n=r(14232);let i=e=>{let t,r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,o={setState:n,getState:i,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e))},a=t=e(n,i,o);return o},o=e=>e;function a(e,t=o){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r}let s=e=>{let t=(e=>e?i(e):i)(e),r=e=>a(t,e);return Object.assign(r,t),r},l=e=>e?s(e):s},8402:(e,t,r)=>{"use strict";r.d(t,{a:()=>s,b:()=>u,c:()=>g,d:()=>_,e:()=>f,g:()=>v,h:()=>a,i:()=>y,j:()=>l,k:()=>c,m:()=>p});var n=r(37876),i=r(72091),o=r(87718);let a=(e=[],t,r)=>{if(!e.length)return[];let n=null==e?void 0:e.filter(e=>e.is_active);if(!t)return n;let o=Array.from((0,i.f)(e,t,r));return(null==n?void 0:n.filter(e=>!d(e,o))).sort((e,t)=>
6e.order-t.order)},s=(e,t)=>null==e?void 0:e.find(e=>e.category_uid===t),l=(e,t)=>{let{short_id:r,version_id:n,sku:i,categories:a}=e,{key:s,parent_id:l,parent_key:c,options_selections:u}=t??{};return{product_id:r,sku:i,version_id:n,key:s??(0,o.n)(12),options_selections:u??a.filter(e=>e.is_active).map(e=>{let{id:t,uid:r,type:n,options:i}=e;return{category_id:t,category_uid:r,value:"selection"===n&&Array.isArray(i)?i.filter(e=>e.is_active)[0].id:""}}),parent_id:l??0,parent_key:c??""}},c=(e,t)=>{let{product_id:r,userSelections:n,version_id:i,sku:o,key:a}=e;return{product_id:r,sku:o,version_id:i,options_selections:n,key:(null==t?void 0:t.key)??a,parent_id:(null==t?void 0:t.parent_id)??0,parent_key:(null==t?void 0:t.parent_key)??"",...(null==t?void 0:t.parent_sku)&&{parent_sku:t.parent_sku},...(null==t?void 0:t.parent_name)&&{parent_name:t.parent_name}}},u=(e,t)=>{var r,n,i;let o=null==(r=s(t,e.uid))?void 0:r.value;return o?null==(i=e.options)?void 0:i.find(e=>"string"==typeof o?o===e.id.toString():o===e.id):null==(n=e.options)?void 0:n.find(e=>e.is_default)},d=(e,t)=>t.includes(e.uid),p=(e,t)=>{let r=e.map(e=>e.uid)||[];return t.filter(e=>r.includes(e.category_uid))},h=null,f={get instance(){return h||(h=(0,o.m)()),h},emit:(e,t)=>f.instance.emit(e,t),on:(e,t)=>f.instance.on(e,t),off:(e,t)=>f.instance.off(e,t),clear:()=>f.instance.all.clear()},g=(e,t)=>t.reduce((t,r)=>{let n=e.filter(e=>e.uid===r.category_uid)[0];if(n){let{id:e,uid:i,order:o,type:a,labels:s,display_type:l,cart_name:c,is_hidden:u,options:d}=n,p=m(r,a,d),h={category_id:e,category_uid:i,category_name:c,order:o,type:a,labels:s,display_type:l,is_hidden:u,...p};t.push(h)}return t.sort((e,t)=>e.order-t.order),t},[]),m=(e,t,r)=>{var n;switch(t){case"text":case"template_customization":case"image_customization":return{value:e.value};case"selection":{let t=null==r?void 0:r.filter(t=>t.id===+e.value)[0];return{value:null==t?void 0:t.cart_name,category_option_id:null==t?void 0:t.id,is_hidden:(null==t?void 0:t.cart_display_type)==="hide",image:null==(n=null==t?void 0:t.image)?void 0:n.url,cart_display:null==t?void 0:t.cart_display_type}}}},y=(e,t,r)=>{var n;let i="text"!==e.display_type&&"dnd"!==e.display_type,o=!r||"visual"===t.cart_display_type,a=!!(null!=(n=t.image)&&n.url);return i&&o&&a},v=(e,t="USD",r,i)=>{var o;let a,s;if(!e)return"";if(null!=(o=e.related_product)&&o.pricing&&(a=e.related_product.pricing.price,s=e.related_product.pricing.pricing_type),null==a&&e.use_price_adjustment_in_name&&(a=e.price_adjustment),null==a||0===a)return e.name;let l="diff"!==s&&s?"":a>0?"+ ":"- ",c=((e,t,r,n=!0)=>{let i={style:"currency",currency:e,minimumFractionDigits:n&&Number.isInteger(t)?0:2};return new Intl.NumberFormat(r,i).format(t)})(t,Math.abs(a),r);return i?(0,n.jsxs)("div",{className:"item-editor-label",children:[(0,n.jsx)("span",{className:"option-name",children:e.name}),(0,n.jsxs)("span",{className:"option-price",children:[l," ",c]})]}):`${e.name} (${l}${c})`},_=(e,t)=>{let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)}}},11290:(e,t,r)=>{"use strict";r.d(t,{J:()=>v,d:()=>_});var n=r(37876),i=r(14232),o=r(26635),a=r(41289),s=r(28862),l=r(65364);let c=async(e,t)=>{let{publicAPI:r,siteId:n,currency:i,targetLocale:o}=e,a="componentId"in t,s=a?"api/components/v1/preview/get":"api/components/v1/content/get",c={...t,...!a&&{renderingType:"clientSide"},siteId:n,currency:i,targetLocale:o},u="true"===l.env.NEXT_PUBLIC_IS_LOCALHOST;try{let t=u?await fetch("/api/dev/xpm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pathname:s,publicAPI:r,body:c})}):await fetch("".concat(r,"/").concat(s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!t.ok)throw Error("XPM API failed with status ".concat(t.status));let n=await t.text();if(!n||""===n.trim())throw Error("XPM API returned empty response body (status ".concat(t.status,")"));return{...JSON.parse(n),siteData:e,statusCode:t.status,error:!1}}catch(e){throw Error(e instanceof Error?e.message:"XPM API request failed")}},u=(e,t)=>{if(!e||"object"!=typeof e)return e;let r=e=>e&&"string"==typeof e&&e.startsWith("/digital-asset/")?"".concat(t.cdn).concat(e):e;if(Array.isArray(e))return e.map(e=>u(e,t));let n={...e};for(let e in n){let i=n[e];"string"==typeof i?n[e]=r(i):"object"==typeof i&&null!==i&&(n[e]=u(i,t))}return n};var d=r(77053),p=r(89099),h=r(19110),f=r(29846),g=r(97268),m=r(98775),y=r(75582);let v=(0,i.createContext)(void 0),_=e=>{let{serverData:t,children:r}=e,{data:l}=(0,o.Ay)(e=>e),_=(0,a.Y)(),{data:b,hiddenVariantsMap:w,isLoading:S,isResolved:k,hasError:C,fetchXPM:E}=(e=>{let[t,r]=(0,i.useState)(e),[n,o]=(0,i.useState)(e),[a,l]=(0,i.useState)({}),[p,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[m,y]=(0,i.useState)(!1),v=(0,d.B)(e=>e.registerVariantId),_=(0,s.mf)();return e!==t&&(r(e),o(e),g(!1)),{data:n,hiddenVariantsMap:a,isLoading:p,isResolved:f,hasError:m,fetchXPM:(0,i.useCallback)(async(e,t)=>{h(!0),y(!1);try{let r=await c(e,t);if(!r||!r.componentsContent){console.error("[XPM] No components content received from XPM"),y(!0);return}let n={},i=r.componentsContent.reduce((t,r)=>{let i=r.componentName.toLowerCase().replace(/\s+/g,"_"),o=r.parentSku?"".concat(i,"_").concat(r.parentSku):i,{content:a,hiddenVariantInfo:s}=(e=>{let{component:t,growthbook:r}=e,n=(e=>{var t,r;if(!e||"Running"!==e.status)return null;let n=null!=(t=e.variations)?t:[];if(n.length<2)return null;let i=n.map((e,t)=>t),o=n.map(e=>e.weight),a=n.map((e,t)=>({key:t.toString(),name:e.name||"Variation ".concat(t+1)}));return{config:{key:e.friendlyId,variations:i,weights:o,meta:a,name:e.name,coverage:null!=(r=e.coverage)?r:1,hashVersion:2,phase:"Main",...e.bucketingSeed?{seed:e.bucketingSeed}:{}},variationsList:n}})(t.experiment);if(n&&r)try{var i;let e=r.run(n.config),o="number"==typeof e.value?e.value:0,a=null!=(i=n.variationsList[o])?i:n.variationsList[0];if((null==a?void 0:a.isEnabled)===!1)return{content:null,hiddenVariantInfo:{componentId:t.componentId,componentName:t.componentName,variantId:t.variantId,variantName:t.variantName,variantPriority:t.variantPriority,experiment:t.experiment}};return{content:a.content,hiddenVariantInfo:null}}catch(e){console.warn("[XPM] Inline experiment evaluation failed, falling back to base content:",e)}return{content:t.content,hiddenVariantInfo:null}})({component:r,growthbook:_});if(s&&(n[o]=s),null===a)return t;let l=JSON.parse(a),c=u(l,e);return t[o]={...r,content:c,renderingType:"clientSide"},t},{});o(e=>({...e,...i}
6)),l(n),r.componentsContent.forEach(e=>{e.variantId&&v(e.variantId)})}catch(e){y(!0),console.error("[XPM] Failed to fetch XPM data:",e)}finally{h(!1),g(!0)}},[_,v])}})(t),A=(0,y.A)(e=>e.fetchCartDataError);(0,i.useEffect)(()=>{_&&E(l,_)},[JSON.stringify(_),l,E,t]);let{userCountry:I,city:x}=null!=_?_:{};return(e=>{let{data:t,hiddenVariantsMap:r,userCountry:n,city:o}=e,{asPath:a}=(0,p.useRouter)(),s=(0,f.n)(),{pushToDataLayer:l}=(0,h.ur)(),c=(0,i.useRef)(new Set),u=(0,i.useRef)({asPath:a,userId:s,userCountry:n,city:o,pushToDataLayer:l});u.current={asPath:a,userId:s,userCountry:n,city:o,pushToDataLayer:l};let d=(0,i.useCallback)(e=>{if(c.current.has(e.componentId))return;let{asPath:t,userId:r,userCountry:n,city:i,pushToDataLayer:o}=u.current,[a]=(0,g.MO)(t);o({event:"Exp-m Variant Impression",...(0,m.j)(e),deviceType:"",userId:r,page:a||"home",userCountry:n,city:i}),c.current.add(e.componentId)},[]);(0,i.useEffect)(()=>{c.current=new Set},[a]),(e=>{let{data:t,onVisible:r,timeout:n=5e3}=e,o=(0,i.useRef)({}),a=(0,i.useRef)({}),s=(0,i.useRef)({}),l=()=>{Object.values(o.current).forEach(e=>e.disconnect()),Object.values(a.current).forEach(e=>e.disconnect()),Object.values(s.current).forEach(e=>clearTimeout(e)),o.current={},a.current={},s.current={}};(0,i.useEffect)(()=>{if(t&&r)return l(),Object.keys(t).forEach(e=>{let t=CSS.escape(e),i='[id*="'.concat(t,'"], [data-xpm-key="').concat(t,'"]'),l=t=>{let n=new IntersectionObserver(t=>{let[i]=t;i.isIntersecting&&(r(e),n.disconnect(),delete o.current[e],a.current[e]&&(a.current[e].disconnect(),delete a.current[e]),s.current[e]&&(clearTimeout(s.current[e]),delete s.current[e]))},{threshold:.1});n.observe(t),o.current[e]=n},c=document.querySelector(i);if(c)l(c);else{let t=new MutationObserver((t,r)=>{let n=document.querySelector(i);n&&(l(n),r.disconnect(),delete a.current[e])});t.observe(document.body,{childList:!0,subtree:!0}),a.current[e]=t,s.current[e]=setTimeout(()=>{a.current[e]&&(a.current[e].disconnect(),delete a.current[e],console.warn('Element with id "'.concat(e,'" was not found after ').concat(n,"ms")))},n)}}),l},[t,r,n])})({data:(0,i.useMemo)(()=>{let e={...null!=t?t:{}};return r&&Object.entries(r).forEach(t=>{let[r,n]=t;e[r]||(e[r]=n)}),e},[t,r]),onVisible:(0,i.useCallback)(e=>{let n=null==t?void 0:t[e];if(n)return void d(n);let i=null==r?void 0:r[e];i&&d(i)},[t,r,d])})})({data:b,hiddenVariantsMap:w,userCountry:I,city:x}),(0,n.jsx)(v.Provider,{value:{data:b,hiddenVariantsMap:w,isLoading:S,isResolved:k||A,hasError:C},children:r})}},11782:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{B:()=>n})},12584:(e,t,r)=>{"use strict";r.d(t,{ws:()=>l,I8:()=>u,d8:()=>d,Uv:()=>c});var n=r(86468),i=r(4815);let o=async e=>{let t=new AbortController,r=setTimeout(()=>t.abort(),3e4);try{let r=await e.userManager.getUser();if(null==r)return{};let o=(0,i.A)(e.siteId.toString());if(!o)return{};let a=(0,n.X)(o.brand,o.country),s=await fetch("".concat("/"===a?"":a,"/api/v1/account/postlogin"),{headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(r.access_token)},method:"POST",signal:t.signal});return JSON.parse(await s.text()||"{}")}finally{clearTimeout(r)}};var a=r(65835),s=r(77874);let l=async e=>{var t;await e.userManager.signinSilent();let r=await o(e);r.LoyaltyLion&&(t=JSON.parse(r.LoyaltyLion),s.L.getState().onLogin(t))},c=async(e,t,r)=>{let{email:n,password:i,firstName:o,lastName:s,isSendNews:c}=e,{siteId:u,authUrls:d}=t,p=await (0,a.sc)(r?d.signupExt:d.signup,JSON.stringify({email:n,password:i,firstName:o,lastName:s,isSubscribedToNewsletter:c,siteId:u}));return await l(t),p},u=async(e,t)=>{let{email:r,password:n}=e,{authUrls:i}=t,o=await (0,a.sc)(i.signin,JSON.stringify({email:r,password:n}));return await l(t),o},d=async e=>{let{userManager:t,authUrls:r}=e;try{await (0,a.sc)(r.signout),await t.removeUser(),s.L.getState().onLogout()}catch(e){return Promise.reject({errorCode:0,errorMessage:"TgLogin.signOut: Backend error"})}}},13040:(e,t,r)=>{"use strict";r.d(t,{l:()=>i});let n=["warranty","virtual"],i=e=>!1!==e.is_configurable||n.includes(e.type)},13938:(e,t,r)=>{"use strict";r.d(t,{JZ:()=>i,Vy:()=>s,Xs:()=>c,bP:()=>n,fH:()=>l,xG:()=>u});let n={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},i=console,o={};
6Object.keys(n).forEach(e=>{o[e]=i[e]});let a="Datadog Browser SDK:",s={debug:o.debug.bind(i,a),log:o.log.bind(i,a),info:o.info.bind(i,a),warn:o.warn.bind(i,a),error:o.error.bind(i,a)},l="https://docs.datadoghq.com",c=`${l}/real_user_monitoring/browser/troubleshooting`,u="More details:"},15714:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(79307);let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(r){let i=(0,n.nm)()[e];if(null==i)throw Error("Undefined data error for key: ".concat(e));return t?r(i):{data:r(i)}}}},15829:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});let n={siteSettings:[40,30,48,42,43,495,494,44,49,45,47,52,99,28,20],scs:[30,42,494],googleTagGateway:[43,45,47,495],localArticleCSS:[40,30,48,42,43,495,494,44,49,45,47,67,75,63,91,65,93,62,64,94,81,84,26,28,99,52,20,51,61,27,35,79],productPresentation:[40,42,495,47]},i=(e,t)=>n[t].includes(e)},16590:(e,t,r)=>{"use strict";r.d(t,{JL:()=>i,Th:()=>s,WO:()=>o,pH:()=>l,ts:()=>a});var n=r(16951);let i=(e,t)=>{var r,i,o;let a=null==t||null==(r=t.categories)?void 0:r.find(e=>e.labels.some(e=>"material"===e.name.toLowerCase())),s=null==a||null==(o=a.options)||null==(i=o.find(t=>{var r;return e===(null==(r=t.related_product)?void 0:r.sku)}))?void 0:i.name;if(s&&null!==s)return s;if(!e)return;if(e.includes("555-26-")||e.includes("106-01-"))return"Virtual Item";let l=e.replace(/-T|-A/,"").split("-").pop(),c=null===n.D||void 0===n.D?void 0:n.D.find(e=>e.key===l),u=null==c?void 0:c.color;return u?(null==u?void 0:u.charAt(0).toUpperCase())+(null==u?void 0:u.slice(1)):"other"},o=e=>{if(!e)return null;let t=20*Math.floor(((e=Math.floor(e))-1)/20)+1;return t<=200?"".concat(t,"-").concat(t+19):t>200?"200+":void 0},a=(e,t)=>{let{name:r,price:n,sku:a}=e,{selling:s}=n;return{item_id:a,item_name:r,item_category:void 0,item_category2:o(s),price:s,item_variant:i(a),index:t+1,quantity:1}},s=(e,t,r,n,i)=>{let o=e.price.selling,a=e.sku,s=t.sku;return{switchedItemPrice:o,switchedItemSku:a,mainItemSku:s,mainItemPrice:t.price.selling,mainItemPosition:r+1,mainItemIndex:i&&i+1,switchedItemPosition:n&&n+1}},l=(e,t,r)=>({event:"view_item_list",ecommerce:{items:e.map(e=>{var n;return{item_name:e.name,item_id:e.sku,item_variant:e.material,price:e.price.selling,index:(null!=(n=e.index)?n:0)+1,quantity:1,item_list_id:r,item_list_name:t}}),item_quantity:e.length},_clear:!0})},16951:(e,t,r)=>{"use strict";r.d(t,{D:()=>n});let n=[{key:"01",color:"solid-gold",id:"solid-gold"},{key:"02",color:"silver",id:"sterling-silver"},{key:"03",color:"white-gold",id:"white-gold"},{key:"04",color:"silver",id:"sterling-silver"},{key:"05",color:"solid-gold",id:"solid-gold"},{key:"06",color:"solid-gold",id:"solid-gold"},{key:"07",color:"white-gold",id:"white-gold"},{key:"08",color:"gold",id:"gold-plated"},{key:"09",color:"gold",id:"gold-plated"},{key:"10",color:"silver",id:"silver"},{key:"11",color:"silver",id:"steel"},{key:"12",color:"solid-gold",id:"solid-gold"},{key:"13",color:"rose-gold",id:"rose-gold-plated"},{key:"14",color:"rose-gold-14K",id:"rose-gold"},{key:"15",color:"mixed-metals",id:"mixed-metals"},{key:"16",color:"gold",id:"gold"},{key:"17",color:"rose-gold",id:"rose-gold"},{key:"18",color:"silver",id:"silver"},{key:"19",color:"silver",id:"silver"},{key:"20",color:"solid-gold",id:"solid-gold"},{key:"21",color:"rose-gold",id:"rose-gold-plated"},{key:"22",color:"solid-gold",id:"solid-gold"},{key:"25",color:"solid-gold",id:"solid-gold"},{key:"26",color:"rose-gold",id:"rose-gold"},{key:"27",color:"mixed-metals",id:"mixed-metals"},{key:"28",color:"silver",id:"sterling-silver"},{key:"29",color:"gold",id:"gold-plated"},{key:"30",color:"rose-gold",id:"rose-gold-plated"},{key:"31",color:"white-gold",id:"white-gold"},{key:"32",color:"beads",id:"beads"},{key:"33",color:"gold",id:"gold-vermeil"},{key:"34",color:"solid-gold",id:"solid-gold"},{key:"35",color:"solid-gold",id:"solid-gold"},{key:"36",color:"silver",id:"silver"},{key:"37",color:"silver",id:"silver"},{key:"38",color:"silver",id:"silver"},{key:"40",color:"silver",id:"silver"},{key:"41",color:"gold",id:"gold-vermeil"},{key:"43",color:"gold",id:"gold"},{key:"44",color:"white-gold",id:"white-gold"},{key:"45",color:"rose-gold",id:"rose-gold"},{key:"46",color:"rose-gold",id:"rose-gold"},{key:"47",color:"solid-gold",id:"solid-gold"},{key:"48",color:"silver",id:"silver"},{key:"49",color:"silver",id:"silver"},{key:"50",color:"silver",id:"silver"},{key:"51",color:"silver",id:"silver"},{key:"52",color:"silver",id:"silver"},{key:"53",color:"solid-gold",id:"solid-gold"},{key:"54",color:"silver",id:"silver"},{key:"55",color:"rose-gold-14K",id:"rose-gold"},{key:"56",color:"silver",id:"silver"},{key:"57",color:"gold",id:"gold-plated"},{key:"58",color:"rose-gold",id:"rose-gold"},{key:"59",color:"gold",id:"gold-vermeil"},{key:"60",color:"solid-gold",id:"solid-gold"},{key:"61",color:"solid-gold",id:"solid-gold"},{key:"64",color:"rose-gold-14K",id:"rose-gold"},{key:"65",color:"rose-gold",id:"rose-gold-vermeil"},{key:"66",color:"rose-gold",id:"rose-gold-vermeil"},{key:"70",color:"beads",id:"beads"},{key:"72",color:"mixed-metals",id:"mixed-metals"},{key:"75",color:"silver",id:"silver-with-birthstones"},{key:"76",color:"gold-plated",id:"gold-plated-with-birthstones"},{key:"77",color:"rose-gold",id:"rose-gold-plated-with-birthstones"},{key:"78",color:"gold-vermeil",id:"gold-vermeil-with-birthstones"},{key:"79",color:"rose-gold",id:"rose-gold-vermeil-with-birthstones"},{key:"80",color:"gold",id:"10k-yellow-gold-with-birthstones"},{key:"81",color:"gold",id:"14k-yellow-gold-with-birthstones"},{key:"82",color:"white-gold",id:"10k-white-gold-with-birthstones"},{key:"83",color:"white-gold",id:"14k-white-gold-with-birthstones"},{key:"84",color:"mixed-metals",id:"mixed-metals"},{key:"88",color:"silver",id:"silver"},{key:"89",color:"gold",id:"gold-plated"},{key:"90",color:"silver",id:"silver"},{key:"91",color:"gold",id:"gold"},{key:"94",color:"rose-gold",id:"rose-gold-plated"},{key:"95",color:"rose-gold",id:"rose-gold-plated"},{key:"97",color:"silver",id:"silver"},{key:"98",color:"gold",id:"gold"},{key:"103",color:"silver",id:"silver-plated-brass-with-precious-stones"},{key:"104",color:"gold-plated",id:"gold-plated"},{key:"105",color:"silver",id:"silver"},{key:"106",color:"gold-plated",id:"gold-plated"},{key:"107",color:"gold-plated",id:"gold-plated"},{key:"111",color:"rose-gold",id:"rose-gold"},{key:"112",color:"solid-gold",id:"solid-gold"},{key:"113",color:"white-gold",id:"white-gold"},{key:"114",color:"gold-plated",id:"gold-plated"},{key:"115",color:"silver",id:"silver"},{key:"116",color:"gold-plated",id:"gold-plated"},{key:"117",color:"silver",id:"silver"},{key:"118",color:"gold-plated",id:"gold-plated"},{key:"120",color:"gold-plated",id:"gold-plated"}]},17282:(e,t,r)=>{"use strict";function n(e,t){for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(t(n,r,e))return n}}function i(e){return Object.values(e)}function o(e){return Object.entries(e)}r.d(t,{KQ:()=>i,Uk:()=>n,WP:()=>o})},17745:(e,t,r)=>{"use strict";r.d(t,{M:()=>o,s:()=>i});var n=r(93487);function i(e,t,r){if("object"!=typeof e||null===e)return JSON.stringify(e);let n=o(Object.prototype),i=o(Array.prototype),a=o(Object.getPrototypeOf(e)),s=o(e);try{return JSON.stringify(e,t,r)}catch(e){return"<error: unable to serialize object>"}finally{n(),i(),a(),s()}}function o(e){let t=e.toJSON;return t?(delete e.toJSON,()=>{e.toJSON=t}):n.l}},18847:(e,t,r)=>{e.exports=r(52496)},18932:(e,t,r)=>{"use strict";function n(e){return 0!==e&&100*Math.random()<=e}function i(e,t){return+e.toFixed(t)}function o(e){return a(e)&&e>=0&&e<=100}function a(e){return"number"==typeof e}r.d(t,{Et:()=>a,LI:()=>i,fp:()=>o,ic:()=>n})},19040:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(15714).A)("googleTagManager")},19110:(e,t,r)=>{"use strict";r.d(t,{m2:()=>c,ur:()=>n.A,TR:()=>a,lY:()=>v});var n=r(86241),i=r(89099),o=r(14232);let a=()=>{let{asPath:e}=(0,i.useRouter)(),{pushToDataLayer:t}=(0,n.A)();(0,o.useEffect)(()=>{t({event:"home_page_loaded"})},[e])};var s=r(26635),l=r(1838);let c=()=>{let{query:{categoryId:e},asPath:t}=(0,i.useRouter)(),{pushToDataLayer:r}=(0,n.A)(),{data:a}=(0,l.e)(e=>e.title),{data:c}=(0,s.Ay)(e=>e.currency);(0,o.useEffect)(()=>{r({event:"category_page_dataLayer_load",pageLoadData:{category_id:e,category_name:a,currency:c}})},[t])};var u=r(44510),d=r(16590),p=r(66689),h=r(81582),f=r(29132);let g=(e,t)=>{var r;if(!e)return null;let n=(0,f.$U)(e.mediaGallery),{sku:i,name:o,type:a,pricing:s,url:l}=e,{selling_price:c}=s,u=(0,h.y)(s);return{item_id:i,item_name:o,item_category:a,item_category2:(0,d.WO)(c),image_url:null!=(r=null==n?void 0:n.src)?r:null,item_url:l,price:c,crossed_price:u,quantity:1,item_variant:(0,d.JL)(i,e),item_purchase_type:t}};var m=r(20377),y=r(34289);let v=()=>{let{pushToDataLayer:e}=(0,n.A)(),{asPath:t}=(0,i.useRouter)(),{data:{id:r,sku:a,name:l,image:c,price:h}}=(0,u.B)(e=>e),{selling:f,discountType:v,discountAmount:_}=h,{data:b}=(0,u.B)(e=>e.catalogProduct),{data:w}=(0,s.Ay)(e=>e.currency);(()=>{let{pushToDataLayer:e}=(0,n.A)(),{asPath:t}=(0,i.useRouter)(),{data:{price:r}}=(0,u.B)(e=>e),{selling:a}=r,{data:l}=(0,u.B)(e=>e.catalogProduct),{data:c}=(0,s.Ay)(e=>e.currency),{data:d,isLoading:p}=(0,y.Ch)("Nested Products"),h=(0,m.zx)(e=>e.catalogProducts),f=(0,o.useRef)(!1),v=null!==d,_=Object.keys(h).length>0;(0,o.useEffect)(()=>
6{if(p||f.current||v&&!_)return;let t=setTimeout(()=>{f.current=!0;let t=[g(l,"primary")].filter(Boolean);for(let e of Object.values(h)){let r=g(e,"complementary");r&&t.push(r)}e({event:"view_item",ecommerce:{currency:c,value:a,items:t,item_quantity:t.length},_clear:!0})},500);return()=>clearTimeout(t)},[p,v,_,h,l,c,a]),(0,o.useEffect)(()=>{f.current=!1},[t])})(),(0,o.useEffect)(()=>{let t=(0,p.x)(f,v,_);e({event:"product_page_dataLayer_load",id:r,product_sku:a,product_name:l,product_image_url:null==c?void 0:c.src,product_price:null==h?void 0:h.selling,product_crossed_price:t,type:b.type,product_aiv_bucket:(0,d.WO)(null==h?void 0:h.selling),product_material:(0,d.JL)(a),currency:w})},[t])};r(37876)},20377:(e,t,r)=>{"use strict";r.d(t,{o_:()=>i,zg:()=>o,zx:()=>n});let n=(0,r(8106).v)((e,t)=>({catalogProducts:{},openSku:null,open:t=>e({openSku:t}),close:()=>e({openSku:null}),getCatalogProduct:e=>t().catalogProducts[e],populateCatalogProducts:t=>{let r=t.filter(e=>null==e?void 0:e.sku);0!==r.length&&e(e=>({catalogProducts:{...e.catalogProducts,...Object.fromEntries(r.map(e=>[e.sku,e]))}}))},resetCrossSellStore:()=>e({catalogProducts:{},openSku:null})})),i=e=>e.openSku,o=e=>t=>e?t.catalogProducts[e]:void 0},20549:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(8106).v)()(e=>({isCustomErrorEnabled:!0,setCustomErrorToggle:t=>e(()=>({isCustomErrorEnabled:t}))}))},20788:(e,t,r)=>{"use strict";r.d(t,{J:()=>n});let n={homepage:"",article:"articles",category:"categories",product:"products",shoppingCart:"shopping-cart",contactInformation:"contact-information",subbrand:"subbrand",search:"search",myAccount:"my-account",myAccountProfile:"my-account/profile",myAccountOrders:"my-account/orders",myAccountRewards:"my-account/rewards",myAccountResetPassword:"my-account/reset-password",checkoutConfirmation:"checkout",orderTracking:"order-tracking",feedback:"feedback"}},22014:(e,t,r)=>{"use strict";r.d(t,{P:()=>m,V:()=>y});var n=r(93619),i=r(95993),o=r(98653),a=r(54198),s=r(91298),l=r(51689),c=r(2564),u=r(37521);let d=e=>{var t,r,n,i,o,a,s,l,p,h;let f=(0,c.I5)(e),g=null==(t=e.itemEditor)?void 0:t.catalogProduct,m=g?null!=(o=(0,u.fD)(g.friendly_url))?o:"shortid-".concat(g.short_id):"";return{key:e.key,product:{productId:m,sku:e.sku,name:e.name,image:f?{src:f.src,alt:f.alt,title:f.title}:null,isInStock:e.inStock,isArchived:null!=(a=null==g?void 0:g.is_archived)&&a,isCurrentShippingCountrySupported:!e.isExcluded,isConfigurable:null!=(s=null==(r=e.itemEditor)?void 0:r.isEditable)&&s,price:{selling:e.price.selling,discountType:e.price.discountType,discountAmount:e.price.discountAmount,priceAdjustmentsSum:e.price.priceAdjustmentsSum}},selectedOptions:(null!=(l=null==(n=e.itemEditor)?void 0:n.userSelections)?l:[]).map(e=>({categoryId:e.category_id,categoryUid:e.category_uid,value:String(e.value)})),editHref:(e=>{var t;if("custom_pdp_article"!==e.itemAddPageType)return null;let r=null==(t=e.itemAddUrl)?void 0:t.trim(),n=!!r&&r.startsWith("/")&&!r.startsWith("//"),i=!!r&&/^https?:\/\//i.test(r);if(!n&&!i)return null;let[o,a]=r.split("#"),s=o.includes("?")?"&":"?",l="".concat(o).concat(s,"cartItemKey=").concat(encodeURIComponent(e.key));return a?"".concat(l,"#").concat(a):l})(e),hasDetails:null!=(p=null==(i=e.itemEditor)?void 0:i.hasDetails)&&p,isFreeGift:e.isFreeGift,type:e.type,children:(null!=(h=e.pips)?h:[]).filter(e=>e.nested).map(d)}};var p=r(58040);let h={min_subtotal_not_met:"MinSubTotalCart",min_total_not_met:"MinTotalCart",free_gift_invalid:"FreeGift"},f=function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2]},g=Promise.resolve(),m=e=>{let t=g.then(e,e);return g=t.then(()=>void 0,()=>void 0),t},y=(e,t)=>({siteData:void 0,initialized:!1,items:[],cardItemTree:[],cartVersion:0,freeGiftItems:[],totalItems:0,hasOOSitems:!1,hasExcludedItems:!1,hasMultipleFreeGifts:!1,currentItem:null,orderSummary:null,coupon:null,voucher:null,externalSelectedShippingTypeId:null,availableSdms:[],selectedSdm:null,shippingLogos:[],contact:null,shippingAddress:null,fetchCartDataLoading:!1,fetchCartDataError:!1,pendingCartWrites:0,mergeGuestCart:async e=>{let r=await (0,i.F6)(e),n=await (0,l.$9)(e,r);n.error&&(0,a.D)("Guest cart merge failed, falling back to a plain cart read",{statusCode:n.statusCode,location:"shopping-cart"}),await t().fetchCartData(e)},fetchCartData:async(t,r)=>
6{e({fetchCartDataLoading:!0,fetchCartDataError:!1},!1,"fetchCartData/start");try{var c,u,f,g,m,y,v,_,b,w,S,k,C,E,A;r&&(0,i.do)(t,r);let a=await (0,i.F6)(t);if((0,s.S)(t)){let r=await (0,l.Xl)(t,a);if(r.error&&404!==r.statusCode)throw Error(r.errorMessage);let n=r.error,i=n?[]:r.items,o=n?[]:(null!=(m=r.meta.readyForPaymentErrors)?m:[]).filter(e=>e in h).map(e=>({ErrorType:h[e],ErrorMessage:""}));e({siteData:t,items:[],cardItemTree:i,cartVersion:n?0:null!=(y=r.meta.version)?y:0,freeGiftItems:[],totalItems:n?0:null!=(v=null==(f=r.items)?void 0:f.length)?v:0,hasOOSitems:i.some(e=>!e.product.isInStock),hasExcludedItems:i.some(e=>(0,p.A)(e.product)),coupon:n||!r.coupon.appliedCode?null:r.coupon,voucher:n?null:null!=(_=r.voucher)?_:null,couponCode:n?"":null!=(b=r.coupon.appliedCode)?b:"",externalSelectedShippingTypeId:n?null:null!=(w=null==(g=r.shipping.selectedMethod)?void 0:g.externalId)?w:null,availableSdms:n?[]:null!=(S=r.shipping.availableMethods)?S:[],selectedSdm:n?null:null!=(k=r.shipping.selectedMethod)?k:null,shippingLogos:n?[]:null!=(C=r.shipping.logos)?C:[],contact:n?null:r.contact,shippingAddress:n?null:r.shipping.address,orderSummary:n?null:r.totals,cartIsValid:0===o.length,errorMessages:o,hasMultipleFreeGifts:o.some(e=>"FreeGift"===e.ErrorType),fetchCartDataLoading:!1,fetchCartDataError:!1,initialized:!0},!1,"fetchCartData/success(scs)");return}let I=await (0,o.fG)({siteData:t,pathname:"api/v1/cart",query:{userId:a}}),x=(0,n.Ay)(I),T=null==(c=x.filter(e=>0===e.price.selling))?void 0:c.slice(1),P=(e=>{let t,{OrderSummary:r}=e;if(!r)return null;let{SubTotal:n,TotalPrice:i,ShippingTypePrice:o,ShowTaxRow:a,IsTaxIncluded:s,AppliedCoupon:l,CrossedPricesDiscount:c}=r,{DiscountValue:u}=l.Coupon;return(null!==u||c)&&(t=(u||0)+(c||0)),{subtotal:n,shipping:o,...u&&{discount:u},...a&&{tax:{amount:0,isIncluded:!!s}},...t&&{savedAmount:t},total:i}})(I),O=(e=>{let{OrderSummary:t}=e;if(!t)return null;let{CouponCode:r,CouponMessage:n,IsValid:i}=t.AppliedCoupon.Coupon;return r?{status:i?"Success":"NotApplied",appliedCode:r,message:n,reasonCode:null,reasonValue:null}:null})(I),R=null!=(E=null==O?void 0:O.appliedCode)?E:void 0,N=null!=(A=null==(u=I.ShippingTypes)?void 0:u.SelectedOrDefaultExternalShippingTypeId)?A:null,D=x.length+x.reduce((e,t)=>e+=t.pips.filter(e=>!["gift_box","warranty"].includes(e.type)).length,0),L=x.some(e=>!e.inStock),U=x.some(e=>e.isExcluded);e({siteData:t,items:x,cardItemTree:x.flatMap(e=>{var t;return[d(e),...(null!=(t=e.pips)?t:[]).filter(e=>!e.nested).map(d)]}),freeGiftItems:T,totalItems:D,hasOOSitems:L,hasExcludedItems:U,coupon:O,couponCode:R,externalSelectedShippingTypeId:N,orderSummary:P,fetchCartDataLoading:!1,fetchCartDataError:!1,initialized:!0},!1,"fetchCartData/success")}catch(t){e({fetchCartDataLoading:!1,fetchCartDataError:!0},!1,"fetchCartData/failed"),(0,a.D)("Error fetching cart data",{error:t,location:"shopping-cart"})}},postToCartClientLegacyAPI:async(e,r)=>{let{initialized:n,siteData:l,fetchCartData:c}=t();try{if(!l||!n)throw Error("Cart not initialized");if((0,s.S)(l))throw Error('Cart action "'.concat(e,'" not yet wired for SCS (RES-12681)'));let t=(0,i.F6)(l);if(!t)throw Error("Missing user id");await (0,o.LO)({siteData:l,pathname:"api/v1/cart".concat(e),body:{UserId:t,...r}}),await c(l)}catch(t){throw(0,a.D)("Error posting to cart client API",{error:t,location:"shopping-cart",pathname:e,body:r}),t}},postToCartClientAPI:async(r,n)=>{let o=async()=>{let{initialized:e,siteData:o,cartVersion:s,fetchCartData:c}=t();try{if(!o||!e)throw Error("Cart not initialized");let a=(0,i.F6)(o);if(!a)throw Error("Missing user id");f(r,"sending with cartVersion ".concat(s));let u=await (0,l.n6)(o,r,{userId:a,siteId:o.siteId,cartVersion:s,...n});if(u.error){let e=Error(u.errorMessage);throw e.statusCode=u.statusCode,e}return await c(o),f(r,"saved, cart is now at cartVersion ".concat(t().cartVersion)),u}catch(e){throw(0,a.D)("Error posting SCS cart action",{error:e,location:"shopping-cart",action:r,body:n}),f(r,"REJECTED with cartVersion ".concat(s," â ").concat(e instanceof Error?e.message:"unknown error"),"error"),o&&(await c(o).catch(()=>void 0),f(r,"refetched after the failure, cartVersion is now ".concat(t().cartVersion," â the next write will use it"))),e}};e({pendingCartWrites:t().pendingCartWrites+1},!1,"Cart write pending: ".concat(r));try{return await m(o)}finally{e({pendingCartWrites:t().pendingCartWrites-1},!1,"Cart write settled: ".concat(r))}},flushCartWrites:()=>m(()=>Promise.resolve()),ensureCartCurrency:async()=>{let{siteData:e,initialized:r,shippingAddress:n}=t();if(!e||!r||(null==n?void 0:n.isoCountryCode))return;let o=await (0,i.F6)(e);if(o)return m(async()=>{let{cartVersion:r}=t();await (0,l.n6)(e,"applyRegionalSettings",{userId:o,siteId:e.siteId,c
6artVersion:r,isoCountryCode:e.userCountry.toUpperCase(),isoCurrencyCode:e.currency}).catch(()=>void 0),await t().fetchCartData(e)})}})},22202:(e,t,r)=>{"use strict";r.d(t,{c:()=>a});let n=e=>({value:e.value,error_text:e.errorText}),i=e=>({controlling_category:0,controlling_option:e.controllingOption,controlled_categories:[],controlling_category_key:e.controllingCategoryKey,controlled_category_keys:e.controlledCategoryKeys}),o=e=>({id:e.id,name:e.name,english_name:e.englishName,cart_name:e.cartName,english_cart_name:e.englishCartName,is_default:e.isDefault,order:e.order,image:e.image?{url:e.image}:null,price_adjustment:e.priceAdjustment,use_price_adjustment_in_name:e.usePriceAdjustmentInName,related_product:e.relatedProduct?((e,t)=>({sku:e.sku,short_id:1,friendly_url:e.productId,pricing:{price:e.price.selling,pricing_type:null!=t?t:""},is_out_of_stock:!e.isInStock,isCurrentShippingCountrySupported:e.isCurrentShippingCountrySupported}))(e.relatedProduct,e.pricingType):null,is_active:e.isActive,is_placeholder:e.isPlaceholder,cart_display_type:e.cartDisplayType}),a=(e,t)=>{var r,a,s,l,c,u;let{price:d,customizationFields:p}=e,{cdn:h}=t;return{id:e.shortId,sku:e.sku,version_id:e.versionId,categories:(null!=(s=p.productCategories)?s:[]).map(e=>((e,t)=>{var r,i,a,s,l;return{id:e.id,uid:e.uid,name:e.name,cart_name:e.cartName,english_name:e.englishName,english_cart_name:e.englishCartName,display_type:e.displayType,is_required:(null==(r=e.validations.is_required)?void 0:r.value)===!0,is_active:e.isActive,order:e.order,type:e.type,options:(null!=(i=e.options)?i:[]).map(o),labels:e.labels,validations:(e=>{let t={};return e.is_required&&(t.is_required=n(e.is_required)),e.max_text_length&&(t.max_text_length=n(e.max_text_length)),e.min_text_length&&(t.min_text_length=n(e.min_text_length)),t})(e.validations),text_placeholder:null!=(a=e.textPlaceholder)?a:null,text_is_multiline:e.textIsMultiline,text_max_length:null!=(s=e.textMaxLength)?s:null,text_min_length:null!=(l=e.textMinLength)?l:null,customization_template:e.customizationTemplate?{url:t?"".concat(t,"/").concat(e.customizationTemplate):e.customizationTemplate}:null}})(e,h)),show_and_hides:(null!=(l=p.showAndHides)?l:[]).map(i),name:e.name,type:e.productType,is_configurable:e.isConfigurable,is_personalizable:e.isPersonalizable,short_id:e.shortId,isInStock:e.isInStock,isCurrentShippingCountrySupported:e.isCurrentShippingCountrySupported,friendly_url:e.productId,pricing:{price_elements:(null==(r=d.discountType)?void 0:r.toLowerCase())==="percentage"?"selling_crossed_discount":"selling_crossed",selling_price:d.selling,crossed_price:d.crossedPrice,discount_percentage:(null==(a=d.discountType)?void 0:a.toLowerCase())==="percentage"?d.discountAmount:0,base_price:d.crossedPrice||d.selling,supplier_price:0},mediaGallery:null!=(c=e.mediaGallery)?c:[],is_archived:e.isArchived,ribbons:null!=(u=e.ribbons)?u:[],is_active:!0}}},23963:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s,m:()=>a});var n=r(34879),i=r(90198),o=r(13938);function a(e){let t={version:"6.33.0",onReady(e){e()},...e};return Object.defineProperty(t,"_setDebug",{get:()=>i.pM,enumerable:!1}),t}function s(e,t,r){let i=e[t];i&&!i.q&&i.version&&o.Vy.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=r,i&&i.q&&i.q.forEach(e=>(0,n.y)(e,"onReady callback threw an error:")())}},24090:(e,t,r)=>{"use strict";r.d(t,{G:()=>a,y:()=>s});var n=r(37876),i=r(14232);let o=(0,i.createContext)({}),a=e=>{let{value:t,children:r}=e;return(0,n.jsx)(o.Provider,{value:null!=t?t:{},children:r})},s=e=>e((0,i.useContext)(o))},26635:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>p,DP:()=>c,P:()=>d,PB:()=>l,Yw:()=>u,rU:()=>s});var n=r(15714),i=r(476),o=r(15829);let a=(0,n.A)("localization"),s=(0,n.A)("siteData"),l=()=>{let{data:e}=a(e=>e.brand);return e},c=()=>(0,i.wR)().currentTheme,u=()=>{let{data:e}=a(e=>e.siteId);return e},d=e=>(0,o.A)(u(),e),p=a},27112:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});var n=r(5489);function i(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(r,i){let o=(0,n.WW)(r);t+=o,e+=r,i&&i(o)},finish(e){e(this.finishSync())},finishSync(){let r={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,r},estimateEncodedBytesCount:e=>e.length}}},27627:(e,t,r)=>{"use strict";r.d(t,{Ww:()=>o,Y9:()=>i,d0:()=>a});var n=r(35428);function i(){let e=(0,n.VZ)().DatadogEventBridge;if(e)return{getCapabilities(){var t;return JSON.parse((null==(t=e.getCapabilities)?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return null==(t=e.getPrivacyLevel)?void 0:t.call(e)},getAllowedWebViewHosts:()=>JSON.parse(e.getAllowedWebViewHosts()),send(t,r,n){e.send(JSON.stringify({eventType:t,event:r,view:n?{id:n}:void 0}))}}}function o(e){let t=i();return!!t&&t.getCapabilities().includes(e)}function a(e){var t;void 0===e&&(e=null==(t=(0,n.VZ)().location)?void 0:t.hostname);let r=i();return!!r&&r.getAllowedWebViewHosts().some(t=>e===t||e.endsWith(`.${t}`))}},28862:(e,t,r)=>{"use strict";r.d(t,{NN:()=>e2,iX:()=>e9,KH:()=>e5,Br:()=>e6,mf:()=>e8});var n,i,o=/^[a-zA-Z:_][a-zA-Z0-9:_.-]*$/,a={revert:function(){}},s=new Map,l=new Set;function c(e){var t=s.get(e);return t||(t={element:e,attributes:{}},s.set(e,t)),t}function u(e,t,r,n,i){var o=r(e),a={isDirty:!1,originalValue:o,virtualValue:o,mutations:[],el:e,_positionTimeout:null,observer:new MutationObserver(function(){if("position"!==t||!a._positionTimeout){"position"===t&&(
6a._positionTimeout=setTimeout(function(){a._positionTimeout=null},1e3));var n=r(e);("position"!==t||n.parentNode!==a.virtualValue.parentNode||n.insertBeforeNode!==a.virtualValue.insertBeforeNode)&&n!==a.virtualValue&&(a.originalValue=n,i(a))}}),mutationRunner:i,setValue:n,getCurrentValue:r};return"position"===t&&e.parentNode?a.observer.observe(e.parentNode,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):a.observer.observe(e,"html"===t?{childList:!0,subtree:!0,attributes:!0,characterData:!0}:{childList:!1,subtree:!1,attributes:!0,attributeFilter:[t]}),a}function d(e,t){var r=t.getCurrentValue(t.el);t.virtualValue=e,e&&"string"!=typeof e?r&&e.parentNode===r.parentNode&&e.insertBeforeNode===r.insertBeforeNode||(t.isDirty=!0,x()):e!==r&&(t.isDirty=!0,x())}function p(e){var t,r=e.originalValue;e.mutations.forEach(function(e){return r=e.mutate(r)}),d((t=r,n||(n=document.createElement("div")),n.innerHTML=t,n.innerHTML),e)}function h(e){var t=new Set(e.originalValue.split(/\s+/).filter(Boolean));e.mutations.forEach(function(e){return e.mutate(t)}),d(Array.from(t).filter(Boolean).join(" "),e)}function f(e){var t=e.originalValue;e.mutations.forEach(function(e){return t=e.mutate(t)}),d(t,e)}function g(e){var t=e.originalValue;e.mutations.forEach(function(e){t=function(e){var t=e.parentSelector,r=e.insertBeforeSelector,n=document.querySelector(t);if(!n)return null;var i=r?document.querySelector(r):null;return r&&!i?null:{parentNode:n,insertBeforeNode:i}}(e.mutate())||t}),d(t,e)}var m=function(e){return e.innerHTML},y=function(e,t){return e.innerHTML=t};function v(e){var t=c(e);return t.html||(t.html=u(e,"html",m,y,p)),t.html}var _=function(e){return{parentNode:e.parentElement,insertBeforeNode:e.nextElementSibling}},b=function(e,t){(!t.insertBeforeNode||t.parentNode.contains(t.insertBeforeNode))&&t.parentNode.insertBefore(e,t.insertBeforeNode)};function w(e){var t=c(e);return t.position||(t.position=u(e,"position",_,b,g)),t.position}var S=function(e,t){return t?e.className=t:e.removeAttribute("class")},k=function(e){return e.className};function C(e){var t=c(e);return t.classes||(t.classes=u(e,"class",k,S,h)),t.classes}function E(e,t){var r=c(e);return r.attributes[t]||(r.attributes[t]=u(e,t,function(e){var r;return null!=(r=e.getAttribute(t))?r:null},function(e,r){return null!==r?e.setAttribute(t,r):e.removeAttribute(t)},f)),r.attributes[t]}function A(e,t,r){if(r.isDirty){r.isDirty=!1;var n,i,o,a,l,c,u,d,p,h,f=r.virtualValue;!r.mutations.length&&(h=s.get(e))&&("html"===t?(null==(n=h.html)||null==(i=n.observer)||i.disconnect(),delete h.html):"class"===t?(null==(o=h.classes)||null==(a=o.observer)||a.disconnect(),delete h.classes):"position"===t?(null==(l=h.position)||null==(c=l.observer)||c.disconnect(),delete h.position):(null==(u=h.attributes)||null==(d=u[t])||null==(p=d.observer)||p.disconnect(),delete h.attributes[t])),r.setValue(e,f)}}function I(e,t){e.html&&A(t,"html",e.html),e.classes&&A(t,"class",e.classes),e.position&&A(t,"position",e.position),Object.keys(e.attributes).forEach(function(r){A(t,r,e.attributes[r])})}function x(){s.forEach(I)}function T(e){if("position"!==e.kind||1!==e.elements.size){var t=new Set(e.elements);document.querySelectorAll(e.selector).forEach(function(r){if(!t.has(r)){var n;e.elements.add(r),n=null,"html"===e.kind?n=v(r):"class"===e.kind?n=C(r):"attribute"===e.kind?n=E(r,e.attribute):"position"===e.kind&&(n=w(r)),n&&(n.mutations.push(e),n.mutationRunner(n))}})}}function P(){l.forEach(T)}function O(e){return"undefined"==typeof document?a:(l.add(e),T(e),{revert:function(){e.elements.forEach(function(t){var r=null;if("html"===e.kind?r=v(t):"class"===e.kind?r=C(t):"attribute"===e.kind?r=E(t,e.attribute):"position"===e.kind&&(r=w(t)),r){var n=r.mutations.indexOf(e);-1!==n&&r.mutations.splice(n,1),r.mutationRunner(r)}}),e.elements.clear(),l.delete(e)}})}function R(e,t){return O({kind:"html",elements:new Set,mutate:t,selector:e})}function N(e,t){return O({kind:"class",elements:new Set,mutate:t,selector:e})}function D(e,t,r){return o.test(t)?"class"===t||"className"===t?N(e,function(e){var t=r(Array.from(e).join(" "));
6e.clear(),t&&t.split(/\s+/g).filter(Boolean).forEach(function(t){return e.add(t)})}):O({kind:"attribute",attribute:t,elements:new Set,mutate:r,selector:e}):a}"undefined"!=typeof document&&(i||(i=new MutationObserver(function(){P()})),P(),i.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1,characterData:!1}));let L={declarative:function(e){var t,r,n=e.selector,i=e.action,o=e.value,s=e.attribute,l=e.parentSelector,c=e.insertBeforeSelector;if("html"===s){if("append"===i)return R(n,function(e){return e+(null!=o?o:"")});else if("set"===i)return R(n,function(){return null!=o?o:""})}else if("class"===s){if("append"===i)return N(n,function(e){o&&e.add(o)});else if("remove"===i)return N(n,function(e){o&&e.delete(o)});else if("set"===i)return N(n,function(e){e.clear(),o&&e.add(o)})}else if("position"===s){if("set"===i&&l){return t=n,r=function(){return{insertBeforeSelector:c,parentSelector:l}},O({kind:"position",elements:new Set,mutate:r,selector:t})}}else if("append"===i)return D(n,s,function(e){return null!==e?e+(null!=o?o:""):null!=o?o:""});else if("set"===i)return D(n,s,function(){return null!=o?o:""});else if("remove"===i)return D(n,s,function(){return null});return a}},U={fetch:globalThis.fetch?globalThis.fetch.bind(globalThis):void 0,SubtleCrypto:globalThis.crypto?globalThis.crypto.subtle:void 0,EventSource:globalThis.EventSource};function M(e){let t=0x811c9dc5,r=e.length;for(let n=0;n<r;n++)t^=e.charCodeAt(n),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0}function j(e,t,r){return 2===r?M(M(e+t)+"")%1e4/1e4:1===r?M(t+e)%1e3/1e3:null}function $(e){return e<=0?[]:Array(e).fill(1/e)}function V(e,t){return e>=t[0]&&e<t[1]}function F(e){try{let t=e.replace(/([^\\])\//g,"$1\\/");return new RegExp(t)}catch(e){console.error(e);return}}function B(e,t){if(!t.length)return!1;let r=!1,n=!1;for(let i=0;i<t.length;i++){let o=function(e,t,r){try{let n=new URL(e,"https://_");if("regex"===t){let e=F(r);if(!e)return!1;return e.test(n.href)||e.test(n.href.substring(n.origin.length))}if("simple"===t)try{let e=new URL(r.replace(/^([^:/?]*)\./i,"https://$1.").replace(/\*/g,"_____"),"https://_____"),t=[[n.host,e.host,!1],[n.pathname,e.pathname,!0]];return e.hash&&t.push([n.hash,e.hash,!1]),e.searchParams.forEach((e,r)=>{t.push([n.searchParams.get(r)||"",e,!1])}),!t.some(e=>!function(e,t,r){try{let n=t.replace(/[*.+?^${}()|[\]\\]/g,"\\$&").replace(/_____/g,".*");return r&&(n="\\/?"+n.replace(/(^\/|\/$)/g,"")+"\\/?"),RegExp("^"+n+"$","i").test(e)}catch(e){return!1}}(e[0],e[1],e[2]))}catch(e){}return!1}catch(e){return!1}}(e,t[i].type,t[i].pattern);if(!1===t[i].include){if(o)return!1}else r=!0,o&&(n=!0)}return n||!r}let z=e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0));async function G(e,t,r){if(t=t||"",!(r=r||globalThis.crypto&&globalThis.crypto.subtle||U.SubtleCrypto))throw Error("No SubtleCrypto implementation found");try{let n=await r.importKey("raw",z(t),{name:"AES-CBC",length:128},!0,["encrypt","decrypt"]),[i,o]=e.split("."),a=await r.decrypt({
6name:"AES-CBC",iv:z(i)},n,z(o));return new TextDecoder().decode(a)}catch(e){throw Error("Failed to decrypt")}}function q(e){return"string"==typeof e?e:JSON.stringify(e)}function H(e){"number"==typeof e&&(e+=""),e&&"string"==typeof e||(e="0");let t=e.replace(/(^v|\+.*$)/g,"").split(/[-.]/);return 3===t.length&&t.push("~"),t.map(e=>e.match(/^[0-9]+$/)?e.padStart(5," "):e).join("-")}function K(e){return"object"==typeof e&&null!==e}function J(e){return e.urlPatterns&&e.variations.some(e=>K(e)&&"urlRedirect"in e)?"redirect":e.variations.some(e=>K(e)&&(e.domMutations||"js"in e||"css"in e))?"visual":"unknown"}async function W(e,t){return new Promise(r=>{let n,i=!1,o=e=>{i||(i=!0,n&&clearTimeout(n),r(e||null))};t&&(n=setTimeout(()=>o(),t)),e.then(e=>o(e)).catch(()=>o())})}function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let X={staleTTL:6e4,maxAge:144e5,cacheKey:"gbFeaturesCache",backgroundSync:!0,maxEntries:10,disableIdleStreams:!1,idleStreamInterval:2e4,disableCache:!1},Q={fetchFeaturesCall:e=>{let{host:t,clientKey:r,headers:n}=e;return U.fetch("".concat(t,"/api/features/").concat(r),{headers:n})},fetchRemoteEvalCall:e=>{let{host:t,clientKey:r,payload:n,headers:i}=e,o={method:"POST",headers:Y({"Content-Type":"application/json"},i),body:JSON.stringify(n)};return U.fetch("".concat(t,"/api/eval/").concat(r),o)},eventSourceCall:e=>{let{host:t,clientKey:r,headers:n}=e;return n?new U.EventSource("".concat(t,"/sub/").concat(r),{headers:n}):new U.EventSource("".concat(t,"/sub/").concat(r))},startIdleListener:()=>{let e;if("undefined"==typeof window||"undefined"==typeof document)return;let t=()=>{"visible"===document.visibilityState?(window.clearTimeout(e),ei.forEac
6h(e=>{e&&"idle"===e.state&&eb(e)})):"hidden"===document.visibilityState&&(e=window.setTimeout(es,X.idleStreamInterval))};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},stopIdleListener:()=>{}};try{globalThis.localStorage&&(U.localStorage=globalThis.localStorage)}catch(e){}let ee=new Map,et=!1,er=new Map,en=new Map,ei=new Map,eo=new Set;async function ea(e){let{instance:t,timeout:r,skipCache:n,allowStale:i,backgroundSync:o}=e;return o||(X.backgroundSync=!1),ec({instance:t,allowStale:i,timeout:r,skipCache:n})}function es(){ei.forEach(e=>{e&&(e.state="idle",e_(e))})}async function el(){try{if(!U.localStorage)return;await U.localStorage.setItem(X.cacheKey,JSON.stringify(Array.from(er.entries())))}catch(e){}}async function ec(e){let{instance:t,allowStale:r,timeout:n,skipCache:i}=e,o=eu(t),a=ed(t),s=new Date,l=new Date(s.getTime()-X.maxAge+X.staleTTL);await ep();let c=X.disableCache||i?void 0:er.get(a);return c&&(r||c.staleAt>s)&&c.staleAt>l?(c.sse&&eo.add(o),c.staleAt<s?em(t):ey(t),{data:c.data,success:!0,source:"cache"}):await W(em(t),n)||{data:null,success:!1,source:"timeout",error:Error("Timeout")}}function eu(e){let[t,r]=e.getApiInfo();return"".concat(t,"||").concat(r)}function ed(e){let t=eu(e);if(!("isRemoteEval"in e)||!e.isRemoteEval())return t;let r=e.getAttributes(),n=e.getCacheKeyAttributes()||Object.keys(e.getAttributes()),i={};n.forEach(e=>{i[e]=r[e]});let o=e.getForcedVariations(),a=e.getUrl();return"".concat(t,"||").concat(JSON.stringify({ca:i,fv:o,url:a}))}async function ep(){if(!et){et=!0;try{if(U.localStorage){let e=await U.localStorage.getItem(X.cacheKey);if(!X.disableCache&&e){let t=JSON.parse(e);t&&Array.isArray(t)&&t.forEach(e=>{let[t,r]=e;er.set(t,Y(Y({},r),{},{staleAt:new Date(r.staleAt)}))}),eh()}}}catch(e){}if(!X.disableIdleStreams){let e=Q.startIdleListener();e&&(Q.stopIdleListener=e)}}}function eh(){let e=Array.from(er.entries()).map(e=>{let[t,r]=e;return{key:t,staleAt:r.staleAt.getTime()}}).sort((e,t)=>e.staleAt-t.staleAt),t=Math.min(Math.max(0,er.size-X.maxEntries),er.size);for(let r=0;r<t;r++)er.delete(e[r].key)}function ef(e,t,r){let n=r.dateUpdated||"",i=new Date(Date.now()+X.staleTTL),o=X.disableCache?void 0:er.get(t);if(o&&n&&o.version===n){o.staleAt=i,el();return}X.disableCache||(er.set(t,{data:r,version:n,staleAt:i,sse:eo.has(e)}),eh()),el();let a=ee.get(e);a&&a.forEach(e=>eg(e,r))}async function eg(e,t){await e.setPayload(t||e.getPayload())}async function em(e){let{apiHost:t,apiRequestHeaders:r}=e.getApiHosts(),n=e.getClientKey(),i="isRemoteEval"in e&&e.isRemoteEval(),o=eu(e),a=ed(e),s=en.get(a);return s||(s=(i?Q.fetchRemoteEvalCall({host:t,clientKey:n,payload:{attributes:e.getAttributes(),forcedVariations:e.getForcedVariations(),forcedFeatures:Array.from(e.getForcedFeatures().entries()),url:e.getUrl()},headers:r}):Q.fetchFeaturesCall({host:t,clientKey:n,headers:r})).then(e=>{if(!e.ok)throw Error("HTTP error: ".concat(e.status));return"enabled"===e.headers.get("x-sse-support")&&eo.add(o),e.json()}).then(t=>(ef(o,a,t),ey(e),en.delete(a),{data:t,success:!0,source:"network"})).catch(e=>(en.delete(a),{data:null,source:"error",success:!1,error:e})),en.set(a,s)),s}function ey(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=eu(e),n=ed(e),{streamingHost:i,streamingHostRequestHeaders:o}=e.getApiHosts(),a=e.getClientKey();if(t&&eo.add(r),X.backgroundSync&&eo.has(r)&&U.EventSource){if(ei.has(r))return;let e={src:null,host:i,clientKey:a,headers:o,cb:t=>{try{if("features-updated"===t.type){let e=ee.get(r);e&&e.forEach(e=>{em(e)})}else if("features"===t.type){let e=JSON.parse(t.data);ef(r,n,e)}e.errors=0}catch(t){ev(e)}},errors:0,state:"active"};ei.set(r,e),eb(e)}}function ev(e){if("idle"!==e.state&&(e.errors++,e.errors>3||e.src&&2===e.src.readyState)){let t=Math.pow(3,e.errors-3)*(1e3+1e3*Math.random());e_(e),setTimeout(()=>{["idle","active"].includes(e.state)||eb(e)},Math.min(t,3e5))}}function e_(e){e.src&&(e.src.onopen=null,e.src.onerror=null,e.src.close(),e.src=null,"active"===e.state&&(e.state="disabled"))}function eb(e){e.src=Q.eventSourceCall({host:e.host,clientKey:e.clientKey,headers:e.headers}),e.state="active",e.src.addEventListener("features",e.cb),e.src.addEventListener("features-updated",e.cb),e.src.onerror=()=>ev(e),e.src.onopen=()=>{e.errors=0}}function ew(e,t){e_(e),ei.delete(t)}
6function eS(){eo.clear(),ei.forEach(ew),ee.clear(),Q.stopIdleListener()}function ek(e,t){if(t.streaming){if(!e.getClientKey())throw Error("Must specify clientKey to enable streaming");t.payload&&ey(e,!0);let r=eu(e),n=ee.get(r)||new Set;n.add(e),ee.set(r,n)}}let eC={};function eE(e,t,r){for(let[n,i]of(r=r||{},Object.entries(t)))switch(n){case"$or":if(!eO(e,i,r))return!1;break;case"$nor":if(eO(e,i,r))return!1;break;case"$and":if(!function(e,t,r){for(let n=0;n<t.length;n++)if(!eE(e,t[n],r))return!1;return!0}(e,i,r))return!1;break;case"$not":if(eE(e,i,r))return!1;break;default:if(!eI(i,function(e,t){let r=t.split("."),n=e;for(let e=0;e<r.length;e++)if(!n||"object"!=typeof n||!(r[e]in n))return null;else n=n[r[e]];return n}(e,n),r))return!1}return!0}function eA(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="".concat(e).concat(t?"/i":"");return eC[r]||(eC[r]=new RegExp(e.replace(/([^\\])\//g,"$1\\/"),t?"i":void 0)),eC[r]}function eI(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("string"==typeof e)return n?String(t).toLowerCase()===e.toLowerCase():t+""===e;if("number"==typeof e)return+t===e;if("boolean"==typeof e)return null!==t&&!!t===e;if(null===e)return null===t;if(Array.isArray(e)||!ex(e))return JSON.stringify(t)===JSON.stringify(e);for(let n in e)if(!function(e,t,r,n){switch(e){case"$veq":return H(t)===H(r);case"$vne":return H(t)!==H(r);case"$vgt":return H(t)>H(r);case"$vgte":return H(t)>=H(r);case"$vlt":return H(t)<H(r);case"$vlte":return H(t)<=H(r);case"$eq":return t===r;case"$ne":return t!==r;case"$lt":return t<r;
6case"$lte":return t<=r;case"$gt":return t>r;case"$gte":return t>=r;case"$exists":return r?null!=t:null==t;case"$in":if(!Array.isArray(r))return!1;return eT(t,r);case"$ini":if(!Array.isArray(r))return!1;return eT(t,r,!0);case"$inGroup":return eT(t,n[r]||[]);case"$notInGroup":return!eT(t,n[r]||[]);case"$nin":if(!Array.isArray(r))return!1;return!eT(t,r);case"$nini":if(!Array.isArray(r))return!1;return!eT(t,r,!0);case"$not":return!eI(r,t,n);case"$size":if(!Array.isArray(t))return!1;return eI(r,t.length,n);case"$elemMatch":if(!Array.isArray(t))return!1;let i=ex(r)?e=>eI(r,e,n):e=>eE(e,r,n);for(let e=0;e<t.length;e++)if(t[e]&&i(t[e]))return!0;return!1;case"$all":if(!Array.isArray(r))return!1;return eP(t,r,n);case"$alli":if(!Array.isArray(r))return!1;return eP(t,r,n,!0);case"$regex":try{return eA(r).test(t)}catch(e){return!1}case"$regexi":try{return eA(r,!0).test(t)}catch(e){return!1}case"$type":return function(e){if(null===e)return"null";if(Array.isArray(e))return"array";let t=typeof e;return["string","number","boolean","object","undefined"].includes(t)?t:"unknown"}(t)===r;default:return console.error("Unknown operator: "+e),!1}}(n,t,e[n],r))return!1;return!0}function ex(e){let t=Object.keys(e);return t.length>0&&t.filter(e=>"$"===e[0]).length===t.length}function eT(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r){let r=e=>"string"==typeof e?e.toLowerCase():e;return Array.isArray(e)?e.some(e=>t.some(t=>r(e)===r(t))):t.some(t=>r(e)===r(t))}return Array.isArray(e)?e.some(e=>t.includes(e)):t.includes(e)}function eP(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Array.isArray(e))return!1;for(let i=0;i<t.length;i++){let o=!1;for(let a=0;a<e.length;a++)if(eI(t[i],e[a],r,n)){o=!0;break}if(!o)return!1}return!0}function eO(e,t,r){if(!t.length)return!0;for(let n=0;n<t.length;n++)if(eE(e,t[n],r))return!0;return!1}function eR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eR(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eR(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}async function eD(e){try{await e()}catch(e){}}function eL(e,t,r){if(e.user.trackedExperiments){let n=eZ(t,r);if(e.user.trackedExperiments.has(n))return[];e.user.trackedExperiments.add(n)}e.user.enableDevMode&&e.user.devLogs&&e.user.devLogs.push({experiment:t,result:r,timestamp:Date.now().toString(),logType:"experiment"});let n=[];if(e.global.trackingCallback){let i=e.global.trackingCallback;n.push(eD(()=>i(t,r,eV(e.user))))}if(e.user.trackingCallback){let i=e.user.trackingCallback;n.push(eD(()=>i(t,r,eV(e.user))))}if(e.global.eventLogger){let i=e.global.eventLogger;n.push(eD(()=>i("Experiment Viewed",{experimentId:t.key,variationId:r.key,hashAttribute:r.hashAttribute,hashValue:r.hashValue},eV(e.user))))}return n}function eU(e,t){if(t.stack.evaluatedFeatures.has(e))return ej(t,e,null,"cyclicPrerequisite");t.stack.evaluatedFeatures.add(e),t.stack.id=e;let r=function(e){let t=new Map;return e.global.forcedFeatureValues&&e.global.forcedFeatureValues.forEach((e,r)=>t.set(r,e)),e.user.forcedFeatureValues&&e.user.forcedFeatureValues.forEach((e,r)=>t.set(r,e)),t}(t);if(r.has(e))return ej(t,e,r.get(e),"override");if(!t.global.features||!t.global.features[e])return ej(t,e,null,"unknownFeature");let n=t.global.features[e];if(n.rules){let r=new Set(t.stack.evaluatedFeatures);e:for(let o of n.rules){var i;if(o.parentConditions)for(let n of o.parentConditions){t.stack.evaluatedFeatures=new Set(r);let i=eU(n.id,t);if("cyclicPrerequisite"===i.source)return ej(t,e,null,"cyclicPrerequisite");if(!eE({value:i.value},n.condition||{})){if(n.gate)return ej(t,e,null,"prerequisite");continue e}}if(o.filters&&eB(o.filters,t))continue;if("force"in o){if(o.condition&&!eF(o.condition,t)||!function(e,t,r,n,i,o,a){if(!i&&void 0===o)return!0;
6if(!i&&0===o)return!1;let{hashValue:s}=eG(e,r,n);if(!s)return!1;let l=j(t,s,a||1);return null!==l&&(i?V(l,i):void 0===o||l<=o)}(t,o.seed||e,o.hashAttribute,t.user.saveStickyBucketAssignmentDoc&&!o.disableStickyBucketing?o.fallbackAttribute:void 0,o.range,o.coverage,o.hashVersion))continue;return o.tracks&&o.tracks.forEach(e=>{!eL(t,e.experiment,e.result).length&&t.global.saveDeferredTrack&&t.global.saveDeferredTrack({experiment:e.experiment,result:e.result,user:eV(t.user)})}),ej(t,e,o.force,"force",o.id)}let n=null!=(i=o.contextualVariations)?i:o.variations;if(!n)continue;let a={variations:n,key:o.key||e};"coverage"in o&&(a.coverage=o.coverage),o.weights&&(a.weights=o.weights),o.hashAttribute&&(a.hashAttribute=o.hashAttribute),o.fallbackAttribute&&(a.fallbackAttribute=o.fallbackAttribute),o.disableStickyBucketing&&(a.disableStickyBucketing=o.disableStickyBucketing),void 0!==o.bucketVersion&&(a.bucketVersion=o.bucketVersion),void 0!==o.minBucketVersion&&(a.minBucketVersion=o.minBucketVersion),o.namespace&&(a.namespace=o.namespace),o.meta&&(a.meta=o.meta),o.ranges&&(a.ranges=o.ranges),o.name&&(a.name=o.name),o.phase&&(a.phase=o.phase),o.seed&&(a.seed=o.seed),o.hashVersion&&(a.hashVersion=o.hashVersion),o.filters&&(a.filters=o.filters),o.condition&&(a.condition=o.condition),o.contextualBanditRef&&function(e,t,r,n){var i,o;let a=null==(i=n.global.contextualBandits)?void 0:i[t];if(!a)return;let s=null;if(a.contexts&&a.contexts.length)try{s=function(e,t){for(let r of e.contexts||[])if(eF(r.condition||{},t))return{leafId:r.leafId,weights:r.weights};return null}(a,n)}catch(e){}if(s){e.weights=s.weights,e.contextualBandit={leafId:s.leafId,variationWeights:s.weights,banditVersion:a.banditVersion};return}e.contextualBandit={leafId:-1,variationWeights:null!=(o=e.weights)?o:$(e.variations.length),banditVersion:a.banditVersion}}(a,o.contextualBanditRef,0,t);let{result:s}=eM(a,e,t);if(a.contextualBandit&&!(s.hashUsed&&s.inExperiment)&&delete a.contextualBandit,t.global.onExperimentEval&&t.global.onExperimentEval(a,s),s.inExperiment&&!s.passthrough)return ej(t,e,s.value,"experiment",o.id,a,s)}}return ej(t,e,void 0===n.defaultValue?null:n.defaultValue,"defaultValue")}function eM(e,t,r){var n;let i=e.key,o=e.variations.length;if(o<2||!1===r.global.enabled||!1===r.user.enabled||((e=function(e,t){let r=e.key,n=t.global.overrides;return n&&n[r]&&"string"==typeof(e=Object.assign({},e,n[r])).url&&(e.url=F(e.url)),e}(e,r)).contextualBandit&&e.weights&&(e.contextualBandit=eN(eN({},e.contextualBandit),{},{variationWeights:e.weights})),e.urlPatterns&&!B(r.user.url||"",e.urlPatterns)))return{result:ez(r,e,-1,!1,t)};let a=function(e,t,r){if(!t)return null;let n=t.split("?")[1];if(!n)return null;let i=n.replace(/#.*/,"").split("&").map(e=>e.split("=",2)).filter(t=>{let[r]=t;return r===e}).map(e=>{let[,t]=e;return parseInt(t)});return i.length>0&&i[0]>=0&&i[0]<r?i[0]:null}(i,r.user.url||"",o);if(null!==a)return{result:ez(r,e,a,!1,t)};let s=(n=r).global.forcedVariations&&n.user.forcedVariations?eN(eN({},n.global.forcedVariations),n.user.forcedVariations):n.global.forcedVariations?n.global.forcedVariations:n.user.forcedVariations?n.user.forcedVariations:{};if(i in s)return{result:ez(r,e,s[i],!1,t)};if("draft"===e.status||!1===e.active)return{result:ez(r,e,-1,!1,t)};let{hashAttribute:l,hashValue:c}=eG(r,e.hashAttribute,r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing?e.fallbackAttribute:void 0);if(!c)return{result:ez(r,e,-1,!1,t)};let u=-1,d=!1,p=!1;if(r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){let{variation:t,versionIsBlocked:n}=function(e){let{ctx:t,expKey:r,expBucketVersion:n,expHashAttribute:i,expFallbackAttribute:o,expMinBucketVersion:a,expMeta:s}=e;a=a||0,i=i||"id",s=s||[];let l=eq(r,n=n||0),c=function(e,t,r){if(!e.user.stickyBucketAssignmentDocs)return{};let{hashAttribute:n,hashValue:i}=eG(e,t),o=eH(n,q(i)),{hashAttribute:a,hashValue:s}=eG(e,r),l=s?eH(a,q(s)):null,c={};return l&&e.user.stickyBucketAssignmentDocs[l]&&Object.assign(c,e.user.stickyBucketAssignmentDocs[l].assignments||{}),e.user.stickyBucketAssignmentDocs[o]&&Object.assign(c,e.user.stickyBucketAssignmentDocs[o].assignments||{}),c}(t,i,o);if(a>0){for(let e=0;e<a;e++)if(void 0!==c[eq(r,e)])return{variation:-1,versionIsBlocked:!0}}let u=c[l];if(void 0===u)return{variation:-1};let d=s.findIndex(e=>e.key===u);return d<0?{variation:-1}:{variation:d}}({ctx:r,expKey:e.key,expBucketVersion:e.bucketVersion,expHashAttribute:e.hashAttribute,expFallbackAttribute:e.fallbackAttribute,expMinBucketVersion:e.minBucketVersion,expMeta:e.meta});d=t>=0,u=t,p=!!n}if(!d){if(e.filters){if(eB(e.filters,r))return{result:ez(r,e,-1,!1,t)}}else if(e.namespace&&!function(e,t){let r=j("__"+t[0],e,1);return null!==r&&r>=t[1]&&r<t[2]}(c,e.namespace))return{result:ez(r,e,-1,!1,t)};if(e.include&&!function(e){try{return e()}catch(e){return console.error(e),!1}}(e.include)||e.condition&&!eF(e.condition,r))return{result:ez(r,e,-1,!1,t)};if(e.parentConditions){let n=new Set(r.stack.evaluatedFeatures);for(let i of e.parentConditions){r.stack.evaluatedFeatures=new Set(n);let o=eU(i.id,r);if("cyclicPrerequisite"===o.source||!eE({value:o.value},i.condition||{}))return{result:ez(r,e,-1,!1,t)}}}if(e.groups&&!function(e,t){let r=t.global.groups||{};for(let t=0;t<e.length;t++)if(r[e[t]])return!0;return!1}(e.groups,r))return{result:ez(r,e,-1,!1,t)}}if(e.url&&!function(e,t){let r=t.user.url;if(!r)return!1;let n=r.replace(/^https?:\/\//,"").replace(/^[^/]*\//,"/");return!!(e.test(r)||e.test(n))}(e.url,r))return{result:ez(r,e,-1,!1,t)};let h=j(e.seed||i,c,e.hashVersion||1);if(null===h)return{result:ez(r,e,-1,!1,t)};if(d||(u=function(e,t){for(let r=0;r<t.length;r++)if(V(e,t[r]))return r;return -1}(h,e.ranges||function(e,t,r){(t=void 0===t?1:t)<0?t=0:t>1&&(t=1);let n=$(e);(r=r||n).length!==e&&(r=n);let i=r.reduce((e,t)=>
6t+e,0);(i<.99||i>1.01)&&(r=n);let o=0;return r.map(e=>{let r=o;return o+=e,[r,r+t*e]})}(o,void 0===e.coverage?1:e.coverage,e.weights))),p)return{result:ez(r,e,-1,!1,t,void 0,!0)};if(u<0)return{result:ez(r,e,-1,!1,t)};if("force"in e)return{result:ez(r,e,void 0===e.force?-1:e.force,!1,t)};if(r.global.qaMode||r.user.qaMode||"stopped"===e.status)return{result:ez(r,e,-1,!1,t)};let f=ez(r,e,u,!0,t,h,d);if(r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){let{changed:t,key:n,doc:i}=function(e,t,r,n){let i=eH(t,r),o=e.user.stickyBucketAssignmentDocs&&e.user.stickyBucketAssignmentDocs[i]&&e.user.stickyBucketAssignmentDocs[i].assignments||{},a=eN(eN({},o),n),s=JSON.stringify(o)!==JSON.stringify(a);return{key:i,doc:{attributeName:t,attributeValue:r,assignments:a},changed:s}}(r,l,q(c),{[eq(e.key,e.bucketVersion)]:f.key});t&&(r.user.stickyBucketAssignmentDocs=r.user.stickyBucketAssignmentDocs||{},r.user.stickyBucketAssignmentDocs[n]=i,r.user.saveStickyBucketAssignmentDoc(i))}let g=eL(r,e,f);0===g.length&&r.global.saveDeferredTrack&&r.global.saveDeferredTrack({experiment:e,result:f,user:eV(r.user)});let m=g.length?1===g.length?g[0]:Promise.all(g).then(()=>{}):void 0;return"changeId"in e&&e.changeId&&r.global.recordChangeId&&r.global.recordChangeId(e.changeId),{result:f,trackingCall:m}}function ej(e,t,r,n,i,o,a){let s={value:r,on:!!r,off:!r,source:n,ruleId:i||""};return o&&(s.experiment=o),a&&(s.experimentResult=a),"override"!==n&&function(e,t,r){if(e.user.trackedFeatureUsage){var n;let i=JSON.stringify(r.value);if(e.user.trackedFeatureUsage[t]===i)return;e.user.trackedFeatureUsage[t]=i,e.user.enableDevMode&&e.user.devLogs&&e.user.devLogs.push({featureKey:t,result:r,timestamp:Date.now().toString(),logType:"feature"}),null!=(n=e.user.featureUsageSubs)&&n.size&&e.user.featureUsageSubs.forEach(e=>{try{e(t,r)}catch(e){console.error(e)}})}if(e.global.onFeatureUsage){let n=e.global.onFeatureUsage;eD(()=>n(t,r,eV(e.user)))}if(e.user.onFeatureUsage){let n=e.user.onFeatureUsage;eD(()=>n(t,r))}if(e.global.eventLogger){let n=e.global.eventLogger;eD(()=>n("Feature Evaluated",{feature:t,source:r.source,value:r.value,ruleId:"defaultValue"===r.source?"$default":r.ruleId||"",variationId:r.experimentResult?r.experimentResult.key:""},eV(e.user)))}}(e,t,s),s}function e$(e){return eN(eN({},e.attributes),e.attributeOverrides)}function eV(e){return{attributes:e$(e),url:e.url}}function eF(e,t){return eE(e$(t.user),e,t.global.savedGroups||{})}function eB(e,t){return e.some(e=>{let{hashValue:r}=eG(t,e.attribute);if(!r)return!0;let n=j(e.seed,r,e.hashVersion||2);return null===n||!e.ranges.some(e=>V(n,e))})}function ez(e,t,r,n,i,o,a){let s=!0;(r<0||r>=t.variations.length)&&(r=0,s=!1);let{hashAttribute:l,hashValue:c}=eG(e,t.hashAttribute,e.user.saveStickyBucketAssignmentDoc&&!t.disableStickyBucketing?t.fallbackAttribute:void 0),u=t.meta?t.meta[r]:{},d={key:u.key||""+r,featureId:i,inExperiment:s,hashUsed:n,variationId:r,value:t.variations[r],hashAttribute:l,hashValue:c,stickyBucketUsed:!!a};u.name&&(d.name=u.name),void 0!==o&&(d.bucket=o),u.passthrough&&(d.passthrough=u.passthrough);let p=t.contextualBandit;return p&&n&&s&&(d.leafId=p.leafId,d.variationWeights=p.variationWeights,void 0!==p.banditVersion&&(d.banditVersion=p.banditVersion)),d}function eG(e,t,r){let n=t||"id",i="",o=e$(e.user);return o[n]&&(i=o[n]),!i&&r&&(o[r]&&(i=o[r]),i&&(n=r)),{hashAttribute:n,hashValue:i}}function eq(e,t){return t=t||0,"".concat(e,"__").concat(t)}function eH(e,t){return"".concat(e,"||").concat(t)}async function eK(e,t,r){let n=eJ(e,r);return t.getAllAssignments(n)}function eJ(e,t){let r={};return(function(e,t){let r=new Set,n=t&&t.features?t.features:e.global.features||{},i=t&&t.experiments?t.experiments:e.global.experiments||[];return Object.keys(n).forEach(e=>{let t=n[e];if(t.rules)for(let e of t.rules)(e.variations||e.contextualVariations)&&(r.add(e.hashAttribute||"id"),e.fallbackAttribute&&r.add(e.fallbackAttribute))}),i.map(e=>{r.add(e.hashAttribute||"id"),e.fallbackAttribute&&r.add(e.fallbackAttribute)}),Array.from(r)})(e,t).forEach(t=>{let{hashValue:n}=eG(e,t);r[t]=q(n)}),r}async function eW(e,t,r){if((e=eN({},e)).encryptedFeatures){try{e.features=JSON.parse(await G(e.encryptedFeatures,t,r))}catch(e){console.error(e)}delete e.encryptedFeatures}if(e.encryptedExperiments){try{e.experiments=JSON.parse(await G(e.encryptedExperiments,t,r))}catch(e){console.error(e)}delete e.encryptedExperiments}if(e.encryptedSavedGroups){try{e.savedGroups=JSON.parse(await G(e.encryptedSavedGroups,t,r))}catch(e){console.error(e)}delete e.encryptedSavedGroups}if(e.encryptedContextualBandits){try{e.contextualBandits=JSON.parse(await G(e.encryptedContextualBandits,t,r))}catch(e){console.error(e)}delete e.encryptedContextualBandits}return e}function eZ(e,t){return t.hashAttribute+t.hashValue+e.key+t.variationId}let eY=["data"];function eX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eQ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
6t%2?eX(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eX(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let e0="undefined"!=typeof window&&"undefined"!=typeof document,e1=function(){let e;try{e="1.7.0"}catch(t){e=""}return e}();class e2{constructor(e){if(e=e||{},this.version=e1,this._options=this.context=e,this._renderer=e.renderer||null,this._trackedExperiments=new Set,this._completedChangeIds=new Set,this._trackedFeatures={},this.debug=!!e.debug,this._subscriptions=new Set,this._featureUsageSubs=new Set,this._customEventSubs=new Set,this.ready=!1,this._assigned=new Map,this._activeAutoExperiments=new Map,this._triggeredExpKeys=new Set,this._initialized=!1,this._redirectedUrl="",this._deferredTrackingCalls=new Map,this._autoExperimentsAllowed=!e.disableExperimentsOnLoad,this._destroyCallbacks=[],this.logs=[],this.log=this.log.bind(this),this._saveDeferredTrack=this._saveDeferredTrack.bind(this),this._onExperimentEval=this._onExperimentEval.bind(this),this._fireSubscriptions=this._fireSubscriptions.bind(this),this._recordChangedId=this._recordChangedId.bind(this),e.remoteEval){if(e.decryptionKey)throw Error("Encryption is not available for remoteEval");if(!e.clientKey)throw Error("Missing clientKey");let t=!1;try{t=!!new URL(e.apiHost||"").hostname.match(/growthbook\.io$/i)}catch(e){}if(t)throw Error("Cannot use remoteEval on GrowthBook Cloud")}else if(e.cacheKeyAttributes)throw Error("cacheKeyAttributes are only used for remoteEval");if(e.stickyBucketService){let t=e.stickyBucketService;this._saveStickyBucketAssignmentDoc=e=>t.saveAssignments(e)}if(e.plugins)for(let t of e.plugins)t(this);if(e.features&&(this.ready=!0),e0&&e.enableDevMode&&(window._growthbook=this,document.dispatchEvent(new Event("gbloaded"))),e.experiments&&(this.ready=!0,this._updateAllAutoExperiments()),this._options.stickyBucketService&&this._options.stickyBucketAssignmentDocs)for(let e in this._options.stickyBucketAssignmentDocs){let t=this._options.stickyBucketAssignmentDocs[e];t&&this._options.stickyBucketService.saveAssignments(t).catch(()=>{})}this.ready&&this.refreshStickyBuckets(this.getPayload())}async setPayload(e){this._payload=e;let t=await eW(e,this._options.decryptionKey);this._decryptedPayload=t,await this.refreshStickyBuckets(t),t.features&&(this._options.features=t.features),t.savedGroups&&(this._options.savedGroups=t.savedGroups),t.contextualBandits&&(this._options.contextualBandits=t.contextualBandits),t.experiments&&(this._options.experiments=t.experiments,this._updateAllAutoExperiments()),this.ready=!0,this._render()}initSync(e){this._initialized=!0;let t=e.payload;if(t.encryptedExperiments||t.encryptedFeatures)throw Error("initSync does not support encrypted payloads");return this._options.stickyBucketService&&!this._options.stickyBucketAssignmentDocs&&(this._options.stickyBucketAssignmentDocs=this.generateStickyBucketAssignmentDocsSync(this._options.stickyBucketService,t)),this._payload=t,this._decryptedPayload=t,t.features&&(this._options.features=t.features),t.savedGroups&&(this._options.savedGroups=t.savedGroups),t.contextualBandits&&(this._options.contextualBandits=t.contextualBandits),t.experiments&&(this._options.experiments=t.experiments,this._updateAllAutoExperiments()),this.ready=!0,ek(this,e),this}async init(e){if(this._initialized=!0,(e=e||{}).cacheSettings&&(Object.assign(X,e.cacheSettings),X.backgroundSync||eS()),e.payload)return await this.setPayload(e.payload),ek(this,e),{success:!0,source:"init"};{let t=await this._refresh(eQ(eQ({},e),{},{allowStale:!0})),{data:r}=t,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,eY);return ek(this,e),await this.setPayload(r||{}),n}}async loadFeatures(e){var t;e=e||{},await this.init({skipCache:e.skipCache,timeout:e.timeout,streaming:(null==(t=this._options.backgroundSync)||t)&&(e.autoRefresh||this._options.subscribeToChanges)})}async refreshFeatures(e){let t=await this._refresh(eQ(eQ({},e||{}),{},{allowStale:!1}));t.data&&await this.setPayload(t.data)}
6getApiInfo(){return[this.getApiHosts().apiHost,this.getClientKey()]}getApiHosts(){var e=this._options;let t=e.apiHost||"https://cdn.growthbook.io";return{apiHost:t.replace(/\/*$/,""),streamingHost:(e.streamingHost||t).replace(/\/*$/,""),apiRequestHeaders:e.apiHostRequestHeaders,streamingHostRequestHeaders:e.streamingHostRequestHeaders}}getClientKey(){return this._options.clientKey||""}getPayload(){return this._payload||{features:this.getFeatures(),experiments:this.getExperiments()}}getDecryptedPayload(){return this._decryptedPayload||this.getPayload()}isRemoteEval(){return this._options.remoteEval||!1}getCacheKeyAttributes(){return this._options.cacheKeyAttributes}async _refresh(e){var t;let{timeout:r,skipCache:n,allowStale:i,streaming:o}=e;if(!this._options.clientKey)throw Error("Missing clientKey");return ea({instance:this,timeout:r,skipCache:n||this._options.disableCache,allowStale:i,backgroundSync:null==(t=null!=o?o:this._options.backgroundSync)||t})}_render(){if(this._renderer)try{this._renderer()}catch(e){console.error("Failed to render",e)}}setFeatures(e){this._options.features=e,this.ready=!0,this._render()}async setEncryptedFeatures(e,t,r){let n=await G(e,t||this._options.decryptionKey,r);this.setFeatures(JSON.parse(n))}setExperiments(e){this._options.experiments=e,this.ready=!0,this._updateAllAutoExperiments()}async setEncryptedExperiments(e,t,r){let n=await G(e,t||this._options.decryptionKey,r);this.setExperiments(JSON.parse(n))}async setAttributes(e){if(this._options.attributes=e,this._options.stickyBucketService&&await this.refreshStickyBuckets(),this._options.remoteEval)return void await this._refreshForRemoteEval();this._render(),this._updateAllAutoExperiments()}async updateAttributes(e){return this.setAttributes(eQ(eQ({},this._options.attributes),e))}async setAttributeOverrides(e){if(this._options.attributeOverrides=e,this._options.stickyBucketService&&await this.refreshStickyBuckets(),this._options.remoteEval)return void await this._refreshForRemoteEval();this._render(),this._updateAllAutoExperiments()}async setForcedVariations(e){if(this._options.forcedVariations=e||{},this._options.remoteEval)return void await this._refreshForRemoteEval();this._render(),this._updateAllAutoExperiments()}setForcedFeatures(e){this._options.forcedFeatureValues=e,this._render()}async setURL(e){if(e!==this._options.url){if(this._options.url=e,this._redirectedUrl="",this._options.remoteEval){await this._refreshForRemoteEval(),this._updateAllAutoExperiments(!0);return}this._updateAllAutoExperiments(!0)}}getAttributes(){return eQ(eQ({},this._options.attributes),this._options.attributeOverrides)}getForcedVariations(){return this._options.forcedVariations||{}}getForcedFeatures(){return this._options.forcedFeatureValues||new Map}getStickyBucketAssignmentDocs(){return this._options.stickyBucketAssignmentDocs||{}}getUrl(){return this._options.url||""}getFeatures(){return this._options.features||{}}getExperiments(){return this._options.experiments||[]}getCompletedChangeIds(){return Array.from(this._completedChangeIds)}subscribe(e){return this._subscriptions.add(e),()=>{this._subscriptions.delete(e)}}_subscribeFeatureUsage(e){return this._featureUsageSubs.add(e),()=>this._featureUsageSubs.delete(e)}_subscribeCustomEvents(e){return this._customEventSubs.add(e),()=>this._customEventSubs.delete(e)}async _refreshForRemoteEval(){if(!this._options.remoteEval||!this._initialized)return;let e=await this._refresh({allowStale:!1});e.data&&await this.setPayload(e.data)}getAllResults(){return new Map(this._assigned)}onDestroy(e){this._destroyCallbacks.push(e)}isDestroyed(){return!!this._destroyed}destroy(e){var t;e=e||{},this._destroyed=!0,this._destroyCallbacks.forEach(e=>{try{e()}catch(e){console.error(e)}}),this._subscriptions.clear(),this._featureUsageSubs.clear(),this._customEventSubs.clear(),this._assigned.clear(),this._trackedExperiments.clear(),this._completedChangeIds.clear(),this._deferredTrackingCalls.clear(),this._trackedFeatures={},this._destroyCallbacks=[],this._payload=void 0,this._saveStickyBucketAssignmentDoc=void 0,t=this,ee.forEach(e
6=>e.delete(t)),e.destroyAllStreams&&eS(),this.logs=[],e0&&window._growthbook===this&&delete window._growthbook,this._activeAutoExperiments.forEach(e=>{e.undo()}),this._activeAutoExperiments.clear(),this._triggeredExpKeys.clear()}setRenderer(e){this._renderer=e}forceVariation(e,t){if(this._options.forcedVariations=this._options.forcedVariations||{},this._options.forcedVariations[e]=t,this._options.remoteEval)return void this._refreshForRemoteEval();this._updateAllAutoExperiments(),this._render()}run(e){let{result:t}=eM(e,null,this._getEvalContext());return this._onExperimentEval(e,t),t}triggerExperiment(e){return(this._triggeredExpKeys.add(e),this._options.experiments)?this._options.experiments.filter(t=>t.key===e).map(e=>this._runAutoExperiment(e)).filter(e=>null!==e):null}triggerAutoExperiments(){this._autoExperimentsAllowed=!0,this._updateAllAutoExperiments(!0)}_getEvalContext(){return{user:this._getUserContext(),global:this._getGlobalContext(),stack:{evaluatedFeatures:new Set}}}_getUserContext(){return{attributes:this._options.user?eQ(eQ({},this._options.user),this._options.attributes):this._options.attributes,enableDevMode:this._options.enableDevMode,blockedChangeIds:this._options.blockedChangeIds,stickyBucketAssignmentDocs:this._options.stickyBucketAssignmentDocs,url:this._getContextUrl(),forcedVariations:this._options.forcedVariations,forcedFeatureValues:this._options.forcedFeatureValues,attributeOverrides:this._options.attributeOverrides,saveStickyBucketAssignmentDoc:this._saveStickyBucketAssignmentDoc,trackingCallback:this._options.trackingCallback,onFeatureUsage:this._options.onFeatureUsage,devLogs:this.logs,featureUsageSubs:this._featureUsageSubs,trackedExperiments:this._trackedExperiments,trackedFeatureUsage:this._trackedFeatures}}_getGlobalContext(){return{features:this._options.features,experiments:this._options.experiments,log:this.log,enabled:this._options.enabled,qaMode:this._options.qaMode,savedGroups:this._options.savedGroups,contextualBandits:this._options.contextualBandits,groups:this._options.groups,overrides:this._options.overrides,onExperimentEval:this._onExperimentEval,recordChangeId:this._recordChangedId,saveDeferredTrack:this._saveDeferredTrack,eventLogger:this._options.eventLogger}}_runAutoExperiment(e,t){let r,n,i=this._activeAutoExperiments.get(e);if(e.manual&&!this._triggeredExpKeys.has(e.key)&&!i)return null;this._isAutoExperimentBlockedByContext(e)?r=ez(this._getEvalContext(),e,-1,!1,""):({result:r,trackingCall:n}=eM(e,null,this._getEvalContext()),this._onExperimentEval(e,r));let o=JSON.stringify(r.value);if(!t&&r.inExperiment&&i&&i.valueHash===o)return r;if(i&&this._undoActiveAutoExperiment(e),r.inExperiment){let t=J(e);if("redirect"===t&&r.value.urlRedirect&&e.urlPatterns){let t=e.persistQueryString?function(e,t){let r,n;try{r=new URL(e),n=new URL(t)}catch(e){return console.error("Unable to merge query strings: ".concat(e)),t}return r.searchParams.forEach((e,t)=>{n.searchParams.has(t)||n.searchParams.set(t,e)}),n.toString()}(this._getContextUrl(),r.value.urlRedirect):r.value.urlRedirect;if(B(t,e.urlPatterns))return this.log("Skipping redirect because original URL matches redirect URL",{id:e.key}),r;this._redirectedUrl=t;let{navigate:i,delay:o}=this._getNavigateFunction();if(i)if(e0){var a;Promise.all([...n?[W(n,null!=(a=this._options.maxNavigateDelay)?a:1e3)]:[],new Promise(e=>{var t;return window.setTimeout(e,null!=(t=this._options.navigateDelay)?t:o)})]).then(()=>{try{i(t)}catch(e){console.error(e)}})}else try{i(t)}catch(e){console.error(e)}}else if("visual"===t){let t=this._options.applyDomChangesCallback?this._options.applyDomChangesCallback(r.value):this._applyDOMChanges(r.value);t&&this._activeAutoExperiments.set(e,{undo:t,valueHash:o})}}return r}_undoActiveAutoExperiment(e){let t=this._activeAutoExperiments.get(e);t&&(t.undo(),this._activeAutoExperiments.delete(e))}_updateAllAutoExperiments(e){if(!this._autoExperimentsAllowed)return;let t=this._options.experiments||[],r=new Set(t);for(let n of(this._activeAutoExperiments.forEach((e,t)=>{r.has(t)||(e.undo(),this._activeAutoExperiments.delete(t))}),t)){let t=this._runAutoExperiment(n,e);if(t&&t.inExperiment&&"redirect"===J(n))break}}_onExperimentEval(e,t){let r=this._assigned.get(e.key);this._assigned.set(e.key,{experiment:e,result:t}),this._subscriptions.size>0&&this._fireSubscriptions(e,t,r)}_fireSubscriptions(e,t,r){r&&r.result.inExperiment===t.inExperiment&&r.result.variationId===t.variationId||this._subscriptions.forEach(r=>{try{r(e,t)}catch(e){console.error(e)}})}_recordChangedId(e){this._completedChangeIds.add(e)}isOn(e){return this.evalFeature(e).on}isOff(e){return this.evalFeature(e).off}getFeatureValue(e,t){let r=this.evalFeature(e).value;return null===r?t:r}feature(e){return this.evalFeature(e)}evalFeature(e){return eU(e,this._getEvalContext())}log(e,t){this.debug&&(this._options.log?this._options.log(e,t):console.log(e,t))}getDeferredTrackingCalls(){return Array.from(this._deferredTrackingCalls.values())}setDeferredTrackingCalls(e){this._deferredTrackingCalls=new Map(e.filter(e=>e&&e.experiment&&e.result).map(e=>[eZ(e.experiment,e.result),e]))}async fireDeferredTrackingCalls(){if(!this._options.trackingCallback)return;let e=[];
6this._deferredTrackingCalls.forEach(t=>{t&&t.experiment&&t.result?e.push(this._options.trackingCallback(t.experiment,t.result,t.user)):console.error("Invalid deferred tracking call",{call:t})}),this._deferredTrackingCalls.clear(),await Promise.all(e)}setTrackingCallback(e){this._options.trackingCallback=e,this.fireDeferredTrackingCalls()}setFeatureUsageCallback(e){this._options.onFeatureUsage=e}setEventLogger(e){this._options.eventLogger=e}async logEvent(e,t){if(this._destroyed)return void console.error("Cannot log event to destroyed GrowthBook instance");if(this._options.enableDevMode&&this.logs.push({eventName:e,properties:t,timestamp:Date.now().toString(),logType:"event"}),this._customEventSubs.size&&this._customEventSubs.forEach(r=>{try{r(e,t||{})}catch(e){console.error(e)}}),this._options.eventLogger)try{await this._options.eventLogger(e,t||{},eV(this._getUserContext()))}catch(e){console.error(e)}else console.error("No event logger configured")}_saveDeferredTrack(e){this._deferredTrackingCalls.set(eZ(e.experiment,e.result),e)}_getContextUrl(){return this._options.url||(e0?window.location.href:"")}_isAutoExperimentBlockedByContext(e){let t=J(e);if("visual"===t){if(this._options.disableVisualExperiments||this._options.disableJsInjection&&e.variations.some(e=>e.js))return!0}else{if("redirect"!==t||this._options.disableUrlRedirectExperiments)return!0;try{let t=new URL(this._getContextUrl());for(let r of e.variations){if(!r||!r.urlRedirect)continue;let e=new URL(r.urlRedirect);if(this._options.disableCrossOriginUrlRedirectExperiments&&(e.protocol!==t.protocol||e.host!==t.host))return!0}}catch(t){return this.log("Error parsing current or redirect URL",{id:e.key,error:t}),!0}}return!!(e.changeId&&(this._options.blockedChangeIds||[]).includes(e.changeId))}getRedirectUrl(){return this._redirectedUrl}_getNavigateFunction(){return this._options.navigate?{navigate:this._options.navigate,delay:0}:e0?{navigate:e=>{window.location.replace(e)},delay:100}:{navigate:null,delay:0}}_applyDOMChanges(e){if(!e0)return;let t=[];if(e.css){let r=document.createElement("style");r.innerHTML=e.css,document.head.appendChild(r),t.push(()=>r.remove())}if(e.js){let r=document.createElement("script");r.innerHTML=e.js,this._options.jsInjectionNonce&&(r.nonce=this._options.jsInjectionNonce),document.head.appendChild(r),t.push(()=>r.remove())}return e.domMutations&&e.domMutations.forEach(e=>{t.push(L.declarative(e).revert)}),()=>{t.forEach(e=>e())}}async refreshStickyBuckets(e){if(this._options.stickyBucketService){let t=this._getEvalContext(),r=await eK(t,this._options.stickyBucketService,e);this._options.stickyBucketAssignmentDocs=r}}generateStickyBucketAssignmentDocsSync(e,t){if(!("getAllAssignmentsSync"in e))return void console.error("generating StickyBucketAssignmentDocs docs requires StickyBucketServiceSync");let r=eJ(this._getEvalContext(),t);return e.getAllAssignmentsSync(r)}inDevMode(){return!!this._options.enableDevMode}}var e3=r(14232);let e4=e3.createContext({});function e5(e){return e8().isOn(e)}function e6(e,t){return e8().getFeatureValue(e,t)}function e8(){let{growthbook:e}=e3.useContext(e4);if(!e)throw Error("Missing or invalid GrowthBookProvider");return e}let e9=({children:e,growthbook:t})=>{let[r,n]=e3.useState(0);return e3.useEffect(()=>{if(t&&t.setRenderer)return t.setRenderer(()=>{n(e=>e+1)}),()=>{t.setRenderer(()=>{})}},[t]),e3.createElement(e4.Provider,{value:{growthbook:t}},e)}},29132:(e,t,r)=>{"use strict";r.d(t,{$U:()=>n,QO:()=>o,Ti:()=>i});let n=e=>{var t;return null!=(t=null==e?void 0:e.find(e=>"image"===e.type))?t:null},i=e=>{var t;return null==(t=n(e))?void 0:t.src},o=e=>{var t,r,i,o;let{mediaGallery:a,name:s}=e,l=n(a);return l?{src:l.src,width:null!=(t=l.width)?t:1e3,height:null!=(r=l.height)?r:1e3,alt:null!=(i=l.alt)?i:s,title:null!=(o=l.title)?o:s}:null}},29471:(e,t,r)=>{"use strict";let n;r.d(t,{qj:()=>u});var i=r(74349),o=r(54984),a=r(32068);let s=1/0,l=a.iW,c=new Set;function u({expireDelay:e,maxEntries:t}){let r=[];n||(n=(0,i.yb)(()=>void c.forEach(e=>e()),l));let u=()=>{let t=(0,a.$S)()-e;for(;r.length>0&&r[r.length-1].endTime<t;)r.pop()};return c.add(u),{add:function(e,n){let i={value:e,startTime:n,endTime:s,remove:()=>{(0,o.Ai)(r,i)},close:e=>{i.endTime=e}};return t&&r.length>=t&&r.pop(),r.unshift(i),i},find:function(e=s,t={returnInactive:!1}){for(let n of r)if(n.startTime<=e){if(t.returnInactive||e<=n.endTime)return n.value;break}},closeActive:function(e){let t=r[0];t&&t.endTime===s&&t.close(e)},findAll:function(e=s,t=0){let n=(0,a.Gw)(e,t);return r.filter(t=>t.startTime<=n&&e<=t.endTime).map(e=>e.value)},getEntries:function(e){return r.filter(t=>t.startTime===e)},reset:function(){r=[]},stop:function(){c.delete(u),0===c.size&&n&&((0,i.vG)(n),n=void 0)}}}},29846:(e,t,r)=>{"use strict";r.d(t,{n:()=>a});var n=r(95993),i=r(26635),o=r(38248);let a=()=>{let{data:e}=(0,i.Ay)(e=>e.brand),{data:t}=(0,i.Ay)(e=>e.country),{data:r}=(0,i.Ay)(e=>e.siteId),a=(0,n.sT)(e,r,t),s=(0,o.getCookie)(a);return null!=s?s:""}},30621:(e,t,r)=>{"use strict";let n;function i(){return 0===a()}function o(){return 1===a()}function a(){return null!=n?n:n=function(e=window){var t;let r=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(r)?0:(null==(t=e.navigator.vendor)?void 0:t.indexOf("Apple"))===0||/safari/i.test(r)&&!/chrome|android/i.test(r)?1:2}()}r.d(t,{F2:()=>i,nr:()=>o})},32068:(e,t,r)=>{"use strict";let n;r.d(t,{$H:()=>l,$S:()=>g,FR:()=>c,Gw:()=>_,M8:()=>m,MA:()=>s,OY:()=>
6o,Oc:()=>y,TP:()=>d,Zj:()=>p,gs:()=>b,iW:()=>a,jR:()=>u,nx:()=>f,pu:()=>w,vk:()=>v,x3:()=>h});var i=r(18932);let o=1e3,a=6e4,s=36e5,l=31536e6;function c(e){return{relative:e,timeStamp:function(e){var t;let r=h()-performance.now();return r>S()?Math.round(function(e,t){return e+t}(r,e)):(t=e,Math.round(S()+t))}(e)}}function u(e){return{relative:b(e),timeStamp:e}}function d(){var e;return Math.round(h()-(e=S(),e+performance.now()))}function p(e){return(0,i.Et)(e)?(0,i.LI)(1e6*e,0):e}function h(){return new Date().getTime()}function f(){return h()}function g(){return performance.now()}function m(){return{relative:g(),timeStamp:f()}}function y(){return{relative:0,timeStamp:S()}}function v(e,t){return t-e}function _(e,t){return e+t}function b(e){return e-S()}function w(e){return e<l}function S(){var e,t;return void 0===n&&(n=null!=(t=null==(e=performance.timing)?void 0:e.navigationStart)?t:performance.timeOrigin),n}},33083:(e,t,r)=>{"use strict";r.d(t,{h:()=>o});var n=r(87151),i=r(35428);function o(e,t){return(0,n.W)((0,i.VZ)(),"fetch")(e,t)}},34289:(e,t,r)=>{"use strict";r.d(t,{Ch:()=>l,Ck:()=>m,DM:()=>c,E0:()=>h,Kh:()=>s,NZ:()=>a,RY:()=>u,Ub:()=>g,jf:()=>d,s1:()=>p,vi:()=>f});var n=r(14232),i=r(11290);let o=(e,t)=>{var r;let o=(0,n.useContext)(i.J);if(!o)return{data:null,isLoading:!1,isResolved:!0,hasError:!0};let a=e.toLowerCase().replace(/\s+/g,"_"),s=t?"".concat(a,"_").concat(t):a,{data:l,hiddenVariantsMap:c,isLoading:u,isResolved:d,hasError:p}=o,h=null==l?void 0:l[s];return{key:s,data:null!=h?h:null,hiddenVariantInfo:null!=(r=null==c?void 0:c[s])?r:null,isLoading:u,isResolved:d,hasError:p}},a=e=>o(e),s=e=>o(e),l=e=>o(e),c=e=>o(e),u=(e,t)=>
6o(e,t),d=e=>o(e),p=e=>o(e),h=e=>o(e),f=e=>o(e),g=e=>o(e),m=e=>o(e)},34400:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var n=r(35428);function i(e,t){let r=n.J2.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}},34879:(e,t,r)=>{"use strict";r.d(t,{y:()=>i});var n=r(13938);function i(e,t){return(...r)=>{try{return e(...r)}catch(e){n.Vy.error(t,e)}}}},35428:(e,t,r)=>{"use strict";function n(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}r.d(t,{J2:()=>i,VZ:()=>n,Wq:()=>o});let i=n(),o="WorkerGlobalScope"in i},37521:(e,t,r)=>{"use strict";r.d(t,{X4:()=>o,fD:()=>i});var n=r(20788);let i=e=>e&&(e=>"null"!==e&&!e.includes(".aspx")&&!e.includes("?"))(e)?e:null,o=e=>{let t=i(e);return t?"/".concat(n.J.product,"/").concat(t):null}},38248:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.useCookiesNext=t.useDeleteCookie=t.useGetCookie=t.useSetCookie=t.useHasCookie=t.useGetCookies=t.hasCookie=t.deleteCookie=t.setCookie=t.getCookie=t.getCookies=void 0;var o=r(93616),a=r(60844);i(r(98855),t);var s=r(64803);t.getCookies=function(e){return(0,s.isClientSide)(e)?o.getCookies(e):a.getCookies(e)},t.getCookie=function(e,t){return(0,s.isClientSide)(t)?o.getCookie(e,t):a.getCookie(e,t)},t.setCookie=function(e,t,r){return(0,s.isClientSide)(r)?o.setCookie(e,t,r):a.setCookie(e,t,r)},t.deleteCookie=function(e,t){return(0,s.isClientSide)(t)?o.deleteCookie(e,t):a.deleteCookie(e,t)},t.hasCookie=function(e,t){return(0,s.isClientSide)(t)?o.hasCookie(e,t):a.hasCookie(e,t)};var l=r(93616);Object.defineProperty(t,"useGetCookies",{enumerable:!0,get:function(){return l.useGetCookies}}),Object.defineProperty(t,"useHasCookie",{enumerable:!0,get:function(){return l.useHasCookie}}),Object.defineProperty(t,"useSetCookie",{enumerable:!0,get:function(){return l.useSetCookie}}),Object.defineProperty(t,"useGetCookie",{enumerable:!0,get:function(){return l.useGetCookie}}),Object.defineProperty(t,"useDeleteCookie",{enumerable:!0,get:function(){return l.useDeleteCookie}}),Object.defineProperty(t,"useCookiesNext",{enumerable:!0,get:function(){return l.useCookiesNext}})},39470:(e,t,r)=>{"use strict";r.d(t,{Xl:()=>i,j$:()=>n,w7:()=>o});let n=(e,t)=>!!t&&!!e&&!(t.options_selections.length<1)&&e.categories.some(e=>{var r,n;let{is_active:i,type:o,uid:a,options:s}=e,l="selection"===o,c=l?null==(r=t.options_selections.find(e=>{let{category_uid:t}=e;return t===a}))?void 0:r.value:null,u=(null==s||null==(n=s.find(e=>{let{id:t}=e;return String(t)===String(c)}))?void 0:n.cart_display_type)!=="hide";return!i||!l||u}),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return!1;let r=Array.isArray(e)?e:e.categories;if(!Array.isArray(e)&&["warranty","virtual"].includes(e.type))return!0;let n=!1,i=!1;for(let e of r){let{type:r,display_type:a,is_active:s,labels:l,options:c}=e;if(l.some(e=>"generatedText"===e.name)||"image_customization"===r)return!1;if("template_customization"===r)return!0;if("text"===r&&"dnd"!==a&&s&&(n=!0),"selection"===r&&"dnd"!==a&&s){var o;if(c&&c.length>0&&c.every(e=>null!==e.related_product)&&t)continue;(null!=(o=null==c?void 0:c.filter(e=>e.is_active).length)?o:0)>1&&(i=!0)}}return!!n||!!i},o=(e,t)=>{try{var r,n,i,o,a,s,l,c,u;let{name:d,media:p,categories:h}=e,{alt:f,title:g,cdn_images:m}=null!=(s=p.items.find(e=>"cdn_image"===e.type))?s:{},y=h.find(e=>e.labels.find(e=>"PersonalizedGBImage"===e.name)),v=null==t?void 0:t.options_selections.find(e=>e.category_uid==(null==y?void 0:y.uid)),_=null==y||null==(r=y.options)?void 0:r.find(e=>e.id==(null==v?void 0:v.value)),b=null==_||null==(n=_.image)?void 0:n.url;if(!b&&!(null==m?void 0:m.original))return null;return{src:null!=(l=null!=b?b:null==m||null==(i=m.original)?void 0:i.path)?l:"",width:null!=(c=null==m||null==(o=m.original)?void 0:o.width)?c:1e3,height:null!=(u=null==m||null==(a=m.original)?void 0:a.height)?u:1e3,alt:null!=f?f:d,title:null!=g?g:d}}catch(e){return null}}},41289:(e,t,r)=>{"use strict";r.d(t,{Y:()=>p});var n=r(14232),i=r(89099),o=r(26635),a=r(75582),s=r(62789),l=r(97268),c=r(704
608),u=r(20788);let d=e=>(null==e?void 0:e.length)?e.flatMap(e=>{var t;let r=[e.sku];return(null==(t=e.pips)?void 0:t.length)&&r.push(...e.pips.map(e=>e.sku)),r}):[],p=()=>{let e=(0,i.useRouter)(),{asPath:t,query:r}=e,{data:p}=(0,o.Ay)(e=>e),h=(0,a.A)(e=>e.initialized),f=(0,a.A)(e=>e.totalItems),g=(0,a.A)(e=>e.orderSummary),m=(0,a.A)(e=>e.items),y=(0,n.useMemo)(()=>d(m).sort().join(","),[m]);return(0,n.useMemo)(()=>{if(!e.isReady||!h)return null;try{var n,i;let[e,o]=(0,l.MO)(t),a=((e,t)=>{switch(e){case u.J.category:return"Category";case u.J.product:return"Product";case u.J.shoppingCart:return"Cart";case u.J.homepage:return"Home";case u.J.subbrand:return"Subbrand";case u.J.checkoutConfirmation:return"confirmation"===t?"CheckoutConfirmation":"Cart";case u.J.article:return"Article";case u.J.search:return"Search";case u.J.myAccount:return"MyAccount";case u.J.orderTracking:return"OrderTracking";case u.J.contactInformation:return"ContactInformation";default:return}})(e,o);if(!a)return null;let h=r._previewCompId,y=r._variantId,v=r._variantVersion,_=[...new Set(d(m))];if(h&&y&&v)return{componentId:h,variantId:y,versionId:v,componentTargetTypeName:a,...["Product","Category"].includes(a)&&{entityId:o},cartItems:"13"===h?_:void 0};let{landingPageURL:b,genseg:w}=null!=(n=(0,s.IQ)(p))?n:{},S=(0,c.SP)(p.brand,p.siteId,p.country);return{...{landingPage:null!=b?b:"",genseg:null!=w?w:"",userCountry:p.userCountry,city:S,cartTotalItems:f,cartSubtotal:null!=(i=null==g?void 0:g.subtotal)?i:0,cartItems:_,urlQuery:t},...["Product","Category"].includes(a)&&{entityId:o},componentTargetTypeName:a}}catch(e){return null}},[t,p,h,f,null==g?void 0:g.subtotal,m,y,r._previewCompId,r._variantId,r._variantVersion])}},42236:(e,t,r)=>{"use strict";r.d(t,{l:()=>a,q:()=>o});var n=r(90198),i=r(87151);function o(e,t,r,n,i){return a(e,t,[r],n,i)}function a(e,t,r,o,{once:s,capture:l,passive:c}={}){let u=(0,n.dm)(t=>{(t.isTrusted||t.__ddIsTrusted||e.allowUntrustedEvents)&&(s&&f(),o(t))}),d=c?{capture:l,passive:c}:l,p=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,h=(0,i.W)(p,"addEventListener");function f(){let e=(0,i.W)(p,"removeEventListener");r.forEach(r=>e.call(t,r,u,d))}return r.forEach(e=>h.call(t,e,u,d)),{stop:f}}},43626:(e,t,r)=>{"use strict";function n(e){try{return JSON.parse(e)}catch(e){}}function i(e){return{...e}}function o(e,t){return Object.keys(e).some(r=>e[r]===t)}function a(e){return 0===Object.keys(e).length}function s(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n]);return r}r.d(t,{LG:()=>s,RI:()=>a,Rj:()=>o,XU:()=>n,yG:()=>i})},44103:(e,t,r)=>{"use strict";let n,i,o,a,s,l,c,u,d,p,h,f;r.d(t,{eT:()=>rN,o:()=>rR,$m:()=>rT,NT:()=>rP,Wd:()=>rO,bb:()=>z,K:()=>G,do:()=>g,wP:()=>iv,wI:()=>rn,W3:()=>tR,PJ:()=>rU,dT:()=>rj,$4:()=>ri,Gn:()=>nV,zL:()=>nF,dx:()=>iy,rf:()=>rz,pB:()=>nz,wR:()=>rr,g1:()=>nB,nS:()=>t7,XS:()=>re,p_:()=>rt,$5:()=>tX,AB:()=>im,jR:()=>rM,ei:()=>tZ,ap:()=>rV,Ie:()=>r$});var g,m=r(61885);let y={GRANTED:"granted",NOT_GRANTED:"not-granted"};var v=r(11782),_=r(83300),b=r(32068),w=r(47626),S=r(35428),k=r(62344),C=r(73411);function E(){return new m.cP(e=>{var t,r;let n=(t,r)=>{let n=(0,k.As)({stackTrace:r,originalError:t,startClocks:(0,b.M8)(),nonErrorPrefix:"Uncaught",source:C.g.SOURCE,handling:"unhandled"});e.notify(n)},{stop:i}=(t=n,(0,_.H)((0,S.VZ)(),"onerror",({parameters:[e,r,n,i,o]})=>{let a;(0,k.bJ)(o)||(a=(0,w.h)(e,r,n,i)),t(null!=o?o:e,a)})),{stop:o}=(r=n,(0,_.H)((0,S.VZ)(),"onunhandledrejection",({parameters:[e]})=>{r(e.reason||"Empty reason")}));return()=>{i(),o()}})}var A=r(27112),I=r(1285),x=r(90198),T=r(61608),P=r(23963),O=r(79766),R=r(68717),N=r(86417);function D(e,t,r,n){return(0,x.dm)((...i)=>(n&&(0,T.Q6)({feature:n}),e()[t][r](...i)))}let L={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},U={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function M(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,M)}let j=/(\S+?)\s*=\s*(.+?)(?:;|$)/g;function $(e,t){for(j.lastIndex=0;;){let r=j.exec(e);if(r){if(r[1]===t)return r[2]}else break}}function V(e,t,r=""){let n=e.charCodeAt(t-1),i=n>=55296&&n<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${r}`}var F=r(13938);function B(e,t){t.silentMultipleInit||F.Vy.error(`${e} is already initialized.`)}let z={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},G={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},q={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change",BF_CACHE:"bf_cache"},H={CLICK:"click",CUSTOM:"custom"},K={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"}
6,J={DURATION:"duration",OPERATION_STEP:"operation_step"};function W({vitalsByName:e,vitalsByReference:t},r,n={}){let i={id:M(),name:r,startClocks:(0,b.M8)(),...n},o={__dd_vital_reference:!0};return e.set(r,i),t.set(o,i),o}function Z(e,{vitalsByName:t,vitalsByReference:r},n,i={}){var o,a,s,l,c;let u="string"==typeof n?t.get(n):r.get(n);u&&(e((o=u,a=u.startClocks,s=i,l=(0,b.M8)(),{id:o.id,name:o.name,type:J.DURATION,startClocks:a,duration:(0,b.vk)(a.timeStamp,l.timeStamp),context:(0,O.kg)(o.context,s.context),description:null!=(c=s.description)?c:o.description,handlingStack:o.handlingStack})),"string"==typeof n?t.delete(n):r.delete(n))}function Y(e){let{startClocks:t,type:r,name:n,description:i,context:o,handlingStack:a}=e,s=e.type===J.DURATION?e.id:void 0,l={id:null!=s?s:M(),type:r,name:n,description:i,...r===J.DURATION?{duration:(0,b.Zj)(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:l,type:z.VITAL,context:o},startClocks:t,duration:r===J.DURATION?e.duration:void 0,domainContext:a?{handlingStack:a}:{}}}function X(e,t,r){if(e)for(let n of e){let e=n[t];e&&e(r)}}var Q=r(54984),ee=r(42236),et=r(43626);let er=[];function en(e,t,r,n){var i,o;let a=(i=r,o=n,`_dd_c_${i}_${o}`);er.push((0,ee.q)(e,window,"storage",({key:e})=>{a===e&&t.setContext(l())})),t.changeObservable.subscribe(function(){localStorage.setItem(a,JSON.stringify(t.getContext()))});let s=(0,O.kg)(l(),t.getContext());function l(){let e=localStorage.getItem(a);return e?JSON.parse(e):{}}(0,et.RI)(s)||t.setContext(s)}var ei=r(64111);function eo(e,t,r){let n={...e};for(let[e,{required:i,type:o}]of Object.entries(t))"string"!==o||ea(n[e])||(n[e]=String(n[e])),i&&ea(n[e])&&F.Vy.warn(`The property ${e} of ${r} is required; context will not be sent to the intake.`);return n}function ea(e){return null==e||""===e}function es(e="",{propertiesConfig:t={}}={}){let r={},n=new m.cP,i={getContext:()=>(0,O.Go)(r),setContext:o=>{!function(e){let t="object"===(0,ei.P)(e);return t||F.Vy.error("Unsupported context:",e),t}(o)?i.clearContext():r=(0,R.a)(eo(o,t,e)),n.notify()},setContextProperty:(i,o)=>{r=(0,R.a)(eo({...r,[i]:o},t,e)),n.notify()},removeContextProperty:i=>{delete r[i],eo(r,t,e),n.notify()},clearContext:()=>{r={},n.notify()},changeObservable:n};return i}function el(){return es("global context")}var ec=r(67238);function eu(){return es("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function ed(){return es("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}var ep=r(27627),eh=r(93487),ef=r(79612),eg=r(5489);async function em(e,t){let r=e.getReader(),n=[];for(;;){let e=await r.read();if(e.done)break;t.collectStreamBody&&n.push(e.value)}return r.cancel().catch(eh.l),t.collectStreamBody?(0,eg.wh)(n):void 0}var ey=r(74394);let ev=[];function e_({responseBodyAction:e}={}){return e&&ev.push(e),n||(n=new m.cP(e=>{if(!S.J2.fetch)return;let{stop:t}=(0,_.H)(S.J2,"fetch",t=>(function({parameters:e,onPostCall:t,handlingStack:r},n){var i,o;let[a,s]=e,l=s&&s.method;void 0===l&&a instanceof Request&&(l=a.method);let c=void 0!==l?String(l).toUpperCase():"GET",u=a instanceof Request?a.url:(0,ef.l2)(String(a)),d={state:"start",init:s,input:a,method:c,startClocks:(0,b.M8)(),url:u,handlingStack:r,isAbortedOnStart:a instanceof Request&&(null==(i=a.signal)?void 0:i.aborted)||(null==(o=null==s?void 0:s.signal)?void 0:o.aborted)||!1};n.notify(d),e[0]=d.input,e[1]=d.init,t(e=>{eb(n,e,d).catch(x.Dx)})})(t,e),{computeHandlingStack:!0});return t})),n}async function eb(e,t,r){var n,i;let o;r.state="resolve";try{o=await t}catch(t){r.status=0,r.isAborted=(null==(i=null==(n=r.init)?void 0:n.signal)?void 0:i.aborted)||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t,e.notify(r);return}r.response=o,r.status=o.status,r.responseType=o.type,r.isAborted=!1;let a=ev.reduce((e,t)=>Math.max(e,t(r)),0);if(0!==a){let e=(0,ey.i)(o);if(e&&e.body)try{let t=await em(e.body,{collectStreamBody:2===a});r.responseBody=t&&new TextDecoder().decode(t)}catch(e){}}e.notify(r)}function ew(e,t,r=0,n){let i=new Date;i.setTime(i.getTime()+r);let o=`expires=${i.toUTCString()}`,a=n&&n.crossSite?"none":"strict",s=n&&n.domain?`;domain=${n.domain}`:"",l=n&&n.secure?";secure":"",c=n&&n.partitioned?";partitioned":"";document.cookie=`${e}=${t};${o};path=/;samesite=${a}${s}${l}${c}`}function eS(e){return $(document.cookie,e)}
6function ek(e){return i||(i=function(e){let t=new Map;for(j.lastIndex=0;;){let r=j.exec(e);if(r)t.set(r[1],r[2]);else break}return t}(document.cookie)),i.get(e)}function eC(e=location.hostname,t=document.referrer){if(void 0===o){let r=function(e,t){try{return e||(0,ef.c$)(t).hostname}catch(e){}}(e,t);if(r){let e=`dd_site_test_${M()}`,t=r.split("."),n=t.pop();for(;t.length&&!eS(e);)n=`${t.pop()}.${n}`,ew(e,"test",b.OY,{domain:n});ew(e,"",0,{domain:n}),o=n}}return o}let eE="datadog-synthetics-",eA=`${eE}public-id`,eI=`${eE}result-id`,ex=`${eE}injects-rum`,eT=`${eE}rum-context`;function eP(){return!S.Wq&&!!(S.J2._DATADOG_SYNTHETICS_INJECTS_RUM||ek(ex))}function eO(){var e;let t=function(){let e=S.J2._DATADOG_SYNTHETICS_RUM_CONTEXT;if(e)return e;let t=ek(eT);return t?(0,et.XU)(decodeURIComponent(t)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||ek(eA),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||ek(eI)}}();return"object"==typeof(e=t)&&null!==e&&"string"==typeof e.test_id&&"string"==typeof e.result_id?t:void 0}let eR=ec.XP;var eN=r(34879),eD=r(18932),eL=r(74349),eU=r(30621);let eM="_dd_s";var ej=r(17282),e$=r(81545);let eV=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function eF(e,t){let r={isExpired:"1"};return t.trackAnonymousUser&&(null==e?void 0:e.anonymousId)&&(r.anonymousId=null==e?void 0:e.anonymousId),r}function eB(e){return(0,et.RI)(e)}function ez(e){var t;return void 0!==e.isExpired||!((void 0===(t=e).created||(0,b.x3)()-Number(t.created)<e$.AQ)&&(void 0===t.expire||(0,b.x3)()<Number(t.expire)))}function eG(e){e.expire=String((0,b.x3)()+e$.HB)}function eq(e){return(0,ej.WP)(e).map(([e,t])=>"anonymousId"===e?`aid=${t}`:`${e}=${t}`).join("&")}function eH(e){let t={};return e&&(-1!==e.indexOf("&")||eV.test(e))&&e.split("&").forEach(e=>{let r=eV.exec(e);if(null!==r){let[,e,n]=r;"aid"===e?t.anonymousId=n:t[e]=n}}),t}function eK(e,t,r,n){let i=eq(r);t.betaEncodeCookieOptions&&(i=eq({...r,...!(0,et.RI)(r)?{c:eW(e)}:{}})),ew(eM,i,t.trackAnonymousUser?e$._P:n,e)}function eJ(e,t){return t.betaEncodeCookieOptions?function(e){let t,r=(function(e){let t=new Map;for(j.lastIndex=0;;){let r=j.exec(e);if(r){let e=r[1],n=r[2];t.has(e)?t.get(e).push(n):t.set(e,[n])}else break}return t})(document.cookie).get(eM)||[],n=eW(e);for(let e of r.reverse())if((t=eH(e)).c===n)break;return null==t||delete t.c,null!=t?t:{}}(e):eH(eS(eM))}function eW(e){return((e.domain?e.domain.split(".").length-1:0)<<1|!!e.crossSite).toString(16)}function eZ(e){localStorage.setItem(eM,eq(e))}function eY(){return eH(localStorage.getItem(eM))}let eX=b.OY,eQ=[];function e0(e,t,r=0){var n;let i,{isLockEnabled:o,persistSession:s,expireSession:l}=t,c=e=>s({...e,lock:i}),u=()=>{let{lock:e,...r}=t.retrieveSession();return{session:r,lock:e&&!function(e){let[,t]=e.split("--");return!t||(0,b.vk)(Number(t),(0,b.nx)())>eX}(e)?e:void 0}};if(a||(a=e),e!==a)return void eQ.push(e);if(o&&r>=100)return void e2(t);let d=u();if(o&&(d.lock||(i=M()+"--"+(0,b.nx)(),c(d.session),(d=u()).lock!==i)))return void e1(e,t,r);let p=e.process(d.session);if(o&&(d=u()).lock!==i)return void e1(e,t,r);if(p&&(ez(p)?l(p):(eG(p),o?c(p):s(p))),o&&!(p&&ez(p))){if((d=u()).lock!==i)return void e1(e,t,r);s(d.session),p=d.session}null==(n=e.after)||n.call(e,p||d.session),e2(t)}function e1(e,t,r){(0,eL.wg)(()=>{e0(e,t,r+1)},10)}function e2(e){a=void 0;let t=eQ.shift();t&&e0(t,e)}let e3="_DD_SESSION";function e4(){let e=(0,S.VZ)();return e[e3]||(e[e3]={}),(0,et.yG)(e[e3])}function e5(e){(0,S.VZ)()[e3]=(0,et.yG)(e)}let e6=b.OY;function e8(e){let t=(0,ei.P)(e);return"string"===t||"function"===t||e instanceof RegExp}function e9(e,t,r=!1){return e.some(e=>{try{if("function"==typeof e)return e(t);if(e instanceof RegExp)return e.lastIndex=0,e.test(t);if("string"==typeof e)return r?t.startsWith(e):e===t}catch(e){F.Vy.error(e)}return!1})}let e7=["chrome-extension://","moz-extension://"];function te(e){return e7.some(t=>e.includes(t))}var tt=r(57247);function tr(e,t,r){let n=function(e,t){let r=`/api/v2/${t}`,n=e.proxy;if("string"==typeof n){let e=(0,ef.l2)(n);return t=>`${e}?ddforward=${encodeURIComponent(`${r}?${t}`)}`}if("function"==typeof n)return e=>n({path:r,parameters:e});let i=tn(t,e);return e=>`https://${i}${r}?${e}`}(e,t);return{build:(i,o)=>n(function({clientToken:e,internalAnalyticsSubdomain:t,source:r="browser"},n,i,{retry:o,encoding:a},s=[]){let l=[`ddsource=${r}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.33.0")}`,"dd-evp-origin=browser",`dd-request-id=${M()}`].concat(s);return a&&l.push(`dd-evp-encoding=${a}`),"rum"===n&&(l.push(`batch_time=${(0,b.nx)()}`,`_dd.api=${i}`),o&&l.push(`_dd.retry_count=${o.count}`,`_dd.retry_after=${o.lastFailureStatus}`)),t&&l.reverse(),l.join("&")}(e,t,i,o,r)),trackType:t}}
6function tn(e,t){let{site:r=tt.NW,internalAnalyticsSubdomain:n}=t;if("logs"===e&&t.usePciIntake&&r===tt.NW)return tt.$A;if(n&&r===tt.NW)return`${n}.${tt.NW}`;if(r===tt.TC)return`http-intake.logs.${r}`;let i=r.split("."),o=i.pop();return`browser-intake-${i.join("-")}.${o}`}let ti={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},to={ALL:"all",SAMPLED:"sampled"};function ta(e,t){return null==e||"string"==typeof e||(F.Vy.error(`${t} must be defined as a string`),!1)}function ts(e,t){return void 0===e||!!(0,eD.fp)(e)||(F.Vy.error(`${t} Sample Rate should be a number between 0 and 100`),!1)}let tl=["tracecontext","datadog"],tc=["cache-control","etag","age","expires","content-type","content-encoding","vary","content-length","server-timing","x-cache"];function tu(e){return e8(e)?{match:e,propagatorTypes:tl}:(0,ei.O)(e)&&e8(e.match)&&(null===e.propagatorTypes||void 0===e.propagatorTypes||Array.isArray(e.propagatorTypes))?{match:e.match,propagatorTypes:e.propagatorTypes||tl}:void 0}let td=["request","response","any"];var tp=r(33083);function th(e,t){t.lastIndex=0;let r=t.exec(e);if(!r)return;let[n,i]=r;return i||n}let tf=/[a-zA-Z_$]/,tg=/[a-zA-Z0-9_$]/,tm=/[0-9]/,ty=/[a-fA-F0-9]/,tv={0:()=>!1,1:()=>!1,2:e=>tf.test(e),3:e=>tg.test(e),4:e=>"."===e,5:e=>"["===e,6:e=>"]"===e,7:e=>tm.test(e),8:e=>"'\"".includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>"\\"===e,12:(e,t)=>void 0===t.escapeSequence?`${t.quote}/\\bfnrtu`.includes(e):!!t.escapeSequence.startsWith("u")&&t.escapeSequence.length<5&&ty.test(e)},t_={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},tb=[2,3,7,10],tw=[4,5,6],tS={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},tk=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function tC(e,t){let r,n=function(){let e={fetch:{}};return{get:()=>e,increment:(t,r)=>{e[t]||(e[t]={}),e[t][r]||(e[t][r]=0),e[t][r]=e[t][r]+1}}}(),i=await tA(e);return i.ok?(n.increment("fetch","success"),r=function(e,t,r,n){let i={...e};return tk.forEach(e=>{e in t&&(i[e]=o(t[e]))}),Object.keys(r).forEach(e=>{var n;void 0!==t[e]&&(n=r[e],t[e].forEach(({key:e,value:t})=>{n.setContextProperty(e,o(t))}))}),i;function o(e){if(Array.isArray(e))return e.map(o);if((0,ei.O)(e)){if("rcSerializedType"in e){let r=e.rcSerializedType;switch(r){case"string":return e.value;case"regex":return tE(e.value);case"dynamic":let i;var t=e;let o=t.strategy;switch(o){case"cookie":i=function({name:e}){let t=eS(e);return n.increment("cookie",void 0!==t?"success":"missing"),t}(t);break;case"dom":i=function({selector:e,attribute:t}){var r,i;let o;try{o=document.querySelector(e)}catch(t){F.Vy.error(`Invalid selector in the remote configuration: '${e}'`),n.increment("dom","failure");return}if(!o)return void n.increment("dom","missing");if(r=o,i=t,"password"===r.getAttribute("type")&&"value"===i){F.Vy.error(`Forbidden element selected by the remote configuration: '${e}'`),n.increment("dom","failure");return}let a=void 0!==t?o.getAttribute(t):o.textContent;return null===a?void n.increment("dom","missing"):(n.increment("dom","success"),a)}(t);break;case"js":i=function({path:e}){let t=window,r=function(e){let t,r=[],n=0,i={quote:void 0,escapeSequence:void 0},o="";for(let l of e){if(!(t=t_[n].find(e=>tv[e](l,i))))return[];if(void 0!==i.escapeSequence&&12!==t){var a,s;if(a=i.escapeSequence,!("\"'/\\bfnrt".includes(a)||a.startsWith("u")&&5===a.length))return[];o+=(s=i.escapeSequence).startsWith("u")?String.fromCharCode(parseInt(s.slice(1),16)):tS[s],i.escapeSequence=void 0}tb.includes(t)?o+=l:tw.includes(t)&&""!==o?(r.push(o),o=""):12===t?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${l}`:l:8===t?i.quote=l:9===t&&(i.quote=void 0),n=t}return t_[n].includes(1)?(""!==o&&r.push(o),r):[]}(e);if(0===r.length){F.Vy.error(`Invalid JSON path in the remote configuration: '${e}'`),n.increment("js","failure");return}for(let i of r){if(!(i in t))return void n.increment("js","missing");try{t=t[i]}catch(t){F.Vy.error(`Error accessing: '${e}'`,t),n.increment("js","failure");return}}return n.increment("js","success"),t}(t);break;case"localStorage":i=function({key:e}){let t;try{t=localStorage.getItem(e)}catch(e){n.increment("localStorage","failure");return}return n.increment("localStorage",null!==t?"success":"missing"),null!=t?t:void 0}(t);break;default:F.Vy.error(`Unsupported remote configuration: "strategy": "${o}"`);return}let a=t.extractor;return void 0!==a&&"string"==typeof i?function(e,t){let r=tE(e.value);if(void 0!==r)return th(t,r)}(a,i):i;default:F.Vy.error(`Unsupported remote configuration: "rcSerializedType": "${r}"`);return}}return(0,et.LG)(e,o)}return e}}(e,i.value,t,n)):(n.increment("fetch","failure"),F.Vy.error(i.error)),(0,T.Gk)("remote configuration metrics",{metrics:n.get()}),r}function tE(e){try{return new RegExp(e)}catch(t){F.Vy.error(`Invalid regex in the remote configuration: '${e}'`)}}async function tA(e){let t;try{var r;t=await (0,tp.h)((r=e).remoteConfigurationProxy?r.remoteConfigurationProxy:`https://sdk-configuration.${tn("rum",r)}/v1/${encodeURIComponent(r.remoteConfigurationId)}.json`)}catch(e){t=void 0}if(!t||!t.ok)return{ok:!1,error:Error("Error fetching the remote configuration.")};let n=await t.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:Error("No remote configuration for RUM.")}}function tI(e,t,r){e.changeObservable.subscribe(()=>{let n=e.getContext();r.add(e=>e[t].setContext(n))})}var tx=r(34400),tT=r(79770);let tP="_dd_tab_id";var tO=r(87151);function tR(){let e,t=window;if(t.Zone&&(e=(0,tO.W)(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){let r=new t.MutationObserver(eh.l),n=(0,tO.W)(r,"originalInstance");e=n&&n.constructor}return e||(e=t.MutationObserver),e}class tN{constructor(){this.callbacks={}}notify(e,t){let r=this.callbacks[e];
6r&&r.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}}var tD=r(29471);let tL=e$.AQ,tU=new WeakMap;function tM({target:e,parameters:[t,r]}){tU.set(e,{state:"open",method:String(t).toUpperCase(),url:(0,ef.l2)(String(r))})}function tj({target:e}){let t=tU.get(e);t&&(t.isAborted=!0)}let t$={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},tV={FETCH:t$.FETCH,XHR:t$.XHR},tF="initial_document",tB=[[t$.DOCUMENT,e=>tF===e],[t$.XHR,e=>"xmlhttprequest"===e],[t$.FETCH,e=>"fetch"===e],[t$.BEACON,e=>"beacon"===e],[t$.CSS,(e,t)=>/\.css$/i.test(t)],[t$.JS,(e,t)=>/\.js$/i.test(t)],[t$.IMAGE,(e,t)=>["image","img","icon"].includes(e)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)],[t$.FONT,(e,t)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(t)],[t$.MEDIA,(e,t)=>["audio","video"].includes(e)||null!==/\.(mp3|mp4)$/i.exec(t)]];function tz(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function tG(e){return"xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType}function tq(e){return e.duration>=0}function tH(e){var t;let r=tz(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=!((t=e).redirectEnd>t.startTime)||tz(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart);return r&&n}function tK(e,t,r){if(e<=t&&t<=r)return{duration:(0,b.Zj)((0,b.vk)(t,r)),start:(0,b.Zj)((0,b.vk)(e,t))}}function tJ(e){return e&&(!tt.Ih.every(t=>e.includes(t))||(0,N.sr)(N.R9.TRACK_INTAKE_REQUESTS))}let tW=/data:(.+)?(;base64)?,/g;function tZ(e,t=24e3){if(e.length<=t||!e.startsWith("data:"))return e;let r=e.substring(0,100).match(tW);return r?`${r[0]}[...]`:e}let tY=new Map;function tX(e,t){let r;if(100===t)return!0;if(0===t)return!1;let n=tY.get(t);return n&&e===n.sessionId?n.decision:(r=window.BigInt?function(e,t){let r=BigInt("1111111111111111111"),n=BigInt("0x10000000000000000");return Number(e*r%n)<=t/100*Number(n)}(BigInt(`0x${e.split("-")[4]}`),t):(0,eD.ic)(t),tY.set(t,{sessionId:e,decision:r}),r)}function tQ(e){let t=crypto.getRandomValues(new Uint32Array(2));return 63===e&&(t[t.length-1]>>>=1),{toString(e=10){let r=t[1],n=t[0],i="";do{let t=r%e*0x100000000+n;r=Math.floor(r/e),n=Math.floor(t/e),i=(t%e).toString(e)+i}while(r||n);return i}}}function t0(e){return e.toString(16).padStart(16,"0")}function t1(e){0!==e.status||e.isAborted||(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function t2(e,t,r,n,i,o){let a=r.findTrackedSession();if(!a)return;let s=e.allowedTracingUrls.find(e=>e9([e.match],t.url,!0));if(!s)return;let l=tX(a.id,e.traceSampleRate);(l||e.traceContextInjection===to.ALL)&&(t.traceSampled=l,t.traceId=tQ(64),t.spanId=tQ(63),o(function(e,t,r,n,i,o,a,s){let l={};if(i.forEach(n=>{switch(n){case"datadog":Object.assign(l,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":e.toString()});break;case"tracecontext":Object.assign(l,{traceparent:`00-0000000000000000${t0(e)}-${t0(t)}-0${r?"1":"0"}`,tracestate:`dd=s:${r?"1":"0"};o:rum`});break;case"b3":Object.assign(l,{b3:`${t0(e)}-${t0(t)}-${r?"1":"0"}`});break;case"b3multi":Object.assign(l,{"X-B3-TraceId":t0(e),"X-B3-SpanId":t0(t),"X-B3-Sampled":r?"1":"0"})}}),s.propagateTraceBaggage){let e={"session.id":n},t=o.getContext().id;"string"==typeof t&&(e["user.id"]=t);let r=a.getContext().id;"string"==typeof r&&(e["account.id"]=r);let i=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(",");i&&(l.baggage=i)}return l}(t.traceId,t.spanId,t.traceSampled,a.id,s.propagatorTypes,n,i,e)))}let t3=32*eg._m;function t4(e,t){return t.allowedGraphQlUrls.find(t=>e9([t.match],e))}let t5=1;function t6(){let e=t5;return t5+=1,e}function t8(e){return(0,eD.Et)(e)&&e<0?void 0:e}function t9(e){return e.nodeType===Node.TEXT_NODE}function t7(e){return e.nodeType===Node.ELEMENT_NODE}function re(e){return t7(e)&&!!e.shadowRoot}function rt(e){return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t7(e.host)}function rr(e){return e.childNodes.length>0||re(e)}function rn(e,t){let r=e.firstChild;for(;r;)t(r),r=r.nextSibling;re(e)&&t(e.shadowRoot)}function ri(e){return rt(e)?e.host:e.parentNode}function ro(e){if(e.parentElement)return e.parentElement;let t=e.parentNode;return t&&rt(t)?t.host:null}function ra(e,t){return new m.cP(r=>{var n;let i,o;if(!window.PerformanceObserver)return;let a=e=>{let t=e.filter(e=>{var t;return!((t=e).entryType===g.RESOURCE&&(!tJ(t.name)||!tq(t)))});t.length>0&&r.notify(t)},s=!0,l=new PerformanceObserver((0,x.dm)(e=>{s?i=(0,eL.wg)(()=>a(e.getEntries())):a(e.getEntries())}));try{l.observe(t)}catch(e){if([g.RESOURCE,g.NAVIGATION,g.LONG_TASK,g.PAINT].includes(t.type)){t.buffered&&(i=(0,eL.wg)(()=>a(performance.getEntriesByType(t.type))));try{l.observe({entryTypes:[t.type]})}catch(e){return}}}return s=!1,n=e,!c&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(c=(0,ee.q)(n,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),rs(g.FIRST_INPUT)||t.type!==g.FIRST_INPUT||({stop:o}=function(e,t){let r=(0,b.x3)(),n=!1,{stop:i}=(0,ee.l)(e,window,["click","mousedown","keydown","touchstart","pointerdown"],t=>{var r,n;if(!t.cancelable)return;let i={entryType:"first-input",processingStart:(0,b.$S)(),processingEnd:(0,b.$S)(),startTime:t.timeStamp,duration:0,name:"",cancelable:!1,target:null,interactionId:0,toJSON:()=>({})};"pointerdown"===t.type?(r=e,n=i,(0,ee.l)(r,window,["pointerup","pointercancel"],e=>{"pointerup"===e.type&&o(n)},{once:!0})):o(i)},{passive:!0,capture:!0});return{stop:i};function o(e){if(!n){n=!0,i();let o=e.processingStart-e.startTime;o>=0&&o<(0,b.x3)()-r&&t(e)}}}(e,e=>{a([e])}
6)),()=>{l.disconnect(),o&&o(),(0,eL.DJ)(i)}})}function rs(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(e)}!function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"}(g||(g={}));let rl="data-dd-excluded-activity-mutations";function rc(e,t,r,n,i,o){let a,s=(0,v.B)(ru)(e,t,r,n),l=!1,c=(0,eL.wg)((0,x.dm)(()=>h({hadActivity:!1})),100),u=void 0!==o?(0,eL.wg)((0,x.dm)(()=>h({hadActivity:!0,end:(0,b.nx)()})),o):void 0,d=s.subscribe(({isBusy:e})=>{(0,eL.DJ)(c),(0,eL.DJ)(a);let t=(0,b.nx)();e||(a=(0,eL.wg)((0,x.dm)(()=>h({hadActivity:!0,end:t})),100))}),p=()=>{l=!0,(0,eL.DJ)(c),(0,eL.DJ)(a),(0,eL.DJ)(u),d.unsubscribe()};function h(e){l||(p(),i(e))}return{stop:p}}function ru(e,t,r,n){return new m.cP(i=>{let o,a=[],s=0;return a.push(t.subscribe(e=>{e.every(rp)||l()}),r.subscribe(l),ra(n,{type:g.RESOURCE}).subscribe(e=>{e.some(e=>!rd(n,e.name))&&l()}),e.subscribe(7,e=>{rd(n,e.url)||(void 0===o&&(o=e.requestIndex),s+=1,l())}),e.subscribe(8,e=>{rd(n,e.url)||void 0===o||e.requestIndex<o||(s-=1,l())})),()=>{a.forEach(e=>e.unsubscribe())};function l(){i.notify({isBusy:s>0})}})}function rd(e,t){return e9(e.excludedActivityUrls,t)}function rp(e){let t="characterData"===e.type?e.target.parentElement:e.target;return!!(t&&t7(t)&&t.matches(`[${rl}], [${rl}] *`))}let rh="data-dd-action-name",rf="Masked Element",rg=[rh,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],rm=[rS,rb],ry=[rS,function(e){if("BODY"===e.tagName)return;let t=e.classList;for(let r=0;r<t.length;r+=1){let n=t[r];if(!r_(n))return`${CSS.escape(e.tagName)}.${CSS.escape(n)}`}},rw];function rv(e,t){if(!e.isConnected)return;let r=function(e){let t=[],r=e;for(;r;){let e=r.getRootNode();if(t.push({rootNode:e,target:r}),rt(e))r=e.host;else break}return t.reverse()}(e),n=[];for(let{rootNode:e,target:i}of r){let r=function(e,t,r){let n,i=e;for(;i&&"HTML"!==i.nodeName;){let e=rE(i,t,rm,rA,r,n);if(e)return rx(e,n);n=rx(rE(i,t,ry,rI,r,n)||function(e){let t=rC(e);return`${CSS.escape(e.tagName)}:nth-of-type(${t})`}(i),n),i=i.parentElement}return n}(i,e,t);if(!r)return;n.push(r)}return n.join("::shadow ")}function r_(e){return/[0-9]/.test(e)}function rb(e){if(e.id&&!r_(e.id))return`#${CSS.escape(e.id)}`}function rw(e){return CSS.escape(e.tagName)}function rS(e,t){if(t){let e=r(t);if(e)return e}for(let e of rg){let t=r(e);if(t)return t}function r(t){if(e.hasAttribute(t))return`${CSS.escape(e.tagName)}${rk(t,e.getAttribute(t))}`}}function rk(e,t){return`[${e}="${CSS.escape(t)}"]`}function rC(e){let t=e.parentNode.firstElementChild,r=1;for(;t&&t!==e;)t.tagName===e.tagName&&(r+=1),t=t.nextElementSibling;return r}function rE(e,t,r,n,i,o){for(let a of r){let r=a(e,i);if(r&&n(e,t,r,o))return r}}function rA(e,t,r,n){return 1===t.querySelectorAll(rx(r,n)).length}function rI(e,t,r,n){let i;if(void 0===n)i=e=>e.matches(r);else{let e=rx(`${r}:scope`,n);i=t=>null!==t.querySelector(e)}let o=e.previousElementSibling;for(;o;){if(i(o))return!1;o=o.previousElementSibling}for(o=e.nextElementSibling;o;){if(i(o))return!1;o=o.nextElementSibling}return!0}function rx(e,t){return t?`${e}>${t}`:e}let rT={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:ti.ALLOW,MASK:ti.MASK,MASK_USER_INPUT:ti.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:ti.MASK_UNLESS_ALLOWLISTED},rP="data-dd-privacy",rO="hidden",rR="***",rN="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",rD={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function rL(e){return`[${rP}="${e}"], .dd-privacy-${e}`}function rU(e,t,r){if(r&&r.has(e))return r.get(e);let n=ri(e),i=n?rU(n,t,r):t,o=rM(rj(e),i);return r&&r.set(e,o),o}function rM(e,t){switch(t){case rT.HIDDEN:case rT.IGNORE:return t}switch(e){case rT.ALLOW:case rT.MASK:case rT.MASK_USER_INPUT:case rT.MASK_UNLESS_ALLOWLISTED:case rT.HIDDEN:case rT.IGNORE:return e;default:return t}}function rj(e){if(t7(e)){if("BASE"===e.tagName)return rT.ALLOW;if("INPUT"===e.tagName){if("password"===e.type||"email"===e.type||"tel"===e.type||"hidden"===e.type)return rT.MASK;let t=e.getAttribute("autocomplete");if(t&&(t.startsWith("cc-")||t.endsWith("-password")))return rT.MASK}if(e.matches(rL(rT.HIDDEN)))return rT.HIDDEN;if(e.matches(rL(rT.MASK)))return rT.MASK;if(e.matches(rL(rT.MASK_UNLESS_ALLOWLISTED)))return rT.MASK_UNLESS_ALLOWLISTED;if(e.matches(rL(rT.MASK_USER_INPUT)))return rT.MASK_USER_INPUT;if(e.matches(rL(rT.ALLOW)))return rT.ALLOW;if(function(e){if("SCRIPT"===e.nodeName)return!0;
6if("LINK"===e.nodeName){let e=t("rel");return/preload|prefetch/i.test(e)&&"script"===t("as")||"shortcut icon"===e||"icon"===e}if("META"===e.nodeName){let r=t("name"),n=t("rel"),i=t("property");return/^msapplication-tile(image|color)$/.test(r)||"application-name"===r||"icon"===n||"apple-touch-icon"===n||"shortcut icon"===n||"keywords"===r||"description"===r||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(r)||"pinterest"===r||"robots"===r||"googlebot"===r||"bingbot"===r||e.hasAttribute("http-equiv")||"author"===r||"generator"===r||"framework"===r||"publisher"===r||"progid"===r||/^article:/.test(i)||/^product:/.test(i)||"google-site-verification"===r||"yandex-verification"===r||"csrf-token"===r||"p:domain_verify"===r||"verify-v1"===r||"verification"===r||"shopify-checkout-api-token"===r}function t(t){return(e.getAttribute(t)||"").toLowerCase()}return!1}(e))return rT.IGNORE}}function r$(e,t){switch(t){case rT.MASK:case rT.HIDDEN:case rT.IGNORE:return!0;case rT.MASK_UNLESS_ALLOWLISTED:if(t9(e))return!!rF(e.parentNode)||!rG(e.textContent||"");return rF(e);case rT.MASK_USER_INPUT:return t9(e)?rF(e.parentNode):rF(e);default:return!1}}function rV(e,t,r,n,i){if(n!==rT.MASK&&n!==rT.MASK_UNLESS_ALLOWLISTED||t===rP||rg.includes(t)||t===i.actionNameAttribute)return!1;switch(t){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return!!("A"===e&&"href"===t||"IFRAME"===e&&"srcdoc"===t||r&&t.startsWith("data-"))||("IMG"===e||"SOURCE"===e)&&("src"===t||"srcset"===t)}function rF(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!rD[e.tagName]}function rB(e){return e.replace(/\S/g,"x")}function rz(e,t){var r;let n=null==(r=e.parentElement)?void 0:r.tagName,i=e.textContent||"";if("HEAD"!==n||i.trim()){if("SCRIPT"===n)i=rR;else if(t===rT.HIDDEN)i=rR;else if(r$(e,t))if("DATALIST"===n||"SELECT"===n||"OPTGROUP"===n){if(!i.trim())return}else i="OPTION"===n?rR:rB(i);return i}}function rG(e){var t;return!(e&&e.trim())||(null==(t=window.$DD_ALLOW)?void 0:t.has(e.toLocaleLowerCase()))||!1}function rq({lifeCycle:e,isChildEvent:t,onChange:r=eh.l}){let n={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(13,e=>{var i;if("view"!==e.type&&"vital"!==e.type&&t(e))switch(e.type){case z.ERROR:n.errorCount+=1,r();break;case z.ACTION:n.actionCount+=1,e.action.frustration&&(n.frustrationCount+=e.action.frustration.type.length),r();break;case z.LONG_TASK:n.longTaskCount+=1,r();break;case z.RESOURCE:(null==(i=e._dd)?void 0:i.discarded)||(n.resourceCount+=1,r())}});return{stop:()=>{i.unsubscribe()},eventCounts:n}}let rH=5*b.iW;function rK(e){let t=(0,tD.qj)({expireDelay:rH}),r=new Map;function n(e){var t;r.delete(e.key),null==(t=e.eventCounts)||t.stop()}function i(){r.forEach(e=>{n(e)}),t.reset()}let o=e.subscribe(10,i);return{start:function(i,o,a,s){let l=M(),c=t.add(l,o.relative),u=r.get(i);u&&n(u);let d=(null==s?void 0:s.isChildEvent)?rq({lifeCycle:e,isChildEvent:s.isChildEvent(l)}):void 0,p={id:l,key:i,startClocks:o,data:a,historyEntry:c,eventCounts:d};return r.set(i,p),p},stop:function(e,t,i){var o;let a=r.get(e);if(!a)return;let s=i?(0,O.kg)(a.data,i):a.data;a.historyEntry.close(t.relative);let l=(0,b.vk)(a.startClocks.timeStamp,t.timeStamp),c=null==(o=a.eventCounts)?void 0:o.eventCounts;return n(a),{...s,id:a.id,startClocks:a.startClocks,duration:l,counts:c}},discard:function(e){var t;let i=r.get(e);if(!i)return;let o=null==(t=i.eventCounts)?void 0:t.eventCounts;return n(i),i.historyEntry.remove(),{...i.data,id:i.id,startClocks:i.startClocks,counts:o}},getCounts:function(e){var t,n;return null==(n=null==(t=r.get(e))?void 0:t.eventCounts)?void 0:n.eventCounts},findId:function(e){return t.findAll(e)},stopAll:function(){o.unsubscribe(),i(),t.stop()}}}let rJ=["HTML","BODY"],rW=2*eg._m,rZ=rg.concat(["role","type","disabled","readonly","tabindex","draggable","target","rel","download","method","action","enctype","autocomplete"]),rY=b.OY;function rX(e,t){let r=function(e,t){let r=e;for(;r;){if(r.matches(t))return r;r=ro(r)}return null}(e,`[${t}]`);
6if(r)return r3(r2(r.getAttribute(t).trim()))}let rQ=[(e,t,r)=>{if("labels"in e&&e.labels&&e.labels.length>0)return r5(e.labels[0],t,r)},e=>{if("INPUT"===e.nodeName){let t=e.getAttribute("type");if("button"===t||"submit"===t||"reset"===t)return{name:e.value,nameSource:"text_content"}}},(e,t,r)=>{if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return r5(e,t,r)},(e,t,r)=>r4(e,"aria-label",t,r),(e,t,r)=>{let n=e.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map(t=>(function(e,t){let r=e.getRootNode();if(r instanceof ShadowRoot){let e=r.getElementById(t);if(e)return e}return e.ownerDocument?e.ownerDocument.getElementById(t):null})(e,t)).filter(e=>!!e).map(e=>r6(e,t,r)).join(" "),nameSource:"text_content"}},(e,t,r)=>r4(e,"alt",t,r),(e,t,r)=>r4(e,"name",t,r),(e,t,r)=>r4(e,"title",t,r),(e,t,r)=>r4(e,"placeholder",t,r),(e,t,r)=>{if("options"in e&&e.options.length>0)return r5(e.options[0],t,r)}],r0=[(e,t,r)=>r5(e,t,r)];function r1(e,t,r,n){let i=e,o=0;for(;o<=10&&i&&"BODY"!==i.nodeName&&"HTML"!==i.nodeName&&"HEAD"!==i.nodeName;){for(let e of t){let t=e(i,r,n);if(t){let{name:e,nameSource:r}=t,n=e&&e.trim();if(n)return{name:r3(r2(n)),nameSource:r}}}if("FORM"===i.nodeName)break;i=ro(i),o+=1}}function r2(e){return e.replace(/\s+/g," ")}function r3(e){return e.length>100?`${V(e,100)} [...]`:e}function r4(e,t,r,n){let{enablePrivacyForActionName:i,defaultPrivacyLevel:o}=r,a=e.getAttribute(t);if(a&&i){var s;let i=rU(e,o,n);rV(e.tagName,t,a,i,r)&&(a=rG(s=a)?s:rf||rB(s))}else a||(a="");return{name:a,nameSource:"standard_attribute"}}function r5(e,t,r){return{name:r6(e,t,r)||"",nameSource:"text_content"}}function r6(e,t,r){if(e.isContentEditable)return;let{enablePrivacyForActionName:n,actionNameAttribute:i,defaultPrivacyLevel:o}=t;if((0,N.sr)(N.R9.USE_TREE_WALKER_FOR_ACTION_NAME)){var a=e,s=i,l=n,c=o,u=r;let t=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,function(e){let t=rU(e,c,u);if(l&&t&&r$(e,t))return NodeFilter.FILTER_REJECT;if(t7(e)){if(e.hasAttribute(rh)||s&&e.hasAttribute(s))return NodeFilter.FILTER_REJECT;let t=getComputedStyle(e);if("visible"!==t.visibility||"none"===t.display||t.contentVisibility&&"visible"!==t.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}),d="";for(;t.nextNode();){let e=t.currentNode;if(t7(e)){("BR"===e.nodeName||"P"===e.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(e).display))&&(d+=" ");continue}d+=e.textContent||""}return d.replace(/\s+/g," ").trim()}if("innerText"in e){let t=e.innerText,r=r=>{let n=e.querySelectorAll(r);for(let e=0;e<n.length;e+=1){let r=n[e];if("innerText"in r){let e=r.innerText;e&&e.trim().length>0&&(t=t.replace(e,""))}}};return r(`[${rh}]`),i&&r(`[${i}]`),n&&r(`${rL(rT.HIDDEN)}, ${rL(rT.MASK)}`),t}return e.textContent}function r8(){let e=window.getSelection();return!e||e.isCollapsed}function r9(e){return e.target instanceof Element&&!1!==e.isPrimary}function r7(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return"LABEL"===t.tagName&&t.hasAttribute("for")&&(t=document.getElementById(t.getAttribute("for"))),!t||!t.matches('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *')}let ne=10*b.OY,nt=new Map;function nr(e,t){nt.set(e,t),nt.forEach((e,t)=>{(0,b.vk)(t,(0,b.$S)())>ne&&nt.delete(t)})}function nn(e){return t=>void 0!==t.action&&void 0!==t.action.id&&t.action.id.includes(e)}function ni(e){if(e.composed&&re(e.target)&&"function"==typeof e.composedPath){let t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function no(e){var t,r,n,i;let o="events"in e,a=t8((0,b.Zj)(e.duration));return{rawRumEvent:{type:z.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...void 0!==a&&{loading_time:a},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...o?{_dd:{action:{target:{selector:(null==(t=e.target)?void 0:t.selector)||void 0,width:(null==(r=e.target)?void 0:r.width)||void 0,height:(null==(n=e.target)?void 0:n.height)||void 0,composed_path_selector:null==(i=e.target)?void 0:i.composedPathSelector},position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startClocks:e.startClocks,domainContext:o?{events:e.events}:{handlingStack:e.handlingStack}}}var na=r(17745);let ns={},nl={intervention:"intervention",cspViolation:"csp_violation"};function nc(e){return{startClocks:(0,b.M8)(),source:C.g.REPORT,handling:"unhandled",...e}}function nu(e,t,r,n,i){return r?(0,I.Yn)({name:e,message:t,stack:[{func:"?",url:r,line:null!=n?n:void 0,column:null!=i?i:void 0}]}):void 0}var nd=r(47304);let np=b.OY;function nh(){let e=[];function t(t){let n;if(!t||t.didTimeout){let e=performance.now();n=()=>30-(performance.now()-e)}else n=t.timeRemaining.bind(t);for(;n()>0&&e.length;)e.shift()();e.length&&r()}function r(){(0,nd.BB)(t,{timeout:np})}return{push(t){1===e.push(t)&&r()},stop(){e.length=0}}}let nf=new WeakSet;function ng(e){return(0,b.Gw)(e.startTime,e.duration)}var nm=r(80959);let ny=2*b.iW;function nv(e,t){let r=t&&Number(t);if(e&&r)return{traceId:e,traceTime:r}}function n_(e){if(e&&e.nodeType===Node.COMMENT_NODE){let t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function nb(){if(rs(g.NAVIGATION)){let e=performance.getEntriesByType(g.NAVIGATION)[0];if(e)return e}let e=function(){let e={},t=performance.timing;for(let r in t)if((0,eD.Et)(t[r])){let n=t[r];e[r]=0===n?0:(0,b.gs)(n)}return e}(),t={entryType:g.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function nw(e){return e.responseStart>=0&&e.responseStart<=(0,b.$S)()?e.responseStart:void 0}function nS(e,t){(0,nm.H)(e,"interactive",()=>{let e=(0,v.B)(nb)(),r=Object.assign(e.toJSON(),{entryType:g.RESOURCE,initiatorType:tF,duration:e.responseEnd,traceId:function(e){let t=function(e){let t=e.querySelector("meta[name=dd-trace-id]"),r=e.querySelector("meta[name=dd-trace-time]");return nv(t&&t.content,r&&r.content)}(e)||function(e){let t=function(e){for(let t=0;t<e.childNodes.length;t+=1){let r=n_(e.childNodes[t]);if(r)return r}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){let r=e.body.childNodes[t],n=n_(r);if(n)return n;if(!t9(r))break}}(e);if(t)return nv($(t,"trace-id"),$(t,"trace-time"))}(e);if(!(!t||t.traceTime<=(0,b.x3)()-ny))return t.traceId}(document),toJSON:()=>({...r,toJSON:void 0})});t(r)})}function nk(e,t,r,n){let i=tG(e)&&n?n.getMatchingRequest(e):void 0;return nC(e,i,r,t)}function nC(e,t,r,n){var i,o,a,s;if(!e&&!t)return;let l=t?function(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}(t,n):function(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:tQ(63).toString(),rule_psr:t.rulePsr}}}
6(e,n);if(!n.trackResources&&!l)return;let c=e?(0,b.FR)(e.startTime):t.startClocks,u=e?function(e){let{duration:t,startTime:r,responseEnd:n}=e;return 0===t&&r<n?(0,b.vk)(r,n):t}(e):(i=r,o=c,a=t.duration,i.wasInPageStateDuringPeriod("frozen",o.relative,a)?void 0:a),d=(0,N.sr)(N.R9.TRACK_RESOURCE_HEADERS)?function(e,t){let r=t.trackResourceHeaders;if(0===r.length||!e)return;let n=r.filter(t=>void 0===t.url||e9([t.url],e.url,!0));if(0===n.length)return;let i=n.filter(e=>void 0===e.location||"any"===e.location||"response"===e.location),o=n.filter(e=>void 0===e.location||"any"===e.location||"request"===e.location),a=i.length>0?function(e,t){if(e.type===tV.FETCH&&e.response)return nA(e.response.headers,t);if(e.type===tV.XHR&&e.xhr){let r=e.xhr.getAllResponseHeaders();if(r)try{return nA(new Headers(function(e){let t=[];for(let r of e.trim().split(/\r\n/)){let e=r.indexOf(":");e>0&&t.push([r.substring(0,e).trim(),r.substring(e+1).trim()])}return t}(r)),t)}catch(e){}}}(e,i):void 0,s=o.length>0?function(e,t){var r;let n;if(e.type===tV.FETCH)return(null==(r=e.init)?void 0:r.headers)?n=new Headers(e.init.headers):e.input instanceof Request&&(n=e.input.headers),n?nA(n,t):void 0}(e,o):void 0;if(a||s)return{resource:{request:s?{headers:s}:void 0,response:a?{headers:a}:void 0}}}(t,n):void 0,p=t&&function(e,t){let r=t4(e.url,t);if(r){let t=function(e,t=!1){let r;if("POST"===e.method?r=function(e){if(!e||"string"!=typeof e)return;let t=(0,et.XU)(e);if(t)return{query:t.query,operationName:t.operationName,variables:t.variables?JSON.stringify(t.variables):void 0}}(e.requestBody):"GET"===e.method&&(r=function(e){let t=(0,ef.c$)(e).searchParams,r=t.get("variables"),n=r&&void 0!==(0,et.XU)(r)?r:void 0;return{query:t.get("query")||void 0,operationName:t.get("operationName")||void 0,variables:n}}(e.url)),r)return function(e,t){let r,n,i;if(e.query){var o;let i=e.query.trim();r=null==(o=i.match(/^\s*(query|mutation|subscription)\b/i))?void 0:o[1],t&&(n=V(i,t3,"..."))}return e.variables&&(i=e.variables),{operationType:r,operationName:e.operationName,variables:i,payload:n}}(r,t)}(e,r.trackPayload);if(t){if(r.trackResponseErrors&&e.responseBody){let r=function(e){let t=(0,et.XU)(e);if(t&&"object"==typeof t){if((0,Q.EI)(t.errors))return t.errors.map(e=>{var t;return{message:e.message,path:e.path,locations:e.locations,code:null==(t=e.extensions)?void 0:t.code}})}}(e.responseBody);r&&(t.error_count=r.length,t.errors=r)}return t}return}}(t,n),h=e&&function(e){let t=e.contentType;if(t)return{resource:{response:{headers:{"content-type":t}}}}}(e),f=(0,O.kg)({date:c.timeStamp,resource:{id:M(),duration:(0,b.Zj)(u),type:t?t.type===tV.XHR?t$.XHR:t$.FETCH:function(e){let t=e.name;if(!(0,ef.AY)(t))return t$.OTHER;let r=(0,ef.L2)(t);for(let[t,n]of tB)if(n(e.initiatorType,r))return t;return t$.OTHER}(e),method:t?t.method:void 0,status_code:t?t.status:0===(s=e.responseStatus)?void 0:s,url:t?tZ(t.url):e.name,protocol:e&&(""===e.nextHopProtocol?void 0:e.nextHopProtocol),delivery_type:e&&(""===e.deliveryType?"other":e.deliveryType),graphql:p},type:z.RESOURCE,_dd:{discarded:!n.trackResources}},l,e&&function(e){let{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...function(e){if(e.startTime<e.responseStart){let{encodedBodySize:t,decodedBodySize:r,transferSize:n}=e;return{size:r,encoded_body_size:t,decoded_body_size:r,transfer_size:n}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}(e),...function(e){if(!tH(e))return;let{startTime:t,fetchStart:r,workerStart:n,redirectStart:i,redirectEnd:o,domainLookupStart:a,domainLookupEnd:s,connectStart:l,secureConnectionStart:c,connectEnd:u,requestStart:d,responseStart:p,responseEnd:h}=e,f={download:tK(t,p,h),first_byte:tK(t,d,p)};return 0<n&&n<r&&(f.worker=tK(t,n,r)),r<u&&(f.connect=tK(t,l,u),l<=c&&c<=u&&(f.ssl=tK(t,c,u))),r<s&&(f.dns=tK(t,a,s)),t<o&&(f.redirect=tK(t,i,o)),f}(e)}}}(e),h,d);return{startClocks:c,duration:u,rawRumEvent:f,domainContext:function(e,t){if(t){let r={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===tV.XHR?{xhr:t.xhr,...r}:{requestInput:t.input,requestInit:t.init,response:t.response,error:t.error,...r}}return{performanceEntry:e}}(e,t)}}let nE=/(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/;function nA(e,t){let r={},n=0,i=0,o=!1;return e.forEach((e,a)=>{if(i++,n>=100){o||(F.Vy.warn("Maximum number of headers (100) has been reached. Further headers are dropped."),o=!0);return}let s=a.toLowerCase();if(nE.test(s))return;let l=t.find(e=>e9([e.name],s));if(!l)return;let{extractor:c}=l,u=c?th(e,c):e;void 0!==u&&(u.length>128&&(F.Vy.warn(`Header "${s}" value was truncated from ${u.length} to 128 characters.`),(0,T.A2)("Resource header value was truncated",{header_name:s,original_length:u.length,limit:128})),r[s]=V(u,128),n++)}),o&&(0,T.A2)("Maximum number of resource headers reached",{collectedHeaderCount:n,totalHeaderCount:i}),n>0?r:void 0}let nI=10*b.iW,nx=10*b.iW;function nT(e,t,r=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:eh.l};if(rs(g.VISIBILITY_STATE)){let e=performance.getEntriesByType(g.VISIBILITY_STATE).filter(e=>"hidden"===e.name).find(e=>e.startTime>=t.relative);if(e)return{timeStamp:e.startTime,stop:eh.l}}let n=1/0,{stop:i}=(0,ee.l)(e,r,["pagehide","visibilitychange"],e=>{("pagehide"===e.type||"hidden"===document.visibilityState)&&(n=e.timeStamp,i())},{capture:!0});return{get timeStamp(){return n},stop:i}}let nP=e=>{let t=e.previousRect.width*e.previousRect.height;return t+e.currentRect.width*e.currentRect.height-((e,t)=>{let r=Math.max(e.left,t.left),n=Math.max(e.top,t.top),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom);return r>=i||n>=o?0:(i-r)*(o-n)})(e.previousRect,e.currentRect)};function nO({x:e,y:t,width:r,height:n}){return{x:e,y:t,width:r,height:n}}let nR=5*b.OY,nN=b.OY,nD=0,nL=1/0,nU=0,nM=()=>u?nD:window.performance.interactionCount||0,nj=+b.iW;function n$(e){return Math.min(e,nj)}
6function nV(){let e=window.visualViewport;return Math.round(e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0)}function nF(){let e=window.visualViewport;return Math.round(e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0)}function nB(e){var t;return d||(t=e,d=new m.cP(e=>{let{throttled:r}=(0,eh.n)(()=>{e.notify(nz())},200);return(0,ee.q)(t,window,"resize",r,{capture:!0,passive:!0}).stop})),d}function nz(){let e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}let nG=b.OY,nq=5*b.iW,nH=5*b.iW;function nK(e){let t=e.indexOf("?");return t<0?e:e.slice(0,t)}let nJ=b.iW,nW=e$.AQ,nZ=[];async function nY(e){let t,r,n=e.sessionStoreStrategyType;n&&(n.type===e$.Q_.COOKIE?(t=eJ(n.cookieOptions,e),r={cookie:await nX(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):t=eY(),(0,T.A2)("Unexpected session state",{sessionStoreStrategyType:n.type,session:t,isSyntheticsTest:!!eO(),createdTimestamp:null==t?void 0:t.created,expireTimestamp:null==t?void 0:t.expire,...r}))}async function nX(){let e;return{count:(e="cookieStore"in window?await window.cookieStore.getAll(eM):document.cookie.split(/\s*;\s*/).filter(e=>e.startsWith(eM))).length,domain:eC()||"undefined",...e}}var nQ=r(55630),n0=r(46676),n1=r(67540);let n2=e$.AQ;function n3(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}let n4=e$.AQ,n5=10*b.OY;function n6(){0!==p.batchCount&&((0,T.Gk)("Customer data measures",p),n7())}function n8(){return{min:1/0,max:0,sum:0}}function n9(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function n7(){p={batchCount:0,batchBytesCount:n8(),batchMessagesCount:n8()}}let ie=e$.AQ;function it(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}let ir=b.OY;
6function ii(e,t){let r=$(document.cookie,e),n=(0,eL.yb)(()=>{let n=$(document.cookie,e);n!==r&&(r=n,t(n))},ir);return()=>{(0,eL.vG)(n)}}let io="datadog-ci-visibility-test-execution-id";function ia(e,t,r=3e3){let n=0,i=!1;return{isLimitReached(){if(0===n&&(0,eL.wg)(()=>{n=0},b.iW),(n+=1)<=r||i)return i=!1,!1;if(n===r+1){i=!0;try{t({message:`Reached max number of ${e}s by minute: ${r}`,source:C.g.AGENT,startClocks:(0,b.M8)()})}finally{i=!1}}return!0}}}var is=r(87780);function il(e){return"object"===(0,ei.P)(e)}let ic={"view.name":"string","view.url":"string","view.referrer":"string"},iu={context:"object"},id={service:"string",version:"string"};var ip=r(4328);let ih=[z.ACTION,z.ERROR,z.LONG_TASK,z.RESOURCE,z.VITAL];function ig(e,t,r,n,i,o,a,c,d,y,S){let E=[],A=new tN;A.subscribe(13,e=>(0,tx.b)("rum",e));let P=e=>{A.notify(14,{error:e}),(0,T.A2)("Error reported to customer",{"error.message":e.message})},D=(0,tT._T)(e),L=(0,ep.d0)()?function(){let e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:+!!(0,ep.Ww)("records")};return{findTrackedSession:()=>e,expire:eh.l,expireObservable:new m.cP,setForcedReplay:eh.l}}():function(e,t,r){let n=function(e,t,r,n){let i=new m.cP,o=new m.cP,a=function(e,t,r,n,i=function(e,t){return e.type===e$.Q_.COOKIE?function(e,t){let r={isLockEnabled:(0,eU.F2)(),persistSession:r=>eK(t,e,r,e$.HB),retrieveSession:()=>eJ(t,e),expireSession:r=>eK(t,e,eF(r,e),e$.AQ)};if(!ek(eM)){let e=ek("_dd"),t=ek("_dd_r"),n=ek("_dd_l"),i={};e&&(i.id=e),n&&/^[01]$/.test(n)&&(i.logs=n),t&&/^[012]$/.test(t)&&(i.rum=t),eB(i)||(eG(i),r.persistSession(i))}return r}(t,e.cookieOptions):e.type===e$.Q_.LOCAL_STORAGE?{isLockEnabled:!1,persistSession:eZ,retrieveSession:eY,expireSession:e=>(function(e,t){eZ(eF(e,t))})(e,t)}:{expireSession:e=>(function(e,t){e5(eF(e,t))})(e,t),isLockEnabled:!1,persistSession:e5,retrieveSession:e4}}(e,t)){let o,a=new m.cP,s=new m.cP,l=new m.cP,c=(0,eL.yb)(function(){let e=i.retrieveSession();ez(e)?e0({process:e=>ez(e)?eF(e,t):void 0,after:p},i):p(e)},e6);h();let{throttled:u,cancel:d}=(0,eh.n)(()=>{e0({process:e=>{if(eB(e))return;let i=p(e);return function(e){if(eB(e))return;let i=n(e.rum);e[r]=i,delete e.isExpired,i===e$.gB||e.id||(e.id=M(),e.created=String((0,b.x3)())),t.trackAnonymousUser&&!e.anonymousId&&(e.anonymousId=M())}(i),i},after:e=>{eB(e)||f()||(o=e,a.notify()),o=e}},i)},e6);function p(e){var n;return ez(e)&&(e=eF(e,t)),f()&&((n=e,o.id!==n.id||o[r]!==n[r])?(o=eF(o,t),s.notify()):(l.notify({previousState:o,newState:e}),o=e)),e}function h(){e0({process:e=>{if(eB(e))return e.anonymousId=M(),eF(e,t)},after:e=>{o=e}},i)}function f(){return(null==o?void 0:o[r])!==void 0}return{expandOrRenewSession:u,expandSession:function(){e0({process:e=>f()?p(e):void 0},i)},getSession:()=>o,renewObservable:a,expireObservable:s,sessionStateUpdateObservable:l,restartSession:h,expire:e=>{d(),!1===e&&o&&delete o.anonymousId,i.expireSession(o),p(eF(o,t))},stop:()=>{(0,eL.vG)(c)},updateSessionState:function(e){e0({process:t=>({...t,...e}),after:p},i)}}}(e.sessionStoreStrategyType,e,"rum",r);nZ.push(()=>a.stop());let s=(0,tD.qj)({expireDelay:nW});function l(){let t=a.getSession();return t?{id:t.id,trackingType:t.rum,isReplayForced:!!t.forcedReplay,anonymousId:t.anonymousId}:(nY(e).catch(()=>void 0),{id:"invalid",trackingType:e$.gB,isReplayForced:!1,anonymousId:void 0})}return nZ.push(()=>s.stop()),a.renewObservable.subscribe(()=>
6{s.add(l(),(0,b.$S)()),i.notify()}),a.expireObservable.subscribe(()=>{o.notify(),s.closeActive((0,b.$S)())}),a.expandOrRenewSession(),s.add(l(),(0,b.Oc)().relative),n.observable.subscribe(()=>{n.isGranted()?a.expandOrRenewSession():a.expire(!1)}),function(e,t){let{stop:r}=(0,ee.l)(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0});nZ.push(r)}(e,()=>{n.isGranted()&&a.expandOrRenewSession()}),function(e,t){let r=()=>{"visible"===document.visibilityState&&t()},{stop:n}=(0,ee.q)(e,document,"visibilitychange",r);nZ.push(n);let i=(0,eL.yb)(r,nJ);nZ.push(()=>{(0,eL.vG)(i)})}(e,()=>a.expandSession()),function(e,t){let{stop:r}=(0,ee.q)(e,window,"resume",t,{capture:!0});nZ.push(r)}(e,()=>a.restartSession()),{findSession:(e,t)=>s.find(e,t),renewObservable:i,expireObservable:o,sessionStateUpdateObservable:a.sessionStateUpdateObservable,expire:a.expire,updateSessionState:a.updateSessionState}}(e,"rum",t=>{var r,n,i;return r=e,"0"===(i=n=t)||"1"===i||"2"===i?n:(0,eD.ic)(r.sessionSampleRate)?(0,eD.ic)(r.sessionReplaySampleRate)?"1":"2":"0"},r);return n.expireObservable.subscribe(()=>{t.notify(9)}),n.renewObservable.subscribe(()=>{t.notify(10)}),n.sessionStateUpdateObservable.subscribe(({previousState:e,newState:t})=>{if(!e.forcedReplay&&t.forcedReplay){let e=n.findSession();e&&(e.isReplayForced=!0)}}),{findTrackedSession:e=>{let t=n.findSession(e);if(t&&"0"!==t.trackingType)return{id:t.id,sessionReplay:"1"===t.trackingType?1:2*!!t.isReplayForced,anonymousId:t.anonymousId}},expire:n.expire,expireObservable:n.expireObservable,setForcedReplay:()=>n.updateSessionState({forcedReplay:"1"})}}(e,A,o);if((0,ep.d0)()){var U;let e=(0,ep.Y9)();A.subscribe(13,t=>{e.send("rum",t)});let t=D.subscribe(e=>{A.notify(11,e)});E.push(()=>t.unsubscribe())}else{let t=function(e,t,r,n,i,o){let a=[e.rumEndpointBuilder];e.replica&&a.push(e.replica.rumEndpointBuilder);let s=(0,nQ.X)({encoder:o(2),request:(0,n0.sA)(a,r),flushController:(0,n1.tO)({pageMayExitObservable:n,sessionExpireObservable:i})});return t.subscribe(13,e=>{e.type===z.VIEW?s.upsert(e,e.view.id):s.add(e)}),s}(e,A,P,D,L.expireObservable,i),r=t.flushController.preparePageExitFlushObservable.subscribe(e=>{A.notify(11,{reason:e})});E.push(()=>r.unsubscribe()),E.push(()=>t.stop()),U=t.flushController.flushObservable,d.metricsEnabled&&(n7(),h=!1,A.subscribe(13,()=>{h=!0}),U.subscribe(({bytesCount:e,messagesCount:t})=>{h&&(h=!1,p.batchCount+=1,n9(p.batchBytesCount,e),n9(p.batchMessagesCount,t))}),(0,eL.yb)(n6,n5))}y.register(1,()=>o.isGranted()?ec.$O:ec.ug);let{stop:j}=function(e,t){if(!t.metricsEnabled)return{stop:eh.l};let{unsubscribe:r}=e.subscribe(4,({initialViewMetrics:e})=>{var t,n;e.largestContentfulPaint&&e.navigationTimings&&((0,T.Gk)("Initial view metrics",{metrics:(t=e.largestContentfulPaint,n=e.navigationTimings,{lcp:{value:t.value},navigation:{domComplete:n.domComplete,domContentLoaded:n.domContentLoaded,domInteractive:n.domInteractive,firstByte:n.firstByte,loadEvent:n.loadEvent}})}),r())});return{stop:r}}(A,d);E.push(j);let{stop:$,...B}=function(e,t,r,n,i,o,a,c,d,p){var h,y,S,E;let A,P=[],D=function(){let e=tR();return new m.cP(t=>{if(!e)return;let r=new e((0,x.dm)(e=>t.notify(e)));return r.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>r.disconnect()})}(),L=(A=(0,et.yG)(location),new m.cP(e=>{var t,n;let{stop:i}=function(e,t){let{stop:r}=(0,_.H)(n3("pushState"),"pushState",({onPostCall:e})=>{e(t)}),{stop:n}=(0,_.H)(n3("replaceState"),"replaceState",({onPostCall:e})=>{e(t)}),{stop:i}=(0,ee.q)(e,window,"popstate",t);return{stop:()=>{r(),n(),i()}}}(r,a),{stop:o}=(t=r,n=a,(0,ee.q)(t,window,"hashchange",n));function a(){if(A.href===location.href)return;let t=(0,et.yG)(location);e.notify({newLocation:t,oldLocation:A}),A=t}return()=>{i(),o()}})),{observable:U,stop:j}=function(){let e=new m.cP,{stop:t}=(0,_.H)(window,"open",()=>e.notify());return{observable:e,stop:t}}();P.push(j),t.register(0,({eventType:e})=>{let t=r.source;return{type:e,_dd:{format_version:2,drift:(0,b.TP)(),configuration:{session_sample_rate:(0,eD.LI)(r.sessionSampleRate,3),session_replay_sample_rate:(0,eD.LI)(r.sessionReplaySampleRate,3),profiling_sample_rate:(0,eD.LI)(r.profilingSampleRate,3),trace_sample_rate:(0,eD.LI)(r.traceSampleRate,3),beta_encode_cookie_options:r.betaEncodeCookieOptions},browser_sdk_version:(0,ep.d0)()?"6.33.0":void 0,sdk_name:d},application:{id:r.applicationId},date:(0,b.nx)(),source:t}}),t.register(1,()=>({application:{id:r.applicationId}}));let $=function(e,t,r=500){let n,i=(0,tD.qj)({expireDelay:ie,maxEntries:4e3});rs(g.VISIBILITY_STATE)&&performance.getEntriesByType(g.VISIBILITY_STATE).forEac
6h(e=>{a("hidden"===e.name?"hidden":"active",e.startTime)}),a(it(),(0,b.$S)());let{stop:o}=(0,ee.l)(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],e=>{var t;a("freeze"===(t=e).type?"frozen":"pagehide"===t.type?t.persisted?"frozen":"terminated":it(),e.timeStamp)},{capture:!0});function a(e,t=(0,b.$S)()){e!==n&&(n=e,i.closeActive(t),i.add({state:n,startTime:t},t))}function s(e,t,r){return i.findAll(t,r).some(t=>t.state===e)}return e.register(0,({startTime:e,duration:t=0,eventType:n})=>n===z.VIEW?{type:n,_dd:{page_states:function(e,t,r){if(0!==e.length)return e.slice(-r).reverse().map(({state:e,startTime:r})=>({state:e,start:(0,b.Zj)((0,b.vk)(t,r))}))}(i.findAll(e,t),e,r)}}:n===z.ACTION||n===z.ERROR?{type:n,view:{in_foreground:s("active",e,0)}}:ec.$O),{wasInPageStateDuringPeriod:s,addPageState:a,stop:()=>{o(),i.stop()}}}(t,r);P.push(()=>$.stop());let B=function(e){let t=(0,tD.qj)({expireDelay:tL});return e.subscribe(1,e=>{var r;t.add({service:(r=e).service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks},e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{let r=t.find(e.startClocks.relative);r&&(e.name&&(r.name=e.name),e.context&&(r.context=e.context),r.sessionIsActive=e.sessionIsActive)}),e.subscribe(10,()=>{t.reset()}),{findView:e=>t.find(e),stop:()=>{t.stop()}}}(e);P.push(()=>B.stop());let X=function(e,t,r){let n,i=(0,tD.qj)({expireDelay:n2});e.subscribe(1,({startClocks:e,url:t})=>{let r=(0,v.B)(location).href,o=void 0!==t?(0,ef.c$)(t,r).href:r;i.add(a({url:o,referrer:n||document.referrer}),e.relative),n=o}),e.subscribe(6,({endClocks:e})=>{i.closeActive(e.relative)});let o=r.subscribe(({newLocation:e})=>{let t=i.find();if(t){let r=(0,b.$S)();i.closeActive(r),i.add(a({url:e.href,referrer:t.referrer}),r)}});function a({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(0,({startTime:e,eventType:t})=>{let r=i.find(e);return r?{type:t,view:{url:r.url,referrer:r.referrer}}:ec.ug}),{findUrl:e=>i.find(e),stop:()=>{o.unsubscribe(),i.stop()}}}(e,t,L);P.push(()=>X.stop());let Q=function(e,t,r){let n=(0,tD.qj)({expireDelay:n4});return e.subscribe(1,({startClocks:e})=>{n.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{n.closeActive(e.relative)}),t.register(0,({startTime:e,eventType:t})=>{if(!r.trackFeatureFlagsForEvents.concat([z.VIEW,z.ERROR]).includes(t))return ec.$O;let i=n.find(e);return!i||(0,et.RI)(i)?ec.$O:{type:t,feature_flags:i}}),{addFeatureFlagEvaluation:(e,t)=>{let r=n.find();r&&(r[e]=t)}}}(e,t,r);t.register(0,({eventType:e,startTime:t})=>{let r,o,a,s=n.findTrackedSession(t),l=B.findView(t);return s&&l?(e===z.VIEW?(r=!!i.getReplayStats(l.id)||void 0,o=1===s.sessionReplay,a=!!l.sessionIsActive&&void 0):r=!!i.isRecording()||void 0,{type:e,session:{id:s.id,type:"user",has_replay:r,sampled_for_replay:o,is_active:a}}):ec.ug}),t.register(1,({startTime:e})=>{let t=n.findTrackedSession(e);return t?{session:{id:t.id}}:ec.$O}),t.register(0,({eventType:e})=>({type:e,connectivity:(0,ip.q)()}));let er=(s||(s=null!=(S=function(){try{let e=sessionStorage.getItem(tP);if(e)return e;let t=M();return sessionStorage.setItem(tP,t),t}catch(e){return}}())?S:M()),s);t.register(0,()=>({tab:{id:er}}));let eo=function(e,t,r,n){let i=el();return t.storeContextsAcrossPages&&en(t,i,"rum",2),e.register(0,()=>{let e=i.getContext();return n?{context:e}:e}),i}(t,r,0,!0),ea=function(e,t,r,n){let i=eu();return t.storeContextsAcrossPages&&en(t,i,"rum",1),e.register(0,({eventType:e,startTime:n})=>{let o=i.getContext(),a=r.findTrackedSession(n);return(a&&a.anonymousId&&!o.anonymous_id&&t.trackAnonymousUser&&(o.anonymous_id=a.anonymousId),(0,et.RI)(o))?ec.$O:{type:e,usr:o}}),e.register(1,({startTime:e})=>{var t;return{anonymous_id:null==(t=r.findTrackedSession(e))?void 0:t.anonymousId}}),i}(t,r,n,0),eg=function(e,t,r){let n=ed();return t.storeContextsAcrossPages&&en(t,n,"rum",4),e.register(0,()=>{let e=n.getContext();return(0,et.RI)(e)||!e.id?ec.$O:{account:e}}),n}(t,r,0),em=function(e,t,r,n,i){let o,{unsubscribe:a}=e.subscribe(0,t=>{e.notify(12,no(t))}),s=eh.l;i.trackUserInteractions&&(o=function(e,t,r,n){let i,o=rK(e),a=new m.cP;e.subscribe(5,c),e.subscribe(11,c);let{stop:s}=function(e,{onPointerDown:t,onPointerUp:r}){let n,i,o={selection:!1,input:!1,scroll:!1},a=[(0,ee.q)(e,window,"pointerdown",e=>{r9(e)&&(n=r8(),o={selection:!1,input:!1,scroll:!1},i=t(e))},{capture:!0}),(0,ee.q)(e,window,"selectionchange",()=>{n&&r8()||(o.selection=!0)},{capture:!0}),(0,ee.q)(e,window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),(0,ee.q)(e,window,"pointerup",e=>
6{if(r9(e)&&i){let t=o;r(i,e,()=>t),i=void 0}},{capture:!0}),(0,ee.q)(e,window,"input",()=>{o.input=!0},{capture:!0})];return{stop:()=>{a.forEach(e=>e.stop())}}}(n,{onPointerDown:i=>(function(e,t,r,n,i){let o,a=e.betaTrackActionsInShadowDom?ni(n):n.target;if((o=e.enablePrivacyForActionName?rU(a,e.defaultPrivacyLevel):rT.ALLOW)===rT.HIDDEN)return;let s=function(e,t,r){let n=r.betaTrackActionsInShadowDom?ni(e):e.target,i=n.getBoundingClientRect(),o=rv(n,r.actionNameAttribute),a=function(e,t){let r=e.filter(e=>e instanceof Element&&!rJ.includes(e.tagName));if(0===r.length)return"";let n=t?[t].concat(rZ):rZ,i="";for(let e of r)if((i+=function(e,t){let r=rw(e),n=rb(e),i=Array.from(e.classList).filter(e=>!r_(e)).sort().map(e=>`.${CSS.escape(e)}`).join(""),o=function(e,t){let r=[];for(let n of Array.from(e.attributes))t.includes(n.name)&&r.push(rk(n.name,n.value));return r.sort().join("")}(e,t),a=function(e){let t=Array.from(e.parentNode.children);if(t.length<=1)return"";let r=t.filter(t=>t.tagName===e.tagName),n=t.indexOf(e),i=rC(e);return`:nth-child(${n+1})${r.length>1?`:nth-of-type(${i})`:""}`}(e);return`${r}${n||""}${o}${i}${a};`}(e,n)).length>=rW)return V(i,rW);return i}(e.composedPath(),r.actionNameAttribute);o&&nr(e.timeStamp,o);let{name:s,nameSource:l}=function(e,t,r=rT.ALLOW){let n=new Map,{actionNameAttribute:i}=t,o=rX(e,rh)||i&&rX(e,i);return o?{name:o,nameSource:"custom_attribute"}:r===rT.MASK?{name:rf,nameSource:"mask_placeholder"}:r1(e,rQ,t,n)||r1(e,r0,t,n)||{name:"",nameSource:"blank"}}(n,r,t);return{type:H.CLICK,target:{width:Math.round(i.width),height:Math.round(i.height),selector:o,composedPathSelector:a||void 0},position:{x:Math.round(e.clientX-i.left),y:Math.round(e.clientY-i.top)},name:s,nameSource:l}}(n,o,e),l=!1;return rc(t,r,i,e,e=>{l=e.hadActivity},100),{clickActionBase:s,hadActivityOnPointerDown:()=>l}})(n,e,t,i,r),onPointerUp:({clickActionBase:i,hadActivityOnPointerDown:s},c,u)=>{!function(e,t,r,n,i,o,a,s,l,c,u){var d;let p=function e(t,r,n,i,o){let a,s=M(),l=(0,b.FR)(o.timeStamp),c=r.start(s,l,i,{isChildEvent:nn});t.notify(15,c);let u=0,d=[],p=new m.cP;function h(e){0===u&&(u=1,a=e?r.stop(s,(0,b.jR)(e)):r.discard(s),p.notify())}return{event:o,stop:h,stopObservable:p,get hasError(){var f;let e=null!=(f=null==a?void 0:a.counts)?f:r.getCounts(s);return!!e&&e.errorCount>0},get hasPageActivity(){return a&&"duration"in a},getUserActivity:n,addFrustration:e=>{d.push(e)},get startClocks(){return l},isStopped:()=>1===u||2===u,clone:()=>e(t,r,n,i,o),validate:e=>{if(h(),1!==u||!a)return;let r={frustrationTypes:d,events:null!=e?e:[o],event:o,...a,counts:a.counts};t.notify(0,r),u=2},discard:()=>{h(),u=2}}}(t,i,c,s,l);a(p);let h=null==(d=null==s?void 0:s.target)?void 0:d.selector;h&&nr(l.timeStamp,h);let{stop:f}=rc(t,r,n,e,e=>{e.hadActivity&&e.end<p.startClocks.timeStamp?p.discard():e.hadActivity?p.stop(e.end):u()?p.stop(p.startClocks.timeStamp):p.stop()},ne),g=t.subscribe(5,({endClocks:e})=>{p.stop(e.timeStamp)}),y=t.subscribe(11,()=>{p.stop((0,b.nx)())}),v=o.subscribe(()=>{p.stop()});p.stopObservable.subscribe(()=>{y.unsubscribe(),g.unsubscribe(),f(),v.unsubscribe()})}(n,e,t,r,o,a,l,i,c,u,s)}});return{stop:()=>{c(),a.notify(),s(),o.stopAll()},findActionId:o.findId};function l(e){if(!i||!i.tryAppend(e)){let t=e.clone();i=function(e,t){let r,n=[],i=0;function o(e){e.stopObservable.subscribe(a),n.push(e),(0,eL.DJ)(r),r=(0,eL.wg)(s,rY)}function a(){1===i&&n.every(e=>e.isStopped())&&(i=2,t(n))}function s(){(0,eL.DJ)(r),0===i&&(i=1,a())}return o(e),{tryAppend:e=>{var t,r,a,l;return 0===i&&(!(n.length>0)||(t=n[n.length-1].event,r=e.event,t.target===r.target&&100>=(a=t,l=r,Math.sqrt(Math.pow(a.clientX-l.clientX,2)+Math.pow(a.clientY-l.clientY,2)))&&t.timeStamp-r.timeStamp<=rY)?(o(e),!0):(s(),!1))},stop:()=>{s()}}}(e,e=>{(function(e,t){let{isRage:r}=function(e,t){if(function(e){if(e.some(e=>e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;t<e.length-2;t+=1)if(e[t+3-1].event.timeStamp-e[t].event.timeStamp<=b.OY)return!0;return!1}(e))return t.addFrustration(K.RAGE_CLICK),e.some(r7)&&t.addFrustration(K.DEAD_CLICK),t.hasError&&t.addFrustration(K.ERROR_CLICK),{isRage:!0};let r=e.some(e=>e.getUserActivity().selection);
6return e.forEach(e=>{e.hasError&&e.addFrustration(K.ERROR_CLICK),r7(e)&&!r&&e.addFrustration(K.DEAD_CLICK)}),{isRage:!1}}(e,t);r?(e.forEach(e=>e.discard()),t.stop((0,b.nx)()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))})(e,t),i=void 0})}}function c(){i&&i.stop()}}(e,r,n,i));let l=function(e,t){let r=rK(e);return{addAction:function(e){t({id:M(),frustrationTypes:[],...e})},startAction:function(t,n={},i=(0,b.M8)()){var o;let a=null!=(o=n.actionKey)?o:t,s=r.start(a,i,{name:t,...n},{isChildEvent:nn});e.notify(15,s)},stopAction:function(e,n={},i=(0,b.M8)()){var o;let a=null!=(o=n.actionKey)?o:e,s=r.stop(a,i,n);if(!s)return;let l=[];s.counts&&s.counts.errorCount>0&&l.push(K.ERROR_CLICK),t({...s,type:s.type||H.CUSTOM,frustrationTypes:l})},findActionId:r.findId,stop:r.stopAll}}(e,t=>{e.notify(12,no(t))}),c={findActionId:e=>{var t;let r=l.findActionId(e),n=null!=(t=null==o?void 0:o.findActionId(e))?t:[];return r.concat(n)}};return t.register(0,({startTime:e,eventType:t})=>{if(t!==z.ERROR&&t!==z.RESOURCE&&t!==z.LONG_TASK)return ec.$O;let r=t===z.LONG_TASK?(0,b.Gw)(e,1):e,n=c.findActionId(r);return n.length?{type:t,action:{id:n}}:ec.$O}),t.register(1,({startTime:e})=>({action:{id:c.findActionId(e)}})),{addAction:l.addAction,startAction:l.startAction,stopAction:l.stopAction,actionContexts:c,stop:()=>{a(),s(),l.stop(),null==o||o.stop()}}}(e,t,D,U,r);P.push(em.stop);let ey={addEvent:(t,r,n,i)=>{ih.includes(r.type)&&e.notify(12,{startClocks:(0,b.FR)(t),rawRumEvent:r,domainContext:n,duration:i})}},ev=function(e,t){let r,n=requestAnimationFrame((0,x.dm)(()=>{r=nz()})),i=nB(t).subscribe(e=>{r=e}).unsubscribe;return e.register(0,({eventType:e})=>({type:e,display:r?{viewport:r}:void 0})),{stop:()=>{i(),n&&cancelAnimationFrame(n)}}}(t,r);P.push(ev.stop);let eb=function(e,t,r=function(e,t){let r=window.cookieStore?function(e){return(t,r)=>(0,ee.q)(e,window.cookieStore,"change",e=>{let n=e.changed.find(e=>e.name===t)||e.deleted.find(e=>e.name===t);n&&r(n.value)}).stop}(e):ii;return new m.cP(e=>r(t,t=>e.notify(t)))}(e,io)){var n;let i=ek(io)||(null==(n=window.Cypress)?void 0:n.env("traceId")),o=r.subscribe(e=>{i=e});return t.register(0,({eventType:e})=>"string"!=typeof i?ec.$O:{type:e,session:{type:"ci_test"},ci_test:{test_execution_id:i}}),{stop:()=>{o.unsubscribe()}}}(r,t);P.push(eb.stop),t.register(0,({eventType:e})=>eO()?{type:e,session:{type:"synthetics"},synthetics:{...eO(),injected:eP()}}:ec.$O),f={[z.VIEW]:{"view.performance.lcp.resource_url":"string",...iu,...ic,...id},[z.ERROR]:{"error.message":"string","error.stack":"string","error.handling_stack":"string","error.resource.url":"string","error.fingerprint":"string",...iu,...ic,...id},[z.RESOURCE]:{"resource.url":"string","resource.graphql.variables":"string","resource.request.headers":"object","resource.response.headers":"object",...iu,...ic,...id},[z.ACTION]:{"action.target.name":"string",...iu,...ic,...id},[z.LONG_TASK]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...iu,...ic,...id},[z.VITAL]:{...iu,...ic,...id}};let ew={[z.ERROR]:ia(z.ERROR,p,void 0),[z.ACTION]:ia(z.ACTION,p,E),[z.VITAL]:ia(z.VITAL,p,E)};e.subscribe(12,({startClocks:n,duration:i,rawRumEvent:o,domainContext:a})=>{let s=t.triggerHook(0,{eventType:o.type,rawRumEvent:o,domainContext:a,startTime:n.relative,duration:i});if(s===ec.ug)return;let l=(0,O.kg)(s,o,{ddtags:(0,is.m5)(r).join(",")});(function(e,t,r,n){var i;if(t){let n=function(e,t,r){let n=(0,O.Go)(e),i=r(n);return(0,ej.WP)(t).forEach(([t,r])=>(function e(t,r,n,i){let[o,...a]=n;if("[]"===o){Array.isArray(t)&&Array.isArray(r)&&t.forEach((t,n)=>e(t,r[n],a,i));return}if(il(t)&&il(r)){if(a.length>0)return e(t[o],r[o],a,i);!function(e,t,r,n){if(e[t]===r)return;let i=(0,ei.P)(r);i===n?e[t]=(0,R.a)(r):"object"===n&&("undefined"===i||"null"===i)&&(e[t]={})}(t,o,r[o],i)}})(e,n,t.split(/\.|(?=\[\])/),r)),i}(e,f[e.type],e=>t(e,r));if(!1===n&&e.type!==z.VIEW)return!1;!1===n&&F.Vy.warn("Can't dismiss view events using beforeSend!")}return!(null==(i=n[e.type])?void 0:i.isLimitReached())})(l,r.beforeSend,a,ew)&&((0,et.RI)(l.context)&&delete l.context,e.
6notify(13,l))});let{addTiming:eS,setLoadingTime:eC,startView:eE,setViewName:eA,setViewContext:eI,setViewContextProperty:ex,getViewContext:eT,stop:eR}=(e.subscribe(4,t=>e.notify(12,function(e,t,r){var n,i,o,a,s,l,c,u,d,p,h,f,g,m,y,v,_,w;let S=r.getReplayStats(e.id),k=null==(i=null==(n=e.commonViewMetrics)?void 0:n.cumulativeLayoutShift)?void 0:i.devicePixelRatio,C={_dd:{document_version:e.documentVersion,replay_stats:S,cls:k?{device_pixel_ratio:k}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:z.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:null==(o=e.commonViewMetrics.cumulativeLayoutShift)?void 0:o.value,cumulative_layout_shift_time:(0,b.Zj)(null==(a=e.commonViewMetrics.cumulativeLayoutShift)?void 0:a.time),cumulative_layout_shift_target_selector:null==(s=e.commonViewMetrics.cumulativeLayoutShift)?void 0:s.targetSelector,first_byte:(0,b.Zj)(null==(l=e.initialViewMetrics.navigationTimings)?void 0:l.firstByte),dom_complete:(0,b.Zj)(null==(c=e.initialViewMetrics.navigationTimings)?void 0:c.domComplete),dom_content_loaded:(0,b.Zj)(null==(u=e.initialViewMetrics.navigationTimings)?void 0:u.domContentLoaded),dom_interactive:(0,b.Zj)(null==(d=e.initialViewMetrics.navigationTimings)?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:(0,b.Zj)(e.initialViewMetrics.firstContentfulPaint),first_input_delay:(0,b.Zj)(null==(p=e.initialViewMetrics.firstInput)?void 0:p.delay),first_input_time:(0,b.Zj)(null==(h=e.initialViewMetrics.firstInput)?void 0:h.time),first_input_target_selector:null==(f=e.initialViewMetrics.firstInput)?void 0:f.targetSelector,interaction_to_next_paint:(0,b.Zj)(null==(g=e.commonViewMetrics.interactionToNextPaint)?void 0:g.value),interaction_to_next_paint_time:(0,b.Zj)(null==(m=e.commonViewMetrics.interactionToNextPaint)?void 0:m.time),interaction_to_next_paint_target_selector:null==(y=e.commonViewMetrics.interactionToNextPaint)?void 0:y.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:(0,b.Zj)(null==(v=e.initialViewMetrics.largestContentfulPaint)?void 0:v.value),largest_contentful_paint_target_selector:null==(_=e.initialViewMetrics.largestContentfulPaint)?void 0:_.targetSelector,load_event:(0,b.Zj)(null==(w=e.initialViewMetrics.navigationTimings)?void 0:w.loadEvent),loading_time:t8((0,b.Zj)(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:function({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:r,firstInput:n,largestContentfulPaint:i}){return{cls:e&&{score:e.value,timestamp:(0,b.Zj)(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:r&&{timestamp:(0,b.Zj)(r)},fid:n&&{duration:(0,b.Zj)(n.delay),timestamp:(0,b.Zj)(n.time),target_selector:n.targetSelector},inp:t&&{duration:(0,b.Zj)(t.value),timestamp:(0,b.Zj)(t.time),target_selector:t.targetSelector,sub_parts:t.subParts?{input_delay:(0,b.Zj)(t.subParts.inputDelay),processing_duration:(0,b.Zj)(t.subParts.processingDuration),presentation_delay:(0,b.Zj)(t.subParts.presentationDelay)}:void 0},lcp:i&&{timestamp:(0,b.Zj)(i.value),target_selector:i.targetSelector,resource_url:i.resourceUrl,sub_parts:i.subParts?{load_delay:(0,b.Zj)(i.subParts.loadDelay),load_time:(0,b.Zj)(i.subParts.loadTime),render_delay:(0,b.Zj)(i.subParts.renderDelay)}:void 0}}}(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:(0,b.Zj)(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:(0,b.Zj)(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:function(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}()}};return(0,et.RI)(e.customTimings)||(C.view.custom_timings=(0,et.LG)(e.customTimings,b.Zj)),{rawRumEvent:C,startClocks:e.startClocks,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}(t,r,i))),t.register(0,({startTime:e,eventType:t})=>{let r=B.findView(e);return r?{type:t,service:r.service,version:r.version,context:r.context,view:{id:r.id,name:r.name}}:ec.ug}),t.register(1,({startTime:e})=>{var t;return{view:{id:null==(t=B.findView(e))?void 0:t.id}}}),function(e,t,r,n,i,o,a){let s,l,c=new Set,d=p(q.INITIAL_LOAD,(0,b.Oc)(),a);function p(i,o,a){let s=function(e,t,r,n,i,o=(0,b.M8)(),a){var s;let l,c=M(),d=new m.cP,p={},h=0,f=(0,et.yG)((0,v.B)(window.location)),y=es(),_=!0,w=null==a?void 0:a.name,S=(null==a?void 0:a.service)||n.service,k=(null==a?void 0:a.version)||n.version,C=null==a?void 0:a.context,E=null==a?void 0:a.handlingStack;C&&y.setContext(C);let A={id:c,name:w,startClocks:o,service:S,version:k,context:C,url:null==a?void 0:a.url};e.notify(1,A),e.notify(2,A);let{throttled:I,cancel:T}=(0,eh.n)(K,3e3,{leading:!1}),{setLoadEvent:P,setViewEnd:O,stop:R,stopINPTracking:N,getCommonViewMetrics:D,setLoa
6dingTime:L}=function(e,t,r,n,i,o,a){let s={},l=!1,c=!1,{stop:d,setLoadEvent:p}=function(e,t,r,n,i,o,a){let s=i===q.INITIAL_LOAD,l=!0,c=[],u=nT(n,o);function d(){if(!l&&!s&&c.length>0){let e=Math.max(...c);e<u.timeStamp-o.relative&&a(e)}}let{stop:p}=rc(e,t,r,n,e=>{l&&(l=!1,e.hadActivity&&c.push((0,b.vk)(o.timeStamp,e.end)),d())});return{stop:()=>{p(),u.stop()},setLoadEvent:e=>{s&&(s=!1,c.push(e),d())}}}(e,t,r,n,o,a,e=>{l||(s.loadingTime=e,i())}),{stop:h}=function(e,t,r,n=function(e,t=nG){return new m.cP(r=>{if(window.ResizeObserver){let n=(0,eh.n)(function(){r.notify(function(){let e=nF(),{height:t}=nz();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}())},t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,o=new ResizeObserver((0,x.dm)(n.throttled));i&&o.observe(i);let a=(0,ee.q)(e,window,"scroll",n.throttled,{passive:!0});return()=>{n.cancel(),o.disconnect(),a.stop()}}})}(e)){let i=0,o=0,a=0,s=n.subscribe(({scrollDepth:e,scrollTop:n,scrollHeight:s})=>{let l=!1;if(e>i&&(i=e,l=!0),s>o){o=s;let e=(0,b.$S)();a=(0,b.vk)(t.relative,e),l=!0}l&&r({maxDepth:Math.min(i,o),maxDepthScrollTop:n,maxScrollHeight:o,maxScrollHeightTime:a})});return{stop:()=>s.unsubscribe()}}(n,a,e=>{s.scroll=e}),{stop:f}=function(e,t,r){let n,i,o,a,s;if(!(rs(g.LAYOUT_SHIFT)&&"WeakRef"in window))return{stop:eh.l};let l=0;r({value:0});let c=(a=0,s=0,{update:e=>{let t;return void 0===i||e.startTime-o>=nN||e.startTime-i>=nR?(i=o=e.startTime,s=a=e.value,t=!0):(a+=e.value,o=e.startTime,(t=e.value>s)&&(s=e.value)),{cumulatedValue:a,isMaxValue:t}}}),u=ra(e,{type:g.LAYOUT_SHIFT,buffered:!0}).subscribe(i=>{var o;for(let a of i){if(a.hadRecentInput||a.startTime<t)continue;let{cumulatedValue:i,isMaxValue:s}=c.update(a);if(s){let e=function(e){let t;for(let r of e)if(r.node&&t7(r.node)){let e=nP(r);(!t||nP(t)<e)&&(t=r)}return t}(a.sources);n={target:(null==e?void 0:e.node)?new WeakRef(e.node):void 0,time:(0,b.vk)(t,a.startTime),previousRect:null==e?void 0:e.previousRect,currentRect:null==e?void 0:e.currentRect,devicePixelRatio:window.devicePixelRatio}}if(i>l){l=i;let t=null==(o=null==n?void 0:n.target)?void 0:o.deref();r({value:(0,eD.LI)(l,4),targetSelector:t&&rv(t,e.actionNameAttribute),time:null==n?void 0:n.time,previousRect:(null==n?void 0:n.previousRect)?nO(n.previousRect):void 0,currentRect:(null==n?void 0:n.currentRect)?nO(n.currentRect):void 0,devicePixelRatio:null==n?void 0:n.devicePixelRatio})}}});return{stop:()=>{u.unsubscribe()}}}(n,a.relative,e=>{s.cumulativeLayoutShift=e,i()}),{stop:y,getInteractionToNextPaint:v,setViewEnd:_}=function(e,t,r){let n;if(!(rs(g.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:()=>void 0,setViewEnd:eh.l,stop:eh.l};let i=1/0,{getViewInteractionCount:o,stopViewInteractionCount:a}=function(e){"interactionCount"in performance||u||(u=new window.PerformanceObserver((0,x.dm)(e=>{e.getEntries().forEach(e=>{e.interactionId&&(nL=Math.min(nL,e.interactionId),nD=((nU=Math.max(nU,e.interactionId))-nL)/7+1)})}))).observe({type:"event",buffered:!0,durationThreshold:0});let t=e===q.INITIAL_LOAD?0:nM(),r={stopped:!1};return{getViewInteractionCount:()=>r.stopped?r.interactionCount:nM()-t,stopViewInteractionCount:()=>{r={stopped:!0,interactionCount:nM()-t}}}}(r),s=function(e){let t=[];function r(){t.sort((e,t)=>t.duration-e.duration).splice(10)}return{process(e){let n=t.findIndex(t=>e.interactionId===t.interactionId),i=t[t.length-1];-1!==n?e.duration>t[n].duration&&(t[n]=e,r()):(t.length<10||e.duration>i.duration)&&(t.push(e),r())},estimateP98Interaction(){let r=Math.min(t.length-1,Math.floor(e()/50));return t[r]},isTracked:e=>t.some(t=>t.interactionId===e)}}(o),l=function(e){let t=new Map;function r(e,t){e.startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd)}return{process(e){if(void 0===e.interactionId||!e.processingStart||!e.processingEnd)return;let n=e.startTime+e.duration,i=t.get(e.interactionId);if(i)return void r(i,e);for(let[,i]of t.entries())if(8>=Math.abs(n-i.referenceRenderTime)){r(i,e),t.set(e.interactionId,i);return}t.set(e.interactionId,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,referenceRenderTime:n})},pruneUntracked(){for(let[r]of t)e.isTracked(r)||t.delete(r)},computeSubParts(e,r){if(!e.processingStart||!e.processingEnd||void 0===e.interactionId)return;let n=t.get(e.interactionId);if(!n)return;let i=Math.max(n.startTime+r,n.processingStart),o=Math.min(n.processingEnd,i);return{inputDelay:(0,b.vk)(n.startTime,n.processingStart),processingDuration:(0,b.vk)(n.processingStart,o),presentationDelay:(0,b.vk)(o,i)}},stop(){t.clear()}}}(s),c=ra(e,{type:g.FIRST_INPUT,buffered:!0}).subscribe(p),d=ra(e,{type:g.EVENT,durationThreshold:40,buffered:!0}).subscribe(p);function p(r){for(let e of r)e.interactionId&&e.startTime>=t&&e.startTime<=i&&(s.process(e),l.process(e));l.pruneUntracked();let o=s.estimateP98Interaction();o&&function(r){let i=(0,b.vk)(t,r.startTime);if(!n||r.duration!==n.duration||i!==n.startTime){let t=function(e){let t=nt.get(e);return nt.delete(e),t}(r.startTime);!t&&r.target&&t7(r.target)&&(t=rv(r.target,e.actionNameAttribute)),n={duration:r.duration,startTime:i,targetSelector:t}}n.subParts=l.computeSubParts(r,n$(n.duration))}(o)}return{getInteractionToNextPaint:()=>n?{value:n$(n.duration),targetSelector:n.targetSelector,time:n.startTime,subParts:n.subParts}:o()?{value:0}
6:void 0,setViewEnd:e=>{i=e,a()},stop:()=>{d.unsubscribe(),c.unsubscribe(),l.stop()}}}(n,a.relative,o);return{stop:()=>{d(),f(),h()},stopINPTracking:y,setLoadEvent:p,setViewEnd:e=>{c=!0,_(e)},getCommonViewMetrics:()=>(s.interactionToNextPaint=v(),s),setLoadingTime:e=>{if(c)return;let t=(0,b.vk)(a.timeStamp,null!=e?e:(0,b.nx)());l||d(),l=!0,s.loadingTime=t,i()}}}(e,t,r,n,H,i,o),{stop:U,initialViewMetrics:j}=i===q.INITIAL_LOAD?function(e,t,r,n){var i,o;let a={},{stop:s}=(i=e=>{r(e.loadEvent),a.navigationTimings=e,n()},function(e,t){let r,{stop:n}=(0,nm.H)(e,"complete",()=>{r=(0,eL.wg)(()=>t())});return{stop:()=>{n(),(0,eL.DJ)(r)}}}(e,()=>{var e;let t=(0,v.B)(nb)();t.loadEventEnd<=0||i({domComplete:(e=t).domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:nw(e)})})),l=nT(e,t),{stop:c}=(o=e=>{a.firstContentfulPaint=e,n()},{stop:ra(e,{type:g.PAINT,buffered:!0}).subscribe(e=>{let t=e.find(e=>"first-contentful-paint"===e.name&&e.startTime<l.timeStamp&&e.startTime<nI);t&&o(t.startTime)}).unsubscribe}),{stop:u}=function(e,t,r,n){let i=1/0,{stop:o}=(0,ee.l)(e,r,["pointerdown","keydown"],e=>{i=e.timeStamp},{capture:!0,once:!0}),a=0,s=ra(e,{type:g.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(r=>{let o=(0,ej.Uk)(r,e=>e.entryType===g.LARGEST_CONTENTFUL_PAINT&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<nx&&e.size>a);if(o){var s;let t;o.element&&(t=rv(o.element,e.actionNameAttribute));let r=""===(s=o).url?void 0:s.url,i=o.startTime,l=function(e,t){let r=nw(nb());if(void 0===r)return;let n=e?function(e,t){let r=function(){if(rs(g.RESOURCE))return performance.getEntriesByType(g.RESOURCE)}();if(r)return(0,ej.Uk)(r,r=>r.name===e&&r.startTime<=t)}(e,t):void 0,i=n?Math.max(r,n.requestStart||n.startTime):r,o=Math.min(t,Math.max(i,(null==n?void 0:n.responseEnd)||0));return{loadDelay:i-r,loadTime:o-i,renderDelay:t-o}}(r,i);n({value:i,targetSelector:t,resourceUrl:r,subParts:l}),a=o.size}});return{stop:()=>{o(),s.unsubscribe()}}}(e,l,window,e=>{a.largestContentfulPaint=e,n()}),{stop:d}=function(e,t,r){let n=ra(e,{type:g.FIRST_INPUT,buffered:!0}).subscribe(n=>{let i=n.find(e=>e.startTime<t.timeStamp);if(i){let t,n=(0,b.vk)(i.startTime,i.processingStart);i.target&&t7(i.target)&&(t=rv(i.target,e.actionNameAttribute)),r({delay:n>=0?n:0,time:i.startTime,targetSelector:t})}});return{stop:()=>{n.unsubscribe()}}}(e,l,e=>{a.firstInput=e,n()});return{stop:function(){s(),c(),u(),d(),l.stop()},initialViewMetrics:a}}(n,o,P,H):{stop:eh.l,initialViewMetrics:{}};i===q.BF_CACHE&&(s=o.relative,requestAnimationFrame(()=>{requestAnimationFrame(()=>{(e=>{j.firstContentfulPaint=e,j.largestContentfulPaint={value:e},H()})((0,b.vk)(s,(0,b.$S)()))})}));let{stop:$,eventCounts:V}=function(e,t,r){let{stop:n,eventCounts:i}=rq({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:r});return{stop:n,eventCounts:i}}(e,c,H),B=(0,eL.yb)(K,nq),z=e.subscribe(11,e=>{e.reason===tT.y5.UNLOADING&&K()});function G(){e.notify(3,{id:c,name:w,context:y.getContext(),startClocks:o,sessionIsActive:_})}function H(){G(),I()}function K(){T(),G(),h+=1;let t=void 0===l?(0,b.nx)():l.timeStamp;e.notify(4,{customTimings:p,documentVersion:h,id:c,name:w,service:S,version:k,context:y.getContext(),loadingType:i,location:f,handlingStack:E,startClocks:o,commonViewMetrics:D(),initialViewMetrics:j,duration:(0,b.vk)(o.timeStamp,t),isActive:void 0===l,sessionIsActive:_,eventCounts:V})}return K(),y.changeObservable.subscribe(H),{get name(){return w},service:S,version:k,contextManager:y,stopObservable:d,end(t={}){var r,n;l||(l=null!=(r=t.endClocks)?r:(0,b.M8)(),_=null==(n=t.sessionIsActive)||n,e.notify(5,{endClocks:l}),e.notify(6,{endClocks:l}),(0,eL.vG)(B),O(l.relative),R(),z.unsubscribe(),K(),(0,eL.wg)(()=>{this.stop()},nH))},stop(){U(),$(),N(),d.notify()},addTiming(e,t){if(l)return;let r=(0,b.pu)(t)?t:(0,b.vk)(o.timeStamp,t);p[function(e){let t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&F.Vy.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}(e)]=r,H()},setLoadingTime:L,setViewName(e){w=e,K()}}}(e,t,r,n,i,o,a);return c.add(s),s.stopObservable.subscribe(()=>{c.delete(s)}),s}return e.subscribe(10,()=>{d=p(q.ROUTE_CHANGE,void 0,{name:d.name,service:d.service,version:d.version,context:d.contextManager.getContext()})}),e.subscribe(9,()=>{d.end({sessionIsActive:!1})}),o&&(l=i.subscribe(({oldLocation:e,newLocation:t})=>{var r,n;r=e,n=t,(r.pathname!==n.pathname||!function(e){let t=e.substring(1);return""!==t&&!!document.getElementById(t)}(n.hash)&&nK(n.hash)!==nK(r.hash))&&(d.end(),d=p(q.ROUTE_CHANGE))}),n.trackBfcacheViews&&(s=function(e,t){let{stop:r}=(0,ee.q)(e,window,"pageshow",e=>{e.persisted&&t(e)},{capture:!0});return r}(n,e=>{d.end();let t=(0,b.FR)(e.timeStamp);d=p(q.BF_CACHE,t,void 0)}))),{addTiming:(e,t=(0,b.nx)())=>{d.addTiming(e,t)}
6,setLoadingTime:e=>d.setLoadingTime(e),startView:(e,t)=>{d.end({endClocks:t}),d=p(q.ROUTE_CHANGE,t,e)},setViewContext:e=>{d.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{d.contextManager.setContextProperty(e,t)},setViewName:e=>{d.setViewName(e)},getViewContext:()=>d.contextManager.getContext(),stop:()=>{l&&l.unsubscribe(),s&&s(),d.end(),c.forEach(e=>e.stop())}}}(e,D,U,r,L,!r.trackViewsManually,o)),eN=window,eU=new Map;function eM(){eN.DD_SOURCE_CODE_CONTEXT&&((0,ej.WP)(eN.DD_SOURCE_CODE_CONTEXT).forEach(([e,t])=>{let r=(0,w.T)({stack:e}).stack[0];if(!r.url)return void(0,T.VJ)("Source code context: missing frame url",{stack:e});eU.has(r.url)||eU.set(r.url,t)}),eN.DD_SOURCE_CODE_CONTEXT={})}eM(),t.register(0,({domainContext:e,rawRumEvent:t})=>{var r,n,i,o;let a;if(eM(),0===eU.size)return ec.$O;let s=(r=e,"long_task"===(n=t).type&&"long-animation-frame"===n.long_task.entry_type?null==(i=n.long_task.scripts[0])?void 0:i.source_url:("handlingStack"in r&&(a=r.handlingStack),"error"===n.type&&n.error.stack&&(a=n.error.stack),null==(o=(0,w.T)({stack:a}).stack[0])?void 0:o.url)),l=s&&eU.get(s);return l?{type:t.type,service:l.service,version:l.version}:ec.$O}),P.push(eR);let e$=function(e,t,r){let n,i=(0,v.B)(nh)(),o=t.trackEarlyRequests;o?n=function(e){let t=new Set,r=!1,n=e.subscribe(8,e=>{if(t.add(e),t.size>1e3){let e=t.values().next().value;if(!r){let n;if(r=!0,(0,N.sr)(N.R9.TOO_MANY_REQUESTS_INVESTIGATION)){let r=0,i=0,o=0,a=0;for(let e of t)e.isAborted&&r++,e.isAbortedOnStart&&i++,e.type===tV.XHR&&o++,!performance.getEntriesByName(e.url,"resource").some(t=>t.startTime>=e.startClocks.relative)&&a++;let s=(0,b.nx)()-e.startClocks.timeStamp;n={abortedCount:r,abortedOnStartCount:i,xhrCount:o,fetchCount:t.size-o,oldestRequestAge:s,oldestRequestEndAge:s-e.duration,withoutMatchingEntryCount:a}}(0,T.A2)("Too many requests",n)}t.delete(e)}});return{getMatchingRequest(e){let r,n=1/0;for(let i of t){let t=e.startTime-i.startClocks.relative;0<=t&&t<n&&i.url===e.name&&(n=Math.abs(t),r=i)}return r&&t.delete(r),r},stop(){n.unsubscribe()}}}(e):e.subscribe(8,e=>{s(()=>{var n,i,o;return n=e,i=t,o=r,nC(function(e){if(!performance||!("getEntriesByName"in performance))return;let t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;let r=t.filter(e=>!nf.has(e)).filter(e=>tq(e)&&tH(e)).filter(t=>{var r,n,i;return r=t,n=e.startClocks.relative,i=ng({startTime:e.startClocks.relative,duration:e.duration}),r.startTime>=n-1&&ng(r)<=(0,b.Gw)(i,1)});if(1===r.length)return nf.add(r[0]),r[0].toJSON()}(n),n,o,i)})});let a=ra(t,{type:g.RESOURCE,buffered:!0}).subscribe(e=>{for(let i of e)(o||!tG(i))&&s(()=>nk(i,t,r,n))});function s(t){i.push(()=>{let r=t();r&&e.notify(12,r)})}(0,v.B)(nS)(t,e=>{s(()=>nk(e,t,r,n))});let l=rK(e),c={startResource:function(e,t={},r=(0,b.M8)()){var n;let i=null!=(n=t.resourceKey)?n:e;l.start(i,r,{url:e,...t})},stopResource:function(t,r={},n=(0,b.M8)()){var i;let o=null!=(i=r.resourceKey)?i:t,a=l.stop(o,n,{context:r.context,type:r.type});if(!a)return;let s=(0,b.vk)(a.startClocks.relative,n.relative),c={date:a.startClocks.timeStamp,type:z.RESOURCE,resource:{id:a.id,type:a.type||t$.OTHER,url:tZ(a.url),duration:(0,b.Zj)(s),method:a.method,status_code:r.statusCode,size:r.size},_dd:{},context:a.context};e.notify(12,{rawRumEvent:c,startClocks:a.startClocks,duration:s,domainContext:{isManual:!0}})}};return{startResource:c.startResource,stopResource:c.stopResource,stop:()=>{i.stop(),a.unsubscribe(),l.stopAll()}}}(e,r,$);P.push(e$.stop);let{stop:eV}=function(e,t){let r=ra(t,{type:rs(g.LONG_ANIMATION_FRAME)?g.LONG_ANIMATION_FRAME:g.LONG_TASK,buffered:!0}).subscribe(r=>{for(let n of r){if(!t.trackLongTasks)break;let r=(0,b.FR)(n.startTime),i=function(e,t){let r=M(),n=(0,b.Zj)(e.duration),i={date:t.timeStamp,type:z.LONG_TASK,_dd:{discarded:!1}};return e.entryType===g.LONG_TASK?{...i,long_task:{id:r,entry_type:G.LONG_TASK,duration:n}}:{...i,long_task:{id:r,entry_type:G.LONG_ANIMATION_FRAME,duration:n,blocking_duration:(0,b.Zj)(e.blockingDuration),first_ui_event_timestamp:(0,b.Zj)(e.firstUIEventTimestamp),render_start:(0,b.Zj)(e.renderStart),style_and_layout_start:(0,b.Zj)(e.styleAndLayoutStart),start_time:(0,b.Zj)(e.startTime),scripts:e.scripts.map(e=>({duration:(0,b.Zj)(e.duration),pause_duration:(0,b.Zj)(e.pauseDuration),forced_style_and_layout_duration:(0,b.Zj)(e.forcedStyleAndLayoutDuration),start_time:(0,b.Zj)(e.startTime),execution_start:(0,b.Zj)(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}))}}}(n,r);e.notify(12,{rawRumEvent:i,startClocks:r,duration:n.duration,domainContext:{performanceEntry:n}})}});return{stop:()=>r.unsubscribe()}}(e,r);P.push(eV);let{addError:eF}=function(e,t,r){var n,i,o,a;let s=new m.cP;return r.subscribe(e=>{0===e.type&&s.notify(e.error)}),n=s,(function(e){let t=e.map(e=>{var t;return ns[e]||(ns[e]=(t=e,new m.cP(e=>{let r=F.JZ[t];return F.JZ[t]=(...n)=>{r.apply(console,n);let i=(0,I.uC)("console error");(0,x.um)(()=>
6{e.notify(function(e,t,r){let n=e.map(e=>{var t;return"string"==typeof(t=e)?(0,R.a)(t):(0,k.bJ)(t)?(0,I.NR)((0,w.T)(t)):(0,na.s)((0,R.a)(t),void 0,2)}).join(" ");if(t===F.bP.error){let i=e.find(k.bJ),o=(0,k.As)({originalError:i,handlingStack:r,startClocks:(0,b.M8)(),source:C.g.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return o.message=n,{api:t,message:n,handlingStack:r,error:o}}return{api:t,message:n,error:void 0,handlingStack:r}}(n,t,i))})},()=>{F.JZ[t]=r}}))),ns[e]});return(0,m.Fx)(...t)})([F.bP.error]).subscribe(e=>n.notify(e.error)),i=t,o=s,(function(e,t){var r,n;let i=[];t.includes(nl.cspViolation)&&i.push((r=e,new m.cP(e=>{let{stop:t}=(0,ee.q)(r,document,"securitypolicyviolation",t=>{e.notify(function(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return nc({type:e.effectiveDirective,message:`${nl.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:nu(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${V(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}(t))});return t})));let o=t.filter(e=>e!==nl.cspViolation);return o.length&&i.push((n=o,new m.cP(e=>{if(!window.ReportingObserver)return;let t=(0,x.dm)((t,r)=>t.forEach(t=>e.notify(function(e){let{type:t,body:r}=e;return nc({type:r.id,message:`${t}: ${r.message}`,originalError:e,stack:nu(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})}(t)))),r=new window.ReportingObserver(t,{types:n,buffered:!0});return r.observe(),()=>{r.disconnect()}}))),(0,m.Fx)(...i)})(i,[nl.cspViolation,nl.intervention]).subscribe(e=>o.notify(e)),s.subscribe(t=>e.notify(14,{error:t})),(a=e).subscribe(14,({error:e})=>{a.notify(12,function(e){let t={date:e.startClocks.timeStamp,error:{id:M(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:z.ERROR,context:e.context},r={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startClocks:e.startClocks,domainContext:r}}(e))}),{addError:({error:e,handlingStack:t,componentStack:r,startClocks:n,context:i})=>{let o=(0,k.As)({originalError:e,handlingStack:t,componentStack:r,startClocks:n,nonErrorPrefix:"Provided",source:C.g.CUSTOM,handling:"handled"});o.context=(0,O.kg)(o.context,i),a.notify(14,{error:o})}}}(e,r,c);!function(e,t,r,n,i){var o,a,s;let c={clearTracingIfNeeded:t1,traceFetch:e=>t2(t,e,r,n,i,t=>{var r;if(e.input instanceof Request&&!(null==(r=e.init)?void 0:r.headers))e.input=new Request(e.input),Object.keys(t).forEach(r=>{e.input.headers.append(r,t[r])});else{e.init=(0,et.yG)(e.init);let r=[];e.init.headers instanceof Headers?e.init.headers.forEach((e,t)=>{r.push([t,e])}):Array.isArray(e.init.headers)?e.init.headers.forEach(e=>{r.push(e)}):e.init.headers&&Object.keys(e.init.headers).forEach(t=>{r.push([t,e.init.headers[t]])}),e.init.headers=r.concat((0,ej.WP)(t))}}),traceXhr:(e,o)=>t2(t,e,r,n,i,e=>{Object.keys(e).forEach(t=>{o.setRequestHeader(t,e[t])})})};(function(e,t,r){var n;(!l&&(n=t,l=new m.cP(e=>{let{stop:t}=(0,_.H)(XMLHttpRequest.prototype,"open",tM),{stop:r}=(0,_.H)(XMLHttpRequest.prototype,"send",t=>{!function({target:e,parameters:[t],handlingStack:r},n,i){let o=tU.get(e);if(!o)return;o.state="start",o.startClocks=(0,b.M8)(),o.isAborted=!1,o.xhr=e,o.handlingStack=r,o.requestBody=t;let a=!1,{stop:s}=(0,_.H)(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&l()}),l=()=>{c(),s(),a||(a=!0,o.state="complete",o.duration=(0,b.vk)(o.startClocks.timeStamp,(0,b.nx)()),o.status=e.status,"string"==typeof e.response&&(o.responseBody=e.response),i.notify((0,et.yG)(o)))},{stop:c}=(0,ee.q)(n,e,"loadend",l);i.notify(o)}(t,n,e)},{computeHandlingStack:!0}),{stop:i}=(0,_.H)(XMLHttpRequest.prototype,"abort",tj);return()=>{t(),r(),i()}})),l).subscribe(t=>{if(tJ(t.url))switch(t.state){case"start":r.traceXhr(t,t.xhr),t.requestIndex=t6(),e.notify(7,{requestIndex:t.requestIndex,url:t.url});break;case"complete":r.clearTracingIfNeeded(t),e.notify(8,{...t,type:tV.XHR,isAbortedOnStart:!1})}})})(e,t,c),o=e,a=t,s=c,e_({responseBodyAction:e=>{var t;return(null==(t=t4(e.url,a))?void 0:t.trackResponseErrors)?2:1}}).subscribe(e=>{var t;if(tJ(e.url))switch(e.state){case"start":s.traceFetch(e),e.requestIndex=t6(),o.notify(7,{requestIndex:e.requestIndex,url:e.url});break;case"resolve":s.clearTracingIfNeeded(e),o.notify(8,{...e,duration:(0,b.vk)(e.startClocks.timeStamp,(0,b.nx)()),type:tV.FETCH,requestBody:null==(t=e.init)?void 0:t.body})}})}(e,r,n,ea,eg);let eB=function(e,t,r){function n(r){t.wasInPageStateDuringPeriod("frozen",r.startClocks.relative,r.duration)||e.notify(12,Y(r))}return{addOperationStepVital:function(t,r,n,i){if(!(0,N.sr)(N.R9.FEATURE_OPERATION_VITAL))return;let{operationKey:o,context:a,description:s,handlingStack:l}=n||{}
6,c={name:t,type:J.OPERATION_STEP,operationKey:o,failureReason:i,stepType:r,startClocks:(0,b.M8)(),context:(0,R.a)(a),description:s,handlingStack:l};e.notify(12,Y(c))},addDurationVital:n,startDurationVital:(t,n={})=>{let i=W(r,t,n),o=r.vitalsByReference.get(i);return o&&e.notify(16,o),i},stopDurationVital:(e,t={})=>{Z(n,r,e,t)}}}(e,$,a),ez=(h=r.applicationId,y=em.actionContexts,{get:e=>{let t=B.findView(e),r=X.findUrl(e),i=n.findTrackedSession(e);if(i&&t&&r){let n=y.findActionId(e);return{application_id:h,session_id:i.id,user_action:n?{id:n}:void 0,view:{id:t.id,name:t.name,referrer:r.referrer,url:r.url}}}}});return{addAction:em.addAction,startAction:em.startAction,stopAction:em.stopAction,startResource:e$.startResource,stopResource:e$.stopResource,addEvent:ey.addEvent,addError:eF,addTiming:eS,setLoadingTime:eC,addFeatureFlagEvaluation:Q.addFeatureFlagEvaluation,startView:eE,setViewContext:eI,setViewContextProperty:ex,getViewContext:eT,setViewName:eA,viewHistory:B,getInternalContext:ez.get,startDurationVital:eB.startDurationVital,stopDurationVital:eB.stopDurationVital,addDurationVital:eB.addDurationVital,addOperationStepVital:eB.addOperationStepVital,globalContext:eo,userContext:ea,accountContext:eg,stop:()=>P.forEach(e=>e())}}(A,y,e,L,t,n,a,c,S,P);return E.push($),c.unbuffer(),E.push(()=>r.stop()),{...B,lifeCycle:A,session:L,stopSession:()=>L.expire(),telemetry:d,stop:()=>{E.forEach(e=>e())},hooks:y}}function im(e,t,r={}){let n=function(e){let t=new m.cP;return{tryToInit(t){e||(e=t)},update(r){e=r,t.notify()},isGranted:()=>e===y.GRANTED,observable:t}}(),i={vitalsByName:new Map,vitalsByReference:new WeakMap},o=function(){let e=new m.dX(500),t=(0,v.B)(E)().subscribe(t=>{e.notify({type:0,error:t})});return{observable:e,stop:()=>{t.unsubscribe()}}}().observable,a=function({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},r,n,i){let o,a,s,l,c,u=function(){let e=[];return{add:t=>{e.push(t)>500&&e.splice(0,1)},remove:t=>{(0,Q.Ai)(e,t)},drain:t=>{e.forEach(e=>e(t)),e.length=0}}}(),d=el();tI(d,L.globalContext,u);let p=eu();tI(p,L.userContext,u);let h=ed();tI(h,L.accountContext,u);let f=eR(),g=r.observable.subscribe(_),m={};function _(){let e;if(!s||!l||!r.isGranted())return;if(c||(c=(0,v.B)(T.a5)("browser-rum-sdk",l,f)),g.unsubscribe(),l.trackViewsManually){if(!o)return;u.remove(o.callback),e=o.options}let t=i(l,a,e,c,f);u.drain(t)}function w(e,n){var i,o,c;let u=(0,ep.d0)();if(u&&(e={...i=e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:null!=(o=i.defaultPrivacyLevel)?o:null==(c=(0,ep.Y9)())?void 0:c.getPrivacyLevel()}),s=e,(0,T.Rr)(function(e){var t,r,n,i;let o={session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),beta_encode_cookie_options:e.betaEncodeCookieOptions,source:e.source,sdk_version:e.sdkVersion,variant:e.variant};return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:(0,Q.EI)(e.allowedTracingUrls),use_allowed_graph_ql_urls:(0,Q.EI)(e.allowedGraphQlUrls),use_track_graph_ql_payload:(r=e.allowedGraphQlUrls,(0,Q.EI)(r)&&r.some(e=>(0,ei.O)(e)&&e.trackPayload)),use_track_graph_ql_response_errors:(n=e.allowedGraphQlUrls,(0,Q.EI)(n)&&n.some(e=>(0,ei.O)(e)&&e.trackResponseErrors)),selected_tracing_propagators:function(e){let t=new Set;return(0,Q.EI)(e.allowedTracingUrls)&&e.allowedTracingUrls.forEac
6h(e=>{var r;null==(r=tu(e))||r.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:(0,Q.EI)(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,track_bfcache_views:e.trackBfcacheViews,track_early_requests:e.trackEarlyRequests,plugins:null==(t=e.plugins)?void 0:t.map(e=>{var t;return{name:e.name,...null==(t=e.getConfigurationTelemetry)?void 0:t.call(e)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,track_resource_headers:!0===(i=e.trackResourceHeaders)?"default_headers":Array.isArray(i)?"custom":void 0,...o}}(e)),l)return void B("DD_RUM",e);let d=function(e,t){var r,n,i,o,a,s,l,c,u,d,p,h,f,g,m,_,w,k,C,E;if(void 0===e.trackFeatureFlagsForEvents||Array.isArray(e.trackFeatureFlagsForEvents)||F.Vy.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId)return void F.Vy.error("Application ID is not configured, no RUM data will be collected.");if(!ts(e.sessionReplaySampleRate,"Session Replay")||!ts(e.traceSampleRate,"Trace"))return;if(void 0!==e.excludedActivityUrls&&!Array.isArray(e.excludedActivityUrls))return void F.Vy.error("Excluded Activity Urls should be an array");let A=function(e){if(void 0===e.allowedTracingUrls)return[];if(!Array.isArray(e.allowedTracingUrls))return void F.Vy.error("Allowed Tracing URLs should be an array");if(0!==e.allowedTracingUrls.length&&void 0===e.service)return void F.Vy.error("Service needs to be configured when tracing is enabled");let t=[];return e.allowedTracingUrls.forEach(e=>{let r=tu(e);r?t.push(r):F.Vy.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",e)}),t}(e);if(!A)return;let I=(c=e,u=t,c&&c.clientToken?void 0===c.allowedTrackingOrigins||Array.isArray(c.allowedTrackingOrigins)?(!(E=c.site)||"string"!=typeof E||/(datadog|ddog|datad0g|dd0g)/.test(E)||(F.Vy.error(`Site should be a valid Datadog site. ${F.xG} ${F.fH}/getting_started/site/.`),0))&&ts(c.sessionSampleRate,"Session")&&ts(c.telemetrySampleRate,"Telemetry")&&ts(c.telemetryConfigurationSampleRate,"Telemetry Configuration")&&ts(c.telemetryUsageSampleRate,"Telemetry Usage")&&ta(c.version,"Version")&&ta(c.env,"Env")&&ta(c.service,"Service")&&function(e,t){let r=(0,v.B)((0,S.VZ)().location),n=r?r.origin:"",i=e.allowedTrackingOrigins;if(!i)return!function(e,t=""){return!te(e)&&te(t.split("\n").filter(e=>{let t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||"")}(n,t)||(F.Vy.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);let o=e9(i,n);return o||F.Vy.error("SDK initialized on a non-allowed domain."),o}(c,null!=u?u:"")?void 0===c.trackingConsent||(0,et.Rj)(y,c.trackingConsent)?{beforeSend:c.beforeSend&&(0,eN.y)(c.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:S.Wq?void 0:function(e){var t,r;let{sessionPersistence:n}=e;for(let i of(t=n,r=e,Array.isArray(t)?t:void 0!==t?[t]:r.allowFallbackToLocalStorage?[e$.Q_.COOKIE,e$.Q_.LOCAL_STORAGE]:[e$.Q_.COOKIE])){let t=function(e,t){switch(e){case e$.Q_.COOKIE:let r=function(e){let t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){let e=eC();if(!e)return;t.domain=e}return t}(t);return r&&function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{let t=`dd_cookie_test_${M()}`,r="test";ew(t,r,b.iW,e);let n=eS(t)===r;return ew(t,"",0,e),n}catch(e){return F.Vy.error(e),!1}}(r)?{type:e$.Q_.COOKIE,cookieOptions:r}:void 0;case e$.Q_.LOCAL_STORAGE:try{let e=M(),t=`_dd_test_${e}`;localStorage.setItem(t,e);let r=localStorage.getItem(t);return localStorage.removeItem(t),e===r?{type:e$.Q_.LOCAL_STORAGE}:void 0}catch(e){return}case e$.Q_.MEMORY:return{type:e$.Q_.MEMORY};default:F.Vy.error(`Invalid session persistence '${String(e)}'`);return}}(i,e);if(void 0!==t)return t}}(c),sessionSampleRate:null!=(d=c.sessionSampleRate)?d:100,telemetrySampleRate:null!=(p=c.telemetrySampleRate)?p:20,telemetryConfigurationSampleRate:null!=(h=c.telemetryConfigurationSampleRate)?h:5,telemetryUsageSampleRate:null!=(f=c.telemetryUsageSampleRate)?f:5,service:null!=(g=c.service)?g:void 0,env:null!=(m=c.env)?m:void 0,version:null!=(_=c.version)?_:void 0,datacenter:null!=(w=c.datacenter)?w:void 0,silentMultipleInit:!!c.silentMultipleInit,allowUntrustedEvents:!!c.allowUntrustedEvents,trackingConsent:null!=(k=c.trackingConsent)?k:y.GRANTED,trackAnonymousUser:null==(C=c.trackAnonymousUser)||C,storeContextsAcrossPages:!!c.storeContextsAcrossPages,betaEncodeCookieOptions:!!c.betaEncodeCookieOptions,variant:c.variant,sdkVersion:c.sdkVersion,...function(e){var t,r;let n=e.site||tt.NW,i="flutter"===(t=e.source)||"unity"===t?t:"browser",o={logsEndpointBuilder:tr(r={...e,site:n,source:i},"logs"),rumEndpointBuilder:tr(r,"rum"),profilingEndpointBuilder:tr(r,"profile"),sessionReplayEndpointBuilder:tr(r,"replay"),exposuresEndpointBuilder:tr(r,"exposures"),flagEvaluationEndpointBuilder:tr(r,"flagevaluation")};return{replica:function(e){if(!e.replica)return;let t={...e,site:tt.NW,clientToken:e.replica.clientToken};return{logsEndpointBuilder:tr(t,"logs"),rumEndpointBuilder:tr(t,"rum",[`application.id=${e.replica.applicationId}`])}}({...e,site:n,source:i}),site:n,source:i,...o}}(c)}:void F.Vy.error('Tracking Consent should be either "granted" or "not-granted"'):void 0:void F.Vy.error("Allowed Tracking Origins must be an array"):void F.Vy.error("Client Token is not configured, we will not send any data.")),x=function(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return F.Vy.warn("allowedGraphQlUrls should be an array"),[];let t=[];
6return e.allowedGraphQlUrls.forEach(e=>{e8(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):(0,ei.O)(e)&&e8(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}(e);if(!I)return;let T=null!=(r=e.sessionReplaySampleRate)?r:0;return{applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,betaTrackActionsInShadowDom:!!e.betaTrackActionsInShadowDom,sessionReplaySampleRate:T,startSessionReplayRecordingManually:void 0!==e.startSessionReplayRecordingManually?!!e.startSessionReplayRecordingManually:0===T,traceSampleRate:null!=(n=e.traceSampleRate)?n:100,rulePsr:(0,eD.Et)(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:A,excludedActivityUrls:null!=(i=e.excludedActivityUrls)?i:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(null==(o=e.trackUserInteractions)||o),trackViewsManually:!!e.trackViewsManually,trackResources:!!(null==(a=e.trackResources)||a),trackResourceHeaders:function(e){let t=e.trackResourceHeaders;if(void 0===t||!1===t)return[];if(!0===t)return tc.map(e=>({name:e}));if(!Array.isArray(t))return F.Vy.warn("trackResourceHeaders should be true or an array of MatchHeader"),[];if(0===t.length)return F.Vy.warn("trackResourceHeaders is an empty array, no headers will be captured"),[];let r=[];return t.forEach((e,t)=>(0,ei.O)(e)&&e8(e.name)?void 0===e.url||e8(e.url)?void 0===e.extractor||e.extractor instanceof RegExp?void 0===e.location||td.includes(e.location)?void r.push({...e,name:"string"==typeof e.name?e.name.toLowerCase():e.name}):void F.Vy.warn(`trackResourceHeaders[${t}].location should be 'request', 'response', or 'any'`):void F.Vy.warn(`trackResourceHeaders[${t}].extractor should be a RegExp`):void F.Vy.warn(`trackResourceHeaders[${t}].url should be a MatchOption`):void F.Vy.warn(`trackResourceHeaders[${t}] should be a MatchHeader object with a 'name' property`)),r}(e),trackLongTasks:!!(null==(s=e.trackLongTasks)||s),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:(0,et.Rj)(ti,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:ti.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:(0,et.Rj)(to,e.traceContextInjection)?e.traceContextInjection:to.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:null!=(l=e.profilingSampleRate)?l:0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:x,...I}}(e,n);if(d){if(!u&&!d.sessionStoreStrategyType)return void F.Vy.warn("No storage available for session. We will not send any data.");if(d.compressIntakeRequests&&!u&&t&&!(a=t(d,"Datadog RUM",eh.l)))return;l=d,e_().subscribe(eh.l),r.tryToInit(d.trackingConsent),_()}}let k=e=>{u.add(t=>t.addDurationVital(e))};return{init(t,r,n){if(!t)return void F.Vy.error("Missing configuration");(0,N.Aq)(t.enableExperimentalFeatures),s=t,e&&eP()||(X(t.plugins,"onInit",{initConfiguration:t,publicApi:r}),t.remoteConfigurationId?tC(t,{user:p,context:d}).then(e=>{e&&w(e,n)}).catch(x.Dx):w(t,n))},get initConfiguration(){return s},getInternalContext:eh.l,stopSession:eh.l,addTiming(e,t=(0,b.nx)()){u.add(r=>r.addTiming(e,t))},setLoadingTime:e=>{u.add(t=>t.setLoadingTime(e))},startView(e,t=(0,b.M8)()){let r=r=>{r.startView(e,t)};u.add(r),o||(o={options:e,callback:r},_())},setViewName(e){u.add(t=>t.setViewName(e))},setViewContext(e){u.add(t=>t.setViewContext(e))},setViewContextProperty(e,t){u.add(r=>r.setViewContextProperty(e,t))},getViewContext:()=>m,globalContext:d,userContext:p,accountContext:h,addAction(e){u.add(t=>t.addAction(e))},startAction(e,t){let r=(0,b.M8)();u.add(n=>n.startAction(e,t,r))},stopAction(e,t){let r=(0,b.M8)();u.add(n=>n.stopAction(e,t,r))},startResource(e,t){let r=(0,b.M8)();u.add(n=>n.startResource(e,t,r))},stopResource(e,t){let r=(0,b.M8)();u.add(n=>n.stopResource(e,t,r))},addError(e){u.add(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){u.add(r=>r.addFeatureFlagEvaluation(e,t))},startDurationVital:(e,t)=>W(n,e,t),stopDurationVital(e,t){Z(k,n,e,t)},addDurationVital:k,addOperationStepVital:(e,t,r,n)=>{u.add(i=>i.addOperationStepVital((0,R.a)(e),t,(0,R.a)(r),(0,R.a)(n)))}}}(r,n,i,(s,l,c,u,d)=>{var p,h;let f=l&&r.createDeflateEncoder?e=>r.createDeflateEncoder(s,l,e):A.N,g=(0,v.B)(ig)(s,e,t,c,f,n,i,o,u,d,r.sdkName);return e.onRumStart(g.lifeCycle,s,g.session,g.viewHistory,l,g.telemetry),t.onRumStart(g.lifeCycle,g.hooks,s,g.session,g.viewHistory,f),p=a,h=g,a={init:e=>{B("DD_RUM",e)},initConfiguration:p.initConfiguration,...h},X(s.plugins,"onRumStart",{strategy:a,addEvent:g.addEvent,addError:g.addError}),g}),s=()=>a,l=(0,P.m)({init:e=>{let t=Error().stack;(0,x.um)(()=>a.init(e,l,t))},setTrackingConsent:(0,x.dm)(e=>{n.update(e),(0,T.Q6)({feature:"set-tracking-consent",tracking_consent:e})}
6),setViewName:(0,x.dm)(e=>{a.setViewName(e),(0,T.Q6)({feature:"set-view-name"})}),setViewContext:(0,x.dm)(e=>{a.setViewContext(e),(0,T.Q6)({feature:"set-view-context"})}),setViewContextProperty:(0,x.dm)((e,t)=>{a.setViewContextProperty(e,t),(0,T.Q6)({feature:"set-view-context-property"})}),getViewContext:(0,x.dm)(()=>((0,T.Q6)({feature:"set-view-context-property"}),a.getViewContext())),getInternalContext:(0,x.dm)(e=>a.getInternalContext(e)),getInitConfiguration:(0,x.dm)(()=>(0,O.Go)(a.initConfiguration)),addAction:(e,t)=>{let r=(0,I.uC)("action");(0,x.um)(()=>{a.addAction({name:(0,R.a)(e),context:(0,R.a)(t),startClocks:(0,b.M8)(),type:H.CUSTOM,handlingStack:r}),(0,T.Q6)({feature:"add-action"})})},startAction:(0,x.dm)((e,t)=>{(!a.initConfiguration||(0,N.sr)(N.R9.START_STOP_ACTION))&&a.startAction((0,R.a)(e),{type:(0,R.a)(t&&t.type),context:(0,R.a)(t&&t.context),actionKey:t&&t.actionKey})}),stopAction:(0,x.dm)((e,t)=>{(!a.initConfiguration||(0,N.sr)(N.R9.START_STOP_ACTION))&&a.stopAction((0,R.a)(e),{type:(0,R.a)(t&&t.type),context:(0,R.a)(t&&t.context),actionKey:t&&t.actionKey})}),startResource:(0,x.dm)((e,t)=>{(!a.initConfiguration||(0,N.sr)(N.R9.START_STOP_RESOURCE))&&a.startResource((0,R.a)(e),{type:(0,R.a)(t&&t.type),method:(0,R.a)(t&&t.method),context:(0,R.a)(t&&t.context),resourceKey:t&&t.resourceKey})}),stopResource:(0,x.dm)((e,t)=>{(!a.initConfiguration||(0,N.sr)(N.R9.START_STOP_RESOURCE))&&a.stopResource((0,R.a)(e),{type:(0,R.a)(t&&t.type),statusCode:t&&t.statusCode,size:t&&t.size,context:(0,R.a)(t&&t.context),resourceKey:t&&t.resourceKey})}),addError:(e,t)=>{let r=(0,I.uC)("error");(0,x.um)(()=>{a.addError({error:e,handlingStack:r,context:(0,R.a)(t),startClocks:(0,b.M8)()}),(0,T.Q6)({feature:"add-error"})})},addTiming:(0,x.dm)((e,t)=>{a.addTiming((0,R.a)(e),t)}),setViewLoadingTime:(0,x.dm)(()=>{let e=(0,b.nx)();a.setLoadingTime(e),(0,T.Q6)({feature:"addViewLoadingTime"})}),setGlobalContext:D(s,L.globalContext,U.setContext,"set-global-context"),getGlobalContext:D(s,L.globalContext,U.getContext,"get-global-context"),setGlobalContextProperty:D(s,L.globalContext,U.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:D(s,L.globalContext,U.removeContextProperty,"remove-global-context-property"),clearGlobalContext:D(s,L.globalContext,U.clearContext,"clear-global-context"),setUser:D(s,L.userContext,U.setContext,"set-user"),getUser:D(s,L.userContext,U.getContext,"get-user"),setUserProperty:D(s,L.userContext,U.setContextProperty,"set-user-property"),removeUserProperty:D(s,L.userContext,U.removeContextProperty,"remove-user-property"),clearUser:D(s,L.userContext,U.clearContext,"clear-user"),setAccount:D(s,L.accountContext,U.setContext,"set-account"),getAccount:D(s,L.accountContext,U.getContext,"get-account"),setAccountProperty:D(s,L.accountContext,U.setContextProperty,"set-account-property"),removeAccountProperty:D(s,L.accountContext,U.removeContextProperty,"remove-account-property"),clearAccount:D(s,L.accountContext,U.clearContext,"clear-account"),startView:e=>{let t=(0,I.uC)("view");(0,x.um)(()=>{a.startView({..."object"==typeof e?e:{name:e},handlingStack:t}),(0,T.Q6)({feature:"start-view"})})},stopSession:(0,x.dm)(()=>{a.stopSession(),(0,T.Q6)({feature:"stop-session"})}),addFeatureFlagEvaluation:(0,x.dm)((e,t)=>{a.addFeatureFlagEvaluation((0,R.a)(e),(0,R.a)(t)),(0,T.Q6)({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:(0,x.dm)(()=>e.getSessionReplayLink()),startSessionReplayRecording:(0,x.dm)(t=>{e.start(t),(0,T.Q6)({feature:"start-session-replay-recording",force:t&&t.force})}),stopSessionReplayRecording:(0,x.dm)(()=>e.stop()),addDurationVital:(e,t)=>{let r=(0,I.uC)("vital");(0,x.um)(()=>{(0,T.Q6)({feature:"add-duration-vital"}),a.addDurationVital({id:M(),name:(0,R.a)(e),type:J.DURATION,startClocks:(0,b.jR)(t.startTime),duration:t.duration,context:(0,R.a)(t&&t.context),description:(0,R.a)(t&&t.description),handlingStack:r})})},startDurationVital:(e,t)=>{let r=(0,I.uC)("vital");return(0,x.um)(()=>((0,T.Q6)({feature:"start-duration-vital"}),a.startDurationVital((0,R.a)(e),{context:(0,R.a)(t&&t.context),description:(0,R.a)(t&&t.description),handlingStack:r})))},stopDurationVital:(0,x.dm)((e,t)=>{(0,T.Q6)({feature:"stop-duration-vital"}
6),a.stopDurationVital("string"==typeof e?(0,R.a)(e):e,{context:(0,R.a)(t&&t.context),description:(0,R.a)(t&&t.description)})}),startFeatureOperation:(e,t)=>{let r=(0,I.uC)("vital");(0,x.um)(()=>{(0,T.Q6)({feature:"add-operation-step-vital",action_type:"start"}),a.addOperationStepVital(e,"start",{...t,handlingStack:r})})},succeedFeatureOperation:(0,x.dm)((e,t)=>{(0,T.Q6)({feature:"add-operation-step-vital",action_type:"succeed"}),a.addOperationStepVital(e,"end",t)}),failFeatureOperation:(0,x.dm)((e,t,r)=>{(0,T.Q6)({feature:"add-operation-step-vital",action_type:"fail"}),a.addOperationStepVital(e,"end",r,t)})});return l}function iy(e,{session:t,viewContext:r,errorType:n}){let i=t?t.id:"no-session-id",o=[];void 0!==n&&o.push(`error-type=${n}`),r&&(o.push(`seed=${r.id}`),o.push(`from=${r.startClocks.timeStamp}`));let a=function(e){let t=e.site,r=e.subdomain||function(e){switch(e.site){case tt.NW:case tt.dV:return"app";case tt.Bb:return"dd";default:return}}(e);return`https://${r?`${r}.`:""}${t}`}(e),s=`/rum/replay/sessions/${i}`;return`${a}${s}?${o.join("&")}`}function iv(e,t,r,n){let i=(0,n0.sA)([e.profilingEndpointBuilder],e=>{t.notify(14,{error:e}),(0,T.A2)("Error reported to customer",{"error.message":e.message})}),o=r(n);return{async send({event:e,...t}){let r=new FormData,n=(0,na.s)(e);if(!n)throw Error("Failed to serialize event");r.append("event",new Blob([n],{type:"application/json"}),"event.json");let a=n.length;for(let[e,n]of(0,ej.WP)(t)){let t=(0,na.s)(n);if(!t)throw Error("Failed to serialize attachment");let i=await function(e,t){return new Promise(r=>{e.write(t),e.finish(e=>{r(e)})})}(o,t);a+=i.outputBytesCount,r.append(e,new Blob([i.output]),e)}i.send({data:r,bytesCount:a})}}}},44510:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});let n=(0,r(15714).A)("product")},46676:(e,t,r)=>{"use strict";r.d(t,{AK:()=>_,sA:()=>b});var n=r(33083),i=r(90198),o=r(61885),a=r(5489),s=r(74349),l=r(32068),c=r(74394),u=r(73411);let d=80*a._m,p=20*a.iH,h=l.iW,f=l.OY;function g(e,t,r,n,i,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?m(e,t,r,o,{onSuccess:()=>y(0,t,r,n,i,o),onFailure:()=>{t.queuedPayloads.enqueue(e)||o.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),function e(t,r,n,i,o){2===t.transportStatus&&(0,s.wg)(()=>{m(t.queuedPayloads.first(),t,r,o,{onSuccess:()=>{t.queuedPayloads.dequeue(),t.currentBackoffTime=f,y(1,t,r,n,i,o)},onFailure:()=>{t.currentBackoffTime=Math.min(h,2*t.currentBackoffTime),e(t,r,n,i,o)}})},t.currentBackoffTime)}(t,r,n,i,o)}}):t.queuedPayloads.enqueue(e)||o.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function m(e,t,r,n,{onSuccess:i,onFailure:o}){t.bandwidthMonitor.add(e),r(e,r=>{var a;t.bandwidthMonitor.remove(e),"opaque"!==(a=r).type&&(0===a.status&&!navigator.onLine||408===a.status||429===a.status||(0,c.G)(a.status))?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:r.status},n.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o()):(t.transportStatus=0,n.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function y(e,t,r,n,i,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${n} events size queued for upload: ${p/a.iH}MiB`,source:u.g.AGENT,startClocks:(0,l.M8)()}),t.queueFullReported=!0);let s=t.queuedPayloads;for(t.queuedPayloads=v();s.size()>0;)g(s.dequeue(),t,r,n,i,o)}function v(){let e=[];return{bytesCount:0,enqueue(t){return!this.isFull()&&(e.push(t),this.bytesCount+=t.bytesCount,!0)},first:()=>e[0],dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:()=>e.length,isFull(){return this.bytesCount>=p}}}let _=16*a._m;function b(e,t,r=_){let n=new o.cP,a={transportStatus:0,currentBackoffTime:f,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=d&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:v(),queueFullReported:!1};return{observable:n,send:r=>{for(let i of e)g(r,a,(e,t)=>{S(i,e,t)},i.trackType,t,n)},sendOnExit:t=>{for(let n of e)!function(e,t,r){if(navigator.sendBeacon&&r.bytesCount<t)try{let t=e.build("beacon",r);if(navigator.sendBeacon(t,r.data))return}catch(e){var n;n=e,w||(w=!0,(0,i.Dx)(n))}S(e,r)}(n,r,t)}}}let w=!1;function S(e,t,r){let o=e.build("fetch",t);(0,n.h)(o,{method:"POST",body:t.data,mode:"cors"}).then((0,i.dm)(e=>null==r?void 0:r({status:e.status,type:e.type}))).catch((0,i.dm)(()=>null==r?void 0:r({status:0})))}},47304:(e,t,r)=>{"use strict";r.d(t,{BB:()=>a});var n=r(74349),i=r(90198),o=r(32068);function a(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){let r=window.requestIdleCallback((0,i.dm)(e),t);return()=>window.cancelIdleCallback(r)}var r=e;let a=(0,o.x3)(),s=(0,n.wg)(()=>{r({didTimeout:!1,timeRemaining:()=>Math.max(0,50-((0,o.x3)()-a))})},0);return()=>(0,n.DJ)(s)}},47626:(e,t,r)=>{"use strict";let n;r.d(t,{T:()=>
6o,h:()=>g});var i=r(64111);function o(e){var t,r;let i=[],o=f(e,"stack"),a=String(e);if(o&&o.startsWith(a)&&(o=o.slice(a.length)),o&&o.split("\n").forEach(e=>{let t=function(e){let t=l.exec(e);if(!t)return;let r=t[2]&&0===t[2].indexOf("native"),n=t[2]&&0===t[2].indexOf("eval"),i=c.exec(t[2]);return n&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}(e)||function(e){let t=u.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:t[3]?+t[3]:void 0,url:t[2]}}(e)||function(e){let t=d.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||"?",line:+t[3],url:t[2]}}(e)||function(e){let t=p.exec(e);if(!t)return;let r=t[3]&&t[3].indexOf(" > eval")>-1,n=h.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||"?",line:t[4]?+t[4]:void 0,url:t[3]}}(e);t&&(!t.func&&t.line&&(t.func="?"),i.push(t))}),i.length>0&&function(){if(void 0!==n)return n;class e extends Error{constructor(){super(),this.name="Error"}}let[t,r]=[e,Error].map(e=>new e);return n=y(Object.getPrototypeOf(t))&&r.stack!==t.stack}()&&e instanceof Error){let n=[],o=e;for(;(o=Object.getPrototypeOf(o))&&y(o);){let e=(null==(t=o.constructor)?void 0:t.name)||"?";n.push(e)}for(let e=n.length-1;e>=0&&(null==(r=i[0])?void 0:r.func)===n[e];e--)i.shift()}return{message:f(e,"message"),name:f(e,"name"),stack:i}}let a="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",s="(?::(\\d+))",l=RegExp(`^\\s*at (.*?) ?\\(${a}${s}?${s}?\\)?\\s*$`,"i"),c=RegExp(`\\((\\S*)${s}${s}\\)`),u=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${a}${s}?${s}??\\s*$`,"i"),d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,p=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,h=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function f(e,t){return(0,i.O)(e)&&"string"==typeof e[t]?e[t]:void 0}function g(e,t,r,n){var i;let o,a;if(void 0===t)return;let{name:s,message:l}=(i=e,"[object String]"===({}).toString.call(i)&&([,o,a]=m.exec(i)),{name:o,message:a});return{name:s,message:l,stack:[{url:t,column:n,line:r}]}}let m=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function y(e){return String(e.constructor).startsWith("class ")}},50310:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=[{siteId:40,brand:"tgr",country:"us",url:"https://www.tgr-dev.com",host:"https://us.tgr-dev.com",publicAPI:"https://api.tgr-dev.com",cdn:"https://cdn.tgr-dev.com",accountsEndpoint:"https://account-service-develop.us.tgr-dev.com",environment:"development",supportedCurrencies:["USD","CAD","EUR","AUD","GBP","MXN","AED"],supportedTargetLocales:["en-US","de-DE","fr-FR","en-CA"],targetCountries:["us"],bestSellersCategoryId:"best-sellers",termsArticleId:"terms-of-service",privacyPolicyArticleId:"privacy-policy"},{siteId:30,brand:"myka",country:"ie",url:"https://www.myka-dev.com",host:"https://ie.myka-dev.com",publicAPI:"https://api.myka-dev.com",cdn:"https://cdn.myka-dev.com",accountsEndpoint:"https://account-service-develop.ie.myka-dev.com",environment:"development",supportedCurrencies:["EUR"],supportedTargetLocales:["en-IE"],targetCountries:["ie","uk","au","nz"],crossDomainSEO:40,bestSellersCategoryId:"best-sellers",termsArticleId:"terms-of-service",privacyPolicyArticleId:"privacy-policy"},{siteId:48,brand:"myka",country:"dk",url:"https://www.myka-dev.com/dk",host:"https://dk.myka-dev.com",publicAPI:"https://api.myka-dev.com",cdn:"https://cdn.myka-dev.com",accountsEndpoint:"https://account-service-develop.dk.myka-dev.com",environment:"development",supportedCurrencies:["DKK"],targetCountries:["dk"],xDefaultSiteId:30,bestSellersCategoryId:"populaere-smykker",termsArticleId:"vilkar-og-betingelser",privacyPolicyArticleId:"fortrolighedspolitik"},{siteId:42,brand:"tgr",country:"uk",url:"https://www.tgr-dev.co.uk",host:"https://uk.tgr-dev.com",publicAPI:"https://api.tgr-dev.co.uk",cdn:"https://cdn.tgr-dev.co.uk",accountsEndpoint:"https://account-service-develop.uk.tgr-dev.com",environment:"development",supportedCurrencies:["GBP","EUR"],supportedTargetLocales:["en-IE","en-AU"],targetCountries:["uk","au","ie","nz"],bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:43,brand:"oal",country:"us",url:"https://www.oal-dev.com",host:"https://us.oal-dev.com",publicAPI:"https://api.oal-dev.com",cdn:"https://cdn.oal-dev.com",accountsEndpoint:"https://account-service-develop.us.oal-dev.com",environment:"development",supportedCurrencies:["USD","CAD","EUR","GBP","AUD","NOK","HKD","SGD","JPY"],supportedTargetLocales:["en-AU","en-GB","en-CA"],targetCountries:["au","gb","ca","nz","ie"],bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:495,brand:"lal",country:"us",url:"https://www.lal-dev.com",host:"https://us.lal-dev.com",publicAPI:"https://api.lal-dev.com",cdn:"https://cdn.lal-dev.com",environment:"development",supportedCurrencies:["USD","CAD","AUD","GBP","EUR","SGD"],supportedTargetLocales:["en-CA","en-AU","en-GB","en-IE","de-DE","nl-NL","fr-FR","en-SG"],bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:494,brand:"fem",country:"us",url:"https://www.fem-dev.com",host:"https://us.fem-dev.com",publicAPI:"https://api.fem-dev.com",cdn:"https://cdn.fem-dev.com",environment:"development",supportedCurrencies:["USD"],bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:44,brand:"myka",country:"ie",hreflang:"en-ie",url:"https://www.myka-stg.com",host:"https://us.myka-stg.com",publicAPI:"https://api.myka-stg.com",cdn:"https://cdn.myka-stg.com",accountsEndpoint:"https://account-service-release.us.myka-stg.com",environment:"stage",supportedCurrencies:["USD"],supportedTargetLocales:["en-US","de-DE","fr-FR","en-CA"],targetCountries:["ie","uk","au","nz"],bestSellersCategoryId:"best-sellers",termsArticleId:"terms-of-service",privacyPolicyArticleId:"privacy-policy"},{siteId:49,brand:"myka",country:"dk",url:"https://www.myka-stg.com/dk",host:"https://dk.myka-stg.com",publicAPI:"https://api.myka-stg.com",cdn:"https://cdn.myka-stg.com",accountsEndpoint:"https://account-service-release.dk.myka-stg.com",environment:"stage",supportedCurrencies:["DKK"],targetCountries:["dk"],xDefaultSiteId:30,bestSellersCategoryId:"populaere-smykker",termsArticleId:"vilkar-og-betingelser",privacyPolicyArticleId:"fortrolighedspolitik"},{siteId:45,brand:"oal",country:"us",url:"https://www.oal-stg.com",host:"https://us.oal-stg.com",publicAPI:"https://api.oal-stg.com",cdn:"https://cdn.oal-stg.com",accountsEndpoint:"https://account-service-release.us.oal-stg.com",environment:"stage",supportedCurrencies:["USD","CAD","EUR","GBP","AUD","NOK","HKD","SGD","JPY"],supportedTargetLocales:["en-AU","en-GB"],bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:47,brand:"lal",country:"us",url:"https://www.lal-stg.com",host:"https://us.lal-stg.com",publicAPI:"https://api.lal-stg.com",cdn:"https://cdn.lal-stg.com",environment:"stage",supportedCurrencies:["USD","CAD","AUD","GBP","EUR","SGD"],supportedTargetLocales:["en-CA","en-AU","en-GB","en-IE","de-DE","nl-NL","fr-FR","en-SG"],bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:51,brand:"tgr",country:"us",url:"https://www.theograce.com",hreflang:"en-us",host:"https://us.theograce.com",accountsEndpoint:"https://accounts-us.theograce.com",environment:"production",supportedCurrencies:["USD","CAD","EUR","AUD","GBP","MXN","AED"],supportedTargetLocales:["en-CA"],targetCountries:["us"],publicAPI:"https://api.theograce.com",cdn:"https://cdn.theograce.com",bestSellersCategoryId:"best-sellers",termsArticleId:"terms-of-service",privacyPolicyArticleId:"privacy-policy"},{siteId:75,brand:"myka",country:"ch",url:"https://www.myka.com/ch",hreflang:"de-ch",host:"https://ch.myka.com",accountsEndpoint:"https://accounts-ch.myka.com",environment:"production",supportedCurrencies:["CHF"],targetCountries:["ch"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"schmuck-bestseller",termsArticleId:"allgemeine-geschaftsbedingungen-agb",privacyPolicyArticleId:"datenschutzpolitik"},{siteId:63,brand:"tgr",country:"de",url:"https://www.theograce.de",hreflang:"de-de",host:"https://de.theograce.com",accountsEndpoint:"https://accounts-de.theograce.de",environment:"production",formerBrandName:"MYKA",supportedCurrencies:["EUR","CHF"],targetCountries:["de","at","lu"],publicAPI:"https://api.theograce.de",cdn:"https://cdn.theograce.de",bestSellersCategoryId:"schmuck-bestseller",termsArticleId:"allgemeine-geschaftsbedingungen-agb",privacyPolicyArticleId:"datenschutzpolitik"},{siteId:91,brand:"myka",country:"dk",url:"https://www.myka.com/dk",hreflang:"da-dk",host:"https://dk.myka.com",accountsEndpoint:"https://accounts-dk.myka.com",environment:"production",supportedCurrencies:["DKK"],targetCountries:["dk"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"populaere-smykker",termsArticleId:"vilkar-og-betingelser",privacyPolicyArticleId:"fortrolighedspolitik"},{siteId:65,brand:"myka",country:"es",url:"https://www.myka.com/es",hreflang:"es-es",host:"https://es.myka.com",accountsEndpoint:"https://accounts-es.myka.com",environment:"production",supportedCurrencies:["EUR","MXN"],targetCountries:["es","ad"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"lo-mas-vendido",termsArticleId:"terminos-y-condiciones",privacyPolicyArticleId:"politica-de-privacidad"},{siteId:93,brand:"myka",country:"fi",url:"https://www.myka.com/fi",hreflang:"fi-fi",host:"https://fi.myka.com",accountsEndpoint:"https://accounts-fi.myka.com",environment:"production",supportedCurrencies:["EUR"],targetCountries:["fi"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"suosituimmat",termsArticleId:"ehdot-ja-saannot",privacyPolicyArticleId:"tietosuojakaytanto"},{siteId:62,brand:"myka",country:"fr",url:"https://www.myka.com/fr",hreflang:"fr-fr",host:"https://fr.myka.com",accountsEndpoint:"https://accounts-fr.myka.com",environment:"production",supportedCurrencies:["EUR"],supportedTargetLocales:["fr-BE"],targetCountries:["fr","be","mc"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"meilleures-ventes",termsArticleId:"conditions-generales-de-vente",privacyPolicyArticleId:"politique-de-confidentialite"},{siteId:79,brand:"myka",country:"ie",url:"https://www.myka.com",hreflang:"en-ie",host:"https://ie.myka.com",accountsEndpoint:"https://accounts-ie.myka.com",environment:"production",supportedCurrencies:["EUR"],targetCountries:["ie","au","uk","nz"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,crossDomainSEO:51,bestSellersCategoryId:"best-sellers",termsArticleId:"terms-of-service",privacyPolicyArticleId:"privacy-policy"},{siteId:64,brand:"myka",country:"it",url:"https://www.myka.com/it",hreflang:"it-it",host:"https://it.myka.com",accountsEndpoint:"https://accounts-it.myka.com",environment:"production",supportedCurrencies:["EUR"],targetCountries:["it","sm","va"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"i-gioielli-personalizzati-piu-venduti",termsArticleId:"termini-e-condizioni",privacyPolicyArticleId:"politica-sulla-privacy"},{siteId:94,brand:"tgr",country:"mx",url:"https://www.theograce.mx",hreflang:"es-mx",host:"https://mx.theograce.com",accountsEndpoint:"https://accounts-mx.theograce.mx",environment:"production",formerBrandName:"MYKA",supportedCurrencies:["MXN"],targetCountries:["mx","co"],publicAPI:"https://api.theograce.mx",cdn:"https://cdn.theograce.mx",bestSellersCategoryId:"los-mas-vendidos",termsArticleId:"terminos-y-condiciones",privacyPolicyArticleId:"politica-de-privacidad"},{siteId:81,brand:"myka",country:"nl",url:"https://www.myka.com/nl",hreflang:"nl-nl",host:"https://nl.myka.com",accountsEndpoint:"https://accounts-nl.myka.com",environment:"production",supportedCurrencies:["EUR"],targetCountries:["nl"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"best-verkochte-sieraden",termsArticleId:"5131",privacyPolicyArticleId:"privacybeleid"},{siteId:84,brand:"myka",country:"no",url:"https://www.myka.com/no",hreflang:"nb-no",host:"https://no.myka.com",accountsEndpoint:"https://accounts-no.myka.com",environment:"production",supportedCurrencies:["NOK"],targetCountries:["no"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"bestselgere",termsArticleId:"vilkar-og-betingelser",privacyPolicyArticleId:"personvernerklaering"},{siteId:67,brand:"myka",country:"se",url:"https://www.myka.com/se",hreflang:"sv-se",host:"https://se.myka.com",accountsEndpoint:"https://accounts-se.myka.com",environment:"production",supportedCurrencies:["SEK"],targetCountries:["se"],publicAPI:"https://api.myka.com",cdn:"https://cdn.myka.com",xDefaultSiteId:79,bestSellersCategoryId:"smycken-baestsaeljare",termsArticleId:"myka-allmanna-villkor",privacyPolicyArticleId:"integritetsmeddelande"},{siteId:61,brand:"tgr",country:"uk",url:"https://www.theograce.co.uk",hreflang:"en-gb",host:"https://uk.theograce.com",accountsEndpoint:"https://accounts-uk.theograce.co.uk",environment:"production",supportedCurrencies:["GBP","EUR","AUD"],supportedTargetLocales:["en-IE","en-AU"],targetCountries:["uk","ie","nz"],publicAPI:"https://api.theograce.co.uk",cdn:"https://cdn.theograce.co.uk",bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:27,brand:"oal",country:"us",url:"https://www.oakandluna.com",hreflang:"en-us",host:"https://us.oakandluna.com",accountsEndpoint:"https://accounts.oakandluna.com",environment:"production",supportedCurrencies:["USD","CAD","EUR","GBP","AUD","NOK","HKD","SGD","JPY"],supportedTargetLocales:["en-AU","en-CA","en-GB","de-DE","nb-NO","zh-HK","en-SG","ja-JP"],targetCountries:["us"],publicAPI:"https://api.oakandluna.com",cdn:"https://cdn.oakandluna.com",bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:26,brand:"oal",country:"fr",url:"https://www.oakandluna.com/fr",hreflang:"fr-fr",host:"https://fr.oakandluna.com",environment:"production",supportedCurrencies:["EUR"],targetCountries:["fr","be","lu","mc"],publicAPI:"https://api.oakandluna.com",cdn:"https://cdn.oakandluna.com",bestSellersCategoryId:"nos-best-sellers",termsArticleId:"5131",privacyPolicyArticleId:"politique-de-confidentialite"},{siteId:35,brand:"lal",country:"us",url:"https://www.limeandlou.com",host:"https://us.limeandlou.com",environment:"production",supportedCurrencies:["USD","CAD","AUD","GBP","EUR","SGD"],supportedTargetLocales:["en-CA","en-AU","en-GB","en-IE","de-DE","nl-NL","fr-FR","en-SG"],publicAPI:"https://api.limeandlou.com",cdn:"https://cdn.limeandlou.com",bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:28,brand:"sett",country:"us",url:"https://www.settandco.com",host:"https://us.settandco.com",environment:"production",supportedCurrencies:["USD"],publicAPI:"https://api.settandco.com",cdn:"https://cdn.settandco.com",bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:99,brand:"fem",country:"us",url:"https://www.forevermy.com",host:"https://us.forevermy.com",environment:"production",supportedCurrencies:["USD"],publicAPI:"https://api.forevermy.com",cdn:"https://cdn.forevermy.com",bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:52,brand:"mnn",country:"us",url:"https://
6www.mynamenecklace.com",host:"https://us.mynamenecklace.com",environment:"production",supportedCurrencies:["USD"],targetCountries:["us"],publicAPI:"https://api.mynamenecklace.com",cdn:"https://cdn.mynamenecklace.com",bestSellersCategoryId:"best-sellers",termsArticleId:"terms-and-conditions",privacyPolicyArticleId:"privacy-policy"},{siteId:20,brand:"ib",country:"us",url:"https://www.israelblessing.com",host:"https://us.israelblessing.com",environment:"production",supportedCurrencies:["USD","CAD","GBP","EUR","AUD"],supportedTargetLocales:["en-US","en-CA","en-GB","en-AU","en-IE"],publicAPI:"https://api.israelblessing.com",cdn:"https://cdn.israelblessing.com",bestSellersCategoryId:"best-sellers",termsArticleId:"terms-of-service",privacyPolicyArticleId:"privacy-policy",namePreviewDisabled:!0}]},50844:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookie=c,t.parse=c,t.stringifyCookie=function(e,t){let i=t?.encode||encodeURIComponent,o=[];for(let t of Object.keys(e)){let a=e[t];if(void 0===a)continue;if(!r.test(t))throw TypeError(`cookie name is invalid: ${t}`);let s=i(a);if(!n.test(s))throw TypeError(`cookie val is invalid: ${a}`);o.push(`${t}=${s}`)}return o.join("; ")},t.stringifySetCookie=u,t.serialize=u,t.parseSetCookie=function(e,t){let r=t?.decode||f,n=e.length,i=d(e,0,n),o=p(e,0,i),s=-1===o?{name:"",value:r(h(e,0,i))}:{name:h(e,0,o),value:r(h(e,o+1,i))},l=i+1;for(;l<n;){let t=d(e,l,n),r=p(e,l,t),i=-1===r?h(e,l,t):h(e,l,r),o=-1===r?void 0:h(e,r+1,t);switch(i.toLowerCase()){case"httponly":s.httpOnly=!0;break;case"secure":s.secure=!0;break;case"partitioned":s.partitioned=!0;break;case"domain":s.domain=o;break;case"path":s.path=o;break;case"max-age":o&&a.test(o)&&(s.maxAge=Number(o));break;case"expires":if(!o)break;let c=new Date(o);Number.isFinite(c.valueOf())&&(s.expires=c);break;case"priority":if(!o)break;let u=o.toLowerCase();("low"===u||"medium"===u||"high"===u)&&(s.priority=u);break;case"samesite":if(!o)break;let f=o.toLowerCase();("lax"===f||"strict"===f||"none"===f)&&(s.sameSite=f)}l=t+1}return s},t.stringifySetCookie=u,t.serialize=u;let r=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,a=/^-?\d+$/,s=Object.prototype.toString,l=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function c(e,t){let r=new l,n=e.length;if(n<2)return r;let i=t?.decode||f,o=0;do{let t=p(e,o,n);if(-1===t)break;let a=d(e,o,n);if(t>a){o=e.lastIndexOf(";",t-1)+1;continue}let s=h(e,o,t);void 0===r[s]&&(r[s]=i(h(e,t+1,a))),o=a+1}while(o<n);return r}function u(e,t,a){let l="object"==typeof e?e:{...a,name:e,value:String(t)},c=("object"==typeof t?t:a)?.encode||encodeURIComponent;if(!r.test(l.name))throw TypeError(`argument name is invalid: ${l.name}`);let u=l.value?c(l.value):"";if(!n.test(u))throw TypeError(`argument val is invalid: ${l.value}`);let d=l.name+"="+u;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw TypeError(`option maxAge is invalid: ${l.maxAge}`);d+="; Max-Age="+l.maxAge}if(l.domain){if(!i.test(l.domain))throw TypeError(`option domain is invalid: ${l.domain}`);d+="; Domain="+l.domain}if(l.path){if(!o.test(l.path))throw TypeError(`option path is invalid: ${l.path}`);d+="; Path="+l.path}if(l.expires){var p;if(p=l.expires,"[object Date]"!==s.call(p)||!Number.isFinite(l.expires.valueOf()))throw TypeError(`option expires is invali
6d: ${l.expires}`);d+="; Expires="+l.expires.toUTCString()}if(l.httpOnly&&(d+="; HttpOnly"),l.secure&&(d+="; Secure"),l.partitioned&&(d+="; Partitioned"),l.priority)switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw TypeError(`option priority is invalid: ${l.priority}`)}if(l.sameSite)switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw TypeError(`option sameSite is invalid: ${l.sameSite}`)}return d}function d(e,t,r){let n=e.indexOf(";",t);return -1===n?r:n}function p(e,t,r){let n=e.indexOf("=",t);return n<r?n:-1}function h(e,t,r){let n=t,i=r;do{let t=e.charCodeAt(n);if(32!==t&&9!==t)break}while(++n<i);for(;i>n;){let t=e.charCodeAt(i-1);if(32!==t&&9!==t)break;i--}return e.slice(n,i)}function f(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},51284:(e,t,r)=>{"use strict";r.d(t,{Y:()=>ei});class n extends Error{}n.prototype.name="InvalidTokenError";var i,o,a={debug:()=>void 0,info:()=>void 0,warn:()=>void 0,error:()=>void 0},s=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(s||{});(e=>{e.reset=function(){i=3,o=a},e.setLevel=function(e){if(!(0<=e&&e<=4))throw Error("Invalid log level");i=e},e.setLogger=function(e){o=e}})(s||(s={}));var l=class e{constructor(e){this._name=e}debug(...t){i>=4&&o.debug(e._format(this._name,this._method),...t)}info(...t){i>=3&&o.info(e._format(this._name,this._method),...t)}warn(...t){i>=2&&o.warn(e._format(this._name,this._method),...t)}error(...t){i>=1&&o.error(e._format(this._name,this._method),...t)}throw(e){throw this.error(e),e}create(e){let t=Object.create(this);return t._method=e,t.debug("begin"),t}static createStatic(t,r){let n=new e(`${t}.${r}`);return n.debug("begin"),n}static _format(e,t){let r=`[${e}]`;return t?`${r} ${t}:`:r}static debug(t,...r){i>=4&&o.debug(e._format(t),...r)}static info(t,...r){i>=3&&o.info(e._format(t),...r)}static warn(t,...r){i>=2&&o.warn(e._format(t),...r)}static error(t,...r){i>=1&&o.error(e._format(t),...r)}};s.reset();var c=class{static decode(e){try{return function(e,t){let r;if("string"!=typeof e)throw new n("Invalid token specified: must be a string");t||(t={});let i=+(!0!==t.header),o=e.split(".")[i];if("string"!=typeof o)throw new n(`Invalid token specified: missing part #${i+1}`);try{r=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var r;
6return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(o)}catch(e){throw new n(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new n(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}(e)}catch(e){throw l.error("JwtUtils.decode",e),e}}static async generateSignedJwt(e,t,r){let n=p.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))),i=p.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))),o=`${n}.${i}`,a=await window.crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},r,new TextEncoder().encode(o)),s=p.encodeBase64Url(new Uint8Array(a));return`${o}.${s}`}static async generateSignedJwtWithHmac(e,t,r){let n=p.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))),i=p.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))),o=`${n}.${i}`,a=await window.crypto.subtle.sign("HMAC",r,new TextEncoder().encode(o)),s=p.encodeBase64Url(new Uint8Array(a));return`${o}.${s}`}},u=e=>btoa([...new Uint8Array(e)].map(e=>String.fromCharCode(e)).join("")),d=class e{static _randomWord(){let e=new Uint32Array(1);return crypto.getRandomValues(e),e[0]}static generateUUIDv4(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(t^e._randomWord()&15>>t/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return e.generateUUIDv4()+e.generateUUIDv4()+e.generateUUIDv4()}static async generateCodeChallenge(e){if(!crypto.subtle)throw Error("Crypto.subtle is available only in secure contexts (HTTPS).");try{let t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",t);return u(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(e){throw l.error("CryptoUtils.generateCodeChallenge",e),e}}static generateBasicAuth(e,t){return u(new TextEncoder().encode([e,t].join(":")))}static async hash(e,t){let r=new TextEncoder().encode(t);return new Uint8Array(await crypto.subtle.digest(e,r))}static async customCalculateJwkThumbprint(t){let r;switch(t.kty){case"RSA":r={e:t.e,kty:t.kty,n:t.n};break;case"EC":r={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":r={crv:t.crv,kty:t.kty,x:t.x};break;case"oct":r={crv:t.k,kty:t.kty};break;default:throw Error("Unknown jwk type")}let n=await e.hash("SHA-256",JSON.stringify(r));return e.encodeBase64Url(n)}static async generateDPoPProof({url:t,accessToken:r,httpMethod:n,keyPair:i,nonce:o}){let a,s={jti:window.crypto.randomUUID(),htm:null!=n?n:"GET",htu:t,iat:Math.floor(Date.now()/1e3)};r&&(a=await e.hash("SHA-256",r),s.ath=e.encodeBase64Url(a)),o&&(s.nonce=o);try{let e=await crypto.subtle.exportKey("jwk",i.publicKey),t={alg:"ES256",typ:"dpop+jwt",jwk:{crv:e.crv,kty:e.kty,x:e.x,y:e.y}};return await c.generateSignedJwt(t,s,i.privateKey)}catch(e){if(e instanceof TypeError)throw Error(`Error exporting dpop public key: ${e.message}`);throw e}}static async generateDPoPJkt(t){try{let r=await crypto.subtle.exportKey("jwk",t.publicKey);return await e.customCalculateJwkThumbprint(r)}catch(e){if(e instanceof TypeError)throw Error(`Could not retrieve dpop keys from storage: ${e.message}`);throw e}}static async generateDPoPKeys(){return await window.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"])}static async generateClientAssertionJwt(t,r,n,i="HS256"){let o=Math.floor(Date.now()/1e3),a={iss:t,sub:t,aud:n,jti:e.generateUUIDv4(),exp:o+300,iat:o},s={HS256:"SHA-256",HS384:"SHA-384",HS512:"SHA-512"}[i];if(!s)throw Error(`Unsupported algorithm: ${i}. Supported algorithms are: HS256, HS384, HS512`);let l=new TextEncoder,u=await crypto.subtle.importKey("raw",l.encode(r),{name:"HMAC",hash:s},!1,["sign"]);return await c.generateSignedJwtWithHmac({alg:i,typ:"JWT"},a,u)}};d.encodeBase64Url=e=>u(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_");var p=d,h=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new l(`Event('${this._name}')`)}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){let t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}
6async raise(...e){for(let t of(this._logger.debug("raise:",...e),this._callbacks))await t(...e)}},f=class{static center({...e}){var t;return null==e.width&&(e.width=null!=(t=[800,720,600,480].find(e=>e<=window.outerWidth/1.618))?t:360),null!=e.left||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),null!=e.height&&(null!=e.top||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`${e}=${"boolean"!=typeof t?t:t?"yes":"no"}`).join(",")}},g=class e extends h{constructor(){super(...arguments),this._logger=new l(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{let t=this._expiration-e.getEpochTime();this._logger.debug("timer completes in",t),this._expiration<=e.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){let r=this._logger.create("init");t=Math.max(Math.floor(t),1);let n=e.getEpochTime()+t;if(this.expiration===n&&this._timerHandle)return void r.debug("skipping since already initialized for expiration at",this.expiration);this.cancel(),r.debug("using duration",t),this._expiration=n;let i=Math.min(t,5);this._timerHandle=setInterval(this._callback,1e3*i)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},m=class{static readParams(e,t="query"){if(!e)throw TypeError("Invalid URL");return new URLSearchParams(new URL(e,"http://127.0.0.1")["fragment"===t?"hash":"search"].slice(1))}},y=class extends Error{constructor(e,t){var r,n,i;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw l.error("ErrorResponse","No error passed"),Error("No error passed");this.error=e.error,this.error_description=null!=(r=e.error_description)?r:null,this.error_uri=null!=(n=e.error_uri)?n:null,this.state=e.userState,this.session_state=null!=(i=e.session_state)?i:null,this.url_state=e.url_state}},v=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},_=class{constructor(e){this._logger=new l("AccessTokenEvents"),this._expiringTimer=new g("Access token expiring"),this._expiredTimer=new g("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}async load(e){let t=this._logger.create("load");if(e.access_token&&void 0!==e.expires_in){let r=e.expires_in;if(t.debug("access token present, remaining duration:",r),r>0){let e=r-this._expiringNotificationTimeInSeconds;e<=0&&(e=1),t.debug("registering expiring timer, raising in",e,"seconds"),this._expiringTimer.init(e)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();let n=r+1;t.debug("registering expired timer, raising in",n,"seconds"),this._expiredTimer.init(n)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}async unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},b=class{constructor(e,t,r,n,i){this._callback=e,this._client_id=t,this._intervalInSeconds=n,this._stopOnError=i,this._logger=new l("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=e=>{e.origin===this._frame_origin&&e.source===this._frame.contentWindow&&("error"===e.data?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):"changed"===e.data?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(e.data+" message from check session op iframe"))};let o=new URL(r);this._frame_origin=o.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=o.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;let t=()=>{this._frame.contentWindow&&this._session_state&&this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,1e3*this._intervalInSeconds)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},w=class{constructor(){this._logger=new l("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}}
6,S=class extends Error{constructor(e,t){super(t),this.name="ErrorDPoPNonce",this.nonce=e}},k=class{constructor(e=[],t=null,r={}){this._jwtHandler=t,this._extraHeaders=r,this._logger=new l("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){let{timeoutInSeconds:r,...n}=t;if(!r)return await fetch(e,n);let i=new AbortController,o=setTimeout(()=>i.abort(),1e3*r);try{return await fetch(e,{...t,signal:i.signal})}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)throw new v("Network timed out");throw e}finally{clearTimeout(o)}}async getJson(e,{token:t,credentials:r,timeoutInSeconds:n}={}){let i,o,a=this._logger.create("getJson"),s={Accept:this._contentTypes.join(", ")};t&&(a.debug("token passed, setting Authorization header"),s.Authorization="Bearer "+t),this._appendExtraHeaders(s);try{a.debug("url:",e),i=await this.fetchWithTimeout(e,{method:"GET",headers:s,timeoutInSeconds:n,credentials:r})}catch(e){throw a.error("Network Error"),e}a.debug("HTTP response received, status",i.status);let l=i.headers.get("Content-Type");if(l&&!this._contentTypes.find(e=>l.startsWith(e))&&a.throw(Error(`Invalid response Content-Type: ${null!=l?l:"undefined"}, from URL: ${e}`)),i.ok&&this._jwtHandler&&(null==l?void 0:l.startsWith("application/jwt")))return await this._jwtHandler(await i.text());try{o=await i.json()}catch(e){if(a.error("Error parsing JSON response",e),i.ok)throw e;throw Error(`${i.statusText} (${i.status})`)}if(!i.ok){if(a.error("Error from server:",o),o.error)throw new y(o);throw Error(`${i.statusText} (${i.status}): ${JSON.stringify(o)}`)}return o}async postForm(e,{body:t,basicAuth:r,timeoutInSeconds:n,initCredentials:i,extraHeaders:o}){let a,s=this._logger.create("postForm"),l={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded",...o};void 0!==r&&(l.Authorization="Basic "+r),this._appendExtraHeaders(l);try{s.debug("url:",e),a=await this.fetchWithTimeout(e,{method:"POST",headers:l,body:t,timeoutInSeconds:n,credentials:i})}catch(e){throw s.error("Network error"),e}s.debug("HTTP response received, status",a.status);let c=a.headers.get("Content-Type");if(c&&!this._contentTypes.find(e=>c.startsWith(e)))throw Error(`Invalid response Content-Type: ${null!=c?c:"undefined"}, from URL: ${e}`);let u=await a.text(),d={};if(u)try{d=JSON.parse(u)}catch(e){if(s.error("Error parsing JSON response",e),a.ok)throw e;throw Error(`${a.statusText} (${a.status})`)}if(!a.ok){if(s.error("Error from server:",d),a.headers.has("dpop-nonce"))throw new S(a.headers.get("dpop-nonce"),`${JSON.stringify(d)}`);if(d.error)throw new y(d,t);throw Error(`${a.statusText} (${a.status}): ${JSON.stringify(d)}`)}return d}_appendExtraHeaders(e){let t=this._logger.create("appendExtraHeaders"),r=Object.keys(this._extraHeaders),n=["accept","content-type"],i=["authorization"];0!==r.length&&r.forEach(r=>{if(n.includes(r.toLocaleLowerCase()))return void t.warn("Protected header could not be set",r,n);if(i.includes(r.toLocaleLowerCase())&&Object.keys(e).includes(r))return void t.warn("Header could not be overridden",r,i);let o="function"==typeof this._extraHeaders[r]?this._extraHeaders[r]():this._extraHeaders[r];o&&""!==o&&(e[r]=o)})}},C=class{constructor(e){this._settings=e,this._logger=new l("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new k(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){let e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);let t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},t,this._settings.metadataSeed),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){let r=this._logger.create(`_getMetadataProperty('${e}')`),n=await this.getMetadata();if(r.debug("resolved"),void 0===n[e]){if(!0===t)return void r.warn("Metadata does not contain optional property");r.throw(Error("Metadata does not contain property "+e))}return n[e]}async getSigningKeys(){let e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;let t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);let r=await this._jsonService.getJson(t,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug("got key set",r),!Array.isArray(r.keys))throw e.throw(Error("Missing keys on keyset")),null;return this._signingKeys=r.keys,this._signingKeys}},E=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new l("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;let t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");let e=await this._store.length,t=[];for(let r=0;r<e;r++){let e=await this._store.key(r);
6e&&0===e.indexOf(this._prefix)&&t.push(e.substr(this._prefix.length))}return t}},A=class{constructor({authority:e,metadataUrl:t,metadata:r,signingKeys:n,metadataSeed:i,client_id:o,client_secret:a,response_type:s="code",scope:l="openid",redirect_uri:c,post_logout_redirect_uri:u,client_authentication:d="client_secret_post",token_endpoint_auth_signing_alg:p="HS256",prompt:h,display:f,max_age:g,ui_locales:m,acr_values:y,resource:v,response_mode:_,filterProtocolClaims:b=!0,loadUserInfo:S=!1,requestTimeoutInSeconds:k,staleStateAgeInSeconds:C=900,mergeClaimsStrategy:A={array:"replace"},disablePKCE:I=!1,stateStore:x,revokeTokenAdditionalContentTypes:T,fetchRequestCredentials:P,refreshTokenAllowedScope:O,extraQueryParams:R={},extraTokenParams:N={},extraHeaders:D={},dpop:L,omitScopeWhenRequesting:U=!1}){var M;if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith("/")||(this.metadataUrl+="/"),this.metadataUrl+=".well-known/openid-configuration")),this.metadata=r,this.metadataSeed=i,this.signingKeys=n,this.client_id=o,this.client_secret=a,this.response_type=s,this.scope=l,this.redirect_uri=c,this.post_logout_redirect_uri=u,this.client_authentication=d,this.token_endpoint_auth_signing_alg=p,this.prompt=h,this.display=f,this.max_age=g,this.ui_locales=m,this.acr_values=y,this.resource=v,this.response_mode=_,this.filterProtocolClaims=null==b||b,this.loadUserInfo=!!S,this.staleStateAgeInSeconds=C,this.mergeClaimsStrategy=A,this.omitScopeWhenRequesting=U,this.disablePKCE=!!I,this.revokeTokenAdditionalContentTypes=T,this.fetchRequestCredentials=P||"same-origin",this.requestTimeoutInSeconds=k,x)this.stateStore=x;else{let e="undefined"!=typeof window?window.localStorage:new w;this.stateStore=new E({store:e})}if(this.refreshTokenAllowedScope=O,this.extraQueryParams=R,this.extraTokenParams=N,this.extraHeaders=D,this.dpop=L,this.dpop&&!(null==(M=this.dpop)?void 0:M.store))throw Error("A DPoPStore is required when dpop is enabled")}},I=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new l("UserInfoService"),this._getClaimsFromJwt=async e=>{let t=this._logger.create("_getClaimsFromJwt");try{let r=c.decode(e);return t.debug("JWT decoding successful"),r}catch(e){throw t.error("Error parsing JWT response"),e}},this._jsonService=new k(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){let t=this._logger.create("getClaims");e||this._logger.throw(Error("No token passed"));let r=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",r);let n=await this._jsonService.getJson(r,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return t.debug("got claims",n),n}},x=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new l("TokenClient"),this._jsonService=new k(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:r=this._settings.client_id,client_secret:n=this._settings.client_secret,extraHeaders:i,...o}){let a,s=this._logger.create("exchangeCode");r||s.throw(Error("A client_id is required")),t||s.throw(Error("A redirect_uri is required")),o.code||s.throw(Error("A code is required"));let l=new URLSearchParams({grant_type:e,redirect_uri:t});for(let[e,t]of Object.entries(o))null!=t&&l.set(e,t);if(("client_secret_basic"===this._settings.client_authentication||"client_secret_jwt"===this._settings.client_authentication)&&null==n)throw s.throw(Error("A client_secret is required")),null;let c=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case"client_secret_basic":a=p.generateBasicAuth(r,n);break;case"client_secret_post":l.append("client_id",r),n&&l.append("client_secret",n);break;case"client_secret_jwt":{let e=await p.generateClientAssertionJwt(r,n,c,this._settings.token_endpoint_auth_signing_alg);l.append("client_id",r),l.append("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),l.append("client_assertion",e)}}s.debug("got token endpoint");let u=await this._jsonService.postForm(c,{body:l,basicAuth:a,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return s.debug("got response"),u}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:r=this._settings.client_secret,scope:n=this._settings.scope,...i}){let o,a=this._logger.create("exchangeCredentials");t||a.throw(Error("A client_id is required"));let s=new URLSearchParams({grant_type:e});for(let[e,t]of(this._settings.omitScopeWhenRequesting||s.set("scope",n),Object.entries(i)))null!=t&&s.set(e,t);if(("client_secret_basic"===this._settings.client_authentication||"client_secret_jwt"===this._settings.client_authentication)&&null==r)throw a.throw(Error("A client_secret is required")),null;let l=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case"client_secret_basic":o=p.generateBasicAuth(t,r);break;case"client_secret_post":s.append("client_id",t),r&&s.append("client_secret",r);break;case"client_secret_jwt":{let e=await p.generateClientAssertionJwt(t,r,l,this._settings.token_endpoint_auth_signing_alg);s.append("client_id",t),s.append("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),s.append("client_assertion",e)}}a.debug("got token endpoint");let c=await this._jsonService.postForm(l,{body:s,basicAuth:o,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return a.debug("got response"),c}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:r=this._settings.client_secret,timeoutInSeconds:n,extraHeaders:i,...o}){let a,s=this._logger.create("exchangeRefreshToken");t||s.throw(Error("A client_id is required")),o.refresh_token||s.throw(Error("A refresh_token is required"));let l=new URLSearchParams({grant_type:e});for(let[e,t]of Object.entries(o))Array.isArray(t)?t.forEach(t=>l.append(e,t)):null!=t&&l.set(e,t);if(("client_secret_basic"===this._settings.client_authentication||"client_secret_jwt"===this._settings.client_authentication)&&null==r)throw s.throw(Error("A client_secret is required")),null;
6let c=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case"client_secret_basic":a=p.generateBasicAuth(t,r);break;case"client_secret_post":l.append("client_id",t),r&&l.append("client_secret",r);break;case"client_secret_jwt":{let e=await p.generateClientAssertionJwt(t,r,c,this._settings.token_endpoint_auth_signing_alg);l.append("client_id",t),l.append("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),l.append("client_assertion",e)}}s.debug("got token endpoint");let u=await this._jsonService.postForm(c,{body:l,basicAuth:a,timeoutInSeconds:n,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return s.debug("got response"),u}async revoke(e){var t;let r=this._logger.create("revoke");e.token||r.throw(Error("A token is required"));let n=await this._metadataService.getRevocationEndpoint(!1);r.debug(`got revocation endpoint, revoking ${null!=(t=e.token_type_hint)?t:"default token type"}`);let i=new URLSearchParams;for(let[t,r]of Object.entries(e))null!=r&&i.set(t,r);i.set("client_id",this._settings.client_id),this._settings.client_secret&&i.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(n,{body:i,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),r.debug("got response")}},T=class{constructor(e,t,r){this._settings=e,this._metadataService=t,this._claimsService=r,this._logger=new l("ResponseValidator"),this._userInfoService=new I(this._settings,this._metadataService),this._tokenClient=new x(this._settings,this._metadataService)}async validateSigninResponse(e,t,r){let n=this._logger.create("validateSigninResponse");this._processSigninState(e,t),n.debug("state processed"),await this._processCode(e,t,r),n.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e,"",t.nonce),n.debug("tokens validated"),await this._processClaims(e,null==t?void 0:t.skipUserInfo,e.isOpenId),n.debug("claims processed")}async validateCredentialsResponse(e,t){let r=this._logger.create("validateCredentialsResponse"),n=e.isOpenId&&!!e.id_token;n&&this._validateIdTokenAttributes(e),r.debug("tokens validated"),await this._processClaims(e,t,n),r.debug("claims processed")}async validateRefreshResponse(e,t){let r=this._logger.create("validateRefreshResponse");e.userState=t.data,null!=e.session_state||(e.session_state=t.session_state),null!=e.scope||(e.scope=t.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),r.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);let n=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,n),r.debug("claims processed")}validateSignoutResponse(e,t){let r=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&r.throw(Error("State does not match")),r.debug("state validated"),e.userState=t.data,e.error)throw r.warn("Response was error",e.error),new y(e)}_processSigninState(e,t){let r=this._logger.create("_processSigninState");if(t.id!==e.state&&r.throw(Error("State does not match")),t.client_id||r.throw(Error("No client_id on state")),t.authority||r.throw(Error("No authority on state")),this._settings.authority!==t.authority&&r.throw(Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&r.throw(Error("client_id mismatch on settings vs. signin state")),r.debug("state validated"),e.userState=t.data,e.url_state=t.url_state,null!=e.scope||(e.scope=t.scope),e.error)throw r.warn("Response was error",e.error),new y(e);t.code_verifier&&!e.code&&r.throw(Error("Expected code in response"))}async _processClaims(e,t=!1,r=!0){let n=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token)return void n.debug("not loading user info");n.debug("loading user info");let i=await this._userInfoService.getClaims(e.access_token);n.debug("user info claims received from user info endpoint"),r&&i.sub!==e.profile.sub&&n.throw(Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(i)),n.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t,r){let n=this._logger.create("_processCode");if(e.code){n.debug("Validating code");let i=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,extraHeaders:r,...t.extraTokenParams});Object.assign(e,i)}else n.debug("No code to process")}_validateIdTokenAttributes(e,t,r){var n;let i=this._logger.create("_validateIdTokenAttributes");i.debug("decoding ID Token JWT");let o=c.decode(null!=(n=e.id_token)?n:"");if(o.sub||i.throw(Error("ID Token is missing a subject claim")),r&&o.nonce!==r&&i.throw(Error("nonce in id_token does not match nonce in client storage")),t){let e=c.decode(t);o.sub!==e.sub&&i.throw(Error("sub in id_token does not match current sub")),o.auth_time&&o.auth_time!==e.auth_time&&i.throw(Error("auth_time in id_token does not match original auth_time")),o.azp&&o.azp!==e.azp&&i.throw(Error("azp in id_token does not match original azp")),!o.azp&&e.azp&&i.throw(Error("azp not in id_token, but present in original id_token"))}e.profile=o}},P=class e{constructor(e){this.id=e.id||p.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=g.getEpochTime(),this.request_type=e.request_type,this.url_state=e.url_state}toStorageString(){return new l("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return l.createStatic("State","fromStorageString"),Promise.resolve(new e(JSON.parse(t)))}static async clearStaleState(t,r){let n=l.createStatic("State","clearStaleState"),i=g.getEpochTime()-r,o=await t.getAllKeys();n.debug("got keys",o);for(let r=0;r<o.length;r++){let a=o[r],s=await t.get(a),l=!1;if(s)try{let t=await e.fromStorageString(s);n.debug("got item from key:",a,t.created),t.created<=i&&(l=!0)}catch(e){n.error("Error parsing state for key:",a,e),l=!0}else n.debug("no item in storage for key:",a),l=!0;l&&(n.debug("removed item for key:",a),t.remove(a))}}},O=class e extends P{constructor(e){super(e),this.code_verifier=e.code_verifier,this.co
6de_challenge=e.code_challenge,this.authority=e.authority,this.client_id=e.client_id,this.redirect_uri=e.redirect_uri,this.scope=e.scope,this.client_secret=e.client_secret,this.extraTokenParams=e.extraTokenParams,this.response_mode=e.response_mode,this.skipUserInfo=e.skipUserInfo,this.nonce=e.nonce}static async create(t){let r=!0===t.code_verifier?p.generateCodeVerifier():t.code_verifier||void 0,n=r?await p.generateCodeChallenge(r):void 0;return new e({...t,code_verifier:r,code_challenge:n})}toStorageString(){return new l("SigninState").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo,nonce:this.nonce})}static fromStorageString(t){l.createStatic("SigninState","fromStorageString");let r=JSON.parse(t);return e.create(r)}},R=class e{constructor(e){this.url=e.url,this.state=e.state}static async create({url:t,authority:r,client_id:n,redirect_uri:i,response_type:o,scope:a,state_data:s,response_mode:l,request_type:c,client_secret:u,nonce:d,url_state:p,resource:h,skipUserInfo:f,extraQueryParams:g,extraTokenParams:m,disablePKCE:y,dpopJkt:v,omitScopeWhenRequesting:_,...b}){if(!t)throw this._logger.error("create: No url passed"),Error("url");if(!n)throw this._logger.error("create: No client_id passed"),Error("client_id");if(!i)throw this._logger.error("create: No redirect_uri passed"),Error("redirect_uri");if(!o)throw this._logger.error("create: No response_type passed"),Error("response_type");if(!a)throw this._logger.error("create: No scope passed"),Error("scope");if(!r)throw this._logger.error("create: No authority passed"),Error("authority");let w=await O.create({data:s,request_type:c,url_state:p,code_verifier:!y,client_id:n,authority:r,redirect_uri:i,response_mode:l,client_secret:u,scope:a,extraTokenParams:m,skipUserInfo:f,nonce:d}),S=new URL(t);S.searchParams.append("client_id",n),S.searchParams.append("redirect_uri",i),S.searchParams.append("response_type",o),_||S.searchParams.append("scope",a),d&&S.searchParams.append("nonce",d),v&&S.searchParams.append("dpop_jkt",v);let k=w.id;for(let[e,t]of(p&&(k=`${k};${p}`),S.searchParams.append("state",k),w.code_challenge&&(S.searchParams.append("code_challenge",w.code_challenge),S.searchParams.append("code_challenge_method","S256")),h&&(Array.isArray(h)?h:[h]).forEach(e=>S.searchParams.append("resource",e)),Object.entries({response_mode:l,...b,...g})))null!=t&&S.searchParams.append(e,t.toString());return new e({url:S.href,state:w})}};R._logger=new l("SigninRequest");var N=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){let e=decodeURIComponent(this.state).split(";");this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(";"))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(void 0!==this.expires_at)return this.expires_at-g.getEpochTime()}set expires_in(e){"string"==typeof e&&(e=Number(e)),void 0!==e&&e>=0&&(this.expires_at=Math.floor(e)+g.getEpochTime())}get isOpenId(){var e;return(null==(e=this.scope)?void 0:e.split(" ").includes("openid"))||!!this.id_token}},D=class{constructor({url:e,state_data:t,id_token_hint:r,post_logout_redirect_uri:n,extraQueryParams:i,request_type:o,client_id:a,url_state:s}){if(this._logger=new l("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),Error("url");let c=new URL(e);if(r&&c.searchParams.append("id_token_hint",r),a&&c.searchParams.append("client_id",a),n&&(c.searchParams.append("post_logout_redirect_uri",n),t||s)){this.state=new P({data:t,request_type:o,url_state:s});let e=this.state.id;s&&(e=`${e};${s}`),c.searchParams.append("state",e)}for(let[e,t]of Object.entries({...i}))null!=t&&c.searchParams.append(e,t.toString());this.url=c.href}},L=class{constructor(e){if(this.state=e.get("state"),this.state){let e=decodeURIComponent(this.state).split(";");this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(";"))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},U=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],M=["sub","iss","aud","exp","iat"],j=class{constructor(e){this._settings=e,this._logger=new l("ClaimsService")}filterProtocolClaims(e){let t={...e};if(this._settings.filterProtocolClaims){for(let e of Array.isArray(this._settings.filterProtocolClaims)?this._settings.filterProtocolClaims:U)M.includes(e)||delete t[e]}return t}mergeClaims(e,t){let r={...e};for(let[e,n]of Object.entries(t))if(r[e]!==n)if(Array.isArray(r[e])||Array.isArray(n))if("replace"==this._settings.mergeClaimsStrategy.array)r[e]=n;else{let t=Array.isArray(r[e])?r[e]:[r[e]];for(let e of Array.isArray(n)?n:[n])t.includes(e)||t.push(e);r[e]=t}else"object"==typeof r[e]&&"object"==typeof n?r[e]=this.mergeClaims(r[e],n):r[e]=n;return r}},$=class{constructor(e,t){this.keys=e,this.nonce=t}},V=class{constructor(e,t){this._logger=new l("OidcClient"),this.settings=e instanceof A?e:new A(e),this.metadataService=null!=t?t:new C(this.settings),this._claimsService=new j(this.settings),this._val
6idator=new T(this.settings,this.metadataService,this._claimsService),this._tokenClient=new x(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:r,request_type:n,id_token_hint:i,login_hint:o,skipUserInfo:a,nonce:s,url_state:l,response_type:c=this.settings.response_type,scope:u=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:p=this.settings.prompt,display:h=this.settings.display,max_age:f=this.settings.max_age,ui_locales:g=this.settings.ui_locales,acr_values:m=this.settings.acr_values,resource:y=this.settings.resource,response_mode:v=this.settings.response_mode,extraQueryParams:_=this.settings.extraQueryParams,extraTokenParams:b=this.settings.extraTokenParams,dpopJkt:w,omitScopeWhenRequesting:S=this.settings.omitScopeWhenRequesting}){let k=this._logger.create("createSigninRequest");if("code"!==c)throw Error("Only the Authorization Code flow (with PKCE) is supported");let C=await this.metadataService.getAuthorizationEndpoint();k.debug("Received authorization endpoint",C);let E=await R.create({url:C,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:c,scope:u,state_data:e,url_state:l,prompt:p,display:h,max_age:f,ui_locales:g,id_token_hint:i,login_hint:o,acr_values:m,dpopJkt:w,resource:y,request:t,request_uri:r,extraQueryParams:_,extraTokenParams:b,request_type:n,response_mode:v,client_secret:this.settings.client_secret,skipUserInfo:a,nonce:s,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:S});await this.clearStaleState();let A=E.state;return await this.settings.stateStore.set(A.id,A.toStorageString()),E}async readSigninResponseState(e,t=!1){let r=this._logger.create("readSigninResponseState"),n=new N(m.readParams(e,this.settings.response_mode));if(!n.state)throw r.throw(Error("No state in response")),null;let i=await this.settings.stateStore[t?"remove":"get"](n.state);if(!i)throw r.throw(Error("No matching state found in storage")),null;return{state:await O.fromStorageString(i),response:n}}async processSigninResponse(e,t,r=!0){let n=this._logger.create("processSigninResponse"),{state:i,response:o}=await this.readSigninResponseState(e,r);if(n.debug("received state from storage; validating response"),this.settings.dpop&&this.settings.dpop.store){let e=await this.getDpopProof(this.settings.dpop.store);t={...t,DPoP:e}}try{await this._validator.validateSigninResponse(o,i,t)}catch(e){if(e instanceof S&&this.settings.dpop){let r=await this.getDpopProof(this.settings.dpop.store,e.nonce);t.DPoP=r,await this._validator.validateSigninResponse(o,i,t)}else throw e}return o}async getDpopProof(e,t){let r;return(await e.getAllKeys()).includes(this.settings.client_id)?(r=await e.get(this.settings.client_id)).nonce!==t&&t&&(r.nonce=t,await e.set(this.settings.client_id,r)):(r=new $(await p.generateDPoPKeys(),t),await e.set(this.settings.client_id,r)),await p.generateDPoPProof({url:await this.metadataService.getTokenEndpoint(!1),httpMethod:"POST",keyPair:r.keys,nonce:r.nonce})}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:r=!1,extraTokenParams:n={}}){let i=await this._tokenClient.exchangeCredentials({username:e,password:t,...n}),o=new N(new URLSearchParams);return Object.assign(o,i),await this._validator.validateCredentialsResponse(o,r),o}async useRefreshToken({state:e,redirect_uri:t,resource:r,timeoutInSeconds:n,extraHeaders:i,extraTokenParams:o}){var a;let s,l,c=this._logger.create("useRefreshToken");if(void 0===this.settings.refreshTokenAllowedScope)s=e.scope;else{let t=this.settings.refreshTokenAllowedScope.split(" ");s=((null==(a=e.scope)?void 0:a.split(" "))||[]).filter(e=>t.includes(e)).join(" ")}if(this.settings.dpop&&this.settings.dpop.store){let e=await this.getDpopProof(this.settings.dpop.store);i={...i,DPoP:e}}try{l=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:s,redirect_uri:t,resource:r,timeoutInSeconds:n,extraHeaders:i,...o})}catch(a){if(a instanceof S&&this.settings.dpop)i.DPoP=await this.getDpopProof(this.settings.dpop.store,a.nonce),l=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:s,redirect_uri:t,resource:r,timeoutInSeconds:n,extraHeaders:i,...o});else throw a}let u=new N(new URLSearchParams);return Object.assign(u,l),c.debug("validating response",u),await this._val
6idator.validateRefreshResponse(u,{...e,scope:s}),u}async createSignoutRequest({state:e,id_token_hint:t,client_id:r,request_type:n,url_state:i,post_logout_redirect_uri:o=this.settings.post_logout_redirect_uri,extraQueryParams:a=this.settings.extraQueryParams}={}){let s=this._logger.create("createSignoutRequest"),l=await this.metadataService.getEndSessionEndpoint();if(!l)throw s.throw(Error("No end session endpoint")),null;s.debug("Received end session endpoint",l),r||!o||t||(r=this.settings.client_id);let c=new D({url:l,id_token_hint:t,client_id:r,post_logout_redirect_uri:o,state_data:e,extraQueryParams:a,request_type:n,url_state:i});await this.clearStaleState();let u=c.state;return u&&(s.debug("Signout request has state to persist"),await this.settings.stateStore.set(u.id,u.toStorageString())),c}async readSignoutResponseState(e,t=!1){let r=this._logger.create("readSignoutResponseState"),n=new L(m.readParams(e,this.settings.response_mode));if(!n.state){if(r.debug("No state in response"),n.error)throw r.warn("Response was error:",n.error),new y(n);return{state:void 0,response:n}}let i=await this.settings.stateStore[t?"remove":"get"](n.state);if(!i)throw r.throw(Error("No matching state found in storage")),null;return{state:await P.fromStorageString(i),response:n}}async processSignoutResponse(e){let t=this._logger.create("processSignoutResponse"),{state:r,response:n}=await this.readSignoutResponseState(e,!0);return r?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(n,r)):t.debug("No state from storage; skipping response validation"),n}clearStaleState(){return this._logger.create("clearStaleState"),P.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},F=class{constructor(e){this._userManager=e,this._logger=new l("SessionMonitor"),this._start=async e=>{let t=e.session_state;if(!t)return;let r=this._logger.create("_start");if(e.profile?(this._sub=e.profile.sub,r.debug("session_state",t,", sub",this._sub)):(this._sub=void 0,r.debug("session_state",t,", anonymous user")),this._checkSessionIFrame)return void this._checkSessionIFrame.start(t);try{let e=await this._userManager.metadataService.getCheckSessionIframe();if(e){r.debug("initializing check session iframe");let n=this._userManager.settings.client_id,i=this._userManager.settings.checkSessionIntervalInSeconds,o=this._userManager.settings.stopCheckSessionOnError,a=new b(this._callback,n,e,i,o);await a.load(),this._checkSessionIFrame=a,a.start(t)}else r.warn("no check session iframe found in the metadata")}catch(e){r.error("Error from getCheckSessionIframe:",e instanceof Error?e.message:e)}},this._stop=()=>{let e=this._logger.create("_stop");if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){let t=setInterval(async()=>{clearInterval(t);try{let e=await this._userManager.querySessionStatus();if(e){let t={session_state:e.session_state,profile:e.sub?{sub:e.sub}:null};this._start(t)}}catch(t){e.error("error from querySessionStatus",t instanceof Error?t.message:t)}},1e3)}},this._callback=async()=>{let e=this._logger.create("_callback");try{let t=await this._userManager.querySessionStatus(),r=!0;t&&this._checkSessionIFrame?t.sub===this._sub?(r=!1,this._checkSessionIFrame.start(t.session_state),e.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",t.session_state),await this._userManager.events._raiseUserSessionChanged()):e.debug("different subject signed into OP",t.sub):e.debug("subject no longer signed into OP"),r?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():e.debug("no change in session detected, no event to raise")}catch(t){this._sub&&(e.debug("Error calling queryCurrentSigninSession; raising signed out event",t),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(e=>{this._logger.error(e)})}async _init(){this._logger.create("_init");let e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){let e=await this._userManager.querySessionStatus();if(e){let t={session_state:e.session_state,profile:e.sub?{sub:e.sub}:null};this._start(t)}}}},B=class e{constructor(e){var t;this.id_token=e.id_token,this.session_state=null!=(t=e.session_state)?t:null,this.access_token=e.access_token,this.refresh_token=e.refresh_token,this.token_type=e.token_type,this.scope=e.scope,this.profile=e.profile,this.expires_at=e.expires_at,this.state=e.userState,this.url_state=e.url_state}get expires_in(){if(void 0!==this.expires_at)return this.expires_at-g.getEpochTime()}set expires_in(e){void 0!==e&&(this.expires_at=Math.floor(e)+g.getEpochTime())}get expired(){let e=this.expires_in;if(void 0!==e)return e<=0}get scopes(){var e,t;return null!=(t=null==(e=this.scope)?void 0:e.split(" "))?t:[]}toStorageString(){return new l("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return l.createStatic("User","fromStorageString"),new e(JSON.parse(t))}},z="oidc-client",G=class{constructor(){this._abort=new h("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){let t=this._logger.create("navigate");if(!this._window)throw Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);let{url:r,keepOpen:n}=await new Promise((r,n)=>{let i=i=>{var o;let a=i.data,s=null!=(o=e.scriptOrigin)?o:window.location.origin;if(i.origin===s&&(null==a?void 0:a.source)===z){try{let r=m.readParams(a.url,e.response_mode).get("state");if(r||t.warn("no state found in response url"),i.source!==this._window&&r!==e.state)return}catch{this._dispose(),n(Error("Invalid response from window"))}r(a)}};window.addEventListener("message",i,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",i,!1));let o=new BroadcastChannel(`oidc-client-popup-${e.state}`);o.addEventListener("message",i,!1),this._disposeHandlers.add(()=>o.close()),this._disposeHandlers.add(this._abort.addHandler(e=>{this._dispose(),n(e)}))});return t.debug("got response from window"),this._dispose(),n||this.close(),{url:r}}_dispose(){for(let e of(this._logger.create("_dispose"),this._disposeHandlers))e();this._disposeHandlers.clear()}static _notifyParent(e,t,r=!1,n=window.location.origin){let i={source:z,url:t,keepOpen:r},o=new l("_notifyParent");
6if(e)o.debug("With parent. Using parent.postMessage."),e.postMessage(i,n);else{o.debug("No parent. Using BroadcastChannel.");let e=new URL(t).searchParams.get("state");if(!e)throw Error("No parent and no state in URL. Can't complete notification.");let r=new BroadcastChannel(`oidc-client-popup-${e}`);r.postMessage(i),r.close()}}},q={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},H="_blank",K=class extends A{constructor(e){let{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:r=e.post_logout_redirect_uri,popupWindowFeatures:n=q,popupWindowTarget:i=H,redirectMethod:o="assign",redirectTarget:a="self",iframeNotifyParentOrigin:s=e.iframeNotifyParentOrigin,iframeScriptOrigin:l=e.iframeScriptOrigin,requestTimeoutInSeconds:c,silent_redirect_uri:u=e.redirect_uri,silentRequestTimeoutInSeconds:d,automaticSilentRenew:p=!0,validateSubOnSilentRenew:h=!0,includeIdTokenInSilentRenew:f=!1,monitorSession:g=!1,monitorAnonymousSession:m=!1,checkSessionIntervalInSeconds:y=2,query_status_response_type:v="code",stopCheckSessionOnError:_=!0,revokeTokenTypes:b=["access_token","refresh_token"],revokeTokensOnSignout:S=!1,includeIdTokenInSilentSignout:k=!1,accessTokenExpiringNotificationTimeInSeconds:C=60,maxSilentRenewTimeoutRetries:A,userStore:I}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=r,this.popupWindowFeatures=n,this.popupWindowTarget=i,this.redirectMethod=o,this.redirectTarget=a,this.iframeNotifyParentOrigin=s,this.iframeScriptOrigin=l,this.silent_redirect_uri=u,this.silentRequestTimeoutInSeconds=d||c||10,this.automaticSilentRenew=p,this.validateSubOnSilentRenew=h,this.includeIdTokenInSilentRenew=f,this.monitorSession=g,this.monitorAnonymousSession=m,this.checkSessionIntervalInSeconds=y,this.stopCheckSessionOnError=_,this.query_status_response_type=v,this.revokeTokenTypes=b,this.revokeTokensOnSignout=S,this.includeIdTokenInSilentSignout=k,this.accessTokenExpiringNotificationTimeInSeconds=C,this.maxSilentRenewTimeoutRetries=A,I)this.userStore=I;else{let e="undefined"!=typeof window?window.sessionStorage:new w;this.userStore=new E({store:e})}}},J=class e extends G{constructor({silentRequestTimeoutInSeconds:t=10}){super(),this._logger=new l("IFrameWindow"),this._timeoutInSeconds=t,this._frame=e.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){let e=window.document.createElement("iframe");return e.style.visibility="hidden",e.style.position="fixed",e.style.left="-1000px",e.style.top="0",e.width="0",e.height="0",window.document.body.appendChild(e),e}async navigate(e){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);let t=setTimeout(()=>void this._abort.raise(new v("IFrame timed out without a response")),1e3*this._timeoutInSeconds);return this._disposeHandlers.add(()=>clearTimeout(t)),await super.navigate(e)}close(){var e;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",e=>{var t;let r=e.target;null==(t=r.parentNode)||t.removeChild(r),this._abort.raise(Error("IFrame removed from DOM"))},!0),null==(e=this._frame.contentWindow)||e.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(e,t){return super._notifyParent(window.parent,e,!1,t)}},W=class{constructor(e){this._settings=e,this._logger=new l("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new J({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),J.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},Z=class extends G{constructor({popupWindowTarget:e=H,popupWindowFeatures:t={},popupSignal:r,popupAbortOnClose:n}){super(),this._logger=new l("PopupWindow");let i=f.center({...q,...t});this._window=window.open(void 0,e,f.serialize(i)),this.abortOnClose=!!n,r&&r.addEventListener("abort",()=>{var e;this._abort.raise(Error(null!=(e=r.reason)?e:"Popup aborted"))}),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||"boolean"!=typeof this._window.closed||this._window.closed)return void this._abort.raise(Error("Popup blocked by user"));this.close()},1e3*t.closePopupWindowAfterInSeconds)}async navigate(e){var t;
6null==(t=this._window)||t.focus();let r=setInterval(()=>{(!this._window||this._window.closed)&&(this._logger.debug("Popup closed by user or isolated by redirect"),n(),this._disposeHandlers.delete(n),this.abortOnClose&&this._abort.raise(Error("Popup closed by user")))},500),n=()=>clearInterval(r);return this._disposeHandlers.add(n),await super.navigate(e)}close(){this._window&&!this._window.closed&&(this._window.close(),this._abort.raise(Error("Popup closed"))),this._window=null}static notifyOpener(e,t){super._notifyParent(window.opener,e,t),t||window.opener||window.close()}},Y=class{constructor(e){this._settings=e,this._logger=new l("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:r,popupAbortOnClose:n}){return new Z({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:r,popupAbortOnClose:n})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),Z.notifyOpener(e,t)}},X=class{constructor(e){this._settings=e,this._logger=new l("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var r;let n;this._logger.create("prepare");let i=window.self;"top"===t&&(i=null!=(r=window.top)?r:window.self);let o=i.location[e].bind(i.location);return{navigate:async e=>{this._logger.create("navigate");let t=new Promise((t,r)=>{n=r,window.addEventListener("pageshow",()=>t(window.location.href)),o(e.url)});return await t},close:()=>{this._logger.create("close"),null==n||n(Error("Redirect aborted")),i.stop()}}}async callback(){}},Q=class extends _{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new l("UserManagerEvents"),this._userLoaded=new h("User loaded"),this._userUnloaded=new h("User unloaded"),this._silentRenewError=ne
6w h("Silent renew error"),this._userSignedIn=new h("User signed in"),this._userSignedOut=new h("User signed out"),this._userSessionChanged=new h("User session changed")}async load(e,t=!0){await super.load(e),t&&await this._userLoaded.raise(e)}async unload(){await super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},ee=class{constructor(e){this._userManager=e,this._logger=new l("SilentRenewService"),this._isStarted=!1,this._retryTimer=new g("Retry Silent Renew"),this._timeoutRetryCount=0,this._tokenExpiring=async()=>{let e=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),this._timeoutRetryCount=0,e.debug("silent token renewal successful")}catch(t){if(t instanceof v){this._timeoutRetryCount++;let r=this._userManager.settings.maxSilentRenewTimeoutRetries;if(void 0!==r&&this._timeoutRetryCount>r){e.error(`Timeout retry limit reached (${this._timeoutRetryCount} > ${r}), raising silentRenewError:`,t),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(t);return}e.warn(`ErrorTimeout from signinSilent (attempt ${this._timeoutRetryCount}), retry in 5s:`,t),this._retryTimer.init(5);return}e.error("Error from signinSilent:",t),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(t)}}}async start(){let e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},et=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},er=class{constructor(e,t,r,n){this._logger=new l("UserManager"),this.settings=new K(e),this._client=new V(e),this._redirectNavigator=null!=t?t:new X(this.settings),this._popupNavigator=null!=r?r:new Y(this.settings),this._iframeNavigator=null!=n?n:new W(this.settings),this._events=new Q(this.settings),this._silentRenewService=new ee(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new F(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(e=!1){let t=this._logger.create("getUser"),r=await this._loadUser();return r?(t.info("user loaded"),await this._events.load(r,e),r):(t.info("user not found in storage"),null)}async removeUser(){let e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),await this._events.unload()}async signinRedirect(e={}){var t;let r;this._logger.create("signinRedirect");let{redirectMethod:n,...i}=e;(null==(t=this.settings.dpop)?void 0:t.bind_authorization_code)&&(r=await this.generateDPoPJkt(this.settings.dpop));let o=await this._redirectNavigator.prepare({redirectMethod:n});await this._signinStart({request_type:"si:r",dpopJkt:r,...i},o)}async signinRedirectCallback(e=window.location.href){let t=this._logger.create("signinRedirectCallback"),r=await this._signinEnd(e);return r.profile&&r.profile.sub?t.info("success, signed in subject",r.profile.sub):t.info("no subject"),r}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:r=!1}){let n=this._logger.create("signinResourceOwnerCredential"),i=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:r,extraTokenParams:this.settings.extraTokenParams});n.debug("got signin response");let o=await this._buildUser(i);return o.profile&&o.profile.sub?n.info("success, signed in subject",o.profile.sub):n.info("no subject"),o}async signinPopup(e={}){var t;let r,n=this._logger.create("signinPopup");(null==(t=this.settings.dpop)?void 0:t.bind_authorization_code)&&(r=await this.generateDPoPJkt(this.settings.dpop));let{popupWindowFeatures:i,popupWindowTarget:o,popupSignal:a,popupAbortOnClose:s,...l}=e,c=this.settings.popup_redirect_uri;c||n.throw(Error("No popup_redirect_uri configured"));let u=await this._popupNavigator.prepare({popupWindowFeatures:i,popupWindowTarget:o,popupSignal:a,popupAbortOnClose:s}),d=await this._signin({request_type:"si:p",redirect_uri:c,display:"popup",dpopJkt:r,...l},u);return d&&(d.profile&&d.profile.sub?n.info("success, signed in subject",d.profile.sub):n.info("no subject")),d}async signinPopupCallback(e=window.location.href,t=!1){let r=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),r.info("success")}async signinSilent(e={}){var t,r;let n,i,o=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:a,...s}=e,l=await this._loadUser();if(!e.forceIframeAuth&&(null==l?void 0:l.refresh_token)){o.debug("using refresh token");let e=new et(l);return await this._useRefreshToken({state:e,redirect_uri:s.redirect_uri,resource:s.resource,extraTokenParams:s.extraTokenParams,timeoutInSeconds:a})}(null==(t=this.settings.dpop)?void 0:t.bind_authorization_code)&&(n=await this.generateDPoPJkt(this.settings.dpop));let c=this.settings.silent_redirect_uri;c||o.throw(Error("No silent_redirect_uri configured")),l&&this.settings.val
6idateSubOnSilentRenew&&(o.debug("subject prior to silent renew:",l.profile.sub),i=l.profile.sub);let u=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:a});return(l=await this._signin({request_type:"si:s",redirect_uri:c,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?null==l?void 0:l.id_token:void 0,dpopJkt:n,...s},u,i))&&((null==(r=l.profile)?void 0:r.sub)?o.info("success, signed in subject",l.profile.sub):o.info("no subject")),l}async _useRefreshToken(e){let t=await this._client.useRefreshToken({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds,...e}),r=new B({...e.state,...t});return await this.storeUser(r),await this._events.load(r),r}async signinSilentCallback(e=window.location.href){let t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){let{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":await this.signinPopupCallback(e);break;case"si:s":await this.signinSilentCallback(e);break;default:throw Error("invalid request_type in state")}}async signoutCallback(e=window.location.href,t=!1){let{state:r}=await this._client.readSignoutResponseState(e);if(r)switch(r.request_type){case"so:r":return await this.signoutRedirectCallback(e);case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw Error("invalid request_type in state")}}async querySessionStatus(e={}){let t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:r,...n}=e,i=this.settings.silent_redirect_uri;i||t.throw(Error("No silent_redirect_uri configured"));let o=await this._loadUser(),a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r}),s=await this._signinStart({request_type:"si:s",redirect_uri:i,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?null==o?void 0:o.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...n},a);try{let e=await this._client.processSigninResponse(s.url,{});if(t.debug("got signin response"),e.session_state&&e.profile.sub)return t.info("success for subject",e.profile.sub),{session_state:e.session_state,sub:e.profile.sub};return t.info("success, user not authenticated"),null}catch(e){if(this.settings.monitorAnonymousSession&&e instanceof y)switch(e.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:e.session_state}}throw e}}async _signin(e,t,r){let n=await this._signinStart(e,t);return await this._signinEnd(n.url,r)}async _signinStart(e,t){let r=this._logger.create("_signinStart");try{let n=await this._client.createSigninRequest(e);return r.debug("got signin request"),await t.navigate({url:n.url,state:n.state.id,response_mode:n.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(e){throw r.debug("error after preparing navigator, closing navigator window"),t.close(),e}}async _signinEnd(e,t){let r=this._logger.create("_signinEnd"),n=await this._client.processSigninResponse(e,{});return r.debug("got signin response"),await this._buildUser(n,t)}async _buildUser(e,t){let r=this._logger.create("_buildUser"),n=new B(e);if(t){if(t!==n.profile.sub)throw r.debug("current user does not match user returned from signin. sub from signin:",n.profile.sub),new y({...e,error:"login_required"});r.debug("current user matches user returned from signin")}return await this.storeUser(n),r.debug("user stored"),await this._events.load(n),n}async signoutRedirect(e={}){let t=this._logger.create("signoutRedirect"),{redirectMethod:r,...n}=e,i=await this._redirectNavigator.prepare({redirectMethod:r});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...n},i),t.info("success")}async signoutRedirectCallback(e=window.location.href){let t=this._logger.create("signoutRedirectCallback"),r=await this._signoutEnd(e);return t.info("success"),r}async signoutPopup(e={}){let t=this._logger.create("signoutPopup"),{popupWindowFeatures:r,popupWindowTarget:n,popupSignal:i,...o}=e,a=this.settings.popup_post_logout_redirect_uri,s=await this._popupNavigator.prepare({popupWindowFeatures:r,popupWindowTarget:n,popupSignal:i});await this._signout({request_type:"so:p",post_logout_redirect_uri:a,state:null==a?void 0:{},...o},s),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){let r=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),r.info("success")}async _signout(e,t){let r=await this._signoutStart(e,t);return await this._signoutEnd(r.url)}async _signoutStart(e={},t){var r;let n=this._logger.create("_signoutStart");try{let i=await this._loadUser();n.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(i);let o=e.id_token_hint||i&&i.id_token;o&&(n.debug("setting id_token_hint in signout request"),e.id_token_hint=o),await this.removeUser(),n.debug("user removed, creating signout request");
6let a=await this._client.createSignoutRequest(e);return n.debug("got signout request"),await t.navigate({url:a.url,state:null==(r=a.state)?void 0:r.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(e){throw n.debug("error after preparing navigator, closing navigator window"),t.close(),e}}async _signoutEnd(e){let t=this._logger.create("_signoutEnd"),r=await this._client.processSignoutResponse(e);return t.debug("got signout response"),r}async signoutSilent(e={}){var t;let r=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:n,...i}=e,o=this.settings.includeIdTokenInSilentSignout?null==(t=await this._loadUser())?void 0:t.id_token:void 0,a=this.settings.popup_post_logout_redirect_uri,s=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n});await this._signout({request_type:"so:s",post_logout_redirect_uri:a,id_token_hint:o,...i},s),r.info("success")}async signoutSilentCallback(e=window.location.href){let t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){let t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){let r=this._logger.create("_revokeInternal");if(!e)return;let n=t.filter(t=>"string"==typeof e[t]);if(!n.length)return void r.debug("no need to revoke due to no token(s)");for(let t of n)await this._client.revokeToken(e[t],t),r.info(`${t} revoked successfully`),"access_token"!==t&&(e[t]=null);await this.storeUser(e),r.debug("user stored"),await this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){let e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),B.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){let t=this._logger.create("storeUser");if(e){t.debug("storing user");let r=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,r)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&await this.settings.dpop.store.remove(this.settings.client_id)}async clearStaleState(){await this._client.clearStaleState()}async dpopProof(e,t,r,n){var i,o;let a=await (null==(o=null==(i=this.settings.dpop)?void 0:i.store)?void 0:o.get(this.settings.client_id));if(a)return await p.generateDPoPProof({url:e,accessToken:null==t?void 0:t.access_token,httpMethod:r,keyPair:a.keys,nonce:n})}async generateDPoPJkt(e){let t=await e.store.get(this.settings.client_id);return t||(t=new $(await p.generateDPoPKeys()),await e.store.set(this.settings.client_id,t)),await p.generateDPoPJkt(t.keys)}},en=r(97268);s.setLogger(console);let ei=e=>{let{siteId:t,brand:r,country:n,accountsEndpoint:i}=e;if(!i)return null;let o="".concat(((e,t,r)=>e.includes("pr-")||e.includes("dev")?"".concat(r,".").concat(t,"-dev"):e.includes("stg")?"".concat(r,".").concat(t,"-stg"):"".concat(t,"_").concat(r))(location.hostname,r,n),"_js"),a={authority:"".concat(i),signup:"".concat(i,"/api/signup"),signupExt:"".concat(i,"/api/external/signup"),signin:"".concat(i,"/api/signin"),accountIsLogged:"".concat(i,"/api/v1/account/islogged"),signout:"".concat(i,"/api/signout"),challenge:"".concat(i,"/api/challenge"),forgotPassword:"".concat(i,"/api/forgot_password"),updateUser:"".concat(i,"/api/user")},s=location.hostname.startsWith("local.")?location.origin:e.url,l={authority:a.authority,client_id:o,redirect_uri:"".concat(s,"/auth-code/js_callback"),silent_redirect_uri:"".concat(s,"/auth-code/js_callback"),response_type:"code",scope:"openid profile email account.manage",automaticSilentRenew:!0,filterProtocolClaims:!0,loadUserInfo:!0,response_mode:"query"},c=new er(l);return{authUrls:a,country:n,siteId:t,clientId:o,userManagerSettings:l,userManager:c,legacyHintCookie:"TgAccountHint".concat(en.qe!==n?n:"")}}},51689:(e,t,r)=>{"use strict";r.d(t,{Vq:()=>g,Xl:()=>h,FS:()=>m,ci:()=>v,$9:()=>f,Rk:()=>b,n6:()=>S,Fy:()=>_,dH:()=>y,VQ:()=>w});var n=r(56964),i=r(1066),o=r(54198);let a="api/carts/v1/cart",s="api/carts/v1/checkout",l=async()=>
6{if(i.A.getState().isLoggedIn)return i.A.getState().getUserAccessToken().then(e=>({Authorization:"Bearer ".concat(e)})).catch(e=>{(0,o.D)("SCS call is going out as a guest: the access token could not be read",{error:e,location:"shopping-cart"})})},c=async e=>(0,n.fG)({...e,headers:await l()}),u=async e=>(0,n.LO)({...e,headers:{...await l(),...e.headers}}),d=()=>({"X-Idempotency-Key":crypto.randomUUID()}),p={addItems:"".concat(a,"/items/add"),replaceItem:"".concat(a,"/items/replace"),deleteItem:"".concat(a,"/items/delete"),deleteUnavailable:"".concat(a,"/items/delete-unavailable"),applyCoupon:"".concat(a,"/coupon/apply"),removeCoupon:"".concat(a,"/coupon/remove"),applyShippingMethod:"".concat(a,"/sections/shipping-method"),applyContactDelivery:"".concat(a,"/sections/contact-delivery"),applyBilling:"".concat(a,"/sections/billing"),applyRegionalSettings:"".concat(a,"/regional-settings")},h=async(e,t)=>c({siteData:e,pathname:a,query:{userId:t}}),f=async(e,t)=>u({siteData:e,pathname:"".concat(a,"/merge"),body:{userId:t,siteId:e.siteId}}),g=async(e,t)=>(0,n.fG)({siteData:e,pathname:"".concat(s,"/address-form-config"),query:{countryIsoCode:t}}),m=async(e,t)=>u({siteData:e,pathname:"".concat(s,"/client-token"),body:{userId:t,siteId:e.siteId}}),y=async(e,t)=>u({siteData:e,pathname:"".concat(s,"/pay"),body:{...t,siteId:e.siteId},headers:d()}),v=async(e,t,r)=>c({siteData:e,pathname:"".concat(s,"/pay/result"),query:{snapshotId:t,userId:r,siteId:String(e.siteId)}}),_=async(e,t)=>{let r=await u({siteData:e,pathname:"".concat(s,"/confirm"),body:{...t,siteId:e.siteId},headers:d()});return{ok:200===r.statusCode,statusCode:r.statusCode,errorBody:r.errorBody}},b=async(e,t)=>u({siteData:e,pathname:"".concat(s,"/apply-gift-card"),body:{...t,siteId:e.siteId}}),w=async(e,t)=>{let r=await u({siteData:e,pathname:"".concat(s,"/report-failure"),body:{...t,siteId:e.siteId}});return{ok:200===r.statusCode,statusCode:r.statusCode}},S=async(e,t,r)=>u({siteData:e,pathname:p[t],body:r})},52496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return a}});let n=r(64252);r(37876),r(14232);let i=n._(r(90295));function o(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=i.default,n={loading:e=>{let{error:t,isLoading:r,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let s=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r({...n,loader:()=>null!=s?s().then(o):Promise.resolve(o(()=>null))}):(delete n.webpack,delete n.modules,a(r,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53725:(e,t,r)=>{"use strict";r.d(t,{fI:()=>i,gy:()=>o});var n=r(56964);let i=async(e,t)=>await (0,n.LO)({siteData:e,pathname:"api/products/v1/get/cards",body:{skus:t}}),o=async(e,t)=>await (0,n.LO)({siteData:e,pathname:"api/products/v1/get/panel",body:{sku:t}})},53843:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>j,reportWebVitals:()=>M});var n=r(37876),i=r(18847),o=r.n(i),a=r(77328),s=r.n(a),l=r(14232),c=r(89099),u=r(79307),d=r(58799),p=r(7253),h=r(38248),f=r(6851),g=r(20549);let m=(0,r(15714).A)("dataDog");var y=r(95993);let v=!1,_=e=>{let{appData:t}=e,{siteData:r}=t,{data:n}=m(e=>e.errorToggle);if((0,g.A)(e=>e.setCustomErrorToggle)(n),(0,l.useEffect)(()=>{if(!r)return;let{siteId:e,brand:t,url:n}=r,i=(0,y.F6)(r);f.L2.setGlobalContextProperty("site_data",{siteId:e,brand:t,siteUrl:n}),f.L2.setUser({id:String(i||"")})},[r]),!v){let e=[40,44,495,43,45,47].includes(r.siteId)||!1;f.L2.init({applicationId:"26791a10-e9b1-4ec4-9eda-7b48068469d0",clientToken:"pubaada73b8301d773ea4ed23307be6f037",site:"datadoghq.eu",service:"storefront",env:e?"development":"production",version:"1.67",sessionSampleRate:75,sessionReplaySampleRate:0,startSessionReplayRecordingManually:!1,trackUserInteractions:!0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",trackSessionAcrossSubdomains:!0}),v=!0}return null};var b=r(476),w=r(11290),S=r(24090),k=r(28862),C=r(26635),E=r(70408),A=r(19110),I=r
6(65364),x=r(77053),T=r(62789);let P=e=>{var t;let{children:r}=e,i=(0,c.useRouter)(),{data:o}=(0,C.rU)(e=>e),{eventTrackingCallback:a}=(()=>{let{pushToDataLayer:e}=(0,A.ur)(),{data:t}=(0,C.Ay)(e=>e.environment);return{eventTrackingCallback:(0,l.useCallback)((r,n)=>{if(!n.inExperiment)return!1;let i={event:"experiment_viewed",experiment_id:r.key,experiment_name:r.name,experiment_phase:r.phase,variation_id:n.key,variation_name:n.name||n.value,variation_value:n.value,in_experiment:n.inExperiment,feature_id:n.featureId,weights:r.weights,coverage:r.coverage,experiment_type:n.featureId?"feature_flag_experiment":"inline_experiment",toggle_type:n.featureId?"feature_flag":"inline",assignment_source:"experiment"};if("true"===I.env.NEXT_PUBLIC_IS_LOCALHOST||"development"===t||"stage"===t){let e=r.key.match(/^dev-(\d+)_(\d+)/);console.log("[GrowthBook] experiment_viewed",{...i,component_id:null==e?void 0:e[1],variant_id:null==e?void 0:e[2]})}try{let t=window.dataLayer;if(Array.isArray(t))return t.push(i),!0;if(null==t)return window.dataLayer=[],window.dataLayer.push(i),!0;return e(i),!0}catch(e){return!1}},[e])}})(),s=(0,y.F6)(o),u=(0,l.useRef)(new Set),d=(0,x.B)(e=>e.xpmVariantIds),p=(0,x.B)(e=>e.clearVariantIds),h=null==(t=(0,T.IQ)(o))?void 0:t.landingPageURL,f=(0,l.useMemo)(()=>{if(!o)return null;let{environment:e,brand:t,siteId:r,country:n}=o,l={siteId:(null==r?void 0:r.toString())||"",brand:t||"",sku:void 0,xpmVariantIds:[],landingPage:null!=h?h:""};if(s&&(l.id=s),t&&r&&n)try{let e=(0,E.YT)(t,r,n);(null==e?void 0:e.trim())&&(l.countryCode=e.toUpperCase())}catch(e){console.warn("Failed to get geo location country:",e)}return new k.NN({apiHost:"https://cdn.growthbook.io",clientKey:"production"===e?"sdk-ItHtTxOQuavUvn01":"sdk-g9dobrSFnhl1vH8X",enableDevMode:"development"===e||"stage"===e,attributes:l,navigate:e=>{i.replace(e)},navigateDelay:0,trackingCallback:(e,t)=>{var r;let n="".concat(e.key,":").concat(null!=(r=e.phase)?r:"",":").concat(t.key);if(!u.current.has(n))try{a(e,t)&&u.current.add(n)}catch(e){console.error("Error in GrowthBook tracking callback:",e)}}})},[o,s,a,i]);return((0,l.useEffect)(()=>{if(f){try{f.init()}catch(e){console.error("Failed to initialize GrowthBook:",e)}return()=>{try{f.destroy()}catch(e){console.error("Error destroying GrowthBook instance:",e)}}}},[f]),(0,l.useEffect)(()=>{f&&f.setAttributes({...f.getAttributes(),xpmVariantIds:d,landingPage:h})},[f,d,h]),(0,l.useEffect)(()=>{i.isReady&&f&&(p(),f.setURL(window.location.href),f.setAttributes({...f.getAttributes(),url:i.asPath,xpmVariantIds:[],href:window.location.href}))},[f,i.asPath,i.isReady,p]),f)?(0,n.jsx)(k.iX,{growthbook:f,children:r}):null};var O=r(72614);r(89359);let R=o()(()=>Promise.all([r.e(7291),r.e(8230),r.e(4414)]).then(r.bind(r,97872)),{loadableGenerated:{webpack:()=>[97872]}}),N=o()(()=>r.e(8646).then(r.bind(r,68646)),{loadableGenerated:{webpack:()=>[68646]}}),D=o()(()=>r.e(6183).then(r.bind(r,56183)),{loadableGenerated:{webpack:()=>[56183]},ssr:!1}),L=o()(()=>r.e(3854).then(r.bind(r,83854)),{loadableGenerated:{webpack:()=>[83854]},ssr:!1}),U=o()(()=>r.e(9122).then(r.bind(r,89122)),{loadableGenerated:{webpack:()=>[89122]},ssr:!1});function M(e){console.info(e)}let j=e=>{let{Component:t,pageProps:r}=e,{fallback:i,translations:o,xpm:a,siteSettings:f}=r,g=(0,c.useRouter)();(0,l.useEffect)(()=>{let e=()=>{document.startViewTransition&&document.startViewTransition(()=>{})};return g.events.on("routeChangeStart",e),()=>g.events.off("routeChangeStart",e)},[g]),(e=>{let{fallback:t}=e;(0,l.useEffect)(()=>{var e;let r=null==t||null==(e=t.localization)?void 0:e.locale;if(!r)return;let n=(0,d.z)(r),i=document.documentElement;i.lang!==n&&(i.lang=n);let o=new MutationObserver(()=>{i.lang!==n&&(i.lang=n)});return o.observe(i,{attributes:!0,attributeFilter:["lang"]}),()=>o.disconnect()},[t])})(r),(e=>{var t,r;let n=(null==(r=e.fallback)||null==(t=r.googleTagManager)?void 0:t.measurementId)||"",i="cloned_ga",o="_ga_".concat(n),a="cloned"+o;(0,l.useEffect)(()=>{let e=Date.now(),t=setInterval(()=>{let r=(0,h.getCookie)("_ga"),n=(0,h.getCookie)(o),s=(0,h.getCookie)(i),l=(0,h.getCookie)(a);r?(0,h.setCookie)(i,r):s||(0,h.setCookie)(i,""),n?(0,h.setCookie)(a,n):l||(0,h.setCookie)(a,""),r&&n&&clearInterval(t),Date.now()-e>=7e3&&clearInterval(t)},1e3);return()=>clearInterval(t)},[])})(r),(0,l.useEffect)(()=>{let e=r.siteData;if(!e)return;
6let{siteId:t,brand:n,currency:i,country:o,userCountry:a,targetLocale:s}=e;localStorage.setItem("siteData",JSON.stringify({siteId:t,brand:n,currency:i,siteCountry:o,userCountry:a,targetLocale:s}))},[]),(0,l.useEffect)(()=>{window.sendTGAnalyticsPostRequest||(window.sendTGAnalyticsPostRequest=p.A)},[p.A]);let m=i?(0,n.jsx)(u.Ay,{value:i,children:(0,n.jsx)(S.G,{value:f,children:(0,n.jsx)(P,{children:(0,n.jsxs)(w.d,{serverData:a,children:[(0,n.jsx)(s(),{children:(0,n.jsx)("meta",{name:"generated",content:r.generated})}),(0,n.jsx)(D,{}),(0,n.jsx)(L,{}),(0,n.jsx)(U,{}),(0,n.jsx)(_,{appData:i}),(0,n.jsx)(t,{...r}),(0,n.jsx)(R,{}),(0,n.jsx)(N,{})]})})})}):(0,n.jsx)(t,{...r}),y=(0,n.jsx)(O.i,{translations:o||{},children:m}),v=r.theme?(0,n.jsx)(b.NP,{initialTheme:r.theme,initialThemeConfig:r.themeConfig,children:y}):y;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s(),{children:(0,n.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})}),v]})}},54198:(e,t,r)=>{"use strict";r.d(t,{D:()=>o});var n=r(6851),i=r(20549);let o=(e,t)=>{console.error(e,t),i.A.getState().isCustomErrorEnabled&&n.L2.addError(e,{...t,source:"custom"})}},54984:(e,t,r)=>{"use strict";function n(e,t){let r=e.indexOf(t);r>=0&&e.splice(r,1)}function i(e){return Array.isArray(e)&&e.length>0}r.d(t,{Ai:()=>n,EI:()=>i})},55630:(e,t,r)=>{"use strict";r.d(t,{X:()=>c});var n=r(13938),i=r(17282),o=r(79770),a=r(17745),s=r(5489);let l=256*s._m;function c({encoder:e,request:t,flushController:r}){let c={},d=r.flushObservable.subscribe(r=>(function(r){let n=(0,i.KQ)(c).join("\n");c={};let a=(0,o.Kp)(r.reason),l=a?t.sendOnExit:t.send;if(a&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&l(u(t));let r=[t.pendingData,n].filter(Boolean).join("\n");r&&l({data:r,bytesCount:(0,s.WW)(r)})}else n&&e.write(e.isEmpty?n:` 7${n}`),e.finish(e=>{l(u(e))})})(r));function p(t,i){let o=(0,a.s)(t),u=e.estimateEncodedBytesCount(o);if(u>=l)return void n.Vy.warn(`Discarded a message whose size was bigger than the maximum allowed size ${l/s._m}KiB. ${n.xG} ${n.Xs}/#technical-limitations`);void 0!==i&&void 0!==c[i]&&function(t){let n=c[t];delete c[t];let i=e.estimateEncodedBytesCount(n);r.notifyAfterRemoveMessage(i)}(i),r.notifyBeforeAddMessage(u),void 0!==i?(c[i]=o,r.notifyAfterAddMessage()):e.write(e.isEmpty?o:` 8${o}`,e=>{r.notifyAfterAddMessage(e-u)})}return{flushController:r,add:p,upsert:p,stop:d.unsubscribe}}function u(e){return{data:"string"==typeof e.output?e.output:new Blob([e.output],{type:"text/plain"}),bytesCount:e.outputBytesCount,encoding:e.encoding}}},56964:(e,t,r)=>{"use strict";r.d(t,{fG:()=>f,LO:()=>g});var n=r(67663);let i=async e=>{try{let t=await e.text();if(!t.trim())return;try{return JSON.parse(t)}catch(e){return t}}catch(e){return}},o=(e,t,r)=>({siteData:e,statusCode:t,error:!0,errorCode:(e=>"TypeError"===e.name&&e.message.includes("fetch")?"NETWORK_ERROR":"AbortError"===e.name?"TIMEOUT_ERROR":e instanceof SyntaxError?"PARSE_ERROR":"statusCode"in e?"HTTP_ERROR":"UNKNOWN_ERROR")(r),errorMessage:r.message,errorBody:r.body}),a={JSON:"application/json",HTML:"text/html"},s={CONTENT_TYPE:"Content-Type"},l=[201,202,204,205],c=async e=>{var t;let r=null!=(t=e.headers.get(s.CONTENT_TYPE))?t:"";try{if(r.includes(a.JSON)){let t=await e.text();if(!t.trim())return l.includes(e.status)?{success:!0,data:null,type:"empty"}:{success:!1,error:Error("Empty JSON response body")};return{success:!0,data:JSON.parse(t),type:"json"}}if(r.includes(a.HTML)||r.includes("text/")){let t=await e.text();return{success:!0,data:t,type:"text"}}return{success:!0,data:null,type:"empty"}}catch(e){return{success:!1,error:e}}},u="true"===r(65364).env.NEXT_PUBLIC_IS_LOCALHOST,d=async(e,t,r)=>{let n=new AbortController,i=setTimeout(()=>n.abort(),r);try{return await fetch(e,{...t,signal:n.signal})}finally{clearTimeout(i)}},p="true"===r(65364).env.NEXT_PUBLIC_IS_LOCALHOST,h=async e=>{let{method:t="GET",siteData:r,pathname:l,query:h={},queryString:f,timeout:g=3e4,serviceHostnameConfig:m,retry:y,...v}=e,{body:_,headers:b,...w}=v,{url:S}=(e=>{let{siteData:t,pathname:r,method:n,query:i,queryString:o,serviceHostnameConfig:a}
8=e,{publicAPI:s,siteId:l,currency:c,userCountry:d,targetLocale:p,environment:h}=t,f=new URLSearchParams({...Object.fromEntries(Object.entries(i).filter(e=>{let[,t]=e;return void 0!==t&&""!==t})),..."GET"===n&&{siteId:"".concat(l),currency:c,userCountry:d,targetLocale:p}}).toString(),g=u||!a?s:a[h]||s;return{url:"".concat(g,"/").concat(r).concat(f?"?".concat(f):"").concat(o?"&".concat(o):""),searchParams:f}})({siteData:r,pathname:l,method:t,query:h,queryString:f}),{options:k,requestBody:C}=(e=>{let{method:t,siteData:r,body:n,headers:i,restOfRequestInit:o}=e,{siteId:l,currency:c,userCountry:u,targetLocale:d}=r,p={...n,siteId:l,currency:c,userCountry:u,targetLocale:d};return{options:{method:t,headers:{[s.CONTENT_TYPE]:a.JSON,...i},...n&&"GET"!==t&&{body:JSON.stringify(p)},...o},requestBody:p}})({method:t,siteData:r,body:_,headers:b,restOfRequestInit:w});p&&console.log({"client-gateway":{url:S,body:C}});let E=0;try{let e=await d(S,k,g);if(E=e.status,!e.ok){let t=Error("Something went wrong while fetching from API - status code ".concat(E));throw t.statusCode=E,t.body=await i(e),t}let t=await c(e);if(!t.success){let e=Error("Failed to parse response: ".concat(t.error.message));return{siteData:r,statusCode:E,error:!0,errorCode:"PARSE_ERROR",errorMessage:e.message}}if("json"===t.type){if(Array.isArray(t.data))return Object.assign(t.data,{siteData:r,statusCode:E,error:!1});return{...((e,t)=>{try{let r=(0,n.iY)(t),i=e=>e.startsWith("http")?e:"/".concat(r).concat(e.replace(/^(\.\/|\/)/,"")),o=e=>{for(let r in e)if(e.hasOwnProperty(r)){let n=e[r];if(void 0===n&&(e[r]=null),"object"==typeof n)o(n);else if("string"==typeof n){let o=n.trim();n.includes("aspx")&&!n.includes("@context")&&(e[r]=o.includes("href")?o.replace(/href=["'](.*?)["']/g,(e,t)=>'href="'.concat(i(t),'"')):i(o)),/^digital-asset\/.*\.[a-zA-Z]{2,5}$/.test(n)&&(e[r]="".concat(t.cdn,"/").concat(n))}}return e};return o(e)}catch(t){return console.error("Error in postViewmodelCreationHandler file, original viewmodel links returned",t),e}})(t.data,r),siteData:r,statusCode:E,error:!1}}if("text"===t.type)return{text:t.data,siteData:r,statusCode:E,error:!1};return{siteData:r,statusCode:E,error:!1}}catch(e){if(e instanceof Error)return p&&console.error("Error:",e.message),o(r,E,e);return o(r,E,Error("An unknown error occurred"))}},f=async e=>h({...e,method:"GET"}),g=async e=>h({...e,method:"POST"})},57247:(e,t,r)=>{"use strict";r.d(t,{$A:()=>c,Bb:()=>n,Ih:()=>u,KG:()=>l,NW:()=>o,R8:()=>s,TC:()=>i,dV:()=>a});let n="datad0g.com",i="dd0g-gov.com",o="datadoghq.com",a="datadoghq.eu",s="ddog-gov.com",l="us2.ddog-gov.com",c="pci.browser-intake-datadoghq.com",u=["ddsource","dd-api-key","dd-request-id"]},58040:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=e=>e.isArchived||!e.isCurrentShippingCountrySupported},58799:(e,t,r)=>{"use strict";r.d(t,{JK:()=>l,Qn:()=>p,Yq:()=>d,iF:()=>a,sI:()=>h,vv:()=>u,wm:()=>s,z:()=>c});var n=r(97268);r(67663);var i=r(38248);r(81056);let o=(e,t,r)=>"".concat(e,"-").concat(t,"-").concat(r,"-currency"),a=(e,t,r,n)=>{(0,i.setCookie)(o(e,t,r),n,{path:"/",secure:!0,sameSite:"lax",maxAge:31536e3})},s=e=>{var t;if(!e)return;let r=e.toLowerCase();return null==(t=n.Ay[r])?void 0:t.defaultCurrency},l=e=>{var t;return null==(t=n.Ay[e])?void 0:t.locale},c=e=>(null==e?void 0:e.split("-")[0])||"en",u=(e,t)=>{let{locale:r,currency:n}=t,i=new Intl.NumberFormat(r,{style:"currency",currency:n}),o=i.format(e);if(Number.isInteger(e)){var a;let e=null==(a=i.formatToParts(1.1).find(e=>"decimal"===e.type))?void 0:a.value;if(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp("".concat(t,"00(?=\\s*[^\\d]|$)"));return o.replace(r,"")}}return o},d=(e,t,r)=>{let n=new Date(e);return new Intl.DateTimeFormat(t,r).format(n)},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";try{var r;return(null==(r=new Intl.NumberFormat(t,{style:"currency",currency:e,minimumFractionDigits:0,maximumFractionDigits:0}).formatToParts(1).find(e=>"currency"===e.type))?void 0:r.value)||""}catch(e){return console.error("Error getting currency symbol:",e),""}},h=(e,t,r)=>{let n=o(e,t,r);return(0,i.getCookie)(n)||null}},60569:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=e=>{try{var t;(null==(t=window)?void 0:t.dataLayer)?window.dataLayer.push(e):console.warn("GTM dataLayer is not defined")}catch(e){console.warn("GTM push to dataLayer failed",e)}}},60844:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);
8(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){var c=[s,l];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},l=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCookie=t.deleteCookie=t.setCookie=t.getCookie=t.getCookies=void 0;var c=r(50844),u=r(64803),d=function(e){if((0,u.isClientSide)(e))throw Error("You are trying to access cookies on the client side. Please, use the client-side import with `cookies-next/client` instead.")},p=function(e){return!!e&&"getAll"in e&&"set"in e&&"function"==typeof e.getAll&&"function"==typeof e.set},h=function(e){return!!(null==e?void 0:e.req)&&"cookies"in e.req&&p(e.req.cookies)||!!(null==e?void 0:e.res)&&"cookies"in e.res&&p(e.res.cookies)||!!e&&"cookies"in e&&"function"==typeof e.cookies},f=function(e){var t={};return e.getAll().forEach(function(e){var r=e.name,n=e.value;t[r]=n}),t},g=function(e){return a(void 0,void 0,void 0,function(){var t,r;return s(this,function(n){switch(n.label){case 0:if(d(e),!h(e))return[3,2];if(e.req)return[2,f(e.req.cookies)];if(e.res)return[2,f(e.res.cookies)];if(!e.cookies)return[3,2];return t=f,[4,e.cookies()];case 1:return[2,t.apply(void 0,[n.sent()])];case 2:if((null==e?void 0:e.req)&&(r=e.req),null==r?void 0:r.cookies)return[2,r.cookies];if(null==r?void 0:r.headers.cookie)return[2,(0,c.parse)(r.headers.cookie)];return[2,{}]}})})};t.getCookies=g,t.getCookie=function(e,t){return a(void 0,void 0,void 0,function(){var r;return s(this,function(n){switch(n.label){case 0:return d(t),[4,g(t)];case 1:if(void 0===(r=n.sent()[e]))return[2,void 0];return[2,(0,u.decode)(r)]}})})};var m=function(e,t,r){return a(void 0,void 0,void 0,function(){var i,o,a,p,f,g,m,y,v,_,b,w,S,k,C;return s(this,function(s){switch(s.label){case 0:if(d(r),!h(r))return[3,3];if(i=r.req,o=r.res,a=r.cookies,p=l(r,["req","res","cookies"]),f=n({name:e,value:(0,u.stringify)(t)},p),i&&i.cookies.set(f),o&&o.cookies.set(f),!a)return[3,2];return[4,a()];case 1:s.sent().set(f),s.label=2;case 2:return[2];case 3:return g={},r&&(_=(v=r).req,b=v.res,w=l(v,["req","res"]),m=_,y=b,g=w),S=(0,c.serialize)(e,(0,u.stringify)(t),n({path:"/"},g)),y&&m&&(Array.isArray(k=y.getHeader("Set-Cookie"))||(k=k?[String(k)]:[]),y.setHeader("Set-Cookie",k.concat(S)),m&&m.cookies&&(C=m.cookies,""===t?delete C[e]:C[e]=(0,u.stringify)(t)),m&&m.headers&&m.headers.cookie&&(C=(0,c.parse)(m.headers.cookie),""===t?delete C[e]:C[e]=(0,u.stringify)(t),m.headers.cookie=Object.entries(C).reduce(function(e,t){return e.concat("".concat(t[0],"=").concat(t[1],";"))},""))),[2]}})})};t.setCookie=m,t.deleteCookie=function(e,t){return a(void 0,void 0,void 0,function(){return s(this,function(r){return d(t),[2,m
8(e,"",n(n({},t),{maxAge:-1}))]})})},t.hasCookie=function(e,t){return a(void 0,void 0,void 0,function(){return s(this,function(r){switch(r.label){case 0:if(d(t),!e)return[2,!1];return[4,g(t)];case 1:return[2,r.sent().hasOwnProperty(e)]}})})},o(r(98855),t)},61608:(e,t,r)=>{"use strict";let n;r.d(t,{Rr:()=>L,A2:()=>N,VJ:()=>D,Gk:()=>U,Q6:()=>M,a5:()=>R});var i=r(13938),o=r(62344),a=r(1285),s=r(86417),l=r(87780),c=r(57247),u=r(61885),d=r(32068),p=r(90198),h=r(34400),f=r(18932),g=r(17745),m=r(79766),y=r(47626),v=r(4328),_=r(27627),b=r(55630),w=r(46676),S=r(67540),k=r(27112),C=r(79770),E=r(67238),A=r(35428),I=r(93487);let x={LOG:"log",CONFIGURATION:"configuration",USAGE:"usage"},T=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],P=[c.R8,c.KG];function O(){return n||(n=new u.dX(100)),n}function R(e,t,r){let n=new u.cP,{enabled:i,metricsEnabled:o}=function(e,t,r,n,i=1,o=15){var a;let c={},u=!P.includes(t.site)&&(0,f.ic)(t.telemetrySampleRate),y={[x.LOG]:u,[x.CONFIGURATION]:u&&(0,f.ic)(t.telemetryConfigurationSampleRate),[x.USAGE]:u&&(0,f.ic)(t.telemetryUsageSampleRate),metric:u&&(0,f.ic)(i)},_={is_local_file:(null==(a=A.J2.location)?void 0:a.protocol)==="file:",is_worker:A.Wq},b=O();return b.subscribe(({rawEvent:i,metricName:a})=>{if(a&&!y.metric||!y[i.type])return;let u=a||i.status||i.type,p=c[u];if(p||(p=c[u]=new Set),p.size>=o)return;let f=(0,g.s)(i);if(p.has(f))return;let b=r.triggerHook(1,{startTime:(0,d.M8)().relative});if(b===E.ug)return;let w=function(e,r,n,i){let o={type:"telemetry",date:(0,d.M8)().timeStamp,service:r,version:"6.33.0",source:"browser",_dd:{format_version:2},telemetry:(0,m.kg)(n,{runtime_env:i,connectivity:(0,v.q)(),sdk_setup:"npm"}),ddtags:(0,l.m5)(t).join(","),experimental_features:Array.from((0,s.q7)())};return(0,m.kg)(o,e)}(b,e,i,_);n.notify(w),(0,h.b)("telemetry",w),p.add(f)}),b.unbuffer(),(0,p.Bd)(D),{enabled:u,metricsEnabled:y.metric}}(e,t,r,n),{stop:a}=function(e,t){let r=[];if((0,_.d0)()){let e=(0,_.Y9)(),n=t.subscribe(t=>e.send("internal_telemetry",t));r.push(n.unsubscribe)}else{let n=[e.rumEndpointBuilder];e.replica&&e.site===c.Bb&&n.push(e.replica.rumEndpointBuilder);let i=(0,b.X)({encoder:(0,k.N)(),request:(0,w.sA)(n,I.l),flushController:(0,S.tO)({pageMayExitObservable:(0,C._T)(e),sessionExpireObservable:new u.cP})});r.push(i.stop);let o=t.subscribe(i.add);r.push(o.unsubscribe)}return{stop:()=>r.forEach(e=>e())}}(t,n);return{stop:a,enabled:i,metricsEnabled:o}}function N(e,t){(0,p.oO)(i.bP.debug,e,t),O().notify({rawEvent:{type:x.LOG,message:e,status:"debug",...t}})}function D(e,t){O().notify({rawEvent:{type:x.LOG,status:"error",...function(e){if((0,o.bJ)(e)){var t;let r=(0,y.T)(e);return{error:{kind:r.name,stack:(0,a.Yn)(((t=r).stack=t.stack.filter(e=>!e.url||T.some(t=>e.url.startsWith(t))),t))},message:r.message}}return{error:{stack:o.e6},message:`Uncaught ${(0,g.s)(e)}`}}(e),...t}})}function L(e){O().notify({rawEvent:{type:x.CONFIGURATION,configuration:e}})}function U(e,t){O().notify({rawEvent:{type:x.LOG,message:e,status:"debug",...t},metricName:e})}function M(e){O().notify({rawEvent:{type:x.USAGE,usage:e}})}},61885:(e,t,r)=>{"use strict";r.d(t,{dX:()=>l,cP:()=>a,Fx:()=>s});var n=r(90198),i=r(35428);function o(e){let t=i.J2.queueMicrotask;"function"==typeof t?t((0,n.dm)(e)):Promise.resolve().then((0,n.dm)(e))}class a{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(t=>t(e))}addObserver(e){this.observers.push(e),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function s(...e){return new a(t=>{let r=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>r.forEach(e=>e.unsubscribe())})}class l extends a{constructor(e){super(),this.maxBufferSize=e,this.buffer=[]}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(e)}subscribe(e){let t=!1;return o(()=>{for(let r of this.buffer){if(t)return;e(r)}t||this.addObserver(e)}),{unsubscribe:()=>{t=!0,this.removeObserver(e)}}}unbuffer(){o(()=>{this.maxBufferSize=this.buffer.length=0})}}},62344:(e,t,r)=>{"use strict";r.d(t,{As:()=>u,bJ:()=>d,e6:()=>l});var n=r(68717),i=r(17745),o=r(47626),a=r(1285),s=r(64111);let l="No stack, consider using an instance of Error";function c({originalError:e,stackTrace:t,source:r,useFallbackStack:s=!0,nonErrorPrefix:c}){var u,p,h,f;let g=d(e);return!t&&g&&(t=(0,o.T)(e)),{source:r,type:t?t.name:void 0,message:(u=t,p=g,h=c,f=e,(null==u?void 0:u.message)&&(null==u?void 0:u.name)?u.message:p?"Empty message":h?`${h} ${(0,i.s)((0,n.a)(f))}`:(0,i.s)((0,n.a)(f))),stack:t?(0,a.Yn)(t):s?l:void 0}}function u({stackTrace:e,originalError:t,handlingStack:r,componentStack:n,startClocks:i,nonErrorPrefix:o,useFallbackStack:a=!0,source:l,handling:u}){var p;let h=c({originalError:t,stackTrace:e,source:l,useFallbackStack:a,nonErrorPrefix:o});return{startClocks:i,handling:u,handlingStack:r,componentStack:n,originalError:t,...h,causes:d(t)?function(e,t){let r=[],n=e.cause;for(;null!=n&&r.length<10;){let e=c({originalError:n,source:t,useFallbackStack:!1});r.push(e),n=d(n)?n.cause:void 0}return r.length?r:void 0}(t,l):void 0,fingerprint:d(p=t)&&"dd_fingerprint"in p?String(p.dd_fingerprint):void 0,context:function(e){if((0,s.O)(e))return e.dd_context}(t)}}function d(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}},62789:(e,t,r)=>{"use strict";r.d(t,{IQ:()=>o,Sq:()=>a});var n=r(38248);let i=(e,t)=>"".concat(e,"-").concat(t,"-session"),o=e=>{let{brand:t,siteId:r}=e,o=i(t,r),a=(0,n.getCookie)(o);if(!a||"string"!=typeof a)return null;let[s,l,c,u,d,p,h,f]=decodeURIComponent(a).split("|"),g=p&&h&&f;return{tgUserId:s,sessionId:l,landingPageURL:c,genseg:d,firstName:g?p:void 0,lastName:g?h:void 0,email:g?f:void 0}},a=(e,t)=>{let{brand:r,siteId:o}=e,a=i(r,o),s=(0,n.getCookie)(a);if(!s||"string"!=typeof s||!t.firstName||!t.lastName||!t.email)return;let[l,c,u,d,p]=decodeURIComponent(s).split("|"),h="".concat(l,"|").concat(c,"|").concat(u,"|").concat(d,"|").concat(p,"|").concat(t.firstName,"|").concat(t.lastName,"|").concat(t.email),f=new Date;f.setMinutes(f.getMinutes()+30),(0,n.setCookie)(a,h,{secure:!0,sameSite:"lax",expires:f,path:"/"})}},64111:(e,t,r)=>{"use strict";function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===n(e)}
8r.d(t,{O:()=>i,P:()=>n})},64803:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRenderPhase=t.isClientSide=t.decode=t.stringify=void 0,t.stringify=function(e){try{if("string"==typeof e)return e;return JSON.stringify(e)}catch(t){return e}},t.decode=function(e){return e?e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent):e},t.isClientSide=function(e){return!(null==e?void 0:e.req)&&!(null==e?void 0:e.res)&&!(e&&"cookies"in e&&(null==e?void 0:e.cookies))},t.getRenderPhase=function(){return"undefined"==typeof window?"server":"client"}},65835:(e,t,r)=>{"use strict";function n(e){return"object"==typeof e&&(null==e?void 0:e.isSuccess)===!1&&"string"==typeof(null==e?void 0:e.errorMessage)&&"number"==typeof(null==e?void 0:e.errorCode)?e.errorMessage:String(e)}r.d(t,{I7:()=>o,ch:()=>n,sc:()=>a});let i={errorCode:0,errorMessage:"Backend error",errorObj:null,isSuccess:!1},o=async e=>{let t=new AbortController,r=setTimeout(()=>t.abort(),3e4);try{let r=await fetch(e,{headers:{"Content-Type":"application/json",Accept:"application/json, text/plain, */*"},method:"GET",credentials:"include",mode:"cors",signal:t.signal});return r.ok||Promise.reject(i),r.json()}catch(e){return Promise.reject(i)}finally{clearTimeout(r)}},a=async(e,t)=>{let r=new AbortController,n=setTimeout(()=>r.abort(),3e4);try{let n=await fetch(e,{headers:{"Content-Type":"application/json",Accept:"application/json, text/plain, */*"},method:"POST",body:t,credentials:"include",mode:"cors",signal:r.signal});n.ok||Promise.reject(i);let o=await n.json();if(!o.isSuccess)return Promise.reject(o);return o}catch(e){return Promise.reject(i)}finally{clearTimeout(n)}}},66689:(e,t,r)=>{"use strict";r.d(t,{x:()=>n});let n=(e,t,r)=>{if(!r||!t)return null;switch(t.toLowerCase()){case"fixed":return Math.ceil(e+r);case"percentage":return Math.ceil(100*e/(100-r))}return null}},67238:(e,t,r)=>{"use strict";r.d(t,{$O:()=>o,XP:()=>a,ug:()=>i});var n=r(79766);let i="DISCARDED",o="SKIPPED";function a(){let e={};return{register:(t,r)=>(e[t]||(e[t]=[]),e[t].push(r),{unregister:()=>{e[t]=e[t].filter(e=>e!==r)}}),triggerHook(t,r){let a=e[t]||[],s=[];for(let e of a){let t=e(r);if(t===i)return i;t!==o&&s.push(t)}return(0,n.kg)(...s)}}}},67540:(e,t,r)=>{"use strict";r.d(t,{tO:()=>u});var n=r(35428),i=r(61885),o=r(74349),a=r(32068),s=r(46676);let l=30*a.OY,c=n.Wq?1:50;function u({pageMayExitObservable:e,sessionExpireObservable:t}){let r,n,a=new i.cP,u=e.subscribe(e=>{r=e.reason;try{a.notify(e.reason)}finally{r=void 0}g(e.reason)}),d=t.subscribe(()=>g("session_expire")),p=new i.cP(()=>()=>{u.unsubscribe(),d.unsubscribe()}),h=0,f=0;function g(e){if(0===f)return;let t=f,r=h;f=0,h=0,m(),p.notify({reason:e,messagesCount:t,bytesCount:r})}function m(){(0,o.DJ)(n),n=void 0}return{flushObservable:p,preparePageExitFlushObservable:a,get messagesCount(){return f},notifyBeforeAddMessage(e){h+e>=s.AK&&g(null!=r?r:"bytes_limit"),f+=1,h+=e,void 0===n&&(n=(0,o.wg)(()=>{g("duration_limit")},l))},notifyAfterAddMessage(e=0){h+=e,f>=c?g(null!=r?r:"messages_limit"):h>=s.AK&&g(null!=r?r:"bytes_limit")},notifyAfterRemoveMessage(e){h-=e,0==(f-=1)&&m()}}}},67663:(e,t,r)=>{"use strict";r.d(t,{iY:()=>o,CP:()=>a,le:()=>l,Xk:()=>s}),r(4815);var n=r(50310),i=r(99423);r(97268);let o=e=>{let{brand:t,country:r}=e;return(0,i.go)(t,r)?"".concat(r,"/"):""},a=e=>{let t=n.A.find(t=>t.siteId===e);return t?t.cdn:(console.error("No site found with siteId: ".concat(e)),"")},s=e=>{let t=new URL(e).hostname.replace(/^www\./,"");return".".concat(t)},l=()=>window.location.hostname.replace(/^www\./,"")},68717:(e,t,r)=>{"use strict";r.d(t,{a:()=>s});var n=r(13938),i=r(5489),o=r(17745);let a=220*i._m;function s(e,t=a){let r=(0,o.M)(Object.prototype),n=(0,o.M)(Array.prototype),i=[],u=new WeakMap,d=l(e,"$",void 0,i,u),p=JSON.stringify(d),h=p?p.length:0;if(h>t)return void c(t,"discarded",e);for(;i.length>0&&h<t;){let r=i.shift(),n=0;if(Array.isArray(r.source))for(let o=0;o<r.source.length;o++){let a=l(r.source[o],r.path,o,i,u);if(void 0!==a?h+=JSON.stringify(a).length:h+=4,h+=n,n=1,h>t){c(t,"truncated",e);break}r.target[o]=a}else for(let o in r.source)if(Object.prototype.hasOwnProperty.call(r.source,o)){let a=l(r.source[o],r.path,o,i,u);if(void 0!==a&&(h+=JSON.stringify(a).length+n+o.length+3,n=1),h>t){c(t,"truncated",e);break}r.target[o]=a}}return r(),n(),d}function l(e,t,r,n,i){let o=function(e){if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(e){}return e}(e);if(!o||"object"!=typeof o){var a;return"bigint"==typeof(a=o)?`[BigInt] ${a.toString()}`:"function"==typeof a?`[Function] ${a.name||"unknown"}`:"symbol"==typeof a?`[Symbol] ${a.description||a.toString()}`:a}let s=function e(t){try{if(t instanceof Event){var r;return{type:(r=t).type,isTrusted:r.isTrusted,currentTarget:r.currentTarget?e(r.currentTarget):null,target:r.target?e(r.target):null}}if(t instanceof RegExp)return`[RegExp] ${t.toString()}`;let n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch(e){}return"[Unserializable]"}(o);if("[Object]"!==s&&"[Array]"!==s&&"[Error]"!==s)return s;if(i.has(e))return`[Reference seen at ${i.get(e)}]`;let l=void 0!==r?`${t}.${r}`:t,c=Array.isArray(o)?[]:{};return i.set(e,l),n.push({source:o,target:c,path:l}),c}function c(e,t,r){n.Vy.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,r)}},70408:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>m,GZ:()=>g,K2:()=>f,SP:()=>h,YT:()=>d,_W:()=>l,dE:()=>p,i0:()=>u,tT:()=>c,wb:()=>a}),r(67663);var n=r(38248);r(81056);var i=r(97268);let o=(e,t,r)=>"".concat(e,"-").concat(t,"-").concat(r,"-geo-location"),a=(e,t,r,i)=>{(0,n.setCookie)(o(e,t,r),i)},s=(e,t,r)=>"".concat(e,"-").concat(t,"-").concat(r,"-show-geo-location-popup"),l=(e,t,r)=>{let i=s(e,t,r);return"true"===(0,n.getCookie)(i)},c=(e,t,r)=>{let i="".concat(e,"-").concat(t,"-").concat(r,"-target-site");return(0,n.getCookie)(i)},u=(e,t,r,i)=>{let o=s(e,t,r);(0,n.setCookie)(o,i)},d=(e,t,r)=>{try{let i=o(e,t,r);return(0,n.getCookie)(i)}catch(e){return console.error("Error getting user geo-country cookie:",e),r}},p=(e,t,r)=>{try{let i="".concat(e,"-").concat(t,"-").concat(r,"-geo-location-origin");return(0,n.getCookie)(i)}catch(e){return console.error("Error getting user geo-location-origin cookie:",e),r}},h=(e,t,r)=>{try{let i="".concat(e,"-").concat(t,"-").concat(r,"-geo-city");return(0,n.getCookie)(i)}catch(e){return console.warn("Error getting user geo-city cookie:",e),""}},f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";try{if(!e)return"";let r=e.toUpperCase();return new Intl.DisplayNames([t],{type:"region"}).of(r)||""}catch(e){return console.error("Error getting country name:",e),""}},g=(e,t)=>e?t[e.toUpperCase()]||f(e):"",m=(e,t)=>
8{try{if(!e||!t)return!1;return e.some(e=>t===(0,i.y1)(e.toLocaleLowerCase()))}catch(e){return console.warn("Couldn't determine if item is excluded.",e),!1}}},70414:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=()=>Math.random().toString(36).substring(2)+new Date().getTime().toString(36)},72091:(e,t,r)=>{"use strict";r.d(t,{C:()=>w,E:()=>S,a:()=>k,b:()=>b,c:()=>m,d:()=>p,f:()=>s,g:()=>d,u:()=>v});var n=r(8106),i=r(87718),o=r(8402),a=r(14232);let s=(e,t,r)=>{let n=e.map(e=>{let t=(0,o.b)(e,r);return{category_uid:e.uid,optionId:null==t?void 0:t.id}}).filter(e=>e.optionId).flatMap(e=>l(t.filter(t=>t.controlling_category_key===e.category_uid),e.optionId)).filter(Boolean);return new Set(c(t,n))},l=(e,t)=>null==e?void 0:e.filter(e=>e.controlling_option===t).flatMap(e=>e.controlled_category_keys),c=(e,t)=>e?e.flatMap(e=>e.controlled_category_keys).filter(e=>!t.includes(e)):[],u=(e,t,r,n)=>{if(0===t.length)return e.map(e=>({...e,options:h(e.options,null==n?void 0:n.disableLinksInSelectionFields),is_hidden:!e.is_active}));let i=s(e,t,r);return e.map(e=>({...e,options:h(e.options,null==n?void 0:n.disableLinksInSelectionFields),is_hidden:i.has(e.uid)||!e.is_active}))},d=(e,t,r)=>{let n=new Set(r.map(e=>e.category_uid)),i=r.map(t=>{let r=e.find(e=>e.uid===t.category_uid);return(null==r?void 0:r.type)==="selection"&&"string"==typeof t.value?{...t,value:Number(t.value)}:t});if(n.size>0){let r=(0,o.h)(e,t,i),a=[...i,...null==r?void 0:r.filter(e=>"selection"===e.type).filter(e=>!n.has(e.uid)).map(e=>{var t;let r=null==(t=e.options)?void 0:t.find(e=>e.is_default&&!e.is_placeholder);return r?{category_id:e.id,category_uid:e.uid,value:r.id}:null}).filter(e=>null!==e)].filter((e,t,r)=>r.findIndex(t=>t.category_uid===e.category_uid)===t);return(0,o.m)(e,a)}let a=null==e?void 0:e.filter(e=>"selection"===e.type).map(e=>{var t;let r=null==(t=e.options)?void 0:t.find(e=>e.is_default&&!e.is_placeholder);return r?{category_id:e.id,category_uid:e.uid,value:r.id}:null}).filter(e=>null!==e),s=new Set((0,o.h)(e,t,a).map(e=>e.uid)),l=a.filter(e=>s.has(e.category_uid));return(0,o.m)(e,l)},p=(e,t,r)=>{let{id:n,categories:i,show_and_hides:o}=e;return{id:n,categories:u(i,o,t,r),show_and_hides:o}},h=(e,t)=>e&&0!==e.length?e.map(e=>({...e,isLinkComponent:!t&&null!==e.related_product,productLink:!t&&e.related_product?(e=>{let{short_id:t,friendly_url:r}=e||{};return t?r?{friendlyUrl:r,isFriendly:!0}:{shortIdLink:`Product.aspx?p=${null==t?void 0:t.toString()}`,shortId:t,isFriendly:!1}:null})(e.related_product):null})):[],f=(e,t=[])=>{var r;if(!e||!t.length)return 0;let n=new Set(t.map(e=>e.category_uid)),i=e.filter(e=>"selection"===e.type&&n.has(e.uid)).map(e=>(0,o.b)(e,t));return i&&0!==i.length?null==(r=i.map(e=>(null==e?void 0:e.price_adjustment)||0))?void 0:r.reduce((e,t)=>e+t):0},g="userPreferences",m=(0,n.v)()((0,i.a)(e=>({preferences:{},loadPreferences:()=>{try{let t=localStorage.getItem(g);t&&e({preferences:JSON.parse(t)})}catch(e){console.error("Failed to load user preferences:",e)}},updatePreferences:t=>{let r=t.reduce((e,t)=>(e[t.category_id]=t.value,e),{});e(e=>{let t={...e.preferences,...r};return localStorage.setItem(g,JSON.stringify(t)),{preferences:t}})},updatePreferencesFromObject:t=>{e(()=>(localStorage.setItem(g,JSON.stringify(t)),{preferences:t}))}}),{name:g})),y=(e,t)=>{let r=new Set(e.userSelections.map(e=>e.category_uid)),n=e.productData.categories.filter(e=>"selection"===e.type&&!e.is_hidden&&!r.has(e.uid)).map(e=>{var t;let r=null==(t=e.options)?void 0:t.find(e=>e.is_default&&!e.is_placeholder);return r?{category_id:e.id,category_uid:e.uid,value:r.id}:null}).filter(e=>null!==e);e.userSelections.push(...n),e.priceAdjustmentsSum=f(t,e.userSelections)},v=(0,n.v)()((0,i.b)((0,i.s)((...e)=>({...((e,t)=>({itemEditorsList:{},createInstance:(r,n,o,a,s)=>{if(!r)return"";let l=a||(0,i.n)(12),c=t();if(c.itemEditorsList[l])return c.updateExistingInstanceWithNewData(l,r,n||[]),l;let{short_id:u,version_id:h,sku:g,categories:m,show_and_hides:y}=r,v=d(m,y,n||[]),_=p(r,v,s),b=f(_.categories,v)||0;return e((0,i.p)(e=>{e.itemEditorsList[l]={sku:g,product_id:u,version_id:h,key:l,productData:_,userSelections:v,validationErrors:[],mode:o,priceAdjustmentsSum:b,options:s}}),!1,`createInstance/${l}`),l},cleanupUnusedInstances:t=>{e((0,i.p)(e=>{e.itemEditorsList[t]&&delete e.itemEditorsList[t]}),!1,"cleanupUnusedInstances")},cleanStoreFromNewMode:()=>{e((0,i.p)(e=>{let t=Object.values(e.itemEditorsList);null==t||t.forEach(t=>{"new"===t.mode&&delete e.itemEditorsList[t.key]})}),!1,"removeNewModeInstances")},getItemEditorById:e=>t().itemEditorsList[e]||null,getItemEditorListAsArray:()=>Object.values(t().itemEditorsList),getFieldValueById:(e,r)=>{var n,i;let a=t().itemEditorsList[e];if(!a)return;let s=null==(n=a.productData.categories.find(e=>e.uid===r))?void 0:n.type,l=null==(i=(0,o.a)(null==a?void 0:a.userSelections,r))?void 0:i.value;if(l)return"selection"===s?+l:l}}))(...e),...(e=>({updateTextOptionSelection:(t,r,n,o)=>{e((0,i.p)(e=>{let i=e.itemEditorsList[t];if(!(null!=i&&i.userSelections))throw Error(`Instance with ID "${t}" does not exist or is not initialized`);let a=i.userSelections.findIndex(e=>e.category_id===r&&e.category_uid===n);a>=0?i.userSelections[a].value=o:i.userSelections.push({category_id:r,category_uid:n,value:o}),i.options.userPreferencesEnabled&&m.getState().updatePreferences([{category_id:r,category_uid:n,value:o}])}),!1,"updateTextSelection")},updateOptionSelectionForSelectionFields:(t,r,n)=>{e((0,i.p)(e=>{let i=e.itemEditorsList[t];if(!i||!i.userSelections||!i.productData)throw Error(`Instance with ID "${t}" does not exist or is not initialized`);let a=i.productData.categories,l=i.userSelections.find(e=>e.category_uid===n);l?l.value=r:(l={category_id:Number(n.split("_")[1]),category_uid:n,value:r},i.userSelections.push(l)),i.options.userPreferencesEnabled&&m.getState().updatePreferences([{category_id:l.category_id,category_uid:n,value:r}]);let c=i.options;i.productData.categories=u(a,i.productData.show_and_hides,i.userSelections,c);let d=s(a,i.productData.show_and_hides,i.userSelections);d&&(i.userSelections=i.userSelections.filter(e=>!d.has(e.category_uid)),i.validationErrors=i.validationErrors.filter(e=>{let t=a.find(t=>
8t.id===e.categoryId);return!t||!d.has(t.uid)})),y(i,a),o.e.emit("selectionOptionChange",{instanceId:t,categoryUid:n,value:r})}),!1,"updateDropdownSelection")},updateUserSelectionByInstanceId:(t,r)=>{e((0,i.p)(e=>{var n;let i=e.itemEditorsList[t];if(!i)return void console.error("â No instance found in updateUserSelectionByInstanceId for update");let a=r.category_uid,l=null==(n=i.productData.categories)?void 0:n.find(e=>e.uid===a),c=(null==l?void 0:l.type)==="selection",d=(0,o.a)(i.userSelections,a);if(d)if(d.value===r.value)return void console.log("â
No change, skipping update.");else d.value=r.value;else i.userSelections.push(r);if(c){let e=i.options;i.productData.categories=u(i.productData.categories,i.productData.show_and_hides,i.userSelections,e);let t=s(i.productData.categories,i.productData.show_and_hides,i.userSelections);t&&(i.userSelections=i.userSelections.filter(e=>!t.has(e.category_uid)),i.validationErrors=i.validationErrors.filter(e=>{let r=i.productData.categories.find(t=>t.id===e.categoryId);return!r||!t.has(r.uid)})),y(i,i.productData.categories)}}),!1,"updateUserSelection")},updateExistingInstanceWithNewData:(t,r,n=[])=>{e((0,i.p)(e=>{let i=e.itemEditorsList[t];if(!i)return void console.warn(`Instance with ID ${t} not found.`);if(!r)return void console.error("Catalog product is required for updating an instance.");let{categories:o,show_and_hides:a}=r,s=d(o,a,n),l=p(r,s,i.options),c=f(l.categories,s)||0;i.productData=l,i.userSelections=s,i.priceAdjustmentsSum=c}),!1,"updateExistingInstance")},replaceCurrentInstanceData:(t,r,n=[])=>{e((0,i.p)(e=>{let i=e.itemEditorsList[t];if(!i)return void console.warn(`Instance with ID ${t} not found.`);if(!r)return void console.error("Catalog product is required for updating an instance.");let{mode:o,options:a,key:s}=i,{short_id:l,version_id:c,sku:u,categories:h,show_and_hides:g}=r,m=d(h,g,n||[]),y=p(r,m,a),v=f(y.categories,m)||0;e.itemEditorsList[t]={sku:u,key:s,product_id:l,version_id:c,mode:o,productData:y,userSelections:m,validationErrors:[],priceAdjustmentsSum:v,options:a}}),!1,"replaceInstanceData")}}))(...e),...(e=>({addValidationError:(t,r)=>{e((0,i.p)(e=>{let n=e.itemEditorsList[t];if(!n)return void console.warn(`Instance with ID "${t}" does not exist`);let i=n.validationErrors.findIndex(e=>e.categoryId===r.categoryId&&e.validationType===r.validationType);-1===i?n.validationErrors.push({...r}):n.validationErrors[i].errorMsg=r.errorMsg}),!1,"addValidationError")},removeValidationError:(t,r)=>{e((0,i.p)(e=>{let n=e.itemEditorsList[t];if(!n)return void console.warn(`Instance with ID "${t}" does not exist`);n.validationErrors=n.validationErrors.filter(e=>e.categoryId!==r.categoryId||e.validationType!==r.validationType)}),!1,"removeValidationError")},setValidationErrorsHidden:(t,r)=>{e((0,i.p)(e=>{let n=e.itemEditorsList[t];if(!n)return void console.warn(`Instance with ID "${t}" does not exist`);n.options.hideValidationErrors=r}),!1,"setValidationErrorsHidden")}}))(...e)})),{name:"Item Editor Store",enabled:!0})),_=(0,a.createContext)(null),b=()=>{let e=(0,a.useContext)(_);if(!e)throw Error("useCustomComponents must be used within a CustomComponentContext.Provider");return e},w=_.Provider,S=(0,a.createContext)(null),k=()=>{let e=(0,a.useContext)(S);if(!e)throw Error("useEditModeContext must be used within an EditModeProvider");return e}},72614:(e,t,r)=>{"use strict";r.d(t,{Y:()=>i,i:()=>o});var n=r(37876);let i=(0,r(14232).createContext)({}),o=e=>{let{translations:t,children:r}=e;return(0,n.jsx)(i.Provider,{value:t,children:r})}},73411:(e,t,r)=>{"use strict";r.d(t,{g:()=>n});let n={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"}},74349:(e,t,r)=>{"use strict";r.d(t,{DJ:()=>s,vG:()=>c,wg:()=>a,yb:()=>l});var n=r(87151),i=r(90198),o=r(35428);function a(e,t){return(0,n.W)((0,o.VZ)(),"setTimeout")((0,i.dm)(e),t)}function s(e){(0,n.W)((0,o.VZ)(),"clearTimeout")(e)}function l(e,t){return(0,n.W)((0,o.VZ)(),"setInterval")((0,i.dm)(e),t)}function c(e){(0,n.W)((0,o.VZ)(),"clearInterval")(e)}},74394:(e,t,r)=>{"use strict";function n(e){return e>=500}function i(e){try{return e.clone()}catch(e){return}}r.d(t,{G:()=>n,i:()=>i})},75582:(e,t,r)=>{"use strict";r.d(t,{A:()=>O});var n=r(8106),i=r(8402);let o=e=>{let{userSelections:t,catalogProduct:r}=e;if(!r)return t;let n=t.options_selections||[],o=(0,i.h)(r.categories,r.show_and_hides,n).filter(e=>"text"===e.type).filter(e=>!n.find(t=>t.category_uid===e.uid)).map(e=>({category_id:e.id,category_uid:e.uid,value:""}));return{...t,options_selections:[...n,...o]}};var a=r(54198),s=r(617),l=r(91298);let c=e=>{var t,r,n;return{key:e.key,sku:e.sku,productId:e.product_id,versionId:e.version_id,variantId:0,componentId:0,parentId:e.parent_id,parentKey:e.parent_key||"",itemAddUrl:null!=(t=e.item_add_url)?t:null,itemAddPageType:null!=(r=e.item_add_page_type)?r:null,optionsSelections:(null!=(n=e.options_selections)?n:[]).map(e=>({categoryId:e.category_id,categoryUid:e.category_uid,value:String(e.value)}))}};var u=r(22014),d=r(90203),p=r(58040);let h=e=>[e.key,...e.children.flatMap(h)],f=(e,t)=>e.filter(t).flatMap(h);var g=r(53725),m=r(22202);let y=(e,t,r)=>{for(let n of e){if(n.key===t)return r;let e=y(n.children,t,null!=r?r:n);if(e)return e}};var v=r(93619),_=r(72091),b=r(83150);let w="binary-popup-flag";var S=r(4319),k=r(98653),C=r(95993);let E=null,A=()=>{"undefined"!=typeof document&&(E=document.activeElement)},I=()=>{let e=E;E=null,e&&e.isConnected&&setTimeout(()=>
8e.focus(),0)},x=[{type:"summary"}];var T=r(1066);let P=(0,n.v)()((0,S.Zr)((0,S.eh)((0,S.lt)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return{...(0,u.V)(...t),...((e,t)=>({addToCartLoading:!1,addToCartError:!1,addToCartSucceed:!1,addToCart:async r=>{e({addToCartLoading:!0,addToCartError:!1},!1,"add-to-cart/start");let{postToCartClientAPI:n,postToCartClientLegacyAPI:i,siteData:u,setShouldDisplayLastMinuteOffer:d}=t(),p=r.map(o).map(e=>{var t;return{...e,item_add_url:null==(t=location)?void 0:t.pathname,item_add_page_type:(0,s.L)()}});try{return(0,l.S)(u)?await n("addItems",{itemsToAdd:p.map(c)}):await i("/items/add",{ItemsToAdd:p}),e({addToCartLoading:!1,addToCartError:!1,addToCartSucceed:!0},!1,"add-to-cart/success"),d(),!0}catch(t){return e({addToCartLoading:!1,addToCartError:!0,addToCartSucceed:!1},!1,"add-to-cart/failed"),(0,a.D)("Error adding items to cart",{error:t,location:"shopping-cart",items_to_add:r}),!1}}}))(...t),...((e,t)=>({editError:!1,editLoading:!1,editSucceed:!1,editCartItem:async r=>{e({editLoading:!0,editError:!1});let{siteData:n,postToCartClientAPI:i,postToCartClientLegacyAPI:o}=t();try{(0,l.S)(n)?await i("replaceItem",{replacedProducts:[c(r)]}):await o("/items/update",{UpdatedProduct:r}),e({editLoading:!1,editSucceed:!0})}catch(t){console.error("Failed to update edit item in cart, item: ".concat(r),t),e({editLoading:!1,editError:!0,editSucceed:!1})}},openScsCartItemEdit:async r=>{let{siteData:n,cardItemTree:i,pushCartPanelEditView:o}=t(),a=(0,d.A)(i,r);if(!a)return;let s=y(i,r),l=s?{sku:s.product.sku,price:s.product.price.selling}:void 0;e({editLoading:!0,editError:!1});try{let t=await (0,g.gy)(n,a.product.sku);if(t.error)throw Error(t.errorMessage);let r=(0,m.c)(t,n),i=a.selectedOptions.map(e=>({category_id:e.categoryId,category_uid:e.categoryUid,value:e.value}));o({type:"edit",key:a.key,instanceKey:"".concat(a.key,"-cart-edit"),catalogProduct:r,userSelections:i,name:r.name,price:a.product.price,media:r.mediaGallery,image:a.product.image,parent:l}),e({editLoading:!1})}catch(t){console.error("Failed to open SCS cart item editor",t),e({editLoading:!1,editError:!0})}}}))(...t),...((e,t)=>({deleteError:!1,deleteLoading:!1,deleteDialogVisible:!1,deleteSucceed:!1,deleteTargetKey:null,openDeleteDialog:r=>{var n,i;let o=t().items,a=null!=(i=null!=(n=o.find(e=>e.key===r))?n:o.flatMap(e=>{var t;return null!=(t=e.pips)?t:[]}).find(e=>e.key===r))?i:null;e({deleteDialogVisible:!0,deleteTargetKey:r,currentItem:a,deleteError:!1,deleteSucceed:!1},!1,"openDeleteDialog")},closeDeleteDialog:()=>e({deleteDialogVisible:!1},!1,"closeDeleteDialog"),deleteFromCart:async r=>{e({deleteLoading:!0,deleteError:!1},!1,"deleteFromCart/start");try{var n;let i=(0,d.A)(t().cardItemTree,r);if(!i)throw Error("no item found for deletion");(null==(n=t().freeGift)?void 0:n.sku)===i.product.sku&&t().removeFreeGift();let o=h(i);await t().postToCartClientAPI("deleteItem",{itemsKeys:o}),e({deleteLoading:!1,deleteError:!1,deleteDialogVisible:!1,deleteSucceed:!0},!1,"deleteFromCart/success")}catch(t){console.error("Failed to delete from cart",t),e({deleteLoading:!1,deleteError:!0,deleteSucceed:!1},!1,"deleteFromCart/failed")}},deleteFromLegacyCartPage:async()=>{e({deleteLoading:!0,deleteError:!1},!1,"deleteFromLegacyCartPage/start");try{var r;let n=t().postToCartClientLegacyAPI,i=t().currentItem;if(!i)throw Error("no item found for deletion");(null==(r=t().freeGift)?void 0:r.sku)===i.sku&&t().removeFreeGift();let o=[i.key,...i.pips?i.pips.filter(e=>e.nested).map(e=>e.key):[]];await n("/items/delete",{ItemsKeys:o}),e({deleteLoading:!1,deleteError:!1,deleteDialogVisible:!1,deleteSucceed:!0},!1,"deleteFromLegacyCartPage/success")}catch(t){console.error("Failed to delete from cart",t),e({deleteLoading:!1,deleteError:!0,deleteSucceed:!1},!1,"deleteFromLegacyCartPage/failed")}},deleteFromLegacyCartPanel:async r=>{e({deleteLoading:!0,deleteError:!1},!1,"deleteFromLegacyCartPanel/start");try{var n;let i=(0,d.A)(t().cardItemTree,r);if(!i)throw Error("no item found for deletion");(null==(n=t().freeGift)?void 0:n.sku)===i.product.sku&&t().removeFreeGift();let o=[i.key,...i.children.map(e=>e.key)];await t().postToCartClientLegacyAPI("/items/delete",{ItemsKeys:o}),e({deleteLoading:!1,deleteError:!1,deleteDialogVisible:!1,deleteSucceed:!0},!1,"deleteFromLegacyCartPanel/success")}catch(t){console.error("Failed to delete from cart",t),e({deleteLoading:!1,deleteError:!0,deleteSucceed:!1},!1,"deleteFromLegacyCartPanel/failed")}},resetDeleteSucceed:()=>e({deleteSucceed:!1}
8,!1,"resetDeleteSucceed"),deleteCartItemBySKU:async r=>{try{if((0,l.S)(t().siteData)){let e=f(t().cardItemTree,e=>e.product.sku===r);if(e.length<1)return;await t().postToCartClientAPI("deleteItem",{itemsKeys:e})}else{let e=t().postToCartClientLegacyAPI,n=t().items.filter(e=>e.sku===r).map(e=>e.key);if(n.length<1)return;await e("/items/delete",{ItemsKeys:n})}e({deleteLoading:!1,deleteError:!1,deleteDialogVisible:!1,deleteSucceed:!0},!1,"deleteCartItemBySKU/success")}catch(t){console.error("Failed to delete from cart by sku: ".concat(r),t),e({deleteLoading:!1,deleteError:!0,deleteSucceed:!1},!1,"deleteCartItemBySKU/failed")}},deleteOutdatedItems:async()=>{e({deleteLoading:!0},!1,"deleteOutdatedItems/start");try{(0,l.S)(t().siteData)?await t().postToCartClientAPI("deleteUnavailable"):await t().postToCartClientLegacyAPI("/items/deleteoutofstock"),e({deleteLoading:!1},!1,"deleteOutdatedItems/success")}catch(t){console.error("Failed to delete outdated items",t),e({deleteLoading:!1},!1,"deleteOutdatedItems/failed")}},deleteExcludedItems:async()=>{e({deleteLoading:!0},!1,"deleteExcludedItems/start");try{if((0,l.S)(t().siteData)){let e=f(t().cardItemTree,e=>(0,p.A)(e.product));e.length&&await t().postToCartClientAPI("deleteItem",{itemsKeys:e})}else{let e=t().postToCartClientLegacyAPI,r=t().items.filter(e=>!0===e.isExcluded).map(e=>e.key);await e("/items/delete",{ItemsKeys:r})}e({deleteLoading:!1},!1,"deleteExcludedItems/success")}catch(t){console.error("Error when trying to remove excluded items from cart.",t),e({deleteLoading:!1},!1,"deleteExcludedItems/failed")}},deleteFreeGiftItems:async()=>{e({deleteLoading:!0},!1,"deleteFreeGiftItems/start");try{if((0,l.S)(t().siteData)){let e=f(t().cardItemTree,e=>e.isFreeGift);e.length&&await t().postToCartClientAPI("deleteItem",{itemsKeys:e})}else{let e=t().postToCartClientLegacyAPI,r=t().freeGiftItems.map(e=>e.key);await e("/items/delete",{ItemsKeys:r})}e({deleteLoading:!1,cartIsValid:!0,hasMultipleFreeGifts:!1},!1,"deleteFreeGiftItems/success")}catch(t){console.error("Error when trying to remove free gifts items from cart.",t),e({deleteLoading:!1},!1,"deleteFreeGiftItems/failed")}}}))(...t),...((e,t)=>({couponLoading:!1,couponError:!1,couponSucceed:!1,couponFromQuery:null,couponRejection:null,couponCode:"",applyCoupon:async r=>{e({couponLoading:!0,couponError:!1,couponSucceed:!1,couponRejection:null,couponCode:r},!1,"apply-coupon/start");let{siteData:n,postToCartClientAPI:i,postToCartClientLegacyAPI:o}=t();try{if((0,l.S)(n)){let n=await i("applyCoupon",{couponCode:r}),o=(null==n?void 0:n.status)?n:t().coupon,a=(null==o?void 0:o.status)==="Success";e({couponRejection:a?null:null!=o?o:null,couponLoading:!1,couponSucceed:a,couponError:!a,couponFromQuery:null},!1,"apply-coupon/scs-result")}else await o("/coupon/apply",{CouponCode:r}),e({couponLoading:!1,couponSucceed:!0,couponFromQuery:null},!1,"apply-coupon/success")}
8catch(t){e({couponLoading:!1,couponError:!0,couponSucceed:!1},!1,"apply-coupon/failed")}},setCouponField:t=>e({couponCode:t}),removeCoupon:async()=>{e({couponLoading:!0,couponError:!1,couponSucceed:!1},!1,"remove-coupon/start");let{siteData:r,postToCartClientAPI:n,postToCartClientLegacyAPI:i}=t();try{(0,l.S)(r)?await n("removeCoupon",{}):await i("/coupon/remove",{}),e({couponLoading:!1,couponCode:"",couponRejection:null},!1,"remove-coupon/success")}catch(t){e({couponLoading:!1,couponError:!0},!1,"remove-coupon/failed")}},setCouponFromQuery:t=>{e({couponFromQuery:t},!1,"set-coupon-from-query")},checkCouponValidity:t=>{t&&"Success"===t.status?e({couponSucceed:!0,couponError:!1},!1,"check-coupon-validity/success"):t&&"Success"!==t.status&&e({couponSucceed:!1,couponError:!0},!1,"check-coupon-validity/failed")},openCouponAccordion:()=>{let e=document.querySelector("#Coupon .hidden-external-open-handler");null==e||e.click()},scrollToCouponInput:()=>{let e=document.querySelector('#Coupon input[name="coupon"]');null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}}))(...t),...((e,t)=>({replaceCandidate:null,replaceProductLoading:!1,replaceProductError:!1,replaceProduct:async(r,n,i,o)=>{e({replaceProductLoading:!0,replaceProductError:!1});let a=t().siteData;try{let t=await (0,g.gy)(a,r);if(t.error)throw Error("SPS panel fetch failed");let s=(0,m.c)(t,a),l=(0,v.zq)({CatalogProduct:s}),c=i.flatMap(e=>{let t=s.categories.find(t=>t.id===e.category_id);return t?[{category_id:t.id,category_uid:t.uid,value:e.value}]:[]}),u=(0,b.y)(s.categories,o),d=u!==s.categories?{...s,categories:u}:s;_.u.getState().replaceCurrentInstanceData(n,d,c),e({replaceProductLoading:!1,replaceCandidate:l})}catch(t){e({replaceProductLoading:!1,replaceProductError:!0})}}}))(...t),...((e,t)=>({carouselItemsLoading:!1,carouselItemsError:!1,getCatalogProduct:async e=>{let r=t().siteData;try{let t=await (0,g.gy)(r,e);if(t.error)return{catalogProduct:null,cartItem:null};let n=(0,m.c)(t,r),i=(0,v.zq)({CatalogProduct:n});return{catalogProduct:n,cartItem:i}}catch(e){return{catalogProduct:null,cartItem:null}}}}))(...t),...((e,t)=>({isBinaryPopupToggleEnabled:!1,isBinaryPopupOpened:!1,isBinaryPopupLoading:!1,binaryPopupWasOpened:!1,binaryPopupCatalogProduct:null,binaryPopupUserSelections:null,binaryPopupDyIds:void 0,openBinaryPopup:()=>e({isBinaryPopupOpened:!0,binaryPopupWasOpened:!0}),closeBinaryPopup:()=>e({isBinaryPopupOpened:!1}),getProductsDataForBinaryPopup:async t=>{let{binaryPopupFallbackSkus:r,binaryPopupToggle:n,siteData:o}=t;if(e({binaryPopupCatalogProduct:null}),e({binaryPopupUserSelections:null}),e({isBinaryPopupToggleEnabled:n}),n){e({isBinaryPopupLoading:!0});try{let t,n=await (0,g.gy)(o,r);if(n.error)throw Error("SPS panel fetch failed");t=(0,m.c)(n,o);let a=(0,i.j)(t);if(!t)throw Error("No Catalog Product was downloaded");e({binaryPopupCatalogProduct:t,binaryPopupUserSelections:a}),e({isBinaryPopupLoading:!1});return}catch(e){return console.error('Error while fetching fallback product for "binary-popup":',e),Promise.reject()}finally{e({isBinaryPopupLoading:!1})}}},shouldShowBinaryPopup:e=>{let{binaryPopupCatalogProduct:r,binaryPopupWasOpened:n,isBinaryPopupToggleEnabled:i}=t();if(!r||n||!i)return!1;let o=JSON.stringify(e.map(e=>e.itemEditor.userSelections));return o!==JSON.parse(localStorage.getItem(w)||"{}")&&(localStorage.setItem(w,JSON.stringify(o)),!0)}}))(...t),...((e,t)=>({cartValidationLoading:!1,cartIsValid:!1,errorMessages:[],checkCartValidation:async()=>{let r=t().siteData;if((0,l.S)(r))return e({cartValidationLoading:!0}),await t().fetchCartData(r),e({cartValidationLoading:!1}),t().cartIsValid;let n=await (0,C.F6)(r);e({cartValidationLoading:!0,cartIsValid:!1});try{let t=await (0,k.fG)({siteData:r,pathname:"api/v1/cart/validate",query:{userId:n}}),i=Array.isArray(t.ErrorMessages)&&t.ErrorMessages.every(e=>"string"==typeof e)?[]:t.ErrorMessages,o=0===i.length||t.IsValid,a=i.length>0&&i.some(e=>(null==e?void 0:e.ErrorType)==="FreeGift");return e({cartIsValid:o,errorMessages:i,cartValidationLoading:!1,hasMultipleFreeGifts:a}),o}catch(t){return e({cartIsValid:!0,errorMessages:[],cartValidationLoading:!1,hasMultipleFreeGifts:!1}),console.error("fetch cart validation failed: ",t),!0}}}))(...t),...((e,t)=>
8({name:"free-gift-storage",freeGift:null,isRemovedFreeGift:!1,isPersonalizedFreeGiftModalOpen:!1,setFreeGift:t=>e(()=>({freeGift:t,isRemovedFreeGift:!1,isPersonalizedFreeGiftModalOpen:!1})),removeFreeGift:()=>{t().closeSuccessBanner(),e(()=>({isRemovedFreeGift:!0,isPersonalizedFreeGiftModalOpen:!1}))},clearFreeGift:()=>{t().closeSuccessBanner(),e(()=>({freeGift:null,isRemovedFreeGift:!1,isPersonalizedFreeGiftModalOpen:!1}))},restoreFreeGift:()=>e(()=>({isRemovedFreeGift:!1})),setPersonalizedFreeGiftModal:t=>e(()=>({isPersonalizedFreeGiftModalOpen:t})),closePersonalizedFreeGiftModal:()=>e(()=>({isPersonalizedFreeGiftModalOpen:!1,isRemovedFreeGift:!0}))}))(...t),...((e,t)=>({cartPanelVisible:!1,cartPanelViewStack:x,cartPanelLastNav:null,cartPanelEditorDirty:!1,cartPanelDiscardVisible:!1,cartPanelExitReported:!1,cartPanelOnSuccess:null,openCartPanel:()=>e({cartPanelVisible:!0,cartPanelViewStack:x,cartPanelLastNav:null,cartPanelDiscardVisible:!1},!1,"openCartPanel"),closeCartPanel:()=>{e({cartPanelVisible:!1,replaceCandidate:null,cartPanelEditorDirty:!1,cartPanelOnSuccess:null,currentItem:null},!1,"closeCartPanel")},showCartPanel:()=>e({cartPanelVisible:!0,cartPanelViewStack:x,cartPanelLastNav:null,cartPanelDiscardVisible:!1},!1,"showCartPanel"),pushCartPanelView:r=>
8e({cartPanelViewStack:[...t().cartPanelViewStack,r],cartPanelLastNav:"push"},!1,"pushCartPanelView"),popCartPanelView:()=>{let r=t().cartPanelViewStack;if(r.length<=1){I(),t().closeCartPanel();return}e({cartPanelViewStack:r.slice(0,-1),cartPanelLastNav:"pop",replaceCandidate:null,cartPanelEditorDirty:!1,cartPanelDiscardVisible:!1},!1,"popCartPanelView"),I()},completeCartPanelView:()=>{let r=t().cartPanelViewStack,n=r.length<=1;e({cartPanelViewStack:n?x:r.slice(0,-1),cartPanelLastNav:"push",replaceCandidate:null,cartPanelEditorDirty:!1,cartPanelDiscardVisible:!1},!1,"completeCartPanelView"),n?E=null:I()},requestPopCartPanelView:()=>{t().cartPanelEditorDirty?e({cartPanelDiscardVisible:!0},!1,"requestPopCartPanelView"):t().popCartPanelView()},setCartPanelEditorDirty:t=>e({cartPanelEditorDirty:t},!1,"setCartPanelEditorDirty"),setCartPanelDiscardVisible:t=>e({cartPanelDiscardVisible:t},!1,"setCartPanelDiscardVisible"),setCartPanelExitReported:t=>e({cartPanelExitReported:t},!1,"setCartPanelExitReported"),openCartPanelEditView:function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"edit";A();let i="".concat(r.key,"-cart-").concat(n),o={type:"view"===n?"legacy-view":"legacy-edit",item:r,instanceKey:i};
8e({cartPanelVisible:!0,cartPanelViewStack:t().cartPanelVisible?[...t().cartPanelViewStack,o]:[o],cartPanelLastNav:"push",cartPanelEditorDirty:!1,cartPanelDiscardVisible:!1,editSucceed:!1,addToCartSucceed:!1},!1,"openCartPanelEditView")},openCartPanelAddView:(r,n,i)=>{A();let o="".concat(r.sku,"-cart-add"),a={type:"legacy-add",item:r,instanceKey:o,showViewFullDetails:null==i?void 0:i.showViewFullDetails,rating:null==i?void 0:i.rating,analytics:null==i?void 0:i.analytics};e({cartPanelVisible:!0,cartPanelViewStack:t().cartPanelVisible?[...t().cartPanelViewStack,a]:[a],cartPanelLastNav:"push",cartPanelEditorDirty:!1,cartPanelDiscardVisible:!1,editSucceed:!1,addToCartSucceed:!1,cartPanelExitReported:!1,currentItem:r,cartPanelOnSuccess:null!=n?n:null},!1,"openCartPanelAddView")},pushCartPanelEditView:r=>{A(),e({cartPanelVisible:!0,cartPanelViewStack:t().cartPanelVisible?[...t().cartPanelViewStack,r]:[r],cartPanelLastNav:"push",cartPanelEditorDirty:!1,cartPanelDiscardVisible:!1,editSucceed:!1,addToCartSucceed:!1},!1,"pushCartPanelEditView")}}))(...t),...((e,t)=>({name:"last-minute-offer-popup-storage",isLastMinuteOfferOpen:!1,openLastMinuteOfferPopup:()=>e(()=>({isLastMinuteOfferOpen:!0})),closeLastMinuteOfferModal:()=>e(()=>({isLastMinuteOfferOpen:!1})),shouldDisplayLastMinuteOffer:!1,setShouldDisplayLastMinuteOffer:()=>{let{cardItemTree:r,lastMinuteProduct:n}=t(),i=null==n?void 0:n.sku,o=e=>e.some(e=>e.product.sku===i||o(e.children));e({shouldDisplayLastMinuteOffer:null!==n&&!o(r)},!1,"lastMinuteOffer/updateStatus")},discardLastMinuteOffer:()=>{e({shouldDisplayLastMinuteOffer:!1})},allowOnlyUpsellBinaryPopup:!1,setAllowOnlyUpsellBinaryPopup:t=>e(()=>({allowOnlyUpsellBinaryPopup:t})),lastMinuteProduct:null,setLastMinuteProduct:t=>e(()=>({lastMinuteProduct:t}))}))(...t),...(e=>({isSuccessBannerOpen:!1,successBannerSource:null,justAddedSku:null,openSuccessBanner:(t,r)=>e(()=>({isSuccessBannerOpen:!0,successBannerSource:t,justAddedSku:null!=r?r:null})),closeSuccessBanner:()=>e(()=>({isSuccessBannerOpen:!1}))}))(...t)}},{name:"Cart Store"})),{name:"cart-storage",partialize:e=>({couponFromQuery:e.couponFromQuery,freeGift:e.freeGift})}));T.A.subscribe((e,t)=>{if(e.isLoggedIn===t.isLoggedIn)return;let{siteData:r,initialized:n,fetchCartData:i,mergeGuestCart:o}=P.getState();n&&r&&(0,l.S)(r)&&(0,u.P)(()=>e.isLoggedIn?o(r):i(r))});let O=P},77053:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});let n=(0,r(8106).v)()((e,t)=>({xpmVariantIds:[],registerVariantId:t=>e(e=>{let r=t.toString();return e.xpmVariantIds.includes(r)?e:{xpmVariantIds:[...e.xpmVariantIds,r]}}),clearVariantIds:()=>e(()=>({xpmVariantIds:[]}))}))},77328:(e,t,r)=>{e.exports=r(29269)},77874:(e,t,r)=>{"use strict";r.d(t,{L:()=>s});var n=r(14232),i=r(8106),o=r(4319);let a=0,s=(0,i.v)()((0,o.lt)((e,t)=>({isReady:!1,initData:null,customerData:null,cartLoyaltyRef:(0,n.createRef)(),onInit:r=>{if(Array.isArray(window.loyaltylion)){window.loyaltylion.init(r),e({initData:r});let{customerData:o}=t();if(null!=o)t().onLogin(o);else{var n,i;null==(i=window.loyaltylion)||null==(n=i.ui)||n.refresh()}}},onLogin:r=>{var n;e({customerData:r}),(null==(n=window.loyaltylion)?void 0:n.ui)!=null&&(window.loyaltylion.authenticateCustomer(r),e({isReady:!0}),t().refresh())},onLogout:async()=>{e({customerData:null,isReady:!1}),t().refresh()},refresh:()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{var e,t;null==(t=window.loyaltylion)||null==(e=t.ui)||e.refresh()})},toggleFakeLoyalty:e=>{t().isReady?t().onLogout():t().onLogin(43===e?{auth:{date:"2024-04-17T14:47:47.150Z",token:"b923e5e7cbd57a3b9b9a45eadfc7283fdc73e4ec"},customer:{id:"79b14026-a421-4338-a359-78a3a0f14ffc",email:"[email protected]"}}:{auth:{date:"2024-04-09T15:52:30.123Z",token:"441c687c9960130c317fe5992abad1ee522aff18"},customer:{id:"eda3fb62-fcb1-436d-85ae-cc4e1b469b78",email:"[email protected]"}})}})))},79307:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s,nm:()=>a});var n=r(37876),i=r(14232);let o=(0,i.createContext)(null);function a(){let e=(0,i.useContext)(o);if(null===e)throw Error("useApp must be used within an AppProvider");return e}let s=function(e){let{value:t,children:r}=e;return(0,n.jsx)(o.Provider,{value:t,children:!!t&&r})}},79612:(e,t,r)=>{"use strict";let n;r.d(t,{AY:()=>a,L2:()=>s,c$:()=>l,l2:()=>o});var i=r(35428);function o(e){return l(e,location.href).href}function a(e){try{return!!l(e)}catch(e){return!1}}function s(e){let t=l(e).pathname;return"/"===t[0]?t:`/${t}`}function l(e,t){let{URL:r}=function(){var e;if(!n){let t,r;try{(t=document.createElement("iframe")).style.display="none",document.body.appendChild(t),r=null!=(e=t.contentWindow)?e:i.J2}catch(e){r=i.J2}n={URL:r.URL}
8,null==t||t.remove()}return n}();try{return void 0!==t?new r(e,t):new r(e)}catch(e){throw Error(`Failed to construct URL: ${String(e)}`)}}},79766:(e,t,r)=>{"use strict";r.d(t,{Go:()=>o,kg:()=>a});var n=r(64111);function i(e,t,r=function(){if("undefined"!=typeof WeakSet){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let r=e.has(t);return r||e.add(t),r}}}let e=[];return{hasAlreadyBeenSeen(t){let r=e.indexOf(t)>=0;return r||e.push(t),r}}}()){if(void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let e=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,e)}if(r.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let n=Array.isArray(e)?e:[];for(let e=0;e<t.length;++e)n[e]=i(n[e],t[e],r);return n}let o="object"===(0,n.P)(e)?e:{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(o[e]=i(o[e],t[e],r));return o}function o(e){return i(void 0,e)}function a(...e){let t;for(let r of e)null!=r&&(t=i(t,r));return t}},79770:(e,t,r)=>{"use strict";r.d(t,{Kp:()=>c,_T:()=>l,y5:()=>s});var n=r(61885),i=r(17282),o=r(35428),a=r(42236);let s={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function l(e){return new n.cP(t=>{if(o.Wq)return;let{stop:r}=(0,a.l)(e,window,["visibilitychange","freeze"],e=>{"visibilitychange"===e.type&&"hidden"===document.visibilityState?t.notify({reason:s.HIDDEN}):"freeze"===e.type&&t.notify({reason:s.FROZEN})},{capture:!0}),n=(0,a.q)(e,window,"beforeunload",()=>{t.notify({reason:s.UNLOADING})}).stop;return()=>{r(),n()}})}function c(e){return(0,i.KQ)(s).includes(e)}},80959:(e,t,r)=>{"use strict";r.d(t,{H:()=>o,N:()=>a});var n=r(93487),i=r(42236);function o(e,t,r){return document.readyState===t||"complete"===document.readyState?(r(),{stop:n.l}):(0,i.q)(e,window,"complete"===t?"load":"DOMContentLoaded",r,{once:!0})}function a(e,t){return new Promise(r=>{o(e,t,r)})}},81056:(e,t,r)=>{},81545:(e,t,r)=>{"use strict";r.d(t,{AQ:()=>i,HB:()=>o,Q_:()=>l,_P:()=>a,gB:()=>s});var n=r(32068);let i=4*n.MA,o=15*n.iW,a=n.$H,s="0",l={COOKIE:"cookie",MEMORY:"memory",LOCAL_STORAGE:"local-storage"}},81582:(e,t,r)=>{"use strict";r.d(t,{y:()=>o});var n=r(66689),i=r(93619);let o=e=>{let{selling:t,discountType:r,discountAmount:o}=(0,i.db)(e);return(0,n.x)(t,r,o)}},83150:(e,t,r)=>{"use strict";r.d(t,{y:()=>i});let n=e=>Array.isArray(e)&&e.length>0,i=(e,t)=>{if(!e||!(null==t?void 0:t.categoryRules))return e;let r=!1,i=((e,t)=>{let r={};for(let[n,i]of Object.entries(t)){if(!i.adjustPriceInCategoryId||!i.setDefaultOptionId)continue;let t=e.find(e=>String(e.id)===n);if(!(null==t?void 0:t.options))continue;let o=t.options.find(e=>e.id===i.setDefaultOptionId);(null==o?void 0:o.price_adjustment)&&(r[i.adjustPriceInCategoryId]=o.price_adjustment)}return r})(e,t.categoryRules),o=e.reduce((e,o)=>{var a,s;let l=null==(a=t.categoryRules)?void 0:a[String(o.id)];if(null==l?void 0:l.hide)return r=!0,e;let c=null!=(s=i[String(o.id)])?s:0,{category:u,changed:d}=((e,t,r)=>{var i;if(!t&&!r)return{category:e,changed:!1};let{options:o,changed:a}=((e,t)=>{if(!t||!n(e))return{options:e,changed:!1};let r=e.find(e=>e.id===t);return!r||r.is_default?{options:e,changed:!1}:{options:e.map(e=>({...e,is_default:e.id===t})),changed:!0}})(null!=(i=e.options)?i:[],null==t?void 0:t.setDefaultOptionId),{options:s,changed:l}=((e,t,r,i)=>{if(!t&&!r&&!i||!n(e))return{options:e,changed:!1};let o=!1,a=e.map(e=>{var n,a,s;if(!(null==(n=e.related_product)?void 0:n.pricing))return e;let l=t&&e.is_default?t:null!=(s=null!=(a=null==r?void 0:r[String(e.id)])?a:null==i?void 0:i[e.related_product.sku])?s:0;return l?(o=!0,{...e,related_product:{...e.related_product,pricing:{...e.related_product.pricing,price:e.related_product.pricing.price+l}}}):e});return{options:o?a:e,changed:o}})(o,r,r||null==t?void 0:t.adjustPriceForOptionId,r||null==t?void 0:t.adjustPriceForRelatedSku),{options:c,changed:u}=((e,t)=>{var r;if(!n(t))return{options:e,changed:!1};let i=new Set(t),o=null==(r=e.find(e=>e.is_default))?void 0:r.id,a=e.filter(e=>!!o&&e.id===o||!i.has(e.id)),s=a.length!==e.length;return{options:s?a:e,changed:s}})(s,null==t?void 0:t.hideOptionIds),{options:d,changed:p}=((e,t)=>{if(!n(t)||!n(e))return{options:e,changed:!1};let r=new Set(t),i=[...t.map(t=>e.find(e=>
8e.id===t)).filter(Boolean),...e.filter(e=>!r.has(e.id))],o=i.length!==e.length||i.some((t,r)=>{var n;return t.id!==(null==(n=e[r])?void 0:n.id)});return{options:o?i:e,changed:o}})(c,null==t?void 0:t.reorderOptionIds),{displayType:h,changed:f}=((e,t)=>{let r=null==t?void 0:t.displayType;return r&&r!==e.display_type?{displayType:r,changed:!0}:{displayType:e.display_type,changed:!1}})(e,t),{options:g,changed:m}=((e,t)=>{if(!t||!n(e))return{options:e,changed:!1};let r=!1,i=e.map(e=>{let n=t[String(e.id)];return"string"==typeof n&&n?(r=!0,{...e,image:{url:n}}):e});return{options:r?i:e,changed:r}})(d,(null==t?void 0:t.displayType)?null==t?void 0:t.setImageForOptionId:void 0);return a||l||u||p||f||m?{category:{...e,options:g,display_type:h},changed:!0}:{category:e,changed:!1}})(o,l,c);return d&&(r=!0),e.push(u),e},[]);return r?o:e}},83300:(e,t,r)=>{"use strict";r.d(t,{H:()=>s,t:()=>l});var n=r(74349),i=r(90198),o=r(93487),a=r(1285);function s(e,t,r,{computeHandlingStack:n}={}){let l=e[t];if("function"!=typeof l)if(!(t in e&&"string"==typeof t&&t.startsWith("on")))return{stop:o.l};else l=o.l;let c=!1,u=function(){let e;if(c)return l.apply(this,arguments);let t=Array.from(arguments);(0,i.um)(r,null,[{target:this,parameters:t,onPostCall:t=>{e=t},handlingStack:n?(0,a.uC)("instrumented method"):void 0}]);let o=l.apply(this,t);return e&&(0,i.um)(e,null,[o]),o};return e[t]=u,{stop:()=>{c=!0,e[t]===u&&(e[t]=l)}}}function l(e,t,r){let i=Object.getOwnPropertyDescriptor(e,t);if(!i||!i.set||!i.configurable)return{stop:o.l};let a=o.l,s=(e,t)=>{(0,n.wg)(()=>{s!==a&&r(e,t)},0)},l=function(e){i.set.call(this,e),s(this,e)};return Object.defineProperty(e,t,{set:l}),{stop:()=>{var r;(null==(r=Object.getOwnPropertyDescriptor(e,t))?void 0:r.set)===l&&Object.defineProperty(e,t,i),s=a}}}},86241:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(19040),i=r(14232),o=r(38248),a=r(60569);let s=()=>{let{data:e}=(0,n.A)(e=>e.measurementId),t=(0,i.useCallback)(a.A,[]),r=e=>{var t;let r=document.cookie.match(e),n=null==r?void 0:r[1].split(".");return n&&null!=(t=n.shift())?t:""};return{pushToDataLayer:t,getGAclientId:()=>{let e=(0,o.getCookie)("_ga"),t=(0,o.getCookie)("cloned_ga");return(null==e?void 0:e.substring(6))||(null==t?void 0:t.substring(6))||""},getGAsessionId:()=>{if(!e)return"";let t=new RegExp("_ga_".concat(e,"=GS\\d\\.\\d\\.(.+?)(?:;|$)")),n=new RegExp("cloned_ga_".concat(e,"=GS\\d\\.\\d\\.(.+?)(?:;|$)")),i=r(t),o=r(n);return i||o||""},clearDataLayer:()=>{t({event:"clear_datalayer"})}}}},86417:(e,t,r)=>{"use strict";r.d(t,{Aq:()=>a,R9:()=>n,q7:()=>l,sr:()=>s});var n,i=r(43626);!function(e){e.TRACK_INTAKE_REQUESTS="track_intake_requests",e.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",e.FEATURE_OPERATION_VITAL="feature_operation_vital",e.START_STOP_ACTION="start_stop_action",e.START_STOP_RESOURCE="start_stop_resource",e.USE_CHANGE_RECORDS="use_change_records",e.USE_INCREMENTAL_CHANGE_RECORDS="use_incremental_change_records",e.TOO_MANY_REQUESTS_INVESTIGATION="too_many_requests_investigation",e.TRACK_RESOURCE_HEADERS="track_resource_headers"}(n||(n={}));let o=new Set;function a(e){Array.isArray(e)&&e.filter(e=>(0,i.Rj)(n,e)).forEach(e=>{o.add(e)})}function s(e){return o.has(e)}function l(){return o}},86468:(e,t,r)=>{"use strict";r.d(t,{X:()=>i});var n=r(99423);let i=(e,t)=>(0,n.go)(e,t)?"/".concat(t):"/"},86581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=r(64252)._(r(14232)).default.createContext(null)},87151:(e,t,r)=>{"use strict";r.d(t,{W:()=>i});var n=r(35428);function i(e,t){let r,i=(0,n.VZ)();return i.Zone&&"function"==typeof i.Zone.__symbol__&&(r=e[i.Zone.__symbol__(t)]),r||(r=e[t]),r}},87718:(e,t,r)=>{"use strict";r.d(t,{a:()=>p,b:()=>l,d:()=>t2,l:()=>t0,m:()=>ee,n:()=>h,p:()=>Q,s:()=>u});var n=r(14232),i=r(65364);let o={},a=new Map,s=e=>{let t=a.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([e,t])=>[e,t.getState()])):{}},l=(e,t={})=>(r,n,i)=>{let l,{enabled:u,anonymousActionType:d,store:p,...h}=t;try{l=(u??(o?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return e(r,n,i);let{connection:f,...g}=((e,t,r)=>{if(void 0===e)return{type:"untracked",connection:t.connect(r)};let n=a.get(r.name);if(n)return{type:"tracked",store:e,...n};let i={connection:t.connect(r),stores:{}};return a.set(r.name,i),{type:"tracked",store:e,...i}})(p,l,h),m=!0;i.setState=(e,t,o)=>{let a=r(e,t);if(!m)return a;let l=void 0===o?{type:d||(e=>{var t,r;if(!e)return;let n=e.split(` 9`),i=n.findIndex(e=>e.includes("api.setState"));if(i<0)return;let o=(null==(t=n[i+1])?void 0:t.trim())||"";return null==(r=/.+ (.+) .+/.exec(o))?void 0:r[1]})(Error().stack)||"anonymous"}:"string"==typeof o?{type:o}:o;return void 0===p?null==f||f.send(l,n()):null==f||f.send({...l,type:`${p}/${l.type}`},{...s(h.name),[p]:i.getState()}),a},i.devtools={cleanup:()=>{f&&"function"==typeof f.unsubscribe&&f.unsubscribe(),((e,t)=>{if(void 0===t)return;let r=a.get(e);r&&(delete r.stores[t],0===Object.keys(r.stores).length&&a.delete(e))})(h.name,p)}};let y=(...e)=>{let t=m;m=!1,r(...e),m=t},v=e(i.setState,n,i);if("untracked"===g.type?null==f||f.init(v):(g.stores[g.store]=i,null==f||f.init(Object.fromEntries(Object.entries(g.stores).map(([e,t])=>[e,e===g.store?v:t.getState()])))),i.dispatchFromDevtools&&"function"==typeof i.dispatch){let e=!1,t=i.dispatch;i.dispatch=(...r)=>{(o?"production":void 0)==="production"||"__setState"!==r[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...r)}}return f.subscribe(e=>{var t;switch(e.type){case"ACTION":if("string"!=typeof e.payload)return void console.error("[zustand devtools middleware] Unsupported action format");return c(e.payload,e=>{if("__setState"===e.type){if(void 0===p)return void y(e.state);1!==Object.keys(e.state).length&&console.error(` 10 [zustand devtools middleware] Unsupported __setState action format. 11 When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), 12 and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } 13 `);let t=e.state[p];return void(null==t||JSON.stringify(i.getState())!==JSON.stringify(t)&&y(t))}i.dispatchFromDevtools&&"function"==typeof i.dispatch&&i.dispatch(e)});case"DISPATCH":switch(e.payload.type){case"RESET":return y(v),void 0===p?null==f?void 0:f.init(i.getState()):null==f?void 0:f.init(s(h.name));
13case"COMMIT":if(void 0===p){null==f||f.init(i.getState());break}return null==f?void 0:f.init(s(h.name));case"ROLLBACK":return c(e.state,e=>{if(void 0===p){y(e),null==f||f.init(i.getState());return}y(e[p]),null==f||f.init(s(h.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return c(e.state,e=>{if(void 0===p)return void y(e);JSON.stringify(i.getState())!==JSON.stringify(e[p])&&y(e[p])});case"IMPORT_STATE":{let{nextLiftedState:r}=e.payload,n=null==(t=r.computedStates.slice(-1)[0])?void 0:t.state;if(!n)return;y(void 0===p?n:n[p]),null==f||f.send(null,r);break}case"PAUSE_RECORDING":return m=!m}return}}),v},c=(e,t)=>{let r;try{r=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==r&&t(r)},u=e=>(t,r,n)=>{let i=n.subscribe;return n.subscribe=(e,t,r)=>{let o=e;if(t){let i=(null==r?void 0:r.equalityFn)||Object.is,a=e(n.getState());o=r=>{let n=e(r);if(!i(a,n)){let e=a;t(a=n,e)}},null!=r&&r.fireImmediately&&t(a,a)}return i(o)},e(t,r,n)},d=e=>t=>{try{let r=e(t);return r instanceof Promise?r:{then:e=>d(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>d(t)(e)}}},p=(e,t)=>(r,n,i)=>{let o,a={storage:function(e,t){let r;try{r=e()}catch{return}return{getItem:e=>{var t;let n=e=>null===e?null:JSON.parse(e,void 0),i=null!=(t=r.getItem(e))?t:null;return i instanceof Promise?i.then(n):n(i)},setItem:(e,t)=>r.setItem(e,JSON.stringify(t,void 0)),removeItem:e=>r.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,c=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,i);let p=()=>{let e=a.partialize({...n()});return u.setItem(a.name,{state:e,version:a.version})},h=i.setState;i.setState=(e,t)=>(h(e,t),p());let f=e((...e)=>(r(...e),p()),n,i);i.getInitialState=()=>f;let g=()=>{var e,t;if(!u)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:f)});let i=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=n())?e:f))||void 0;return d(u.getItem.bind(u))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[i,s]=e;if(r(o=a.merge(s,null!=(t=n())?t:f),!0),i)return p()}).then(()=>{null==i||i(o,void 0),o=n(),s=!0,c.forEach(e=>e(o))}).catch(e=>{null==i||i(void 0,e)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||g(),o||f},h=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t};var f=Symbol.for("immer-nothing"),g=Symbol.for("immer-draftable"),m=Symbol.for("immer-state");function y(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var v=Object.getPrototypeOf;function _(e){return!!e&&!!e[m]}function b(e){var t;return!!e&&(S(e)||Array.isArray(e)||!!e[g]||!!(null!=(t=e.constructor)&&t[g])||I(e)||x(e))}var w=Object.prototype.constructor.toString();function S(e){if(!e||"object"!=typeof e)return!1;let t=v(e);if(null===t)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===w}function k(e,t){0===C(e)?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function C(e){let t=e[m];return t?t.type_:Array.isArray(e)?1:I(e)?2:3*!!x(e)}function E(e,t){return 2===C(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A(e,t,r){let n=C(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function I(e){return e instanceof Map}function x(e){return e instanceof Set}function T(e){return e.copy_||e.base_}function P(e,t){if(I(e))return new Map(e);if(x(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=S(e);if(!0!==t&&("class_only"!==t||r)){let t=v(e);return null!==t&&r?{...e}:Object.assign(Object.create(t),e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[m];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(v(e),t)}}function O(e,t=!1){return N(e)||_(e)||!b(e)||(C(e)>1&&(e.set=e.add=e.clear=e.delete=R),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>O(t,!0))),e}function R(){y(2)}function N(e){return Object.isFrozen(e)}var D={};function L(e){let t=D[e];return t||y(0,e),t}function U(e,t){t&&(L("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function M(e){j(e),e.drafts_.forEach(V),e.drafts_=null}function j(e){e===e2&&(e2=e.parent_)}function $(e){return e2={drafts_:[],parent_:e2,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function V(e){let t=e[m];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function F(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return void 0!==e&&e!==r?(r[m].modified_&&(M(t),y(4)),b(e)&&(e=B(t,e),t.parent_||G(t,e)),t.patches_&&L("Patches").generateReplacementPatches_(r[m].base_,e,t.patches_,t.inversePatches_)):e=B(t,r,[]),M(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==f?e:void 0}function B(e,t,r){if(N(t))return t;let n=t[m];if(!n)return k(t,(i,o)=>z(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let t=n.copy_,i=t,o=!1;3===n.type_&&(i=new Set(t),t.clear(),o=!0),k(i,(i,a)=>z(e,n,t,i,a,r,o)),G(e,t,!1),r&&e.patches_&&L("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function z(e,t,r,n,i,o,a){if(_(i)){let a=B(e,i,o&&t&&3!==t.type_&&!E(t.assigned_,n)?o.concat(n):void 0);if(A(r,n,a),!_(a))return;e.canAutoFreeze_=!1}else a&&r.add(i);if(b(i)&&!N(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;B(e,i),(!t||!t.scope_.parent_)&&"symbol"!=typeof n&&Object.prototype.propertyIsEnumerable.call(r,n)&&G(e,i)}}function G(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&O(t,r)}var q={get(e,t){if(t===m)return e;let r=T(e);if(!E(r,t)){var n,i=e,o=r,a=t;let s=J(o,a);return s?"value"in s?s.value:null==(n=s.get)?void 0:n.call(i.draft_):void 0}let s=r[t];return e.finalized_||!b(s)?s:s===K(e.base_,t)?(Z(e),e.copy_[t]=Y(s,e)):s},has:(e,t)=>t in T(e),ownKeys:e=>Reflect.ownKeys(T(e)),set(e,t,r){let n=J(T(e),t);if(null!=n&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=K(T(e),t),i=null==n?void 0:n[m];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||E(e.base_,t)))return!0;Z(e),W(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==K(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Z(e),W(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=T(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}},defineProperty(){y(11)},getPrototypeOf:e=>v(e.base_),setPrototypeOf(){y(12)}},H={};function K(e,t){let r=e[m];return(r?T(r):e)[t]}function J(e,t){if(!(t in e))return;let r=v(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=v(r)}}function W(e){e.modified_||(e.modified_=!0,e.parent_&&W(e.parent_))}function Z(e){e.copy_||(e.copy_=P(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Y(e,t){let r=I(e)?L("MapSet").proxyMap_(e,t):x(e)?L("MapSet").proxySet_(e,t):function(e,t){let r=Array.isArray(e),n={type_:+!!r,scope_:t?t.scope_:e2,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,o=q;r&&(i=[n],o=H);let{revoke:a,proxy:s}=Proxy.revocable(i,o);return n.draft_=s,n.revoke_=a,s}(e,t);return(t?t.scope_:e2).drafts_.push(r),r}k(q,(e,t)=>{H[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),H.deleteProperty=function(e,t){return H.set.call(this,e,t,void 0)},H.set=function(e,t,r){return q.set.call(this,e[0],t,r,e[0])};var X=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{let n;if("function"==typeof e&&"function"!=typeof t){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if("function"!=typeof t&&y(6),void 0!==r&&"function"!=typeof r&&y(7),b(e)){let i=$(this),o=Y(e,void 0),a=!0;try{n=t(o),a=!1}finally{a?M(i):j(i)}return U(i,r),F(n,i)}if(e&&"object"==typeof e)y(1,e);else{if(void 0===(n=t(e))&&(n=e),n===f&&(n=void 0),this.autoFreeze_&&O(n,!0),r){let t=[],i=[];L("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return"function"==typeof e?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;b(e)||y(8),_(e)&&(_(t=e)||y(10,t),e=function e(t){let r;if(!b(t)||N(t))return t;let n=t[m];if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=P(t,n.scope_.immer_.useStrictShallowCopy_)}else r=P(t,!0);return k(r,(t,n)=>{A(r,t,e(n))}),n&&(n.finalized_=!1),r}(t));let r=$(this),n=Y(e,void 0);return n[m].isManual_=!0,j(r),n}finishDraft(e,t){let r=e&&e[m];r&&r.isManual_||y(9);let{scope_:n}=r;return U(n,t),F(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];
13if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=L("Patches").applyPatches_;return _(e)?n(e,t):this.produce(e,e=>n(e,t))}},Q=X.produce;function ee(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(e){e(r)}),(n=e.get("*"))&&n.slice().map(function(e){e(t,r)})}}}X.produceWithPatches.bind(X),X.setAutoFreeze.bind(X),X.setUseStrictShallowCopy.bind(X),X.applyPatches.bind(X),X.createDraft.bind(X),X.finishDraft.bind(X);var et=function(){return(et=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function er(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var en="-ms-",ei="-moz-",eo="-webkit-",ea="comm",es="rule",el="decl",ec="@keyframes",eu=Math.abs,ed=String.fromCharCode,ep=Object.assign;function eh(e,t){return(e=t.exec(e))?e[0]:e}function ef(e,t,r){return e.replace(t,r)}function eg(e,t,r){return e.indexOf(t,r)}function em(e,t){return 0|e.charCodeAt(t)}function ey(e,t,r){return e.slice(t,r)}function ev(e){return e.length}function e_(e,t){return t.push(e),e}function eb(e,t){return e.filter(function(e){return!eh(e,t)})}var ew=1,eS=1,ek=0,eC=0,eE=0,eA="";function eI(e,t,r,n,i,o,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:ew,column:eS,length:a,return:"",siblings:s}}function ex(e,t){return ep(eI("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function eT(e){for(;e.root;)e=ex(e.root,{children:[e]});e_(e,e.siblings)}function eP(){return eE=eC<ek?em(eA,eC++):0,eS++,10===eE&&(eS=1,ew++),eE}function eO(){return em(eA,eC)}function eR(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function eN(e){var t,r;return(t=eC-1,r=function e(t){for(;eP();)switch(eE){case t:return eC;case 34:case 39:34!==t&&39!==t&&e(eE);break;case 40:41===t&&e(t);break;case 92:eP()}return eC}(91===e?e+2:40===e?e+1:e),ey(eA,t,r)).trim()}function eD(e,t,r,n,i,o,a,s,l,c,u,d){for(var p=i-1,h=0===i?o:[""],f=h.length,g=0,m=0,y=0;g<n;++g)for(var v=0,_=ey(e,p+1,p=eu(m=a[g])),b=e;v<f;++v)(b=(m>0?h[v]+" "+_:ef(_,/&\f/g,h[v])).trim())&&(l[y++]=b);return eI(e,t,r,0===i?es:s,l,c,u,d)}function eL(e,t,r,n,i){return eI(e,t,r,el,ey(e,0,n),ey(e,n+1,-1),n,i)}function eU(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function eM(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case el:return e.return=e.return||e.value;case ea:return"";case ec:return e.return=e.value+"{"+eU(e.children,n)+"}";case es:if(!ev(e.value=e.props.join(",")))return""}return ev(r=eU(e.children,n))?e.return=e.value+"{"+r+"}":""}function ej(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case el:e.return=function e(t,r,n){var i;switch(i=r,45^em(t,0)?(((i<<2^em(t,0))<<2^em(t,1))<<2^em(t,2))<<2^em(t,3):0){case 5103:return eo+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return eo+t+t;case 4789:return ei+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return eo+t+ei+t+en+t+t;case 5936:switch(em(t,r+11)){case 114:return eo+t+en+ef(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
vendor: 9,217 bytes, lines 13-14
13case 108:return eo+t+en+ef(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return eo+t+en+ef(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return eo+t+en+t+t;case 6165:return eo+t+en+"flex-"+t+t;case 5187:return eo+t+ef(t,/(\w+).+(:[^]+)/,eo+"box-$1$2"+en+"flex-$1$2")+t;case 5443:return eo+t+en+"flex-item-"+ef(t,/flex-|-self/g,"")+(eh(t,/flex-|baseline/)?"":en+"grid-row-"+ef(t,/flex-|-self/g,""))+t;case 4675:return eo+t+en+"flex-line-pack"+ef(t,/align-content|flex-|-self/g,"")+t;case 5548:return eo+t+en+ef(t,"shrink","negative")+t;case 5292:return eo+t+en+ef(t,"basis","preferred-size")+t;case 6060:return eo+"box-"+ef(t,"-grow","")+eo+t+en+ef(t,"grow","positive")+t;case 4554:return eo+ef(t,/([^-])(transform)/g,"$1"+eo+"$2")+t;case 6187:return ef(ef(ef(t,/(zoom-|grab)/,eo+"$1"),/(image-set)/,eo+"$1"),t,"")+t;case 5495:case 3959:return ef(t,/(image-set\([^]*)/,eo+"$1$`$1");case 4968:return ef(ef(t,/(.+:)(flex-)?(.*)/,eo+"box-pack:$3"+en+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+eo+t+t;case 4200:if(!eh(t,/flex-|baseline/))return en+"grid-column-align"+ey(t,r)+t;break;case 2592:case 3360:return en+ef(t,"template-","")+t;case 4384:case 3616:return n&&n.some(function(e,t){return r=t,eh(e.props,/grid-\w+-end/)})?~eg(t+(n=n[r].value),"span",0)?t:en+ef(t,"-start","")+t+en+"grid-row-span:"+(~eg(n,"span",0)?eh(n,/\d+/):eh(n,/\d+/)-eh(t,/\d+/))+";":en+ef(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(e){return eh(e.props,/grid-\w+-start/)})?t:en+ef(ef(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return ef(t,/(.+)-inline(.+)/,eo+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ev(t)-1-r>6)switch(em(t,r+1)){case 109:if(45!==em(t,r+4))break;case 102:return ef(t,/(.+:)(.+)-([^]+)/,"$1"+eo+"$2-$3$1"+ei+(108==em(t,r+3)?"$3":"$2-$3"))+t;case 115:return~eg(t,"stretch",0)?e(ef(t,"stretch","fill-available"),r,n)+t:t}break;case 5152:case 5920:return ef(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,r,n,i,o,a,s){return en+r+":"+n+s+(i?en+r+"-span:"+(o?a:a-n)+s:"")+t});case 4949:if(121===em(t,r+6))return ef(t,":",":"+eo)+t;break;case 6444:switch(em(t,45===em(t,14)?18:11)){case 120:return ef(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+eo+(45===em(t,14)?"inline-":"")+"box$3$1"+eo+"$2$3$1"+en+"$2box$3")+t;case 100:return ef(t,":",":"+en)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return ef(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,r);return;case ec:return eU([ex(e,{value:ef(e.value,"@","@"+eo)})],n);case es:if(e.length){var i,o;return i=r=e.props,o=function(t){switch(eh(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":eT(ex(e,{props:[ef(t,/:(read-\w+)/,":"+ei+"$1")]})),eT(ex(e,{props:[t]})),ep(e,{props:eb(r,n)});break;case"::placeholder":eT(ex(e,{props:[ef(t,/:(plac\w+)/,":"+eo+"input-$1")]})),eT(ex(e,{props:[ef(t,/:(plac\w+)/,":"+ei+"$1")]})),eT(ex(e,{props:[ef(t,/:(plac\w+)/,en+"input-$1")]})),eT(ex(e,{props:[t]})),ep(e,{props:eb(r,n)})}return""},i.map(o).join("")}}}var e$={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},eV="u">typeof i&&void 0!==i.env&&(i.env.REACT_APP_SC_ATTR||i.env.SC_ATTR)||"data-styled",eF="active",eB="data-styled-version",ez="6.1.15",eG=`/*!sc*/ 14`,eq="u">typeof window&&"HTMLElement"in window,eH=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"u">typeof i&&void 0!==i.env&&void 0!==i.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==i.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==i.env.REACT_APP_SC_DISABLE_SPEEDY&&i.env.REACT_APP_SC_DISABLE_SPEEDY:"u">typeof i&&void 0!==i.env&&void 0!==i.env.SC_DISABLE_SPEEDY&&""!==i.env.SC_DISABLE_SPEEDY&&"false"!==i.env.SC_DISABLE_SPEEDY&&i.env.SC_DISABLE_SPEEDY),eK=Object.freeze([]),eJ=Object.freeze({}),eW=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),eZ=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,eY=/(^-|-$)/g;function eX(e){return e.replace(eZ,"-").replace(eY,"")}var eQ=/(a)(d)/gi,e0=function(e){return String.fromCharCode(e+(e>25?39:97))};function e1(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=e0(t%52)+r;return(e0(t%52)+r).replace(eQ,"$1-$2")}var e2,e3,e4=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},e5=function(e){return e4(5381,e)};function e6(e){return"string"==typeof e}var e8="function"==typeof Symbol&&Symbol.for,e9=e8?Symbol.for("react.memo"):60115,e7=e8?Symbol.for("react.forward_ref"):60112,te={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},tt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},tr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tn=((e3={})[e7]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},e3[e9]=tr,e3);function ti(e){return("type"in e&&e.type.$$typeof)===e9?tr:"$$typeof"in e?tn[e.$$typeof]:te}var to=Object.defineProperty,ta=Object.getOwnPropertyNames,ts=Object.getOwnPropertySymbols,tl=Object.getOwnPropertyDescriptor,tc=Object.getPrototypeOf,tu=Object.prototype;function td(e){return"function"==typeof e}function tp(e){return"object"==typeof e&&"styledComponentId"in e}function th(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function tf(e,t){if(0===e.length)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function tg(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function tm(e,t){Object.defineProperty(e,"toString",{value:t})}function ty(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var tv=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw ty(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),s=(o=0,t.length);o<s;o++)this.tag.insertRule(a,t[o])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var i=r;i<n;i++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o<i;o++)t+="".concat(this.tag.getRule(o)).concat(eG);return t},e}(),t_=new Map,tb=new Map,tw=1,tS=function(e){if(t_.has(e))return t_.get(e);for(;tb.has(tw);)tw++;var t=tw++;return t_.set(e,t),tb.set(t,e),t},tk=function(e,t){tw=t+1,t_.set(e,t),tb.set(t,e)},tC="style[".concat(eV,"][").concat(eB,'="').concat(ez,'"]'),tE=new RegExp("^".concat(eV,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),tA=function(e,t,r){for(var n,i=r.split(","),o=0,a=i.length;o<a;o++)(n=i[o])&&e.registerName(t,n)},tI=function(e,t){for(var r,n=(null!=(r=t.textContent)?r:"").split(eG),i=[],o=0,a=n.length;o<a;o++){var s=n[o].trim();if(s){var l=s.match(tE);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(tk(u,c),tA(e,u,l[3]),e.getTag().insertRules(c,i)),i.length=0}else i.push(s)}}},tx=function(e){for(var t=document.querySelectorAll(tC),r=0,n=t.length;r<n;r++){var i=t[r];
14i&&i.getAttribute(eV)!==eF&&(tI(e,i),i.parentNode&&i.parentNode.removeChild(i))}},tT=function(e){var t,n=document.head,i=e||n,o=document.createElement("style"),a=(t=Array.from(i.querySelectorAll("style[".concat(eV,"]"))))[t.length-1],s=void 0!==a?a.nextSibling:null;o.setAttribute(eV,eF),o.setAttribute(eB,ez);var l=r.nc;return l&&o.setAttribute("nonce",l),i.insertBefore(o,s),o},tP=function(){function e(e){this.element=tT(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var i=t[r];if(i.ownerNode===e)return i}throw ty(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),tO=function(){function e(e){this.element=tT(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),tR=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),tN=eq,tD={isServer:!eq,useCSSOMInjection:!eH},tL=function(){function e(e,t,r){void 0===e&&(e=eJ),void 0===t&&(t={});var n=this;this.options=et(et({},tD),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&eq&&tN&&(tN=!1,tx(this)),tm(this,function(){for(var e=n.getTag(),t=e.length,r="",i=0;i<t;i++)!function(t){var i=tb.get(t);if(void 0===i)return;var o=n.names.get(i),a=e.getGroup(t);if(void 0!==o&&o.size&&0!==a.length){var s="".concat(eV,".g").concat(t,'[id="').concat(i,'"]'),l="";void 0!==o&&o.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(eG)}}(i);return r})}return e.registerId=function(e){return tS(e)},e.prototype.rehydrate=function(){!this.server&&eq&&tx(this)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(et(et({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){var e,t,r;return this.tag||(this.tag=(t=(e=this.options).useCSSOMInjection,r=e.target,new tv(e.isServer?new tR(r):t?new tP(r):new tO(r))))},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(tS(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(tS(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(tS(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),tU=/&/g,tM=/^\s*\/\/.*$/gm,tj=new tL,t$=function(e){var t,r,n,i=eJ.options,o=void 0===i?eJ:i,a=eJ.plugins,s=void 0===a?eK:a,l=function(e,n,i){return i.startsWith(r)&&i.endsWith(r)&&i.replaceAll(r,"").length>0?".".concat(t):e},c=s.slice();c.push(function(e){e.type===es&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(tU,r).replace(n,l))}),o.prefix&&c.push(ej),c.push(eM);var u=function(e,i,a,s){void 0===i&&(i=""),void 0===a&&(a=""),void 0===s&&(s="&"),t=s,r=i,n=RegExp("\\".concat(r,"\\b"),"g");var l,u,d,p,h,f,g=e.replace(tM,""),m=(h=function e(t,r,n,i,o,a,s,l,c){for(var u,d,p,h,f=0,g=0,m=s,y=0,v=0,_=0,b=1,w=1,S=1,k=0,C="",E=o,A=a,I=i,x=C;w;)switch(_=k,k=eP()){case 40:if(108!=_&&58==em(x,m-1)){-1!=eg(x+=ef(eN(k),"&","&\f"),"&\f",eu(f?l[f-1]:0))&&(S=-1);break}case 34:case 39:case 91:x+=eN(k);break;case 9:case 10:case 13:case 32:x+=function(e){for(;(eE=eO())&&eE<33;)eP();return eR(e)>2||eR(eE)>3?"":" "}(_);break;case 92:x+=function(e,t){for(var r;--t&&eP()&&!(eE<48||eE>102||eE>57&&eE<65||eE>70&&eE<97););return r=eC+(t<6&&32==eO()&&32==eP()),ey(eA,e,r)}(eC-1,7);continue;case 47:switch(eO()){case 42:case 47:e_((u=function(e,t){for(;eP()&&e+eE!==57&&(e+eE!==84||47!==eO()););return"/*"+ey(eA,t,eC-1)+"*"+ed(47===e?e:eP())}(eP(),eC),d=r,p=n,h=c,eI(u,d,p,ea,ed(eE),ey(u,2,-2),0,h)),c);break;default:x+="/"}break;case 123*b:l[f++]=ev(x)*S;case 125*b:case 59:case 0:switch(k){case 0:case 125:w=0;case 59+g:-1==S&&(x=ef(x,/\f/g,"")),v>0&&ev(x)-m&&e_(v>32?eL(x+";",i,n,m-1,c):eL(ef(x," ","")+";",i,n,m-2,c),c);break;case 59:x+=";";default:if(e_(I=eD(x,r,n,f,g,o,l,C,E=[],A=[],m,a),a),123===k)if(0===g)e(x,r,I,I,E,a,m,l,A);else switch(99===y&&110===em(x,3)?100:y){case 100:case 108:case 109:case 115:e(t,I,I,i&&e_(eD(t,I,I,0,0,o,l,C,o,E=[],m,A),A),o,A,m,l,i?E:A);break;default:e(x,I,I,I,[""],A,0,l,A)}}f=g=v=0,b=S=1,C=x="",m=s;break;case 58:m=1+ev(x),v=_;default:if(b<1){if(123==k)--b;else if(125==k&&0==b++&&125==(eE=eC>0?em(eA,--eC):0,eS--,10===eE&&(eS=1,ew--),eE))continue}switch(x+=ed(k),k*b){case 38:S=g>0?1:(x+="\f",-1);break;case 44:l[f++]=(ev(x)-1)*S,S=1;break;case 64:45===eO()&&(x+=eN(eP())),y=eO(),g=m=ev(C=x+=function(e){for(;!eR(eO());)eP();return ey(eA,e,eC)}(eC)),k++;break;case 45:45===_&&2==ev(x)&&(b=0)}}return a}("",null,null,null,[""],(p=d=a||i?"".concat(a," ").concat(i," { ").concat(g," }"):g,ew=eS=1,ek=ev(eA=p),eC=0,d=[]),0,[0],d),eA="",h);o.namespace&&(m=function e(t,r){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(r," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(r," ")),t.props=t.props.map(function(e){return"".concat(r," ").concat(e)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=e(t.children,r)),t})}(m,o.namespace));var y=[];return eU(m,(u=(l=c.concat((f=function(e){return y.push(e)},function(e){e.root||(e=e.return)&&f(e)}))).length,function(e,t,r,n){for(var i="",o=0;o<u;o++)i+=l[o](e,t,r,n)||"";return i})),y};return u.hash=s.length?s.reduce(function(e,t){return t.name||ty(15),e4(e,t.name)},5381).toString():"",u}(),tV=n.createContext({shouldForwardProp:void 0,styleSheet:tj,stylis:t$});function tF(){return(0,n.useContext)(tV)}tV.Consumer,n.createContext(void 0);var tB=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=t$);var n=r.name+t.hash;
14e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,tm(this,function(){throw ty(12,String(r.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=t$),this.name+e.hash},e}();function tz(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(1===r&&"-"===n&&"-"===e[0])return e;n>="A"&&n<="Z"?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var tG=function(e){return null==e||!1===e||""===e},tq=function(e){var t=[];for(var r in e){var n=e[r];e.hasOwnProperty(r)&&!tG(n)&&(Array.isArray(n)&&n.isCss||td(n)?t.push("".concat(tz(r),":"),n,";"):tg(n)?t.push.apply(t,er(er(["".concat(r," {")],tq(n),!1),["}"],!1)):t.push("".concat(tz(r),": ").concat(null==n||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||r in e$||r.startsWith("--")?String(n).trim():"".concat(n,"px"),";")))}return t};function tH(e,t,r,n){if(tG(e))return[];if(tp(e))return[".".concat(e.styledComponentId)];if(td(e))return!td(e)||e.prototype&&e.prototype.isReactComponent||!t?[e]:tH(e(t),t,r,n);return e instanceof tB?r?(e.inject(r,n),[e.getName(n)]):[e]:tg(e)?tq(e):Array.isArray(e)?Array.prototype.concat.apply(eK,e.map(function(e){return tH(e,t,r,n)})):[e.toString()]}var tK=e5(ez),tJ=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(td(r)&&!tp(r))return!1}return!0}(e),this.componentId=t,this.baseHash=e4(tK,t),this.baseStyle=r,tL.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=th(n,this.staticRulesId);else{var i=tf(tH(this.rules,e,t,r)),o=e1(e4(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var a=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}n=th(n,o),this.staticRulesId=o}else{for(var s=e4(this.baseHash,r.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=tf(tH(u,e,t,r));s=e4(s,d+c),l+=d}}if(l){var p=e1(s>>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,r(l,".".concat(p),void 0,this.componentId)),n=th(n,p)}}return n},e}(),tW=n.createContext(void 0);tW.Consumer;var tZ={};function tY(e,t,r){var i,o,a,s,l=tp(e),c=!e6(e),u=t.attrs,d=void 0===u?eK:u,p=t.componentId,h=void 0===p?(i=t.displayName,o=t.parentComponentId,tZ[a="string"!=typeof i?"sc":eX(i)]=(tZ[a]||0)+1,s="".concat(a,"-").concat(e1(e5(ez+a+tZ[a])>>>0)),o?"".concat(o,"-").concat(s):s):p,f=t.displayName,g=void 0===f?e6(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):f,m=t.displayName&&t.componentId?"".concat(eX(t.displayName),"-").concat(t.componentId):t.componentId||h,y=l&&e.attrs?e.attrs.concat(d).filter(Boolean):d,v=t.shouldForwardProp;if(l&&e.shouldForwardProp){var _=e.shouldForwardProp;if(t.shouldForwardProp){var b=t.shouldForwardProp;v=function(e,t){return _(e,t)&&b(e,t)}}else v=_}var w=new tJ(r,m,l?e.componentStyle:void 0);function S(e,t){return function(e,t,r){var i,o,a=e.attrs,s=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,d=e.target,p=n.useContext(tW),h=tF(),f=e.shouldForwardProp||h.shouldForwardProp,g=(void 0===(i=l)&&(i=eJ),t.theme!==i.theme&&t.theme||p||i.theme||eJ),m=function(e,t,r){for(var n,i=et(et({},t),{className:void 0,theme:r}),o=0;o<e.length;o+=1){var a=td(n=e[o])?n(i):n;for(var s in a)i[s]="className"===s?th(i[s],a[s]):"style"===s?et(et({},i[s]),a[s]):a[s]}return t.className&&(i.className=th(i.className,t.className)),i}(a,t,g),y=m.as||d,v={};for(var _ in m)void 0===m[_]||"$"===_[0]||"as"===_||"theme"===_&&m.theme===g||("forwardedAs"===_?v.as=m.forwardedAs:f&&!f(_,y)||(v[_]=m[_]));var b=(o=tF(),s.generateAndInjectStyles(m,o.styleSheet,o.stylis)),w=th(c,u);return b&&(w+=" "+b),m.className&&(w+=" "+m.className),v[e6(y)&&!eW.has(y)?"class":"className"]=w,r&&(v.ref=r),(0,n.createElement)(y,v)}(k,e,t)}S.displayName=g;var k=n.forwardRef(S);return k.attrs=y,k.componentStyle=w,k.displayName=g,k.shouldForwardProp=v,k.foldedComponentIds=l?th(e.foldedComponentIds,e.styledComponentId):"",k.styledComponentId=m,k.target=l?e.target:e,Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=l?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)!function e(t,r,n){if(void 0===n&&(n=!1),!n&&!tg(t)&&!Array.isArray(t))return r;if(Array.isArray(r))for(var i=0;i<r.length;i++)t[i]=e(t[i],r[i]);else if(tg(r))for(var i in r)t[i]=e(t[i],r[i]);return t}(e,t[n],!0);return e}({},e.defaultProps,t):t}}),tm(k,function(){return".".concat(k.styledComponentId)}),c&&function e(t,r,n){if("string"!=typeof r){if(tu){var i=tc(r);i&&i!==tu&&e(t,i,n)}var o=ta(r);
14ts&&(o=o.concat(ts(r)));for(var a=ti(t),s=ti(r),l=0;l<o.length;++l){var c=o[l];if(!(c in tt||n&&n[c]||s&&c in s||a&&c in a)){var u=tl(r,c);try{to(t,c,u)}catch{}}}}return t}(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),k}function tX(e,t){for(var r=[e[0]],n=0,i=t.length;n<i;n+=1)r.push(t[n],e[n+1]);return r}var tQ=function(e){return Object.assign(e,{isCss:!0})};function t0(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return td(e)||tg(e)?tQ(tH(tX(eK,er([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?tH(e):tQ(tH(tX(e,t)))}var t1=function(e){return function e(t,r,n){if(void 0===n&&(n=eJ),!r)throw ty(1,r);var i=function(e){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return t(r,n,t0.apply(void 0,er([e],i,!1)))};return i.attrs=function(i){return e(t,r,et(et({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},i.withConfig=function(i){return e(t,r,et(et({},n),i))},i}(tY,e)},t2=t1;eW.forEach(function(e){t2[e]=t1(e)})},87780:(e,t,r)=>{"use strict";r.d(t,{m5:()=>i});var n=r(13938);function i(e){let{env:t,service:r,version:n,datacenter:i,sdkVersion:a,variant:s}=e,l=[o("sdk_version",null!=a?a:"6.33.0")];return t&&l.push(o("env",t)),r&&l.push(o("service",r)),n&&l.push(o("version",n)),i&&l.push(o("datacenter",i)),s&&l.push(o("variant",s)),l}function o(e,t){var r;let i=t?`${e}:${t}`:e;return(i.length>200||(r=i,function(){try{return RegExp("[\\p{Ll}]","u"),!0}catch(e){return!1}}()&&RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(r)))&&n.Vy.warn(`Tag ${i} doesn't meet tag requirements and will be sanitized. ${n.xG} ${n.fH}/getting_started/tagging/#defining-tags`),i.replace(/,/g,"_")}},89099:(e,t,r)=>{e.exports=r(16296)},89359:()=>{},90198:(e,t,r)=>{"use strict";let n;r.d(t,{Bd:()=>a,Dx:()=>u,dm:()=>l,oO:()=>d,pM:()=>s,um:()=>c});var i=r(13938);let o=!1;function a(e){n=e}function s(e){o=e}function l(e){return function(...t){return c(e,this,t)}}function c(e,t,r){try{return e.apply(t,r)}catch(e){u(e)}}function u(e){if(d(e),n)try{n(e)}catch(e){d(e)}}function d(...e){o&&i.Vy.error("[MONITOR]",...e)}},90203:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});let n=(e,t)=>{for(let r of e){if(r.key===t)return r;let e=n(r.children,t);if(e)return e}},i=n},90295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let n=r(64252)._(r(14232)),i=r(86581),o=[],a=[],s=!1;function l(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),o=null;function l(){if(!o){let t=new c(e,r);o={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return o.promise()}if(!s){let e=r.webpack&&1?r.webpack():r.modules;e&&a.push(t=>{for(let r of e)if(t.includes(r))return l()})}function u(e,t){l();let a=n.default.useContext(i.LoadableContext);
14a&&Array.isArray(r.modules)&&r.modules.forEach(e=>{a(e)});let s=n.default.useSyncExternalStore(o.subscribe,o.getCurrentValue,o.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:o.retry}),[]),n.default.useMemo(()=>{var t;return s.loading||s.error?n.default.createElement(r.loading,{isLoading:s.loading,pastDelay:s.pastDelay,timedOut:s.timedOut,error:s.error,retry:o.retry}):s.loaded?n.default.createElement((t=s.loaded)&&t.default?t.default:t,e):null},[e,s])}return u.preload=()=>l(),u.displayName="LoadableComponent",n.default.forwardRef(u)}(l,e)}function d(e,t){let r=[];for(;e.length;){let n=e.pop();r.push(n(t))}return Promise.all(r).then(()=>{if(e.length)return d(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{d(o).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());d(a,e).then(r,r)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},90372:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>i,gH:()=>n});let n=["mnn","oal","lal","ib","tgr","sett"],i={myka:{brandName:"MYKA",theme:"mnn",multiSiteStrategy:"subfolder",defaultCountry:"ie",brandCountries:{development:["dk"],stage:["dk"],production:["ch","dk","es","fi","fr","ie","it","nl","no","se"]}},oal:{brandName:"Oak & Luna",theme:"oal",multiSiteStrategy:"subfolder",defaultCountry:"us",brandCountries:{production:["fr"]}},lal:{brandName:"Lime And Lou",theme:"lal"},ib:{brandName:"Israel Blessing",theme:"ib"},sett:{brandName:"Sett & Co",theme:"sett"},fem:{brandName:"Forever My",theme:"mnn"},mnn:{brandName:"My Name Necklace",theme:"mnn"},tgr:{brandName:"theo grace",theme:"tgr",multiSiteStrategy:"domain",defaultCountry:"us",brandCountries:{development:["uk"],production:["uk","de","mx"]}}}},91298:(e,t,r)=>{"use strict";r.d(t,{F:()=>a,S:()=>o});var n=r(15829),i=r(26635);let o=e=>(0,n.A)(e.siteId,"scs"),a=()=>(0,i.P)("scs")},93487:(e,t,r)=>{"use strict";r.d(t,{l:()=>o,n:()=>i});var n=r(74349);function i(e,t,r){let i,o,a=!r||void 0===r.leading||r.leading,s=!r||void 0===r.trailing||r.trailing,l=!1;return{throttled:(...r)=>{if(l){i=r;return}a?e(...r):i=r,l=!0,o=(0,n.wg)(()=>{s&&i&&e(...i),l=!1,i=void 0},t)},cancel:()=>{(0,n.DJ)(o),l=!1,i=void 0}}}function o(){}},93616:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.useCookiesNext=t.useDeleteCookie=t.useGetCookie=t.useSetCookie=t.useHasCookie=t.useGetCookies=t.hasCookie=t.deleteCookie=t.setCookie=t.getCookie=t.getCookies=void 0;var a=r(50844),s=r(64803),l=r(14232),c=function(e){if(!(0,s.isClientSide)(e))throw Error("You are trying to access cookies on the server side. Please, use the server-side import with `cookies-next/server` instead.")},u=function(e){if(c(e),"server"!==(0,s.getRenderPhase)()){for(var t={},r=document.cookie?document.cookie.split("; "):[],n=0,i=r.length;n<i;n++){var o=r[n].split("="),a=o.slice(1).join("=");t[o[0]]=a}return t}};t.getCookies=u;var d=function(e,t){c(t);var r=u(t),n=null==r?void 0:r[e];if(void 0!==n)return(0,s.decode)(n)};t.getCookie=d;var p=function(e,t,r){if(c(r),"server"!==(0,s.getRenderPhase)()){var i=(0,a.serialize)(e,(0,s.stringify)(t),n({path:"/"},r||{}));document.cookie=i}};t.setCookie=p;var h=function(e,t){c(t),p(e,"",n(n({},t),{maxAge:-1}))};t.deleteCookie=h;var f=function(e,t){if(c(t),!e)return!1;var r=u(t);return!!r&&Object.prototype.hasOwnProperty.call(r,e)};t.hasCookie=f;var g=function(e){var t=(0,l.useState)(!1),r=t[0],n=t[1];return(0,l.useEffect)(function(){n(!0)},[]),r?e:function(){}},m=function(){return g(u)};t.useGetCookies=m;var y=function(){return g(d)};t.useGetCookie=y;var v=function(){return g(f)};t.useHasCookie=v;var _=function(){return g(p)};t.useSetCookie=_;var b=function(){return g(h)};t.useDeleteCookie=b,t.useCookiesNext=function(){return{getCookies:m(),getCookie:y(),hasCookie:v(),setCookie:_(),deleteCookie:b()}},o(r(98855),t)},93619:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>m,zq:()=>f,Hu:()=>g,db:()=>p});var n=r(70414),i=r(39470),o=r(29132),a=r(13040);let s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((e,t)=>
14{var r,n,i,o;if("cdn_image"===t.type){let i=t.cdn_images.original;return(null==i?void 0:i.path)&&e.push({type:"image",src:i.path,width:i.width,height:i.height,alt:null!=(r=t.alt)?r:"",title:null!=(n=t.title)?n:""}),e}let a=(null==t?void 0:t.type)==="wistia_video"?null==t||null==(i=t.wistia_video)?void 0:i.key:null==t||null==(o=t.three_sixty_wistia_video)?void 0:o.key;return a&&e.push({type:"video",videoId:a,alt:t.alt,title:t.title}),e},[])};var l=r(70408),c=r(20788),u=r(37521);let d=e=>{var t;let{friendly_url:r,short_id:n}=e;return null!=(t=(0,u.X4)(r))?t:"/".concat(c.J.product,"/shortid-").concat(n)},p=(e,t)=>{let{selling_price:r,crossed_price:n,price_elements:i,discount_percentage:o}=e;return{selling:r,discountType:"selling_crossed_discount"===i?"percentage":"fixed",discountAmount:"selling_crossed_discount"===i?Number(o):Number(n)-r,...t?{priceAdjustmentsSum:t-r}:{}}},h=(e,t,r)=>{let{CatalogProduct:n,Key:o,ParentId:a,ParentKey:c,UserSelections:u,IsFreeGift:h,IsGuaranteed:f,Price:{SellingPrice:g}}=e,{short_id:m,sku:y,name:v,type:_,media:b,pricing:w,excluded_countries:S=[]}=n,{item_add_page_type:k,item_add_url:C}=null!=u?u:{};return{key:o,parentKey:c,parentId:a,itemAddPageType:k,itemAddUrl:C,id:m,sku:y,name:v,url:d(n),price:p(w,g),image:(0,i.w7)(n,u),media:s(b.items),isExcluded:(0,l.Ay)(S,r.targetLocale),type:_,isFreeGift:h,isGuaranteed:f,inStock:t,itemEditor:{hasDetails:(0,i.j$)(n,u),isEditable:(0,i.Xl)(n),catalogProduct:n,userSelections:u.options_selections}}},f=e=>{try{let{CatalogProduct:t}=e,{short_id:r,sku:i,name:s,pricing:l,type:c,isInStock:u}=t;return{key:(0,n.A)(),id:r,parentKey:"",parentId:0,sku:i,name:s,url:d(t),image:(0,o.QO)(t),media:t.mediaGallery,price:p(l),type:c,isFreeGift:!1,inStock:u,itemEditor:{catalogProduct:t,isEditable:(0,a.l)(t)},isExcluded:!1===t.isCurrentShippingCountrySupported,isGuaranteed:!1}}catch(e){return console.error("Error generating replaced cart item",e),null}},g=(e,t)=>{let{short_id:r,sku:i,name:a,pricing:s,type:l,isInStock:c}=e;return{key:(0,n.A)(),parentKey:t.key,parentId:t.id,parent:{sku:t.sku,price:t.price.selling},id:r,sku:i,name:a,url:d(e),image:(0,o.QO)(e),media:e.mediaGallery,type:l,isFreeGift:!1,inStock:c,price:p(s),isExcluded:!1===e.isCurrentShippingCountrySupported,isGuaranteed:!1,itemEditor:{catalogProduct:e}}},m=e=>{let{Items:t,siteData:r}=e;return((e,t)=>e.reduce((e,r,n,i)=>{let{Key:o,CatalogProductInProducts:a,IsCartNestedView:s,ParentKey:l}=r;if(s||l)return e;let c=!r.IsOutOfStock,u=h(r,c,t),d=i.filter(e=>e.ParentKey===o);return u.pips=(null!=d?d:[]).filter(e=>e.IsCartNestedView||e.ParentKey).map(e=>{let r=!e.IsOutOfStock,n=h(e,r,t);return n.nested=!0,n.parent={sku:u.sku,price:u.price.selling},n}),u.showAddon=a.length>0,e.push(u),e},[]))(t,r)}},95993:(e,t,r)=>{"use strict";r.d(t,{F6:()=>a,do:()=>s,sT:()=>o});var n=r(38248),i=r(67663);let o=(e,t,r)=>"".concat(e,"-").concat(t,"-").concat(r,"-next-user-id"),a=e=>{let{brand:t,siteId:r,country:i}=e,a=o(t,r,i);return(0,n.getCookie)(a)},s=(e,t)=>{let{brand:r,siteId:a,country:s,url:l}=e,c=o(r,a,s);(0,n.setCookie)(c,t,{path:"/",domain:(0,i.Xk)(l),secure:!0,sameSite:"strict",expires:new Date(Date.now()+3456e7)})}},97268:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>c,MO:()=>l,V1:()=>s,qe:()=>a,y1:()=>i});let n={ad:{locale:"ca-AD",defaultCurrency:"EUR"},ae:{locale:"en-AE",defaultCurrency:"AED"},au:{locale:"en-AU",defaultCurrency:"AUD"},at:{locale:"de-AT",defaultCurrency:"EUR"},be:{locale:"fr-BE",defaultCurrency:"EUR"},ca:{locale:"en-CA",defaultCurrency:"CAD"},ch:{locale:"de-CH",defaultCurrency:"CHF"},co:{locale:"es-CO",defaultCurrency:"COP"},de:{locale:"de-DE",defaultCurrency:"EUR"},dk:{locale:"da-DK",defaultCurrency:"DKK"},es:{locale:"es-ES",defaultCurrency:"EUR"},fi:{locale:"fi-FI",defaultCurrency:"EUR"},fr:{locale:"fr-FR",defaultCurrency:"EUR"},hk:{locale:"zh-HK",defaultCurrency:"HKD"},ie:{locale:"en-IE",defaultCurrency:"EUR"},it:{locale:"it-IT",defaultCurrency:"EUR"},jp:{locale:"ja-JP",defaultCurrency:"JPY"},lu:{locale:"fr-LU",defaultCurrency:"EUR"},mc:{locale:"fr-MC",defaultCurrency:"EUR"},mx:{locale:"es-MX",defaultCurrency:"MXN"},nl:{locale:"nl-NL",defaultCurrency:"EUR"},no:{locale:"nb-NO",defaultCurrency:"NOK"},nz:{locale:"en-NZ",defaultCurrency:"NZD"},se:{locale:"sv-SE",defaultCurrency:"SEK"},sg:{locale:"en-SG",defaultCurrency:"SGD"},sm:{locale:"it-SM",defaultCurrency:"EUR"},gb:{locale:"en-GB",defaultCurrency:"GBP"},uk:{locale:"en-GB",defaultCurrency:"GBP"},us:{locale:"en-US",defaultCurrency:"USD"},va:{locale:"it-VA",defaultCurrency:"EUR"}},i=e=>{var t;return null==(t=n[e])?void 0:t.locale},o=["ch","de","dk","es","fi","fr","ie","it","mx","nl","no","se","uk","us"],a="us",s=e=>
14{let[t,...r]=e.split("/").filter(Boolean),n=o.includes(t),i=n?r:[t,...r].filter(Boolean);return{country:n?t:a,pathname:"/".concat(i.join("/")),hasPrefix:n}},l=e=>s(e.split("?")[0]).pathname.slice(1).split("/"),c=n},98653:(e,t,r)=>{"use strict";r.d(t,{LO:()=>a,fG:()=>o});var n=r(99423);let i=async e=>{let{method:t="GET",siteData:r,pathname:i,query:o={},queryString:a,...s}=e,{body:l,headers:c,...u}=s,{currency:d,brand:p,country:h,userCountry:f,targetLocale:g}=r;try{var m;let e,s,y,v=(0,n.go)(p,h)?"/".concat(h):"",_=Object.fromEntries(Object.entries(o).filter(e=>{let[t,r]=e;return void 0!==r&&""!==r})),b=new URLSearchParams({..._,..."GET"===t&&{currency:d,userCountry:f,targetLocale:g}}).toString(),w="".concat(v,"/").concat(i).concat(b?"?".concat(b):"").concat(a?"&".concat(a):"");l instanceof FormData?(l.append("currency",d),l.append("userCountry",f),l.append("targetLocale",g),e=l,s={...c}):(l&&"GET"!==t&&(e=JSON.stringify({...l,currency:d,userCountry:f,targetLocale:g})),s={"Content-Type":"application/json",...c});let S={method:t,headers:s,...e&&{body:e},...u},k=await fetch(w,S);if(!k.ok){let e=await k.json().catch(()=>null),t=Error((null==e?void 0:e.message)||"Something went wrong - status code ".concat(k.status));throw t.statusCode=k.status,t}let C=null!=(m=k.headers.get("Content-Type"))?m:"";if(C.includes("application/json")){if(y=await k.json(),"string"==typeof y||Array.isArray(y))return{responseData:y,siteData:r};return{...y,siteData:r}}if(C.includes("text/html"))return y=await k.text(),{responseData:!0,siteData:r};return{success:!0}}catch(e){throw e instanceof Error&&console.error("Error in client API call for ".concat(i,":"),e),e}},o=async e=>i({...e,method:"GET"}),a=async e=>i({...e,method:"POST"})},98775:(e,t,r)=>{"use strict";r.d(t,{X:()=>n,j:()=>i});let n=e=>{let t=(null==e?void 0:e.status)==="Running";return{experiment:t,experiment_key:t?null==e?void 0:e.friendlyId:void 0}},i=e=>({componentId:e.componentId,componentName:e.componentName,variantId:e.variantId,variantName:e.variantName,variantPriority:e.variantPriority,...n(e.experiment)})},98855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},99423:(e,t,r)=>{"use strict";r.d(t,{JH:()=>o,O4:()=>a,go:()=>i});var n=r(90372);let i=(e,t)=>{let r=n.Ay[e];return"subfolder"===r.multiSiteStrategy&&t!==r.defaultCountry},o=e=>n.Ay[e].brandName,a=e=>n.Ay[e].theme}},e=>{var t=t=>e(e.s=t);e.O(0,[6593,8792],()=>(t(92),t(16296))),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.