@letscooee/web-sdk 10.0.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ import{$ as Yi,$a as Fs,A as Gi,Aa as z,B as Re,Ba as xn,C as Me,Ca as On,D as $
7
7
 
8
8
  `+y.message+`
9
9
  `+Array(y.message.length+1).join("=")+`
10
- `+N(D,M)):y}}function _t(D,O){var L;return O.cache&&O.name&&O.storage.templates.get(O.name)?O.storage.templates.get(O.name):(L=typeof D=="function"?D:Ke(D,O),O.cache&&O.name&&O.storage.templates.define(O.name,L),L)}Le.l.bind(Le),t.compile=Ke,t.compileScope=te,t.compileScopeIntoFunction=G,t.compileToString=N,t.defaultConfig=Le,t.filters=Ne,t.getConfig=Ye,t.helpers=be,t.nativeHelpers=Ve,t.parse=w,t.render=function(D,O,L,M){var v=Ye(L||{});if(!v.async)return _t(D,v)(O,v);if(!M){if(typeof r=="function")return new r(function(y,U){try{y(_t(D,v)(O,v))}catch(K){U(K)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{_t(D,v)(O,v,M)}catch(y){return M(y)}},t.templates=fe,Object.defineProperty(t,"__esModule",{value:!0})})});var hh={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function mh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function gh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Vs;function _h(t,e){if(!Vs){let n=Element.prototype;Vs=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Vs.call(t,e):!1}function vh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[mh(r)]=[n,i]}),e}function yh(t,e){return e.get(As).resolveComponentFactory(t).inputs}function Eh(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let l=n[o],u=bh(l,e,i);u!==-1&&r[u].push(l)}return r}function bh(t,e,n){let r=n;return gh(t)&&e.some((i,o)=>i!=="*"&&_h(t,i)?(r=o,!0):!1),r}var wh=10,ks=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(As).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Bs(this.componentFactory,e,this.inputMap)}},Bs=class{componentFactory;injector;inputMap;eventEmitters=new Os(1);events=this.eventEmitters.pipe(wl(e=>_l(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(Gt),this.appRef=this.injector.get(ri),this.cdScheduler=n.get(Cl),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=hh.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},wh))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),Tl(this.componentRef.hostView)&&(Il(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6))})}initializeComponent(e){let n=Ot.create({providers:[],parent:this.injector}),r=Eh(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new ji(s=>{let l=o.subscribe(u=>s.next({name:i,value:u}));return()=>l.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Us=class extends HTMLElement{ngElementEventsSubscription=null};function Yl(t,e){let n=yh(t,e.injector),r=e.strategyFactory||new ks(t,e.injector),i=vh(n);class o extends Us{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let l=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let _=this[u];delete this[u],l.setInputValue(u,_,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(l){super(),this.injector=l}attributeChangedCallback(l,u,d,_){let[h,E]=i[l];this.ngElementStrategy.setInputValue(h,d,E)}connectedCallback(){let l=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),l=!0),this.ngElementStrategy.connect(this),l||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(l=>{let u=new CustomEvent(l.name,{detail:l.value});this.dispatchEvent(u)})}}return n.forEach(({propName:s,transform:l})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(u){this.ngElementStrategy.setInputValue(s,u,l)},configurable:!0,enumerable:!0})}),o}var zl="10.0.0";var Q=class Q{};ne(Q,"SDK_VERSION",zl),ne(Q,"SDK_VERSION_CODE"),ne(Q,"SDK","WEB"),ne(Q,"LOG_PREFIX","CooeeSDK"),ne(Q,"COOEE","cooee"),ne(Q,"SESSION_STORAGE_SCROLL_ID","sleid"),ne(Q,"IDLE_TIME_IN_SECONDS",30*60),ne(Q,"IN_APP_WRAPPER_NAME","cooee-wrapper"),ne(Q,"IN_APP_CONTAINER_NAME","cooee-container"),ne(Q,"IN_APP_DEFAULT_PADDING",15),ne(Q,"EVENT_SCREEN_VIEW","CE Screen View"),ne(Q,"EVENT_APP_BACKGROUND","CE App Background"),ne(Q,"EVENT_TRIGGER_DISPLAYED","CE Trigger Displayed"),ne(Q,"EVENT_CAMPAIGN_HOLDOUT","CE Campaign Holdout"),ne(Q,"EVENT_CAMPAIGN_REJECTED","CE Campaign Rejected"),ne(Q,"EVENT_CAMPAIGN_FAILED","CE Campaign Failed"),ne(Q,"EVENT_TRIGGER_CLOSED","CE Trigger Closed"),ne(Q,"EVENT_SCROLL","CE Scroll"),ne(Q,"EVENT_TRIGGER_CLICKED","CE Trigger Clicked"),ne(Q,"EVENT_FORM_SUBMITTED","CE Form Submitted"),ne(Q,"EVENT_EXPERIMENT_START","CE Experiment Start"),ne(Q,"EVENT_VIDEO_DIALOG_CLOSED","CE Video Dialog Closed"),ne(Q,"EVENT_VIDEO_DIALOG_OPENED","CE Video Dialog Opened"),ne(Q,"EVENT_VIDEO_CHANGE","CE Video Changed"),ne(Q,"EVENT_LAST_VIDEO_ENDED","CE Last Video Ended"),ne(Q,"EVENT_VIDEO_MUTED","CE Video Muted"),ne(Q,"EVENT_VIDEO_UNMUTED","CE Video Unmuted"),ne(Q,"EVENT_ADD_TO_CART_CLICKED","CE Add To Cart Clicked"),ne(Q,"EVENT_VIEW_ITEM_CLICKED","CE View Item Clicked"),ne(Q,"EVENT_MORE_ITEM_INFO_CLICKED","CE More Item Info Clicked"),ne(Q,"EVENT_OPEN_CART_CLICKED","CE Open Cart Clicked"),ne(Q,"EVENT_ADD_TO_CART","Add To Cart"),ne(Q,"EVENT_REMOVE_FROM_CART","Remove From Cart"),ne(Q,"EVENT_VIEW_ITEM","View Item"),ne(Q,"EVENT_VIEW_CART","View Cart"),ne(Q,"EVENT_OPEN_CART","Open Cart"),ne(Q,"EVENT_VIEW_COLLECTION","View Collection"),ne(Q,"EVENT_BUY_NOW_CLICKED","Buy Now Clicked"),ne(Q,"EVENT_CHECKOUT_STARTED","Checkout Started"),ne(Q,"EVENT_REVIEW_CLICKED","Review Clicked"),ne(Q,"EVENT_ITEM_THUMBNAIL_CLICKED","Item Thumbnail Clicked"),ne(Q,"JS_LOAD_WHITELIST_EVENTS",[Q.EVENT_VIEW_ITEM,Q.EVENT_VIEW_CART,Q.EVENT_VIEW_COLLECTION]),ne(Q,"HASH_INITIATE_CHECKOUT","initiate-checkout"),ne(Q,"HASH_OPEN_CART_DRAWER","open-cart-drawer"),ne(Q,"ADD_BUNDLE_CTA_INBOUND_EVENT","letscooee:inbound:cta:add-bundle"),ne(Q,"CTA_OPEN_CART_EVENT","letscooee:outbound:open-cart"),ne(Q,"CTA_AFTER_REFRESH_UI","letscooee:outbound:refresh-ui"),ne(Q,"POPUP_ACTIVITY_EVENT","letscooee:outbound:popup-activities"),ne(Q,"THIRD_PARTY_CHECKOUT_EVENT","letscooee:outbound:third-party-initiate-checkout"),ne(Q,"CAMPAIGN_DISPLAYED_ACTIVITY","DISPLAYED"),ne(Q,"CAMPAIGN_CLICKED_ACTIVITY","CLICKED"),ne(Q,"CAMPAIGN_CLOSED_ACTIVITY","CLOSED"),ne(Q,"BLACKLISTED_PAGE_NAMES",["collection","product","cart"]),ne(Q,"PLACEHOLDER_IMAGE","https://cdn.global.letscooee.com/images/placeholders/product.png"),ne(Q,"SHADOW_SPLITTER",":shadow"),ne(Q,"CAMPAIGN_ATTRIBUTE","_letscooee_campaign"),ne(Q,"CONTENT_ATTRIBUTE","_letscooee_content"),ne(Q,"VIA","_via"),ne(Q,"PAYMENT_MODAL_DETAILS",[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}]),(()=>{let e=Q.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");Q.SDK_VERSION_CODE=parseInt(e,10)})();var Ze=Q;var Rn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ze.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ze.SDK_VERSION}/dist/widget.min.js`};var Wt=Hi(Kl());var ze=class{static debuggerEl;static infoLogs=[];static log(...e){Wt.default.info(...e)}static verbose(...e){Wt.default.debug(...e)}static error(...e){Wt.default.error(...e)}static warn(...e){Wt.default.warn(...e)}static info(...e){Wt.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){Wt.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function Xl(t=Ze.LOG_PREFIX){Wt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ze.SDK_VERSION}):`)}});let e=Sh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Wt.default.setLevel(Wt.default[localStorage.cooeeLogLevel]):Wt.default.setLevel(Rn.debug?Wt.default.TRACE:Wt.default.OFF)}function Sh(){return new URL(location.href).searchParams?.get("cooee-debug")}var Jl={providers:[Nl()]};var xh={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},oE=Ee(x({},xh),{"[class.ng-submitted]":"isSubmitted"});var Oh=new an("",{providedIn:"root",factory:()=>eu}),eu="always";var Dh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Qn({type:t});static \u0275inj=Jn({})}return t})();var tu=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:Oh,useValue:n.callSetDisabledState??eu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Qn({type:t});static \u0275inj=Jn({imports:[Dh]})}return t})();var Zt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.type="module",document.head.appendChild(r)}static injectRawScript(e){if(!e)return;let n=document.createElement("script");n.id="cooee-app-script",n.innerHTML=e,document.head.appendChild(n)}static injectRawCSS(e,n=document.head){if(!e)return;let r=document.createElement("style");r.textContent=e,n.appendChild(r)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let l of s)if(l.type==CSSRule.FONT_FACE_RULE){let u=e.split("/"),d=u.slice(0,u.length-1).join("/"),_=l.cssText;_=_.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let h=document.createElement("style");h.appendChild(document.createTextNode(_)),document.head.appendChild(h)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var Qt=class t{cooeeEvent=new et;cooeeCTA=new et;elementRef=J(Bt);_engagementTrigger=wt(null);_triggerContext=wt(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){ze.verbose("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(Zt.injectStylesheet(Rn.styleURL,e),Zt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){ze.verbose("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Pe({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&zi(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:1,vars:0,template:function(n,r){n&1&&xl(0)},encapsulation:2})};var Ah=(t,e)=>({"--option-color":t,"background-color":e}),nu=(t,e)=>e.id;function Nh(t,e){if(t&1&&(X(0,"span",6),De(1),Z()),t&2){z();let n=Je(0);V(),dn(n)}}function Rh(t,e){if(t&1){let n=Xe();It(0),X(1,"button",5),je("click",function(){let i=Re(n).$implicit,o=z().$implicit,s=z();return Me(s.onOptionChange(o,i))}),Se(2,Nh,2,1,"span",6),Z()}if(t&2){let n=e.$implicit,r=z().$implicit,i=Je(1),o=n.name,s=Et(n.displayName||n.name),l=i?n.hexColor??o:"",u=z().selectedOptions()[r.name]===o;V(),Ps("color-type",i)("selected",u)("disabled",n.disabled),Oe("title",s)("ngStyle",Ki(14,Ah,l,l)),un("aria-checked",u?"true":"false")("data-value",o)("aria-disabled",n.disabled?"true":null)("aria-label",s),V(),Te(i?-1:2)}}function Mh(t,e){if(t&1&&(X(0,"div"),It(1),X(2,"div",1),De(3),Z(),X(4,"div",2),De(5),Z(),X(6,"div",3),st(7,Rh,3,17,"button",4,nu),Z()()),t&2){let n=e.$implicit,r=z();zi(Ol("option-group ",n.name.toLowerCase())),V(),Et(r.hasHexColors(n)),V(2),At("",n.name,":"),V(2),dn(r.selectedOptions()[n.name]),V(),un("aria-label",n.name),V(),at(n.optionValues)}}var ai=t=>t.trim().toLowerCase(),wr=class t extends Qt{selectedVariant=new et;item=tr.required();selectedOptions=wt({});options=er(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){ze.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),e.options});matchedVariant=er(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=er(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=ai(o.name),l=o.value,u=n.get(s);u||n.set(s,u=new Map);let d=u.get(l);d||u.set(l,d=new Set),d.add(i)}}),n});constructor(){super(),Ls(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Ls(()=>{let n=this.item();if(!n?.options)return;let r=x({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(l=>l.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=x({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getCandidateVariantsExcluding(e){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,l)=>{s.isAvailable&&i.add(l)});let o=i;for(let[s,l]of Object.entries(this.selectedOptions())){if(ai(s)===ai(e))continue;let u=r.get(ai(s));if(!u)return new Set;let d=u.get(String(l));if(!d)return new Set;if(o=new Set([...o].filter(_=>d.has(_))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let i=this.availabilityIndex().get(ai(e.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let l=this.getCandidateVariantsExcluding(e.name);if(l.size===0)return!0;for(let u of l)if(s.has(u))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Pe({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[St],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"color-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&st(0,Mh,9,7,"div",0,nu),n&2&&at(r.options())},dependencies:[Vl,Ll,tu],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
10
+ `+N(D,M)):y}}function _t(D,O){var L;return O.cache&&O.name&&O.storage.templates.get(O.name)?O.storage.templates.get(O.name):(L=typeof D=="function"?D:Ke(D,O),O.cache&&O.name&&O.storage.templates.define(O.name,L),L)}Le.l.bind(Le),t.compile=Ke,t.compileScope=te,t.compileScopeIntoFunction=G,t.compileToString=N,t.defaultConfig=Le,t.filters=Ne,t.getConfig=Ye,t.helpers=be,t.nativeHelpers=Ve,t.parse=w,t.render=function(D,O,L,M){var v=Ye(L||{});if(!v.async)return _t(D,v)(O,v);if(!M){if(typeof r=="function")return new r(function(y,U){try{y(_t(D,v)(O,v))}catch(K){U(K)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{_t(D,v)(O,v,M)}catch(y){return M(y)}},t.templates=fe,Object.defineProperty(t,"__esModule",{value:!0})})});var hh={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function mh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function gh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Vs;function _h(t,e){if(!Vs){let n=Element.prototype;Vs=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Vs.call(t,e):!1}function vh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[mh(r)]=[n,i]}),e}function yh(t,e){return e.get(As).resolveComponentFactory(t).inputs}function Eh(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let l=n[o],u=bh(l,e,i);u!==-1&&r[u].push(l)}return r}function bh(t,e,n){let r=n;return gh(t)&&e.some((i,o)=>i!=="*"&&_h(t,i)?(r=o,!0):!1),r}var wh=10,ks=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(As).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Bs(this.componentFactory,e,this.inputMap)}},Bs=class{componentFactory;injector;inputMap;eventEmitters=new Os(1);events=this.eventEmitters.pipe(wl(e=>_l(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(Gt),this.appRef=this.injector.get(ri),this.cdScheduler=n.get(Cl),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=hh.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},wh))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),Tl(this.componentRef.hostView)&&(Il(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6))})}initializeComponent(e){let n=Ot.create({providers:[],parent:this.injector}),r=Eh(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new ji(s=>{let l=o.subscribe(u=>s.next({name:i,value:u}));return()=>l.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Us=class extends HTMLElement{ngElementEventsSubscription=null};function Yl(t,e){let n=yh(t,e.injector),r=e.strategyFactory||new ks(t,e.injector),i=vh(n);class o extends Us{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let l=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let _=this[u];delete this[u],l.setInputValue(u,_,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(l){super(),this.injector=l}attributeChangedCallback(l,u,d,_){let[h,E]=i[l];this.ngElementStrategy.setInputValue(h,d,E)}connectedCallback(){let l=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),l=!0),this.ngElementStrategy.connect(this),l||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(l=>{let u=new CustomEvent(l.name,{detail:l.value});this.dispatchEvent(u)})}}return n.forEach(({propName:s,transform:l})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(u){this.ngElementStrategy.setInputValue(s,u,l)},configurable:!0,enumerable:!0})}),o}var zl="10.0.1";var Q=class Q{};ne(Q,"SDK_VERSION",zl),ne(Q,"SDK_VERSION_CODE"),ne(Q,"SDK","WEB"),ne(Q,"LOG_PREFIX","CooeeSDK"),ne(Q,"COOEE","cooee"),ne(Q,"SESSION_STORAGE_SCROLL_ID","sleid"),ne(Q,"IDLE_TIME_IN_SECONDS",30*60),ne(Q,"IN_APP_WRAPPER_NAME","cooee-wrapper"),ne(Q,"IN_APP_CONTAINER_NAME","cooee-container"),ne(Q,"IN_APP_DEFAULT_PADDING",15),ne(Q,"EVENT_SCREEN_VIEW","CE Screen View"),ne(Q,"EVENT_APP_BACKGROUND","CE App Background"),ne(Q,"EVENT_TRIGGER_DISPLAYED","CE Trigger Displayed"),ne(Q,"EVENT_CAMPAIGN_HOLDOUT","CE Campaign Holdout"),ne(Q,"EVENT_CAMPAIGN_REJECTED","CE Campaign Rejected"),ne(Q,"EVENT_CAMPAIGN_FAILED","CE Campaign Failed"),ne(Q,"EVENT_TRIGGER_CLOSED","CE Trigger Closed"),ne(Q,"EVENT_SCROLL","CE Scroll"),ne(Q,"EVENT_TRIGGER_CLICKED","CE Trigger Clicked"),ne(Q,"EVENT_FORM_SUBMITTED","CE Form Submitted"),ne(Q,"EVENT_EXPERIMENT_START","CE Experiment Start"),ne(Q,"EVENT_VIDEO_DIALOG_CLOSED","CE Video Dialog Closed"),ne(Q,"EVENT_VIDEO_DIALOG_OPENED","CE Video Dialog Opened"),ne(Q,"EVENT_VIDEO_CHANGE","CE Video Changed"),ne(Q,"EVENT_LAST_VIDEO_ENDED","CE Last Video Ended"),ne(Q,"EVENT_VIDEO_MUTED","CE Video Muted"),ne(Q,"EVENT_VIDEO_UNMUTED","CE Video Unmuted"),ne(Q,"EVENT_ADD_TO_CART_CLICKED","CE Add To Cart Clicked"),ne(Q,"EVENT_VIEW_ITEM_CLICKED","CE View Item Clicked"),ne(Q,"EVENT_MORE_ITEM_INFO_CLICKED","CE More Item Info Clicked"),ne(Q,"EVENT_OPEN_CART_CLICKED","CE Open Cart Clicked"),ne(Q,"EVENT_ADD_TO_CART","Add To Cart"),ne(Q,"EVENT_REMOVE_FROM_CART","Remove From Cart"),ne(Q,"EVENT_VIEW_ITEM","View Item"),ne(Q,"EVENT_VIEW_CART","View Cart"),ne(Q,"EVENT_OPEN_CART","Open Cart"),ne(Q,"EVENT_VIEW_COLLECTION","View Collection"),ne(Q,"EVENT_BUY_NOW_CLICKED","Buy Now Clicked"),ne(Q,"EVENT_CHECKOUT_STARTED","Checkout Started"),ne(Q,"EVENT_REVIEW_CLICKED","Review Clicked"),ne(Q,"EVENT_ITEM_THUMBNAIL_CLICKED","Item Thumbnail Clicked"),ne(Q,"JS_LOAD_WHITELIST_EVENTS",[Q.EVENT_VIEW_ITEM,Q.EVENT_VIEW_CART,Q.EVENT_VIEW_COLLECTION]),ne(Q,"HASH_INITIATE_CHECKOUT","initiate-checkout"),ne(Q,"HASH_OPEN_CART_DRAWER","open-cart-drawer"),ne(Q,"ADD_BUNDLE_CTA_INBOUND_EVENT","letscooee:inbound:cta:add-bundle"),ne(Q,"CTA_OPEN_CART_EVENT","letscooee:outbound:open-cart"),ne(Q,"CTA_AFTER_REFRESH_UI","letscooee:outbound:refresh-ui"),ne(Q,"POPUP_ACTIVITY_EVENT","letscooee:outbound:popup-activities"),ne(Q,"THIRD_PARTY_CHECKOUT_EVENT","letscooee:outbound:third-party-initiate-checkout"),ne(Q,"CAMPAIGN_DISPLAYED_ACTIVITY","DISPLAYED"),ne(Q,"CAMPAIGN_CLICKED_ACTIVITY","CLICKED"),ne(Q,"CAMPAIGN_CLOSED_ACTIVITY","CLOSED"),ne(Q,"BLACKLISTED_PAGE_NAMES",["collection","product","cart"]),ne(Q,"PLACEHOLDER_IMAGE","https://cdn.global.letscooee.com/images/placeholders/product.png"),ne(Q,"SHADOW_SPLITTER",":shadow"),ne(Q,"CAMPAIGN_ATTRIBUTE","_letscooee_campaign"),ne(Q,"CONTENT_ATTRIBUTE","_letscooee_content"),ne(Q,"VIA","_via"),ne(Q,"PAYMENT_MODAL_DETAILS",[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}]),(()=>{let e=Q.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");Q.SDK_VERSION_CODE=parseInt(e,10)})();var Ze=Q;var Rn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ze.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ze.SDK_VERSION}/dist/widget.min.js`};var Wt=Hi(Kl());var ze=class{static debuggerEl;static infoLogs=[];static log(...e){Wt.default.info(...e)}static verbose(...e){Wt.default.debug(...e)}static error(...e){Wt.default.error(...e)}static warn(...e){Wt.default.warn(...e)}static info(...e){Wt.default.info(...e),this.infoLogs.unshift({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){Wt.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function Xl(t=Ze.LOG_PREFIX){Wt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ze.SDK_VERSION}):`)}});let e=Sh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Wt.default.setLevel(Wt.default[localStorage.cooeeLogLevel]):Wt.default.setLevel(Rn.debug?Wt.default.TRACE:Wt.default.OFF)}function Sh(){return new URL(location.href).searchParams?.get("cooee-debug")}var Jl={providers:[Nl()]};var xh={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},oE=Ee(x({},xh),{"[class.ng-submitted]":"isSubmitted"});var Oh=new an("",{providedIn:"root",factory:()=>eu}),eu="always";var Dh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Qn({type:t});static \u0275inj=Jn({})}return t})();var tu=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:Oh,useValue:n.callSetDisabledState??eu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Qn({type:t});static \u0275inj=Jn({imports:[Dh]})}return t})();var Zt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.type="module",document.head.appendChild(r)}static injectRawScript(e){if(!e)return;let n=document.createElement("script");n.id="cooee-app-script",n.innerHTML=e,document.head.appendChild(n)}static injectRawCSS(e,n=document.head){if(!e)return;let r=document.createElement("style");r.textContent=e,n.appendChild(r)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let l of s)if(l.type==CSSRule.FONT_FACE_RULE){let u=e.split("/"),d=u.slice(0,u.length-1).join("/"),_=l.cssText;_=_.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let h=document.createElement("style");h.appendChild(document.createTextNode(_)),document.head.appendChild(h)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var Qt=class t{cooeeEvent=new et;cooeeCTA=new et;elementRef=J(Bt);_engagementTrigger=wt(null);_triggerContext=wt(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){ze.verbose("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(Zt.injectStylesheet(Rn.styleURL,e),Zt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){ze.verbose("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Pe({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&zi(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:1,vars:0,template:function(n,r){n&1&&xl(0)},encapsulation:2})};var Ah=(t,e)=>({"--option-color":t,"background-color":e}),nu=(t,e)=>e.id;function Nh(t,e){if(t&1&&(X(0,"span",6),De(1),Z()),t&2){z();let n=Je(0);V(),dn(n)}}function Rh(t,e){if(t&1){let n=Xe();It(0),X(1,"button",5),je("click",function(){let i=Re(n).$implicit,o=z().$implicit,s=z();return Me(s.onOptionChange(o,i))}),Se(2,Nh,2,1,"span",6),Z()}if(t&2){let n=e.$implicit,r=z().$implicit,i=Je(1),o=n.name,s=Et(n.displayName||n.name),l=i?n.hexColor??o:"",u=z().selectedOptions()[r.name]===o;V(),Ps("color-type",i)("selected",u)("disabled",n.disabled),Oe("title",s)("ngStyle",Ki(14,Ah,l,l)),un("aria-checked",u?"true":"false")("data-value",o)("aria-disabled",n.disabled?"true":null)("aria-label",s),V(),Te(i?-1:2)}}function Mh(t,e){if(t&1&&(X(0,"div"),It(1),X(2,"div",1),De(3),Z(),X(4,"div",2),De(5),Z(),X(6,"div",3),st(7,Rh,3,17,"button",4,nu),Z()()),t&2){let n=e.$implicit,r=z();zi(Ol("option-group ",n.name.toLowerCase())),V(),Et(r.hasHexColors(n)),V(2),At("",n.name,":"),V(2),dn(r.selectedOptions()[n.name]),V(),un("aria-label",n.name),V(),at(n.optionValues)}}var ai=t=>t.trim().toLowerCase(),wr=class t extends Qt{selectedVariant=new et;item=tr.required();selectedOptions=wt({});options=er(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){ze.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),e.options});matchedVariant=er(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=er(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=ai(o.name),l=o.value,u=n.get(s);u||n.set(s,u=new Map);let d=u.get(l);d||u.set(l,d=new Set),d.add(i)}}),n});constructor(){super(),Ls(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Ls(()=>{let n=this.item();if(!n?.options)return;let r=x({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(l=>l.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=x({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getCandidateVariantsExcluding(e){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,l)=>{s.isAvailable&&i.add(l)});let o=i;for(let[s,l]of Object.entries(this.selectedOptions())){if(ai(s)===ai(e))continue;let u=r.get(ai(s));if(!u)return new Set;let d=u.get(String(l));if(!d)return new Set;if(o=new Set([...o].filter(_=>d.has(_))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let i=this.availabilityIndex().get(ai(e.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let l=this.getCandidateVariantsExcluding(e.name);if(l.size===0)return!0;for(let u of l)if(s.has(u))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Pe({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[St],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"color-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&st(0,Mh,9,7,"div",0,nu),n&2&&at(r.options())},dependencies:[Vl,Ll,tu],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}.option-value.disabled{opacity:.5;pointer-events:none}
11
11
  `],encapsulation:3})};var Hs=function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t}(Hs||{});var en=function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t}(en||{});var ci=function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t}(ci||{});var Cr=class{id;mID;vID;vName;imageURL;name;link;quantity;price;finalPrice;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price,this.finalPrice=e.finalPrice??e.price}};var js=(n=>(n.CART_AMOUNT="CART_AMOUNT",n.ITEM_COUNT="ITEM_COUNT",n))(js||{});var pn=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var Sr=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"};var Gs=Hi(iu());function eo(t){return Gs.default.createInstance({name:"lc",storeName:t,driver:Gs.default.LOCALSTORAGE})}var Tr=class{static storage;static async get(e,n){return await this.storage?.getItem(e)??n}static set(e,n){return this.storage?.setItem(e,n)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var li=class li extends Tr{};ne(li,"storeName","ses"),li.storage=eo(li.storeName);var Ws=li;var ui=class ui extends Tr{};ne(ui,"storeName","usr"),ui.storage=eo(ui.storeName);var Ir=ui;var su=Hi(ou());var zE=(0,su.default)(fetch);var to=class extends Error{request;response;status;requestBody;responseText;constructor(e="Failed to fetch"){super(e),this.name="FetchError",Object.setPrototypeOf(this,new.target.prototype)}is40x(){return!!this.response&&this.response.status>=400&&this.response.status<500}};var pe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Ce=globalThis;var hn="9.42.0";function rr(){return ir(Ce),Ce}function ir(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||hn,e[hn]=e[hn]||{}}function Mn(t,e,n=Ce){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[hn]=r[hn]||{};return i[t]||(i[t]=e())}var qs=["debug","info","warn","error","log","assert","trace"],Ph="Sentry Logger ",xr={};function Wn(t){if(!("console"in Ce))return t();let e=Ce.console,n={},r=Object.keys(xr);r.forEach(i=>{let o=xr[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function Lh(){Xs().enabled=!0}function Fh(){Xs().enabled=!1}function au(){return Xs().enabled}function Vh(...t){Ks("log",...t)}function kh(...t){Ks("warn",...t)}function Bh(...t){Ks("error",...t)}function Ks(t,...e){pe&&au()&&Wn(()=>{Ce.console[t](`${Ph}[${t}]:`,...e)})}function Xs(){return pe?Mn("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var ie={enable:Lh,disable:Fh,isEnabled:au,log:Vh,warn:kh,error:Bh};var mn="?",cu=/\(error: (.*)\)/,lu=/captureMessage|captureException/;function Zs(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
12
12
  `);for(let l=r;l<s.length;l++){let u=s[l];if(u.length>1024)continue;let d=cu.test(u)?u.replace(cu,"$1"):u;if(!d.match(/\S*Error: /)){for(let _ of e){let h=_(d);if(h){o.push(h);break}}if(o.length>=50+i)break}}return uu(o.slice(i))}}function uu(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(no(e).function||"")&&e.pop(),e.reverse(),lu.test(no(e).function||"")&&(e.pop(),lu.test(no(e).function||"")&&e.pop()),e.slice(0,50).map(n=>Ee(x({},n),{filename:n.filename||no(e).filename,function:n.function||mn}))}function no(t){return t[t.length-1]||{}}var Js="<anonymous>";function tn(t){try{return!t||typeof t!="function"?Js:t.name||Js}catch{return Js}}function ro(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var io={},du={};function Nt(t,e){io[t]=io[t]||[],io[t].push(e)}function Rt(t,e){if(!du[t]){du[t]=!0;try{e()}catch(n){pe&&ie.error(`Error while instrumenting ${t}`,n)}}}function ft(t,e){let n=t&&io[t];if(n)for(let r of n)try{r(e)}catch(i){pe&&ie.error(`Error while triggering instrumentation handler.
13
13
  Type: ${t}
@@ -22,7 +22,7 @@ Event: ${gn(t)}`),!0;if(tg(t,e.denyUrls))return pe&&ie.warn(`Event dropped due t
22
22
  Event: ${gn(t)}.
23
23
  Url: ${Oo(t)}`),!0;if(!ng(t,e.allowUrls))return pe&&ie.warn(`Event dropped due to not being matched by \`allowUrls\` option.
24
24
  Event: ${gn(t)}.
25
- Url: ${Oo(t)}`),!0}return!1}function Qm(t,e){return e?.length?So(t).some(n=>Ar(n,e)):!1}function eg(t,e){if(!e?.length)return!1;let n=t.transaction;return n?Ar(n,e):!1}function tg(t,e){if(!e?.length)return!1;let n=Oo(t);return n?Ar(n,e):!1}function ng(t,e){if(!e?.length)return!0;let n=Oo(t);return n?Ar(n,e):!0}function rg(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Oo(t){try{let n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?rg(n):null}catch{return pe&&ie.error(`Cannot extract url for event ${gn(t)}`),null}}function ig(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function Ha(t,e,n,r,i,o){if(!i.exception?.values||!o||!cn(o.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Ua(t,e,r,o.originalException,n,i.exception.values,s,0))}function Ua(t,e,n,r,i,o,s,l){if(o.length>=n+1)return o;let u=[...o];if(cn(r[i],Error)){Cd(s,l);let d=t(e,r[i]),_=u.length;Sd(d,i,_,l),u=Ua(t,e,n,r[i],i,[d,...u],d,_)}return Array.isArray(r.errors)&&r.errors.forEach((d,_)=>{if(cn(d,Error)){Cd(s,l);let h=t(e,d),E=u.length;Sd(h,`errors[${_}]`,E,l),u=Ua(t,e,n,d,i,[h,...u],h,E)}}),u}function Cd(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ee(x(x({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Sd(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ee(x({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function ja(t){let e="console";Nt(e,t),Rt(e,og)}function og(){"console"in Ce&&qs.forEach(function(t){t in Ce.console&&pt(Ce.console,t,function(e){return xr[t]=e,function(...n){ft("console",{args:n,level:t}),xr[t]?.apply(Ce.console,n)}})})}function $a(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var sg="Dedupe",ag=()=>{let t;return{name:sg,processEvent(e){if(e.type)return e;try{if(cg(e,t))return pe&&ie.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Ao=ag;function cg(t,e){return e?!!(lg(t,e)||ug(t,e)):!1}function lg(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!xd(t,e)||!Id(t,e))}function ug(t,e){let n=Td(e),r=Td(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!xd(t,e)||!Id(t,e))}function Id(t,e){let n=ro(t),r=ro(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function xd(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Td(t){return t.exception?.values?.[0]}function bi(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function No(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var wi=Ce;function Ga(){return"history"in wi&&!!wi.history}function dg(){if(!("fetch"in wi))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ci(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Wa(){if(typeof EdgeRuntime=="string")return!0;if(!dg())return!1;if(Ci(wi.fetch))return!0;let t=!1,e=wi.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=Ci(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){pe&&ie.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function za(t,e){let n="fetch";Nt(n,t),Rt(n,()=>fg(void 0,e))}function fg(t,e=!1){e&&!Wa()||pt(Ce,"fetch",function(n){return function(...r){let i=new Error,{method:o,url:s}=pg(r),l={args:r,fetchData:{method:o,url:s},startTimestamp:Ut()*1e3,virtualError:i,headers:hg(r)};return t||ft("fetch",x({},l)),n.apply(Ce,r).then(async u=>(t?t(u):ft("fetch",Ee(x({},l),{endTimestamp:Ut()*1e3,response:u})),u),u=>{if(ft("fetch",Ee(x({},l),{endTimestamp:Ut()*1e3,error:u})),or(u)&&u.stack===void 0&&(u.stack=i.stack,zt(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{let d=new URL(l.fetchData.url);u.message=`${u.message} (${d.host})`}catch{}throw u})}})}function Ya(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Od(t){return typeof t=="string"?t:t?Ya(t,"url")?t.url:t.toString?t.toString():"":""}function pg(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:Od(n),method:Ya(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:Od(e),method:Ya(e,"method")?String(e.method).toUpperCase():"GET"}}function hg(t){let[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(pu(e))return new Headers(e.headers)}catch{}}function qa(){return"npm"}var rt=Ce,Ka=0;function Xa(){return Ka>0}function Dg(){Ka++,setTimeout(()=>{Ka--})}function lr(t,e={}){function n(i){return typeof i=="function"}if(!n(t))return t;try{let i=t.__sentry_wrapped__;if(i)return typeof i=="function"?i:t;if(cr(t))return t}catch{return t}let r=function(...i){try{let o=i.map(s=>lr(s,e));return t.apply(this,o)}catch(o){throw Dg(),hi(s=>{s.addEventProcessor(l=>(e.mechanism&&(Nr(l,void 0,void 0),_n(l,e.mechanism)),l.extra=Ee(x({},l.extra),{arguments:i}),l)),wo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}co(r,t),zt(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Dd(){let t=pi(),{referrer:e}=rt.document||{},{userAgent:n}=rt.navigator||{},r=x(x({},e&&{Referer:e}),n&&{"User-Agent":n});return{url:t,headers:r}}function Ro(t,e){let n=Qa(t,e),r={type:Pg(e),value:Lg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ag(t,e,n,r){let o=qe()?.getOptions().normalizeDepth,s=kg(e),l={__serialized__:_o(e,o)};if(s)return{exception:{values:[Ro(t,s)]},extra:l};let u={exception:{values:[{type:ar(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Fg(e,{isUnhandledRejection:r})}]},extra:l};if(n){let d=Qa(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function Ja(t,e){return{exception:{values:[Ro(t,e)]}}}function Qa(t,e){let n=e.stacktrace||e.stack||"",r=Rg(e),i=Mg(e);try{return t(n,r,i)}catch{}return[]}var Ng=/Minified React error #\d+;/i;function Rg(t){return t&&Ng.test(t.message)?1:0}function Mg(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Ad(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Pg(t){let e=t?.name;return!e&&Ad(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Lg(t){let e=t?.message;return Ad(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Nd(t,e,n,r){let i=n?.syntheticException||void 0,o=Mo(t,e,i,r);return _n(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),rn(o)}function Rd(t,e,n="info",r,i){let o=r?.syntheticException||void 0,s=Za(t,e,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),rn(s)}function Mo(t,e,n,r,i){let o;if(oo(e)&&e.error)return Ja(t,e.error);if(so(e)||ra(e)){let s=e;if("stack"in e)o=Ja(t,e);else{let l=s.name||(so(s)?"DOMError":"DOMException"),u=s.message?`${l}: ${s.message}`:l;o=Za(t,u,n,r),Nr(o,u)}return"code"in s&&(o.tags=Ee(x({},o.tags),{"DOMException.code":`${s.code}`})),o}return or(e)?Ja(t,e):Pn(e)||ar(e)?(o=Ag(t,e,n,i),_n(o,{synthetic:!0}),o):(o=Za(t,e,n,r),Nr(o,`${e}`,void 0),_n(o,{synthetic:!0}),o)}function Za(t,e,n,r){let i={};if(r&&n){let o=Qa(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]}),_n(i,{synthetic:!0})}if(Dr(e)){let{__sentry_template_string__:o,__sentry_template_values__:s}=e;return i.logentry={message:o,params:s},i}return i.message=e,i}function Fg(t,{isUnhandledRejection:e}){let n=la(t),r=e?"promise rejection":"exception";return oo(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:ar(t)?`Event \`${Vg(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Vg(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function kg(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}var Bg=5e3,Si=class extends yi{constructor(e){let n=Ug(e),r=rt.SENTRY_SDK_SOURCE||qa();ka(n,"browser",["browser"],r),super(n);let{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:l}=this._options,u=s??l?.enableLogs;rt.document&&(o||u)&&rt.document.addEventListener("visibilitychange",()=>{rt.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),u&&Ei(this))}),u&&(this.on("flush",()=>{Ei(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Ei(this)},Bg)})),i&&(this.on("postprocessEvent",Fa),this.on("beforeSendSession",Va))}eventFromException(e,n){return Nd(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Rd(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,i)}};function Ug(t){return x({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:rt.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var Md=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var mt=Ce;var Hg=1e3,Pd,ec,tc;function nc(t){let e="dom";Nt(e,t),Rt(e,jg)}function jg(){if(!mt.document)return;let t=ft.bind(null,"dom"),e=Ld(t,!0);mt.document.addEventListener("click",e,!1),mt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=mt[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(pt(i,"addEventListener",function(o){return function(s,l,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},_=d[s]=d[s]||{refCount:0};if(!_.handler){let h=Ld(t);_.handler=h,o.call(this,s,h,u)}_.refCount++}catch{}return o.call(this,s,l,u)}}),pt(i,"removeEventListener",function(o){return function(s,l,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__||{},_=d[s];_&&(_.refCount--,_.refCount<=0&&(o.call(this,s,_.handler,u),_.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,l,u)}}))})}function $g(t){if(t.type!==ec)return!1;try{if(!t.target||t.target._sentryId!==tc)return!1}catch{}return!0}function Gg(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Ld(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Wg(n);if(Gg(n.type,r))return;zt(n,"_sentryCaptured",!0),r&&!r._sentryId&&zt(r,"_sentryId",ht());let i=n.type==="keypress"?"input":n.type;$g(n)||(t({event:n,name:i,global:e}),ec=n.type,tc=r?r._sentryId:void 0),clearTimeout(Pd),Pd=mt.setTimeout(()=>{tc=void 0,ec=void 0},Hg)}}function Wg(t){try{return t.target}catch{return null}}var Po;function Ti(t){let e="history";Nt(e,t),Rt(e,Yg)}function Yg(){if(mt.addEventListener("popstate",()=>{let e=mt.location.href,n=Po;if(Po=e,n===e)return;ft("history",{from:n,to:e})}),!Ga())return;function t(e){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=Po,o=zg(String(r));if(Po=o,i===o)return e.apply(this,n);ft("history",{from:i,to:o})}return e.apply(this,n)}}pt(mt.history,"pushState",t),pt(mt.history,"replaceState",t)}function zg(t){try{return new URL(t,mt.location.origin).toString()}catch{return t}}var Lo={};function rc(t){let e=Lo[t];if(e)return e;let n=mt[t];if(Ci(n))return Lo[t]=n.bind(mt);let r=mt.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o?.[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){Md&&ie.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(Lo[t]=n.bind(mt))}function Fo(t){Lo[t]=void 0}var ur="__sentry_xhr_v3__";function ic(t){let e="xhr";Nt(e,t),Rt(e,qg)}function qg(){if(!mt.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){let i=new Error,o=Ut()*1e3,s=Mt(r[0])?r[0].toUpperCase():void 0,l=Kg(r[1]);if(!s||!l)return e.apply(n,r);n[ur]={method:s,url:l,request_headers:{}},s==="POST"&&l.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let u=()=>{let d=n[ur];if(d&&n.readyState===4){try{d.status_code=n.status}catch{}let _={endTimestamp:Ut()*1e3,startTimestamp:o,xhr:n,virtualError:i};ft("xhr",_)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(d,_,h){return u(),d.apply(_,h)}}):n.addEventListener("readystatechange",u),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(d,_,h){let[E,w]=h,N=_[ur];return N&&Mt(E)&&Mt(w)&&(N.request_headers[E.toLowerCase()]=w),d.apply(_,h)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){let i=n[ur];if(!i)return e.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let o={startTimestamp:Ut()*1e3,xhr:n};return ft("xhr",o),e.apply(n,r)}})}function Kg(t){if(Mt(t))return t;try{return t.toString()}catch{}}function oc(t,e=rc("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let l=x({body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Fo("fetch"),Kn("No fetch implementation available");try{return e(t.url,l).then(u=>(n-=s,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return Fo("fetch"),n-=s,r--,Kn(u)}}return Io(t,i)}var Xg=30;var Jg=50;function sc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?mn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Zg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Qg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,e_=/\((\S*)(?::(\d+))(?::(\d+))\)/,t_=t=>{let e=Zg.exec(t);if(e){let[,r,i,o]=e;return sc(r,mn,+i,+o)}let n=Qg.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=e_.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=Bd(n[1]||mn,n[2]);return sc(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Fd=[Xg,t_],n_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,r_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,i_=t=>{let e=n_.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=r_.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],i=e[1]||mn;return[i,r]=Bd(i,r),sc(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Vd=[Jg,i_];var kd=[Fd,Vd],ac=Zs(...kd),Bd=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:mn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Lr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Vo=1024,o_="Breadcrumbs",s_=(t={})=>{let e=x({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:o_,setup(n){e.console&&ja(l_(n)),e.dom&&nc(c_(n,e.dom)),e.xhr&&ic(u_(n)),e.fetch&&za(d_(n)),e.history&&Ti(f_(n)),e.sentry&&n.on("beforeSendEvent",a_(n))}}},Ud=s_;function a_(t){return function(n){qe()===t&&bn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:gn(n)},{event:n})}}function c_(t,e){return function(r){if(qe()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,l=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;l&&l>Vo&&(Lr&&ie.warn(`\`dom.maxStringLength\` cannot exceed ${Vo}, but a value of ${l} was configured. Sentry will use ${Vo} instead.`),l=Vo),typeof s=="string"&&(s=[s]);try{let d=r.event,_=p_(d)?d.target:d;i=fi(_,{keyAttrs:s,maxStringLength:l}),o=ca(_)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),bn(u,{event:r.event,name:r.name,global:r.global})}}function l_(t){return function(n){if(qe()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:$a(n.level),message:ao(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${ao(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;bn(r,{input:n.args,level:n.level})}}function u_(t){return function(n){if(qe()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[ur];if(!r||!i||!o)return;let{method:s,url:l,status_code:u,body:d}=o,_={method:s,url:l,status_code:u},h={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i},E={category:"xhr",data:_,type:"http",level:No(u)};t.emit("beforeOutgoingRequestBreadcrumb",E,h),bn(E,h)}}function d_(t){return function(n){if(qe()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},l={category:"fetch",data:o,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",l,s),bn(l,s)}else{let o=n.response,s=Ee(x({},n.fetchData),{status_code:o?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;let l={input:n.args,response:o,startTimestamp:r,endTimestamp:i},u={category:"fetch",data:s,type:"http",level:No(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",u,l),bn(u,l)}}}function f_(t){return function(n){if(qe()!==t)return;let r=n.from,i=n.to,o=bi(rt.location.href),s=r?bi(r):void 0,l=bi(i);s?.path||(s=o),o.protocol===l.protocol&&o.host===l.host&&(i=l.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),bn({category:"navigation",data:{from:r,to:i}})}}function p_(t){return!!t&&!!t.target}var h_=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],m_="BrowserApiErrors",g_=(t={})=>{let e=x({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:m_,setupOnce(){e.setTimeout&&pt(rt,"setTimeout",Hd),e.setInterval&&pt(rt,"setInterval",Hd),e.requestAnimationFrame&&pt(rt,"requestAnimationFrame",__),e.XMLHttpRequest&&"XMLHttpRequest"in rt&&pt(XMLHttpRequest.prototype,"send",v_);let n=e.eventTarget;n&&(Array.isArray(n)?n:h_).forEach(i=>y_(i,e))}}},jd=g_;function Hd(t){return function(...e){let n=e[0];return e[0]=lr(n,{mechanism:{data:{function:tn(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function __(t){return function(e){return t.apply(this,[lr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:tn(t)},handled:!1,type:"instrument"}})])}}function v_(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&pt(n,i,function(o){let s={mechanism:{data:{function:i,handler:tn(o)},handled:!1,type:"instrument"}},l=cr(o);return l&&(s.mechanism.data.handler=tn(l)),lr(o,s)})}),t.apply(this,e)}}function y_(t,e){let r=rt[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(pt(r,"addEventListener",function(i){return function(o,s,l){try{E_(s)&&(s.handleEvent=lr(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:tn(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&b_(this,o,s),i.apply(this,[o,lr(s,{mechanism:{data:{function:"addEventListener",handler:tn(s),target:t},handled:!1,type:"instrument"}}),l])}}),pt(r,"removeEventListener",function(i){return function(o,s,l){try{let u=s.__sentry_wrapped__;u&&i.call(this,o,u,l)}catch{}return i.call(this,o,s,l)}}))}function E_(t){return typeof t.handleEvent=="function"}function b_(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}var $d=()=>({name:"BrowserSession",setupOnce(){if(typeof rt.document>"u"){Lr&&ie.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}_i({ignoreDuration:!0}),vi(),Ti(({from:t,to:e})=>{t!==void 0&&t!==e&&(_i({ignoreDuration:!0}),vi())})}});var w_="GlobalHandlers",C_=(t={})=>{let e=x({onerror:!0,onunhandledrejection:!0},t);return{name:w_,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(S_(n),Gd("onerror")),e.onunhandledrejection&&(T_(n),Gd("onunhandledrejection"))}}},Wd=C_;function S_(t){ea(e=>{let{stackParser:n,attachStacktrace:r}=Yd();if(qe()!==t||Xa())return;let{msg:i,url:o,line:s,column:l,error:u}=e,d=O_(Mo(n,u||i,void 0,r,!1),o,s,l);d.level="error",gi(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function T_(t){na(e=>{let{stackParser:n,attachStacktrace:r}=Yd();if(qe()!==t||Xa())return;let i=I_(e),o=sr(i)?x_(i):Mo(n,i,void 0,r,!0);o.level="error",gi(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function I_(t){if(sr(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function x_(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function O_(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},l=s.stacktrace=s.stacktrace||{},u=l.frames=l.frames||[],d=r,_=n,h=Mt(e)&&e.length>0?e:pi();return u.length===0&&u.push({colno:d,filename:h,function:mn,in_app:!0,lineno:_}),t}function Gd(t){Lr&&ie.log(`Global Handler attached: ${t}`)}function Yd(){return qe()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var zd=()=>({name:"HttpContext",preprocessEvent(t){if(!rt.navigator&&!rt.location&&!rt.document)return;let e=Dd(),n=x(x({},e.headers),t.request?.headers);t.request=Ee(x(x({},e),t.request),{headers:n})}});var D_="cause",A_=5,N_="LinkedErrors",R_=(t={})=>{let e=t.limit||A_,n=t.key||D_;return{name:N_,preprocessEvent(r,i,o){let s=o.getOptions();Ha(Ro,s.stackParser,n,e,r,i)}}},qd=R_;function cc(t){return[Do(),xo(),jd(),Ud(),Wd(),qd(),Ao(),zd(),$d()]}var Kd={},Xd,lc,M_;(()=>{let t=cc({}).filter(e=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name));lc=new Si({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:oc,stackParser:ac,integrations:t,environment:Rn.mode,release:`web-sdk@${Ze.SDK_VERSION}`,debug:Rn.debug}),lc.init()})();function Bo(t,e,n){ze.error(`${e}:`,t);let r=F_(n);if(r.setTag("operation",e),t instanceof to){P_(r,t,e);return}r.captureException(t)}function P_(t,e,n){if(L_(t,e),e.response){let r=e.response;t.setTag("http.status_code",r.status),t.setExtras({responseText:e.responseText,statusText:r.statusText,responseType:r.type,redirected:r.redirected,responseUrl:r.url}),t.captureMessage(`${n} failed with ${r.status}`,"error");return}if(e.request){t.captureMessage(`No response was received for ${n}`,"error");return}}function L_(t,e){let n=e.request;n&&t.setExtras({body:e.requestBody,headers:n.headers,method:n.method,url:n.url})}function F_(t){t??={};let{extra:e,tags:n}=t,r=new Tt;if(r.setClient(lc),r.setUser(M_),t.triggerContext&&!t.engagementTrigger&&(t.engagementTrigger=t.triggerContext.triggerData),t.engagementTrigger){let i=t.engagementTrigger;r.setTags({"engagement.id":i.engagementID,"engagement.short_id":i.shortID,"engagement.objective":i.objective,"engagement.delivery_type":i.onsiteDeliveryType,"engagement.content_id":i.contentID,"engagement.variation":i.variation,"engagement.currency":i.currency})}return e&&r.setExtras(e),n&&r.setTags(n),Xd&&r.setTags(Xd),Object.keys(Kd).forEach(i=>{r.setContext(i,Kd[i])}),r.setTag("language",navigator.language),r.setTag("timezone",Jd()),V_(r),r}function V_(t){window.Shopify&&(t.setTag("shopify.shop",window.Shopify.shop),t.setTag("shopify.currency",window.Shopify.currency?.active),t.setTag("shopify.locale",window.Shopify.locale),t.setTag("theme.schema_name",window.Shopify.theme?.schema_name),t.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}var Uo=class{static format(e,n){let r=/{{\s*(\w+)\s*}}/;return n.replace(r,(i,o)=>{switch(o){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return i}})}static formatWithDelimiters(e,n=2,r=",",i="."){if(isNaN(e)||e==null)return"0";let s=(e/100).toFixed(n).split("."),l=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),u=s[1]?i+s[1]:"";return l+u}};function Zd(t){let e=new Date(Date.UTC(0,0,0,0,0,0,t)),n=[];return e.getUTCMinutes()&&n.push(e.getUTCMinutes()+"m"),e.getUTCSeconds()&&n.push(e.getUTCSeconds()+"s"),e.getUTCMilliseconds()&&n.push(e.getUTCMilliseconds()+"ms"),n.length||n.push("0ms"),n.join(" ")}var Ho=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiments;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new Cr(e)}getJSLoadTimeDiff(){return Zd(Date.now()-this.jsLoadTime.getTime())}};function uc(t,e,n){return{[t]:kn(e,n),[t+"_wo_currency"]:e}}function kn(t,e){if(t==0&&e)return"Free";let n=Ho.get(),r=pn.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||ze.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,l;if(s&&i===o)l=Uo.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(k_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Bo(d,"format-currency",{extra:{currentCurrency:o,shopCurrency:i}}),""}l=u.format(t),l=l.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(l=l.concat(` ${o}`))}return l}function k_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var jo;function Jd(){if(jo)return jo;try{return jo=Intl.DateTimeFormat().resolvedOptions().timeZone,jo}catch{return""}}var wn=class t{transform(e){return e==null?null:kn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Yi({name:"cooeeCurrency",type:t,pure:!0})};var Pt=Hi(ef());Pt.filters.define("default",function(t){return typeof t>"u"||t==null?"":U_(t)});+Pt.filters.define("max",(t,e)=>{let n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?t:n>r?e:t});Pt.filters.define("min",(t,e)=>{let n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?t:n<r?e:t});Pt.filters.define("fallback",(t,e)=>t==null||t===""?e:t);Pt.filters.define("manipulate_quantity",(t,e,n)=>{if(e??=1,n??=100,e>n)return ze.error("Invalid range: min should be less than or equal to max."),t;if(t>=e&&t<=n)return t;let r=t%n;return r<e?e:r});Pt.filters.define("apply_discount_perc",(t,e,n=1/0)=>{if(t=+t,isNaN(t))return ze.error("Need value as a number for `apply_discount_perc` filter"),NaN;if(e<0||e>100)return ze.error("Invalid percent value for `apply_discount_perc` filter. Must be between 0 and 100."),NaN;let r=t*e/100;return t-Math.min(n,r)});Pt.filters.define("apply_discount_fixed",(t,e)=>(t=+t,isNaN(t)?(ze.error("Need value as a number for `apply_discount_fixed` filter"),NaN):Math.max(0,t-e)));Pt.filters.define("currency",t=>(t=+t,isNaN(t)?(ze.error("Need value as a number for `currency` filter"),NaN):kn(t)));Pt.defaultConfig.defaultFilter="default";Pt.defaultConfig.useWith=!0;Pt.defaultConfig.autoEscape=!1;var B_={'"':"&quot;","\\":"&bsol;","\n":"\\n"};function U_(t){return String(t).replace(/["\\\n]/g,e=>B_[e])}function H_(t){if(!t)return"";let e=/({{{\s*([^}]+?)\s*}}}|{{\s*&\s*([^}]+?)\s*}})/g;return t.replace(e,(n,r,i,o)=>`{{ ${(i||o||"").trim()} }}`)}var Fr=(t,e,n)=>{e=x({discount:{},cart:{},product:{},bundle:{},variant:{},customer:{},svg:{},form:{},amount_left:null},e);try{return Pt.render(H_(t),e)}catch(r){throw Bo(r,"squirrelly-render",{extra:{template:t,values:e},triggerContext:n}),r}};var Go=class t{transform(e,n){return e?Fr(e,x({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Yi({name:"cooeeDynamicVariables",type:t,pure:!0})};var dc={};(function t(e,n,r,i){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",l=function(){if(!e.OffscreenCanvas)return!1;var v=new OffscreenCanvas(1,1),y=v.getContext("2d");y.fillRect(0,0,1,1);var U=v.transferToImageBitmap();try{y.createPattern(U,"no-repeat")}catch{return!1}return!0}();function u(){}function d(v){var y=n.exports.Promise,U=y!==void 0?y:e.Promise;return typeof U=="function"?new U(v):(v(u,u),null)}var _=function(v,y){return{transform:function(U){if(v)return U;if(y.has(U))return y.get(U);var K=new OffscreenCanvas(U.width,U.height),oe=K.getContext("2d");return oe.drawImage(U,0,0),y.set(U,K),K},clear:function(){y.clear()}}}(l,new Map),h=function(){var v=Math.floor(16.666666666666668),y,U,K={},oe=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(y=function(ae){var de=Math.random();return K[de]=requestAnimationFrame(function ee(ce){oe===ce||oe+v-1<ce?(oe=ce,delete K[de],ae()):K[de]=requestAnimationFrame(ee)}),de},U=function(ae){K[ae]&&cancelAnimationFrame(K[ae])}):(y=function(ae){return setTimeout(ae,v)},U=function(ae){return clearTimeout(ae)}),{frame:y,cancel:U}}(),E=function(){var v,y,U={};function K(oe){function ae(de,ee){oe.postMessage({options:de||{},callback:ee})}oe.init=function(ee){var ce=ee.transferControlToOffscreen();oe.postMessage({canvas:ce},[ce])},oe.fire=function(ee,ce,re){if(y)return ae(ee,null),y;var he=Math.random().toString(36).slice(2);return y=d(function(le){function me(ge){ge.data.callback===he&&(delete U[he],oe.removeEventListener("message",me),y=null,_.clear(),re(),le())}oe.addEventListener("message",me),ae(ee,he),U[he]=me.bind(null,{data:{callback:he}})}),y},oe.reset=function(){oe.postMessage({reset:!0});for(var ee in U)U[ee](),delete U[ee]}}return function(){if(v)return v;if(!r&&o){var oe=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
25
+ Url: ${Oo(t)}`),!0}return!1}function Qm(t,e){return e?.length?So(t).some(n=>Ar(n,e)):!1}function eg(t,e){if(!e?.length)return!1;let n=t.transaction;return n?Ar(n,e):!1}function tg(t,e){if(!e?.length)return!1;let n=Oo(t);return n?Ar(n,e):!1}function ng(t,e){if(!e?.length)return!0;let n=Oo(t);return n?Ar(n,e):!0}function rg(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Oo(t){try{let n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?rg(n):null}catch{return pe&&ie.error(`Cannot extract url for event ${gn(t)}`),null}}function ig(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function Ha(t,e,n,r,i,o){if(!i.exception?.values||!o||!cn(o.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Ua(t,e,r,o.originalException,n,i.exception.values,s,0))}function Ua(t,e,n,r,i,o,s,l){if(o.length>=n+1)return o;let u=[...o];if(cn(r[i],Error)){Cd(s,l);let d=t(e,r[i]),_=u.length;Sd(d,i,_,l),u=Ua(t,e,n,r[i],i,[d,...u],d,_)}return Array.isArray(r.errors)&&r.errors.forEach((d,_)=>{if(cn(d,Error)){Cd(s,l);let h=t(e,d),E=u.length;Sd(h,`errors[${_}]`,E,l),u=Ua(t,e,n,d,i,[h,...u],h,E)}}),u}function Cd(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ee(x(x({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Sd(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ee(x({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function ja(t){let e="console";Nt(e,t),Rt(e,og)}function og(){"console"in Ce&&qs.forEach(function(t){t in Ce.console&&pt(Ce.console,t,function(e){return xr[t]=e,function(...n){ft("console",{args:n,level:t}),xr[t]?.apply(Ce.console,n)}})})}function $a(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var sg="Dedupe",ag=()=>{let t;return{name:sg,processEvent(e){if(e.type)return e;try{if(cg(e,t))return pe&&ie.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Ao=ag;function cg(t,e){return e?!!(lg(t,e)||ug(t,e)):!1}function lg(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!xd(t,e)||!Id(t,e))}function ug(t,e){let n=Td(e),r=Td(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!xd(t,e)||!Id(t,e))}function Id(t,e){let n=ro(t),r=ro(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function xd(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Td(t){return t.exception?.values?.[0]}function bi(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function No(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var wi=Ce;function Ga(){return"history"in wi&&!!wi.history}function dg(){if(!("fetch"in wi))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ci(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Wa(){if(typeof EdgeRuntime=="string")return!0;if(!dg())return!1;if(Ci(wi.fetch))return!0;let t=!1,e=wi.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=Ci(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){pe&&ie.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function za(t,e){let n="fetch";Nt(n,t),Rt(n,()=>fg(void 0,e))}function fg(t,e=!1){e&&!Wa()||pt(Ce,"fetch",function(n){return function(...r){let i=new Error,{method:o,url:s}=pg(r),l={args:r,fetchData:{method:o,url:s},startTimestamp:Ut()*1e3,virtualError:i,headers:hg(r)};return t||ft("fetch",x({},l)),n.apply(Ce,r).then(async u=>(t?t(u):ft("fetch",Ee(x({},l),{endTimestamp:Ut()*1e3,response:u})),u),u=>{if(ft("fetch",Ee(x({},l),{endTimestamp:Ut()*1e3,error:u})),or(u)&&u.stack===void 0&&(u.stack=i.stack,zt(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{let d=new URL(l.fetchData.url);u.message=`${u.message} (${d.host})`}catch{}throw u})}})}function Ya(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Od(t){return typeof t=="string"?t:t?Ya(t,"url")?t.url:t.toString?t.toString():"":""}function pg(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:Od(n),method:Ya(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:Od(e),method:Ya(e,"method")?String(e.method).toUpperCase():"GET"}}function hg(t){let[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(pu(e))return new Headers(e.headers)}catch{}}function qa(){return"npm"}var rt=Ce,Ka=0;function Xa(){return Ka>0}function Dg(){Ka++,setTimeout(()=>{Ka--})}function lr(t,e={}){function n(i){return typeof i=="function"}if(!n(t))return t;try{let i=t.__sentry_wrapped__;if(i)return typeof i=="function"?i:t;if(cr(t))return t}catch{return t}let r=function(...i){try{let o=i.map(s=>lr(s,e));return t.apply(this,o)}catch(o){throw Dg(),hi(s=>{s.addEventProcessor(l=>(e.mechanism&&(Nr(l,void 0,void 0),_n(l,e.mechanism)),l.extra=Ee(x({},l.extra),{arguments:i}),l)),wo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}co(r,t),zt(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Dd(){let t=pi(),{referrer:e}=rt.document||{},{userAgent:n}=rt.navigator||{},r=x(x({},e&&{Referer:e}),n&&{"User-Agent":n});return{url:t,headers:r}}function Ro(t,e){let n=Qa(t,e),r={type:Pg(e),value:Lg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ag(t,e,n,r){let o=qe()?.getOptions().normalizeDepth,s=kg(e),l={__serialized__:_o(e,o)};if(s)return{exception:{values:[Ro(t,s)]},extra:l};let u={exception:{values:[{type:ar(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Fg(e,{isUnhandledRejection:r})}]},extra:l};if(n){let d=Qa(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function Ja(t,e){return{exception:{values:[Ro(t,e)]}}}function Qa(t,e){let n=e.stacktrace||e.stack||"",r=Rg(e),i=Mg(e);try{return t(n,r,i)}catch{}return[]}var Ng=/Minified React error #\d+;/i;function Rg(t){return t&&Ng.test(t.message)?1:0}function Mg(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Ad(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Pg(t){let e=t?.name;return!e&&Ad(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Lg(t){let e=t?.message;return Ad(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Nd(t,e,n,r){let i=n?.syntheticException||void 0,o=Mo(t,e,i,r);return _n(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),rn(o)}function Rd(t,e,n="info",r,i){let o=r?.syntheticException||void 0,s=Za(t,e,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),rn(s)}function Mo(t,e,n,r,i){let o;if(oo(e)&&e.error)return Ja(t,e.error);if(so(e)||ra(e)){let s=e;if("stack"in e)o=Ja(t,e);else{let l=s.name||(so(s)?"DOMError":"DOMException"),u=s.message?`${l}: ${s.message}`:l;o=Za(t,u,n,r),Nr(o,u)}return"code"in s&&(o.tags=Ee(x({},o.tags),{"DOMException.code":`${s.code}`})),o}return or(e)?Ja(t,e):Pn(e)||ar(e)?(o=Ag(t,e,n,i),_n(o,{synthetic:!0}),o):(o=Za(t,e,n,r),Nr(o,`${e}`,void 0),_n(o,{synthetic:!0}),o)}function Za(t,e,n,r){let i={};if(r&&n){let o=Qa(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]}),_n(i,{synthetic:!0})}if(Dr(e)){let{__sentry_template_string__:o,__sentry_template_values__:s}=e;return i.logentry={message:o,params:s},i}return i.message=e,i}function Fg(t,{isUnhandledRejection:e}){let n=la(t),r=e?"promise rejection":"exception";return oo(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:ar(t)?`Event \`${Vg(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Vg(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function kg(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}var Bg=5e3,Si=class extends yi{constructor(e){let n=Ug(e),r=rt.SENTRY_SDK_SOURCE||qa();ka(n,"browser",["browser"],r),super(n);let{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:l}=this._options,u=s??l?.enableLogs;rt.document&&(o||u)&&rt.document.addEventListener("visibilitychange",()=>{rt.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),u&&Ei(this))}),u&&(this.on("flush",()=>{Ei(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Ei(this)},Bg)})),i&&(this.on("postprocessEvent",Fa),this.on("beforeSendSession",Va))}eventFromException(e,n){return Nd(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Rd(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,i)}};function Ug(t){return x({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:rt.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var Md=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var mt=Ce;var Hg=1e3,Pd,ec,tc;function nc(t){let e="dom";Nt(e,t),Rt(e,jg)}function jg(){if(!mt.document)return;let t=ft.bind(null,"dom"),e=Ld(t,!0);mt.document.addEventListener("click",e,!1),mt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=mt[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(pt(i,"addEventListener",function(o){return function(s,l,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},_=d[s]=d[s]||{refCount:0};if(!_.handler){let h=Ld(t);_.handler=h,o.call(this,s,h,u)}_.refCount++}catch{}return o.call(this,s,l,u)}}),pt(i,"removeEventListener",function(o){return function(s,l,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__||{},_=d[s];_&&(_.refCount--,_.refCount<=0&&(o.call(this,s,_.handler,u),_.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,l,u)}}))})}function $g(t){if(t.type!==ec)return!1;try{if(!t.target||t.target._sentryId!==tc)return!1}catch{}return!0}function Gg(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Ld(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Wg(n);if(Gg(n.type,r))return;zt(n,"_sentryCaptured",!0),r&&!r._sentryId&&zt(r,"_sentryId",ht());let i=n.type==="keypress"?"input":n.type;$g(n)||(t({event:n,name:i,global:e}),ec=n.type,tc=r?r._sentryId:void 0),clearTimeout(Pd),Pd=mt.setTimeout(()=>{tc=void 0,ec=void 0},Hg)}}function Wg(t){try{return t.target}catch{return null}}var Po;function Ti(t){let e="history";Nt(e,t),Rt(e,Yg)}function Yg(){if(mt.addEventListener("popstate",()=>{let e=mt.location.href,n=Po;if(Po=e,n===e)return;ft("history",{from:n,to:e})}),!Ga())return;function t(e){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=Po,o=zg(String(r));if(Po=o,i===o)return e.apply(this,n);ft("history",{from:i,to:o})}return e.apply(this,n)}}pt(mt.history,"pushState",t),pt(mt.history,"replaceState",t)}function zg(t){try{return new URL(t,mt.location.origin).toString()}catch{return t}}var Lo={};function rc(t){let e=Lo[t];if(e)return e;let n=mt[t];if(Ci(n))return Lo[t]=n.bind(mt);let r=mt.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o?.[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){Md&&ie.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(Lo[t]=n.bind(mt))}function Fo(t){Lo[t]=void 0}var ur="__sentry_xhr_v3__";function ic(t){let e="xhr";Nt(e,t),Rt(e,qg)}function qg(){if(!mt.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){let i=new Error,o=Ut()*1e3,s=Mt(r[0])?r[0].toUpperCase():void 0,l=Kg(r[1]);if(!s||!l)return e.apply(n,r);n[ur]={method:s,url:l,request_headers:{}},s==="POST"&&l.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let u=()=>{let d=n[ur];if(d&&n.readyState===4){try{d.status_code=n.status}catch{}let _={endTimestamp:Ut()*1e3,startTimestamp:o,xhr:n,virtualError:i};ft("xhr",_)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(d,_,h){return u(),d.apply(_,h)}}):n.addEventListener("readystatechange",u),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(d,_,h){let[E,w]=h,N=_[ur];return N&&Mt(E)&&Mt(w)&&(N.request_headers[E.toLowerCase()]=w),d.apply(_,h)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){let i=n[ur];if(!i)return e.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let o={startTimestamp:Ut()*1e3,xhr:n};return ft("xhr",o),e.apply(n,r)}})}function Kg(t){if(Mt(t))return t;try{return t.toString()}catch{}}function oc(t,e=rc("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let l=x({body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Fo("fetch"),Kn("No fetch implementation available");try{return e(t.url,l).then(u=>(n-=s,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return Fo("fetch"),n-=s,r--,Kn(u)}}return Io(t,i)}var Xg=30;var Jg=50;function sc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?mn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Zg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Qg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,e_=/\((\S*)(?::(\d+))(?::(\d+))\)/,t_=t=>{let e=Zg.exec(t);if(e){let[,r,i,o]=e;return sc(r,mn,+i,+o)}let n=Qg.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=e_.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=Bd(n[1]||mn,n[2]);return sc(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Fd=[Xg,t_],n_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,r_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,i_=t=>{let e=n_.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=r_.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],i=e[1]||mn;return[i,r]=Bd(i,r),sc(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Vd=[Jg,i_];var kd=[Fd,Vd],ac=Zs(...kd),Bd=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:mn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Lr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Vo=1024,o_="Breadcrumbs",s_=(t={})=>{let e=x({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:o_,setup(n){e.console&&ja(l_(n)),e.dom&&nc(c_(n,e.dom)),e.xhr&&ic(u_(n)),e.fetch&&za(d_(n)),e.history&&Ti(f_(n)),e.sentry&&n.on("beforeSendEvent",a_(n))}}},Ud=s_;function a_(t){return function(n){qe()===t&&bn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:gn(n)},{event:n})}}function c_(t,e){return function(r){if(qe()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,l=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;l&&l>Vo&&(Lr&&ie.warn(`\`dom.maxStringLength\` cannot exceed ${Vo}, but a value of ${l} was configured. Sentry will use ${Vo} instead.`),l=Vo),typeof s=="string"&&(s=[s]);try{let d=r.event,_=p_(d)?d.target:d;i=fi(_,{keyAttrs:s,maxStringLength:l}),o=ca(_)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),bn(u,{event:r.event,name:r.name,global:r.global})}}function l_(t){return function(n){if(qe()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:$a(n.level),message:ao(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${ao(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;bn(r,{input:n.args,level:n.level})}}function u_(t){return function(n){if(qe()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[ur];if(!r||!i||!o)return;let{method:s,url:l,status_code:u,body:d}=o,_={method:s,url:l,status_code:u},h={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i},E={category:"xhr",data:_,type:"http",level:No(u)};t.emit("beforeOutgoingRequestBreadcrumb",E,h),bn(E,h)}}function d_(t){return function(n){if(qe()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},l={category:"fetch",data:o,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",l,s),bn(l,s)}else{let o=n.response,s=Ee(x({},n.fetchData),{status_code:o?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;let l={input:n.args,response:o,startTimestamp:r,endTimestamp:i},u={category:"fetch",data:s,type:"http",level:No(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",u,l),bn(u,l)}}}function f_(t){return function(n){if(qe()!==t)return;let r=n.from,i=n.to,o=bi(rt.location.href),s=r?bi(r):void 0,l=bi(i);s?.path||(s=o),o.protocol===l.protocol&&o.host===l.host&&(i=l.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),bn({category:"navigation",data:{from:r,to:i}})}}function p_(t){return!!t&&!!t.target}var h_=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],m_="BrowserApiErrors",g_=(t={})=>{let e=x({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:m_,setupOnce(){e.setTimeout&&pt(rt,"setTimeout",Hd),e.setInterval&&pt(rt,"setInterval",Hd),e.requestAnimationFrame&&pt(rt,"requestAnimationFrame",__),e.XMLHttpRequest&&"XMLHttpRequest"in rt&&pt(XMLHttpRequest.prototype,"send",v_);let n=e.eventTarget;n&&(Array.isArray(n)?n:h_).forEach(i=>y_(i,e))}}},jd=g_;function Hd(t){return function(...e){let n=e[0];return e[0]=lr(n,{mechanism:{data:{function:tn(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function __(t){return function(e){return t.apply(this,[lr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:tn(t)},handled:!1,type:"instrument"}})])}}function v_(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&pt(n,i,function(o){let s={mechanism:{data:{function:i,handler:tn(o)},handled:!1,type:"instrument"}},l=cr(o);return l&&(s.mechanism.data.handler=tn(l)),lr(o,s)})}),t.apply(this,e)}}function y_(t,e){let r=rt[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(pt(r,"addEventListener",function(i){return function(o,s,l){try{E_(s)&&(s.handleEvent=lr(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:tn(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&b_(this,o,s),i.apply(this,[o,lr(s,{mechanism:{data:{function:"addEventListener",handler:tn(s),target:t},handled:!1,type:"instrument"}}),l])}}),pt(r,"removeEventListener",function(i){return function(o,s,l){try{let u=s.__sentry_wrapped__;u&&i.call(this,o,u,l)}catch{}return i.call(this,o,s,l)}}))}function E_(t){return typeof t.handleEvent=="function"}function b_(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}var $d=()=>({name:"BrowserSession",setupOnce(){if(typeof rt.document>"u"){Lr&&ie.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}_i({ignoreDuration:!0}),vi(),Ti(({from:t,to:e})=>{t!==void 0&&t!==e&&(_i({ignoreDuration:!0}),vi())})}});var w_="GlobalHandlers",C_=(t={})=>{let e=x({onerror:!0,onunhandledrejection:!0},t);return{name:w_,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(S_(n),Gd("onerror")),e.onunhandledrejection&&(T_(n),Gd("onunhandledrejection"))}}},Wd=C_;function S_(t){ea(e=>{let{stackParser:n,attachStacktrace:r}=Yd();if(qe()!==t||Xa())return;let{msg:i,url:o,line:s,column:l,error:u}=e,d=O_(Mo(n,u||i,void 0,r,!1),o,s,l);d.level="error",gi(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function T_(t){na(e=>{let{stackParser:n,attachStacktrace:r}=Yd();if(qe()!==t||Xa())return;let i=I_(e),o=sr(i)?x_(i):Mo(n,i,void 0,r,!0);o.level="error",gi(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function I_(t){if(sr(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function x_(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function O_(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},l=s.stacktrace=s.stacktrace||{},u=l.frames=l.frames||[],d=r,_=n,h=Mt(e)&&e.length>0?e:pi();return u.length===0&&u.push({colno:d,filename:h,function:mn,in_app:!0,lineno:_}),t}function Gd(t){Lr&&ie.log(`Global Handler attached: ${t}`)}function Yd(){return qe()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var zd=()=>({name:"HttpContext",preprocessEvent(t){if(!rt.navigator&&!rt.location&&!rt.document)return;let e=Dd(),n=x(x({},e.headers),t.request?.headers);t.request=Ee(x(x({},e),t.request),{headers:n})}});var D_="cause",A_=5,N_="LinkedErrors",R_=(t={})=>{let e=t.limit||A_,n=t.key||D_;return{name:N_,preprocessEvent(r,i,o){let s=o.getOptions();Ha(Ro,s.stackParser,n,e,r,i)}}},qd=R_;function cc(t){return[Do(),xo(),jd(),Ud(),Wd(),qd(),Ao(),zd(),$d()]}var Kd={},Xd,lc,M_;(()=>{let t=cc({}).filter(e=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name));lc=new Si({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:oc,stackParser:ac,integrations:t,environment:Rn.mode,release:`web-sdk@${Ze.SDK_VERSION}`,debug:Rn.debug}),lc.init()})();function Bo(t,e,n){ze.error(`${e}:`,t);let r=F_(n);if(r.setTag("operation",e),t instanceof to){P_(r,t,e);return}r.captureException(t)}function P_(t,e,n){if(L_(t,e),e.response){let r=e.response;t.setTag("http.status_code",r.status),t.setExtras({responseText:e.responseText,statusText:r.statusText,responseType:r.type,redirected:r.redirected,responseUrl:r.url}),t.captureMessage(`${n} failed with ${r.status}`,"error");return}if(e.request){t.captureMessage(`No response was received for ${n}`,"error");return}}function L_(t,e){let n=e.request;n&&t.setExtras({body:e.requestBody,headers:n.headers,method:n.method,url:n.url})}function F_(t){t??={};let{extra:e,tags:n}=t,r=new Tt;if(r.setClient(lc),r.setUser(M_),t.triggerContext&&!t.engagementTrigger&&(t.engagementTrigger=t.triggerContext.triggerData),t.engagementTrigger){let i=t.engagementTrigger;r.setTags({"engagement.id":i.engagementID,"engagement.short_id":i.shortID,"engagement.objective":i.objective,"engagement.delivery_type":i.onsiteDeliveryType,"engagement.content_id":i.contentID,"engagement.variation":i.variation,"engagement.currency":i.currency})}return e&&r.setExtras(e),n&&r.setTags(n),Xd&&r.setTags(Xd),Object.keys(Kd).forEach(i=>{r.setContext(i,Kd[i])}),r.setTag("language",navigator.language),r.setTag("timezone",Jd()),V_(r),r}function V_(t){window.Shopify&&(t.setTag("shopify.shop",window.Shopify.shop),t.setTag("shopify.currency",window.Shopify.currency?.active),t.setTag("shopify.locale",window.Shopify.locale),t.setTag("theme.schema_name",window.Shopify.theme?.schema_name),t.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}var Uo=class{static format(e,n){let r=/{{\s*(\w+)\s*}}/;return n.replace(r,(i,o)=>{switch(o){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return i}})}static formatWithDelimiters(e,n=2,r=",",i="."){if(isNaN(e)||e==null)return"0";let s=(e/100).toFixed(n).split("."),l=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),u=s[1]?i+s[1]:"";return l+u}};function Zd(t){let e=new Date(Date.UTC(0,0,0,0,0,0,t)),n=[];return e.getUTCMinutes()&&n.push(e.getUTCMinutes()+"m"),e.getUTCSeconds()&&n.push(e.getUTCSeconds()+"s"),e.getUTCMilliseconds()&&n.push(e.getUTCMilliseconds()+"ms"),n.length||n.push("0ms"),n.join(" ")}var Ho=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;customContext={};activeExperiments;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new Cr(e)}getJSLoadTimeDiff(){return Zd(Date.now()-this.jsLoadTime.getTime())}};function uc(t,e,n){return{[t]:kn(e,n),[t+"_wo_currency"]:e}}function kn(t,e){if(t==0&&e)return"Free";let n=Ho.get(),r=pn.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||ze.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,l;if(s&&i===o)l=Uo.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(k_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Bo(d,"format-currency",{extra:{currentCurrency:o,shopCurrency:i}}),""}l=u.format(t),l=l.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(l=l.concat(` ${o}`))}return l}function k_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var jo;function Jd(){if(jo)return jo;try{return jo=Intl.DateTimeFormat().resolvedOptions().timeZone,jo}catch{return""}}var wn=class t{transform(e){return e==null?null:kn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Yi({name:"cooeeCurrency",type:t,pure:!0})};var Pt=Hi(ef());Pt.filters.define("default",function(t){return typeof t>"u"||t==null?"":U_(t)});+Pt.filters.define("max",(t,e)=>{let n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?t:n>r?e:t});Pt.filters.define("min",(t,e)=>{let n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?t:n<r?e:t});Pt.filters.define("fallback",(t,e)=>t==null||t===""?e:t);Pt.filters.define("manipulate_quantity",(t,e,n)=>{if(e??=1,n??=100,e>n)return ze.error("Invalid range: min should be less than or equal to max."),t;if(t>=e&&t<=n)return t;let r=t%n;return r<e?e:r});Pt.filters.define("apply_discount_perc",(t,e,n=1/0)=>{if(t=+t,isNaN(t))return ze.error("Need value as a number for `apply_discount_perc` filter"),NaN;if(e<0||e>100)return ze.error("Invalid percent value for `apply_discount_perc` filter. Must be between 0 and 100."),NaN;let r=t*e/100;return t-Math.min(n,r)});Pt.filters.define("apply_discount_fixed",(t,e)=>(t=+t,isNaN(t)?(ze.error("Need value as a number for `apply_discount_fixed` filter"),NaN):Math.max(0,t-e)));Pt.filters.define("currency",t=>(t=+t,isNaN(t)?(ze.error("Need value as a number for `currency` filter"),NaN):kn(t)));Pt.defaultConfig.defaultFilter="default";Pt.defaultConfig.useWith=!0;Pt.defaultConfig.autoEscape=!1;var B_={'"':"&quot;","\\":"&bsol;","\n":"\\n"};function U_(t){return String(t).replace(/["\\\n]/g,e=>B_[e])}function H_(t){if(!t)return"";let e=/({{{\s*([^}]+?)\s*}}}|{{\s*&\s*([^}]+?)\s*}})/g;return t.replace(e,(n,r,i,o)=>`{{ ${(i||o||"").trim()} }}`)}var Fr=(t,e,n)=>{e=x({discount:{},cart:{},product:{},bundle:{},variant:{},customer:{},svg:{},form:{},amount_left:null},e);try{return Pt.render(H_(t),e)}catch(r){throw Bo(r,"squirrelly-render",{extra:{template:t,values:e},triggerContext:n}),r}};var Go=class t{transform(e,n){return e?Fr(e,x({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Yi({name:"cooeeDynamicVariables",type:t,pure:!0})};var dc={};(function t(e,n,r,i){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",l=function(){if(!e.OffscreenCanvas)return!1;var v=new OffscreenCanvas(1,1),y=v.getContext("2d");y.fillRect(0,0,1,1);var U=v.transferToImageBitmap();try{y.createPattern(U,"no-repeat")}catch{return!1}return!0}();function u(){}function d(v){var y=n.exports.Promise,U=y!==void 0?y:e.Promise;return typeof U=="function"?new U(v):(v(u,u),null)}var _=function(v,y){return{transform:function(U){if(v)return U;if(y.has(U))return y.get(U);var K=new OffscreenCanvas(U.width,U.height),oe=K.getContext("2d");return oe.drawImage(U,0,0),y.set(U,K),K},clear:function(){y.clear()}}}(l,new Map),h=function(){var v=Math.floor(16.666666666666668),y,U,K={},oe=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(y=function(ae){var de=Math.random();return K[de]=requestAnimationFrame(function ee(ce){oe===ce||oe+v-1<ce?(oe=ce,delete K[de],ae()):K[de]=requestAnimationFrame(ee)}),de},U=function(ae){K[ae]&&cancelAnimationFrame(K[ae])}):(y=function(ae){return setTimeout(ae,v)},U=function(ae){return clearTimeout(ae)}),{frame:y,cancel:U}}(),E=function(){var v,y,U={};function K(oe){function ae(de,ee){oe.postMessage({options:de||{},callback:ee})}oe.init=function(ee){var ce=ee.transferControlToOffscreen();oe.postMessage({canvas:ce},[ce])},oe.fire=function(ee,ce,re){if(y)return ae(ee,null),y;var he=Math.random().toString(36).slice(2);return y=d(function(le){function me(ge){ge.data.callback===he&&(delete U[he],oe.removeEventListener("message",me),y=null,_.clear(),re(),le())}oe.addEventListener("message",me),ae(ee,he),U[he]=me.bind(null,{data:{callback:he}})}),y},oe.reset=function(){oe.postMessage({reset:!0});for(var ee in U)U[ee](),delete U[ee]}}return function(){if(v)return v;if(!r&&o){var oe=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
26
26
  `);try{v=new Worker(URL.createObjectURL(new Blob([oe])))}catch(ae){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",ae),null}K(v)}return v}}(),w={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function N(v,y){return y?y(v):v}function B(v){return v!=null}function P(v,y,U){return N(v&&B(v[y])?v[y]:w[y],U)}function Y(v){return v<0?0:Math.floor(v)}function G(v,y){return Math.floor(Math.random()*(y-v))+v}function te(v){return parseInt(v,16)}function q(v){return v.map(Ae)}function Ae(v){var y=String(v).replace(/[^0-9a-f]/gi,"");return y.length<6&&(y=y[0]+y[0]+y[1]+y[1]+y[2]+y[2]),{r:te(y.substring(0,2)),g:te(y.substring(2,4)),b:te(y.substring(4,6))}}function H(v){var y=P(v,"origin",Object);return y.x=P(y,"x",Number),y.y=P(y,"y",Number),y}function ve(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function fe(v){var y=v.getBoundingClientRect();v.width=y.width,v.height=y.height}function be(v){var y=document.createElement("canvas");return y.style.position="fixed",y.style.top="0px",y.style.left="0px",y.style.pointerEvents="none",y.style.zIndex=v,y}function Ve(v,y,U,K,oe,ae,de,ee,ce){v.save(),v.translate(y,U),v.rotate(ae),v.scale(K,oe),v.arc(0,0,1,de,ee,ce),v.restore()}function Ne(v){var y=v.angle*(Math.PI/180),U=v.spread*(Math.PI/180);return{x:v.x,y:v.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:v.startVelocity*.5+Math.random()*v.startVelocity,angle2D:-y+(.5*U-Math.random()*U),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:v.color,shape:v.shape,tick:0,totalTicks:v.ticks,decay:v.decay,drift:v.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:v.gravity*3,ovalScalar:.6,scalar:v.scalar,flat:v.flat}}function Le(v,y){y.x+=Math.cos(y.angle2D)*y.velocity+y.drift,y.y+=Math.sin(y.angle2D)*y.velocity+y.gravity,y.velocity*=y.decay,y.flat?(y.wobble=0,y.wobbleX=y.x+10*y.scalar,y.wobbleY=y.y+10*y.scalar,y.tiltSin=0,y.tiltCos=0,y.random=1):(y.wobble+=y.wobbleSpeed,y.wobbleX=y.x+10*y.scalar*Math.cos(y.wobble),y.wobbleY=y.y+10*y.scalar*Math.sin(y.wobble),y.tiltAngle+=.1,y.tiltSin=Math.sin(y.tiltAngle),y.tiltCos=Math.cos(y.tiltAngle),y.random=Math.random()+2);var U=y.tick++/y.totalTicks,K=y.x+y.random*y.tiltCos,oe=y.y+y.random*y.tiltSin,ae=y.wobbleX+y.random*y.tiltCos,de=y.wobbleY+y.random*y.tiltSin;if(v.fillStyle="rgba("+y.color.r+", "+y.color.g+", "+y.color.b+", "+(1-U)+")",v.beginPath(),s&&y.shape.type==="path"&&typeof y.shape.path=="string"&&Array.isArray(y.shape.matrix))v.fill(O(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(ae-K)*.1,Math.abs(de-oe)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var ee=Math.PI/10*y.wobble,ce=Math.abs(ae-K)*.1,re=Math.abs(de-oe)*.1,he=y.shape.bitmap.width*y.scalar,le=y.shape.bitmap.height*y.scalar,me=new DOMMatrix([Math.cos(ee)*ce,Math.sin(ee)*ce,-Math.sin(ee)*re,Math.cos(ee)*re,y.x,y.y]);me.multiplySelf(new DOMMatrix(y.shape.matrix));var ge=v.createPattern(_.transform(y.shape.bitmap),"no-repeat");ge.setTransform(me),v.globalAlpha=1-U,v.fillStyle=ge,v.fillRect(y.x-he/2,y.y-le/2,he,le),v.globalAlpha=1}else if(y.shape==="circle")v.ellipse?v.ellipse(y.x,y.y,Math.abs(ae-K)*y.ovalScalar,Math.abs(de-oe)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):Ve(v,y.x,y.y,Math.abs(ae-K)*y.ovalScalar,Math.abs(de-oe)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var _e=Math.PI/2*3,p=4*y.scalar,a=8*y.scalar,c=y.x,g=y.y,T=5,A=Math.PI/T;T--;)c=y.x+Math.cos(_e)*a,g=y.y+Math.sin(_e)*a,v.lineTo(c,g),_e+=A,c=y.x+Math.cos(_e)*p,g=y.y+Math.sin(_e)*p,v.lineTo(c,g),_e+=A;else v.moveTo(Math.floor(y.x),Math.floor(y.y)),v.lineTo(Math.floor(y.wobbleX),Math.floor(oe)),v.lineTo(Math.floor(ae),Math.floor(de)),v.lineTo(Math.floor(K),Math.floor(y.wobbleY));return v.closePath(),v.fill(),y.tick<y.totalTicks}function Ye(v,y,U,K,oe){var ae=y.slice(),de=v.getContext("2d"),ee,ce,re=d(function(he){function le(){ee=ce=null,de.clearRect(0,0,K.width,K.height),_.clear(),oe(),he()}function me(){r&&!(K.width===i.width&&K.height===i.height)&&(K.width=v.width=i.width,K.height=v.height=i.height),!K.width&&!K.height&&(U(v),K.width=v.width,K.height=v.height),de.clearRect(0,0,K.width,K.height),ae=ae.filter(function(ge){return Le(de,ge)}),ae.length?ee=h.frame(me):le()}ee=h.frame(me),ce=le});return{addFettis:function(he){return ae=ae.concat(he),re},canvas:v,promise:re,reset:function(){ee&&h.cancel(ee),ce&&ce()}}}function Ke(v,y){var U=!v,K=!!P(y||{},"resize"),oe=!1,ae=P(y,"disableForReducedMotion",Boolean),de=o&&!!P(y||{},"useWorker"),ee=de?E():null,ce=U?ve:fe,re=v&&ee?!!v.__confetti_initialized:!1,he=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,le;function me(_e,p,a){for(var c=P(_e,"particleCount",Y),g=P(_e,"angle",Number),T=P(_e,"spread",Number),A=P(_e,"startVelocity",Number),F=P(_e,"decay",Number),ye=P(_e,"gravity",Number),Ie=P(_e,"drift",Number),we=P(_e,"colors",q),ke=P(_e,"ticks",Number),Be=P(_e,"shapes"),Qe=P(_e,"scalar"),Ht=!!P(_e,"flat"),Kt=H(_e),Tn=c,xt=[],jt=v.width*Kt.x,ki=v.height*Kt.y;Tn--;)xt.push(Ne({x:jt,y:ki,angle:g,spread:T,startVelocity:A,color:we[Tn%we.length],shape:Be[G(0,Be.length)],ticks:ke,decay:F,gravity:ye,drift:Ie,scalar:Qe,flat:Ht}));return le?le.addFettis(xt):(le=Ye(v,xt,ce,p,a),le.promise)}function ge(_e){var p=ae||P(_e,"disableForReducedMotion",Boolean),a=P(_e,"zIndex",Number);if(p&&he)return d(function(A){A()});U&&le?v=le.canvas:U&&!v&&(v=be(a),document.body.appendChild(v)),K&&!re&&ce(v);var c={width:v.width,height:v.height};ee&&!re&&ee.init(v),re=!0,ee&&(v.__confetti_initialized=!0);function g(){if(ee){var A={getBoundingClientRect:function(){if(!U)return v.getBoundingClientRect()}};ce(A),ee.postMessage({resize:{width:A.width,height:A.height}});return}c.width=c.height=null}function T(){le=null,K&&(oe=!1,e.removeEventListener("resize",g)),U&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,re=!1)}return K&&!oe&&(oe=!0,e.addEventListener("resize",g,!1)),ee?ee.fire(_e,c,T):me(_e,c,T)}return ge.reset=function(){ee&&ee.reset(),le&&le.reset()},ge}var _t;function D(){return _t||(_t=Ke(null,{useWorker:!0,resize:!0})),_t}function O(v,y,U,K,oe,ae,de){var ee=new Path2D(v),ce=new Path2D;ce.addPath(ee,new DOMMatrix(y));var re=new Path2D;return re.addPath(ce,new DOMMatrix([Math.cos(de)*oe,Math.sin(de)*oe,-Math.sin(de)*ae,Math.cos(de)*ae,U,K])),re}function L(v){if(!s)throw new Error("path confetti are not supported in this browser");var y,U;typeof v=="string"?y=v:(y=v.path,U=v.matrix);var K=new Path2D(y),oe=document.createElement("canvas"),ae=oe.getContext("2d");if(!U){for(var de=1e3,ee=de,ce=de,re=0,he=0,le,me,ge=0;ge<de;ge+=2)for(var _e=0;_e<de;_e+=2)ae.isPointInPath(K,ge,_e,"nonzero")&&(ee=Math.min(ee,ge),ce=Math.min(ce,_e),re=Math.max(re,ge),he=Math.max(he,_e));le=re-ee,me=he-ce;var p=10,a=Math.min(p/le,p/me);U=[a,0,0,a,-Math.round(le/2+ee)*a,-Math.round(me/2+ce)*a]}return{type:"path",path:y,matrix:U}}function M(v){var y,U=1,K="#000000",oe='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof v=="string"?y=v:(y=v.text,U="scalar"in v?v.scalar:U,oe="fontFamily"in v?v.fontFamily:oe,K="color"in v?v.color:K);var ae=10*U,de=""+ae+"px "+oe,ee=new OffscreenCanvas(ae,ae),ce=ee.getContext("2d");ce.font=de;var re=ce.measureText(y),he=Math.ceil(re.actualBoundingBoxRight+re.actualBoundingBoxLeft),le=Math.ceil(re.actualBoundingBoxAscent+re.actualBoundingBoxDescent),me=2,ge=re.actualBoundingBoxLeft+me,_e=re.actualBoundingBoxAscent+me;he+=me+me,le+=me+me,ee=new OffscreenCanvas(he,le),ce=ee.getContext("2d"),ce.font=de,ce.fillStyle=K,ce.fillText(y,ge,_e);var p=1/U;return{type:"bitmap",bitmap:ee.transferToImageBitmap(),matrix:[p,0,0,p,-he*p/2,-le*p/2]}}n.exports=function(){return D().apply(this,arguments)},n.exports.reset=function(){D().reset()},n.exports.create=Ke,n.exports.shapeFromPath=L,n.exports.shapeFromText=M})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),dc,!1);var tf=dc.exports,BO=dc.exports.create;var Wo=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let n=[],r=Date.now()+2e3,i=()=>{n.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<r&&e>0&&(requestAnimationFrame(i),e--)};i(),await Promise.all(n)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await tf(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var j_=(t,e)=>e.minValue;function $_(t,e){if(t&1&&(yt(0,"div",7),tt(1,"safeHtml")),t&2){let n=z().$implicit;Dt("innerHTML",lt(1,1,n.minValue+" Products"),Ct)}}function G_(t,e){if(t&1&&(yt(0,"div",7),tt(1,"cooeeCurrency"),tt(2,"safeHtml")),t&2){let n=z().$implicit;Dt("innerHTML",lt(2,3,lt(1,1,n.minValue)),Ct)}}function W_(t,e){if(t&1&&(ct(0,"li",6)(1,"div"),Se(2,$_,2,3,"div",7)(3,G_,3,5,"div",7),yt(4,"img",8),ct(5,"div",9),De(6),vt()()()),t&2){let n=e.$implicit,r=z(2);ii("left",n.calculatedAlignment+"%"),V(2),Te((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),V(2),Dt("src",r.getIconURL(n),dt),V(2),dn(n.label)}}function Y_(t,e){if(t&1&&(yt(0,"div",0),tt(1,"cooeeDynamicVariables"),tt(2,"safeHtml"),ct(3,"div",1)(4,"ul",2)(5,"div",3),yt(6,"div",4),vt(),st(7,W_,7,5,"li",5,j_),vt()()),t&2){let n=z(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;Dt("innerHTML",lt(2,6,Dl(1,3,i,n.localDynamicVariables())),Ct),V(6),ii("width",r.cartValuePercentage+"%"),V(),at(r.milestones)}}var Yo=class t extends Qt{cart;localDynamicVariables=wt({});calculatedState=wt({});progressBarConfig;RewardBasis=js;constructor(){super()}engagementTriggerReceived(e){this.progressBarConfig=e.progressBarConfig}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently()}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===ci.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===ci.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===ci.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>ze.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){ze.warn("Milestones not available in progress bar config",e);return}let r=await this.cart.getNormalisedCart(),i=n.milestones.at(-1),o=n?.reachedAmountOrCount??r.originalAmount,s=n.totalProgress??0;ze.verbose("Cart value:",o,`, percentage: ${s}%`),this.celebrate(e,o);let l={milestonesReady:!0,cartValuePercentage:s,milestones:n.milestones},u=n.milestones.find(d=>!d.reached);if(u){let d=kn(u.minValue-o);if(n.rewardBasis==="ITEM_COUNT"){let _=u.minValue-o;d=`${_} ${_===1?"product":"products"}`}this.localDynamicVariables.set({amount_left:d}),l.nextMilestone=u,this.calculatedState.set(l);return}l.lastMilestone=i,this.calculatedState.set(l)}celebrate(e,n){let o=[...e.progressBarConfig.milestones].reverse().find(u=>u.minValue<n);if(!o)return;let s=`lc/en/${e.shortID}/${o.minValue}`;sessionStorage.getItem(s)||(sessionStorage.setItem(s,"1"),this.progressBarConfig?.noConfetti||Wo.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Pe({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[St],decls:1,vars:1,consts:[[1,"heading",3,"innerHTML"],[1,"milestone-container"],[1,"milestone-list"],[1,"untracked-path"],[1,"tracked-path"],[1,"milestone-list-item",3,"left"],[1,"milestone-list-item"],[1,"milestone-value",3,"innerHTML"],["width","20","height","20","alt","milestone icon",1,"milestone-icon",3,"src"],[1,"milestone-label"]],template:function(n,r){n&1&&Se(0,Y_,9,8),n&2&&Te(r.calculatedState().milestonesReady?0:-1)},dependencies:[Go,Gn,wn],styles:[`:host{display:block;padding:10px;background:linear-gradient(0deg,rgba(var(--lc-color-primary),.1) 0%,transparent 100%)}.milestone-container{width:95%;margin:8px 0}.heading{font-weight:500;text-align:center;font-size:12px}.milestone-list{display:flex;align-items:center;position:relative;font-size:10px;font-weight:500}.untracked-path{width:100%;background-color:#e5e7eb;height:4px;position:absolute}.tracked-path{background-color:rgb(var(--lc-color-primary));height:100%;display:block;transition:width .5s ease-in-out}.milestone-list{padding:0;margin:0}.milestone-list-item{position:relative;display:flex;flex-direction:column;align-items:center;height:75px}.milestone-list-item>div{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:absolute;height:100%;width:100px}.milestone-icon{padding:5px;border-radius:1000px;background-color:rgb(var(--lc-color-primary))}
27
27
  `],encapsulation:3})};var z_=["numberVariable"],zo=class t extends Qt{numberSlot;savingsBarConfig;textParts=wt({start:"",end:""});globalIntervals=[];constructor(){super()}ngAfterViewInit(){this.updateUIVars()}engagementTriggerReceived(e){this.savingsBarConfig=e.content.savingsBarConfig,this.elementRef.nativeElement.classList.add("lc_"+e.entryAnimation?.toLowerCase()),this.savingsBarConfig.iconURL&&this.elementRef.nativeElement.style.setProperty("--lc-discount-icon",this.savingsBarConfig.iconURL)}update(){this.updateUIVars()}updateUIVars(){let e=x(x({},this.engagementTrigger.getCartMagicVariables()),uc("total_savings",this.savingsBarConfig.totalSavings)),n=Fr(this.savingsBarConfig.text,{cart:e},this.triggerContext),r=n.match(/[\d.,]+/)?.[0];if(!r){ze.error("No amount found in text",n);return}let[i,o]=n.split(r);this.textParts.set({start:i,end:o}),this.savingsBarConfig.animateNumber?this.runAnimation(r):this.numberSlot.nativeElement.innerHTML=r}runSlotMachineAnimation(e="0"){let n=this.numberSlot.nativeElement;n.innerHTML="";let r=this.savingsBarConfig.animationDuration/e.length;this.clearPreviousIntervals();for(let i=0;i<e.length;i++){let o=document.createElement("div");o.className="digit",o.style.display="inline-block",n.appendChild(o);let s=setInterval(()=>{let l=Math.floor(Math.random()*10);o.innerHTML=`<div>${l}</div>`},50);this.globalIntervals.push(s),setTimeout(()=>{clearInterval(s);let l=e?.[i]??Math.floor(Math.random()*10);o.innerHTML=`${l}`},(i+1)*r)}}clearPreviousIntervals(){this.globalIntervals.forEach(clearInterval),this.globalIntervals=[]}runIncrementalAnimation(e){let n=performance.now(),r=i=>{let o=Math.min((i-n)/this.savingsBarConfig.animationDuration,1);this.numberSlot.nativeElement.innerHTML=Math.floor(e*o).toString(),o<1&&requestAnimationFrame(r)};requestAnimationFrame(r)}runAnimation(e){this.savingsBarConfig.animation==="SLOT_MACHINE"?this.runSlotMachineAnimation(e):this.savingsBarConfig.animation==="INCREMENTAL"&&this.runIncrementalAnimation(Number(e))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Pe({type:t,selectors:[["cooee-savings-bar"]],viewQuery:function(n,r){if(n&1&&xn(z_,5),n&2){let i;On(i=Dn())&&(r.numberSlot=i.first)}},features:[St],decls:6,vars:2,consts:[["numberVariable",""],[1,"container"],[1,"icon"],[1,"primary-text",3,"innerHTML"],[1,"counter-text"],[1,"final-text",3,"innerHTML"]],template:function(n,r){n&1&&(ct(0,"div",1),yt(1,"div",2)(2,"div",3)(3,"div",4,0)(5,"div",5),vt()),n&2&&(V(2),Dt("innerHTML",r.textParts().start,Ct),V(3),Dt("innerHTML",r.textParts().end,Ct))},styles:[`:host{display:block}.container{white-space:pre;display:flex;justify-content:center;align-items:center;background-color:rgb(var(--lc-color-button, 0 162 81));color:rgb(var(--lc-color-button-text, 255 255 255));padding:8px;border-radius:4px 4px 0 0;overflow:hidden}.container .icon{background-image:var(--lc-discount-icon, url(https://img.icons8.com/ios-glyphs/30/FFFFFF/discount--v1.png));background-position:center;background-size:cover;height:20px;width:20px;margin-right:2px}
28
28
  `],encapsulation:3})};var q_=(t,e)=>({enter:t,exit:e});function K_(t,e){if(t&1&&(X(0,"div",7),De(1),Z(),X(2,"div",8),De(3),Z()),t&2){let n=z(2);V(),At(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),V(2),At(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function X_(t,e){if(t&1&&(X(0,"div",6),De(1),Z()),t&2){let n=z(2);V(),At(" ",n.stickyATCConfig.leftText," ")}}function J_(t,e){if(t&1&&(X(0,"div",1)(1,"div",5),De(2),Z(),Se(3,K_,4,2),Se(4,X_,2,1,"div",6),Z()),t&2){let n=z();V(2),At(" ",n.getCurrency(n.selectedVariant().price.d)," "),V(),Te(n.selectedVariant().price.cmp?3:-1),V(),Te(n.stickyATCConfig.leftText?4:-1)}}function Z_(t,e){if(t&1&&(X(0,"div",9),De(1),Z()),t&2){let n=e.$implicit,r=e.$index;z(2);let i=Je(5);Oe("ngClass",Ki(2,q_,r===i.currentIndex,r===i.previousIndex)),V(),At(" ",n," ")}}function Q_(t,e){if(t&1&&(X(0,"div",4),st(1,Z_,2,5,"div",9,In),Z()),t&2){z();let n=Je(5);V(),at(n.features)}}var qo=class t extends Qt{currentItem;stickyATCConfig;selectedVariant=wt(void 0);featureSlider=wt({features:[],currentIndex:0});constructor(){super()}engagementTriggerReceived(e){this.stickyATCConfig=e.stickyATCConfig??{},this.currentItem=e.items[0],this.selectedVariant.set(this.currentItem.vars[0]),this.stickyATCConfig.leftText=this.replaceVariables(this.stickyATCConfig.leftText),this.stickyATCConfig.rightText=this.replaceVariables(this.stickyATCConfig.rightText),this.startFeatureRotation()}update(){}getCurrency(e){return kn(e)}getDiscountPercentage(e){return((e.cmp-e.d)/e.cmp*100).toFixed(0)}async addToCart(){this.executeCTAViaRenderer({clickAction:{at:102},item:this.currentItem})}startFeatureRotation(){if(!this.stickyATCConfig.rightText)return;let e=this.stickyATCConfig.rightText.split(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@letscooee/web-sdk",
3
3
  "description": "Engage uniquely and boost conversions with AI-powered customer journeys driven by real-time intent",
4
- "version": "10.0.0",
4
+ "version": "10.0.1",
5
5
  "scripts": {
6
6
  "lint": "ng lint",
7
7
  "integrity": "./scripts/validate-integrity.sh",
@@ -90,7 +90,7 @@
90
90
  "fetch-retry": "^6.0.0",
91
91
  "hex-rgb": "^5.0.0",
92
92
  "hex-to-rgba": "^2.0.1",
93
- "isbot": "^5.1.28",
93
+ "isbot": "^5.1.30",
94
94
  "js-logger": "^1.6.1",
95
95
  "lightningcss-linux-x64-gnu": "^1.30.1",
96
96
  "localforage": "^1.10.0",