@letscooee/web-sdk 9.5.1 → 9.5.2

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.
@@ -1,56 +1,56 @@
1
- var Tx=Object.create;var sh=Object.defineProperty,xx=Object.defineProperties,Nx=Object.getOwnPropertyDescriptor,Rx=Object.getOwnPropertyDescriptors,Ax=Object.getOwnPropertyNames,G_=Object.getOwnPropertySymbols,Mx=Object.getPrototypeOf,q_=Object.prototype.hasOwnProperty,Ox=Object.prototype.propertyIsEnumerable;var z_=(t,e,n)=>e in t?sh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,w=(t,e)=>{for(var n in e||={})q_.call(e,n)&&z_(t,n,e[n]);if(G_)for(var n of G_(e))Ox.call(e,n)&&z_(t,n,e[n]);return t},ne=(t,e)=>xx(t,Rx(e));var ac=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Bn=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Px=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ax(e))!q_.call(t,i)&&i!==n&&sh(t,i,{get:()=>e[i],enumerable:!(r=Nx(e,i))||r.enumerable});return t};var Pe=(t,e,n)=>(n=t!=null?Tx(Mx(t)):{},Px(e||!t||!t.__esModule?sh(n,"default",{value:t,enumerable:!0}):n,t));var $o=Bn((D0,wd)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(l,u){return function(){return u.apply(l,arguments)}},o=function(){var l=arguments,u=l[0],d,m;for(m=1;m<l.length;m++)for(d in l[m])!(d in u)&&l[m].hasOwnProperty(d)&&(u[d]=l[m][d]);return u},s=function(l,u){return{value:l,name:u}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var a=function(l){this.context=l,this.setLevel(l.filterLevel),this.log=this.info};a.prototype={setLevel:function(l){l&&"value"in l&&(this.context.filterLevel=l)},getLevel:function(){return this.context.filterLevel},enabledFor:function(l){var u=this.context.filterLevel;return l.value>=u.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(l){typeof l=="string"&&l.length>0&&this.invoke(e.TIME,[l,"start"])},timeEnd:function(l){typeof l=="string"&&l.length>0&&this.invoke(e.TIME,[l,"end"])},invoke:function(l,u){n&&this.enabledFor(l)&&n(u,o({level:l},this.context))}};var c=new a({filterLevel:e.OFF});(function(){var l=e;l.enabledFor=i(c,c.enabledFor),l.trace=i(c,c.trace),l.debug=i(c,c.debug),l.time=i(c,c.time),l.timeEnd=i(c,c.timeEnd),l.info=i(c,c.info),l.warn=i(c,c.warn),l.error=i(c,c.error),l.log=l.info})(),e.setHandler=function(l){n=l},e.setLevel=function(l){c.setLevel(l);for(var u in r)r.hasOwnProperty(u)&&r[u].setLevel(l)},e.getLevel=function(){return c.getLevel()},e.get=function(l){return r[l]||(r[l]=new a(o({name:l},c.context)))},e.createDefaultHandler=function(l){l=l||{},l.formatter=l.formatter||function(h,v){v.name&&h.unshift("["+v.name+"]")};var u={},d=function(m,h){Function.prototype.apply.call(m,console,h)};return typeof console>"u"?function(){}:function(m,h){m=Array.prototype.slice.call(m);var v=console.log,N;h.level===e.TIME?(N=(h.name?"["+h.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(N):u[N]=new Date().getTime():console.timeEnd?console.timeEnd(N):d(v,[N+": "+(new Date().getTime()-u[N])+"ms"])):(h.level===e.WARN&&console.warn?v=console.warn:h.level===e.ERROR&&console.error?v=console.error:h.level===e.INFO&&console.info?v=console.info:h.level===e.DEBUG&&console.debug?v=console.debug:h.level===e.TRACE&&console.trace&&(v=console.trace),l.formatter(m,h),d(v,m))}},e.useDefaults=function(l){e.setLevel(l&&l.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(l))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof wd<"u"&&wd.exports?wd.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(D0)});var Yn=Bn(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.MilestoneRewardType=ee.ProgressBarLayout=ee.EngagementContentSource=ee.EngagementObjective=ee.OnsiteDeliveryType=ee.ClickActionType=ee.FrequencyGapUnit=ee.FrequencyType=ee.RedirectBehaviour=ee.EngagementPlacementPosition=ee.EngagementCollectionSource=ee.PromotionType=ee.CartFilterEnum=ee.CartCurrencyOperator=ee.CartCriteria=ee.URLCriteria=ee.UTMCriteria=ee.CartItemSource=ee.EngagementItemSource=ee.PurchasedVisitor=ee.LoggedInVisitor=ee.VisitorType=ee.SessionType=ee.EngagementContentType=ee.TriggerType=ee.EngagementType=ee.EngagementStatus=ee.TimePreference=ee.ScheduleFrequency=ee.CriteriaFrequency=void 0;var N0=function(t){return t[t.ONCE_PER_USER=1]="ONCE_PER_USER",t[t.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",t[t.EVERY_TIME=3]="EVERY_TIME",t}(N0||(ee.CriteriaFrequency=N0={})),R0=function(t){return t[t.ONE_TIME=1]="ONE_TIME",t[t.MULTIPLE=2]="MULTIPLE",t[t.RECURRING=3]="RECURRING",t}(R0||(ee.ScheduleFrequency=R0={})),A0=function(t){return t[t.NOW=1]="NOW",t[t.LATER=2]="LATER",t[t.NEVER=3]="NEVER",t}(A0||(ee.TimePreference=A0={})),M0=function(t){return t[t.PUBLISHED=1]="PUBLISHED",t[t.DRAFT=2]="DRAFT",t[t.PAUSED=3]="PAUSED",t[t.FAILED=4]="FAILED",t[t.STOPPED=5]="STOPPED",t[t.COMPLETED=6]="COMPLETED",t[t.ARCHIVED=7]="ARCHIVED",t[t.UNINSTALLED=8]="UNINSTALLED",t}(M0||(ee.EngagementStatus=M0={})),O0=function(t){return t[t.POPUP=1]="POPUP",t[t.LEAD_GENERATION=2]="LEAD_GENERATION",t[t.PRODUCT_WIDGET=3]="PRODUCT_WIDGET",t[t.PRODUCT_BUNDLE=4]="PRODUCT_BUNDLE",t[t.ANNOUNCEMENT_BAR=5]="ANNOUNCEMENT_BAR",t[t.CART_REMINDER=6]="CART_REMINDER",t[t.CRO_COPILOT=10]="CRO_COPILOT",t[t.OTHER=11]="OTHER",t}(O0||(ee.EngagementType=O0={})),P0=function(t){return t[t.NONE=0]="NONE",t[t.RULE_BASED=1]="RULE_BASED",t[t.INTENT_BASED=2]="INTENT_BASED",t}(P0||(ee.TriggerType=P0={})),k0=function(t){return t[t.SINGLE=1]="SINGLE",t[t.EXCLUSION=2]="EXCLUSION",t[t.ABTESTING=3]="ABTESTING",t}(k0||(ee.EngagementContentType=k0={})),L0=function(t){return t[t.ALL=0]="ALL",t[t.NEW_ONLY=1]="NEW_ONLY",t[t.RETURNING_ONLY=2]="RETURNING_ONLY",t}(L0||(ee.SessionType=L0={})),F0=function(t){return t[t.ALL=0]="ALL",t[t.LOGGED_IN_ONLY=3]="LOGGED_IN_ONLY",t[t.NON_LOGGED_IN_ONLY=4]="NON_LOGGED_IN_ONLY",t[t.PURCHASED=5]="PURCHASED",t[t.NON_PURCHASED=6]="NON_PURCHASED",t[t.ABANDON_CART=7]="ABANDON_CART",t[t.RETURNING_AND_NON_PURCHASED=8]="RETURNING_AND_NON_PURCHASED",t}(F0||(ee.VisitorType=F0={})),B0=function(t){return t.ALL="ALL",t.LOGGED_IN="LOGGED_IN",t.NON_LOGGED_IN="NON_LOGGED_IN",t}(B0||(ee.LoggedInVisitor=B0={})),V0=function(t){return t.ALL="ALL",t.PURCHASED="PURCHASED",t.NON_PURCHASED="NON_PURCHASED",t}(V0||(ee.PurchasedVisitor=V0={})),U0=function(t){return t[t.NONE=0]="NONE",t[t.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",t[t.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",t[t.SINGLE_ITEM=3]="SINGLE_ITEM",t[t.TOP_SELLING=4]="TOP_SELLING",t[t.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",t[t.NEW_ARRIVALS=6]="NEW_ARRIVALS",t[t.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",t[t.EVENT_ITEM=8]="EVENT_ITEM",t[t.CART_ITEM=9]="CART_ITEM",t[t.BUNDLE=10]="BUNDLE",t[t.CURRENT_ITEM=11]="CURRENT_ITEM",t[t.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",t[t.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",t[t.TRENDING_ITEMS=14]="TRENDING_ITEMS",t}(U0||(ee.EngagementItemSource=U0={})),j0=function(t){return t[t.LAST_ADDED=1]="LAST_ADDED",t[t.FIRST_ADDED=2]="FIRST_ADDED",t[t.HIGHEST_PRICE=3]="HIGHEST_PRICE",t[t.LOWEST_PRICE=4]="LOWEST_PRICE",t[t.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",t[t.ALL=6]="ALL",t}(j0||(ee.CartItemSource=j0={})),H0=function(t){return t[t.ALL=0]="ALL",t[t.ONLY_ORGANIC=1]="ONLY_ORGANIC",t[t.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",t[t.INCLUDES=3]="INCLUDES",t[t.EXCLUDES=4]="EXCLUDES",t}(H0||(ee.UTMCriteria=H0={})),$0=function(t){return t[t.NONE=0]="NONE",t[t.LIKE=1]="LIKE",t[t.NOT_LIKE=2]="NOT_LIKE",t[t.EQUALS=3]="EQUALS",t[t.NOT_EQUALS=4]="NOT_EQUALS",t}($0||(ee.URLCriteria=$0={})),W0=function(t){return t[t.NONE=0]="NONE",t[t.LESS_THAN=1]="LESS_THAN",t[t.GREATER_THAN=2]="GREATER_THAN",t[t.BETWEEN=3]="BETWEEN",t[t.EQUALS=4]="EQUALS",t}(W0||(ee.CartCriteria=W0={})),G0=function(t){return t[t.ALL=0]="ALL",t[t.INCLUDES=1]="INCLUDES",t[t.EXCLUDES=2]="EXCLUDES",t}(G0||(ee.CartCurrencyOperator=G0={})),z0=function(t){return t[t.NONE=0]="NONE",t[t.AMOUNT=1]="AMOUNT",t[t.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",t[t.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",t}(z0||(ee.CartFilterEnum=z0={})),q0=function(t){return t[t.NONE=0]="NONE",t[t.ITEM=1]="ITEM",t[t.COLLECTION=2]="COLLECTION",t}(q0||(ee.PromotionType=q0={})),Y0=function(t){return t[t.NONE=0]="NONE",t[t.SINGLE=1]="SINGLE",t[t.MULTIPLE=2]="MULTIPLE",t}(Y0||(ee.EngagementCollectionSource=Y0={})),K0=function(t){return t.BEFORE="before",t.AFTER="after",t.INSIDE_FIRST="insideFirst",t.INSIDE_LAST="insideLast",t}(K0||(ee.EngagementPlacementPosition=K0={})),Z0=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}(Z0||(ee.RedirectBehaviour=Z0={})),X0=function(t){return t.ONCE_IN_SESSION="ONCE_IN_SESSION",t.ACROSS_SESSIONS="ACROSS_SESSIONS",t}(X0||(ee.FrequencyType=X0={})),J0=function(t){return t.DAYS="DAYS",t.HOURS="HOURS",t.MINUTES="MINUTES",t.SECONDS="SECONDS",t}(J0||(ee.FrequencyGapUnit=J0={})),Q0=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}(Q0||(ee.ClickActionType=Q0={})),eS=function(t){return t.POPUP="POPUP",t.PAGE_EMBED="PAGE_EMBED",t.CART_EMBED="CART_EMBED",t.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",t}(eS||(ee.OnsiteDeliveryType=eS={})),tS=function(t){return t.PRODUCT_PROMOTION="PRODUCT_PROMOTION",t.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",t.CART_RECOVERY="CART_RECOVERY",t.ANNOUNCEMENT="ANNOUNCEMENT",t.LEAD_GENERATION="LEAD_GENERATION",t.DATA_COLLECTION="DATA_COLLECTION",t.SALE_PROMOTION="SALE_PROMOTION",t.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",t.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",t.BYOB="BYOB",t.PROGRESS_BAR="PROGRESS_BAR",t.BUY_NOW="BUY_NOW",t}(tS||(ee.EngagementObjective=tS={})),nS=function(t){return t.COOEE="COOEE",t.KLAVIYO="KLAVIYO",t}(nS||(ee.EngagementContentSource=nS={})),rS=function(t){return t.ICONS="ICONS",t.TILES="TILES",t}(rS||(ee.ProgressBarLayout=rS={})),iS=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}(iS||(ee.MilestoneRewardType=iS={}))});var ea=Bn(Qs=>{"use strict";var IP=Qs&&Qs.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(d){s(d)}}function c(u){try{l(r.throw(u))}catch(d){s(d)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.JSUtils=void 0;var Cd=class{static isObject(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}static parseToAny(e){try{return JSON.parse(e.toString())}catch{}return e.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(e.toString()):e}static sleep(e){return IP(this,void 0,void 0,function*(){return new Promise(n=>setTimeout(n,e))})}static hasKeys(e){return e?Object.keys(e).length>=1:!1}static convertObjectToArray(e,n){return n.reduce((r,i)=>(e.hasOwnProperty(i)&&e[i]!=null&&r.push({[i]:e[i]}),r),[])}static removeNullUndefinedKeys(e){return Object.keys(e).reduce((n,r)=>(e[r]!==null&&e[r]!==void 0&&(n[r]=e[r]),n),{})}static stringify(e){return JSON.stringify(e,function(n,r){return r===void 0?null:r})}};Qs.JSUtils=Cd;Cd.ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)});var sS=Bn((oS,Zg)=>{"use strict";(function(t){if(typeof oS=="object"&&typeof Zg<"u")Zg.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function a(u,d){if(!o[u]){if(!i[u]){var m=typeof ac=="function"&&ac;if(!d&&m)return m(u,!0);if(c)return c(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var v=o[u]={exports:{}};i[u][0].call(v.exports,function(N){var M=i[u][1][N];return a(M||N)},v,v.exports,r,i,o,s)}return o[u].exports}for(var c=typeof ac=="function"&&ac,l=0;l<s.length;l++)a(s[l]);return a}({1:[function(r,i,o){(function(s){"use strict";var a=s.MutationObserver||s.WebKitMutationObserver,c;if(a){var l=0,u=new a(N),d=s.document.createTextNode("");u.observe(d,{characterData:!0}),c=function(){d.data=l=++l%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var m=new s.MessageChannel;m.port1.onmessage=N,c=function(){m.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?c=function(){var A=s.document.createElement("script");A.onreadystatechange=function(){N(),A.onreadystatechange=null,A.parentNode.removeChild(A),A=null},s.document.documentElement.appendChild(A)}:c=function(){setTimeout(N,0)};var h,v=[];function N(){h=!0;for(var A,O,L=v.length;L;){for(O=v,v=[],A=-1;++A<L;)O[A]();L=v.length}h=!1}i.exports=M;function M(A){v.push(A)===1&&!h&&c()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function a(){}var c={},l=["REJECTED"],u=["FULFILLED"],d=["PENDING"];i.exports=m;function m(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,j!==a&&M(this,j)}m.prototype.catch=function(j){return this.then(null,j)},m.prototype.then=function(j,fe){if(typeof j!="function"&&this.state===u||typeof fe!="function"&&this.state===l)return this;var J=new this.constructor(a);if(this.state!==d){var be=this.state===u?j:fe;v(J,be,this.outcome)}else this.queue.push(new h(J,j,fe));return J};function h(j,fe,J){this.promise=j,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof J=="function"&&(this.onRejected=J,this.callRejected=this.otherCallRejected)}h.prototype.callFulfilled=function(j){c.resolve(this.promise,j)},h.prototype.otherCallFulfilled=function(j){v(this.promise,this.onFulfilled,j)},h.prototype.callRejected=function(j){c.reject(this.promise,j)},h.prototype.otherCallRejected=function(j){v(this.promise,this.onRejected,j)};function v(j,fe,J){s(function(){var be;try{be=fe(J)}catch(it){return c.reject(j,it)}be===j?c.reject(j,new TypeError("Cannot resolve promise with itself")):c.resolve(j,be)})}c.resolve=function(j,fe){var J=A(N,fe);if(J.status==="error")return c.reject(j,J.value);var be=J.value;if(be)M(j,be);else{j.state=u,j.outcome=fe;for(var it=-1,He=j.queue.length;++it<He;)j.queue[it].callFulfilled(fe)}return j},c.reject=function(j,fe){j.state=l,j.outcome=fe;for(var J=-1,be=j.queue.length;++J<be;)j.queue[J].callRejected(fe);return j};function N(j){var fe=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof fe=="function")return function(){fe.apply(j,arguments)}}function M(j,fe){var J=!1;function be(Rt){J||(J=!0,c.reject(j,Rt))}function it(Rt){J||(J=!0,c.resolve(j,Rt))}function He(){fe(it,be)}var et=A(He);et.status==="error"&&be(et.value)}function A(j,fe){var J={};try{J.value=j(fe),J.status="success"}catch(be){J.status="error",J.value=be}return J}m.resolve=O;function O(j){return j instanceof this?j:c.resolve(new this(a),j)}m.reject=L;function L(j){var fe=new this(a);return c.reject(fe,j)}m.all=G;function G(j){var fe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var J=j.length,be=!1;if(!J)return this.resolve([]);for(var it=new Array(J),He=0,et=-1,Rt=new this(a);++et<J;)wt(j[et],et);return Rt;function wt(Gt,gn){fe.resolve(Gt).then(tt,function(Tt){be||(be=!0,c.reject(Rt,Tt))});function tt(Tt){it[gn]=Tt,++He===J&&!be&&(be=!0,c.resolve(Rt,it))}}}m.race=we;function we(j){var fe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var J=j.length,be=!1;if(!J)return this.resolve([]);for(var it=-1,He=new this(a);++it<J;)et(j[it]);return He;function et(Rt){fe.resolve(Rt).then(function(wt){be||(be=!0,c.resolve(He,wt))},function(wt){be||(be=!0,c.reject(He,wt))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};function a(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}function c(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var l=c();function u(){try{if(!l||!l.open)return!1;var g=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!g||b)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function d(g,b){g=g||[],b=b||{};try{return new Blob(g,b)}catch(I){if(I.name!=="TypeError")throw I;for(var _=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,D=new _,R=0;R<g.length;R+=1)D.append(g[R]);return D.getBlob(b.type)}}typeof Promise>"u"&&r(3);var m=Promise;function h(g,b){b&&g.then(function(_){b(null,_)},function(_){b(_)})}function v(g,b,_){typeof b=="function"&&g.then(b),typeof _=="function"&&g.catch(_)}function N(g){return typeof g!="string"&&(console.warn(g+" used as a key, but it is not a string."),g=String(g)),g}function M(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var A="local-forage-detect-blob-support",O=void 0,L={},G=Object.prototype.toString,we="readonly",j="readwrite";function fe(g){for(var b=g.length,_=new ArrayBuffer(b),D=new Uint8Array(_),R=0;R<b;R++)D[R]=g.charCodeAt(R);return _}function J(g){return new m(function(b){var _=g.transaction(A,j),D=d([""]);_.objectStore(A).put(D,"key"),_.onabort=function(R){R.preventDefault(),R.stopPropagation(),b(!1)},_.oncomplete=function(){var R=navigator.userAgent.match(/Chrome\/(\d+)/),I=navigator.userAgent.match(/Edge\//);b(I||!R||parseInt(R[1],10)>=43)}}).catch(function(){return!1})}function be(g){return typeof O=="boolean"?m.resolve(O):J(g).then(function(b){return O=b,O})}function it(g){var b=L[g.name],_={};_.promise=new m(function(D,R){_.resolve=D,_.reject=R}),b.deferredOperations.push(_),b.dbReady?b.dbReady=b.dbReady.then(function(){return _.promise}):b.dbReady=_.promise}function He(g){var b=L[g.name],_=b.deferredOperations.pop();if(_)return _.resolve(),_.promise}function et(g,b){var _=L[g.name],D=_.deferredOperations.pop();if(D)return D.reject(b),D.promise}function Rt(g,b){return new m(function(_,D){if(L[g.name]=L[g.name]||se(),g.db)if(b)it(g),g.db.close();else return _(g.db);var R=[g.name];b&&R.push(g.version);var I=l.open.apply(l,R);b&&(I.onupgradeneeded=function(B){var U=I.result;try{U.createObjectStore(g.storeName),B.oldVersion<=1&&U.createObjectStore(A)}catch(H){if(H.name==="ConstraintError")console.warn('The database "'+g.name+'" has been upgraded from version '+B.oldVersion+" to version "+B.newVersion+', but the storage "'+g.storeName+'" already exists.');else throw H}}),I.onerror=function(B){B.preventDefault(),D(I.error)},I.onsuccess=function(){var B=I.result;B.onversionchange=function(U){U.target.close()},_(B),He(g)}})}function wt(g){return Rt(g,!1)}function Gt(g){return Rt(g,!0)}function gn(g,b){if(!g.db)return!0;var _=!g.db.objectStoreNames.contains(g.storeName),D=g.version<g.db.version,R=g.version>g.db.version;if(D&&(g.version!==b&&console.warn('The database "'+g.name+`" can't be downgraded from version `+g.db.version+" to version "+g.version+"."),g.version=g.db.version),R||_){if(_){var I=g.db.version+1;I>g.version&&(g.version=I)}return!0}return!1}function tt(g){return new m(function(b,_){var D=new FileReader;D.onerror=_,D.onloadend=function(R){var I=btoa(R.target.result||"");b({__local_forage_encoded_blob:!0,data:I,type:g.type})},D.readAsBinaryString(g)})}function Tt(g){var b=fe(atob(g.data));return d([b],{type:g.type})}function Te(g){return g&&g.__local_forage_encoded_blob}function T(g){var b=this,_=b._initReady().then(function(){var D=L[b._dbInfo.name];if(D&&D.dbReady)return D.dbReady});return v(_,g,g),_}function C(g){it(g);for(var b=L[g.name],_=b.forages,D=0;D<_.length;D++){var R=_[D];R._dbInfo.db&&(R._dbInfo.db.close(),R._dbInfo.db=null)}return g.db=null,wt(g).then(function(I){return g.db=I,gn(g)?Gt(g):I}).then(function(I){g.db=b.db=I;for(var B=0;B<_.length;B++)_[B]._dbInfo.db=I}).catch(function(I){throw et(g,I),I})}function Y(g,b,_,D){D===void 0&&(D=1);try{var R=g.db.transaction(g.storeName,b);_(null,R)}catch(I){if(D>0&&(!g.db||I.name==="InvalidStateError"||I.name==="NotFoundError"))return m.resolve().then(function(){if(!g.db||I.name==="NotFoundError"&&!g.db.objectStoreNames.contains(g.storeName)&&g.version<=g.db.version)return g.db&&(g.version=g.db.version+1),Gt(g)}).then(function(){return C(g).then(function(){Y(g,b,_,D-1)})}).catch(_);_(I)}}function se(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function pe(g){var b=this,_={db:null};if(g)for(var D in g)_[D]=g[D];var R=L[_.name];R||(R=se(),L[_.name]=R),R.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=T);var I=[];function B(){return m.resolve()}for(var U=0;U<R.forages.length;U++){var H=R.forages[U];H!==b&&I.push(H._initReady().catch(B))}var $=R.forages.slice(0);return m.all(I).then(function(){return _.db=R.db,wt(_)}).then(function(z){return _.db=z,gn(_,b._defaultConfig.version)?Gt(_):z}).then(function(z){_.db=R.db=z,b._dbInfo=_;for(var te=0;te<$.length;te++){var Oe=$[te];Oe!==b&&(Oe._dbInfo.db=_.db,Oe._dbInfo.version=_.version)}})}function he(g,b){var _=this;g=N(g);var D=new m(function(R,I){_.ready().then(function(){Y(_._dbInfo,we,function(B,U){if(B)return I(B);try{var H=U.objectStore(_._dbInfo.storeName),$=H.get(g);$.onsuccess=function(){var z=$.result;z===void 0&&(z=null),Te(z)&&(z=Tt(z)),R(z)},$.onerror=function(){I($.error)}}catch(z){I(z)}})}).catch(I)});return h(D,b),D}function _e(g,b){var _=this,D=new m(function(R,I){_.ready().then(function(){Y(_._dbInfo,we,function(B,U){if(B)return I(B);try{var H=U.objectStore(_._dbInfo.storeName),$=H.openCursor(),z=1;$.onsuccess=function(){var te=$.result;if(te){var Oe=te.value;Te(Oe)&&(Oe=Tt(Oe));var st=g(Oe,te.key,z++);st!==void 0?R(st):te.continue()}else R()},$.onerror=function(){I($.error)}}catch(te){I(te)}})}).catch(I)});return h(D,b),D}function ae(g,b,_){var D=this;g=N(g);var R=new m(function(I,B){var U;D.ready().then(function(){return U=D._dbInfo,G.call(b)==="[object Blob]"?be(U.db).then(function(H){return H?b:tt(b)}):b}).then(function(H){Y(D._dbInfo,j,function($,z){if($)return B($);try{var te=z.objectStore(D._dbInfo.storeName);H===null&&(H=void 0);var Oe=te.put(H,g);z.oncomplete=function(){H===void 0&&(H=null),I(H)},z.onabort=z.onerror=function(){var st=Oe.error?Oe.error:Oe.transaction.error;B(st)}}catch(st){B(st)}})}).catch(B)});return h(R,_),R}function Ee(g,b){var _=this;g=N(g);var D=new m(function(R,I){_.ready().then(function(){Y(_._dbInfo,j,function(B,U){if(B)return I(B);try{var H=U.objectStore(_._dbInfo.storeName),$=H.delete(g);U.oncomplete=function(){R()},U.onerror=function(){I($.error)},U.onabort=function(){var z=$.error?$.error:$.transaction.error;I(z)}}catch(z){I(z)}})}).catch(I)});return h(D,b),D}function Xe(g){var b=this,_=new m(function(D,R){b.ready().then(function(){Y(b._dbInfo,j,function(I,B){if(I)return R(I);try{var U=B.objectStore(b._dbInfo.storeName),H=U.clear();B.oncomplete=function(){D()},B.onabort=B.onerror=function(){var $=H.error?H.error:H.transaction.error;R($)}}catch($){R($)}})}).catch(R)});return h(_,g),_}function lt(g){var b=this,_=new m(function(D,R){b.ready().then(function(){Y(b._dbInfo,we,function(I,B){if(I)return R(I);try{var U=B.objectStore(b._dbInfo.storeName),H=U.count();H.onsuccess=function(){D(H.result)},H.onerror=function(){R(H.error)}}catch($){R($)}})}).catch(R)});return h(_,g),_}function Fe(g,b){var _=this,D=new m(function(R,I){if(g<0){R(null);return}_.ready().then(function(){Y(_._dbInfo,we,function(B,U){if(B)return I(B);try{var H=U.objectStore(_._dbInfo.storeName),$=!1,z=H.openKeyCursor();z.onsuccess=function(){var te=z.result;if(!te){R(null);return}g===0||$?R(te.key):($=!0,te.advance(g))},z.onerror=function(){I(z.error)}}catch(te){I(te)}})}).catch(I)});return h(D,b),D}function Me(g){var b=this,_=new m(function(D,R){b.ready().then(function(){Y(b._dbInfo,we,function(I,B){if(I)return R(I);try{var U=B.objectStore(b._dbInfo.storeName),H=U.openKeyCursor(),$=[];H.onsuccess=function(){var z=H.result;if(!z){D($);return}$.push(z.key),z.continue()},H.onerror=function(){R(H.error)}}catch(z){R(z)}})}).catch(R)});return h(_,g),_}function ot(g,b){b=M.apply(this,arguments);var _=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||_.name,g.storeName=g.storeName||_.storeName);var D=this,R;if(!g.name)R=m.reject("Invalid arguments");else{var I=g.name===_.name&&D._dbInfo.db,B=I?m.resolve(D._dbInfo.db):wt(g).then(function(U){var H=L[g.name],$=H.forages;H.db=U;for(var z=0;z<$.length;z++)$[z]._dbInfo.db=U;return U});g.storeName?R=B.then(function(U){if(U.objectStoreNames.contains(g.storeName)){var H=U.version+1;it(g);var $=L[g.name],z=$.forages;U.close();for(var te=0;te<z.length;te++){var Oe=z[te];Oe._dbInfo.db=null,Oe._dbInfo.version=H}var st=new m(function(ut,zt){var Ft=l.open(g.name,H);Ft.onerror=function(nr){var sc=Ft.result;sc.close(),zt(nr)},Ft.onupgradeneeded=function(){var nr=Ft.result;nr.deleteObjectStore(g.storeName)},Ft.onsuccess=function(){var nr=Ft.result;nr.close(),ut(nr)}});return st.then(function(ut){$.db=ut;for(var zt=0;zt<z.length;zt++){var Ft=z[zt];Ft._dbInfo.db=ut,He(Ft._dbInfo)}}).catch(function(ut){throw(et(g,ut)||m.resolve()).catch(function(){}),ut})}}):R=B.then(function(U){it(g);var H=L[g.name],$=H.forages;U.close();for(var z=0;z<$.length;z++){var te=$[z];te._dbInfo.db=null}var Oe=new m(function(st,ut){var zt=l.deleteDatabase(g.name);zt.onerror=function(){var Ft=zt.result;Ft&&Ft.close(),ut(zt.error)},zt.onblocked=function(){console.warn('dropInstance blocked for database "'+g.name+'" until all open connections are closed')},zt.onsuccess=function(){var Ft=zt.result;Ft&&Ft.close(),st(Ft)}});return Oe.then(function(st){H.db=st;for(var ut=0;ut<$.length;ut++){var zt=$[ut];He(zt._dbInfo)}}).catch(function(st){throw(et(g,st)||m.resolve()).catch(function(){}),st})})}return h(R,b),R}var xe={_driver:"asyncStorage",_initStorage:pe,_support:u(),iterate:_e,getItem:he,setItem:ae,removeItem:Ee,clear:Xe,length:lt,key:Fe,keys:Me,dropInstance:ot};function y(){return typeof openDatabase=="function"}var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p="~~local_forage_type~",E=/^~~local_forage_type~([^~]+)~/,x="__lfsc__:",F=x.length,V="arbf",me="blob",Be="si08",K="ui08",le="uic8",q="si16",$e="si32",yn="ur16",Jt="ui32",We="fl32",ue="fl64",Rn=F+V.length,Bi=Object.prototype.toString;function ic(g){var b=g.length*.75,_=g.length,D,R=0,I,B,U,H;g[g.length-1]==="="&&(b--,g[g.length-2]==="="&&b--);var $=new ArrayBuffer(b),z=new Uint8Array($);for(D=0;D<_;D+=4)I=f.indexOf(g[D]),B=f.indexOf(g[D+1]),U=f.indexOf(g[D+2]),H=f.indexOf(g[D+3]),z[R++]=I<<2|B>>4,z[R++]=(B&15)<<4|U>>2,z[R++]=(U&3)<<6|H&63;return $}function eh(g){var b=new Uint8Array(g),_="",D;for(D=0;D<b.length;D+=3)_+=f[b[D]>>2],_+=f[(b[D]&3)<<4|b[D+1]>>4],_+=f[(b[D+1]&15)<<2|b[D+2]>>6],_+=f[b[D+2]&63];return b.length%3===2?_=_.substring(0,_.length-1)+"=":b.length%3===1&&(_=_.substring(0,_.length-2)+"=="),_}function $T(g,b){var _="";if(g&&(_=Bi.call(g)),g&&(_==="[object ArrayBuffer]"||g.buffer&&Bi.call(g.buffer)==="[object ArrayBuffer]")){var D,R=x;g instanceof ArrayBuffer?(D=g,R+=V):(D=g.buffer,_==="[object Int8Array]"?R+=Be:_==="[object Uint8Array]"?R+=K:_==="[object Uint8ClampedArray]"?R+=le:_==="[object Int16Array]"?R+=q:_==="[object Uint16Array]"?R+=yn:_==="[object Int32Array]"?R+=$e:_==="[object Uint32Array]"?R+=Jt:_==="[object Float32Array]"?R+=We:_==="[object Float64Array]"?R+=ue:b(new Error("Failed to get type for BinaryArray"))),b(R+eh(D))}else if(_==="[object Blob]"){var I=new FileReader;I.onload=function(){var B=p+g.type+"~"+eh(this.result);b(x+me+B)},I.readAsArrayBuffer(g)}else try{b(JSON.stringify(g))}catch(B){console.error("Couldn't convert value into a JSON string: ",g),b(null,B)}}function WT(g){if(g.substring(0,F)!==x)return JSON.parse(g);var b=g.substring(Rn),_=g.substring(F,Rn),D;if(_===me&&E.test(b)){var R=b.match(E);D=R[1],b=b.substring(R[0].length)}var I=ic(b);switch(_){case V:return I;case me:return d([I],{type:D});case Be:return new Int8Array(I);case K:return new Uint8Array(I);case le:return new Uint8ClampedArray(I);case q:return new Int16Array(I);case yn:return new Uint16Array(I);case $e:return new Int32Array(I);case Jt:return new Uint32Array(I);case We:return new Float32Array(I);case ue:return new Float64Array(I);default:throw new Error("Unkown type: "+_)}}var th={serialize:$T,deserialize:WT,stringToBuffer:ic,bufferToString:eh};function V_(g,b,_,D){g.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],_,D)}function GT(g){var b=this,_={db:null};if(g)for(var D in g)_[D]=typeof g[D]!="string"?g[D].toString():g[D];var R=new m(function(I,B){try{_.db=openDatabase(_.name,String(_.version),_.description,_.size)}catch(U){return B(U)}_.db.transaction(function(U){V_(U,_,function(){b._dbInfo=_,I()},function(H,$){B($)})},B)});return _.serializer=th,R}function Vi(g,b,_,D,R,I){g.executeSql(_,D,R,function(B,U){U.code===U.SYNTAX_ERR?B.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(H,$){$.rows.length?I(H,U):V_(H,b,function(){H.executeSql(_,D,R,I)},I)},I):I(B,U)},I)}function zT(g,b){var _=this;g=N(g);var D=new m(function(R,I){_.ready().then(function(){var B=_._dbInfo;B.db.transaction(function(U){Vi(U,B,"SELECT * FROM "+B.storeName+" WHERE key = ? LIMIT 1",[g],function(H,$){var z=$.rows.length?$.rows.item(0).value:null;z&&(z=B.serializer.deserialize(z)),R(z)},function(H,$){I($)})})}).catch(I)});return h(D,b),D}function qT(g,b){var _=this,D=new m(function(R,I){_.ready().then(function(){var B=_._dbInfo;B.db.transaction(function(U){Vi(U,B,"SELECT * FROM "+B.storeName,[],function(H,$){for(var z=$.rows,te=z.length,Oe=0;Oe<te;Oe++){var st=z.item(Oe),ut=st.value;if(ut&&(ut=B.serializer.deserialize(ut)),ut=g(ut,st.key,Oe+1),ut!==void 0){R(ut);return}}R()},function(H,$){I($)})})}).catch(I)});return h(D,b),D}function U_(g,b,_,D){var R=this;g=N(g);var I=new m(function(B,U){R.ready().then(function(){b===void 0&&(b=null);var H=b,$=R._dbInfo;$.serializer.serialize(b,function(z,te){te?U(te):$.db.transaction(function(Oe){Vi(Oe,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[g,z],function(){B(H)},function(st,ut){U(ut)})},function(Oe){if(Oe.code===Oe.QUOTA_ERR){if(D>0){B(U_.apply(R,[g,H,_,D-1]));return}U(Oe)}})})}).catch(U)});return h(I,_),I}function YT(g,b,_){return U_.apply(this,[g,b,_,1])}function KT(g,b){var _=this;g=N(g);var D=new m(function(R,I){_.ready().then(function(){var B=_._dbInfo;B.db.transaction(function(U){Vi(U,B,"DELETE FROM "+B.storeName+" WHERE key = ?",[g],function(){R()},function(H,$){I($)})})}).catch(I)});return h(D,b),D}function ZT(g){var b=this,_=new m(function(D,R){b.ready().then(function(){var I=b._dbInfo;I.db.transaction(function(B){Vi(B,I,"DELETE FROM "+I.storeName,[],function(){D()},function(U,H){R(H)})})}).catch(R)});return h(_,g),_}function XT(g){var b=this,_=new m(function(D,R){b.ready().then(function(){var I=b._dbInfo;I.db.transaction(function(B){Vi(B,I,"SELECT COUNT(key) as c FROM "+I.storeName,[],function(U,H){var $=H.rows.item(0).c;D($)},function(U,H){R(H)})})}).catch(R)});return h(_,g),_}function JT(g,b){var _=this,D=new m(function(R,I){_.ready().then(function(){var B=_._dbInfo;B.db.transaction(function(U){Vi(U,B,"SELECT key FROM "+B.storeName+" WHERE id = ? LIMIT 1",[g+1],function(H,$){var z=$.rows.length?$.rows.item(0).key:null;R(z)},function(H,$){I($)})})}).catch(I)});return h(D,b),D}function QT(g){var b=this,_=new m(function(D,R){b.ready().then(function(){var I=b._dbInfo;I.db.transaction(function(B){Vi(B,I,"SELECT key FROM "+I.storeName,[],function(U,H){for(var $=[],z=0;z<H.rows.length;z++)$.push(H.rows.item(z).key);D($)},function(U,H){R(H)})})}).catch(R)});return h(_,g),_}function ex(g){return new m(function(b,_){g.transaction(function(D){D.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(R,I){for(var B=[],U=0;U<I.rows.length;U++)B.push(I.rows.item(U).name);b({db:g,storeNames:B})},function(R,I){_(I)})},function(D){_(D)})})}function tx(g,b){b=M.apply(this,arguments);var _=this.config();g=typeof g!="function"&&g||{},g.name||(g.name=g.name||_.name,g.storeName=g.storeName||_.storeName);var D=this,R;return g.name?R=new m(function(I){var B;g.name===_.name?B=D._dbInfo.db:B=openDatabase(g.name,"","",0),g.storeName?I({db:B,storeNames:[g.storeName]}):I(ex(B))}).then(function(I){return new m(function(B,U){I.db.transaction(function(H){function $(st){return new m(function(ut,zt){H.executeSql("DROP TABLE IF EXISTS "+st,[],function(){ut()},function(Ft,nr){zt(nr)})})}for(var z=[],te=0,Oe=I.storeNames.length;te<Oe;te++)z.push($(I.storeNames[te]));m.all(z).then(function(){B()}).catch(function(st){U(st)})},function(H){U(H)})})}):R=m.reject("Invalid arguments"),h(R,b),R}var nx={_driver:"webSQLStorage",_initStorage:GT,_support:y(),iterate:qT,getItem:zT,setItem:YT,removeItem:KT,clear:ZT,length:XT,key:JT,keys:QT,dropInstance:tx};function rx(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function j_(g,b){var _=g.name+"/";return g.storeName!==b.storeName&&(_+=g.storeName+"/"),_}function ix(){var g="_localforage_support_test";try{return localStorage.setItem(g,!0),localStorage.removeItem(g),!1}catch{return!0}}function ox(){return!ix()||localStorage.length>0}function sx(g){var b=this,_={};if(g)for(var D in g)_[D]=g[D];return _.keyPrefix=j_(g,b._defaultConfig),ox()?(b._dbInfo=_,_.serializer=th,m.resolve()):m.reject()}function ax(g){var b=this,_=b.ready().then(function(){for(var D=b._dbInfo.keyPrefix,R=localStorage.length-1;R>=0;R--){var I=localStorage.key(R);I.indexOf(D)===0&&localStorage.removeItem(I)}});return h(_,g),_}function cx(g,b){var _=this;g=N(g);var D=_.ready().then(function(){var R=_._dbInfo,I=localStorage.getItem(R.keyPrefix+g);return I&&(I=R.serializer.deserialize(I)),I});return h(D,b),D}function lx(g,b){var _=this,D=_.ready().then(function(){for(var R=_._dbInfo,I=R.keyPrefix,B=I.length,U=localStorage.length,H=1,$=0;$<U;$++){var z=localStorage.key($);if(z.indexOf(I)===0){var te=localStorage.getItem(z);if(te&&(te=R.serializer.deserialize(te)),te=g(te,z.substring(B),H++),te!==void 0)return te}}});return h(D,b),D}function ux(g,b){var _=this,D=_.ready().then(function(){var R=_._dbInfo,I;try{I=localStorage.key(g)}catch{I=null}return I&&(I=I.substring(R.keyPrefix.length)),I});return h(D,b),D}function dx(g){var b=this,_=b.ready().then(function(){for(var D=b._dbInfo,R=localStorage.length,I=[],B=0;B<R;B++){var U=localStorage.key(B);U.indexOf(D.keyPrefix)===0&&I.push(U.substring(D.keyPrefix.length))}return I});return h(_,g),_}function fx(g){var b=this,_=b.keys().then(function(D){return D.length});return h(_,g),_}function px(g,b){var _=this;g=N(g);var D=_.ready().then(function(){var R=_._dbInfo;localStorage.removeItem(R.keyPrefix+g)});return h(D,b),D}function hx(g,b,_){var D=this;g=N(g);var R=D.ready().then(function(){b===void 0&&(b=null);var I=b;return new m(function(B,U){var H=D._dbInfo;H.serializer.serialize(b,function($,z){if(z)U(z);else try{localStorage.setItem(H.keyPrefix+g,$),B(I)}catch(te){(te.name==="QuotaExceededError"||te.name==="NS_ERROR_DOM_QUOTA_REACHED")&&U(te),U(te)}})})});return h(R,_),R}function mx(g,b){if(b=M.apply(this,arguments),g=typeof g!="function"&&g||{},!g.name){var _=this.config();g.name=g.name||_.name,g.storeName=g.storeName||_.storeName}var D=this,R;return g.name?R=new m(function(I){g.storeName?I(j_(g,D._defaultConfig)):I(g.name+"/")}).then(function(I){for(var B=localStorage.length-1;B>=0;B--){var U=localStorage.key(B);U.indexOf(I)===0&&localStorage.removeItem(U)}}):R=m.reject("Invalid arguments"),h(R,b),R}var gx={_driver:"localStorageWrapper",_initStorage:sx,_support:rx(),iterate:lx,getItem:cx,setItem:hx,removeItem:px,clear:ax,length:fx,key:ux,keys:dx,dropInstance:mx},yx=function(b,_){return b===_||typeof b=="number"&&typeof _=="number"&&isNaN(b)&&isNaN(_)},vx=function(b,_){for(var D=b.length,R=0;R<D;){if(yx(b[R],_))return!0;R++}return!1},H_=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"},oc={},$_={},_s={INDEXEDDB:xe,WEBSQL:nx,LOCALSTORAGE:gx},_x=[_s.INDEXEDDB._driver,_s.WEBSQL._driver,_s.LOCALSTORAGE._driver],Hl=["dropInstance"],nh=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Hl),Ex={description:"",driver:_x.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function wx(g,b){g[b]=function(){var _=arguments;return g.ready().then(function(){return g[b].apply(g,_)})}}function rh(){for(var g=1;g<arguments.length;g++){var b=arguments[g];if(b)for(var _ in b)b.hasOwnProperty(_)&&(H_(b[_])?arguments[0][_]=b[_].slice():arguments[0][_]=b[_])}return arguments[0]}var bx=function(){function g(b){a(this,g);for(var _ in _s)if(_s.hasOwnProperty(_)){var D=_s[_],R=D._driver;this[_]=R,oc[R]||this.defineDriver(D)}this._defaultConfig=rh({},Ex),this._config=rh({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return g.prototype.config=function(_){if((typeof _>"u"?"undefined":s(_))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var D in _){if(D==="storeName"&&(_[D]=_[D].replace(/\W/g,"_")),D==="version"&&typeof _[D]!="number")return new Error("Database version must be a number.");this._config[D]=_[D]}return"driver"in _&&_.driver?this.setDriver(this._config.driver):!0}else return typeof _=="string"?this._config[_]:this._config},g.prototype.defineDriver=function(_,D,R){var I=new m(function(B,U){try{var H=_._driver,$=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!_._driver){U($);return}for(var z=nh.concat("_initStorage"),te=0,Oe=z.length;te<Oe;te++){var st=z[te],ut=!vx(Hl,st);if((ut||_[st])&&typeof _[st]!="function"){U($);return}}var zt=function(){for(var sc=function(Ix){return function(){var Dx=new Error("Method "+Ix+" is not implemented by the current driver"),W_=m.reject(Dx);return h(W_,arguments[arguments.length-1]),W_}},ih=0,Sx=Hl.length;ih<Sx;ih++){var oh=Hl[ih];_[oh]||(_[oh]=sc(oh))}};zt();var Ft=function(sc){oc[H]&&console.info("Redefining LocalForage driver: "+H),oc[H]=_,$_[H]=sc,B()};"_support"in _?_._support&&typeof _._support=="function"?_._support().then(Ft,U):Ft(!!_._support):Ft(!0)}catch(nr){U(nr)}});return v(I,D,R),I},g.prototype.driver=function(){return this._driver||null},g.prototype.getDriver=function(_,D,R){var I=oc[_]?m.resolve(oc[_]):m.reject(new Error("Driver not found."));return v(I,D,R),I},g.prototype.getSerializer=function(_){var D=m.resolve(th);return v(D,_),D},g.prototype.ready=function(_){var D=this,R=D._driverSet.then(function(){return D._ready===null&&(D._ready=D._initDriver()),D._ready});return v(R,_,_),R},g.prototype.setDriver=function(_,D,R){var I=this;H_(_)||(_=[_]);var B=this._getSupportedDrivers(_);function U(){I._config.driver=I.driver()}function H(te){return I._extend(te),U(),I._ready=I._initStorage(I._config),I._ready}function $(te){return function(){var Oe=0;function st(){for(;Oe<te.length;){var ut=te[Oe];return Oe++,I._dbInfo=null,I._ready=null,I.getDriver(ut).then(H).catch(st)}U();var zt=new Error("No available storage method found.");return I._driverSet=m.reject(zt),I._driverSet}return st()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=z.then(function(){var te=B[0];return I._dbInfo=null,I._ready=null,I.getDriver(te).then(function(Oe){I._driver=Oe._driver,U(),I._wrapLibraryMethodsWithReady(),I._initDriver=$(B)})}).catch(function(){U();var te=new Error("No available storage method found.");return I._driverSet=m.reject(te),I._driverSet}),v(this._driverSet,D,R),this._driverSet},g.prototype.supports=function(_){return!!$_[_]},g.prototype._extend=function(_){rh(this,_)},g.prototype._getSupportedDrivers=function(_){for(var D=[],R=0,I=_.length;R<I;R++){var B=_[R];this.supports(B)&&D.push(B)}return D},g.prototype._wrapLibraryMethodsWithReady=function(){for(var _=0,D=nh.length;_<D;_++)wx(this,nh[_])},g.prototype.createInstance=function(_){return new g(_)},g}(),Cx=new bx;i.exports=Cx},{3:3}]},{},[4])(4)})});var lf=Bn(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.MustacheUtils=void 0;var af=class t{static escapeHtml(e){return String(e).replace(/"/g,n=>t.entityMap[n])}};cf.MustacheUtils=af;af.entityMap={'"':"&quot;"}});var Xv=Bn((Kv,Zv)=>{"use strict";(function(t,e){typeof Kv=="object"&&typeof Zv<"u"?Zv.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.fetchRetry=e())})(Kv,function(){"use strict";var t=function(r,i){if(i=i||{},typeof r!="function")throw new n("fetch must be a function");if(typeof i!="object")throw new n("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new n("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new n("retryOn property expects an array or function");var o={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(o,i),function(a,c){var l=i.retries,u=i.retryDelay,d=i.retryOn;if(c&&c.retries!==void 0)if(e(c.retries))l=c.retries;else throw new n("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(e(c.retryDelay)||typeof c.retryDelay=="function")u=c.retryDelay;else throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")d=c.retryOn;else throw new n("retryOn property expects an array or function");return new Promise(function(m,h){var v=function(M){var A=typeof Request<"u"&&a instanceof Request?a.clone():a;r(A,c).then(function(O){if(Array.isArray(d)&&d.indexOf(O.status)===-1)m(O);else if(typeof d=="function")try{return Promise.resolve(d(M,null,O)).then(function(L){L?N(M,null,O):m(O)}).catch(h)}catch(L){h(L)}else M<l?N(M,null,O):m(O)}).catch(function(O){if(typeof d=="function")try{Promise.resolve(d(M,O,null)).then(function(L){L?N(M,O,null):h(O)}).catch(function(L){h(L)})}catch(L){h(L)}else M<l?N(M,O,null):h(O)})};function N(M,A,O){var L=typeof u=="function"?u(M,A,O):u;setTimeout(function(){v(++M)},L)}v(0)})}};function e(r){return Number.isInteger(r)&&r>=0}function n(r){this.name="ArgumentError",this.message=r}return t})});var Mf=Bn(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.PriceRuleType=Na.DiscountType=void 0;var RD=function(t){return t[t.NONE=0]="NONE",t[t.STATIC=1]="STATIC",t[t.UNIQUE_FLAT=2]="UNIQUE_FLAT",t[t.UNIQUE_FLAT_ITEMS=3]="UNIQUE_FLAT_ITEMS",t[t.UNIQUE_FIXED_ITEMS=4]="UNIQUE_FIXED_ITEMS",t[t.UNIQUE_CHEAPEST_ITEM_FREE=5]="UNIQUE_CHEAPEST_ITEM_FREE",t[t.BXGY=6]="BXGY",t}(RD||(Na.DiscountType=RD={})),AD=function(t){return t.FIXED_AMOUNT="fixed_amount",t.PERCENTAGE="percentage",t}(AD||(Na.PriceRuleType=AD={}))});var Jv=Bn(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.URLBuilder=void 0;var f2=function(){function t(e){try{this.base=new URL(e),this.params=new URLSearchParams(this.base.search.slice(1))}catch(n){console.error("Un-parsable URL",n)}}return t.prototype.appendQueryParam=function(e,n){this.params.append(e,n?n.toString():"")},t.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},t.prototype.deleteQueryParam=function(e){this.params.delete(e)},t.prototype.getBase=function(){return this.base},t.prototype.getPath=function(){return this.base.pathname},t.prototype.getHostname=function(){return this.base.hostname},t.prototype.getParams=function(){return this.params},t.prototype.getQueryParam=function(e){if(!this.params)return"";var n=this.params.get(e);return!n||n==="undefined"||n==="null"?void 0:n},t.prototype.getQueryString=function(){return this.params.toString()},t.prototype.setPath=function(e){return this.base.pathname=e,this},t.prototype.setQueryParam=function(e,n){return this.params.set(e,n?n.toString():""),this},t.prototype.setQueryString=function(e){if(e)return e[0]==="?"&&(e=e.slice(1)),this.params=new URLSearchParams(e),this},t.prototype.toString=function(){var e=this.params.toString();return e===""?this.base.search="":this.base.search="?"+e,this.base.toString()},t}();Of.URLBuilder=f2});var n_=Bn((vl,Pf)=>{"use strict";(function(t,e){"use strict";var n="1.0.40",r="",i="?",o="function",s="undefined",a="object",c="string",l="major",u="model",d="name",m="type",h="vendor",v="version",N="architecture",M="console",A="mobile",O="tablet",L="smarttv",G="wearable",we="embedded",j=500,fe="Amazon",J="Apple",be="ASUS",it="BlackBerry",He="Browser",et="Chrome",Rt="Edge",wt="Firefox",Gt="Google",gn="Huawei",tt="LG",Tt="Microsoft",Te="Motorola",T="Opera",C="Samsung",Y="Sharp",se="Sony",pe="Xiaomi",he="Zebra",_e="Facebook",ae="Chromium OS",Ee="Mac OS",Xe=" Browser",lt=function(K,le){var q={};for(var $e in K)le[$e]&&le[$e].length%2===0?q[$e]=le[$e].concat(K[$e]):q[$e]=K[$e];return q},Fe=function(K){for(var le={},q=0;q<K.length;q++)le[K[q].toUpperCase()]=K[q];return le},Me=function(K,le){return typeof K===c?ot(le).indexOf(ot(K))!==-1:!1},ot=function(K){return K.toLowerCase()},xe=function(K){return typeof K===c?K.replace(/[^\d\.]/g,r).split(".")[0]:e},y=function(K,le){if(typeof K===c)return K=K.replace(/^\s\s*/,r),typeof le===s?K:K.substring(0,j)},f=function(K,le){for(var q=0,$e,yn,Jt,We,ue,Rn;q<le.length&&!ue;){var Bi=le[q],ic=le[q+1];for($e=yn=0;$e<Bi.length&&!ue&&Bi[$e];)if(ue=Bi[$e++].exec(K),ue)for(Jt=0;Jt<ic.length;Jt++)Rn=ue[++yn],We=ic[Jt],typeof We===a&&We.length>0?We.length===2?typeof We[1]==o?this[We[0]]=We[1].call(this,Rn):this[We[0]]=We[1]:We.length===3?typeof We[1]===o&&!(We[1].exec&&We[1].test)?this[We[0]]=Rn?We[1].call(this,Rn,We[2]):e:this[We[0]]=Rn?Rn.replace(We[1],We[2]):e:We.length===4&&(this[We[0]]=Rn?We[3].call(this,Rn.replace(We[1],We[2])):e):this[We]=Rn||e;q+=2}},p=function(K,le){for(var q in le)if(typeof le[q]===a&&le[q].length>0){for(var $e=0;$e<le[q].length;$e++)if(Me(le[q][$e],K))return q===i?e:q}else if(Me(le[q],K))return q===i?e:q;return le.hasOwnProperty("*")?le["*"]:K},E={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},x={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},F={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,v],[/opios[\/ ]+([\w\.]+)/i],[v,[d,T+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[v,[d,T+" GX"]],[/\bopr\/([\w\.]+)/i],[v,[d,T]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[v,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,v],[/quark(?:pc)?\/([-\w\.]+)/i],[v,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[v,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[d,"UC"+He]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[d,"Smart Lenovo "+He]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+He],v],[/\bfocus\/([\w\.]+)/i],[v,[d,wt+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[d,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[d,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[d,"MIUI"+Xe]],[/fxios\/([\w\.-]+)/i],[v,[d,wt]],[/\bqihoobrowser\/?([\w\.]*)/i],[v,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],v],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+Xe],v],[/samsungbrowser\/([\w\.]+)/i],[v,[d,C+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[v,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,v],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[v,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,_e],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[d,et+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,et+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[d,"Android "+He]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[v,p,E]],[/(webkit|khtml)\/([\w\.]+)/i],[d,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],v],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[d,wt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,[v,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[N,"amd64"]],[/(ia32(?=;))/i],[[N,ot]],[/((?:i[346]|x)86)[;\)]/i],[[N,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[N,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[N,"armhf"]],[/windows (ce|mobile); ppc;/i],[[N,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[N,/ower/,r,ot]],[/(sun4\w)[;\)]/i],[[N,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[N,ot]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,C],[m,O]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,C],[m,A]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[h,J],[m,A]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,J],[m,O]],[/(macintosh);/i],[u,[h,J]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,Y],[m,A]],[/(?:honor)([-\w ]+)[;\)]/i],[u,[h,"Honor"],[m,A]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,gn],[m,O]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,gn],[m,A]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[u,/_/g," "],[h,pe],[m,A]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,pe],[m,O]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[m,A]],[/\b(opd2\d{3}a?) bui/i],[u,[h,"OPPO"],[m,O]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[m,A]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[m,A]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,Te],[m,A]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,Te],[m,O]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,tt],[m,O]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,tt],[m,A]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[m,O]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[m,A]],[/(pixel c)\b/i],[u,[h,Gt],[m,O]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,Gt],[m,A]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[h,se],[m,A]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,se],[m,O]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[m,A]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,fe],[m,O]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,fe],[m,A]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[m,O]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,it],[m,A]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,be],[m,O]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,be],[m,A]],[/(nexus 9)/i],[u,[h,"HTC"],[m,O]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[m,A]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[u,[h,"TCL"],[m,O]],[/(itel) ((\w+))/i],[[h,ot],u,[m,p,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[m,O]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[m,A]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[h,"Ulefone"],[m,A]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[u,[h,"Energizer"],[m,A]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[u,[h,"Cat"],[m,A]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[u,[h,"Smartfren"],[m,A]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[h,"Nothing"],[m,A]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[m,A]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,u,[m,O]],[/(surface duo)/i],[u,[h,Tt],[m,O]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[m,A]],[/(u304aa)/i],[u,[h,"AT&T"],[m,A]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[m,A]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[m,O]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[m,O]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[m,O]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[m,O]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[m,O]],[/\b(k88) b/i],[u,[h,"ZTE"],[m,O]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[m,A]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[m,A]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[m,O]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[m,O]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[m,O]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[m,O]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[m,O]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[m,A]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[m,A]],[/\b(ph-1) /i],[u,[h,"Essential"],[m,A]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[m,O]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[m,O]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[m,O]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[m,O]],[/(sprint) (\w+)/i],[h,u,[m,A]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,Tt],[m,A]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,he],[m,O]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,he],[m,A]],[/smart-tv.+(samsung)/i],[h,[m,L]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,C],[m,L]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,tt],[m,L]],[/(apple) ?tv/i],[h,[u,J+" TV"],[m,L]],[/crkey/i],[[u,et+"cast"],[h,Gt],[m,L]],[/droid.+aft(\w+)( bui|\))/i],[u,[h,fe],[m,L]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,Y],[m,L]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,se],[m,L]],[/(mitv-\w{5}) bui/i],[u,[h,pe],[m,L]],[/Hbbtv.*(technisat) (.*);/i],[h,u,[m,L]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,y],[u,y],[m,L]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,L]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[m,M]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[m,M]],[/(playstation [345portablevi]+)/i],[u,[h,se],[m,M]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,Tt],[m,M]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[u,[h,C],[m,G]],[/((pebble))app/i],[h,u,[m,G]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[h,J],[m,G]],[/droid.+; (glass) \d/i],[u,[h,Gt],[m,G]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,he],[m,G]],[/droid.+; (glass) \d/i],[u,[h,Gt],[m,G]],[/(pico) (4|neo3(?: link|pro)?)/i],[h,u,[m,G]],[/; (quest( \d| pro)?)/i],[u,[h,_e],[m,G]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[m,we]],[/(aeobc)\b/i],[u,[h,fe],[m,we]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[m,A]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[m,O]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,O]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,A]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[d,Rt+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[d,v],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,v],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[v,p,x]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,p,x],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,Ee],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,v],[/\(bb(10);/i],[v,[d,it]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[d,wt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[d,et+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,ae],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,v],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,v]]},V=function(K,le){if(typeof K===a&&(le=K,K=e),!(this instanceof V))return new V(K,le).getResult();var q=typeof t!==s&&t.navigator?t.navigator:e,$e=K||(q&&q.userAgent?q.userAgent:r),yn=q&&q.userAgentData?q.userAgentData:e,Jt=le?lt(F,le):F,We=q&&q.userAgent==$e;return this.getBrowser=function(){var ue={};return ue[d]=e,ue[v]=e,f.call(ue,$e,Jt.browser),ue[l]=xe(ue[v]),We&&q&&q.brave&&typeof q.brave.isBrave==o&&(ue[d]="Brave"),ue},this.getCPU=function(){var ue={};return ue[N]=e,f.call(ue,$e,Jt.cpu),ue},this.getDevice=function(){var ue={};return ue[h]=e,ue[u]=e,ue[m]=e,f.call(ue,$e,Jt.device),We&&!ue[m]&&yn&&yn.mobile&&(ue[m]=A),We&&ue[u]=="Macintosh"&&q&&typeof q.standalone!==s&&q.maxTouchPoints&&q.maxTouchPoints>2&&(ue[u]="iPad",ue[m]=O),ue},this.getEngine=function(){var ue={};return ue[d]=e,ue[v]=e,f.call(ue,$e,Jt.engine),ue},this.getOS=function(){var ue={};return ue[d]=e,ue[v]=e,f.call(ue,$e,Jt.os),We&&!ue[d]&&yn&&yn.platform&&yn.platform!="Unknown"&&(ue[d]=yn.platform.replace(/chrome os/i,ae).replace(/macos/i,Ee)),ue},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return $e},this.setUA=function(ue){return $e=typeof ue===c&&ue.length>j?y(ue,j):ue,this},this.setUA($e),this};V.VERSION=n,V.BROWSER=Fe([d,v,l]),V.CPU=Fe([N]),V.DEVICE=Fe([u,h,m,M,A,L,O,G,we]),V.ENGINE=V.OS=Fe([d,v]),typeof vl!==s?(typeof Pf!==s&&Pf.exports&&(vl=Pf.exports=V),vl.UAParser=V):typeof define===o&&define.amd?define(function(){return V}):typeof t!==s&&(t.UAParser=V);var me=typeof t!==s&&(t.jQuery||t.Zepto);if(me&&!me.ua){var Be=new V;me.ua=Be.getResult(),me.ua.get=function(){return Be.getUA()},me.ua.set=function(K){Be.setUA(K);var le=Be.getResult();for(var q in le)me.ua[q]=le[q]}}})(typeof window=="object"?window:vl)});var i_=Bn(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.ArrayUtils=void 0;var r_=class t{static of(e,n){return n!==void 0?new Array(e).fill(n):Array.from({length:e},(r,i)=>i)}static remove(e,n){let r=e.indexOf(n);return r===-1?!1:(e.splice(r,1),!0)}static swap(e,n,r){[e[n],e[r]]=[e[r],e[n]]}static sum(e,n){return e.reduce((r,i)=>r+Math.max(n?n(i):+i,0),0)}static unique(e,n){return e.filter((r,i,o)=>o.findIndex(s=>s[n]===r[n])===i)}static shuffle(e){let n=e.length;for(;n!=0;){let r=Math.floor(Math.random()*n);n--,t.swap(e,n,r)}}};Bf.ArrayUtils=r_});var kT=Bn(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});Yp.AssetType=void 0;var PT=function(t){return t[t.IMAGE=1]="IMAGE",t[t.VIDEO=2]="VIDEO",t[t.GIF=3]="GIF",t[t.SCREENSHOT=4]="SCREENSHOT",t[t.THREE_D=5]="THREE_D",t[t.FONT=6]="FONT",t[t.TEXT=7]="TEXT",t[t.JSON=8]="JSON",t[t.SVG=9]="SVG",t[t.HTML=10]="HTML",t[t.LOGO=11]="LOGO",t[t.OTHERS=1e3]="OTHERS",t}(PT||(Yp.AssetType=PT={}))});var FT=Bn(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.TemplateStatus=void 0;var LT=function(t){return t[t.DRAFT=1]="DRAFT",t[t.PUBLISHED=2]="PUBLISHED",t[t.DISABLED=3]="DISABLED",t}(LT||(Kp.TemplateStatus=LT={}))});var VT=Bn(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.ActionType=void 0;var BT=function(t){return t.VIEW_ITEM="VIEW_ITEM",t.ADD_TO_CART="ADD_TO_CART",t.VIEW_CATEGORY="VIEW_CATEGORY",t.VIEW_TAG="VIEW_TAG",t.SEARCH="SEARCH",t.APPLY_COUPON="APPLY_COUPON",t}(BT||(Zp.ActionType=BT={}))});var UT=Bn(ci=>{"use strict";var nV=ci&&ci.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Xp=ci&&ci.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&nV(e,t,n)};Object.defineProperty(ci,"__esModule",{value:!0});Xp(kT(),ci);Xp(FT(),ci);Xp(Yn(),ci);Xp(VT(),ci)});function kx(t,e){return Object.is(t,e)}var Qt=null,$l=!1,ah=1,li=Symbol("SIGNAL");function Ve(t){let e=Qt;return Qt=t,e}function K_(){return Qt}var Wl={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Z_(t){if($l)throw new Error("");if(Qt===null)return;Qt.consumerOnSignalRead(t);let e=Qt.nextProducerIndex++;if(zl(Qt),e<Qt.producerNode.length&&Qt.producerNode[e]!==t&&cc(Qt)){let n=Qt.producerNode[e];Gl(n,Qt.producerIndexOfThis[e])}Qt.producerNode[e]!==t&&(Qt.producerNode[e]=t,Qt.producerIndexOfThis[e]=cc(Qt)?eE(t,Qt,e):0),Qt.producerLastReadVersion[e]=t.version}function Lx(){ah++}function Fx(t){if(!(cc(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===ah)){if(!t.producerMustRecompute(t)&&!lh(t)){Y_(t);return}t.producerRecomputeValue(t),Y_(t)}}function X_(t){if(t.liveConsumerNode===void 0)return;let e=$l;$l=!0;try{for(let n of t.liveConsumerNode)n.dirty||Bx(n)}finally{$l=e}}function J_(){return Qt?.consumerAllowSignalWrites!==!1}function Bx(t){t.dirty=!0,X_(t),t.consumerMarkedDirty?.(t)}function Y_(t){t.dirty=!1,t.lastCleanEpoch=ah}function ch(t){return t&&(t.nextProducerIndex=0),Ve(t)}function Q_(t,e){if(Ve(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(cc(t))for(let n=t.nextProducerIndex;n<t.producerNode.length;n++)Gl(t.producerNode[n],t.producerIndexOfThis[n]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function lh(t){zl(t);for(let e=0;e<t.producerNode.length;e++){let n=t.producerNode[e],r=t.producerLastReadVersion[e];if(r!==n.version||(Fx(n),r!==n.version))return!0}return!1}function uh(t){if(zl(t),cc(t))for(let e=0;e<t.producerNode.length;e++)Gl(t.producerNode[e],t.producerIndexOfThis[e]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}function eE(t,e,n){if(tE(t),t.liveConsumerNode.length===0&&nE(t))for(let r=0;r<t.producerNode.length;r++)t.producerIndexOfThis[r]=eE(t.producerNode[r],t,r);return t.liveConsumerIndexOfThis.push(n),t.liveConsumerNode.push(e)-1}function Gl(t,e){if(tE(t),t.liveConsumerNode.length===1&&nE(t))for(let r=0;r<t.producerNode.length;r++)Gl(t.producerNode[r],t.producerIndexOfThis[r]);let n=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[n],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[n],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let r=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];zl(i),i.producerIndexOfThis[r]=e}}function cc(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function zl(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function tE(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function nE(t){return t.producerNode!==void 0}function Vx(){throw new Error}var rE=Vx;function iE(t){rE(t)}function oE(t){rE=t}var Ux=null;function sE(t){let e=Object.create(cE);e.value=t;let n=()=>(Z_(e),e.value);return n[li]=e,n}function dh(t,e){J_()||iE(t),t.equal(t.value,e)||(t.value=e,jx(t))}function aE(t,e){J_()||iE(t),dh(t,e(t.value))}var cE=ne(w({},Wl),{equal:kx,value:void 0,kind:"signal"});function jx(t){t.version++,Lx(),X_(t),Ux?.()}function De(t){return typeof t=="function"}function ql(t){let n=t(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Yl=ql(t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:
2
- ${n.map((r,i)=>`${i+1}) ${r.toString()}`).join(`
3
- `)}`:"",this.name="UnsubscriptionError",this.errors=n});function _o(t,e){if(t){let n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Bt=class t{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(De(r))try{r()}catch(o){e=o instanceof Yl?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{lE(o)}catch(s){e=e??[],s instanceof Yl?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Yl(e)}}add(e){var n;if(e&&e!==this)if(this.closed)lE(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}}_hasParent(e){let{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){let{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&_o(n,e)}remove(e){let{_finalizers:n}=this;n&&_o(n,e),e instanceof t&&e._removeParent(this)}};Bt.EMPTY=(()=>{let t=new Bt;return t.closed=!0,t})();var fh=Bt.EMPTY;function Kl(t){return t instanceof Bt||t&&"closed"in t&&De(t.remove)&&De(t.add)&&De(t.unsubscribe)}function lE(t){De(t)?t():t.unsubscribe()}var yr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Es={setTimeout(t,e,...n){let{delegate:r}=Es;return r?.setTimeout?r.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){let{delegate:e}=Es;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Zl(t){Es.setTimeout(()=>{let{onUnhandledError:e}=yr;if(e)e(t);else throw t})}function lc(){}var uE=ph("C",void 0,void 0);function dE(t){return ph("E",void 0,t)}function fE(t){return ph("N",t,void 0)}function ph(t,e,n){return{kind:t,value:e,error:n}}var Eo=null;function ws(t){if(yr.useDeprecatedSynchronousErrorHandling){let e=!Eo;if(e&&(Eo={errorThrown:!1,error:null}),t(),e){let{errorThrown:n,error:r}=Eo;if(Eo=null,n)throw r}}else t()}function pE(t){yr.useDeprecatedSynchronousErrorHandling&&Eo&&(Eo.errorThrown=!0,Eo.error=t)}var wo=class extends Bt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Kl(e)&&e.add(this)):this.destination=Wx}static create(e,n,r){return new bs(e,n,r)}next(e){this.isStopped?mh(fE(e),this):this._next(e)}error(e){this.isStopped?mh(dE(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?mh(uE,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Hx=Function.prototype.bind;function hh(t,e){return Hx.call(t,e)}var gh=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(r){Xl(r)}}error(e){let{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(r){Xl(r)}else Xl(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){Xl(n)}}},bs=class extends wo{constructor(e,n,r){super();let i;if(De(e)||!e)i={next:e??void 0,error:n??void 0,complete:r??void 0};else{let o;this&&yr.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),i={next:e.next&&hh(e.next,o),error:e.error&&hh(e.error,o),complete:e.complete&&hh(e.complete,o)}):i=e}this.destination=new gh(i)}};function Xl(t){yr.useDeprecatedSynchronousErrorHandling?pE(t):Zl(t)}function $x(t){throw t}function mh(t,e){let{onStoppedNotification:n}=yr;n&&Es.setTimeout(()=>n(t,e))}var Wx={closed:!0,next:lc,error:$x,complete:lc};var Cs=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ss(t){return t}function hE(t){return t.length===0?Ss:t.length===1?t[0]:function(n){return t.reduce((r,i)=>i(r),n)}}var dt=(()=>{class t{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new t;return r.source=this,r.operator=n,r}subscribe(n,r,i){let o=zx(n)?n:new bs(n,r,i);return ws(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=mE(r),new r((i,o)=>{let s=new bs({next:a=>{try{n(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[Cs](){return this}pipe(...n){return hE(n)(this)}toPromise(n){return n=mE(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return t.create=e=>new t(e),t})();function mE(t){var e;return(e=t??yr.Promise)!==null&&e!==void 0?e:Promise}function Gx(t){return t&&De(t.next)&&De(t.error)&&De(t.complete)}function zx(t){return t&&t instanceof wo||Gx(t)&&Kl(t)}function qx(t){return De(t?.lift)}function Pt(t){return e=>{if(qx(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Vt(t,e,n,r,i){return new yh(t,e,n,r,i)}var yh=class extends wo{constructor(e,n,r,i,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){e.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){e.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};var gE=ql(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Ne=(()=>{class t extends dt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Jl(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new gE}next(n){ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:o}=this;return r||i?fh:(this.currentObservers=null,o.push(n),new Bt(()=>{this.currentObservers=null,_o(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new dt;return n.source=this,n}}return t.create=(e,n)=>new Jl(e,n),t})(),Jl=class extends Ne{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,e)}error(e){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,e)}complete(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)}_subscribe(e){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&r!==void 0?r:fh}};var ui=class extends Ne{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){let{hasError:e,thrownError:n,_value:r}=this;if(e)throw n;return this._throwIfClosed(),r}next(e){super.next(this._value=e)}};var uc={now(){return(uc.delegate||Date).now()},delegate:void 0};var bo=class extends Ne{constructor(e=1/0,n=1/0,r=uc){super(),this._bufferSize=e,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,n)}next(e){let{isStopped:n,_buffer:r,_infiniteTimeWindow:i,_timestampProvider:o,_windowTime:s}=this;n||(r.push(e),!i&&r.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let n=this._innerSubscribe(e),{_infiniteTimeWindow:r,_buffer:i}=this,o=i.slice();for(let s=0;s<o.length&&!e.closed;s+=r?1:2)e.next(o[s]);return this._checkFinalizedStatuses(e),n}_trimBuffer(){let{_bufferSize:e,_timestampProvider:n,_buffer:r,_infiniteTimeWindow:i}=this,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){let s=n.now(),a=0;for(let c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}}};var Ql=class extends Bt{constructor(e,n){super()}schedule(e,n=0){return this}};var dc={setInterval(t,e,...n){let{delegate:r}=dc;return r?.setInterval?r.setInterval(t,e,...n):setInterval(t,e,...n)},clearInterval(t){let{delegate:e}=dc;return(e?.clearInterval||clearInterval)(t)},delegate:void 0};var eu=class extends Ql{constructor(e,n){super(e,n),this.scheduler=e,this.work=n,this.pending=!1}schedule(e,n=0){var r;if(this.closed)return this;this.state=e;let i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,n)),this.pending=!0,this.delay=n,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(o,this.id,n),this}requestAsyncId(e,n,r=0){return dc.setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,n,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return n;n!=null&&dc.clearInterval(n)}execute(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let r=this._execute(e,n);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,n){let r=!1,i;try{this.work(e)}catch(o){r=!0,i=o||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){let{id:e,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,_o(r,this),e!=null&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,super.unsubscribe()}}};var Is=class t{constructor(e,n=t.now){this.schedulerActionCtor=e,this.now=n}schedule(e,n=0,r){return new this.schedulerActionCtor(this,e).schedule(r,n)}};Is.now=uc.now;var tu=class extends Is{constructor(e,n=Is.now){super(e,n),this.actions=[],this._active=!1}flush(e){let{actions:n}=this;if(this._active){n.push(e);return}let r;this._active=!0;do if(r=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,r){for(;e=n.shift();)e.unsubscribe();throw r}}};var fc=new tu(eu),yE=fc;var vE=new dt(t=>t.complete());function nu(t){return t&&De(t.schedule)}function _E(t){return t[t.length-1]}function Ui(t){return nu(_E(t))?t.pop():void 0}function EE(t,e){return typeof _E(t)=="number"?t.pop():e}function bE(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(d){s(d)}}function c(u){try{l(r.throw(u))}catch(d){s(d)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})}function wE(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Co(t){return this instanceof Co?(this.v=t,this):new Co(t)}function CE(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(v){return Promise.resolve(v).then(h,d)}}function a(h,v){r[h]&&(i[h]=function(N){return new Promise(function(M,A){o.push([h,N,M,A])>1||c(h,N)})},v&&(i[h]=v(i[h])))}function c(h,v){try{l(r[h](v))}catch(N){m(o[0][3],N)}}function l(h){h.value instanceof Co?Promise.resolve(h.value.v).then(u,d):m(o[0][2],h)}function u(h){c("next",h)}function d(h){c("throw",h)}function m(h,v){h(v),o.shift(),o.length&&c(o[0][0],o[0][1])}}function SE(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof wE=="function"?wE(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(s){return new Promise(function(a,c){s=t[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}}var Ds=t=>t&&typeof t.length=="number"&&typeof t!="function";function ru(t){return De(t?.then)}function iu(t){return De(t[Cs])}function ou(t){return Symbol.asyncIterator&&De(t?.[Symbol.asyncIterator])}function su(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Yx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var au=Yx();function cu(t){return De(t?.[au])}function lu(t){return CE(this,arguments,function*(){let n=t.getReader();try{for(;;){let{value:r,done:i}=yield Co(n.read());if(i)return yield Co(void 0);yield yield Co(r)}}finally{n.releaseLock()}})}function uu(t){return De(t?.getReader)}function kt(t){if(t instanceof dt)return t;if(t!=null){if(iu(t))return Kx(t);if(Ds(t))return Zx(t);if(ru(t))return Xx(t);if(ou(t))return IE(t);if(cu(t))return Jx(t);if(uu(t))return Qx(t)}throw su(t)}function Kx(t){return new dt(e=>{let n=t[Cs]();if(De(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Zx(t){return new dt(e=>{for(let n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Xx(t){return new dt(e=>{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,Zl)})}function Jx(t){return new dt(e=>{for(let n of t)if(e.next(n),e.closed)return;e.complete()})}function IE(t){return new dt(e=>{eN(t,e).catch(n=>e.error(n))})}function Qx(t){return IE(lu(t))}function eN(t,e){var n,r,i,o;return bE(this,void 0,void 0,function*(){try{for(n=SE(t);r=yield n.next(),!r.done;){let s=r.value;if(e.next(s),e.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}e.complete()})}function rr(t,e,n,r=0,i=!1){let o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function du(t,e=0){return Pt((n,r)=>{n.subscribe(Vt(r,i=>rr(r,t,()=>r.next(i),e),()=>rr(r,t,()=>r.complete(),e),i=>rr(r,t,()=>r.error(i),e)))})}function fu(t,e=0){return Pt((n,r)=>{r.add(t.schedule(()=>n.subscribe(r),e))})}function DE(t,e){return kt(t).pipe(fu(e),du(e))}function TE(t,e){return kt(t).pipe(fu(e),du(e))}function xE(t,e){return new dt(n=>{let r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function NE(t,e){return new dt(n=>{let r;return rr(n,e,()=>{r=t[au](),rr(n,e,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>De(r?.return)&&r.return()})}function pu(t,e){if(!t)throw new Error("Iterable cannot be null");return new dt(n=>{rr(n,e,()=>{let r=t[Symbol.asyncIterator]();rr(n,e,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function RE(t,e){return pu(lu(t),e)}function AE(t,e){if(t!=null){if(iu(t))return DE(t,e);if(Ds(t))return xE(t,e);if(ru(t))return TE(t,e);if(ou(t))return pu(t,e);if(cu(t))return NE(t,e);if(uu(t))return RE(t,e)}throw su(t)}function Ts(t,e){return e?AE(t,e):kt(t)}function So(...t){let e=Ui(t);return Ts(t,e)}function ME(t){return t instanceof Date&&!isNaN(t)}function Mr(t,e){return Pt((n,r)=>{let i=0;n.subscribe(Vt(r,o=>{r.next(t.call(e,o,i++))}))})}var{isArray:tN}=Array;function nN(t,e){return tN(e)?t(...e):t(e)}function OE(t){return Mr(e=>nN(t,e))}function PE(t,e,n,r,i,o,s,a){let c=[],l=0,u=0,d=!1,m=()=>{d&&!c.length&&!l&&e.complete()},h=N=>l<r?v(N):c.push(N),v=N=>{o&&e.next(N),l++;let M=!1;kt(n(N,u++)).subscribe(Vt(e,A=>{i?.(A),o?h(A):e.next(A)},()=>{M=!0},void 0,()=>{if(M)try{for(l--;c.length&&l<r;){let A=c.shift();s?rr(e,s,()=>v(A)):v(A)}m()}catch(A){e.error(A)}}))};return t.subscribe(Vt(e,h,()=>{d=!0,m()})),()=>{a?.()}}function pc(t,e,n=1/0){return De(e)?pc((r,i)=>Mr((o,s)=>e(r,o,i,s))(kt(t(r,i))),n):(typeof e=="number"&&(n=e),Pt((r,i)=>PE(r,i,t,n)))}function hu(t=1/0){return pc(Ss,t)}function kE(){return hu(1)}function vh(...t){return kE()(Ts(t,Ui(t)))}function _h(t){return new dt(e=>{kt(t()).subscribe(e)})}var rN=["addListener","removeListener"],iN=["addEventListener","removeEventListener"],oN=["on","off"];function Io(t,e,n,r){if(De(n)&&(r=n,n=void 0),r)return Io(t,e,n).pipe(OE(r));let[i,o]=cN(t)?iN.map(s=>a=>t[s](e,a,n)):sN(t)?rN.map(LE(t,e)):aN(t)?oN.map(LE(t,e)):[];if(!i&&Ds(t))return pc(s=>Io(s,e,n))(kt(t));if(!i)throw new TypeError("Invalid event target");return new dt(s=>{let a=(...c)=>s.next(1<c.length?c:c[0]);return i(a),()=>o(a)})}function LE(t,e){return n=>r=>t[n](e,r)}function sN(t){return De(t.addListener)&&De(t.removeListener)}function aN(t){return De(t.on)&&De(t.off)}function cN(t){return De(t.addEventListener)&&De(t.removeEventListener)}function FE(t=0,e,n=yE){let r=-1;return e!=null&&(nu(e)?n=e:r=e),new dt(i=>{let o=ME(t)?+t-n.now():t;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function hc(...t){let e=Ui(t),n=EE(t,1/0),r=t;return r.length?r.length===1?kt(r[0]):hu(n)(Ts(r,e)):vE}function Do(t,e){return Pt((n,r)=>{let i=0;n.subscribe(Vt(r,o=>t.call(e,o,i++)&&r.next(o)))})}function BE(t){return Pt((e,n)=>{let r=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,r){r=!1;let l=i;i=null,n.next(l)}s&&n.complete()},c=()=>{o=null,s&&n.complete()};e.subscribe(Vt(n,l=>{r=!0,i=l,o||kt(t(l)).subscribe(o=Vt(n,a,c))},()=>{s=!0,(!r||!o||o.closed)&&n.complete()}))})}function mu(t,e=fc){return BE(()=>FE(t,e))}function vr(t,e=fc){return Pt((n,r)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let l=o;o=null,r.next(l)}};function c(){let l=s+t,u=e.now();if(u<l){i=this.schedule(void 0,l-u),r.add(i);return}a()}n.subscribe(Vt(r,l=>{o=l,s=e.now(),i||(i=e.schedule(c,t),r.add(i))},()=>{a(),r.complete()},void 0,()=>{o=i=null}))})}function gu(t,e=Ss){return t=t??lN,Pt((n,r)=>{let i,o=!0;n.subscribe(Vt(r,s=>{let a=e(s);(o||!t(i,a))&&(o=!1,i=a,r.next(s))}))})}function lN(t,e){return t===e}function Eh(t){return Do((e,n)=>t<=n)}function To(...t){let e=Ui(t);return Pt((n,r)=>{(e?vh(t,n,e):vh(t,n)).subscribe(r)})}function yu(t,e){return Pt((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(Vt(r,c=>{i?.unsubscribe();let l=0,u=o++;kt(t(c,u)).subscribe(i=Vt(r,d=>r.next(e?e(c,d,u,l++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function xs(t){return Pt((e,n)=>{kt(t).subscribe(Vt(n,()=>n.complete(),lc)),!n.closed&&e.subscribe(n)})}var xw="https://g.co/ng/security#xss",Re=class extends Error{code;constructor(e,n){super(Lm(e,n)),this.code=e}};function Lm(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}function Ju(t){return{toString:t}.toString()}var vu="__parameters__";function uN(t){return function(...n){if(t){let r=t(...n);for(let i in r)this[i]=r[i]}}}function Nw(t,e,n){return Ju(()=>{let r=uN(e);function i(...o){if(this instanceof i)return r.apply(this,o),this;let s=new i(...o);return a.annotation=s,a;function a(c,l,u){let d=c.hasOwnProperty(vu)?c[vu]:Object.defineProperty(c,vu,{value:[]})[vu];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),c}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}var _c=globalThis;function Ct(t){for(let e in t)if(t[e]===Ct)return e;throw Error("Could not find renamed property on target object.")}function dN(t,e){for(let n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function or(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(or).join(", ")}]`;if(t==null)return""+t;let e=t.overriddenName||t.name;if(e)return`${e}`;let n=t.toString();if(n==null)return""+n;let r=n.indexOf(`
4
- `);return r>=0?n.slice(0,r):n}function VE(t,e){return t?e?`${t} ${e}`:t:e||""}var fN=Ct({__forward_ref__:Ct});function Fm(t){return t.__forward_ref__=Fm,t.toString=function(){return or(this())},t}function ir(t){return Rw(t)?t():t}function Rw(t){return typeof t=="function"&&t.hasOwnProperty(fN)&&t.__forward_ref__===Fm}function ie(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Bm(t){return UE(t,Aw)||UE(t,Mw)}function UE(t,e){return t.hasOwnProperty(e)?t[e]:null}function pN(t){let e=t&&(t[Aw]||t[Mw]);return e||null}function jE(t){return t&&(t.hasOwnProperty(HE)||t.hasOwnProperty(hN))?t[HE]:null}var Aw=Ct({\u0275prov:Ct}),HE=Ct({\u0275inj:Ct}),Mw=Ct({ngInjectableDef:Ct}),hN=Ct({ngInjectorDef:Ct}),ve=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,n){this._desc=e,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=ie({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ow(t){return t&&!!t.\u0275providers}var mN=Ct({\u0275cmp:Ct}),gN=Ct({\u0275dir:Ct}),yN=Ct({\u0275pipe:Ct});var Nu=Ct({\u0275fac:Ct}),vc=Ct({__NG_ELEMENT_ID__:Ct}),$E=Ct({__NG_ENV_ID__:Ct});function Oc(t){return typeof t=="string"?t:t==null?"":String(t)}function vN(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Oc(t)}function _N(t,e){throw new Re(-200,t)}function Vm(t,e){throw new Re(-201,!1)}var Ge=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(Ge||{}),Oh;function Pw(){return Oh}function Vn(t){let e=Oh;return Oh=t,e}function kw(t,e,n){let r=Bm(t);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&Ge.Optional)return null;if(e!==void 0)return e;Vm(t,"Injector")}var EN={},Ec=EN,Ph="__NG_DI_FLAG__",Ru="ngTempTokenPath",wN="ngTokenPath",bN=/\n/gm,CN="\u0275",WE="__source",Os;function SN(){return Os}function ji(t){let e=Os;return Os=t,e}function IN(t,e=Ge.Default){if(Os===void 0)throw new Re(-203,!1);return Os===null?kw(t,void 0,e):Os.get(t,e&Ge.Optional?null:void 0,e)}function Ze(t,e=Ge.Default){return(Pw()||IN)(ir(t),e)}function P(t,e=Ge.Default){return Ze(t,Qu(e))}function Qu(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function kh(t){let e=[];for(let n=0;n<t.length;n++){let r=ir(t[n]);if(Array.isArray(r)){if(r.length===0)throw new Re(900,!1);let i,o=Ge.Default;for(let s=0;s<r.length;s++){let a=r[s],c=DN(a);typeof c=="number"?c===-1?i=a.token:o|=c:i=a}e.push(Ze(i,o))}else e.push(Ze(r))}return e}function Lw(t,e){return t[Ph]=e,t.prototype[Ph]=e,t}function DN(t){return t[Ph]}function TN(t,e,n,r){let i=t[Ru];throw e[WE]&&i.unshift(e[WE]),t.message=xN(`
5
- `+t.message,i,n,r),t[wN]=i,t[Ru]=null,t}function xN(t,e,n,r=null){t=t&&t.charAt(0)===`
6
- `&&t.charAt(1)==CN?t.slice(2):t;let i=or(e);if(Array.isArray(e))i=e.map(or).join(" -> ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):or(a)))}i=`{${o.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${t.replace(bN,`
7
- `)}`}var Um=Lw(Nw("Optional"),8);var NN=Lw(Nw("SkipSelf"),4);function No(t,e){let n=t.hasOwnProperty(Nu);return n?t[Nu]:null}function RN(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){let i=t[r],o=e[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}function AN(t){return t.flat(Number.POSITIVE_INFINITY)}function jm(t,e){t.forEach(n=>Array.isArray(n)?jm(n,e):e(n))}function Fw(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Au(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function MN(t,e,n,r){let i=t.length;if(i==e)t.push(n,r);else if(i===1)t.push(r,t[0]),t[0]=n;else{for(i--,t.push(t[i-1],t[i]);i>e;){let o=i-2;t[i]=t[o],i--}t[e]=n,t[e+1]=r}}function ON(t,e,n){let r=Pc(t,e);return r>=0?t[r|1]=n:(r=~r,MN(t,r,e,n)),r}function wh(t,e){let n=Pc(t,e);if(n>=0)return t[n|1]}function Pc(t,e){return PN(t,e,1)}function PN(t,e,n){let r=0,i=t.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=t[o<<n];if(e===s)return o<<n;s>e?i=o:r=o+1}return~(i<<n)}var Ro={},Wi=[],wc=new ve(""),Bw=new ve("",-1),Vw=new ve(""),Mu=class{get(e,n=Ec){if(n===Ec){let r=new Error(`NullInjectorError: No provider for ${or(e)}!`);throw r.name="NullInjectorError",r}return n}};function Ao(t){return t[mN]||null}function Uw(t){return t[gN]||null}function jw(t){return t[yN]||null}function kN(t){let e=Ao(t)||Uw(t)||jw(t);return e!==null&&e.standalone}function Hw(t){return{\u0275providers:t}}function LN(...t){return{\u0275providers:$w(!0,t),\u0275fromNgModule:!0}}function $w(t,...e){let n=[],r=new Set,i,o=s=>{n.push(s)};return jm(e,s=>{let a=s;Lh(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Ww(i,o),n}function Ww(t,e){for(let n=0;n<t.length;n++){let{ngModule:r,providers:i}=t[n];Hm(i,o=>{e(o,r)})}}function Lh(t,e,n,r){if(t=ir(t),!t)return!1;let i=null,o=jE(t),s=!o&&Ao(t);if(!o&&!s){let c=t.ngModule;if(o=jE(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=t}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)Lh(l,e,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let l;try{jm(o.imports,u=>{Lh(u,e,n,r)&&(l||=[],l.push(u))})}finally{}l!==void 0&&Ww(l,e)}if(!a){let l=No(i)||(()=>new i);e({provide:i,useFactory:l,deps:Wi},i),e({provide:Vw,useValue:i,multi:!0},i),e({provide:wc,useValue:()=>Ze(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let l=t;Hm(c,u=>{e(u,l)})}}else return!1;return i!==t&&t.providers!==void 0}function Hm(t,e){for(let n of t)Ow(n)&&(n=n.\u0275providers),Array.isArray(n)?Hm(n,e):e(n)}var FN=Ct({provide:String,useValue:Ct});function Gw(t){return t!==null&&typeof t=="object"&&FN in t}function BN(t){return!!(t&&t.useExisting)}function VN(t){return!!(t&&t.useFactory)}function Fh(t){return typeof t=="function"}var ed=new ve(""),Cu={},UN={},bh;function td(){return bh===void 0&&(bh=new Mu),bh}var Un=class{},bc=class extends Un{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,n,r,i){super(),this.parent=n,this.source=r,this.scopes=i,Vh(e,s=>this.processProvider(s)),this.records.set(Bw,Ns(void 0,this)),i.has("environment")&&this.records.set(Un,Ns(void 0,this));let o=this.records.get(ed);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Vw,Wi,Ge.Self))}destroy(){gc(this),this._destroyed=!0;let e=Ve(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Ve(e)}}onDestroy(e){return gc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){gc(this);let n=ji(this),r=Vn(void 0),i;try{return e()}finally{ji(n),Vn(r)}}get(e,n=Ec,r=Ge.Default){if(gc(this),e.hasOwnProperty($E))return e[$E](this);r=Qu(r);let i,o=ji(this),s=Vn(void 0);try{if(!(r&Ge.SkipSelf)){let c=this.records.get(e);if(c===void 0){let l=zN(e)&&Bm(e);l&&this.injectableDefInScope(l)?c=Ns(Bh(e),Cu):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c)}let a=r&Ge.Self?td():this.parent;return n=r&Ge.Optional&&n===Ec?null:n,a.get(e,n)}catch(a){if(a.name==="NullInjectorError"){if((a[Ru]=a[Ru]||[]).unshift(or(e)),o)throw a;return TN(a,e,"R3InjectorError",this.source)}else throw a}finally{Vn(s),ji(o)}}resolveInjectorInitializers(){let e=Ve(null),n=ji(this),r=Vn(void 0),i;try{let o=this.get(wc,Wi,Ge.Self);for(let s of o)s()}finally{ji(n),Vn(r),Ve(e)}}toString(){let e=[],n=this.records;for(let r of n.keys())e.push(or(r));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=ir(e);let n=Fh(e)?e:ir(e&&e.provide),r=HN(e);if(!Fh(e)&&e.multi===!0){let i=this.records.get(n);i||(i=Ns(void 0,Cu,!0),i.factory=()=>kh(i.multi),this.records.set(n,i)),n=e,i.multi.push(e)}this.records.set(n,r)}hydrate(e,n){let r=Ve(null);try{return n.value===Cu&&(n.value=UN,n.value=n.factory()),typeof n.value=="object"&&n.value&&GN(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{Ve(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let n=ir(e.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(e){let n=this._onDestroyHooks.indexOf(e);n!==-1&&this._onDestroyHooks.splice(n,1)}};function Bh(t){let e=Bm(t),n=e!==null?e.factory:No(t);if(n!==null)return n;if(t instanceof ve)throw new Re(204,!1);if(t instanceof Function)return jN(t);throw new Re(204,!1)}function jN(t){if(t.length>0)throw new Re(204,!1);let n=pN(t);return n!==null?()=>n.factory(t):()=>new t}function HN(t){if(Gw(t))return Ns(void 0,t.useValue);{let e=$N(t);return Ns(e,Cu)}}function $N(t,e,n){let r;if(Fh(t)){let i=ir(t);return No(i)||Bh(i)}else if(Gw(t))r=()=>ir(t.useValue);else if(VN(t))r=()=>t.useFactory(...kh(t.deps||[]));else if(BN(t))r=()=>Ze(ir(t.useExisting));else{let i=ir(t&&(t.useClass||t.provide));if(WN(t))r=()=>new i(...kh(t.deps));else return No(i)||Bh(i)}return r}function gc(t){if(t.destroyed)throw new Re(205,!1)}function Ns(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function WN(t){return!!t.deps}function GN(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function zN(t){return typeof t=="function"||typeof t=="object"&&t instanceof ve}function Vh(t,e){for(let n of t)Array.isArray(n)?Vh(n,e):n&&Ow(n)?Vh(n.\u0275providers,e):e(n)}function zw(t,e){t instanceof bc&&gc(t);let n,r=ji(t),i=Vn(void 0);try{return e()}finally{ji(r),Vn(i)}}function qw(){return Pw()!==void 0||SN()!=null}function Yw(t){if(!qw())throw new Re(-203,!1)}function qN(t){return typeof t=="function"}var _i=0,Se=1,ye=2,Sn=3,Er=4,br=5,Cc=6,Ou=7,en=8,Sc=9,di=10,an=11,Ic=12,GE=13,Us=14,wr=15,Mo=16,Rs=17,fi=18,nd=19,Kw=20,Hi=21,Ch=22,Pu=23,zn=24,Ps=25,vn=26,Zw=1;var Oo=7,ku=8,Ls=9,Cn=10;function $i(t){return Array.isArray(t)&&typeof t[Zw]=="object"}function Ei(t){return Array.isArray(t)&&t[Zw]===!0}function Xw(t){return(t.flags&4)!==0}function js(t){return t.componentOffset>-1}function $m(t){return(t.flags&1)===1}function pi(t){return!!t.template}function Lu(t){return(t[ye]&512)!==0}function kc(t){return(t[ye]&256)===256}var Uh=class{previousValue;currentValue;firstChange;constructor(e,n,r){this.previousValue=e,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}};function Jw(t,e,n,r){e!==null?e.applyValueToInputSignal(e,r):t[n]=r}function YN(t){return t.type.prototype.ngOnChanges&&(t.setInput=ZN),KN}function KN(){let t=eb(this),e=t?.current;if(e){let n=t.previous;if(n===Ro)t.previous=e;else for(let r in e)n[r]=e[r];t.current=null,this.ngOnChanges(e)}}function ZN(t,e,n,r,i){let o=this.declaredInputs[r],s=eb(t)||XN(t,{previous:Ro,current:null}),a=s.current||(s.current={}),c=s.previous,l=c[o];a[o]=new Uh(l&&l.currentValue,n,c===Ro),Jw(t,e,i,n)}var Qw="__ngSimpleChanges__";function eb(t){return t[Qw]||null}function XN(t,e){return t[Qw]=e}var zE=null;var pt=function(t,e=null,n){zE?.(t,e,n)},tb="svg",JN="math";function Pr(t){for(;Array.isArray(t);)t=t[_i];return t}function nb(t,e){return Pr(e[t])}function Vr(t,e){return Pr(e[t.index])}function Wm(t,e){return t.data[e]}function Gm(t,e){return t[e]}function kr(t,e){let n=e[t];return $i(n)?n:n[_i]}function QN(t){return(t[ye]&4)===4}function zm(t){return(t[ye]&128)===128}function eR(t){return Ei(t[Sn])}function Fs(t,e){return e==null?null:t[e]}function rb(t){t[Rs]=0}function qm(t){t[ye]&1024||(t[ye]|=1024,zm(t)&&Lc(t))}function tR(t,e){for(;t>0;)e=e[Us],t--;return e}function rd(t){return!!(t[ye]&9216||t[zn]?.dirty)}function jh(t){t[di].changeDetectionScheduler?.notify(8),t[ye]&64&&(t[ye]|=1024),rd(t)&&Lc(t)}function Lc(t){t[di].changeDetectionScheduler?.notify(0);let e=Po(t);for(;e!==null&&!(e[ye]&8192||(e[ye]|=8192,!zm(e)));)e=Po(e)}function ib(t,e){if(kc(t))throw new Re(911,!1);t[Hi]===null&&(t[Hi]=[]),t[Hi].push(e)}function nR(t,e){if(t[Hi]===null)return;let n=t[Hi].indexOf(e);n!==-1&&t[Hi].splice(n,1)}function Po(t){let e=t[Sn];return Ei(e)?e[Sn]:e}function ob(t){return t[Ou]??=[]}function sb(t){return t.cleanup??=[]}function rR(t,e,n,r){let i=ob(e);i.push(n),t.firstCreatePass&&sb(t).push(r,i.length-1)}var Ie={lFrame:hb(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Hh=!1;function iR(){return Ie.lFrame.elementDepthCount}function oR(){Ie.lFrame.elementDepthCount++}function sR(){Ie.lFrame.elementDepthCount--}function ab(){return Ie.bindingsEnabled}function aR(){return Ie.skipHydrationRootTNode!==null}function cR(t){return Ie.skipHydrationRootTNode===t}function lR(){Ie.skipHydrationRootTNode=null}function ze(){return Ie.lFrame.lView}function In(){return Ie.lFrame.tView}function Je(t){return Ie.lFrame.contextLView=t,t[en]}function Qe(t){return Ie.lFrame.contextLView=null,t}function Cr(){let t=cb();for(;t!==null&&t.type===64;)t=t.parent;return t}function cb(){return Ie.lFrame.currentTNode}function uR(){let t=Ie.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function Hs(t,e){let n=Ie.lFrame;n.currentTNode=t,n.isParent=e}function lb(){return Ie.lFrame.isParent}function dR(){Ie.lFrame.isParent=!1}function fR(){return Ie.lFrame.contextLView}function ub(){return Hh}function qE(t){let e=Hh;return Hh=t,e}function Ym(){let t=Ie.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function pR(t){return Ie.lFrame.bindingIndex=t}function Fc(){return Ie.lFrame.bindingIndex++}function hR(t){let e=Ie.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function mR(){return Ie.lFrame.inI18n}function gR(t,e){let n=Ie.lFrame;n.bindingIndex=n.bindingRootIndex=t,$h(e)}function yR(){return Ie.lFrame.currentDirectiveIndex}function $h(t){Ie.lFrame.currentDirectiveIndex=t}function vR(t){let e=Ie.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function db(){return Ie.lFrame.currentQueryIndex}function Km(t){Ie.lFrame.currentQueryIndex=t}function _R(t){let e=t[Se];return e.type===2?e.declTNode:e.type===1?t[br]:null}function fb(t,e,n){if(n&Ge.SkipSelf){let i=e,o=t;for(;i=i.parent,i===null&&!(n&Ge.Host);)if(i=_R(o),i===null||(o=o[Us],i.type&10))break;if(i===null)return!1;e=i,t=o}let r=Ie.lFrame=pb();return r.currentTNode=e,r.lView=t,!0}function Zm(t){let e=pb(),n=t[Se];Ie.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function pb(){let t=Ie.lFrame,e=t===null?null:t.child;return e===null?hb(t):e}function hb(t){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function mb(){let t=Ie.lFrame;return Ie.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var gb=mb;function Xm(){let t=mb();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function ER(t){return(Ie.lFrame.contextLView=tR(t,Ie.lFrame.contextLView))[en]}function zi(){return Ie.lFrame.selectedIndex}function ko(t){Ie.lFrame.selectedIndex=t}function Jm(){let t=Ie.lFrame;return Wm(t.tView,t.selectedIndex)}function Sr(){Ie.lFrame.currentNamespace=tb}function $s(){wR()}function wR(){Ie.lFrame.currentNamespace=null}function bR(){return Ie.lFrame.currentNamespace}var yb=!0;function Qm(){return yb}function eg(t){yb=t}function CR(t,e,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(r){let s=YN(e);(n.preOrderHooks??=[]).push(t,s),(n.preOrderCheckHooks??=[]).push(t,s)}i&&(n.preOrderHooks??=[]).push(0-t,i),o&&((n.preOrderHooks??=[]).push(t,o),(n.preOrderCheckHooks??=[]).push(t,o))}function vb(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n<r;n++){let o=t.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:c,ngAfterViewChecked:l,ngOnDestroy:u}=o;s&&(t.contentHooks??=[]).push(-n,s),a&&((t.contentHooks??=[]).push(n,a),(t.contentCheckHooks??=[]).push(n,a)),c&&(t.viewHooks??=[]).push(-n,c),l&&((t.viewHooks??=[]).push(n,l),(t.viewCheckHooks??=[]).push(n,l)),u!=null&&(t.destroyHooks??=[]).push(n,u)}}function Su(t,e,n){_b(t,e,3,n)}function Iu(t,e,n,r){(t[ye]&3)===n&&_b(t,e,n,r)}function Sh(t,e){let n=t[ye];(n&3)===e&&(n&=16383,n+=1,t[ye]=n)}function _b(t,e,n,r){let i=r!==void 0?t[Rs]&65535:0,o=r??-1,s=e.length-1,a=0;for(let c=i;c<s;c++)if(typeof e[c+1]=="number"){if(a=e[c],r!=null&&a>=r)break}else e[c]<0&&(t[Rs]+=65536),(a<o||o==-1)&&(SR(t,n,e,c),t[Rs]=(t[Rs]&4294901760)+c+2),c++}function YE(t,e){pt(4,t,e);let n=Ve(null);try{e.call(t)}finally{Ve(n),pt(5,t,e)}}function SR(t,e,n,r){let i=n[r]<0,o=n[r+1],s=i?-n[r]:n[r],a=t[s];i?t[ye]>>14<t[Rs]>>16&&(t[ye]&3)===e&&(t[ye]+=16384,YE(a,o)):YE(a,o)}var ks=-1,Dc=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,n,r){this.factory=e,this.canSeeViewProviders=n,this.injectImpl=r}};function IR(t){return t instanceof Dc}function DR(t){return(t.flags&8)!==0}function TR(t){return(t.flags&16)!==0}function xR(t,e,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let o=n[r++],s=n[r++],a=n[r++];t.setAttribute(e,s,a,o)}else{let o=i,s=n[++r];RR(o)?t.setProperty(e,o,s):t.setAttribute(e,o,s),r++}}return r}function NR(t){return t===3||t===4||t===6}function RR(t){return t.charCodeAt(0)===64}function Tc(t,e){if(!(e===null||e.length===0))if(t===null||t.length===0)t=e.slice();else{let n=-1;for(let r=0;r<e.length;r++){let i=e[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?KE(t,n,i,null,e[++r]):KE(t,n,i,null,null))}}return t}function KE(t,e,n,r,i){let o=0,s=t.length;if(e===-1)s=-1;else for(;o<t.length;){let a=t[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<t.length;){let a=t[o];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(t[o+1]=i);return}else if(r===t[o+1]){t[o+2]=i;return}}o++,r!==null&&o++,i!==null&&o++}s!==-1&&(t.splice(s,0,e),o=s+1),t.splice(o++,0,n),r!==null&&t.splice(o++,0,r),i!==null&&t.splice(o++,0,i)}var Ih={},Wh=class{injector;parentInjector;constructor(e,n){this.injector=e,this.parentInjector=n}get(e,n,r){r=Qu(r);let i=this.injector.get(e,Ih,r);return i!==Ih||n===Ih?i:this.parentInjector.get(e,n,r)}};function Eb(t){return t!==ks}function Fu(t){return t&32767}function AR(t){return t>>16}function Bu(t,e){let n=AR(t),r=e;for(;n>0;)r=r[Us],n--;return r}var Gh=!0;function Vu(t){let e=Gh;return Gh=t,e}var MR=256,wb=MR-1,bb=5,OR=0,Or={};function PR(t,e,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(vc)&&(r=n[vc]),r==null&&(r=n[vc]=OR++);let i=r&wb,o=1<<i;e.data[t+(i>>bb)]|=o}function Cb(t,e){let n=Sb(t,e);if(n!==-1)return n;let r=e[Se];r.firstCreatePass&&(t.injectorIndex=e.length,Dh(r.data,t),Dh(e,null),Dh(r.blueprint,null));let i=tg(t,e),o=t.injectorIndex;if(Eb(i)){let s=Fu(i),a=Bu(i,e),c=a[Se].data;for(let l=0;l<8;l++)e[o+l]=a[s+l]|c[s+l]}return e[o+8]=i,o}function Dh(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Sb(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function tg(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let n=0,r=null,i=e;for(;i!==null;){if(r=Nb(i),r===null)return ks;if(n++,i=i[Us],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ks}function kR(t,e,n){PR(t,e,n)}function Ib(t,e,n){if(n&Ge.Optional||t!==void 0)return t;Vm(e,"NodeInjector")}function Db(t,e,n,r){if(n&Ge.Optional&&r===void 0&&(r=null),(n&(Ge.Self|Ge.Host))===0){let i=t[Sc],o=Vn(void 0);try{return i?i.get(e,r,n&Ge.Optional):kw(e,r,n&Ge.Optional)}finally{Vn(o)}}return Ib(r,e,n)}function Tb(t,e,n,r=Ge.Default,i){if(t!==null){if(e[ye]&2048&&!(r&Ge.Self)){let s=VR(t,e,n,r,Or);if(s!==Or)return s}let o=xb(t,e,n,r,Or);if(o!==Or)return o}return Db(e,n,r,i)}function xb(t,e,n,r,i){let o=FR(n);if(typeof o=="function"){if(!fb(e,t,r))return r&Ge.Host?Ib(i,n,r):Db(e,n,r,i);try{let s;if(s=o(r),s==null&&!(r&Ge.Optional))Vm(n);else return s}finally{gb()}}else if(typeof o=="number"){let s=null,a=Sb(t,e),c=ks,l=r&Ge.Host?e[wr][br]:null;for((a===-1||r&Ge.SkipSelf)&&(c=a===-1?tg(t,e):e[a+8],c===ks||!XE(r,!1)?a=-1:(s=e[Se],a=Fu(c),e=Bu(c,e)));a!==-1;){let u=e[Se];if(ZE(o,a,u.data)){let d=LR(a,e,n,s,r,l);if(d!==Or)return d}c=e[a+8],c!==ks&&XE(r,e[Se].data[a+8]===l)&&ZE(o,a,e)?(s=u,a=Fu(c),e=Bu(c,e)):a=-1}}return i}function LR(t,e,n,r,i,o){let s=e[Se],a=s.data[t+8],c=r==null?js(a)&&Gh:r!=s&&(a.type&3)!==0,l=i&Ge.Host&&o===a,u=Du(a,s,n,c,l);return u!==null?Uu(e,s,u,a):Or}function Du(t,e,n,r,i){let o=t.providerIndexes,s=e.data,a=o&1048575,c=t.directiveStart,l=t.directiveEnd,u=o>>20,d=r?a:a+u,m=i?a+u:l;for(let h=d;h<m;h++){let v=s[h];if(h<c&&n===v||h>=c&&v.type===n)return h}if(i){let h=s[c];if(h&&pi(h)&&h.type===n)return c}return null}function Uu(t,e,n,r){let i=t[n],o=e.data;if(IR(i)){let s=i;s.resolving&&_N(vN(o[n]));let a=Vu(s.canSeeViewProviders);s.resolving=!0;let c,l=s.injectImpl?Vn(s.injectImpl):null,u=fb(t,r,Ge.Default);try{i=t[n]=s.factory(void 0,o,t,r),e.firstCreatePass&&n>=r.directiveStart&&CR(n,o[n],e)}finally{l!==null&&Vn(l),Vu(a),s.resolving=!1,gb()}}return i}function FR(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(vc)?t[vc]:void 0;return typeof e=="number"?e>=0?e&wb:BR:e}function ZE(t,e,n){let r=1<<t;return!!(n[e+(t>>bb)]&r)}function XE(t,e){return!(t&Ge.Self)&&!(t&Ge.Host&&e)}var xo=class{_tNode;_lView;constructor(e,n){this._tNode=e,this._lView=n}get(e,n,r){return Tb(this._tNode,this._lView,e,Qu(r),n)}};function BR(){return new xo(Cr(),ze())}function id(t){return Ju(()=>{let e=t.prototype.constructor,n=e[Nu]||zh(e),r=Object.prototype,i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==r;){let o=i[Nu]||zh(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function zh(t){return Rw(t)?()=>{let e=zh(ir(t));return e&&e()}:No(t)}function VR(t,e,n,r,i){let o=t,s=e;for(;o!==null&&s!==null&&s[ye]&2048&&!Lu(s);){let a=xb(o,s,n,r|Ge.Self,Or);if(a!==Or)return a;let c=o.parent;if(!c){let l=s[Kw];if(l){let u=l.get(n,Or,r);if(u!==Or)return u}c=Nb(s),s=s[Us]}o=c}return i}function Nb(t){let e=t[Se],n=e.type;return n===2?e.declTNode:n===1?t[br]:null}function JE(t,e=null,n=null,r){let i=UR(t,e,n,r);return i.resolveInjectorInitializers(),i}function UR(t,e=null,n=null,r,i=new Set){let o=[n||Wi,LN(t)];return r=r||(typeof t=="object"?void 0:or(t)),new bc(o,e||td(),r||null,i)}var bt=class t{static THROW_IF_NOT_FOUND=Ec;static NULL=new Mu;static create(e,n){if(Array.isArray(e))return JE({name:""},n,e,"");{let r=e.name??"";return JE({name:r},e.parent,e.providers,r)}}static \u0275prov=ie({token:t,providedIn:"any",factory:()=>Ze(Bw)});static __NG_ELEMENT_ID__=-1};var jR=new ve("");jR.__NG_ELEMENT_ID__=t=>{let e=Cr();if(e===null)throw new Re(204,!1);if(e.type&2)return e.value;if(t&Ge.Optional)return null;throw new Re(204,!1)};var Rb=!1,ng=(()=>{class t{static __NG_ELEMENT_ID__=HR;static __NG_ENV_ID__=n=>n}return t})(),qh=class extends ng{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return ib(this._lView,e),()=>nR(this._lView,e)}};function HR(){return new qh(ze())}var hi=class{},od=new ve("",{providedIn:"root",factory:()=>!1});var Ab=new ve(""),rg=new ve(""),sd=(()=>{class t{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new ui(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=ie({token:t,providedIn:"root",factory:()=>new t})}return t})();var Yh=class extends Ne{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,qw()&&(this.destroyRef=P(ng,{optional:!0})??void 0,this.pendingTasks=P(sd,{optional:!0})??void 0)}emit(e){let n=Ve(null);try{super.next(e)}finally{Ve(n)}}subscribe(e,n,r){let i=e,o=n||(()=>null),s=r;if(e&&typeof e=="object"){let c=e;i=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(o=this.wrapInTimeout(o),i&&(i=this.wrapInTimeout(i)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:i,error:o,complete:s});return e instanceof Bt&&e.add(a),a}wrapInTimeout(e){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{e(n),r!==void 0&&this.pendingTasks?.remove(r)})}}},yt=Yh;function ju(...t){}function Mb(t){let e,n;function r(){t=ju;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{t(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{t(),r()})),()=>r()}function QE(t){return queueMicrotask(()=>t()),()=>{t=ju}}var ig="isAngularZone",Hu=ig+"_ID",$R=0,Ke=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yt(!1);onMicrotaskEmpty=new yt(!1);onStable=new yt(!1);onError=new yt(!1);constructor(e){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=Rb}=e;if(typeof Zone>"u")throw new Re(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,zR(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(ig)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new Re(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new Re(909,!1)}run(e,n,r){return this._inner.run(e,n,r)}runTask(e,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,WR,ju,ju);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(e,n,r){return this._inner.runGuarded(e,n,r)}runOutsideAngular(e){return this._outer.run(e)}},WR={};function og(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function GR(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function e(){Mb(()=>{t.callbackScheduled=!1,Kh(t),t.isCheckStableRunning=!0,og(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{e()}):t._outer.run(()=>{e()}),Kh(t)}function zR(t){let e=()=>{GR(t)},n=$R++;t._inner=t._inner.fork({name:"angular",properties:{[ig]:!0,[Hu]:n,[Hu+n]:!0},onInvokeTask:(r,i,o,s,a,c)=>{if(qR(c))return r.invokeTask(o,s,a,c);try{return ew(t),r.invokeTask(o,s,a,c)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),tw(t)}},onInvoke:(r,i,o,s,a,c,l)=>{try{return ew(t),r.invoke(o,s,a,c,l)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!YR(c)&&e(),tw(t)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,Kh(t),og(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function Kh(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function ew(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function tw(t){t._nesting--,og(t)}var $u=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yt;onMicrotaskEmpty=new yt;onStable=new yt;onError=new yt;run(e,n,r){return e.apply(n,r)}runGuarded(e,n,r){return e.apply(n,r)}runOutsideAngular(e){return e()}runTask(e,n,r,i){return e.apply(n,r)}};function qR(t){return Ob(t,"__ignore_ng_zone__")}function YR(t){return Ob(t,"__scheduler_tick__")}function Ob(t,e){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[e]===!0}var mi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},KR=new ve("",{providedIn:"root",factory:()=>{let t=P(Ke),e=P(mi);return n=>t.runOutsideAngular(()=>e.handleError(n))}});function ZR(){return Ws(Cr(),ze())}function Ws(t,e){return new qt(Vr(t,e))}var qt=(()=>{class t{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=ZR}return t})();function XR(t){return t instanceof qt?t.nativeElement:t}function Gs(t,e){let n=sE(t),r=n[li];return e?.equal&&(r.equal=e.equal),n.set=i=>dh(r,i),n.update=i=>aE(r,i),n.asReadonly=JR.bind(n),n}function JR(){let t=this[li];if(t.readonlyFn===void 0){let e=()=>this();e[li]=t,t.readonlyFn=e}return t.readonlyFn}function QR(){return this._results[Symbol.iterator]()}var Zh=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Ne}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,n){return this._results.reduce(e,n)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,n){this.dirty=!1;let r=AN(e);(this._changesDetected=!RN(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=QR};function Pb(t){return(t.flags&128)===128}var kb=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(kb||{}),Lb=new Map,eA=0;function tA(){return eA++}function nA(t){Lb.set(t[nd],t)}function Xh(t){Lb.delete(t[nd])}var nw="__ngContext__";function Bc(t,e){$i(e)?(t[nw]=e[nd],nA(e)):t[nw]=e}function Fb(t){return Vb(t[Ic])}function Bb(t){return Vb(t[Er])}function Vb(t){for(;t!==null&&!Ei(t);)t=t[Er];return t}var Jh;function Ub(t){Jh=t}function jb(){if(Jh!==void 0)return Jh;if(typeof document<"u")return document;throw new Re(210,!1)}var Vc=new ve("",{providedIn:"root",factory:()=>rA}),rA="ng",sg=new ve(""),Bo=new ve("",{providedIn:"platform",factory:()=>"unknown"});var Hb=new ve(""),ag=new ve("",{providedIn:"root",factory:()=>jb().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var iA="h",oA="b";var $b=!1,sA=new ve("",{providedIn:"root",factory:()=>$b});var cg=function(t){return t[t.CHANGE_DETECTION=0]="CHANGE_DETECTION",t[t.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",t}(cg||{}),zs=new ve(""),rw=new Set;function qi(t){rw.has(t)||(rw.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var Wb=(()=>{class t{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=aA}return t})();function aA(){return new Wb(ze(),Cr())}var As=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(As||{}),Gb=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=ie({token:t,providedIn:"root",factory:()=>new t})}return t})(),cA=[As.EarlyRead,As.Write,As.MixedReadWrite,As.Read],lA=(()=>{class t{ngZone=P(Ke);scheduler=P(hi);errorHandler=P(mi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){P(zs,{optional:!0})}execute(){let n=this.sequences.size>0;n&&pt(16),this.executing=!0;for(let r of cA)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&pt(17)}register(n){let{view:r}=n;r!==void 0?((r[Ps]??=[]).push(n),Lc(r),r[ye]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(cg.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ie({token:t,providedIn:"root",factory:()=>new t})}return t})(),Qh=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,n,r,i,o,s=null){this.impl=e,this.hooks=n,this.view=r,this.once=i,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[Ps];e&&(this.view[Ps]=e.filter(n=>n!==this))}};function lg(t,e){!e?.injector&&Yw(lg);let n=e?.injector??P(bt);return qi("NgAfterRender"),zb(t,n,e,!1)}function Yi(t,e){!e?.injector&&Yw(Yi);let n=e?.injector??P(bt);return qi("NgAfterNextRender"),zb(t,n,e,!0)}function uA(t,e){if(t instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[e]=t,n}else return[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function zb(t,e,n,r){let i=e.get(Gb);i.impl??=e.get(lA);let o=e.get(zs,null,{optional:!0}),s=n?.phase??As.MixedReadWrite,a=n?.manualCleanup!==!0?e.get(ng):null,c=e.get(Wb,null,{optional:!0}),l=new Qh(i.impl,uA(t,s),c?.view,r,a,o?.snapshot(null));return i.impl.register(l),l}var dA=()=>null;function qb(t,e,n=!1){return dA(t,e,n)}function Yb(t,e){let n=t.contentQueries;if(n!==null){let r=Ve(null);try{for(let i=0;i<n.length;i+=2){let o=n[i],s=n[i+1];if(s!==-1){let a=t.data[s];Km(o),a.contentQueries(2,e[s],s)}}}finally{Ve(r)}}}function em(t,e,n){Km(0);let r=Ve(null);try{e(t,n)}finally{Ve(r)}}function Kb(t,e,n){if(Xw(e)){let r=Ve(null);try{let i=e.directiveStart,o=e.directiveEnd;for(let s=i;s<o;s++){let a=t.data[s];if(a.contentQueries){let c=n[s];a.contentQueries(1,c,s)}}}finally{Ve(r)}}}var Lr=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(Lr||{}),_u;function fA(){if(_u===void 0&&(_u=null,_c.trustedTypes))try{_u=_c.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return _u}function ad(t){return fA()?.createHTML(t)||t}var Eu;function pA(){if(Eu===void 0&&(Eu=null,_c.trustedTypes))try{Eu=_c.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Eu}function iw(t){return pA()?.createHTML(t)||t}var gi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${xw})`}},tm=class extends gi{getTypeName(){return"HTML"}},nm=class extends gi{getTypeName(){return"Style"}},rm=class extends gi{getTypeName(){return"Script"}},im=class extends gi{getTypeName(){return"URL"}},om=class extends gi{getTypeName(){return"ResourceURL"}};function Ur(t){return t instanceof gi?t.changingThisBreaksApplicationSecurity:t}function Ki(t,e){let n=hA(t);if(n!=null&&n!==e){if(n==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${n} (see ${xw})`)}return n===e}function hA(t){return t instanceof gi&&t.getTypeName()||null}function Zb(t){return new tm(t)}function Xb(t){return new nm(t)}function Jb(t){return new rm(t)}function Qb(t){return new im(t)}function eC(t){return new om(t)}function mA(t){let e=new am(t);return gA()?new sm(e):e}var sm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let n=new window.DOMParser().parseFromString(ad(e),"text/html").body;return n===null?this.inertDocumentHelper.getInertBodyElement(e):(n.firstChild?.remove(),n)}catch{return null}}},am=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let n=this.inertDocument.createElement("template");return n.innerHTML=ad(e),n}};function gA(){try{return!!new window.DOMParser().parseFromString(ad(""),"text/html")}catch{return!1}}var yA=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function cd(t){return t=String(t),t.match(yA)?t:"unsafe:"+t}function wi(t){let e={};for(let n of t.split(","))e[n]=!0;return e}function Uc(...t){let e={};for(let n of t)for(let r in n)n.hasOwnProperty(r)&&(e[r]=!0);return e}var tC=wi("area,br,col,hr,img,wbr"),nC=wi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rC=wi("rp,rt"),vA=Uc(rC,nC),_A=Uc(nC,wi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),EA=Uc(rC,wi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),ow=Uc(tC,_A,EA,vA),iC=wi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),wA=wi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),bA=wi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),CA=Uc(iC,wA,bA),SA=wi("script,style,template"),cm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let n=e.firstChild,r=!0,i=[];for(;n;){if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild){i.push(n),n=TA(n);continue}for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let o=DA(n);if(o){n=o;break}n=i.pop()}}return this.buf.join("")}startElement(e){let n=sw(e).toLowerCase();if(!ow.hasOwnProperty(n))return this.sanitizedSomething=!0,!SA.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);let r=e.attributes;for(let i=0;i<r.length;i++){let o=r.item(i),s=o.name,a=s.toLowerCase();if(!CA.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let c=o.value;iC[a]&&(c=cd(c)),this.buf.push(" ",s,'="',aw(c),'"')}return this.buf.push(">"),!0}endElement(e){let n=sw(e).toLowerCase();ow.hasOwnProperty(n)&&!tC.hasOwnProperty(n)&&(this.buf.push("</"),this.buf.push(n),this.buf.push(">"))}chars(e){this.buf.push(aw(e))}};function IA(t,e){return(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function DA(t){let e=t.nextSibling;if(e&&t!==e.previousSibling)throw oC(e);return e}function TA(t){let e=t.firstChild;if(e&&IA(t,e))throw oC(e);return e}function sw(t){let e=t.nodeName;return typeof e=="string"?e:"FORM"}function oC(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var xA=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NA=/([^\#-~ |!])/g;function aw(t){return t.replace(/&/g,"&amp;").replace(xA,function(e){let n=e.charCodeAt(0),r=e.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(NA,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var wu;function ug(t,e){let n=null;try{wu=wu||mA(t);let r=e?String(e):"";n=wu.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=wu.getInertBodyElement(r)}while(r!==o);let a=new cm().sanitizeChildren(cw(n)||n);return ad(a)}finally{if(n){let r=cw(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function cw(t){return"content"in t&&RA(t)?t.content:null}function RA(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var jr=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(jr||{});function jc(t){let e=sC();return e?iw(e.sanitize(jr.HTML,t)||""):Ki(t,"HTML")?iw(Ur(t)):ug(jb(),Oc(t))}function cn(t){let e=sC();return e?e.sanitize(jr.URL,t)||"":Ki(t,"URL")?Ur(t):cd(Oc(t))}function sC(){let t=ze();return t&&t[di].sanitizer}function aC(t){return t.ownerDocument.defaultView}function AA(t,e,n){let r=t.length;for(;;){let i=t.indexOf(e,n);if(i===-1)return i;if(i===0||t.charCodeAt(i-1)<=32){let o=e.length;if(i+o===r||t.charCodeAt(i+o)<=32)return i}n=i+1}}var cC="ng-template";function MA(t,e,n,r){let i=0;if(r){for(;i<e.length&&typeof e[i]=="string";i+=2)if(e[i]==="class"&&AA(e[i+1].toLowerCase(),n,0)!==-1)return!0}else if(dg(t))return!1;if(i=e.indexOf(1,i),i>-1){let o;for(;++i<e.length&&typeof(o=e[i])=="string";)if(o.toLowerCase()===n)return!0}return!1}function dg(t){return t.type===4&&t.value!==cC}function OA(t,e,n){let r=t.type===4&&!n?cC:t.value;return e===r}function PA(t,e,n){let r=4,i=t.attrs,o=i!==null?FA(i):0,s=!1;for(let a=0;a<e.length;a++){let c=e[a];if(typeof c=="number"){if(!s&&!_r(r)&&!_r(c))return!1;if(s&&_r(c))continue;s=!1,r=c|r&1;continue}if(!s)if(r&4){if(r=2|r&1,c!==""&&!OA(t,c,n)||c===""&&e.length===1){if(_r(r))return!1;s=!0}}else if(r&8){if(i===null||!MA(t,i,c,n)){if(_r(r))return!1;s=!0}}else{let l=e[++a],u=kA(c,i,dg(t),n);if(u===-1){if(_r(r))return!1;s=!0;continue}if(l!==""){let d;if(u>o?d="":d=i[u+1].toLowerCase(),r&2&&l!==d){if(_r(r))return!1;s=!0}}}}return _r(r)||s}function _r(t){return(t&1)===0}function kA(t,e,n,r){if(e===null)return-1;let i=0;if(r||!n){let o=!1;for(;i<e.length;){let s=e[i];if(s===t)return i;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++i];for(;typeof a=="string";)a=e[++i];continue}else{if(s===4)break;if(s===0){i+=4;continue}}i+=o?1:2}return-1}else return BA(e,t)}function LA(t,e,n=!1){for(let r=0;r<e.length;r++)if(PA(t,e[r],n))return!0;return!1}function FA(t){for(let e=0;e<t.length;e++){let n=t[e];if(NR(n))return e}return t.length}function BA(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){let r=t[n];if(typeof r=="number")return-1;if(r===e)return n;n++}return-1}function lw(t,e){return t?":not("+e.trim()+")":e}function VA(t){let e=t[0],n=1,r=2,i="",o=!1;for(;n<t.length;){let s=t[n];if(typeof s=="string")if(r&2){let a=t[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!_r(s)&&(e+=lw(o,i),i=""),r=s,o=o||!_r(r);n++}return i!==""&&(e+=lw(o,i)),e}function UA(t){return t.map(VA).join(",")}function jA(t){let e=[],n=[],r=1,i=2;for(;r<t.length;){let o=t[r];if(typeof o=="string")i===2?o!==""&&e.push(o,t[++r]):i===8&&n.push(o);else{if(!_r(i))break;i=o}r++}return n.length&&e.push(1,...n),e}var bi={};function HA(t,e){return t.createText(e)}function $A(t,e,n){t.setValue(e,n)}function lC(t,e,n){return t.createElement(e,n)}function Wu(t,e,n,r,i){t.insertBefore(e,n,r,i)}function uC(t,e,n){t.appendChild(e,n)}function uw(t,e,n,r,i){r!==null?Wu(t,e,n,r,i):uC(t,e,n)}function WA(t,e,n){t.removeChild(null,e,n)}function GA(t,e,n){t.setAttribute(e,"style",n)}function zA(t,e,n){n===""?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n)}function dC(t,e,n){let{mergedAttrs:r,classes:i,styles:o}=n;r!==null&&xR(t,e,r),i!==null&&zA(t,e,i),o!==null&&GA(t,e,o)}function fg(t,e,n,r,i,o,s,a,c,l,u){let d=vn+r,m=d+i,h=qA(d,m),v=typeof l=="function"?l():l;return h[Se]={type:t,blueprint:h,template:n,queries:null,viewQuery:a,declTNode:e,data:h.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:m,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:c,consts:v,incompleteFirstPass:!1,ssrId:u}}function qA(t,e){let n=[];for(let r=0;r<e;r++)n.push(r<t?null:bi);return n}function YA(t){let e=t.tView;return e===null||e.incompleteFirstPass?t.tView=fg(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts,t.id):e}function pg(t,e,n,r,i,o,s,a,c,l,u){let d=e.blueprint.slice();return d[_i]=i,d[ye]=r|4|128|8|64|1024,(l!==null||t&&t[ye]&2048)&&(d[ye]|=2048),rb(d),d[Sn]=d[Us]=t,d[en]=n,d[di]=s||t&&t[di],d[an]=a||t&&t[an],d[Sc]=c||t&&t[Sc]||null,d[br]=o,d[nd]=tA(),d[Cc]=u,d[Kw]=l,d[wr]=e.type==2?t[wr]:d,d}function KA(t,e,n){let r=Vr(e,t),i=YA(n),o=t[di].rendererFactory,s=hg(t,pg(t,i,null,fC(n),r,e,null,o.createRenderer(r,n),null,null,null));return t[e.index]=s}function fC(t){let e=16;return t.signals?e=4096:t.onPush&&(e=64),e}function pC(t,e,n,r){if(n===0)return-1;let i=e.length;for(let o=0;o<n;o++)e.push(r),t.blueprint.push(r),t.data.push(null);return i}function hg(t,e){return t[Ic]?t[GE][Er]=e:t[Ic]=e,t[GE]=e,e}function Z(t=1){hC(In(),ze(),zi()+t,!1)}function hC(t,e,n,r){if(!r)if((e[ye]&3)===3){let o=t.preOrderCheckHooks;o!==null&&Su(e,o,n)}else{let o=t.preOrderHooks;o!==null&&Iu(e,o,0,n)}ko(n)}var ld=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(ld||{});function lm(t,e,n,r){let i=Ve(null);try{let[o,s,a]=t.inputs[n],c=null;(s&ld.SignalBased)!==0&&(c=e[o][li]),c!==null&&c.transformFn!==void 0?r=c.transformFn(r):a!==null&&(r=a.call(e,r)),t.setInput!==null?t.setInput(e,c,r,n,o):Jw(e,c,o,r)}finally{Ve(i)}}function mC(t,e,n,r,i){let o=zi(),s=r&2;try{ko(-1),s&&e.length>vn&&hC(t,e,vn,!1),pt(s?2:0,i),n(r,i)}finally{ko(o),pt(s?3:1,i)}}function mg(t,e,n){tM(t,e,n),(n.flags&64)===64&&nM(t,e,n)}function gC(t,e,n=Vr){let r=e.localNames;if(r!==null){let i=e.index+1;for(let o=0;o<r.length;o+=2){let s=r[o+1],a=s===-1?n(e,t):t[s];t[i++]=a}}}function ZA(t,e,n,r){let o=r.get(sA,$b)||n===Lr.ShadowDom,s=t.selectRootElement(e,o);return XA(s),s}function XA(t){JA(t)}var JA=()=>null;function QA(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function yC(t,e,n,r,i,o,s,a){if(!a&&gg(e,t,n,r,i)){js(e)&&eM(n,e.index);return}if(e.type&3){let c=Vr(e,n);r=QA(r),i=s!=null?s(i,e.value||"",r):i,o.setProperty(c,r,i)}else e.type&12}function eM(t,e){let n=kr(e,t);n[ye]&16||(n[ye]|=64)}function tM(t,e,n){let r=n.directiveStart,i=n.directiveEnd;js(n)&&KA(e,n,t.data[r+n.componentOffset]),t.firstCreatePass||Cb(n,e);let o=n.initialInputs;for(let s=r;s<i;s++){let a=t.data[s],c=Uu(e,t,s,n);if(Bc(c,e),o!==null&&sM(e,s-r,c,a,n,o),pi(a)){let l=kr(n.index,e);l[en]=Uu(e,t,s,n)}}}function nM(t,e,n){let r=n.directiveStart,i=n.directiveEnd,o=n.index,s=yR();try{ko(o);for(let a=r;a<i;a++){let c=t.data[a],l=e[a];$h(a),(c.hostBindings!==null||c.hostVars!==0||c.hostAttrs!==null)&&rM(c,l)}}finally{ko(-1),$h(s)}}function rM(t,e){t.hostBindings!==null&&t.hostBindings(1,e)}function vC(t,e){let n=t.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let o=n[i];LA(e,o.selectors,!1)&&(r??=[],pi(o)?r.unshift(o):r.push(o))}return r}function iM(t,e,n,r,i,o){let s=Vr(t,e);oM(e[an],s,o,t.value,n,r,i)}function oM(t,e,n,r,i,o,s){if(o==null)t.removeAttribute(e,i,n);else{let a=s==null?Oc(o):s(o,r||"",i);t.setAttribute(e,i,a,n)}}function sM(t,e,n,r,i,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let c=s[a],l=s[a+1];lm(r,n,c,l)}}function _C(t,e){let n=t[Sc],r=n?n.get(mi,null):null;r&&r.handleError(e)}function gg(t,e,n,r,i){let o=t.inputs?.[r],s=t.hostDirectiveInputs?.[r],a=!1;if(s)for(let c=0;c<s.length;c+=2){let l=s[c],u=s[c+1],d=e.data[l];lm(d,n[l],u,i),a=!0}if(o)for(let c of o){let l=n[c],u=e.data[c];lm(u,l,r,i),a=!0}return a}function aM(t,e){let n=kr(e,t),r=n[Se];cM(r,n);let i=n[_i];i!==null&&n[Cc]===null&&(n[Cc]=qb(i,n[Sc])),pt(18),yg(r,n,n[en]),pt(19,n[en])}function cM(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}function yg(t,e,n){Zm(e);try{let r=t.viewQuery;r!==null&&em(1,r,n);let i=t.template;i!==null&&mC(t,e,i,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),e[fi]?.finishViewCreation(t),t.staticContentQueries&&Yb(t,e),t.staticViewQueries&&em(2,t.viewQuery,n);let o=t.components;o!==null&&lM(e,o)}catch(r){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),r}finally{e[ye]&=-5,Xm()}}function lM(t,e){for(let n=0;n<e.length;n++)aM(t,e[n])}function ud(t,e,n,r){let i=Ve(null);try{let o=e.tView,a=t[ye]&4096?4096:16,c=pg(t,o,n,a,null,e,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=t[e.index];c[Mo]=l;let u=t[fi];return u!==null&&(c[fi]=u.createEmbeddedView(o)),yg(o,c,n),c}finally{Ve(i)}}function xc(t,e){return!e||e.firstChild===null||Pb(t)}var uM;function vg(t,e){return uM(t,e)}var Fr=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(Fr||{});function EC(t){return(t.flags&32)===32}function Ms(t,e,n,r,i){if(r!=null){let o,s=!1;Ei(r)?o=r:$i(r)&&(s=!0,r=r[_i]);let a=Pr(r);t===0&&n!==null?i==null?uC(e,n,a):Wu(e,n,a,i||null,!0):t===1&&n!==null?Wu(e,n,a,i||null,!0):t===2?WA(e,a,s):t===3&&e.destroyNode(a),o!=null&&bM(e,t,o,n,i)}}function dM(t,e){wC(t,e),e[_i]=null,e[br]=null}function fM(t,e,n,r,i,o){r[_i]=i,r[br]=e,fd(t,r,n,1,i,o)}function wC(t,e){e[di].changeDetectionScheduler?.notify(9),fd(t,e,e[an],2,null,null)}function pM(t){let e=t[Ic];if(!e)return Th(t[Se],t);for(;e;){let n=null;if($i(e))n=e[Ic];else{let r=e[Cn];r&&(n=r)}if(!n){for(;e&&!e[Er]&&e!==t;)$i(e)&&Th(e[Se],e),e=e[Sn];e===null&&(e=t),$i(e)&&Th(e[Se],e),n=e&&e[Er]}e=n}}function _g(t,e){let n=t[Ls],r=n.indexOf(e);n.splice(r,1)}function dd(t,e){if(kc(e))return;let n=e[an];n.destroyNode&&fd(t,e,n,3,null,null),pM(e)}function Th(t,e){if(kc(e))return;let n=Ve(null);try{e[ye]&=-129,e[ye]|=256,e[zn]&&uh(e[zn]),mM(t,e),hM(t,e),e[Se].type===1&&e[an].destroy();let r=e[Mo];if(r!==null&&Ei(e[Sn])){r!==e[Sn]&&_g(r,e);let i=e[fi];i!==null&&i.detachView(t)}Xh(e)}finally{Ve(n)}}function hM(t,e){let n=t.cleanup,r=e[Ou];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(e[Ou]=null);let i=e[Hi];if(i!==null){e[Hi]=null;for(let s=0;s<i.length;s++){let a=i[s];a()}}let o=e[Pu];if(o!==null){e[Pu]=null;for(let s of o)s.destroy()}}function mM(t,e){let n;if(t!=null&&(n=t.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=e[n[r]];if(!(i instanceof Dc)){let o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=i[o[s]],c=o[s+1];pt(4,a,c);try{c.call(a)}finally{pt(5,a,c)}}else{pt(4,i,o);try{o.call(i)}finally{pt(5,i,o)}}}}}function gM(t,e,n){return yM(t,e.parent,n)}function yM(t,e,n){let r=e;for(;r!==null&&r.type&168;)e=r,r=e.parent;if(r===null)return n[_i];if(js(r)){let{encapsulation:i}=t.data[r.directiveStart+r.componentOffset];if(i===Lr.None||i===Lr.Emulated)return null}return Vr(r,n)}function vM(t,e,n){return EM(t,e,n)}function _M(t,e,n){return t.type&40?Vr(t,n):null}var EM=_M,dw;function Eg(t,e,n,r){let i=gM(t,r,e),o=e[an],s=r.parent||e[br],a=vM(s,r,e);if(i!=null)if(Array.isArray(n))for(let c=0;c<n.length;c++)uw(o,i,n[c],a,!1);else uw(o,i,n,a,!1);dw!==void 0&&dw(o,r,e,n,i)}function yc(t,e){if(e!==null){let n=e.type;if(n&3)return Vr(e,t);if(n&4)return um(-1,t[e.index]);if(n&8){let r=e.child;if(r!==null)return yc(t,r);{let i=t[e.index];return Ei(i)?um(-1,i):Pr(i)}}else{if(n&128)return yc(t,e.next);if(n&32)return vg(e,t)()||Pr(t[e.index]);{let r=bC(t,e);if(r!==null){if(Array.isArray(r))return r[0];let i=Po(t[wr]);return yc(i,r)}else return yc(t,e.next)}}}return null}function bC(t,e){if(e!==null){let r=t[wr][br],i=e.projection;return r.projection[i]}return null}function um(t,e){let n=Cn+t+1;if(n<e.length){let r=e[n],i=r[Se].firstChild;if(i!==null)return yc(r,i)}return e[Oo]}function wg(t,e,n,r,i,o,s){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],c=n.type;if(s&&e===0&&(a&&Bc(Pr(a),r),n.flags|=2),!EC(n))if(c&8)wg(t,e,n.child,r,i,o,!1),Ms(e,t,i,a,o);else if(c&32){let l=vg(n,r),u;for(;u=l();)Ms(e,t,i,u,o);Ms(e,t,i,a,o)}else c&16?wM(t,e,r,n,i,o):Ms(e,t,i,a,o);n=s?n.projectionNext:n.next}}function fd(t,e,n,r,i,o){wg(n,r,t.firstChild,e,i,o,!1)}function wM(t,e,n,r,i,o){let s=n[wr],c=s[br].projection[r.projection];if(Array.isArray(c))for(let l=0;l<c.length;l++){let u=c[l];Ms(e,t,i,u,o)}else{let l=c,u=s[Sn];Pb(r)&&(l.flags|=128),wg(t,e,l,u,i,o,!0)}}function bM(t,e,n,r,i){let o=n[Oo],s=Pr(n);o!==s&&Ms(e,t,r,o,i);for(let a=Cn;a<n.length;a++){let c=n[a];fd(c[Se],c,t,e,r,o)}}function CM(t,e,n,r,i){if(e)i?t.addClass(n,r):t.removeClass(n,r);else{let o=r.indexOf("-")===-1?void 0:Fr.DashCase;i==null?t.removeStyle(n,r,o):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=Fr.Important),t.setStyle(n,r,i,o))}}function Gu(t,e,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let o=e[n.index];o!==null&&r.push(Pr(o)),Ei(o)&&SM(o,r);let s=n.type;if(s&8)Gu(t,e,n.child,r);else if(s&32){let a=vg(n,e),c;for(;c=a();)r.push(c)}else if(s&16){let a=bC(e,n);if(Array.isArray(a))r.push(...a);else{let c=Po(e[wr]);Gu(c[Se],c,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function SM(t,e){for(let n=Cn;n<t.length;n++){let r=t[n],i=r[Se].firstChild;i!==null&&Gu(r[Se],r,i,e)}t[Oo]!==t[_i]&&e.push(t[Oo])}function CC(t){if(t[Ps]!==null){for(let e of t[Ps])e.impl.addSequence(e);t[Ps].length=0}}var SC=[];function IM(t){return t[zn]??DM(t)}function DM(t){let e=SC.pop()??Object.create(xM);return e.lView=t,e}function TM(t){t.lView[zn]!==t&&(t.lView=null,SC.push(t))}var xM=ne(w({},Wl),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{Lc(t.lView)},consumerOnSignalRead(){this.lView[zn]=this}});function NM(t){let e=t[zn]??Object.create(RM);return e.lView=t,e}var RM=ne(w({},Wl),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let e=Po(t.lView);for(;e&&!IC(e[Se]);)e=Po(e);e&&qm(e)},consumerOnSignalRead(){this.lView[zn]=this}});function IC(t){return t.type!==2}function DC(t){if(t[Pu]===null)return;let e=!0;for(;e;){let n=!1;for(let r of t[Pu])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));e=n&&!!(t[ye]&8192)}}var AM=100;function TC(t,e=!0,n=0){let i=t[di].rendererFactory,o=!1;o||i.begin?.();try{MM(t,n)}catch(s){throw e&&_C(t,s),s}finally{o||i.end?.()}}function MM(t,e){let n=ub();try{qE(!0),dm(t,e);let r=0;for(;rd(t);){if(r===AM)throw new Re(103,!1);r++,dm(t,1)}}finally{qE(n)}}function OM(t,e,n,r){if(kc(e))return;let i=e[ye],o=!1,s=!1;Zm(e);let a=!0,c=null,l=null;o||(IC(t)?(l=IM(e),c=ch(l)):K_()===null?(a=!1,l=NM(e),c=ch(l)):e[zn]&&(uh(e[zn]),e[zn]=null));try{rb(e),pR(t.bindingStartIndex),n!==null&&mC(t,e,n,2,r);let u=(i&3)===3;if(!o)if(u){let h=t.preOrderCheckHooks;h!==null&&Su(e,h,null)}else{let h=t.preOrderHooks;h!==null&&Iu(e,h,0,null),Sh(e,0)}if(s||PM(e),DC(e),xC(e,0),t.contentQueries!==null&&Yb(t,e),!o)if(u){let h=t.contentCheckHooks;h!==null&&Su(e,h)}else{let h=t.contentHooks;h!==null&&Iu(e,h,1),Sh(e,1)}LM(t,e);let d=t.components;d!==null&&RC(e,d,0);let m=t.viewQuery;if(m!==null&&em(2,m,r),!o)if(u){let h=t.viewCheckHooks;h!==null&&Su(e,h)}else{let h=t.viewHooks;h!==null&&Iu(e,h,2),Sh(e,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),e[Ch]){for(let h of e[Ch])h();e[Ch]=null}o||(CC(e),e[ye]&=-73)}catch(u){throw o||Lc(e),u}finally{l!==null&&(Q_(l,c),a&&TM(l)),Xm()}}function xC(t,e){for(let n=Fb(t);n!==null;n=Bb(n))for(let r=Cn;r<n.length;r++){let i=n[r];NC(i,e)}}function PM(t){for(let e=Fb(t);e!==null;e=Bb(e)){if(!(e[ye]&2))continue;let n=e[Ls];for(let r=0;r<n.length;r++){let i=n[r];qm(i)}}}function kM(t,e,n){pt(18);let r=kr(e,t);NC(r,n),pt(19,r[en])}function NC(t,e){zm(t)&&dm(t,e)}function dm(t,e){let r=t[Se],i=t[ye],o=t[zn],s=!!(e===0&&i&16);if(s||=!!(i&64&&e===0),s||=!!(i&1024),s||=!!(o?.dirty&&lh(o)),s||=!1,o&&(o.dirty=!1),t[ye]&=-9217,s)OM(r,t,r.template,t[en]);else if(i&8192){DC(t),xC(t,1);let a=r.components;a!==null&&RC(t,a,1),CC(t)}}function RC(t,e,n){for(let r=0;r<e.length;r++)kM(t,e[r],n)}function LM(t,e){let n=t.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)ko(~i);else{let o=i,s=n[++r],a=n[++r];gR(s,o);let c=e[o];pt(24,c),a(2,c),pt(25,c)}}}finally{ko(-1)}}function bg(t,e){let n=ub()?64:1088;for(t[di].changeDetectionScheduler?.notify(e);t;){t[ye]|=n;let r=Po(t);if(Lu(t)&&!r)return t;t=r}return null}function AC(t,e,n,r){return[t,!0,0,e,null,r,null,n,null,null]}function MC(t,e){let n=Cn+e;if(n<t.length)return t[n]}function pd(t,e,n,r=!0){let i=e[Se];if(FM(i,e,t,n),r){let s=um(n,t),a=e[an],c=a.parentNode(t[Oo]);c!==null&&fM(i,t[br],a,e,c,s)}let o=e[Cc];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function OC(t,e){let n=Nc(t,e);return n!==void 0&&dd(n[Se],n),n}function Nc(t,e){if(t.length<=Cn)return;let n=Cn+e,r=t[n];if(r){let i=r[Mo];i!==null&&i!==t&&_g(i,r),e>0&&(t[n-1][Er]=r[Er]);let o=Au(t,Cn+e);dM(r[Se],r);let s=o[fi];s!==null&&s.detachView(o[Se]),r[Sn]=null,r[Er]=null,r[ye]&=-129}return r}function FM(t,e,n,r){let i=Cn+r,o=n.length;r>0&&(n[i-1][Er]=e),r<o-Cn?(e[Er]=n[i],Fw(n,Cn+r,e)):(n.push(e),e[Er]=null),e[Sn]=n;let s=e[Mo];s!==null&&n!==s&&PC(s,e);let a=e[fi];a!==null&&a.insertView(t),jh(e),e[ye]|=128}function PC(t,e){let n=t[Ls],r=e[Sn];if($i(r))t[ye]|=2;else{let i=r[Sn][wr];e[wr]!==i&&(t[ye]|=2)}n===null?t[Ls]=[e]:n.push(e)}var Lo=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,n=e[Se];return Gu(n,e,n.firstChild,[])}constructor(e,n,r=!0){this._lView=e,this._cdRefInjectingView=n,this.notifyErrorHandler=r}get context(){return this._lView[en]}get dirty(){return!!(this._lView[ye]&9280)||!!this._lView[zn]?.dirty}set context(e){this._lView[en]=e}get destroyed(){return kc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Sn];if(Ei(e)){let n=e[ku],r=n?n.indexOf(this):-1;r>-1&&(Nc(e,r),Au(n,r))}this._attachedToViewContainer=!1}dd(this._lView[Se],this._lView)}onDestroy(e){ib(this._lView,e)}markForCheck(){bg(this._cdRefInjectingView||this._lView,4)}markForRefresh(){qm(this._cdRefInjectingView||this._lView)}detach(){this._lView[ye]&=-129}reattach(){jh(this._lView),this._lView[ye]|=128}detectChanges(){this._lView[ye]|=1024,TC(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Re(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Lu(this._lView),n=this._lView[Mo];n!==null&&!e&&_g(n,this._lView),wC(this._lView[Se],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Re(902,!1);this._appRef=e;let n=Lu(this._lView),r=this._lView[Mo];r!==null&&!n&&PC(r,this._lView),jh(this._lView)}},Br=(()=>{class t{static __NG_ELEMENT_ID__=UM}return t})(),BM=Br,VM=class extends BM{_declarationLView;_declarationTContainer;elementRef;constructor(e,n,r){super(),this._declarationLView=e,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,n){return this.createEmbeddedViewImpl(e,n)}createEmbeddedViewImpl(e,n,r){let i=ud(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:n,dehydratedView:r});return new Lo(i)}};function UM(){return Cg(Cr(),ze())}function Cg(t,e){return t.type&4?new VM(e,t,Ws(t,e)):null}function hd(t,e,n,r,i){let o=t.data[e];if(o===null)o=jM(t,e,n,r,i),mR()&&(o.flags|=32);else if(o.type&64){o.type=n,o.value=r,o.attrs=i;let s=uR();o.injectorIndex=s===null?-1:s.injectorIndex}return Hs(o,!0),o}function jM(t,e,n,r,i){let o=cb(),s=lb(),a=s?o:o&&o.parent,c=t.data[e]=$M(t,a,n,e,r,i);return HM(t,c,o,s),c}function HM(t,e,n,r){t.firstChild===null&&(t.firstChild=e),n!==null&&(r?n.child==null&&e.parent!==null&&(n.child=e):n.next===null&&(n.next=e,e.prev=n))}function $M(t,e,n,r,i,o){let s=e?e.injectorIndex:-1,a=0;return aR()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var g3=new RegExp(`^(\\d+)*(${oA}|${iA})*(.*)`);var WM=()=>null;function Rc(t,e){return WM(t,e)}var fm=class{},zu=class{},pm=class{resolveComponentFactory(e){throw Error(`No component factory found for ${or(e)}.`)}},Gi=class{static NULL=new pm},An=class{},qs=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>GM()}return t})();function GM(){let t=ze(),e=Cr(),n=kr(e.index,t);return($i(n)?n:t)[an]}var zM=(()=>{class t{static \u0275prov=ie({token:t,providedIn:"root",factory:()=>null})}return t})();function fw(t,e,n){let r=n?t.styles:null,i=n?t.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)i=VE(i,a);else if(o==2){let c=a,l=e[++s];r=VE(r,c+": "+l+";")}}n?t.styles=r:t.stylesWithoutHost=r,n?t.classes=i:t.classesWithoutHost=i}function Yt(t,e=Ge.Default){let n=ze();if(n===null)return Ze(t,e);let r=Cr();return Tb(r,n,ir(t),e)}function kC(t,e,n,r,i){let o=r===null?null:{"":-1},s=i(t,n);if(s!==null){let a,c=null,l=null,u=YM(s);u===null?a=s:[a,c,l]=u,XM(t,e,n,a,o,c,l)}o!==null&&r!==null&&qM(n,r,o)}function qM(t,e,n){let r=t.localNames=[];for(let i=0;i<e.length;i+=2){let o=n[e[i+1]];if(o==null)throw new Re(-301,!1);r.push(e[i],o)}}function YM(t){let e=null,n=!1;for(let s=0;s<t.length;s++){let a=t[s];if(s===0&&pi(a)&&(e=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,o=null;for(let s of t)s.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,o??=new Map,KM(s,r,o,i)),s===e&&(r??=[],r.push(s));return r!==null?(r.push(...e===null?t:t.slice(1)),[r,i,o]):null}function KM(t,e,n,r){let i=e.length;t.findHostDirectiveDefs(t,e,r),n.set(t,[i,e.length-1])}function ZM(t,e,n){e.componentOffset=n,(t.components??=[]).push(e.index)}function XM(t,e,n,r,i,o,s){let a=r.length,c=!1;for(let m=0;m<a;m++){let h=r[m];!c&&pi(h)&&(c=!0,ZM(t,n,m)),kR(Cb(n,e),t,h.type)}rO(n,t.data.length,a);for(let m=0;m<a;m++){let h=r[m];h.providersResolver&&h.providersResolver(h)}let l=!1,u=!1,d=pC(t,e,a,null);a>0&&(n.directiveToIndex=new Map);for(let m=0;m<a;m++){let h=r[m];if(n.mergedAttrs=Tc(n.mergedAttrs,h.hostAttrs),QM(t,n,e,d,h),nO(d,h,i),s!==null&&s.has(h)){let[N,M]=s.get(h);n.directiveToIndex.set(h.type,[d,N+n.directiveStart,M+n.directiveStart])}else(o===null||!o.has(h))&&n.directiveToIndex.set(h.type,d);h.contentQueries!==null&&(n.flags|=4),(h.hostBindings!==null||h.hostAttrs!==null||h.hostVars!==0)&&(n.flags|=64);let v=h.type.prototype;!l&&(v.ngOnChanges||v.ngOnInit||v.ngDoCheck)&&((t.preOrderHooks??=[]).push(n.index),l=!0),!u&&(v.ngOnChanges||v.ngDoCheck)&&((t.preOrderCheckHooks??=[]).push(n.index),u=!0),d++}JM(t,n,o)}function JM(t,e,n){for(let r=e.directiveStart;r<e.directiveEnd;r++){let i=t.data[r];if(n===null||!n.has(i))pw(0,e,i,r),pw(1,e,i,r),mw(e,r,!1);else{let o=n.get(i);hw(0,e,o,r),hw(1,e,o,r),mw(e,r,!0)}}}function pw(t,e,n,r){let i=t===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s;t===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(r),LC(e,o)}}function hw(t,e,n,r){let i=t===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o],a;t===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,o),LC(e,s)}}function LC(t,e){e==="class"?t.flags|=8:e==="style"&&(t.flags|=16)}function mw(t,e,n){let{attrs:r,inputs:i,hostDirectiveInputs:o}=t;if(r===null||!n&&i===null||n&&o===null||dg(t)){t.initialInputs??=[],t.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let c=r[a];if(c===0){a+=4;continue}else if(c===5){a+=2;continue}else if(typeof c=="number")break;if(!n&&i.hasOwnProperty(c)){let l=i[c];for(let u of l)if(u===e){s??=[],s.push(c,r[a+1]);break}}else if(n&&o.hasOwnProperty(c)){let l=o[c];for(let u=0;u<l.length;u+=2)if(l[u]===e){s??=[],s.push(l[u+1],r[a+1]);break}}a+=2}t.initialInputs??=[],t.initialInputs.push(s)}function QM(t,e,n,r,i){t.data[r]=i;let o=i.factory||(i.factory=No(i.type,!0)),s=new Dc(o,pi(i),Yt);t.blueprint[r]=s,n[r]=s,eO(t,e,r,pC(t,n,i.hostVars,bi),i)}function eO(t,e,n,r,i){let o=i.hostBindings;if(o){let s=t.hostBindingOpCodes;s===null&&(s=t.hostBindingOpCodes=[]);let a=~e.index;tO(s)!=a&&s.push(a),s.push(n,r,o)}}function tO(t){let e=t.length;for(;e>0;){let n=t[--e];if(typeof n=="number"&&n<0)return n}return 0}function nO(t,e,n){if(n){if(e.exportAs)for(let r=0;r<e.exportAs.length;r++)n[e.exportAs[r]]=t;pi(e)&&(n[""]=t)}}function rO(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function FC(t,e,n,r,i,o,s,a){let c=e.consts,l=Fs(c,s),u=hd(e,t,2,r,l);return o&&kC(e,n,u,Fs(c,a),i),u.mergedAttrs=Tc(u.mergedAttrs,u.attrs),u.attrs!==null&&fw(u,u.attrs,!1),u.mergedAttrs!==null&&fw(u,u.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,u),u}function BC(t,e){vb(t,e),Xw(e)&&t.queries.elementEnd(e)}var hm=class extends Gi{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let n=Ao(e);return new Ac(n,this.ngModule)}};function iO(t){return Object.keys(t).map(e=>{let[n,r,i]=t[e],o={propName:n,templateName:e,isSignal:(r&ld.SignalBased)!==0};return i&&(o.transform=i),o})}function oO(t){return Object.keys(t).map(e=>({propName:t[e],templateName:e}))}function sO(t,e,n){let r=e instanceof Un?e:e?.injector;return r&&t.getStandaloneInjector!==null&&(r=t.getStandaloneInjector(r)||r),r?new Wh(n,r):n}function aO(t){let e=t.get(An,null);if(e===null)throw new Re(407,!1);let n=t.get(zM,null),r=t.get(hi,null);return{rendererFactory:e,sanitizer:n,changeDetectionScheduler:r}}function cO(t,e){let n=(t.selectors[0][0]||"div").toLowerCase();return lC(e,n,n==="svg"?tb:n==="math"?JN:null)}var Ac=class extends zu{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return iO(this.componentDef.inputs)}get outputs(){return oO(this.componentDef.outputs)}constructor(e,n){super(),this.componentDef=e,this.ngModule=n,this.componentType=e.type,this.selector=UA(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!n}create(e,n,r,i){pt(22);let o=Ve(null);try{let s=this.componentDef,a=r?["ng-version","19.2.0"]:jA(this.componentDef.selectors[0]),c=fg(0,null,null,1,0,null,null,null,null,[a],null),l=sO(s,i||this.ngModule,e),u=aO(l),d=u.rendererFactory.createRenderer(null,s),m=r?ZA(d,r,s.encapsulation,l):cO(s,d),h=pg(null,c,null,512|fC(s),null,null,u,d,l,null,qb(m,l,!0));h[vn]=m,Zm(h);let v=null;try{let N=FC(vn,c,h,"#host",()=>[this.componentDef],!0,0);m&&(dC(d,m,N),Bc(m,h)),mg(c,h,N),Kb(c,N,h),BC(c,N),n!==void 0&&lO(N,this.ngContentSelectors,n),v=kr(N.index,h),h[en]=v[en],yg(c,h,null)}catch(N){throw v!==null&&Xh(v),Xh(h),N}finally{pt(23),Xm()}return new mm(this.componentType,h)}finally{Ve(o)}}},mm=class extends fm{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,n){super(),this._rootLView=n,this._tNode=Wm(n[Se],vn),this.location=Ws(this._tNode,n),this.instance=kr(this._tNode.index,n)[en],this.hostView=this.changeDetectorRef=new Lo(n,void 0,!1),this.componentType=e}setInput(e,n){let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),n))return;let i=this._rootLView,o=gg(r,i[Se],i,e,n);this.previousInputValues.set(e,n);let s=kr(r.index,i);bg(s,1)}get injector(){return new xo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function lO(t,e,n){let r=t.projection=[];for(let i=0;i<e.length;i++){let o=n[i];r.push(o!=null&&o.length?Array.from(o):null)}}var Zi=(()=>{class t{static __NG_ELEMENT_ID__=uO}return t})();function uO(){let t=Cr();return UC(t,ze())}var dO=Zi,VC=class extends dO{_lContainer;_hostTNode;_hostLView;constructor(e,n,r){super(),this._lContainer=e,this._hostTNode=n,this._hostLView=r}get element(){return Ws(this._hostTNode,this._hostLView)}get injector(){return new xo(this._hostTNode,this._hostLView)}get parentInjector(){let e=tg(this._hostTNode,this._hostLView);if(Eb(e)){let n=Bu(e,this._hostLView),r=Fu(e),i=n[Se].data[r+8];return new xo(i,n)}else return new xo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let n=gw(this._lContainer);return n!==null&&n[e]||null}get length(){return this._lContainer.length-Cn}createEmbeddedView(e,n,r){let i,o;typeof r=="number"?i=r:r!=null&&(i=r.index,o=r.injector);let s=Rc(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(n||{},o,s);return this.insertImpl(a,i,xc(this._hostTNode,s)),a}createComponent(e,n,r,i,o){let s=e&&!qN(e),a;if(s)a=n;else{let v=n||{};a=v.index,r=v.injector,i=v.projectableNodes,o=v.environmentInjector||v.ngModuleRef}let c=s?e:new Ac(Ao(e)),l=r||this.parentInjector;if(!o&&c.ngModule==null){let N=(s?l:this.parentInjector).get(Un,null);N&&(o=N)}let u=Ao(c.componentType??{}),d=Rc(this._lContainer,u?.id??null),m=d?.firstChild??null,h=c.create(l,i,m,o);return this.insertImpl(h.hostView,a,xc(this._hostTNode,d)),h}insert(e,n){return this.insertImpl(e,n,!0)}insertImpl(e,n,r){let i=e._lView;if(eR(i)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let c=i[Sn],l=new VC(c,c[br],c[Sn]);l.detach(l.indexOf(e))}}let o=this._adjustIndex(n),s=this._lContainer;return pd(s,i,o,r),e.attachToViewContainerRef(),Fw(xh(s),o,e),e}move(e,n){return this.insert(e,n)}indexOf(e){let n=gw(this._lContainer);return n!==null?n.indexOf(e):-1}remove(e){let n=this._adjustIndex(e,-1),r=Nc(this._lContainer,n);r&&(Au(xh(this._lContainer),n),dd(r[Se],r))}detach(e){let n=this._adjustIndex(e,-1),r=Nc(this._lContainer,n);return r&&Au(xh(this._lContainer),n)!=null?new Lo(r):null}_adjustIndex(e,n=0){return e??this.length+n}};function gw(t){return t[ku]}function xh(t){return t[ku]||(t[ku]=[])}function UC(t,e){let n,r=e[t.index];return Ei(r)?n=r:(n=AC(r,e,null,t),e[t.index]=n,hg(e,n)),pO(n,e,t,r),new VC(n,t,e)}function fO(t,e){let n=t[an],r=n.createComment(""),i=Vr(e,t),o=n.parentNode(i);return Wu(n,o,r,n.nextSibling(i),!1),r}var pO=gO,hO=()=>!1;function mO(t,e,n){return hO(t,e,n)}function gO(t,e,n,r){if(t[Oo])return;let i;n.type&8?i=Pr(r):i=fO(e,n),t[Oo]=i}var gm=class t{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},ym=class t{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let n=e.queries;if(n!==null){let r=e.contentQueries!==null?e.contentQueries[0]:n.length,i=[];for(let o=0;o<r;o++){let s=n.getByIndex(o),a=this.queries[s.indexInDeclarationView];i.push(a.clone())}return new t(i)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let n=0;n<this.queries.length;n++)Sg(e,n).matches!==null&&this.queries[n].setDirty()}},vm=class{flags;read;predicate;constructor(e,n,r=null){this.flags=n,this.read=r,typeof e=="string"?this.predicate=SO(e):this.predicate=e}},_m=class t{queries;constructor(e=[]){this.queries=e}elementStart(e,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(e,n)}elementEnd(e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(e)}embeddedTView(e){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,o=this.getByIndex(r).embeddedTView(e,i);o&&(o.indexInDeclarationView=r,n!==null?n.push(o):n=[o])}return n!==null?new t(n):null}template(e,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(e,n)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},Em=class t{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,n=-1){this.metadata=e,this._declarationNodeIndex=n}elementStart(e,n){this.isApplyingToNode(n)&&this.matchTNode(e,n)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,n){this.elementStart(e,n)}embeddedTView(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new t(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=e.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(e,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let o=r[i];this.matchTNodeWithReadOption(e,n,yO(n,o)),this.matchTNodeWithReadOption(e,n,Du(n,e,o,!1,!1))}else r===Br?n.type&4&&this.matchTNodeWithReadOption(e,n,-1):this.matchTNodeWithReadOption(e,n,Du(n,e,r,!1,!1))}matchTNodeWithReadOption(e,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===qt||i===Zi||i===Br&&n.type&4)this.addMatch(n.index,-2);else{let o=Du(n,e,i,!1,!1);o!==null&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(e,n){this.matches===null?this.matches=[e,n]:this.matches.push(e,n)}};function yO(t,e){let n=t.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===e)return n[r+1]}return null}function vO(t,e){return t.type&11?Ws(t,e):t.type&4?Cg(t,e):null}function _O(t,e,n,r){return n===-1?vO(e,t):n===-2?EO(t,e,r):Uu(t,t[Se],n,e)}function EO(t,e,n){if(n===qt)return Ws(e,t);if(n===Br)return Cg(e,t);if(n===Zi)return UC(e,t)}function jC(t,e,n,r){let i=e[fi].queries[r];if(i.matches===null){let o=t.data,s=n.matches,a=[];for(let c=0;s!==null&&c<s.length;c+=2){let l=s[c];if(l<0)a.push(null);else{let u=o[l];a.push(_O(e,u,s[c+1],n.metadata.read))}}i.matches=a}return i.matches}function wm(t,e,n,r){let i=t.queries.getByIndex(n),o=i.matches;if(o!==null){let s=jC(t,e,i,n);for(let a=0;a<o.length;a+=2){let c=o[a];if(c>0)r.push(s[a/2]);else{let l=o[a+1],u=e[-c];for(let d=Cn;d<u.length;d++){let m=u[d];m[Mo]===m[Sn]&&wm(m[Se],m,l,r)}if(u[Ls]!==null){let d=u[Ls];for(let m=0;m<d.length;m++){let h=d[m];wm(h[Se],h,l,r)}}}}}return r}function wO(t,e){return t[fi].queries[e].queryList}function bO(t,e,n){let r=new Zh((n&4)===4);return rR(t,e,r,r.destroy),(e[fi]??=new ym).queries.push(new gm(r))-1}function CO(t,e,n){let r=In();return r.firstCreatePass&&(IO(r,new vm(t,e,n),-1),(e&2)===2&&(r.staticViewQueries=!0)),bO(r,ze(),e)}function SO(t){return t.split(",").map(e=>e.trim())}function IO(t,e,n){t.queries===null&&(t.queries=new _m),t.queries.track(new Em(e,n))}function Sg(t,e){return t.queries.getByIndex(e)}function DO(t,e){let n=t[Se],r=Sg(n,e);return r.crossesNgTemplate?wm(n,t,e,[]):jC(n,t,r,e)}var yi=class{};var qu=class extends yi{injector;componentFactoryResolver=new hm(this);instance=null;constructor(e){super();let n=new bc([...e.providers,{provide:yi,useValue:this},{provide:Gi,useValue:this.componentFactoryResolver}],e.parent||td(),e.debugName,new Set(["environment"]));this.injector=n,e.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function TO(t,e,n=null){return new qu({providers:t,parent:e,debugName:n,runEnvironmentInitializers:!0}).injector}var xO=(()=>{class t{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=$w(!1,n.type),i=r.length>0?TO([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ie({token:t,providedIn:"environment",factory:()=>new t(Ze(Un))})}return t})();function St(t){return Ju(()=>{let e=HC(t),n=ne(w({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===kb.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:e.standalone?i=>i.get(xO).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Lr.Emulated,styles:t.styles||Wi,_:null,schemas:t.schemas||null,tView:null,id:""});e.standalone&&qi("NgStandalone"),$C(n);let r=t.dependencies;return n.directiveDefs=yw(r,!1),n.pipeDefs=yw(r,!0),n.id=OO(n),n})}function NO(t){return Ao(t)||Uw(t)}function RO(t){return t!==null}function AO(t,e){if(t==null)return Ro;let n={};for(let r in t)if(t.hasOwnProperty(r)){let i=t[r],o,s,a,c;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,c=i[3]||null):(o=i,s=i,a=ld.None,c=null),n[o]=[r,a,c],e[o]=s}return n}function MO(t){if(t==null)return Ro;let e={};for(let n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function Xi(t){return Ju(()=>{let e=HC(t);return $C(e),e})}function Vo(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function HC(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputConfig:t.inputs||Ro,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||Wi,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:AO(t.inputs,e),outputs:MO(t.outputs),debugInfo:null}}function $C(t){t.features?.forEach(e=>e(t))}function yw(t,e){if(!t)return null;let n=e?jw:NO;return()=>(typeof t=="function"?t():t).map(r=>n(r)).filter(RO)}function OO(t){let e=0,n=typeof t.consts=="function"?"":t.consts,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,n,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let o of r.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function PO(t){return Object.getPrototypeOf(t.prototype).constructor}function Ys(t){let e=PO(t.type),n=!0,r=[t];for(;e;){let i;if(pi(t))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Re(903,!1);i=e.\u0275dir}if(i){if(n){r.push(i);let s=t;s.inputs=Nh(t.inputs),s.declaredInputs=Nh(t.declaredInputs),s.outputs=Nh(t.outputs);let a=i.hostBindings;a&&VO(t,a);let c=i.viewQuery,l=i.contentQueries;if(c&&FO(t,c),l&&BO(t,l),kO(t,i),dN(t.outputs,i.outputs),pi(i)&&i.data.animation){let u=t.data;u.animation=(u.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(t),a===Ys&&(n=!1)}}e=Object.getPrototypeOf(e)}LO(r)}function kO(t,e){for(let n in e.inputs){if(!e.inputs.hasOwnProperty(n)||t.inputs.hasOwnProperty(n))continue;let r=e.inputs[n];r!==void 0&&(t.inputs[n]=r,t.declaredInputs[n]=e.declaredInputs[n])}}function LO(t){let e=0,n=null;for(let r=t.length-1;r>=0;r--){let i=t[r];i.hostVars=e+=i.hostVars,i.hostAttrs=Tc(i.hostAttrs,n=Tc(n,i.hostAttrs))}}function Nh(t){return t===Ro?{}:t===Wi?[]:t}function FO(t,e){let n=t.viewQuery;n?t.viewQuery=(r,i)=>{e(r,i),n(r,i)}:t.viewQuery=e}function BO(t,e){let n=t.contentQueries;n?t.contentQueries=(r,i,o)=>{e(r,i,o),n(r,i,o)}:t.contentQueries=e}function VO(t,e){let n=t.hostBindings;n?t.hostBindings=(r,i)=>{e(r,i),n(r,i)}:t.hostBindings=e}function WC(t){return t!==null&&(typeof t=="function"||typeof t=="object")}function GC(t,e,n){return t[e]=n}function vi(t,e,n){let r=t[e];return Object.is(r,n)?!1:(t[e]=n,!0)}function UO(t,e,n,r){let i=vi(t,e,n);return vi(t,e+1,r)||i}function jO(t,e,n,r,i,o,s,a,c){let l=e.consts,u=hd(e,t,4,s||null,a||null);ab()&&kC(e,n,u,Fs(l,c),vC),u.mergedAttrs=Tc(u.mergedAttrs,u.attrs),vb(e,u);let d=u.tView=fg(2,u,r,i,o,e.directiveRegistry,e.pipeRegistry,null,e.schemas,l,null);return e.queries!==null&&(e.queries.template(e,u),d.queries=e.queries.embeddedTView(u)),u}function bm(t,e,n,r,i,o,s,a,c,l){let u=n+vn,d=e.firstCreatePass?jO(u,e,t,r,i,o,s,a,c):e.data[u];Hs(d,!1);let m=HO(e,t,d,n);Qm()&&Eg(e,t,m,d),Bc(m,t);let h=AC(m,t,m,d);return t[u]=h,hg(t,h),mO(h,d,t),$m(d)&&mg(e,t,d),c!=null&&gC(t,d,l),d}function At(t,e,n,r,i,o,s,a){let c=ze(),l=In(),u=Fs(l.consts,o);return bm(c,l,t,e,n,r,i,u,s,a),At}var HO=$O;function $O(t,e,n,r){return eg(!0),e[an].createComment("")}var zC=new ve("");var WO=(()=>{class t{static \u0275prov=ie({token:t,providedIn:"root",factory:()=>new Cm})}return t})(),Cm=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let n=e.zone,r=this.queues.get(n);r.has(e)&&(r.delete(e),this.queuedEffectCount--)}enqueue(e){let n=e.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(e)||(this.queuedEffectCount++,r.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,n]of this.queues)e===null?this.flushQueue(n):e.run(()=>this.flushQueue(n))}flushQueue(e){for(let n of e)e.delete(n),this.queuedEffectCount--,n.run()}};function Ig(t){return!!t&&typeof t.then=="function"}function qC(t){return!!t&&typeof t.subscribe=="function"}var GO=new ve("");var YC=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=P(GO,{optional:!0})??[];injector=P(bt);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let o=zw(this.injector,i);if(Ig(o))n.push(o);else if(qC(o)){let s=new Promise((a,c)=>{o.subscribe({complete:a,error:c})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),zO=new ve("");function qO(){oE(()=>{throw new Re(600,!1)})}function YO(t){return t.isBoundToModule}var KO=10;var sr=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=P(KR);afterRenderManager=P(Gb);zonelessEnabled=P(od);rootEffectScheduler=P(WO);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new Ne;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=P(sd).hasPendingTasks.pipe(Mr(n=>!n));constructor(){P(zs,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=P(Un);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){pt(10);let i=n instanceof zu;if(!this._injector.get(YC).done){let m=!i&&kN(n),h=!1;throw new Re(405,h)}let s;i?s=n:s=this._injector.get(Gi).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let a=YO(s)?void 0:this._injector.get(yi),c=r||s.selector,l=s.create(bt.NULL,[],c,a),u=l.location.nativeElement,d=l.injector.get(zC,null);return d?.registerApplication(u),l.onDestroy(()=>{this.detachView(l.hostView),Tu(this.components,l),d?.unregisterApplication(u)}),this._loadComponent(l),pt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){pt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(cg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Re(101,!1);let n=Ve(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Ve(n),this.afterTick.next(),pt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(An,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<KO;)pt(14),this.synchronizeOnce(),pt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)ZO(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>rd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;Tu(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(zO,[]).forEach(i=>i(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Tu(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Re(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Tu(t,e){let n=t.indexOf(e);n>-1&&t.splice(n,1)}function ZO(t,e,n,r){if(!n&&!rd(t))return;TC(t,e,n&&!r?0:1)}function Dg(t,e,n,r){let i=ze(),o=Fc();if(vi(i,o,e)){let s=In(),a=Jm();iM(a,i,t,e,n,r)}return Dg}function KC(t,e,n,r){return vi(t,Fc(),n)?e+Oc(n)+r:bi}function bu(t,e){return t<<17|e<<2}function Fo(t){return t>>17&32767}function XO(t){return(t&2)==2}function JO(t,e){return t&131071|e<<17}function Sm(t){return t|2}function Bs(t){return(t&131068)>>2}function Rh(t,e){return t&-131069|e<<2}function QO(t){return(t&1)===1}function Im(t){return t|1}function e1(t,e,n,r,i,o){let s=o?e.classBindings:e.styleBindings,a=Fo(s),c=Bs(s);t[r]=n;let l=!1,u;if(Array.isArray(n)){let d=n;u=d[1],(u===null||Pc(d,u)>0)&&(l=!0)}else u=n;if(i)if(c!==0){let m=Fo(t[a+1]);t[r+1]=bu(m,a),m!==0&&(t[m+1]=Rh(t[m+1],r)),t[a+1]=JO(t[a+1],r)}else t[r+1]=bu(a,0),a!==0&&(t[a+1]=Rh(t[a+1],r)),a=r;else t[r+1]=bu(c,0),a===0?a=r:t[c+1]=Rh(t[c+1],r),c=r;l&&(t[r+1]=Sm(t[r+1])),vw(t,u,r,!0),vw(t,u,r,!1),t1(e,u,t,r,o),s=bu(a,c),o?e.classBindings=s:e.styleBindings=s}function t1(t,e,n,r,i){let o=i?t.residualClasses:t.residualStyles;o!=null&&typeof e=="string"&&Pc(o,e)>=0&&(n[r+1]=Im(n[r+1]))}function vw(t,e,n,r){let i=t[n+1],o=e===null,s=r?Fo(i):Bs(i),a=!1;for(;s!==0&&(a===!1||o);){let c=t[s],l=t[s+1];n1(c,e)&&(a=!0,t[s+1]=r?Im(l):Sm(l)),s=r?Fo(l):Bs(l)}a&&(t[n+1]=r?Sm(i):Im(i))}function n1(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?Pc(t,e)>=0:!1}function Ue(t,e,n){let r=ze(),i=Fc();if(vi(r,i,e)){let o=In(),s=Jm();yC(o,s,r,t,e,r[an],n,!1)}return Ue}function _w(t,e,n,r,i){gg(e,t,n,i?"class":"style",r)}function Ji(t,e,n){return ZC(t,e,n,!1),Ji}function Qi(t,e){return ZC(t,e,null,!0),Qi}function ZC(t,e,n,r){let i=ze(),o=In(),s=hR(2);if(o.firstUpdatePass&&i1(o,t,s,r),e!==bi&&vi(i,s,e)){let a=o.data[zi()];l1(o,a,i,i[an],t,i[s+1]=u1(e,n),r,s)}}function r1(t,e){return e>=t.expandoStartIndex}function i1(t,e,n,r){let i=t.data;if(i[n+1]===null){let o=i[zi()],s=r1(t,n);d1(o,r)&&e===null&&!s&&(e=!1),e=o1(i,o,e,r),e1(i,o,e,n,s,r)}}function o1(t,e,n,r){let i=vR(t),o=r?e.residualClasses:e.residualStyles;if(i===null)(r?e.classBindings:e.styleBindings)===0&&(n=Ah(null,t,e,n,r),n=Mc(n,e.attrs,r),o=null);else{let s=e.directiveStylingLast;if(s===-1||t[s]!==i)if(n=Ah(i,t,e,n,r),o===null){let c=s1(t,e,r);c!==void 0&&Array.isArray(c)&&(c=Ah(null,t,e,c[1],r),c=Mc(c,e.attrs,r),a1(t,e,r,c))}else o=c1(t,e,r)}return o!==void 0&&(r?e.residualClasses=o:e.residualStyles=o),n}function s1(t,e,n){let r=n?e.classBindings:e.styleBindings;if(Bs(r)!==0)return t[Fo(r)]}function a1(t,e,n,r){let i=n?e.classBindings:e.styleBindings;t[Fo(i)]=r}function c1(t,e,n){let r,i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<i;o++){let s=t[o].hostAttrs;r=Mc(r,s,n)}return Mc(r,e.attrs,n)}function Ah(t,e,n,r,i){let o=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(o=e[a],r=Mc(r,o.hostAttrs,i),o!==t);)a++;return t!==null&&(n.directiveStylingLast=a),r}function Mc(t,e,n){let r=n?1:2,i=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?i=s:i===r&&(Array.isArray(t)||(t=t===void 0?[]:["",t]),ON(t,s,n?!0:e[++o]))}return t===void 0?null:t}function l1(t,e,n,r,i,o,s,a){if(!(e.type&3))return;let c=t.data,l=c[a+1],u=QO(l)?Ew(c,e,n,i,Bs(l),s):void 0;if(!Yu(u)){Yu(o)||XO(l)&&(o=Ew(c,null,n,i,a,s));let d=nb(zi(),n);CM(r,s,d,i,o)}}function Ew(t,e,n,r,i,o){let s=e===null,a;for(;i>0;){let c=t[i],l=Array.isArray(c),u=l?c[1]:c,d=u===null,m=n[i+1];m===bi&&(m=d?Wi:void 0);let h=d?wh(m,r):u===r?m:void 0;if(l&&!Yu(h)&&(h=wh(c,r)),Yu(h)&&(a=h,s))return a;let v=t[i+1];i=s?Fo(v):Bs(v)}if(e!==null){let c=o?e.residualClasses:e.residualStyles;c!=null&&(a=wh(c,r))}return a}function Yu(t){return t!==void 0}function u1(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=or(Ur(t)))),t}function d1(t,e){return(t.flags&(e?8:16))!==0}var Dm=class{destroy(e){}updateValue(e,n){}swap(e,n){let r=Math.min(e,n),i=Math.max(e,n),o=this.detach(i);if(i-r>1){let s=this.detach(r);this.attach(r,o),this.attach(i,s)}else this.attach(r,o)}move(e,n){this.attach(n,this.detach(e))}};function Mh(t,e,n,r,i){return t===n&&Object.is(e,r)?1:Object.is(i(t,e),i(n,r))?-1:0}function f1(t,e,n){let r,i,o=0,s=t.length-1,a=void 0;if(Array.isArray(e)){let c=e.length-1;for(;o<=s&&o<=c;){let l=t.at(o),u=e[o],d=Mh(o,l,o,u,n);if(d!==0){d<0&&t.updateValue(o,u),o++;continue}let m=t.at(s),h=e[c],v=Mh(s,m,c,h,n);if(v!==0){v<0&&t.updateValue(s,h),s--,c--;continue}let N=n(o,l),M=n(s,m),A=n(o,u);if(Object.is(A,M)){let O=n(c,h);Object.is(O,N)?(t.swap(o,s),t.updateValue(s,h),c--,s--):t.move(s,o),t.updateValue(o,u),o++;continue}if(r??=new Ku,i??=bw(t,o,s,n),Tm(t,r,o,A))t.updateValue(o,u),o++,s++;else if(i.has(A))r.set(N,t.detach(o)),s--;else{let O=t.create(o,e[o]);t.attach(o,O),o++,s++}}for(;o<=c;)ww(t,r,n,o,e[o]),o++}else if(e!=null){let c=e[Symbol.iterator](),l=c.next();for(;!l.done&&o<=s;){let u=t.at(o),d=l.value,m=Mh(o,u,o,d,n);if(m!==0)m<0&&t.updateValue(o,d),o++,l=c.next();else{r??=new Ku,i??=bw(t,o,s,n);let h=n(o,d);if(Tm(t,r,o,h))t.updateValue(o,d),o++,s++,l=c.next();else if(!i.has(h))t.attach(o,t.create(o,d)),o++,s++,l=c.next();else{let v=n(o,u);r.set(v,t.detach(o)),s--}}}for(;!l.done;)ww(t,r,n,t.length,l.value),l=c.next()}for(;o<=s;)t.destroy(t.detach(s--));r?.forEach(c=>{t.destroy(c)})}function Tm(t,e,n,r){return e!==void 0&&e.has(r)?(t.attach(n,e.get(r)),e.delete(r),!0):!1}function ww(t,e,n,r,i){if(Tm(t,e,r,n(r,i)))t.updateValue(r,i);else{let o=t.create(r,i);t.attach(r,o)}}function bw(t,e,n,r){let i=new Set;for(let o=e;o<=n;o++)i.add(r(o,t.at(o)));return i}var Ku=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let n=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(e,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,n){if(this.kvMap.has(e)){let r=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let i=this._vMap;for(;i.has(r);)r=i.get(r);i.set(r,n)}else this.kvMap.set(e,n)}forEach(e){for(let[n,r]of this.kvMap)if(e(r,n),this._vMap!==void 0){let i=this._vMap;for(;i.has(r);)r=i.get(r),e(r,n)}}};function Ut(t,e){qi("NgControlFlow");let n=ze(),r=Fc(),i=n[r]!==bi?n[r]:-1,o=i!==-1?Zu(n,vn+i):void 0,s=0;if(vi(n,r,t)){let a=Ve(null);try{if(o!==void 0&&OC(o,s),t!==-1){let c=vn+t,l=Zu(n,c),u=Am(n[Se],c),d=Rc(l,u.tView.ssrId),m=ud(n,u,e,{dehydratedView:d});pd(l,m,s,xc(u,d))}}finally{Ve(a)}}else if(o!==void 0){let a=MC(o,s);a!==void 0&&(a[en]=e)}}var xm=class{lContainer;$implicit;$index;constructor(e,n,r){this.lContainer=e,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-Cn}};function Ci(t,e){return e}var Nm=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,n,r){this.hasEmptyBlock=e,this.trackByFn=n,this.liveCollection=r}};function Kt(t,e,n,r,i,o,s,a,c,l,u,d,m){qi("NgControlFlow");let h=ze(),v=In(),N=c!==void 0,M=ze(),A=a?s.bind(M[wr][en]):s,O=new Nm(N,A);M[vn+t]=O,bm(h,v,t+1,e,n,r,i,Fs(v.consts,o)),N&&bm(h,v,t+2,c,l,u,d,Fs(v.consts,m))}var Rm=class extends Dm{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,n,r){super(),this.lContainer=e,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-Cn}at(e){return this.getLView(e)[en].$implicit}attach(e,n){let r=n[Cc];this.needsIndexUpdate||=e!==this.length,pd(this.lContainer,n,e,xc(this.templateTNode,r))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,p1(this.lContainer,e)}create(e,n){let r=Rc(this.lContainer,this.templateTNode.tView.ssrId),i=ud(this.hostLView,this.templateTNode,new xm(this.lContainer,n,e),{dehydratedView:r});return this.operationsCounter?.recordCreate(),i}destroy(e){dd(e[Se],e),this.operationsCounter?.recordDestroy()}updateValue(e,n){this.getLView(e)[en].$implicit=n}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[en].$index=e}getLView(e){return h1(this.lContainer,e)}};function Zt(t){let e=Ve(null),n=zi();try{let r=ze(),i=r[Se],o=r[n],s=n+1,a=Zu(r,s);if(o.liveCollection===void 0){let l=Am(i,s);o.liveCollection=new Rm(a,r,l)}else o.liveCollection.reset();let c=o.liveCollection;if(f1(c,t,o.trackByFn),c.updateIndexes(),o.hasEmptyBlock){let l=Fc(),u=c.length===0;if(vi(r,l,u)){let d=n+2,m=Zu(r,d);if(u){let h=Am(i,d),v=Rc(m,h.tView.ssrId),N=ud(r,h,void 0,{dehydratedView:v});pd(m,N,0,xc(h,v))}else OC(m,0)}}}finally{Ve(e)}}function Zu(t,e){return t[e]}function p1(t,e){return Nc(t,e)}function h1(t,e){return MC(t,e)}function Am(t,e){return Wm(t,e)}function X(t,e,n,r){let i=ze(),o=In(),s=vn+t,a=i[an],c=o.firstCreatePass?FC(s,o,i,e,vC,ab(),n,r):o.data[s],l=m1(o,i,c,a,e,t);i[s]=l;let u=$m(c);return Hs(c,!0),dC(a,l,c),!EC(c)&&Qm()&&Eg(o,i,l,c),(iR()===0||u)&&Bc(l,i),oR(),u&&(mg(o,i,c),Kb(o,c,i)),r!==null&&gC(i,c),X}function Q(){let t=Cr();lb()?dR():(t=t.parent,Hs(t,!1));let e=t;cR(e)&&lR(),sR();let n=In();return n.firstCreatePass&&BC(n,e),e.classesWithoutHost!=null&&DR(e)&&_w(n,e,ze(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&TR(e)&&_w(n,e,ze(),e.stylesWithoutHost,!1),Q}function qe(t,e,n,r){return X(t,e,n,r),Q(),qe}var m1=(t,e,n,r,i,o)=>(eg(!0),lC(r,i,bR()));function _n(){return ze()}var Xu="en-US";var g1=Xu;function y1(t){typeof t=="string"&&(g1=t.toLowerCase().replace(/_/g,"-"))}var v1=(t,e,n)=>{};function at(t,e,n,r){let i=ze(),o=In(),s=Cr();return E1(o,i,i[an],s,t,e,r),at}function _1(t,e,n,r){let i=t.cleanup;if(i!=null)for(let o=0;o<i.length-1;o+=2){let s=i[o];if(s===n&&i[o+1]===r){let a=e[Ou],c=i[o+2];return a.length>c?a[c]:null}typeof s=="string"&&(o+=2)}return null}function E1(t,e,n,r,i,o,s){let a=$m(r),l=t.firstCreatePass?sb(t):null,u=e[en],d=ob(e),m=!0;if(r.type&3||s){let h=Vr(r,e),v=s?s(h):h,N=d.length,M=s?O=>s(Pr(O[r.index])):r.index,A=null;if(!s&&a&&(A=_1(t,e,i,r.index)),A!==null){let O=A.__ngLastListenerFn__||A;O.__ngNextListenerFn__=o,A.__ngLastListenerFn__=o,m=!1}else{o=Iw(r,e,u,o),v1(h,i,o);let O=n.listen(v,i,o);d.push(o,O),l&&l.push(i,M,N,N+1)}}else o=Iw(r,e,u,o);if(m){let h=r.outputs?.[i],v=r.hostDirectiveOutputs?.[i];if(v&&v.length)for(let N=0;N<v.length;N+=2){let M=v[N],A=v[N+1];Cw(r,t,e,M,A,i,o,d,l)}if(h&&h.length)for(let N of h)Cw(r,t,e,N,i,i,o,d,l)}}function Cw(t,e,n,r,i,o,s,a,c){let l=n[r],d=e.data[r].outputs[i],h=l[d].subscribe(s),v=a.length;a.push(s,h),c&&c.push(o,t.index,v,-(v+1))}function Sw(t,e,n,r){let i=Ve(null);try{return pt(6,e,n),n(r)!==!1}catch(o){return _C(t,o),!1}finally{pt(7,e,n),Ve(i)}}function Iw(t,e,n,r){return function i(o){if(o===Function)return r;let s=js(t)?kr(t.index,e):e;bg(s,5);let a=Sw(e,n,r,o),c=i.__ngNextListenerFn__;for(;c;)a=Sw(e,n,c,o)&&a,c=c.__ngNextListenerFn__;return a}}function re(t=1){return ER(t)}function jn(t,e,n){return Si(t,"",e,"",n),jn}function Si(t,e,n,r,i){let o=ze(),s=KC(o,e,n,r);if(s!==bi){let a=In(),c=Jm();yC(a,c,o,t,s,o[an],i,!1)}return Si}function eo(t,e,n){CO(t,e,n)}function to(t){let e=ze(),n=In(),r=db();Km(r+1);let i=Sg(n,r);if(t.dirty&&QN(e)===((i.metadata.flags&2)===2)){if(i.matches===null)t.reset([]);else{let o=DO(e,r);t.reset(o,XR),t.notifyOnChanges()}return!0}return!1}function no(){return wO(ze(),db())}function Tg(t,e,n,r){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=r}function jt(t,e=""){let n=ze(),r=In(),i=t+vn,o=r.firstCreatePass?hd(r,i,1,e,null):r.data[i],s=w1(r,n,o,e,t);n[i]=s,Qm()&&Eg(r,n,s,o),Hs(o,!1)}var w1=(t,e,n,r,i)=>(eg(!0),HA(e[an],r));function Ks(t){return Ir("",t,""),Ks}function Ir(t,e,n){let r=ze(),i=KC(r,t,e,n);return i!==bi&&b1(r,zi(),i),Ir}function b1(t,e,n){let r=nb(e,t);$A(t[an],r,n)}var XC={};function Hr(t){let e=In(),n=ze(),r=t+vn,i=hd(e,r,128,null,null);return Hs(i,!1),Tg(e,n,r,XC),Hr}function Uo(t){qi("NgLet");let e=In(),n=ze(),r=zi();return Tg(e,n,r,t),t}function Hn(t){let e=fR(),n=Gm(e,vn+t);if(n===XC)throw new Re(314,!1);return n}function JC(t,e,n,r){return e0(ze(),Ym(),t,e,n,r)}function QC(t,e){let n=t[e];return n===bi?void 0:n}function e0(t,e,n,r,i,o){let s=e+n;return vi(t,s,i)?GC(t,s+1,o?r.call(o,i):r(i)):QC(t,s+1)}function C1(t,e,n,r,i,o,s){let a=e+n;return UO(t,a,i,o)?GC(t,a+2,s?r.call(s,i,o):r(i,o)):QC(t,a+2)}function ar(t,e){let n=In(),r,i=t+vn;n.firstCreatePass?(r=S1(e,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let o=r.factory||(r.factory=No(r.type,!0)),s,a=Vn(Yt);try{let c=Vu(!1),l=o();return Vu(c),Tg(n,ze(),i,l),l}finally{Vn(a)}}function S1(t,e){if(e)for(let n=e.length-1;n>=0;n--){let r=e[n];if(t===r.name)return r}}function Dr(t,e,n){let r=t+vn,i=ze(),o=Gm(i,r);return n0(i,r)?e0(i,Ym(),e,o.transform,n,o):o.transform(n)}function t0(t,e,n,r){let i=t+vn,o=ze(),s=Gm(o,i);return n0(o,i)?C1(o,Ym(),e,s.transform,n,r,s):s.transform(n,r)}function n0(t,e){return t[Se].data[e].pure}var Vs=class{full;major;minor;patch;constructor(e){this.full=e;let n=e.split(".");this.major=n[0],this.minor=n[1],this.patch=n.slice(2).join(".")}},xg=new Vs("19.2.0");var I1=(()=>{class t{zone=P(Ke);changeDetectionScheduler=P(hi);applicationRef=P(sr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function D1({ngZoneFactory:t,ignoreChangesOutsideZone:e,scheduleInRootZone:n}){return t??=()=>new Ke(ne(w({},T1()),{scheduleInRootZone:n})),[{provide:Ke,useFactory:t},{provide:wc,multi:!0,useFactory:()=>{let r=P(I1,{optional:!0});return()=>r.initialize()}},{provide:wc,multi:!0,useFactory:()=>{let r=P(x1);return()=>{r.initialize()}}},e===!0?{provide:Ab,useValue:!0}:[],{provide:rg,useValue:n??Rb}]}function T1(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var x1=(()=>{class t{subscription=new Bt;initialized=!1;zone=P(Ke);pendingTasks=P(sd);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ke.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ke.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var r0=(()=>{class t{appRef=P(sr);taskService=P(sd);ngZone=P(Ke);zonelessEnabled=P(od);tracing=P(zs,{optional:!0});disableScheduling=P(Ab,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Bt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Hu):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(P(rg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof $u||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?QE:Mb;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Hu+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,QE(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function i0(){return qi("NgZoneless"),Hw([{provide:hi,useExisting:r0},{provide:Ke,useClass:$u},{provide:od,useValue:!0},{provide:rg,useValue:!1},[]])}function N1(){return typeof $localize<"u"&&$localize.locale||Xu}var Ng=new ve("",{providedIn:"root",factory:()=>P(Ng,Ge.Optional|Ge.SkipSelf)||N1()});var Mm=new ve(""),R1=new ve("");function mc(t){return!t.moduleRef}function A1(t){let e=mc(t)?t.r3Injector:t.moduleRef.injector,n=e.get(Ke);return n.run(()=>{mc(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let r=e.get(mi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:o=>{r.handleError(o)}})}),mc(t)){let o=()=>e.destroy(),s=t.platformInjector.get(Mm);s.add(o),e.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>t.moduleRef.destroy(),s=t.platformInjector.get(Mm);s.add(o),t.moduleRef.onDestroy(()=>{Tu(t.allPlatformModules,t.moduleRef),i.unsubscribe(),s.delete(o)})}return O1(r,n,()=>{let o=e.get(YC);return o.runInitializers(),o.donePromise.then(()=>{let s=e.get(Ng,Xu);if(y1(s||Xu),!e.get(R1,!0))return mc(t)?e.get(sr):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(mc(t)){let c=e.get(sr);return t.rootComponent!==void 0&&c.bootstrap(t.rootComponent),c}else return M1(t.moduleRef,t.allPlatformModules),t.moduleRef})})})}function M1(t,e){let n=t.injector.get(sr);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(n);else throw new Re(-403,!1);e.push(t)}function O1(t,e,n){try{let r=n();return Ig(r)?r.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}var xu=null;function P1(t=[],e){return bt.create({name:e,providers:[{provide:ed,useValue:"platform"},{provide:Mm,useValue:new Set([()=>xu=null])},...t]})}function k1(t=[]){if(xu)return xu;let e=P1(t);return xu=e,qO(),L1(e),e}function L1(t){let e=t.get(sg,null);zw(t,()=>{e?.forEach(n=>n())})}var jo=(()=>{class t{static __NG_ELEMENT_ID__=F1}return t})();function F1(t){return B1(Cr(),ze(),(t&16)===16)}function B1(t,e,n){if(js(t)&&!n){let r=kr(t.index,e);return new Lo(r,r)}else if(t.type&175){let r=e[wr];return new Lo(r,e)}return null}var Om=class{constructor(){}supports(e){return e instanceof Map||WC(e)}create(){return new Pm}},Pm=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(e){let n;for(n=this._mapHead;n!==null;n=n._next)e(n)}forEachPreviousItem(e){let n;for(n=this._previousMapHead;n!==null;n=n._nextPrevious)e(n)}forEachChangedItem(e){let n;for(n=this._changesHead;n!==null;n=n._nextChanged)e(n)}forEachAddedItem(e){let n;for(n=this._additionsHead;n!==null;n=n._nextAdded)e(n)}forEachRemovedItem(e){let n;for(n=this._removalsHead;n!==null;n=n._nextRemoved)e(n)}diff(e){if(!e)e=new Map;else if(!(e instanceof Map||WC(e)))throw new Re(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let n=this._mapHead;if(this._appendAfter=null,this._forEach(e,(r,i)=>{if(n&&n.key===i)this._maybeAddToChanges(n,r),this._appendAfter=n,n=n._next;else{let o=this._getOrCreateRecordForKey(i,r);n=this._insertBeforeOrAppend(n,o)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let r=n;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,n){if(e){let r=e._prev;return n._next=e,n._prev=r,e._prev=n,r&&(r._next=n),e===this._mapHead&&(this._mapHead=n),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(e,n){if(this._records.has(e)){let i=this._records.get(e);this._maybeAddToChanges(i,n);let o=i._prev,s=i._next;return o&&(o._next=s),s&&(s._prev=o),i._next=null,i._prev=null,i}let r=new km(e);return this._records.set(e,r),r.currentValue=n,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,n){Object.is(n,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=n,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,n){e instanceof Map?e.forEach(n):Object.keys(e).forEach(r=>n(e[r],r))}},km=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(e){this.key=e}};function Dw(){return new Rg([new Om])}var Rg=(()=>{class t{static \u0275prov=ie({token:t,providedIn:"root",factory:Dw});factories;constructor(n){this.factories=n}static create(n,r){if(r){let i=r.factories.slice();n=n.concat(i)}return new t(n)}static extend(n){return{provide:t,useFactory:r=>t.create(n,r||Dw()),deps:[[t,new NN,new Um]]}}find(n){let r=this.factories.find(i=>i.supports(n));if(r)return r;throw new Re(901,!1)}}return t})();function o0(t){pt(8);try{let{rootComponent:e,appProviders:n,platformProviders:r}=t,i=k1(r),o=[D1({}),{provide:hi,useExisting:r0},...n||[]],s=new qu({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1});return A1({r3Injector:s.injector,platformInjector:i,rootComponent:e})}catch(e){return Promise.reject(e)}finally{pt(9)}}function Ag(t){let e=Ve(null);try{return t()}finally{Ve(e)}}var Tw=class{[li];constructor(e){this[li]=e}destroy(){this[li].destroy()}};function md(t,e){let n=Ao(t),r=e.elementInjector||td();return new Ac(n).create(r,e.projectableNodes,e.hostElement,e.environmentInjector)}var V1={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function U1(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function j1(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Mg;function H1(t,e){if(!Mg){let n=Element.prototype;Mg=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Mg.call(t,e):!1}function $1(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[U1(r)]=[n,i]}),e}function W1(t,e){return e.get(Gi).resolveComponentFactory(t).inputs}function G1(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 a=n[o],c=z1(a,e,i);c!==-1&&r[c].push(a)}return r}function z1(t,e,n){let r=n;return j1(t)&&e.some((i,o)=>i!=="*"&&H1(t,i)?(r=o,!0):!1),r}var q1=10,Og=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(Gi).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Pg(this.componentFactory,e,this.inputMap)}},Pg=class{componentFactory;injector;inputMap;eventEmitters=new bo(1);events=this.eventEmitters.pipe(yu(e=>hc(...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(Ke),this.appRef=this.injector.get(sr),this.cdScheduler=n.get(hi),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=V1.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},q1))})}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),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let n=bt.create({providers:[],parent:this.injector}),r=G1(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 dt(s=>{let a=o.subscribe(c=>s.next({name:i,value:c}));return()=>a.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},kg=class extends HTMLElement{ngElementEventsSubscription=null};function s0(t,e){let n=W1(t,e.injector),r=e.strategyFactory||new Og(t,e.injector),i=$1(n);class o extends kg{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:c,transform:l})=>{if(!this.hasOwnProperty(c))return;let u=this[c];delete this[c],a.setInputValue(c,u,l)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,c,l,u){let[d,m]=i[a];this.ngElementStrategy.setInputValue(d,l,m)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let c=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(c)})}}return n.forEach(({propName:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(c){this.ngElementStrategy.setInputValue(s,c,a)},configurable:!0,enumerable:!0})}),o}var l0=null;function Zs(){return l0}function u0(t){l0??=t}var gd=class{};var ct=new ve(""),d0=(()=>{class t{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:()=>P(K1),providedIn:"platform"})}return t})();var K1=(()=>{class t extends d0{_location;_history;_doc=P(ct);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Zs().getBaseHref(this._doc)}onPopState(n){let r=Zs().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Zs().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function f0(t,e){return t?e?t.endsWith("/")?e.startsWith("/")?t+e.slice(1):t+e:e.startsWith("/")?t+e:`${t}/${e}`:t:e}function a0(t){let e=t.search(/#|\?|$/);return t[e-1]==="/"?t.slice(0,e-1)+t.slice(e):t}function Ho(t){return t&&t[0]!=="?"?`?${t}`:t}var Bg=(()=>{class t{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:()=>P(X1),providedIn:"root"})}return t})(),Z1=new ve(""),X1=(()=>{class t extends Bg{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??P(ct).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return f0(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+Ho(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,o){let s=this.prepareExternalUrl(i+Ho(o));this._platformLocation.pushState(n,r,s)}replaceState(n,r,i,o){let s=this.prepareExternalUrl(i+Ho(o));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(r){return new(r||t)(Ze(d0),Ze(Z1,8))};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Vg=(()=>{class t{_subject=new Ne;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=eP(a0(c0(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+Ho(r))}normalize(n){return t.stripTrailingSlash(Q1(this._basePath,c0(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Ho(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Ho(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=Ho;static joinWithSlash=f0;static stripTrailingSlash=a0;static \u0275fac=function(r){return new(r||t)(Ze(Bg))};static \u0275prov=ie({token:t,factory:()=>J1(),providedIn:"root"})}return t})();function J1(){return new Vg(Ze(Bg))}function Q1(t,e){if(!t||!e.startsWith(t))return e;let n=e.substring(t.length);return n===""||["/",";","?","#"].includes(n[0])?n:e}function c0(t){return t.replace(/\/index.html$/,"")}function eP(t){if(new RegExp("^(https?:)?//").test(t)){let[,n]=t.split(/\/\/[^\/]+/);return n}return t}function p0(t,e){e=encodeURIComponent(e);for(let n of t.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}var h0=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(n,r,i){this._ngEl=n,this._differs=r,this._renderer=i}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,r){let[i,o]=n.split("."),s=i.indexOf("-")===-1?void 0:Fr.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,o?`${r}${o}`:r,s):this._renderer.removeStyle(this._ngEl.nativeElement,i,s)}_applyChanges(n){n.forEachRemovedItem(r=>this._setStyle(r.key,null)),n.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),n.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(r){return new(r||t)(Yt(qt),Yt(Rg),Yt(qs))};static \u0275dir=Xi({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})();var Ug="browser",tP="server";function m0(t){return t===Ug}function jg(t){return t===tP}var yd=class{};var $g=class extends gd{supportsDOMEvents=!0},Wg=class t extends $g{static makeCurrent(){u0(new t)}onAndCancel(e,n,r,i){return e.addEventListener(n,r,i),()=>{e.removeEventListener(n,r,i)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.remove()}createElement(e,n){return n=n||this.getDefaultDocument(),n.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return n==="window"?window:n==="document"?e:n==="body"?e.body:null}getBaseHref(e){let n=nP();return n==null?null:rP(n)}resetBaseElement(){Hc=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return p0(document.cookie,e)}},Hc=null;function nP(){return Hc=Hc||document.querySelector("base"),Hc?Hc.getAttribute("href"):null}function rP(t){return new URL(t,document.baseURI).pathname}var iP=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac})}return t})(),Gg=new ve(""),w0=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,o){return this._findPluginFor(r).addEventListener(n,r,i,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(o=>o.supports(n)),!r)throw new Re(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(r){return new(r||t)(Ze(Gg),Ze(Ke))};static \u0275prov=ie({token:t,factory:t.\u0275fac})}return t})(),_d=class{_doc;constructor(e){this._doc=e}manager},vd="ng-app-id";function g0(t){for(let e of t)e.remove()}function y0(t,e){let n=e.createElement("style");return n.textContent=t,n}function oP(t,e,n,r){let i=t.head?.querySelectorAll(`style[${vd}="${e}"],link[${vd}="${e}"]`);if(i)for(let o of i)o.removeAttribute(vd),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&n.set(o.textContent,{usage:0,elements:[o]})}function zg(t,e){let n=e.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",t),n}var b0=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=jg(o),oP(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,y0);r?.forEach(i=>this.addUsage(i,this.external,zg))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let o=r.get(n);o?o.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(g0(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])g0(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,y0(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,zg(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(vd,this.appId),n.appendChild(r)}static \u0275fac=function(r){return new(r||t)(Ze(ct),Ze(Vc),Ze(ag,8),Ze(Bo))};static \u0275prov=ie({token:t,factory:t.\u0275fac})}return t})(),Hg={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Yg=/%COMP%/g;var C0="%COMP%",sP=`_nghost-${C0}`,aP=`_ngcontent-${C0}`,cP=!0,lP=new ve("",{providedIn:"root",factory:()=>cP});function uP(t){return aP.replace(Yg,t)}function dP(t){return sP.replace(Yg,t)}function S0(t,e){return e.map(n=>n.replace(Yg,t))}var v0=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,o,s,a,c,l=null,u=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=c,this.nonce=l,this.tracingService=u,this.platformIsServer=jg(a),this.defaultRenderer=new $c(n,s,c,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Lr.ShadowDom&&(r=ne(w({},r),{encapsulation:Lr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Ed?i.applyToHost(n):i instanceof Wc&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.platformIsServer,m=this.tracingService;switch(r.encapsulation){case Lr.Emulated:o=new Ed(c,l,r,this.appId,u,s,a,d,m);break;case Lr.ShadowDom:return new qg(c,l,n,r,s,a,this.nonce,d,m);default:o=new Wc(c,l,r,u,s,a,d,m);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(r){return new(r||t)(Ze(w0),Ze(b0),Ze(Vc),Ze(lP),Ze(ct),Ze(Bo),Ze(Ke),Ze(ag),Ze(zs,8))};static \u0275prov=ie({token:t,factory:t.\u0275fac})}return t})(),$c=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,n,r,i,o){this.eventManager=e,this.doc=n,this.ngZone=r,this.platformIsServer=i,this.tracingService=o}destroy(){}destroyNode=null;createElement(e,n){return n?this.doc.createElementNS(Hg[n]||n,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,n){(_0(e)?e.content:e).appendChild(n)}insertBefore(e,n,r){e&&(_0(e)?e.content:e).insertBefore(n,r)}removeChild(e,n){n.remove()}selectRootElement(e,n){let r=typeof e=="string"?this.doc.querySelector(e):e;if(!r)throw new Re(-5104,!1);return n||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,r,i){if(i){n=i+":"+n;let o=Hg[i];o?e.setAttributeNS(o,n,r):e.setAttribute(n,r)}else e.setAttribute(n,r)}removeAttribute(e,n,r){if(r){let i=Hg[r];i?e.removeAttributeNS(i,n):e.removeAttribute(`${r}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,r,i){i&(Fr.DashCase|Fr.Important)?e.style.setProperty(n,r,i&Fr.Important?"important":""):e.style[n]=r}removeStyle(e,n,r){r&Fr.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,r){e!=null&&(e[n]=r)}setValue(e,n){e.nodeValue=n}listen(e,n,r,i){if(typeof e=="string"&&(e=Zs().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${n}`);let o=this.decoratePreventDefault(r);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,n,o)),this.eventManager.addEventListener(e,n,o,i)}decoratePreventDefault(e){return n=>{if(n==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(n)):e(n))===!1&&n.preventDefault()}}};function _0(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var qg=class extends $c{sharedStylesHost;hostEl;shadowRoot;constructor(e,n,r,i,o,s,a,c,l){super(e,o,s,c,l),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=i.styles;u=S0(i.id,u);for(let m of u){let h=document.createElement("style");a&&h.setAttribute("nonce",a),h.textContent=m,this.shadowRoot.appendChild(h)}let d=i.getExternalStyles?.();if(d)for(let m of d){let h=zg(m,o);a&&h.setAttribute("nonce",a),this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,r){return super.insertBefore(this.nodeOrShadowRoot(e),n,r)}removeChild(e,n){return super.removeChild(null,n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Wc=class extends $c{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,n,r,i,o,s,a,c,l){super(e,o,s,a,c),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=i;let u=r.styles;this.styles=l?S0(l,u):u,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Ed=class extends Wc{contentAttr;hostAttr;constructor(e,n,r,i,o,s,a,c,l){let u=i+"-"+r.id;super(e,n,r,o,s,a,c,l,u),this.contentAttr=uP(u),this.hostAttr=dP(u)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,n){let r=super.createElement(e,n);return super.setAttribute(r,this.contentAttr,""),r}},fP=(()=>{class t extends _d{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,o){return n.addEventListener(r,i,o),()=>this.removeEventListener(n,r,i,o)}removeEventListener(n,r,i,o){return n.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||t)(Ze(ct))};static \u0275prov=ie({token:t,factory:t.\u0275fac})}return t})(),E0=["alt","control","meta","shift"],pP={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},hP={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},mP=(()=>{class t extends _d{constructor(n){super(n)}supports(n){return t.parseEventName(n)!=null}addEventListener(n,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Zs().onAndCancel(n,s.domEventName,a,o))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),E0.forEach(l=>{let u=r.indexOf(l);u>-1&&(r.splice(u,1),s+=l+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(n,r){let i=pP[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),E0.forEach(s=>{if(s!==i){let a=hP[s];a(n)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{t.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(r){return new(r||t)(Ze(ct))};static \u0275prov=ie({token:t,factory:t.\u0275fac})}return t})();function I0(t){return o0(gP(t))}function gP(t){return{appProviders:[...wP,...t?.providers??[]],platformProviders:EP}}function yP(){Wg.makeCurrent()}function vP(){return new mi}function _P(){return Ub(document),document}var EP=[{provide:Bo,useValue:Ug},{provide:sg,useValue:yP,multi:!0},{provide:ct,useFactory:_P,deps:[]}];var wP=[{provide:ed,useValue:"root"},{provide:mi,useFactory:vP,deps:[]},{provide:Gg,useClass:fP,multi:!0,deps:[ct]},{provide:Gg,useClass:mP,multi:!0,deps:[ct]},v0,b0,w0,{provide:An,useExisting:v0},{provide:yd,useClass:iP,deps:[]},[]];var Kg=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:function(r){let i=null;return r?i=new(r||t):i=Ze(bP),i},providedIn:"root"})}return t})(),bP=(()=>{class t extends Kg{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case jr.NONE:return r;case jr.HTML:return Ki(r,"HTML")?Ur(r):ug(this._doc,String(r)).toString();case jr.STYLE:return Ki(r,"Style")?Ur(r):r;case jr.SCRIPT:if(Ki(r,"Script"))return Ur(r);throw new Re(5200,!1);case jr.URL:return Ki(r,"URL")?Ur(r):cd(String(r));case jr.RESOURCE_URL:if(Ki(r,"ResourceURL"))return Ur(r);throw new Re(5201,!1);default:throw new Re(5202,!1)}}bypassSecurityTrustHtml(n){return Zb(n)}bypassSecurityTrustStyle(n){return Xb(n)}bypassSecurityTrustScript(n){return Jb(n)}bypassSecurityTrustUrl(n){return Qb(n)}bypassSecurityTrustResourceUrl(n){return eC(n)}static \u0275fac=function(r){return new(r||t)(Ze(ct))};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Dn={apiURL:"http://localhost:3003",debug:!0,mode:"local",styleURL:"http://localhost:8002/styles.css",widgetURL:"http://localhost:8002/main.js"};var qn=Pe($o());var T0="9.5.1";var k=class t{static SDK_VERSION=T0;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static CTA_EVENT="letscooee:outbound:cta";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static 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"}];static{let e=t.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");t.SDK_VERSION_CODE=parseInt(e,10)}};var S=class{static log(...e){qn.default.info(...e)}static debug(...e){qn.default.debug(...e)}static error(...e){qn.default.error(...e)}static warn(...e){qn.default.warn(...e)}static info(...e){qn.default.info(...e)}static trace(...e){qn.default.trace(...e)}static configure(e=k.LOG_PREFIX){qn.default.useDefaults({formatter:function(r){r.unshift(`${e} (v${k.SDK_VERSION}):`)}});let n=this.getDebugParam();(n==="1"||n==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?qn.default.setLevel(qn.default[localStorage.cooeeLogLevel]):qn.default.setLevel(Dn.debug?qn.default.TRACE:qn.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
1
+ "use strict";(()=>{var Tx=Object.create,sh=Object.defineProperty,xx=Object.defineProperties,Nx=Object.getOwnPropertyDescriptor,Rx=Object.getOwnPropertyDescriptors,Ax=Object.getOwnPropertyNames,G_=Object.getOwnPropertySymbols,Mx=Object.getPrototypeOf,q_=Object.prototype.hasOwnProperty,Ox=Object.prototype.propertyIsEnumerable,z_=(e,t,n)=>t in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||={})q_.call(t,n)&&z_(e,n,t[n]);if(G_)for(var n of G_(t))Ox.call(t,n)&&z_(e,n,t[n]);return e},ne=(e,t)=>xx(e,Rx(t)),ac=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Bn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Px=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ax(t))!q_.call(e,i)&&i!==n&&sh(e,i,{get:()=>t[i],enumerable:!(r=Nx(t,i))||r.enumerable});return e},Pe=(e,t,n)=>(n=e!=null?Tx(Mx(e)):{},Px(t||!e||!e.__esModule?sh(n,"default",{value:e,enumerable:!0}):n,e)),$o=Bn((e,t)=>{"use strict";(function(n){"use strict";var r={};r.VERSION="1.6.1";var i,o={},s=function(h,f){return function(){return f.apply(h,arguments)}},a=function(){var h=arguments,f=h[0],g,m;for(m=1;m<h.length;m++)for(g in h[m])!(g in f)&&h[m].hasOwnProperty(g)&&(f[g]=h[m][g]);return f},l=function(h,f){return{value:h,name:f}};r.TRACE=l(1,"TRACE"),r.DEBUG=l(2,"DEBUG"),r.INFO=l(3,"INFO"),r.TIME=l(4,"TIME"),r.WARN=l(5,"WARN"),r.ERROR=l(8,"ERROR"),r.OFF=l(99,"OFF");var c=function(h){this.context=h,this.setLevel(h.filterLevel),this.log=this.info};c.prototype={setLevel:function(h){h&&"value"in h&&(this.context.filterLevel=h)},getLevel:function(){return this.context.filterLevel},enabledFor:function(h){var f=this.context.filterLevel;return h.value>=f.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(h){typeof h=="string"&&h.length>0&&this.invoke(r.TIME,[h,"start"])},timeEnd:function(h){typeof h=="string"&&h.length>0&&this.invoke(r.TIME,[h,"end"])},invoke:function(h,f){i&&this.enabledFor(h)&&i(f,a({level:h},this.context))}};var d=new c({filterLevel:r.OFF});(function(){var h=r;h.enabledFor=s(d,d.enabledFor),h.trace=s(d,d.trace),h.debug=s(d,d.debug),h.time=s(d,d.time),h.timeEnd=s(d,d.timeEnd),h.info=s(d,d.info),h.warn=s(d,d.warn),h.error=s(d,d.error),h.log=h.info})(),r.setHandler=function(h){i=h},r.setLevel=function(h){d.setLevel(h);for(var f in o)o.hasOwnProperty(f)&&o[f].setLevel(h)},r.getLevel=function(){return d.getLevel()},r.get=function(h){return o[h]||(o[h]=new c(a({name:h},d.context)))},r.createDefaultHandler=function(h){h=h||{},h.formatter=h.formatter||function(m,b){b.name&&m.unshift("["+b.name+"]")};var f={},g=function(m,b){Function.prototype.apply.call(m,console,b)};return typeof console>"u"?function(){}:function(m,b){m=Array.prototype.slice.call(m);var I=console.log,R;b.level===r.TIME?(R=(b.name?"["+b.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(R):f[R]=new Date().getTime():console.timeEnd?console.timeEnd(R):g(I,[R+": "+(new Date().getTime()-f[R])+"ms"])):(b.level===r.WARN&&console.warn?I=console.warn:b.level===r.ERROR&&console.error?I=console.error:b.level===r.INFO&&console.info?I=console.info:b.level===r.DEBUG&&console.debug?I=console.debug:b.level===r.TRACE&&console.trace&&(I=console.trace),h.formatter(m,b),g(I,m))}},r.useDefaults=function(h){r.setLevel(h&&h.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(h))},r.setDefaults=r.useDefaults,typeof define=="function"&&define.amd?define(r):typeof t<"u"&&t.exports?t.exports=r:(r._prevLogger=n.Logger,r.noConflict=function(){return n.Logger=r._prevLogger,r},n.Logger=r)})(e)}),Yn=Bn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MilestoneRewardType=e.ProgressBarLayout=e.EngagementContentSource=e.EngagementObjective=e.OnsiteDeliveryType=e.ClickActionType=e.FrequencyGapUnit=e.FrequencyType=e.RedirectBehaviour=e.EngagementPlacementPosition=e.EngagementCollectionSource=e.PromotionType=e.CartFilterEnum=e.CartCurrencyOperator=e.CartCriteria=e.URLCriteria=e.UTMCriteria=e.CartItemSource=e.EngagementItemSource=e.PurchasedVisitor=e.LoggedInVisitor=e.VisitorType=e.SessionType=e.EngagementContentType=e.TriggerType=e.EngagementType=e.EngagementStatus=e.TimePreference=e.ScheduleFrequency=e.CriteriaFrequency=void 0;var t=function(y){return y[y.ONCE_PER_USER=1]="ONCE_PER_USER",y[y.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",y[y.EVERY_TIME=3]="EVERY_TIME",y}(t||(e.CriteriaFrequency=t={})),n=function(y){return y[y.ONE_TIME=1]="ONE_TIME",y[y.MULTIPLE=2]="MULTIPLE",y[y.RECURRING=3]="RECURRING",y}(n||(e.ScheduleFrequency=n={})),r=function(y){return y[y.NOW=1]="NOW",y[y.LATER=2]="LATER",y[y.NEVER=3]="NEVER",y}(r||(e.TimePreference=r={})),i=function(y){return y[y.PUBLISHED=1]="PUBLISHED",y[y.DRAFT=2]="DRAFT",y[y.PAUSED=3]="PAUSED",y[y.FAILED=4]="FAILED",y[y.STOPPED=5]="STOPPED",y[y.COMPLETED=6]="COMPLETED",y[y.ARCHIVED=7]="ARCHIVED",y[y.UNINSTALLED=8]="UNINSTALLED",y}(i||(e.EngagementStatus=i={})),o=function(y){return y[y.POPUP=1]="POPUP",y[y.LEAD_GENERATION=2]="LEAD_GENERATION",y[y.PRODUCT_WIDGET=3]="PRODUCT_WIDGET",y[y.PRODUCT_BUNDLE=4]="PRODUCT_BUNDLE",y[y.ANNOUNCEMENT_BAR=5]="ANNOUNCEMENT_BAR",y[y.CART_REMINDER=6]="CART_REMINDER",y[y.CRO_COPILOT=10]="CRO_COPILOT",y[y.OTHER=11]="OTHER",y}(o||(e.EngagementType=o={})),s=function(y){return y[y.NONE=0]="NONE",y[y.RULE_BASED=1]="RULE_BASED",y[y.INTENT_BASED=2]="INTENT_BASED",y}(s||(e.TriggerType=s={})),a=function(y){return y[y.SINGLE=1]="SINGLE",y[y.EXCLUSION=2]="EXCLUSION",y[y.ABTESTING=3]="ABTESTING",y}(a||(e.EngagementContentType=a={})),l=function(y){return y[y.ALL=0]="ALL",y[y.NEW_ONLY=1]="NEW_ONLY",y[y.RETURNING_ONLY=2]="RETURNING_ONLY",y}(l||(e.SessionType=l={})),c=function(y){return y[y.ALL=0]="ALL",y[y.LOGGED_IN_ONLY=3]="LOGGED_IN_ONLY",y[y.NON_LOGGED_IN_ONLY=4]="NON_LOGGED_IN_ONLY",y[y.PURCHASED=5]="PURCHASED",y[y.NON_PURCHASED=6]="NON_PURCHASED",y[y.ABANDON_CART=7]="ABANDON_CART",y[y.RETURNING_AND_NON_PURCHASED=8]="RETURNING_AND_NON_PURCHASED",y}(c||(e.VisitorType=c={})),d=function(y){return y.ALL="ALL",y.LOGGED_IN="LOGGED_IN",y.NON_LOGGED_IN="NON_LOGGED_IN",y}(d||(e.LoggedInVisitor=d={})),h=function(y){return y.ALL="ALL",y.PURCHASED="PURCHASED",y.NON_PURCHASED="NON_PURCHASED",y}(h||(e.PurchasedVisitor=h={})),f=function(y){return y[y.NONE=0]="NONE",y[y.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",y[y.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",y[y.SINGLE_ITEM=3]="SINGLE_ITEM",y[y.TOP_SELLING=4]="TOP_SELLING",y[y.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",y[y.NEW_ARRIVALS=6]="NEW_ARRIVALS",y[y.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",y[y.EVENT_ITEM=8]="EVENT_ITEM",y[y.CART_ITEM=9]="CART_ITEM",y[y.BUNDLE=10]="BUNDLE",y[y.CURRENT_ITEM=11]="CURRENT_ITEM",y[y.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",y[y.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",y[y.TRENDING_ITEMS=14]="TRENDING_ITEMS",y}(f||(e.EngagementItemSource=f={})),g=function(y){return y[y.LAST_ADDED=1]="LAST_ADDED",y[y.FIRST_ADDED=2]="FIRST_ADDED",y[y.HIGHEST_PRICE=3]="HIGHEST_PRICE",y[y.LOWEST_PRICE=4]="LOWEST_PRICE",y[y.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",y[y.ALL=6]="ALL",y}(g||(e.CartItemSource=g={})),m=function(y){return y[y.ALL=0]="ALL",y[y.ONLY_ORGANIC=1]="ONLY_ORGANIC",y[y.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",y[y.INCLUDES=3]="INCLUDES",y[y.EXCLUDES=4]="EXCLUDES",y}(m||(e.UTMCriteria=m={})),b=function(y){return y[y.NONE=0]="NONE",y[y.LIKE=1]="LIKE",y[y.NOT_LIKE=2]="NOT_LIKE",y[y.EQUALS=3]="EQUALS",y[y.NOT_EQUALS=4]="NOT_EQUALS",y}(b||(e.URLCriteria=b={})),I=function(y){return y[y.NONE=0]="NONE",y[y.LESS_THAN=1]="LESS_THAN",y[y.GREATER_THAN=2]="GREATER_THAN",y[y.BETWEEN=3]="BETWEEN",y[y.EQUALS=4]="EQUALS",y}(I||(e.CartCriteria=I={})),R=function(y){return y[y.ALL=0]="ALL",y[y.INCLUDES=1]="INCLUDES",y[y.EXCLUDES=2]="EXCLUDES",y}(R||(e.CartCurrencyOperator=R={})),j=function(y){return y[y.NONE=0]="NONE",y[y.AMOUNT=1]="AMOUNT",y[y.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",y[y.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",y}(j||(e.CartFilterEnum=j={})),U=function(y){return y[y.NONE=0]="NONE",y[y.ITEM=1]="ITEM",y[y.COLLECTION=2]="COLLECTION",y}(U||(e.PromotionType=U={})),M=function(y){return y[y.NONE=0]="NONE",y[y.SINGLE=1]="SINGLE",y[y.MULTIPLE=2]="MULTIPLE",y}(M||(e.EngagementCollectionSource=M={})),q=function(y){return y.BEFORE="before",y.AFTER="after",y.INSIDE_FIRST="insideFirst",y.INSIDE_LAST="insideLast",y}(q||(e.EngagementPlacementPosition=q={})),xe=function(y){return y.SHOPIFY_CHECKOUT="shopify_checkout",y.THIRD_PARTY_CHECKOUT="third_party_checkout",y.CART_PAGE="cart_page",y.CART_DRAWER="cart_drawer",y}(xe||(e.RedirectBehaviour=xe={})),st=function(y){return y.ONCE_IN_SESSION="ONCE_IN_SESSION",y.ACROSS_SESSIONS="ACROSS_SESSIONS",y}(st||(e.FrequencyType=st={})),V=function(y){return y.DAYS="DAYS",y.HOURS="HOURS",y.MINUTES="MINUTES",y.SECONDS="SECONDS",y}(V||(e.FrequencyGapUnit=V={})),he=function(y){return y[y.NONE=0]="NONE",y[y.REJECT_POPUP=1]="REJECT_POPUP",y[y.ACCEPT_POPUP=2]="ACCEPT_POPUP",y[y.GO_TO_URL=4]="GO_TO_URL",y[y.SHARE=5]="SHARE",y[y.KEY_VALUE=100]="KEY_VALUE",y[y.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",y[y.ADD_TO_CART=102]="ADD_TO_CART",y[y.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",y[y.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",y[y.OPEN_CART=105]="OPEN_CART",y[y.SUBMIT_FORM=106]="SUBMIT_FORM",y[y.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",y[y.ADD_BUNDLE=108]="ADD_BUNDLE",y[y.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",y}(he||(e.ClickActionType=he={})),ee=function(y){return y.POPUP="POPUP",y.PAGE_EMBED="PAGE_EMBED",y.CART_EMBED="CART_EMBED",y.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",y}(ee||(e.OnsiteDeliveryType=ee={})),ue=function(y){return y.PRODUCT_PROMOTION="PRODUCT_PROMOTION",y.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",y.CART_RECOVERY="CART_RECOVERY",y.ANNOUNCEMENT="ANNOUNCEMENT",y.LEAD_GENERATION="LEAD_GENERATION",y.DATA_COLLECTION="DATA_COLLECTION",y.SALE_PROMOTION="SALE_PROMOTION",y.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",y.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",y.BYOB="BYOB",y.PROGRESS_BAR="PROGRESS_BAR",y.BUY_NOW="BUY_NOW",y}(ue||(e.EngagementObjective=ue={})),Oe=function(y){return y.COOEE="COOEE",y.KLAVIYO="KLAVIYO",y}(Oe||(e.EngagementContentSource=Oe={})),lt=function(y){return y.ICONS="ICONS",y.TILES="TILES",y}(lt||(e.ProgressBarLayout=lt={})),ot=function(y){return y.FREE_SHIPPING="FREE_SHIPPING",y.DISCOUNT="DISCOUNT",y.FREE_AUTO_GIFT="FREE_AUTO_GIFT",y.FREE_GIFT_SELECT="FREE_GIFT_SELECT",y}(ot||(e.MilestoneRewardType=ot={}))}),ea=Bn(e=>{"use strict";var t=e&&e.__awaiter||function(r,i,o,s){function a(l){return l instanceof o?l:new o(function(c){c(l)})}return new(o||(o=Promise))(function(l,c){function d(g){try{f(s.next(g))}catch(m){c(m)}}function h(g){try{f(s.throw(g))}catch(m){c(m)}}function f(g){g.done?l(g.value):a(g.value).then(d,h)}f((s=s.apply(r,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.JSUtils=void 0;var n=class{static isObject(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}static parseToAny(r){try{return JSON.parse(r.toString())}catch{}return r.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(r.toString()):r}static sleep(r){return t(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,r))})}static hasKeys(r){return r?Object.keys(r).length>=1:!1}static convertObjectToArray(r,i){return i.reduce((o,s)=>(r.hasOwnProperty(s)&&r[s]!=null&&o.push({[s]:r[s]}),o),[])}static removeNullUndefinedKeys(r){return Object.keys(r).reduce((i,o)=>(r[o]!==null&&r[o]!==void 0&&(i[o]=r[o]),i),{})}static stringify(r){return JSON.stringify(r,function(i,o){return o===void 0?null:o})}};e.JSUtils=n,n.ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)}),sS=Bn((e,t)=>{"use strict";(function(n){if(typeof e=="object"&&typeof t<"u")t.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=n()}})(function(){var n,r,i;return function o(s,a,l){function c(f,g){if(!a[f]){if(!s[f]){var m=typeof ac=="function"&&ac;if(!g&&m)return m(f,!0);if(d)return d(f,!0);var b=new Error("Cannot find module '"+f+"'");throw b.code="MODULE_NOT_FOUND",b}var I=a[f]={exports:{}};s[f][0].call(I.exports,function(R){var j=s[f][1][R];return c(j||R)},I,I.exports,o,s,a,l)}return a[f].exports}for(var d=typeof ac=="function"&&ac,h=0;h<l.length;h++)c(l[h]);return c}({1:[function(o,s,a){(function(l){"use strict";var c=l.MutationObserver||l.WebKitMutationObserver,d;if(c){var h=0,f=new c(R),g=l.document.createTextNode("");f.observe(g,{characterData:!0}),d=function(){g.data=h=++h%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var m=new l.MessageChannel;m.port1.onmessage=R,d=function(){m.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?d=function(){var U=l.document.createElement("script");U.onreadystatechange=function(){R(),U.onreadystatechange=null,U.parentNode.removeChild(U),U=null},l.document.documentElement.appendChild(U)}:d=function(){setTimeout(R,0)};var b,I=[];function R(){b=!0;for(var U,M,q=I.length;q;){for(M=I,I=[],U=-1;++U<q;)M[U]();q=I.length}b=!1}s.exports=j;function j(U){I.push(U)===1&&!b&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(o,s,a){"use strict";var l=o(1);function c(){}var d={},h=["REJECTED"],f=["FULFILLED"],g=["PENDING"];s.exports=m;function m(V){if(typeof V!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,V!==c&&j(this,V)}m.prototype.catch=function(V){return this.then(null,V)},m.prototype.then=function(V,he){if(typeof V!="function"&&this.state===f||typeof he!="function"&&this.state===h)return this;var ee=new this.constructor(c);if(this.state!==g){var ue=this.state===f?V:he;I(ee,ue,this.outcome)}else this.queue.push(new b(ee,V,he));return ee};function b(V,he,ee){this.promise=V,typeof he=="function"&&(this.onFulfilled=he,this.callFulfilled=this.otherCallFulfilled),typeof ee=="function"&&(this.onRejected=ee,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(V){d.resolve(this.promise,V)},b.prototype.otherCallFulfilled=function(V){I(this.promise,this.onFulfilled,V)},b.prototype.callRejected=function(V){d.reject(this.promise,V)},b.prototype.otherCallRejected=function(V){I(this.promise,this.onRejected,V)};function I(V,he,ee){l(function(){var ue;try{ue=he(ee)}catch(Oe){return d.reject(V,Oe)}ue===V?d.reject(V,new TypeError("Cannot resolve promise with itself")):d.resolve(V,ue)})}d.resolve=function(V,he){var ee=U(R,he);if(ee.status==="error")return d.reject(V,ee.value);var ue=ee.value;if(ue)j(V,ue);else{V.state=f,V.outcome=he;for(var Oe=-1,lt=V.queue.length;++Oe<lt;)V.queue[Oe].callFulfilled(he)}return V},d.reject=function(V,he){V.state=h,V.outcome=he;for(var ee=-1,ue=V.queue.length;++ee<ue;)V.queue[ee].callRejected(he);return V};function R(V){var he=V&&V.then;if(V&&(typeof V=="object"||typeof V=="function")&&typeof he=="function")return function(){he.apply(V,arguments)}}function j(V,he){var ee=!1;function ue(y){ee||(ee=!0,d.reject(V,y))}function Oe(y){ee||(ee=!0,d.resolve(V,y))}function lt(){he(Oe,ue)}var ot=U(lt);ot.status==="error"&&ue(ot.value)}function U(V,he){var ee={};try{ee.value=V(he),ee.status="success"}catch(ue){ee.status="error",ee.value=ue}return ee}m.resolve=M;function M(V){return V instanceof this?V:d.resolve(new this(c),V)}m.reject=q;function q(V){var he=new this(c);return d.reject(he,V)}m.all=xe;function xe(V){var he=this;if(Object.prototype.toString.call(V)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ee=V.length,ue=!1;if(!ee)return this.resolve([]);for(var Oe=new Array(ee),lt=0,ot=-1,y=new this(c);++ot<ee;)Ft(V[ot],ot);return y;function Ft(We,Gt){he.resolve(We).then(we,function(D){ue||(ue=!0,d.reject(y,D))});function we(D){Oe[Gt]=D,++lt===ee&&!ue&&(ue=!0,d.resolve(y,Oe))}}}m.race=st;function st(V){var he=this;if(Object.prototype.toString.call(V)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ee=V.length,ue=!1;if(!ee)return this.resolve([]);for(var Oe=-1,lt=new this(c);++Oe<ee;)ot(V[Oe]);return lt;function ot(y){he.resolve(y).then(function(Ft){ue||(ue=!0,d.resolve(lt,Ft))},function(Ft){ue||(ue=!0,d.reject(lt,Ft))})}}},{1:1}],3:[function(o,s,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=o(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(o,s,a){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _};function c(_,E){if(!(_ instanceof E))throw new TypeError("Cannot call a class as a function")}function d(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=d();function f(){try{if(!h||!h.open)return!1;var _=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),E=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!_||E)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function g(_,E){_=_||[],E=E||{};try{return new Blob(_,E)}catch(N){if(N.name!=="TypeError")throw N;for(var C=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,O=new C,A=0;A<_.length;A+=1)O.append(_[A]);return O.getBlob(E.type)}}typeof Promise>"u"&&o(3);var m=Promise;function b(_,E){E&&_.then(function(C){E(null,C)},function(C){E(C)})}function I(_,E,C){typeof E=="function"&&_.then(E),typeof C=="function"&&_.catch(C)}function R(_){return typeof _!="string"&&(console.warn(_+" used as a key, but it is not a string."),_=String(_)),_}function j(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var U="local-forage-detect-blob-support",M=void 0,q={},xe=Object.prototype.toString,st="readonly",V="readwrite";function he(_){for(var E=_.length,C=new ArrayBuffer(E),O=new Uint8Array(C),A=0;A<E;A++)O[A]=_.charCodeAt(A);return C}function ee(_){return new m(function(E){var C=_.transaction(U,V),O=g([""]);C.objectStore(U).put(O,"key"),C.onabort=function(A){A.preventDefault(),A.stopPropagation(),E(!1)},C.oncomplete=function(){var A=navigator.userAgent.match(/Chrome\/(\d+)/),N=navigator.userAgent.match(/Edge\//);E(N||!A||parseInt(A[1],10)>=43)}}).catch(function(){return!1})}function ue(_){return typeof M=="boolean"?m.resolve(M):ee(_).then(function(E){return M=E,M})}function Oe(_){var E=q[_.name],C={};C.promise=new m(function(O,A){C.resolve=O,C.reject=A}),E.deferredOperations.push(C),E.dbReady?E.dbReady=E.dbReady.then(function(){return C.promise}):E.dbReady=C.promise}function lt(_){var E=q[_.name],C=E.deferredOperations.pop();if(C)return C.resolve(),C.promise}function ot(_,E){var C=q[_.name],O=C.deferredOperations.pop();if(O)return O.reject(E),O.promise}function y(_,E){return new m(function(C,O){if(q[_.name]=q[_.name]||_e(),_.db)if(E)Oe(_),_.db.close();else return C(_.db);var A=[_.name];E&&A.push(_.version);var N=h.open.apply(h,A);E&&(N.onupgradeneeded=function(B){var H=N.result;try{H.createObjectStore(_.storeName),B.oldVersion<=1&&H.createObjectStore(U)}catch(G){if(G.name==="ConstraintError")console.warn('The database "'+_.name+'" has been upgraded from version '+B.oldVersion+" to version "+B.newVersion+', but the storage "'+_.storeName+'" already exists.');else throw G}}),N.onerror=function(B){B.preventDefault(),O(N.error)},N.onsuccess=function(){var B=N.result;B.onversionchange=function(H){H.target.close()},C(B),lt(_)}})}function Ft(_){return y(_,!1)}function We(_){return y(_,!0)}function Gt(_,E){if(!_.db)return!0;var C=!_.db.objectStoreNames.contains(_.storeName),O=_.version<_.db.version,A=_.version>_.db.version;if(O&&(_.version!==E&&console.warn('The database "'+_.name+`" can't be downgraded from version `+_.db.version+" to version "+_.version+"."),_.version=_.db.version),A||C){if(C){var N=_.db.version+1;N>_.version&&(_.version=N)}return!0}return!1}function we(_){return new m(function(E,C){var O=new FileReader;O.onerror=C,O.onloadend=function(A){var N=btoa(A.target.result||"");E({__local_forage_encoded_blob:!0,data:N,type:_.type})},O.readAsBinaryString(_)})}function D(_){var E=he(atob(_.data));return g([E],{type:_.type})}function x(_){return _&&_.__local_forage_encoded_blob}function Y(_){var E=this,C=E._initReady().then(function(){var O=q[E._dbInfo.name];if(O&&O.dbReady)return O.dbReady});return I(C,_,_),C}function te(_){Oe(_);for(var E=q[_.name],C=E.forages,O=0;O<C.length;O++){var A=C[O];A._dbInfo.db&&(A._dbInfo.db.close(),A._dbInfo.db=null)}return _.db=null,Ft(_).then(function(N){return _.db=N,Gt(_)?We(_):N}).then(function(N){_.db=E.db=N;for(var B=0;B<C.length;B++)C[B]._dbInfo.db=N}).catch(function(N){throw ot(_,N),N})}function se(_,E,C,O){O===void 0&&(O=1);try{var A=_.db.transaction(_.storeName,E);C(null,A)}catch(N){if(O>0&&(!_.db||N.name==="InvalidStateError"||N.name==="NotFoundError"))return m.resolve().then(function(){if(!_.db||N.name==="NotFoundError"&&!_.db.objectStoreNames.contains(_.storeName)&&_.version<=_.db.version)return _.db&&(_.version=_.db.version+1),We(_)}).then(function(){return te(_).then(function(){se(_,E,C,O-1)})}).catch(C);C(N)}}function _e(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function me(_){var E=this,C={db:null};if(_)for(var O in _)C[O]=_[O];var A=q[C.name];A||(A=_e(),q[C.name]=A),A.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=Y);var N=[];function B(){return m.resolve()}for(var H=0;H<A.forages.length;H++){var G=A.forages[H];G!==E&&N.push(G._initReady().catch(B))}var z=A.forages.slice(0);return m.all(N).then(function(){return C.db=A.db,Ft(C)}).then(function($){return C.db=$,Gt(C,E._defaultConfig.version)?We(C):$}).then(function($){C.db=A.db=$,E._dbInfo=C;for(var ae=0;ae<z.length;ae++){var $e=z[ae];$e!==E&&($e._dbInfo.db=C.db,$e._dbInfo.version=C.version)}})}function le(_,E){var C=this;_=R(_);var O=new m(function(A,N){C.ready().then(function(){se(C._dbInfo,st,function(B,H){if(B)return N(B);try{var G=H.objectStore(C._dbInfo.storeName),z=G.get(_);z.onsuccess=function(){var $=z.result;$===void 0&&($=null),x($)&&($=D($)),A($)},z.onerror=function(){N(z.error)}}catch($){N($)}})}).catch(N)});return b(O,E),O}function be(_,E){var C=this,O=new m(function(A,N){C.ready().then(function(){se(C._dbInfo,st,function(B,H){if(B)return N(B);try{var G=H.objectStore(C._dbInfo.storeName),z=G.openCursor(),$=1;z.onsuccess=function(){var ae=z.result;if(ae){var $e=ae.value;x($e)&&($e=D($e));var It=_($e,ae.key,$++);It!==void 0?A(It):ae.continue()}else A()},z.onerror=function(){N(z.error)}}catch(ae){N(ae)}})}).catch(N)});return b(O,E),O}function Be(_,E,C){var O=this;_=R(_);var A=new m(function(N,B){var H;O.ready().then(function(){return H=O._dbInfo,xe.call(E)==="[object Blob]"?ue(H.db).then(function(G){return G?E:we(E)}):E}).then(function(G){se(O._dbInfo,V,function(z,$){if(z)return B(z);try{var ae=$.objectStore(O._dbInfo.storeName);G===null&&(G=void 0);var $e=ae.put(G,_);$.oncomplete=function(){G===void 0&&(G=null),N(G)},$.onabort=$.onerror=function(){var It=$e.error?$e.error:$e.transaction.error;B(It)}}catch(It){B(It)}})}).catch(B)});return b(A,C),A}function Tt(_,E){var C=this;_=R(_);var O=new m(function(A,N){C.ready().then(function(){se(C._dbInfo,V,function(B,H){if(B)return N(B);try{var G=H.objectStore(C._dbInfo.storeName),z=G.delete(_);H.oncomplete=function(){A()},H.onerror=function(){N(z.error)},H.onabort=function(){var $=z.error?z.error:z.transaction.error;N($)}}catch($){N($)}})}).catch(N)});return b(O,E),O}function Fe(_){var E=this,C=new m(function(O,A){E.ready().then(function(){se(E._dbInfo,V,function(N,B){if(N)return A(N);try{var H=B.objectStore(E._dbInfo.storeName),G=H.clear();B.oncomplete=function(){O()},B.onabort=B.onerror=function(){var z=G.error?G.error:G.transaction.error;A(z)}}catch(z){A(z)}})}).catch(A)});return b(C,_),C}function Xe(_){var E=this,C=new m(function(O,A){E.ready().then(function(){se(E._dbInfo,st,function(N,B){if(N)return A(N);try{var H=B.objectStore(E._dbInfo.storeName),G=H.count();G.onsuccess=function(){O(G.result)},G.onerror=function(){A(G.error)}}catch(z){A(z)}})}).catch(A)});return b(C,_),C}function Rt(_,E){var C=this,O=new m(function(A,N){if(_<0){A(null);return}C.ready().then(function(){se(C._dbInfo,st,function(B,H){if(B)return N(B);try{var G=H.objectStore(C._dbInfo.storeName),z=!1,$=G.openKeyCursor();$.onsuccess=function(){var ae=$.result;if(!ae){A(null);return}_===0||z?A(ae.key):(z=!0,ae.advance(_))},$.onerror=function(){N($.error)}}catch(ae){N(ae)}})}).catch(N)});return b(O,E),O}function Te(_){var E=this,C=new m(function(O,A){E.ready().then(function(){se(E._dbInfo,st,function(N,B){if(N)return A(N);try{var H=B.objectStore(E._dbInfo.storeName),G=H.openKeyCursor(),z=[];G.onsuccess=function(){var $=G.result;if(!$){O(z);return}z.push($.key),$.continue()},G.onerror=function(){A(G.error)}}catch($){A($)}})}).catch(A)});return b(C,_),C}function u(_,E){E=j.apply(this,arguments);var C=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||C.name,_.storeName=_.storeName||C.storeName);var O=this,A;if(!_.name)A=m.reject("Invalid arguments");else{var N=_.name===C.name&&O._dbInfo.db,B=N?m.resolve(O._dbInfo.db):Ft(_).then(function(H){var G=q[_.name],z=G.forages;G.db=H;for(var $=0;$<z.length;$++)z[$]._dbInfo.db=H;return H});_.storeName?A=B.then(function(H){if(H.objectStoreNames.contains(_.storeName)){var G=H.version+1;Oe(_);var z=q[_.name],$=z.forages;H.close();for(var ae=0;ae<$.length;ae++){var $e=$[ae];$e._dbInfo.db=null,$e._dbInfo.version=G}var It=new m(function(wt,Jt){var zt=h.open(_.name,G);zt.onerror=function(nr){var ih=zt.result;ih.close(),Jt(nr)},zt.onupgradeneeded=function(){var nr=zt.result;nr.deleteObjectStore(_.storeName)},zt.onsuccess=function(){var nr=zt.result;nr.close(),wt(nr)}});return It.then(function(wt){z.db=wt;for(var Jt=0;Jt<$.length;Jt++){var zt=$[Jt];zt._dbInfo.db=wt,lt(zt._dbInfo)}}).catch(function(wt){throw(ot(_,wt)||m.resolve()).catch(function(){}),wt})}}):A=B.then(function(H){Oe(_);var G=q[_.name],z=G.forages;H.close();for(var $=0;$<z.length;$++){var ae=z[$];ae._dbInfo.db=null}var $e=new m(function(It,wt){var Jt=h.deleteDatabase(_.name);Jt.onerror=function(){var zt=Jt.result;zt&&zt.close(),wt(Jt.error)},Jt.onblocked=function(){console.warn('dropInstance blocked for database "'+_.name+'" until all open connections are closed')},Jt.onsuccess=function(){var zt=Jt.result;zt&&zt.close(),It(zt)}});return $e.then(function(It){G.db=It;for(var wt=0;wt<z.length;wt++){var Jt=z[wt];lt(Jt._dbInfo)}}).catch(function(It){throw(ot(_,It)||m.resolve()).catch(function(){}),It})})}return b(A,E),A}var p={_driver:"asyncStorage",_initStorage:me,_support:f(),iterate:be,getItem:le,setItem:Be,removeItem:Tt,clear:Fe,length:Xe,key:Rt,keys:Te,dropInstance:u};function v(){return typeof openDatabase=="function"}var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L="~~local_forage_type~",F=/^~~local_forage_type~([^~]+)~/,K="__lfsc__:",et=K.length,He="arbf",Me="blob",ut="si08",J="ui08",Ee="uic8",pe="si16",tt="si32",yn="ur16",gn="ui32",it="fl32",fe="fl64",Rn=et+He.length,Xs=Object.prototype.toString;function Na(_){var E=_.length*.75,C=_.length,O,A=0,N,B,H,G;_[_.length-1]==="="&&(E--,_[_.length-2]==="="&&E--);var z=new ArrayBuffer(E),$=new Uint8Array(z);for(O=0;O<C;O+=4)N=T.indexOf(_[O]),B=T.indexOf(_[O+1]),H=T.indexOf(_[O+2]),G=T.indexOf(_[O+3]),$[A++]=N<<2|B>>4,$[A++]=(B&15)<<4|H>>2,$[A++]=(H&3)<<6|G&63;return z}function eh(_){var E=new Uint8Array(_),C="",O;for(O=0;O<E.length;O+=3)C+=T[E[O]>>2],C+=T[(E[O]&3)<<4|E[O+1]>>4],C+=T[(E[O+1]&15)<<2|E[O+2]>>6],C+=T[E[O+2]&63];return E.length%3===2?C=C.substring(0,C.length-1)+"=":E.length%3===1&&(C=C.substring(0,C.length-2)+"=="),C}function nS(_,E){var C="";if(_&&(C=Xs.call(_)),_&&(C==="[object ArrayBuffer]"||_.buffer&&Xs.call(_.buffer)==="[object ArrayBuffer]")){var O,A=K;_ instanceof ArrayBuffer?(O=_,A+=He):(O=_.buffer,C==="[object Int8Array]"?A+=ut:C==="[object Uint8Array]"?A+=J:C==="[object Uint8ClampedArray]"?A+=Ee:C==="[object Int16Array]"?A+=pe:C==="[object Uint16Array]"?A+=yn:C==="[object Int32Array]"?A+=tt:C==="[object Uint32Array]"?A+=gn:C==="[object Float32Array]"?A+=it:C==="[object Float64Array]"?A+=fe:E(new Error("Failed to get type for BinaryArray"))),E(A+eh(O))}else if(C==="[object Blob]"){var N=new FileReader;N.onload=function(){var B=L+_.type+"~"+eh(this.result);E(K+Me+B)},N.readAsArrayBuffer(_)}else try{E(JSON.stringify(_))}catch(B){console.error("Couldn't convert value into a JSON string: ",_),E(null,B)}}function rS(_){if(_.substring(0,et)!==K)return JSON.parse(_);var E=_.substring(Rn),C=_.substring(et,Rn),O;if(C===Me&&F.test(E)){var A=E.match(F);O=A[1],E=E.substring(A[0].length)}var N=Na(E);switch(C){case He:return N;case Me:return g([N],{type:O});case ut:return new Int8Array(N);case J:return new Uint8Array(N);case Ee:return new Uint8ClampedArray(N);case pe:return new Int16Array(N);case yn:return new Uint16Array(N);case tt:return new Int32Array(N);case gn:return new Uint32Array(N);case it:return new Float32Array(N);case fe:return new Float64Array(N);default:throw new Error("Unkown type: "+C)}}var th={serialize:nS,deserialize:rS,stringToBuffer:Na,bufferToString:eh};function r_(_,E,C,O){_.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],C,O)}function iS(_){var E=this,C={db:null};if(_)for(var O in _)C[O]=typeof _[O]!="string"?_[O].toString():_[O];var A=new m(function(N,B){try{C.db=openDatabase(C.name,String(C.version),C.description,C.size)}catch(H){return B(H)}C.db.transaction(function(H){r_(H,C,function(){E._dbInfo=C,N()},function(G,z){B(z)})},B)});return C.serializer=th,A}function oo(_,E,C,O,A,N){_.executeSql(C,O,A,function(B,H){H.code===H.SYNTAX_ERR?B.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[E.storeName],function(G,z){z.rows.length?N(G,H):r_(G,E,function(){G.executeSql(C,O,A,N)},N)},N):N(B,H)},N)}function oS(_,E){var C=this;_=R(_);var O=new m(function(A,N){C.ready().then(function(){var B=C._dbInfo;B.db.transaction(function(H){oo(H,B,"SELECT * FROM "+B.storeName+" WHERE key = ? LIMIT 1",[_],function(G,z){var $=z.rows.length?z.rows.item(0).value:null;$&&($=B.serializer.deserialize($)),A($)},function(G,z){N(z)})})}).catch(N)});return b(O,E),O}function YS(_,E){var C=this,O=new m(function(A,N){C.ready().then(function(){var B=C._dbInfo;B.db.transaction(function(H){oo(H,B,"SELECT * FROM "+B.storeName,[],function(G,z){for(var $=z.rows,ae=$.length,$e=0;$e<ae;$e++){var It=$.item($e),wt=It.value;if(wt&&(wt=B.serializer.deserialize(wt)),wt=_(wt,It.key,$e+1),wt!==void 0){A(wt);return}}A()},function(G,z){N(z)})})}).catch(N)});return b(O,E),O}function U_(_,E,C,O){var A=this;_=R(_);var N=new m(function(B,H){A.ready().then(function(){E===void 0&&(E=null);var G=E,z=A._dbInfo;z.serializer.serialize(E,function($,ae){ae?H(ae):z.db.transaction(function($e){oo($e,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[_,$],function(){B(G)},function(It,wt){H(wt)})},function($e){if($e.code===$e.QUOTA_ERR){if(O>0){B(U_.apply(A,[_,G,C,O-1]));return}H($e)}})})}).catch(H)});return b(N,C),N}function Y1(_,E,C){return U_.apply(this,[_,E,C,1])}function sI(_,E){var C=this;_=R(_);var O=new m(function(A,N){C.ready().then(function(){var B=C._dbInfo;B.db.transaction(function(H){oo(H,B,"DELETE FROM "+B.storeName+" WHERE key = ?",[_],function(){A()},function(G,z){N(z)})})}).catch(N)});return b(O,E),O}function aI(_){var E=this,C=new m(function(O,A){E.ready().then(function(){var N=E._dbInfo;N.db.transaction(function(B){oo(B,N,"DELETE FROM "+N.storeName,[],function(){O()},function(H,G){A(G)})})}).catch(A)});return b(C,_),C}function cI(_){var E=this,C=new m(function(O,A){E.ready().then(function(){var N=E._dbInfo;N.db.transaction(function(B){oo(B,N,"SELECT COUNT(key) as c FROM "+N.storeName,[],function(H,G){var z=G.rows.item(0).c;O(z)},function(H,G){A(G)})})}).catch(A)});return b(C,_),C}function PT(_,E){var C=this,O=new m(function(A,N){C.ready().then(function(){var B=C._dbInfo;B.db.transaction(function(H){oo(H,B,"SELECT key FROM "+B.storeName+" WHERE id = ? LIMIT 1",[_+1],function(G,z){var $=z.rows.length?z.rows.item(0).key:null;A($)},function(G,z){N(z)})})}).catch(N)});return b(O,E),O}function LT(_){var E=this,C=new m(function(O,A){E.ready().then(function(){var N=E._dbInfo;N.db.transaction(function(B){oo(B,N,"SELECT key FROM "+N.storeName,[],function(H,G){for(var z=[],$=0;$<G.rows.length;$++)z.push(G.rows.item($).key);O(z)},function(H,G){A(G)})})}).catch(A)});return b(C,_),C}function BT(_){return new m(function(E,C){_.transaction(function(O){O.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(A,N){for(var B=[],H=0;H<N.rows.length;H++)B.push(N.rows.item(H).name);E({db:_,storeNames:B})},function(A,N){C(N)})},function(O){C(O)})})}function $T(_,E){E=j.apply(this,arguments);var C=this.config();_=typeof _!="function"&&_||{},_.name||(_.name=_.name||C.name,_.storeName=_.storeName||C.storeName);var O=this,A;return _.name?A=new m(function(N){var B;_.name===C.name?B=O._dbInfo.db:B=openDatabase(_.name,"","",0),_.storeName?N({db:B,storeNames:[_.storeName]}):N(BT(B))}).then(function(N){return new m(function(B,H){N.db.transaction(function(G){function z(It){return new m(function(wt,Jt){G.executeSql("DROP TABLE IF EXISTS "+It,[],function(){wt()},function(zt,nr){Jt(nr)})})}for(var $=[],ae=0,$e=N.storeNames.length;ae<$e;ae++)$.push(z(N.storeNames[ae]));m.all($).then(function(){B()}).catch(function(It){H(It)})},function(G){H(G)})})}):A=m.reject("Invalid arguments"),b(A,E),A}var zT={_driver:"webSQLStorage",_initStorage:iS,_support:v(),iterate:YS,getItem:oS,setItem:Y1,removeItem:sI,clear:aI,length:cI,key:PT,keys:LT,dropInstance:$T};function WT(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function j_(_,E){var C=_.name+"/";return _.storeName!==E.storeName&&(C+=_.storeName+"/"),C}function GT(){var _="_localforage_support_test";try{return localStorage.setItem(_,!0),localStorage.removeItem(_),!1}catch{return!0}}function qT(){return!GT()||localStorage.length>0}function YT(_){var E=this,C={};if(_)for(var O in _)C[O]=_[O];return C.keyPrefix=j_(_,E._defaultConfig),qT()?(E._dbInfo=C,C.serializer=th,m.resolve()):m.reject()}function ZT(_){var E=this,C=E.ready().then(function(){for(var O=E._dbInfo.keyPrefix,A=localStorage.length-1;A>=0;A--){var N=localStorage.key(A);N.indexOf(O)===0&&localStorage.removeItem(N)}});return b(C,_),C}function XT(_,E){var C=this;_=R(_);var O=C.ready().then(function(){var A=C._dbInfo,N=localStorage.getItem(A.keyPrefix+_);return N&&(N=A.serializer.deserialize(N)),N});return b(O,E),O}function QT(_,E){var C=this,O=C.ready().then(function(){for(var A=C._dbInfo,N=A.keyPrefix,B=N.length,H=localStorage.length,G=1,z=0;z<H;z++){var $=localStorage.key(z);if($.indexOf(N)===0){var ae=localStorage.getItem($);if(ae&&(ae=A.serializer.deserialize(ae)),ae=_(ae,$.substring(B),G++),ae!==void 0)return ae}}});return b(O,E),O}function KT(_,E){var C=this,O=C.ready().then(function(){var A=C._dbInfo,N;try{N=localStorage.key(_)}catch{N=null}return N&&(N=N.substring(A.keyPrefix.length)),N});return b(O,E),O}function JT(_){var E=this,C=E.ready().then(function(){for(var O=E._dbInfo,A=localStorage.length,N=[],B=0;B<A;B++){var H=localStorage.key(B);H.indexOf(O.keyPrefix)===0&&N.push(H.substring(O.keyPrefix.length))}return N});return b(C,_),C}function ex(_){var E=this,C=E.keys().then(function(O){return O.length});return b(C,_),C}function tx(_,E){var C=this;_=R(_);var O=C.ready().then(function(){var A=C._dbInfo;localStorage.removeItem(A.keyPrefix+_)});return b(O,E),O}function nx(_,E,C){var O=this;_=R(_);var A=O.ready().then(function(){E===void 0&&(E=null);var N=E;return new m(function(B,H){var G=O._dbInfo;G.serializer.serialize(E,function(z,$){if($)H($);else try{localStorage.setItem(G.keyPrefix+_,z),B(N)}catch(ae){(ae.name==="QuotaExceededError"||ae.name==="NS_ERROR_DOM_QUOTA_REACHED")&&H(ae),H(ae)}})})});return b(A,C),A}function rx(_,E){if(E=j.apply(this,arguments),_=typeof _!="function"&&_||{},!_.name){var C=this.config();_.name=_.name||C.name,_.storeName=_.storeName||C.storeName}var O=this,A;return _.name?A=new m(function(N){_.storeName?N(j_(_,O._defaultConfig)):N(_.name+"/")}).then(function(N){for(var B=localStorage.length-1;B>=0;B--){var H=localStorage.key(B);H.indexOf(N)===0&&localStorage.removeItem(H)}}):A=m.reject("Invalid arguments"),b(A,E),A}var ix={_driver:"localStorageWrapper",_initStorage:YT,_support:WT(),iterate:QT,getItem:XT,setItem:nx,removeItem:tx,clear:ZT,length:ex,key:KT,keys:JT,dropInstance:rx},ox=function(_,E){return _===E||typeof _=="number"&&typeof E=="number"&&isNaN(_)&&isNaN(E)},sx=function(_,E){for(var C=_.length,O=0;O<C;){if(ox(_[O],E))return!0;O++}return!1},V_=Array.isArray||function(_){return Object.prototype.toString.call(_)==="[object Array]"},vl={},H_={},Qs={INDEXEDDB:p,WEBSQL:zT,LOCALSTORAGE:ix},ax=[Qs.INDEXEDDB._driver,Qs.WEBSQL._driver,Qs.LOCALSTORAGE._driver],oc=["dropInstance"],nh=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(oc),lx={description:"",driver:ax.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function cx(_,E){_[E]=function(){var C=arguments;return _.ready().then(function(){return _[E].apply(_,C)})}}function rh(){for(var _=1;_<arguments.length;_++){var E=arguments[_];if(E)for(var C in E)E.hasOwnProperty(C)&&(V_(E[C])?arguments[0][C]=E[C].slice():arguments[0][C]=E[C])}return arguments[0]}var ux=function(){function _(E){c(this,_);for(var C in Qs)if(Qs.hasOwnProperty(C)){var O=Qs[C],A=O._driver;this[C]=A,vl[A]||this.defineDriver(O)}this._defaultConfig=rh({},lx),this._config=rh({},this._defaultConfig,E),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return _.prototype.config=function(E){if((typeof E>"u"?"undefined":l(E))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var C in E){if(C==="storeName"&&(E[C]=E[C].replace(/\W/g,"_")),C==="version"&&typeof E[C]!="number")return new Error("Database version must be a number.");this._config[C]=E[C]}return"driver"in E&&E.driver?this.setDriver(this._config.driver):!0}else return typeof E=="string"?this._config[E]:this._config},_.prototype.defineDriver=function(E,C,O){var A=new m(function(N,B){try{var H=E._driver,G=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!E._driver){B(G);return}for(var z=nh.concat("_initStorage"),$=0,ae=z.length;$<ae;$++){var $e=z[$],It=!sx(oc,$e);if((It||E[$e])&&typeof E[$e]!="function"){B(G);return}}var wt=function(){for(var zt=function(dx){return function(){var px=new Error("Method "+dx+" is not implemented by the current driver"),$_=m.reject(px);return b($_,arguments[arguments.length-1]),$_}},nr=0,ih=oc.length;nr<ih;nr++){var oh=oc[nr];E[oh]||(E[oh]=zt(oh))}};wt();var Jt=function(zt){vl[H]&&console.info("Redefining LocalForage driver: "+H),vl[H]=E,H_[H]=zt,N()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(Jt,B):Jt(!!E._support):Jt(!0)}catch(zt){B(zt)}});return I(A,C,O),A},_.prototype.driver=function(){return this._driver||null},_.prototype.getDriver=function(E,C,O){var A=vl[E]?m.resolve(vl[E]):m.reject(new Error("Driver not found."));return I(A,C,O),A},_.prototype.getSerializer=function(E){var C=m.resolve(th);return I(C,E),C},_.prototype.ready=function(E){var C=this,O=C._driverSet.then(function(){return C._ready===null&&(C._ready=C._initDriver()),C._ready});return I(O,E,E),O},_.prototype.setDriver=function(E,C,O){var A=this;V_(E)||(E=[E]);var N=this._getSupportedDrivers(E);function B(){A._config.driver=A.driver()}function H($){return A._extend($),B(),A._ready=A._initStorage(A._config),A._ready}function G($){return function(){var ae=0;function $e(){for(;ae<$.length;){var It=$[ae];return ae++,A._dbInfo=null,A._ready=null,A.getDriver(It).then(H).catch($e)}B();var wt=new Error("No available storage method found.");return A._driverSet=m.reject(wt),A._driverSet}return $e()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=z.then(function(){var $=N[0];return A._dbInfo=null,A._ready=null,A.getDriver($).then(function(ae){A._driver=ae._driver,B(),A._wrapLibraryMethodsWithReady(),A._initDriver=G(N)})}).catch(function(){B();var $=new Error("No available storage method found.");return A._driverSet=m.reject($),A._driverSet}),I(this._driverSet,C,O),this._driverSet},_.prototype.supports=function(E){return!!H_[E]},_.prototype._extend=function(E){rh(this,E)},_.prototype._getSupportedDrivers=function(E){for(var C=[],O=0,A=E.length;O<A;O++){var N=E[O];this.supports(N)&&C.push(N)}return C},_.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,C=nh.length;E<C;E++)cx(this,nh[E])},_.prototype.createInstance=function(E){return new _(E)},_}(),hx=new ux;s.exports=hx},{3:3}]},{},[4])(4)})}),lf=Bn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class W_{static escapeHtml(r){return String(r).replace(/"/g,i=>W_.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"&quot;"}}),Xv=Bn((e,t)=>{"use strict";(function(n,r){typeof e=="object"&&typeof t<"u"?t.exports=r():typeof define=="function"&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=r())})(e,function(){"use strict";var n=function(o,s){if(s=s||{},typeof o!="function")throw new i("fetch must be a function");if(typeof s!="object")throw new i("defaults must be an object");if(s.retries!==void 0&&!r(s.retries))throw new i("retries must be a positive integer");if(s.retryDelay!==void 0&&!r(s.retryDelay)&&typeof s.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(s.retryOn!==void 0&&!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return s=Object.assign(a,s),function(l,c){var d=s.retries,h=s.retryDelay,f=s.retryOn;if(c&&c.retries!==void 0)if(r(c.retries))d=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(r(c.retryDelay)||typeof c.retryDelay=="function")h=c.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")f=c.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(g,m){var b=function(R){var j=typeof Request<"u"&&l instanceof Request?l.clone():l;o(j,c).then(function(U){if(Array.isArray(f)&&f.indexOf(U.status)===-1)g(U);else if(typeof f=="function")try{return Promise.resolve(f(R,null,U)).then(function(M){M?I(R,null,U):g(U)}).catch(m)}catch(M){m(M)}else R<d?I(R,null,U):g(U)}).catch(function(U){if(typeof f=="function")try{Promise.resolve(f(R,U,null)).then(function(M){M?I(R,U,null):m(U)}).catch(function(M){m(M)})}catch(M){m(M)}else R<d?I(R,U,null):m(U)})};function I(R,j,U){var M=typeof h=="function"?h(R,j,U):h;setTimeout(function(){b(++R)},M)}b(0)})}};function r(o){return Number.isInteger(o)&&o>=0}function i(o){this.name="ArgumentError",this.message=o}return n})}),Mf=Bn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PriceRuleType=e.DiscountType=void 0;var t=function(r){return r[r.NONE=0]="NONE",r[r.STATIC=1]="STATIC",r[r.UNIQUE_FLAT=2]="UNIQUE_FLAT",r[r.UNIQUE_FLAT_ITEMS=3]="UNIQUE_FLAT_ITEMS",r[r.UNIQUE_FIXED_ITEMS=4]="UNIQUE_FIXED_ITEMS",r[r.UNIQUE_CHEAPEST_ITEM_FREE=5]="UNIQUE_CHEAPEST_ITEM_FREE",r[r.BXGY=6]="BXGY",r}(t||(e.DiscountType=t={})),n=function(r){return r.FIXED_AMOUNT="fixed_amount",r.PERCENTAGE="percentage",r}(n||(e.PriceRuleType=n={}))}),Jv=Bn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLBuilder=void 0;var t=function(){function n(r){try{this.base=new URL(r),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return n.prototype.appendQueryParam=function(r,i){this.params.append(r,i?i.toString():"")},n.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},n.prototype.deleteQueryParam=function(r){this.params.delete(r)},n.prototype.getBase=function(){return this.base},n.prototype.getPath=function(){return this.base.pathname},n.prototype.getHostname=function(){return this.base.hostname},n.prototype.getParams=function(){return this.params},n.prototype.getQueryParam=function(r){if(!this.params)return"";var i=this.params.get(r);return!i||i==="undefined"||i==="null"?void 0:i},n.prototype.getQueryString=function(){return this.params.toString()},n.prototype.setPath=function(r){return this.base.pathname=r,this},n.prototype.setQueryParam=function(r,i){return this.params.set(r,i?i.toString():""),this},n.prototype.setQueryString=function(r){if(r)return r[0]==="?"&&(r=r.slice(1)),this.params=new URLSearchParams(r),this},n.prototype.toString=function(){var r=this.params.toString();return r===""?this.base.search="":this.base.search="?"+r,this.base.toString()},n}();e.URLBuilder=t}),n_=Bn((e,t)=>{"use strict";(function(n,r){"use strict";var i="1.0.40",o="",s="?",a="function",l="undefined",c="object",d="string",h="major",f="model",g="name",m="type",b="vendor",I="version",R="architecture",j="console",U="mobile",M="tablet",q="smarttv",xe="wearable",st="embedded",V=500,he="Amazon",ee="Apple",ue="ASUS",Oe="BlackBerry",lt="Browser",ot="Chrome",y="Edge",Ft="Firefox",We="Google",Gt="Huawei",we="LG",D="Microsoft",x="Motorola",Y="Opera",te="Samsung",se="Sharp",_e="Sony",me="Xiaomi",le="Zebra",be="Facebook",Be="Chromium OS",Tt="Mac OS",Fe=" Browser",Xe=function(J,Ee){var pe={};for(var tt in J)Ee[tt]&&Ee[tt].length%2===0?pe[tt]=Ee[tt].concat(J[tt]):pe[tt]=J[tt];return pe},Rt=function(J){for(var Ee={},pe=0;pe<J.length;pe++)Ee[J[pe].toUpperCase()]=J[pe];return Ee},Te=function(J,Ee){return typeof J===d?u(Ee).indexOf(u(J))!==-1:!1},u=function(J){return J.toLowerCase()},p=function(J){return typeof J===d?J.replace(/[^\d\.]/g,o).split(".")[0]:r},v=function(J,Ee){if(typeof J===d)return J=J.replace(/^\s\s*/,o),typeof Ee===l?J:J.substring(0,V)},T=function(J,Ee){for(var pe=0,tt,yn,gn,it,fe,Rn;pe<Ee.length&&!fe;){var Xs=Ee[pe],Na=Ee[pe+1];for(tt=yn=0;tt<Xs.length&&!fe&&Xs[tt];)if(fe=Xs[tt++].exec(J),fe)for(gn=0;gn<Na.length;gn++)Rn=fe[++yn],it=Na[gn],typeof it===c&&it.length>0?it.length===2?typeof it[1]==a?this[it[0]]=it[1].call(this,Rn):this[it[0]]=it[1]:it.length===3?typeof it[1]===a&&!(it[1].exec&&it[1].test)?this[it[0]]=Rn?it[1].call(this,Rn,it[2]):r:this[it[0]]=Rn?Rn.replace(it[1],it[2]):r:it.length===4&&(this[it[0]]=Rn?it[3].call(this,Rn.replace(it[1],it[2])):r):this[it]=Rn||r;pe+=2}},L=function(J,Ee){for(var pe in Ee)if(typeof Ee[pe]===c&&Ee[pe].length>0){for(var tt=0;tt<Ee[pe].length;tt++)if(Te(Ee[pe][tt],J))return pe===s?r:pe}else if(Te(Ee[pe],J))return pe===s?r:pe;return Ee.hasOwnProperty("*")?Ee["*"]:J},F={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},K={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},et={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[I,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[I,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,I],[/opios[\/ ]+([\w\.]+)/i],[I,[g,Y+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[I,[g,Y+" GX"]],[/\bopr\/([\w\.]+)/i],[I,[g,Y]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[I,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[I,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[g,I],[/quark(?:pc)?\/([-\w\.]+)/i],[I,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[I,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[I,[g,"UC"+lt]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[I,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[I,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[I,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[I,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[I,[g,"Smart Lenovo "+lt]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+lt],I],[/\bfocus\/([\w\.]+)/i],[I,[g,Ft+" Focus"]],[/\bopt\/([\w\.]+)/i],[I,[g,Y+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[I,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[I,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[I,[g,Y+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[I,[g,"MIUI"+Fe]],[/fxios\/([\w\.-]+)/i],[I,[g,Ft]],[/\bqihoobrowser\/?([\w\.]*)/i],[I,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],I],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+Fe],I],[/samsungbrowser\/([\w\.]+)/i],[I,[g,te+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[I,[g,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,"Sogou Mobile"],I],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,I],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[g],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[I,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,be],I],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[g,I],[/\bgsa\/([\w\.]+) .*safari\//i],[I,[g,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[I,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[I,[g,ot+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,ot+" WebView"],I],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[I,[g,"Android "+lt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,I],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[I,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[I,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[I,L,F]],[/(webkit|khtml)\/([\w\.]+)/i],[g,I],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],I],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,I],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[I,[g,Ft+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[g,[I,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[I,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[R,"amd64"]],[/(ia32(?=;))/i],[[R,u]],[/((?:i[346]|x)86)[;\)]/i],[[R,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[R,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[R,"armhf"]],[/windows (ce|mobile); ppc;/i],[[R,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[R,/ower/,o,u]],[/(sun4\w)[;\)]/i],[[R,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[R,u]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[b,te],[m,M]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[f,[b,te],[m,U]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[b,ee],[m,U]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[b,ee],[m,M]],[/(macintosh);/i],[f,[b,ee]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[b,se],[m,U]],[/(?:honor)([-\w ]+)[;\)]/i],[f,[b,"Honor"],[m,U]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[b,Gt],[m,M]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[b,Gt],[m,U]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[f,/_/g," "],[b,me],[m,U]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[b,me],[m,M]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[b,"OPPO"],[m,U]],[/\b(opd2\d{3}a?) bui/i],[f,[b,"OPPO"],[m,M]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[b,"Vivo"],[m,U]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[b,"Realme"],[m,U]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[b,x],[m,U]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[b,x],[m,M]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[b,we],[m,M]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[b,we],[m,U]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[b,"Lenovo"],[m,M]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[b,"Nokia"],[m,U]],[/(pixel c)\b/i],[f,[b,We],[m,M]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[b,We],[m,U]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[b,_e],[m,U]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[b,_e],[m,M]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[b,"OnePlus"],[m,U]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[b,he],[m,M]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[b,he],[m,U]],[/(playbook);[-\w\),; ]+(rim)/i],[f,b,[m,M]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[b,Oe],[m,U]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[b,ue],[m,M]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[b,ue],[m,U]],[/(nexus 9)/i],[f,[b,"HTC"],[m,M]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[f,/_/g," "],[m,U]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[f,[b,"TCL"],[m,M]],[/(itel) ((\w+))/i],[[b,u],f,[m,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[b,"Acer"],[m,M]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[b,"Meizu"],[m,U]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[b,"Ulefone"],[m,U]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[b,"Energizer"],[m,U]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[b,"Cat"],[m,U]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[b,"Smartfren"],[m,U]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[b,"Nothing"],[m,U]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[b,f,[m,U]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[b,f,[m,M]],[/(surface duo)/i],[f,[b,D],[m,M]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[b,"Fairphone"],[m,U]],[/(u304aa)/i],[f,[b,"AT&T"],[m,U]],[/\bsie-(\w*)/i],[f,[b,"Siemens"],[m,U]],[/\b(rct\w+) b/i],[f,[b,"RCA"],[m,M]],[/\b(venue[\d ]{2,7}) b/i],[f,[b,"Dell"],[m,M]],[/\b(q(?:mv|ta)\w+) b/i],[f,[b,"Verizon"],[m,M]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[b,"Barnes & Noble"],[m,M]],[/\b(tm\d{3}\w+) b/i],[f,[b,"NuVision"],[m,M]],[/\b(k88) b/i],[f,[b,"ZTE"],[m,M]],[/\b(nx\d{3}j) b/i],[f,[b,"ZTE"],[m,U]],[/\b(gen\d{3}) b.+49h/i],[f,[b,"Swiss"],[m,U]],[/\b(zur\d{3}) b/i],[f,[b,"Swiss"],[m,M]],[/\b((zeki)?tb.*\b) b/i],[f,[b,"Zeki"],[m,M]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],f,[m,M]],[/\b(ns-?\w{0,9}) b/i],[f,[b,"Insignia"],[m,M]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[b,"NextBook"],[m,M]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],f,[m,U]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],f,[m,U]],[/\b(ph-1) /i],[f,[b,"Essential"],[m,U]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[b,"Envizen"],[m,M]],[/\b(trio[-\w\. ]+) b/i],[f,[b,"MachSpeed"],[m,M]],[/\btu_(1491) b/i],[f,[b,"Rotor"],[m,M]],[/(shield[\w ]+) b/i],[f,[b,"Nvidia"],[m,M]],[/(sprint) (\w+)/i],[b,f,[m,U]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[b,D],[m,U]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[b,le],[m,M]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[b,le],[m,U]],[/smart-tv.+(samsung)/i],[b,[m,q]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[b,te],[m,q]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,we],[m,q]],[/(apple) ?tv/i],[b,[f,ee+" TV"],[m,q]],[/crkey/i],[[f,ot+"cast"],[b,We],[m,q]],[/droid.+aft(\w+)( bui|\))/i],[f,[b,he],[m,q]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[b,se],[m,q]],[/(bravia[\w ]+)( bui|\))/i],[f,[b,_e],[m,q]],[/(mitv-\w{5}) bui/i],[f,[b,me],[m,q]],[/Hbbtv.*(technisat) (.*);/i],[b,f,[m,q]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,v],[f,v],[m,q]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,q]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,f,[m,j]],[/droid.+; (shield) bui/i],[f,[b,"Nvidia"],[m,j]],[/(playstation [345portablevi]+)/i],[f,[b,_e],[m,j]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[b,D],[m,j]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[b,te],[m,xe]],[/((pebble))app/i],[b,f,[m,xe]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[b,ee],[m,xe]],[/droid.+; (glass) \d/i],[f,[b,We],[m,xe]],[/droid.+; (wt63?0{2,3})\)/i],[f,[b,le],[m,xe]],[/droid.+; (glass) \d/i],[f,[b,We],[m,xe]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,f,[m,xe]],[/; (quest( \d| pro)?)/i],[f,[b,be],[m,xe]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,st]],[/(aeobc)\b/i],[f,[b,he],[m,st]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[m,U]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,M]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,M]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,U]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[I,[g,y+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,I],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[I,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,I],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[I,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,I],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[g,[I,L,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[I,L,K],[g,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[I,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,Tt],[I,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[I,g],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[g,I],[/\(bb(10);/i],[I,[g,Oe]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[I,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[I,[g,Ft+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[I,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[I,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[I,[g,ot+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,Be],I],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[g,I],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],I],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,I]]},He=function(J,Ee){if(typeof J===c&&(Ee=J,J=r),!(this instanceof He))return new He(J,Ee).getResult();var pe=typeof n!==l&&n.navigator?n.navigator:r,tt=J||(pe&&pe.userAgent?pe.userAgent:o),yn=pe&&pe.userAgentData?pe.userAgentData:r,gn=Ee?Xe(et,Ee):et,it=pe&&pe.userAgent==tt;return this.getBrowser=function(){var fe={};return fe[g]=r,fe[I]=r,T.call(fe,tt,gn.browser),fe[h]=p(fe[I]),it&&pe&&pe.brave&&typeof pe.brave.isBrave==a&&(fe[g]="Brave"),fe},this.getCPU=function(){var fe={};return fe[R]=r,T.call(fe,tt,gn.cpu),fe},this.getDevice=function(){var fe={};return fe[b]=r,fe[f]=r,fe[m]=r,T.call(fe,tt,gn.device),it&&!fe[m]&&yn&&yn.mobile&&(fe[m]=U),it&&fe[f]=="Macintosh"&&pe&&typeof pe.standalone!==l&&pe.maxTouchPoints&&pe.maxTouchPoints>2&&(fe[f]="iPad",fe[m]=M),fe},this.getEngine=function(){var fe={};return fe[g]=r,fe[I]=r,T.call(fe,tt,gn.engine),fe},this.getOS=function(){var fe={};return fe[g]=r,fe[I]=r,T.call(fe,tt,gn.os),it&&!fe[g]&&yn&&yn.platform&&yn.platform!="Unknown"&&(fe[g]=yn.platform.replace(/chrome os/i,Be).replace(/macos/i,Tt)),fe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return tt},this.setUA=function(fe){return tt=typeof fe===d&&fe.length>V?v(fe,V):fe,this},this.setUA(tt),this};He.VERSION=i,He.BROWSER=Rt([g,I,h]),He.CPU=Rt([R]),He.DEVICE=Rt([f,b,m,j,U,q,M,xe,st]),He.ENGINE=He.OS=Rt([g,I]),typeof e!==l?(typeof t!==l&&t.exports&&(e=t.exports=He),e.UAParser=He):typeof define===a&&define.amd?define(function(){return He}):typeof n!==l&&(n.UAParser=He);var Me=typeof n!==l&&(n.jQuery||n.Zepto);if(Me&&!Me.ua){var ut=new He;Me.ua=ut.getResult(),Me.ua.get=function(){return ut.getUA()},Me.ua.set=function(J){ut.setUA(J);var Ee=ut.getResult();for(var pe in Ee)Me.ua[pe]=Ee[pe]}}})(typeof window=="object"?window:e)}),i_=Bn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayUtils=void 0;var t=class D0{static of(r,i){return i!==void 0?new Array(r).fill(i):Array.from({length:r},(o,s)=>s)}static remove(r,i){let o=r.indexOf(i);return o===-1?!1:(r.splice(o,1),!0)}static swap(r,i,o){[r[i],r[o]]=[r[o],r[i]]}static sum(r,i){return r.reduce((o,s)=>o+Math.max(i?i(s):+s,0),0)}static unique(r,i){return r.filter((o,s,a)=>a.findIndex(l=>l[i]===o[i])===s)}static shuffle(r){let i=r.length;for(;i!=0;){let o=Math.floor(Math.random()*i);i--,D0.swap(r,i,o)}}};e.ArrayUtils=t}),kT=Bn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssetType=void 0;var t=function(n){return n[n.IMAGE=1]="IMAGE",n[n.VIDEO=2]="VIDEO",n[n.GIF=3]="GIF",n[n.SCREENSHOT=4]="SCREENSHOT",n[n.THREE_D=5]="THREE_D",n[n.FONT=6]="FONT",n[n.TEXT=7]="TEXT",n[n.JSON=8]="JSON",n[n.SVG=9]="SVG",n[n.HTML=10]="HTML",n[n.LOGO=11]="LOGO",n[n.OTHERS=1e3]="OTHERS",n}(t||(e.AssetType=t={}))}),FT=Bn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TemplateStatus=void 0;var t=function(n){return n[n.DRAFT=1]="DRAFT",n[n.PUBLISHED=2]="PUBLISHED",n[n.DISABLED=3]="DISABLED",n}(t||(e.TemplateStatus=t={}))}),VT=Bn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=void 0;var t=function(n){return n.VIEW_ITEM="VIEW_ITEM",n.ADD_TO_CART="ADD_TO_CART",n.VIEW_CATEGORY="VIEW_CATEGORY",n.VIEW_TAG="VIEW_TAG",n.SEARCH="SEARCH",n.APPLY_COUPON="APPLY_COUPON",n}(t||(e.ActionType=t={}))}),UT=Bn(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=e&&e.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(kT(),e),n(FT(),e),n(Yn(),e),n(VT(),e)});function kx(e,t){return Object.is(e,t)}var Qt=null,$l=!1,ah=1,li=Symbol("SIGNAL");function Ve(e){let t=Qt;return Qt=e,t}function K_(){return Qt}var Wl={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Z_(e){if($l)throw new Error("");if(Qt===null)return;Qt.consumerOnSignalRead(e);let t=Qt.nextProducerIndex++;if(zl(Qt),t<Qt.producerNode.length&&Qt.producerNode[t]!==e&&cc(Qt)){let n=Qt.producerNode[t];Gl(n,Qt.producerIndexOfThis[t])}Qt.producerNode[t]!==e&&(Qt.producerNode[t]=e,Qt.producerIndexOfThis[t]=cc(Qt)?eE(e,Qt,t):0),Qt.producerLastReadVersion[t]=e.version}function Lx(){ah++}function Fx(e){if(!(cc(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===ah)){if(!e.producerMustRecompute(e)&&!lh(e)){Y_(e);return}e.producerRecomputeValue(e),Y_(e)}}function X_(e){if(e.liveConsumerNode===void 0)return;let t=$l;$l=!0;try{for(let n of e.liveConsumerNode)n.dirty||Bx(n)}finally{$l=t}}function J_(){return Qt?.consumerAllowSignalWrites!==!1}function Bx(e){e.dirty=!0,X_(e),e.consumerMarkedDirty?.(e)}function Y_(e){e.dirty=!1,e.lastCleanEpoch=ah}function ch(e){return e&&(e.nextProducerIndex=0),Ve(e)}function Q_(e,t){if(Ve(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(cc(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)Gl(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function lh(e){zl(e);for(let t=0;t<e.producerNode.length;t++){let n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(Fx(n),r!==n.version))return!0}return!1}function uh(e){if(zl(e),cc(e))for(let t=0;t<e.producerNode.length;t++)Gl(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}function eE(e,t,n){if(tE(e),e.liveConsumerNode.length===0&&nE(e))for(let r=0;r<e.producerNode.length;r++)e.producerIndexOfThis[r]=eE(e.producerNode[r],e,r);return e.liveConsumerIndexOfThis.push(n),e.liveConsumerNode.push(t)-1}function Gl(e,t){if(tE(e),e.liveConsumerNode.length===1&&nE(e))for(let r=0;r<e.producerNode.length;r++)Gl(e.producerNode[r],e.producerIndexOfThis[r]);let n=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[n],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[n],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let r=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];zl(i),i.producerIndexOfThis[r]=t}}function cc(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function zl(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function tE(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function nE(e){return e.producerNode!==void 0}function Vx(){throw new Error}var rE=Vx;function iE(e){rE(e)}function oE(e){rE=e}var Ux=null;function sE(e){let t=Object.create(cE);t.value=e;let n=()=>(Z_(t),t.value);return n[li]=t,n}function dh(e,t){J_()||iE(e),e.equal(e.value,t)||(e.value=t,jx(e))}function aE(e,t){J_()||iE(e),dh(e,t(e.value))}var cE=ne(w({},Wl),{equal:kx,value:void 0,kind:"signal"});function jx(e){e.version++,Lx(),X_(e),Ux?.()}function De(e){return typeof e=="function"}function ql(e){let t=e(n=>{Error.call(n),n.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Yl=ql(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
2
+ ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
3
+ `)}`:"",this.name="UnsubscriptionError",this.errors=t});function _o(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Bt=class wd{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(De(r))try{r()}catch(o){t=o instanceof Yl?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{lE(o)}catch(s){t=t??[],s instanceof Yl?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Yl(t)}}add(t){var n;if(t&&t!==this)if(this.closed)lE(t);else{if(t instanceof wd){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&_o(n,t)}remove(t){let{_finalizers:n}=this;n&&_o(n,t),t instanceof wd&&t._removeParent(this)}};Bt.EMPTY=(()=>{let e=new Bt;return e.closed=!0,e})();var fh=Bt.EMPTY;function Kl(e){return e instanceof Bt||e&&"closed"in e&&De(e.remove)&&De(e.add)&&De(e.unsubscribe)}function lE(e){De(e)?e():e.unsubscribe()}var yr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Es={setTimeout(e,t,...n){let{delegate:r}=Es;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Es;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Zl(e){Es.setTimeout(()=>{let{onUnhandledError:t}=yr;if(t)t(e);else throw e})}function lc(){}var uE=ph("C",void 0,void 0);function dE(e){return ph("E",void 0,e)}function fE(e){return ph("N",e,void 0)}function ph(e,t,n){return{kind:e,value:t,error:n}}var Eo=null;function ws(e){if(yr.useDeprecatedSynchronousErrorHandling){let t=!Eo;if(t&&(Eo={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Eo;if(Eo=null,n)throw r}}else e()}function pE(e){yr.useDeprecatedSynchronousErrorHandling&&Eo&&(Eo.errorThrown=!0,Eo.error=e)}var wo=class extends Bt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Kl(e)&&e.add(this)):this.destination=Wx}static create(e,t,n){return new bs(e,t,n)}next(e){this.isStopped?mh(fE(e),this):this._next(e)}error(e){this.isStopped?mh(dE(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?mh(uE,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Hx=Function.prototype.bind;function hh(e,t){return Hx.call(e,t)}var gh=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){Xl(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){Xl(n)}else Xl(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Xl(t)}}},bs=class extends wo{constructor(e,t,n){super();let r;if(De(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let i;this&&yr.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&hh(e.next,i),error:e.error&&hh(e.error,i),complete:e.complete&&hh(e.complete,i)}):r=e}this.destination=new gh(r)}};function Xl(e){yr.useDeprecatedSynchronousErrorHandling?pE(e):Zl(e)}function $x(e){throw e}function mh(e,t){let{onStoppedNotification:n}=yr;n&&Es.setTimeout(()=>n(e,t))}var Wx={closed:!0,next:lc,error:$x,complete:lc},Cs=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ss(e){return e}function hE(e){return e.length===0?Ss:e.length===1?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}var dt=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){let o=zx(n)?n:new bs(n,r,i);return ws(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=mE(r),new r((i,o)=>{let s=new bs({next:a=>{try{n(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[Cs](){return this}pipe(...n){return hE(n)(this)}toPromise(n){return n=mE(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=t=>new e(t),e})();function mE(e){var t;return(t=e??yr.Promise)!==null&&t!==void 0?t:Promise}function Gx(e){return e&&De(e.next)&&De(e.error)&&De(e.complete)}function zx(e){return e&&e instanceof wo||Gx(e)&&Kl(e)}function qx(e){return De(e?.lift)}function Pt(e){return t=>{if(qx(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Vt(e,t,n,r,i){return new yh(e,t,n,r,i)}var yh=class extends wo{constructor(e,t,n,r,i,o){super(e),this.onFinalize=i,this.shouldUnsubscribe=o,this._next=t?function(s){try{t(s)}catch(a){e.error(a)}}:super._next,this._error=r?function(s){try{r(s)}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(s){e.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}},gE=ql(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),Ne=(()=>{class e extends dt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Jl(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new gE}next(n){ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){ws(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:o}=this;return r||i?fh:(this.currentObservers=null,o.push(n),new Bt(()=>{this.currentObservers=null,_o(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new dt;return n.source=this,n}}return e.create=(t,n)=>new Jl(t,n),e})(),Jl=class extends Ne{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:fh}},ui=class extends Ne{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}},uc={now(){return(uc.delegate||Date).now()},delegate:void 0},bo=class extends Ne{constructor(e=1/0,t=1/0,n=uc){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:i,_windowTime:o}=this;t||(n.push(e),!r&&n.push(i.now()+o)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:r}=this,i=r.slice();for(let o=0;o<i.length&&!e.closed;o+=n?1:2)e.next(i[o]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:n,_infiniteTimeWindow:r}=this,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){let o=t.now(),s=0;for(let a=1;a<n.length&&n[a]<=o;a+=2)s=a;s&&n.splice(0,s+1)}}},Ql=class extends Bt{constructor(e,t){super()}schedule(e,t=0){return this}},dc={setInterval(e,t,...n){let{delegate:r}=dc;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=dc;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},eu=class extends Ql{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var n;if(this.closed)return this;this.state=e;let r=this.id,i=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,n=0){return dc.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&dc.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r;try{this.work(e)}catch(i){n=!0,r=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,_o(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Is=class k0{constructor(t,n=k0.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};Is.now=uc.now;var tu=class extends Is{constructor(e,t=Is.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},fc=new tu(eu),yE=fc,vE=new dt(e=>e.complete());function nu(e){return e&&De(e.schedule)}function _E(e){return e[e.length-1]}function Ui(e){return nu(_E(e))?e.pop():void 0}function EE(e,t){return typeof _E(e)=="number"?e.pop():t}function bE(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(h){s(h)}}function l(d){try{c(r.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function wE(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Co(e){return this instanceof Co?(this.v=e,this):new Co(e)}function CE(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(g){return function(m){return Promise.resolve(m).then(g,h)}}function a(g,m){r[g]&&(i[g]=function(b){return new Promise(function(I,R){o.push([g,b,I,R])>1||l(g,b)})},m&&(i[g]=m(i[g])))}function l(g,m){try{c(r[g](m))}catch(b){f(o[0][3],b)}}function c(g){g.value instanceof Co?Promise.resolve(g.value.v).then(d,h):f(o[0][2],g)}function d(g){l("next",g)}function h(g){l("throw",g)}function f(g,m){g(m),o.shift(),o.length&&l(o[0][0],o[0][1])}}function SE(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof wE=="function"?wE(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var Ds=e=>e&&typeof e.length=="number"&&typeof e!="function";function ru(e){return De(e?.then)}function iu(e){return De(e[Cs])}function ou(e){return Symbol.asyncIterator&&De(e?.[Symbol.asyncIterator])}function su(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Yx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var au=Yx();function cu(e){return De(e?.[au])}function lu(e){return CE(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:n,done:r}=yield Co(t.read());if(r)return yield Co(void 0);yield yield Co(n)}}finally{t.releaseLock()}})}function uu(e){return De(e?.getReader)}function kt(e){if(e instanceof dt)return e;if(e!=null){if(iu(e))return Kx(e);if(Ds(e))return Zx(e);if(ru(e))return Xx(e);if(ou(e))return IE(e);if(cu(e))return Jx(e);if(uu(e))return Qx(e)}throw su(e)}function Kx(e){return new dt(t=>{let n=e[Cs]();if(De(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Zx(e){return new dt(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function Xx(e){return new dt(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,Zl)})}function Jx(e){return new dt(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function IE(e){return new dt(t=>{eN(e,t).catch(n=>t.error(n))})}function Qx(e){return IE(lu(e))}function eN(e,t){var n,r,i,o;return bE(this,void 0,void 0,function*(){try{for(n=SE(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}t.complete()})}function rr(e,t,n,r=0,i=!1){let o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function du(e,t=0){return Pt((n,r)=>{n.subscribe(Vt(r,i=>rr(r,e,()=>r.next(i),t),()=>rr(r,e,()=>r.complete(),t),i=>rr(r,e,()=>r.error(i),t)))})}function fu(e,t=0){return Pt((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function DE(e,t){return kt(e).pipe(fu(t),du(t))}function TE(e,t){return kt(e).pipe(fu(t),du(t))}function xE(e,t){return new dt(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function NE(e,t){return new dt(n=>{let r;return rr(n,t,()=>{r=e[au](),rr(n,t,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>De(r?.return)&&r.return()})}function pu(e,t){if(!e)throw new Error("Iterable cannot be null");return new dt(n=>{rr(n,t,()=>{let r=e[Symbol.asyncIterator]();rr(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function RE(e,t){return pu(lu(e),t)}function AE(e,t){if(e!=null){if(iu(e))return DE(e,t);if(Ds(e))return xE(e,t);if(ru(e))return TE(e,t);if(ou(e))return pu(e,t);if(cu(e))return NE(e,t);if(uu(e))return RE(e,t)}throw su(e)}function Ts(e,t){return t?AE(e,t):kt(e)}function So(...e){let t=Ui(e);return Ts(e,t)}function ME(e){return e instanceof Date&&!isNaN(e)}function Mr(e,t){return Pt((n,r)=>{let i=0;n.subscribe(Vt(r,o=>{r.next(e.call(t,o,i++))}))})}var{isArray:tN}=Array;function nN(e,t){return tN(t)?e(...t):e(t)}function OE(e){return Mr(t=>nN(e,t))}function PE(e,t,n,r,i,o,s,a){let l=[],c=0,d=0,h=!1,f=()=>{h&&!l.length&&!c&&t.complete()},g=b=>c<r?m(b):l.push(b),m=b=>{o&&t.next(b),c++;let I=!1;kt(n(b,d++)).subscribe(Vt(t,R=>{i?.(R),o?g(R):t.next(R)},()=>{I=!0},void 0,()=>{if(I)try{for(c--;l.length&&c<r;){let R=l.shift();s?rr(t,s,()=>m(R)):m(R)}f()}catch(R){t.error(R)}}))};return e.subscribe(Vt(t,g,()=>{h=!0,f()})),()=>{a?.()}}function pc(e,t,n=1/0){return De(t)?pc((r,i)=>Mr((o,s)=>t(r,o,i,s))(kt(e(r,i))),n):(typeof t=="number"&&(n=t),Pt((r,i)=>PE(r,i,e,n)))}function hu(e=1/0){return pc(Ss,e)}function kE(){return hu(1)}function vh(...e){return kE()(Ts(e,Ui(e)))}function _h(e){return new dt(t=>{kt(e()).subscribe(t)})}var rN=["addListener","removeListener"],iN=["addEventListener","removeEventListener"],oN=["on","off"];function Io(e,t,n,r){if(De(n)&&(r=n,n=void 0),r)return Io(e,t,n).pipe(OE(r));let[i,o]=cN(e)?iN.map(s=>a=>e[s](t,a,n)):sN(e)?rN.map(LE(e,t)):aN(e)?oN.map(LE(e,t)):[];if(!i&&Ds(e))return pc(s=>Io(s,t,n))(kt(e));if(!i)throw new TypeError("Invalid event target");return new dt(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return i(a),()=>o(a)})}function LE(e,t){return n=>r=>e[n](t,r)}function sN(e){return De(e.addListener)&&De(e.removeListener)}function aN(e){return De(e.on)&&De(e.off)}function cN(e){return De(e.addEventListener)&&De(e.removeEventListener)}function FE(e=0,t,n=yE){let r=-1;return t!=null&&(nu(t)?n=t:r=t),new dt(i=>{let o=ME(e)?+e-n.now():e;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function hc(...e){let t=Ui(e),n=EE(e,1/0),r=e;return r.length?r.length===1?kt(r[0]):hu(n)(Ts(r,t)):vE}function Do(e,t){return Pt((n,r)=>{let i=0;n.subscribe(Vt(r,o=>e.call(t,o,i++)&&r.next(o)))})}function BE(e){return Pt((t,n)=>{let r=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,r){r=!1;let c=i;i=null,n.next(c)}s&&n.complete()},l=()=>{o=null,s&&n.complete()};t.subscribe(Vt(n,c=>{r=!0,i=c,o||kt(e(c)).subscribe(o=Vt(n,a,l))},()=>{s=!0,(!r||!o||o.closed)&&n.complete()}))})}function mu(e,t=fc){return BE(()=>FE(e,t))}function vr(e,t=fc){return Pt((n,r)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let c=o;o=null,r.next(c)}};function l(){let c=s+e,d=t.now();if(d<c){i=this.schedule(void 0,c-d),r.add(i);return}a()}n.subscribe(Vt(r,c=>{o=c,s=t.now(),i||(i=t.schedule(l,e),r.add(i))},()=>{a(),r.complete()},void 0,()=>{o=i=null}))})}function gu(e,t=Ss){return e=e??lN,Pt((n,r)=>{let i,o=!0;n.subscribe(Vt(r,s=>{let a=t(s);(o||!e(i,a))&&(o=!1,i=a,r.next(s))}))})}function lN(e,t){return e===t}function Eh(e){return Do((t,n)=>e<=n)}function To(...e){let t=Ui(e);return Pt((n,r)=>{(t?vh(e,n,t):vh(e,n)).subscribe(r)})}function yu(e,t){return Pt((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(Vt(r,l=>{i?.unsubscribe();let c=0,d=o++;kt(e(l,d)).subscribe(i=Vt(r,h=>r.next(t?t(l,h,d,c++):h),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function xs(e){return Pt((t,n)=>{kt(e).subscribe(Vt(n,()=>n.complete(),lc)),!n.closed&&t.subscribe(n)})}var xw="https://g.co/ng/security#xss",Re=class extends Error{code;constructor(e,t){super(Lm(e,t)),this.code=e}};function Lm(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function Ju(e){return{toString:e}.toString()}var vu="__parameters__";function uN(e){return function(...t){if(e){let n=e(...t);for(let r in n)this[r]=n[r]}}}function Nw(e,t,n){return Ju(()=>{let r=uN(t);function i(...o){if(this instanceof i)return r.apply(this,o),this;let s=new i(...o);return a.annotation=s,a;function a(l,c,d){let h=l.hasOwnProperty(vu)?l[vu]:Object.defineProperty(l,vu,{value:[]})[vu];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(s),l}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}var _c=globalThis;function Ct(e){for(let t in e)if(e[t]===Ct)return t;throw Error("Could not find renamed property on target object.")}function dN(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function or(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(or).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(`
4
+ `);return r>=0?n.slice(0,r):n}function VE(e,t){return e?t?`${e} ${t}`:e:t||""}var fN=Ct({__forward_ref__:Ct});function Fm(e){return e.__forward_ref__=Fm,e.toString=function(){return or(this())},e}function ir(e){return Rw(e)?e():e}function Rw(e){return typeof e=="function"&&e.hasOwnProperty(fN)&&e.__forward_ref__===Fm}function ie(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Bm(e){return UE(e,Aw)||UE(e,Mw)}function UE(e,t){return e.hasOwnProperty(t)?e[t]:null}function pN(e){return e&&(e[Aw]||e[Mw])||null}function jE(e){return e&&(e.hasOwnProperty(HE)||e.hasOwnProperty(hN))?e[HE]:null}var Aw=Ct({\u0275prov:Ct}),HE=Ct({\u0275inj:Ct}),Mw=Ct({ngInjectableDef:Ct}),hN=Ct({ngInjectorDef:Ct}),ve=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=ie({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ow(e){return e&&!!e.\u0275providers}var mN=Ct({\u0275cmp:Ct}),gN=Ct({\u0275dir:Ct}),yN=Ct({\u0275pipe:Ct}),Nu=Ct({\u0275fac:Ct}),vc=Ct({__NG_ELEMENT_ID__:Ct}),$E=Ct({__NG_ENV_ID__:Ct});function Oc(e){return typeof e=="string"?e:e==null?"":String(e)}function vN(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Oc(e)}function _N(e,t){throw new Re(-200,e)}function Vm(e,t){throw new Re(-201,!1)}var Ge=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Ge||{}),Oh;function Pw(){return Oh}function Vn(e){let t=Oh;return Oh=e,t}function kw(e,t,n){let r=Bm(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&Ge.Optional)return null;if(t!==void 0)return t;Vm(e,"Injector")}var EN={},Ec=EN,Ph="__NG_DI_FLAG__",Ru="ngTempTokenPath",wN="ngTokenPath",bN=/\n/gm,CN="\u0275",WE="__source",Os;function SN(){return Os}function ji(e){let t=Os;return Os=e,t}function IN(e,t=Ge.Default){if(Os===void 0)throw new Re(-203,!1);return Os===null?kw(e,void 0,t):Os.get(e,t&Ge.Optional?null:void 0,t)}function Ze(e,t=Ge.Default){return(Pw()||IN)(ir(e),t)}function P(e,t=Ge.Default){return Ze(e,Qu(t))}function Qu(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function kh(e){let t=[];for(let n=0;n<e.length;n++){let r=ir(e[n]);if(Array.isArray(r)){if(r.length===0)throw new Re(900,!1);let i,o=Ge.Default;for(let s=0;s<r.length;s++){let a=r[s],l=DN(a);typeof l=="number"?l===-1?i=a.token:o|=l:i=a}t.push(Ze(i,o))}else t.push(Ze(r))}return t}function Lw(e,t){return e[Ph]=t,e.prototype[Ph]=t,e}function DN(e){return e[Ph]}function TN(e,t,n,r){let i=e[Ru];throw t[WE]&&i.unshift(t[WE]),e.message=xN(`
5
+ `+e.message,i,n,r),e[wN]=i,e[Ru]=null,e}function xN(e,t,n,r=null){e=e&&e.charAt(0)===`
6
+ `&&e.charAt(1)==CN?e.slice(2):e;let i=or(t);if(Array.isArray(t))i=t.map(or).join(" -> ");else if(typeof t=="object"){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):or(a)))}i=`{${o.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(bN,`
7
+ `)}`}var Um=Lw(Nw("Optional"),8),NN=Lw(Nw("SkipSelf"),4);function No(e,t){return e.hasOwnProperty(Nu)?e[Nu]:null}function RN(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=t[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}function AN(e){return e.flat(Number.POSITIVE_INFINITY)}function jm(e,t){e.forEach(n=>Array.isArray(n)?jm(n,t):t(n))}function Fw(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Au(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function MN(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let o=i-2;e[i]=e[o],i--}e[t]=n,e[t+1]=r}}function ON(e,t,n){let r=Pc(e,t);return r>=0?e[r|1]=n:(r=~r,MN(e,r,t,n)),r}function wh(e,t){let n=Pc(e,t);if(n>=0)return e[n|1]}function Pc(e,t){return PN(e,t,1)}function PN(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=e[o<<n];if(t===s)return o<<n;s>t?i=o:r=o+1}return~(i<<n)}var Ro={},Wi=[],wc=new ve(""),Bw=new ve("",-1),Vw=new ve(""),Mu=class{get(e,t=Ec){if(t===Ec){let n=new Error(`NullInjectorError: No provider for ${or(e)}!`);throw n.name="NullInjectorError",n}return t}};function Ao(e){return e[mN]||null}function Uw(e){return e[gN]||null}function jw(e){return e[yN]||null}function kN(e){let t=Ao(e)||Uw(e)||jw(e);return t!==null&&t.standalone}function Hw(e){return{\u0275providers:e}}function LN(...e){return{\u0275providers:$w(!0,e),\u0275fromNgModule:!0}}function $w(e,...t){let n=[],r=new Set,i,o=s=>{n.push(s)};return jm(t,s=>{let a=s;Lh(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Ww(i,o),n}function Ww(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Hm(i,o=>{t(o,r)})}}function Lh(e,t,n,r){if(e=ir(e),!e)return!1;let i=null,o=jE(e),s=!o&&Ao(e);if(!o&&!s){let l=e.ngModule;if(o=jE(l),o)i=l;else return!1}else{if(s&&!s.standalone)return!1;i=e}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)Lh(c,t,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let c;try{jm(o.imports,d=>{Lh(d,t,n,r)&&(c||=[],c.push(d))})}finally{}c!==void 0&&Ww(c,t)}if(!a){let c=No(i)||(()=>new i);t({provide:i,useFactory:c,deps:Wi},i),t({provide:Vw,useValue:i,multi:!0},i),t({provide:wc,useValue:()=>Ze(i),multi:!0},i)}let l=o.providers;if(l!=null&&!a){let c=e;Hm(l,d=>{t(d,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Hm(e,t){for(let n of e)Ow(n)&&(n=n.\u0275providers),Array.isArray(n)?Hm(n,t):t(n)}var FN=Ct({provide:String,useValue:Ct});function Gw(e){return e!==null&&typeof e=="object"&&FN in e}function BN(e){return!!(e&&e.useExisting)}function VN(e){return!!(e&&e.useFactory)}function Fh(e){return typeof e=="function"}var ed=new ve(""),Cu={},UN={},bh;function td(){return bh===void 0&&(bh=new Mu),bh}var Un=class{},bc=class extends Un{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Vh(e,o=>this.processProvider(o)),this.records.set(Bw,Ns(void 0,this)),r.has("environment")&&this.records.set(Un,Ns(void 0,this));let i=this.records.get(ed);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Vw,Wi,Ge.Self))}destroy(){gc(this),this._destroyed=!0;let e=Ve(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Ve(e)}}onDestroy(e){return gc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){gc(this);let t=ji(this),n=Vn(void 0),r;try{return e()}finally{ji(t),Vn(n)}}get(e,t=Ec,n=Ge.Default){if(gc(this),e.hasOwnProperty($E))return e[$E](this);n=Qu(n);let r,i=ji(this),o=Vn(void 0);try{if(!(n&Ge.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=zN(e)&&Bm(e);l&&this.injectableDefInScope(l)?a=Ns(Bh(e),Cu):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let s=n&Ge.Self?td():this.parent;return t=n&Ge.Optional&&t===Ec?null:t,s.get(e,t)}catch(s){if(s.name==="NullInjectorError"){if((s[Ru]=s[Ru]||[]).unshift(or(e)),i)throw s;return TN(s,e,"R3InjectorError",this.source)}else throw s}finally{Vn(o),ji(i)}}resolveInjectorInitializers(){let e=Ve(null),t=ji(this),n=Vn(void 0),r;try{let i=this.get(wc,Wi,Ge.Self);for(let o of i)o()}finally{ji(t),Vn(n),Ve(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(or(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=ir(e);let t=Fh(e)?e:ir(e&&e.provide),n=HN(e);if(!Fh(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Ns(void 0,Cu,!0),r.factory=()=>kh(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=Ve(null);try{return t.value===Cu&&(t.value=UN,t.value=t.factory()),typeof t.value=="object"&&t.value&&GN(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{Ve(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=ir(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Bh(e){let t=Bm(e),n=t!==null?t.factory:No(e);if(n!==null)return n;if(e instanceof ve)throw new Re(204,!1);if(e instanceof Function)return jN(e);throw new Re(204,!1)}function jN(e){if(e.length>0)throw new Re(204,!1);let t=pN(e);return t!==null?()=>t.factory(e):()=>new e}function HN(e){if(Gw(e))return Ns(void 0,e.useValue);{let t=$N(e);return Ns(t,Cu)}}function $N(e,t,n){let r;if(Fh(e)){let i=ir(e);return No(i)||Bh(i)}else if(Gw(e))r=()=>ir(e.useValue);else if(VN(e))r=()=>e.useFactory(...kh(e.deps||[]));else if(BN(e))r=()=>Ze(ir(e.useExisting));else{let i=ir(e&&(e.useClass||e.provide));if(WN(e))r=()=>new i(...kh(e.deps));else return No(i)||Bh(i)}return r}function gc(e){if(e.destroyed)throw new Re(205,!1)}function Ns(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function WN(e){return!!e.deps}function GN(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function zN(e){return typeof e=="function"||typeof e=="object"&&e instanceof ve}function Vh(e,t){for(let n of e)Array.isArray(n)?Vh(n,t):n&&Ow(n)?Vh(n.\u0275providers,t):t(n)}function zw(e,t){e instanceof bc&&gc(e);let n,r=ji(e),i=Vn(void 0);try{return t()}finally{ji(r),Vn(i)}}function qw(){return Pw()!==void 0||SN()!=null}function Yw(e){if(!qw())throw new Re(-203,!1)}function qN(e){return typeof e=="function"}var _i=0,Se=1,ye=2,Sn=3,Er=4,br=5,Cc=6,Ou=7,en=8,Sc=9,di=10,an=11,Ic=12,GE=13,Us=14,wr=15,Mo=16,Rs=17,fi=18,nd=19,Kw=20,Hi=21,Ch=22,Pu=23,zn=24,Ps=25,vn=26,Zw=1,Oo=7,ku=8,Ls=9,Cn=10;function $i(e){return Array.isArray(e)&&typeof e[Zw]=="object"}function Ei(e){return Array.isArray(e)&&e[Zw]===!0}function Xw(e){return(e.flags&4)!==0}function js(e){return e.componentOffset>-1}function $m(e){return(e.flags&1)===1}function pi(e){return!!e.template}function Lu(e){return(e[ye]&512)!==0}function kc(e){return(e[ye]&256)===256}var Uh=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Jw(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}function YN(e){return e.type.prototype.ngOnChanges&&(e.setInput=ZN),KN}function KN(){let e=eb(this),t=e?.current;if(t){let n=e.previous;if(n===Ro)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function ZN(e,t,n,r,i){let o=this.declaredInputs[r],s=eb(e)||XN(e,{previous:Ro,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new Uh(c&&c.currentValue,n,l===Ro),Jw(e,t,i,n)}var Qw="__ngSimpleChanges__";function eb(e){return e[Qw]||null}function XN(e,t){return e[Qw]=t}var zE=null,pt=function(e,t=null,n){zE?.(e,t,n)},tb="svg",JN="math";function Pr(e){for(;Array.isArray(e);)e=e[_i];return e}function nb(e,t){return Pr(t[e])}function Vr(e,t){return Pr(t[e.index])}function Wm(e,t){return e.data[t]}function Gm(e,t){return e[t]}function kr(e,t){let n=t[e];return $i(n)?n:n[_i]}function QN(e){return(e[ye]&4)===4}function zm(e){return(e[ye]&128)===128}function eR(e){return Ei(e[Sn])}function Fs(e,t){return t==null?null:e[t]}function rb(e){e[Rs]=0}function qm(e){e[ye]&1024||(e[ye]|=1024,zm(e)&&Lc(e))}function tR(e,t){for(;e>0;)t=t[Us],e--;return t}function rd(e){return!!(e[ye]&9216||e[zn]?.dirty)}function jh(e){e[di].changeDetectionScheduler?.notify(8),e[ye]&64&&(e[ye]|=1024),rd(e)&&Lc(e)}function Lc(e){e[di].changeDetectionScheduler?.notify(0);let t=Po(e);for(;t!==null&&!(t[ye]&8192||(t[ye]|=8192,!zm(t)));)t=Po(t)}function ib(e,t){if(kc(e))throw new Re(911,!1);e[Hi]===null&&(e[Hi]=[]),e[Hi].push(t)}function nR(e,t){if(e[Hi]===null)return;let n=e[Hi].indexOf(t);n!==-1&&e[Hi].splice(n,1)}function Po(e){let t=e[Sn];return Ei(t)?t[Sn]:t}function ob(e){return e[Ou]??=[]}function sb(e){return e.cleanup??=[]}function rR(e,t,n,r){let i=ob(t);i.push(n),e.firstCreatePass&&sb(e).push(r,i.length-1)}var Ie={lFrame:hb(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Hh=!1;function iR(){return Ie.lFrame.elementDepthCount}function oR(){Ie.lFrame.elementDepthCount++}function sR(){Ie.lFrame.elementDepthCount--}function ab(){return Ie.bindingsEnabled}function aR(){return Ie.skipHydrationRootTNode!==null}function cR(e){return Ie.skipHydrationRootTNode===e}function lR(){Ie.skipHydrationRootTNode=null}function ze(){return Ie.lFrame.lView}function In(){return Ie.lFrame.tView}function Je(e){return Ie.lFrame.contextLView=e,e[en]}function Qe(e){return Ie.lFrame.contextLView=null,e}function Cr(){let e=cb();for(;e!==null&&e.type===64;)e=e.parent;return e}function cb(){return Ie.lFrame.currentTNode}function uR(){let e=Ie.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Hs(e,t){let n=Ie.lFrame;n.currentTNode=e,n.isParent=t}function lb(){return Ie.lFrame.isParent}function dR(){Ie.lFrame.isParent=!1}function fR(){return Ie.lFrame.contextLView}function ub(){return Hh}function qE(e){let t=Hh;return Hh=e,t}function Ym(){let e=Ie.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function pR(e){return Ie.lFrame.bindingIndex=e}function Fc(){return Ie.lFrame.bindingIndex++}function hR(e){let t=Ie.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function mR(){return Ie.lFrame.inI18n}function gR(e,t){let n=Ie.lFrame;n.bindingIndex=n.bindingRootIndex=e,$h(t)}function yR(){return Ie.lFrame.currentDirectiveIndex}function $h(e){Ie.lFrame.currentDirectiveIndex=e}function vR(e){let t=Ie.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function db(){return Ie.lFrame.currentQueryIndex}function Km(e){Ie.lFrame.currentQueryIndex=e}function _R(e){let t=e[Se];return t.type===2?t.declTNode:t.type===1?e[br]:null}function fb(e,t,n){if(n&Ge.SkipSelf){let i=t,o=e;for(;(i=i.parent,i===null&&!(n&Ge.Host))&&(i=_R(o),!(i===null||(o=o[Us],i.type&10))););if(i===null)return!1;t=i,e=o}let r=Ie.lFrame=pb();return r.currentTNode=t,r.lView=e,!0}function Zm(e){let t=pb(),n=e[Se];Ie.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function pb(){let e=Ie.lFrame,t=e===null?null:e.child;return t===null?hb(e):t}function hb(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function mb(){let e=Ie.lFrame;return Ie.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var gb=mb;function Xm(){let e=mb();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function ER(e){return(Ie.lFrame.contextLView=tR(e,Ie.lFrame.contextLView))[en]}function zi(){return Ie.lFrame.selectedIndex}function ko(e){Ie.lFrame.selectedIndex=e}function Jm(){let e=Ie.lFrame;return Wm(e.tView,e.selectedIndex)}function Sr(){Ie.lFrame.currentNamespace=tb}function $s(){wR()}function wR(){Ie.lFrame.currentNamespace=null}function bR(){return Ie.lFrame.currentNamespace}var yb=!0;function Qm(){return yb}function eg(e){yb=e}function CR(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){let s=YN(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}i&&(n.preOrderHooks??=[]).push(0-e,i),o&&((n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o))}function vb(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:s,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;o&&(e.contentHooks??=[]).push(-n,o),s&&((e.contentHooks??=[]).push(n,s),(e.contentCheckHooks??=[]).push(n,s)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),c!=null&&(e.destroyHooks??=[]).push(n,c)}}function Su(e,t,n){_b(e,t,3,n)}function Iu(e,t,n,r){(e[ye]&3)===n&&_b(e,t,n,r)}function Sh(e,t){let n=e[ye];(n&3)===t&&(n&=16383,n+=1,e[ye]=n)}function _b(e,t,n,r){let i=r!==void 0?e[Rs]&65535:0,o=r??-1,s=t.length-1,a=0;for(let l=i;l<s;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[Rs]+=65536),(a<o||o==-1)&&(SR(e,n,t,l),e[Rs]=(e[Rs]&4294901760)+l+2),l++}function YE(e,t){pt(4,e,t);let n=Ve(null);try{t.call(e)}finally{Ve(n),pt(5,e,t)}}function SR(e,t,n,r){let i=n[r]<0,o=n[r+1],s=i?-n[r]:n[r],a=e[s];i?e[ye]>>14<e[Rs]>>16&&(e[ye]&3)===t&&(e[ye]+=16384,YE(a,o)):YE(a,o)}var ks=-1,Dc=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function IR(e){return e instanceof Dc}function DR(e){return(e.flags&8)!==0}function TR(e){return(e.flags&16)!==0}function xR(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let o=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,o)}else{let o=i,s=n[++r];RR(o)?e.setProperty(t,o,s):e.setAttribute(t,o,s),r++}}return r}function NR(e){return e===3||e===4||e===6}function RR(e){return e.charCodeAt(0)===64}function Tc(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?KE(e,n,i,null,t[++r]):KE(e,n,i,null,null))}}return e}function KE(e,t,n,r,i){let o=0,s=e.length;if(t===-1)s=-1;else for(;o<e.length;){let a=e[o++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=o-1;break}}}for(;o<e.length;){let a=e[o];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[o+1]=i);return}else if(r===e[o+1]){e[o+2]=i;return}}o++,r!==null&&o++,i!==null&&o++}s!==-1&&(e.splice(s,0,t),o=s+1),e.splice(o++,0,n),r!==null&&e.splice(o++,0,r),i!==null&&e.splice(o++,0,i)}var Ih={},Wh=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=Qu(n);let r=this.injector.get(e,Ih,n);return r!==Ih||t===Ih?r:this.parentInjector.get(e,t,n)}};function Eb(e){return e!==ks}function Fu(e){return e&32767}function AR(e){return e>>16}function Bu(e,t){let n=AR(e),r=t;for(;n>0;)r=r[Us],n--;return r}var Gh=!0;function Vu(e){let t=Gh;return Gh=e,t}var MR=256,wb=MR-1,bb=5,OR=0,Or={};function PR(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(vc)&&(r=n[vc]),r==null&&(r=n[vc]=OR++);let i=r&wb,o=1<<i;t.data[e+(i>>bb)]|=o}function Cb(e,t){let n=Sb(e,t);if(n!==-1)return n;let r=t[Se];r.firstCreatePass&&(e.injectorIndex=t.length,Dh(r.data,e),Dh(t,null),Dh(r.blueprint,null));let i=tg(e,t),o=e.injectorIndex;if(Eb(i)){let s=Fu(i),a=Bu(i,t),l=a[Se].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=i,o}function Dh(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Sb(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function tg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=Nb(i),r===null)return ks;if(n++,i=i[Us],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ks}function kR(e,t,n){PR(e,t,n)}function Ib(e,t,n){if(n&Ge.Optional||e!==void 0)return e;Vm(t,"NodeInjector")}function Db(e,t,n,r){if(n&Ge.Optional&&r===void 0&&(r=null),(n&(Ge.Self|Ge.Host))===0){let i=e[Sc],o=Vn(void 0);try{return i?i.get(t,r,n&Ge.Optional):kw(t,r,n&Ge.Optional)}finally{Vn(o)}}return Ib(r,t,n)}function Tb(e,t,n,r=Ge.Default,i){if(e!==null){if(t[ye]&2048&&!(r&Ge.Self)){let s=VR(e,t,n,r,Or);if(s!==Or)return s}let o=xb(e,t,n,r,Or);if(o!==Or)return o}return Db(t,n,r,i)}function xb(e,t,n,r,i){let o=FR(n);if(typeof o=="function"){if(!fb(t,e,r))return r&Ge.Host?Ib(i,n,r):Db(t,n,r,i);try{let s;if(s=o(r),s==null&&!(r&Ge.Optional))Vm(n);else return s}finally{gb()}}else if(typeof o=="number"){let s=null,a=Sb(e,t),l=ks,c=r&Ge.Host?t[wr][br]:null;for((a===-1||r&Ge.SkipSelf)&&(l=a===-1?tg(e,t):t[a+8],l===ks||!XE(r,!1)?a=-1:(s=t[Se],a=Fu(l),t=Bu(l,t)));a!==-1;){let d=t[Se];if(ZE(o,a,d.data)){let h=LR(a,t,n,s,r,c);if(h!==Or)return h}l=t[a+8],l!==ks&&XE(r,t[Se].data[a+8]===c)&&ZE(o,a,t)?(s=d,a=Fu(l),t=Bu(l,t)):a=-1}}return i}function LR(e,t,n,r,i,o){let s=t[Se],a=s.data[e+8],l=r==null?js(a)&&Gh:r!=s&&(a.type&3)!==0,c=i&Ge.Host&&o===a,d=Du(a,s,n,l,c);return d!==null?Uu(t,s,d,a):Or}function Du(e,t,n,r,i){let o=e.providerIndexes,s=t.data,a=o&1048575,l=e.directiveStart,c=e.directiveEnd,d=o>>20,h=r?a:a+d,f=i?a+d:c;for(let g=h;g<f;g++){let m=s[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=s[l];if(g&&pi(g)&&g.type===n)return l}return null}function Uu(e,t,n,r){let i=e[n],o=t.data;if(IR(i)){let s=i;s.resolving&&_N(vN(o[n]));let a=Vu(s.canSeeViewProviders);s.resolving=!0;let l,c=s.injectImpl?Vn(s.injectImpl):null,d=fb(e,r,Ge.Default);try{i=e[n]=s.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&CR(n,o[n],t)}finally{c!==null&&Vn(c),Vu(a),s.resolving=!1,gb()}}return i}function FR(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(vc)?e[vc]:void 0;return typeof t=="number"?t>=0?t&wb:BR:t}function ZE(e,t,n){let r=1<<e;return!!(n[t+(e>>bb)]&r)}function XE(e,t){return!(e&Ge.Self)&&!(e&Ge.Host&&t)}var xo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return Tb(this._tNode,this._lView,e,Qu(n),t)}};function BR(){return new xo(Cr(),ze())}function id(e){return Ju(()=>{let t=e.prototype.constructor,n=t[Nu]||zh(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let o=i[Nu]||zh(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function zh(e){return Rw(e)?()=>{let t=zh(ir(e));return t&&t()}:No(e)}function VR(e,t,n,r,i){let o=e,s=t;for(;o!==null&&s!==null&&s[ye]&2048&&!Lu(s);){let a=xb(o,s,n,r|Ge.Self,Or);if(a!==Or)return a;let l=o.parent;if(!l){let c=s[Kw];if(c){let d=c.get(n,Or,r);if(d!==Or)return d}l=Nb(s),s=s[Us]}o=l}return i}function Nb(e){let t=e[Se],n=t.type;return n===2?t.declTNode:n===1?e[br]:null}function JE(e,t=null,n=null,r){let i=UR(e,t,n,r);return i.resolveInjectorInitializers(),i}function UR(e,t=null,n=null,r,i=new Set){let o=[n||Wi,LN(e)];return r=r||(typeof e=="object"?void 0:or(e)),new bc(o,t||td(),r||null,i)}var bt=class A0{static THROW_IF_NOT_FOUND=Ec;static NULL=new Mu;static create(t,n){if(Array.isArray(t))return JE({name:""},n,t,"");{let r=t.name??"";return JE({name:r},t.parent,t.providers,r)}}static \u0275prov=ie({token:A0,providedIn:"any",factory:()=>Ze(Bw)});static __NG_ELEMENT_ID__=-1},jR=new ve("");jR.__NG_ELEMENT_ID__=e=>{let t=Cr();if(t===null)throw new Re(204,!1);if(t.type&2)return t.value;if(e&Ge.Optional)return null;throw new Re(204,!1)};var Rb=!1,ng=(()=>{class e{static __NG_ELEMENT_ID__=HR;static __NG_ENV_ID__=n=>n}return e})(),qh=class extends ng{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return ib(this._lView,e),()=>nR(this._lView,e)}};function HR(){return new qh(ze())}var hi=class{},od=new ve("",{providedIn:"root",factory:()=>!1}),Ab=new ve(""),rg=new ve(""),sd=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new ui(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=ie({token:e,providedIn:"root",factory:()=>new e})}return e})(),Yh=class extends Ne{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,qw()&&(this.destroyRef=P(ng,{optional:!0})??void 0,this.pendingTasks=P(sd,{optional:!0})??void 0)}emit(e){let t=Ve(null);try{super.next(e)}finally{Ve(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),o=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),o=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),o&&(o=this.wrapInTimeout(o)));let s=super.subscribe({next:r,error:i,complete:o});return e instanceof Bt&&e.add(s),s}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},yt=Yh;function ju(...e){}function Mb(e){let t,n;function r(){e=ju;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function QE(e){return queueMicrotask(()=>e()),()=>{e=ju}}var ig="isAngularZone",Hu=ig+"_ID",$R=0,Ke=class Cd{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yt(!1);onMicrotaskEmpty=new yt(!1);onStable=new yt(!1);onError=new yt(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=Rb}=t;if(typeof Zone>"u")throw new Re(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,zR(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(ig)===!0}static assertInAngularZone(){if(!Cd.isInAngularZone())throw new Re(909,!1)}static assertNotInAngularZone(){if(Cd.isInAngularZone())throw new Re(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,WR,ju,ju);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},WR={};function og(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function GR(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Mb(()=>{e.callbackScheduled=!1,Kh(e),e.isCheckStableRunning=!0,og(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Kh(e)}function zR(e){let t=()=>{GR(e)},n=$R++;e._inner=e._inner.fork({name:"angular",properties:{[ig]:!0,[Hu]:n,[Hu+n]:!0},onInvokeTask:(r,i,o,s,a,l)=>{if(qR(l))return r.invokeTask(o,s,a,l);try{return ew(e),r.invokeTask(o,s,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),tw(e)}},onInvoke:(r,i,o,s,a,l,c)=>{try{return ew(e),r.invoke(o,s,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!YR(l)&&t(),tw(e)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,Kh(e),og(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function Kh(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function ew(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function tw(e){e._nesting--,og(e)}var $u=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yt;onMicrotaskEmpty=new yt;onStable=new yt;onError=new yt;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function qR(e){return Ob(e,"__ignore_ng_zone__")}function YR(e){return Ob(e,"__scheduler_tick__")}function Ob(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var mi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},KR=new ve("",{providedIn:"root",factory:()=>{let e=P(Ke),t=P(mi);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function ZR(){return Ws(Cr(),ze())}function Ws(e,t){return new qt(Vr(e,t))}var qt=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=ZR}return e})();function XR(e){return e instanceof qt?e.nativeElement:e}function Gs(e,t){let n=sE(e),r=n[li];return t?.equal&&(r.equal=t.equal),n.set=i=>dh(r,i),n.update=i=>aE(r,i),n.asReadonly=JR.bind(n),n}function JR(){let e=this[li];if(e.readonlyFn===void 0){let t=()=>this();t[li]=e,e.readonlyFn=t}return e.readonlyFn}function QR(){return this._results[Symbol.iterator]()}var Zh=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Ne}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=AN(e);(this._changesDetected=!RN(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=QR};function Pb(e){return(e.flags&128)===128}var kb=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(kb||{}),Lb=new Map,eA=0;function tA(){return eA++}function nA(e){Lb.set(e[nd],e)}function Xh(e){Lb.delete(e[nd])}var nw="__ngContext__";function Bc(e,t){$i(t)?(e[nw]=t[nd],nA(t)):e[nw]=t}function Fb(e){return Vb(e[Ic])}function Bb(e){return Vb(e[Er])}function Vb(e){for(;e!==null&&!Ei(e);)e=e[Er];return e}var Jh;function Ub(e){Jh=e}function jb(){if(Jh!==void 0)return Jh;if(typeof document<"u")return document;throw new Re(210,!1)}var Vc=new ve("",{providedIn:"root",factory:()=>rA}),rA="ng",sg=new ve(""),Bo=new ve("",{providedIn:"platform",factory:()=>"unknown"}),Hb=new ve(""),ag=new ve("",{providedIn:"root",factory:()=>jb().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),iA="h",oA="b",$b=!1,sA=new ve("",{providedIn:"root",factory:()=>$b}),cg=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(cg||{}),zs=new ve(""),rw=new Set;function qi(e){rw.has(e)||(rw.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var Wb=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=aA}return e})();function aA(){return new Wb(ze(),Cr())}var As=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(As||{}),Gb=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ie({token:e,providedIn:"root",factory:()=>new e})}return e})(),cA=[As.EarlyRead,As.Write,As.MixedReadWrite,As.Read],lA=(()=>{class e{ngZone=P(Ke);scheduler=P(hi);errorHandler=P(mi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){P(zs,{optional:!0})}execute(){let n=this.sequences.size>0;n&&pt(16),this.executing=!0;for(let r of cA)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&pt(17)}register(n){let{view:r}=n;r!==void 0?((r[Ps]??=[]).push(n),Lc(r),r[ye]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(cg.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ie({token:e,providedIn:"root",factory:()=>new e})}return e})(),Qh=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,o=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=o,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[Ps];e&&(this.view[Ps]=e.filter(t=>t!==this))}};function lg(e,t){!t?.injector&&Yw(lg);let n=t?.injector??P(bt);return qi("NgAfterRender"),zb(e,n,t,!1)}function Yi(e,t){!t?.injector&&Yw(Yi);let n=t?.injector??P(bt);return qi("NgAfterNextRender"),zb(e,n,t,!0)}function uA(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function zb(e,t,n,r){let i=t.get(Gb);i.impl??=t.get(lA);let o=t.get(zs,null,{optional:!0}),s=n?.phase??As.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(ng):null,l=t.get(Wb,null,{optional:!0}),c=new Qh(i.impl,uA(e,s),l?.view,r,a,o?.snapshot(null));return i.impl.register(c),c}var dA=()=>null;function qb(e,t,n=!1){return dA(e,t,n)}function Yb(e,t){let n=e.contentQueries;if(n!==null){let r=Ve(null);try{for(let i=0;i<n.length;i+=2){let o=n[i],s=n[i+1];if(s!==-1){let a=e.data[s];Km(o),a.contentQueries(2,t[s],s)}}}finally{Ve(r)}}}function em(e,t,n){Km(0);let r=Ve(null);try{t(e,n)}finally{Ve(r)}}function Kb(e,t,n){if(Xw(t)){let r=Ve(null);try{let i=t.directiveStart,o=t.directiveEnd;for(let s=i;s<o;s++){let a=e.data[s];if(a.contentQueries){let l=n[s];a.contentQueries(1,l,s)}}}finally{Ve(r)}}}var Lr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Lr||{}),_u;function fA(){if(_u===void 0&&(_u=null,_c.trustedTypes))try{_u=_c.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return _u}function ad(e){return fA()?.createHTML(e)||e}var Eu;function pA(){if(Eu===void 0&&(Eu=null,_c.trustedTypes))try{Eu=_c.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Eu}function iw(e){return pA()?.createHTML(e)||e}var gi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${xw})`}},tm=class extends gi{getTypeName(){return"HTML"}},nm=class extends gi{getTypeName(){return"Style"}},rm=class extends gi{getTypeName(){return"Script"}},im=class extends gi{getTypeName(){return"URL"}},om=class extends gi{getTypeName(){return"ResourceURL"}};function Ur(e){return e instanceof gi?e.changingThisBreaksApplicationSecurity:e}function Ki(e,t){let n=hA(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${xw})`)}return n===t}function hA(e){return e instanceof gi&&e.getTypeName()||null}function Zb(e){return new tm(e)}function Xb(e){return new nm(e)}function Jb(e){return new rm(e)}function Qb(e){return new im(e)}function eC(e){return new om(e)}function mA(e){let t=new am(e);return gA()?new sm(t):t}var sm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(ad(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},am=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=ad(e),t}};function gA(){try{return!!new window.DOMParser().parseFromString(ad(""),"text/html")}catch{return!1}}var yA=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function cd(e){return e=String(e),e.match(yA)?e:"unsafe:"+e}function wi(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function Uc(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var tC=wi("area,br,col,hr,img,wbr"),nC=wi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rC=wi("rp,rt"),vA=Uc(rC,nC),_A=Uc(nC,wi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),EA=Uc(rC,wi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),ow=Uc(tC,_A,EA,vA),iC=wi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),wA=wi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),bA=wi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),CA=Uc(iC,wA,bA),SA=wi("script,style,template"),cm=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=TA(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=DA(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=sw(e).toLowerCase();if(!ow.hasOwnProperty(t))return this.sanitizedSomething=!0,!SA.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),o=i.name,s=o.toLowerCase();if(!CA.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let a=i.value;iC[s]&&(a=cd(a)),this.buf.push(" ",o,'="',aw(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=sw(e).toLowerCase();ow.hasOwnProperty(t)&&!tC.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(aw(e))}};function IA(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function DA(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw oC(t);return t}function TA(e){let t=e.firstChild;if(t&&IA(e,t))throw oC(t);return t}function sw(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function oC(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var xA=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NA=/([^\#-~ |!])/g;function aw(e){return e.replace(/&/g,"&amp;").replace(xA,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(NA,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var wu;function ug(e,t){let n=null;try{wu=wu||mA(e);let r=t?String(t):"";n=wu.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=wu.getInertBodyElement(r)}while(r!==o);let s=new cm().sanitizeChildren(cw(n)||n);return ad(s)}finally{if(n){let r=cw(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function cw(e){return"content"in e&&RA(e)?e.content:null}function RA(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var jr=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(jr||{});function jc(e){let t=sC();return t?iw(t.sanitize(jr.HTML,e)||""):Ki(e,"HTML")?iw(Ur(e)):ug(jb(),Oc(e))}function cn(e){let t=sC();return t?t.sanitize(jr.URL,e)||"":Ki(e,"URL")?Ur(e):cd(Oc(e))}function sC(){let e=ze();return e&&e[di].sanitizer}function aC(e){return e.ownerDocument.defaultView}function AA(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}var cC="ng-template";function MA(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&AA(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(dg(e))return!1;if(i=t.indexOf(1,i),i>-1){let o;for(;++i<t.length&&typeof(o=t[i])=="string";)if(o.toLowerCase()===n)return!0}return!1}function dg(e){return e.type===4&&e.value!==cC}function OA(e,t,n){let r=e.type===4&&!n?cC:e.value;return t===r}function PA(e,t,n){let r=4,i=e.attrs,o=i!==null?FA(i):0,s=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!s&&!_r(r)&&!_r(l))return!1;if(s&&_r(l))continue;s=!1,r=l|r&1;continue}if(!s)if(r&4){if(r=2|r&1,l!==""&&!OA(e,l,n)||l===""&&t.length===1){if(_r(r))return!1;s=!0}}else if(r&8){if(i===null||!MA(e,i,l,n)){if(_r(r))return!1;s=!0}}else{let c=t[++a],d=kA(l,i,dg(e),n);if(d===-1){if(_r(r))return!1;s=!0;continue}if(c!==""){let h;if(d>o?h="":h=i[d+1].toLowerCase(),r&2&&c!==h){if(_r(r))return!1;s=!0}}}}return _r(r)||s}function _r(e){return(e&1)===0}function kA(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let o=!1;for(;i<t.length;){let s=t[i];if(s===e)return i;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(s===4)break;if(s===0){i+=4;continue}}i+=o?1:2}return-1}else return BA(t,e)}function LA(e,t,n=!1){for(let r=0;r<t.length;r++)if(PA(e,t[r],n))return!0;return!1}function FA(e){for(let t=0;t<e.length;t++){let n=e[t];if(NR(n))return t}return e.length}function BA(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function lw(e,t){return e?":not("+t.trim()+")":t}function VA(e){let t=e[0],n=1,r=2,i="",o=!1;for(;n<e.length;){let s=e[n];if(typeof s=="string")if(r&2){let a=e[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!_r(s)&&(t+=lw(o,i),i=""),r=s,o=o||!_r(r);n++}return i!==""&&(t+=lw(o,i)),t}function UA(e){return e.map(VA).join(",")}function jA(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let o=e[r];if(typeof o=="string")i===2?o!==""&&t.push(o,e[++r]):i===8&&n.push(o);else{if(!_r(i))break;i=o}r++}return n.length&&t.push(1,...n),t}var bi={};function HA(e,t){return e.createText(t)}function $A(e,t,n){e.setValue(t,n)}function lC(e,t,n){return e.createElement(t,n)}function Wu(e,t,n,r,i){e.insertBefore(t,n,r,i)}function uC(e,t,n){e.appendChild(t,n)}function uw(e,t,n,r,i){r!==null?Wu(e,t,n,r,i):uC(e,t,n)}function WA(e,t,n){e.removeChild(null,t,n)}function GA(e,t,n){e.setAttribute(t,"style",n)}function zA(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function dC(e,t,n){let{mergedAttrs:r,classes:i,styles:o}=n;r!==null&&xR(e,t,r),i!==null&&zA(e,t,i),o!==null&&GA(e,t,o)}function fg(e,t,n,r,i,o,s,a,l,c,d){let h=vn+r,f=h+i,g=qA(h,f),m=typeof c=="function"?c():c;return g[Se]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:d}}function qA(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:bi);return n}function YA(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=fg(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function pg(e,t,n,r,i,o,s,a,l,c,d){let h=t.blueprint.slice();return h[_i]=i,h[ye]=r|4|128|8|64|1024,(c!==null||e&&e[ye]&2048)&&(h[ye]|=2048),rb(h),h[Sn]=h[Us]=e,h[en]=n,h[di]=s||e&&e[di],h[an]=a||e&&e[an],h[Sc]=l||e&&e[Sc]||null,h[br]=o,h[nd]=tA(),h[Cc]=d,h[Kw]=c,h[wr]=t.type==2?e[wr]:h,h}function KA(e,t,n){let r=Vr(t,e),i=YA(n),o=e[di].rendererFactory,s=hg(e,pg(e,i,null,fC(n),r,t,null,o.createRenderer(r,n),null,null,null));return e[t.index]=s}function fC(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function pC(e,t,n,r){if(n===0)return-1;let i=t.length;for(let o=0;o<n;o++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function hg(e,t){return e[Ic]?e[GE][Er]=t:e[Ic]=t,e[GE]=t,t}function Z(e=1){hC(In(),ze(),zi()+e,!1)}function hC(e,t,n,r){if(!r)if((t[ye]&3)===3){let i=e.preOrderCheckHooks;i!==null&&Su(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Iu(t,i,0,n)}ko(n)}var ld=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(ld||{});function lm(e,t,n,r){let i=Ve(null);try{let[o,s,a]=e.inputs[n],l=null;(s&ld.SignalBased)!==0&&(l=t[o][li]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,l,r,n,o):Jw(t,l,o,r)}finally{Ve(i)}}function mC(e,t,n,r,i){let o=zi(),s=r&2;try{ko(-1),s&&t.length>vn&&hC(e,t,vn,!1),pt(s?2:0,i),n(r,i)}finally{ko(o),pt(s?3:1,i)}}function mg(e,t,n){tM(e,t,n),(n.flags&64)===64&&nM(e,t,n)}function gC(e,t,n=Vr){let r=t.localNames;if(r!==null){let i=t.index+1;for(let o=0;o<r.length;o+=2){let s=r[o+1],a=s===-1?n(t,e):e[s];e[i++]=a}}}function ZA(e,t,n,r){let i=r.get(sA,$b)||n===Lr.ShadowDom,o=e.selectRootElement(t,i);return XA(o),o}function XA(e){JA(e)}var JA=()=>null;function QA(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function yC(e,t,n,r,i,o,s,a){if(!a&&gg(t,e,n,r,i)){js(t)&&eM(n,t.index);return}if(t.type&3){let l=Vr(t,n);r=QA(r),i=s!=null?s(i,t.value||"",r):i,o.setProperty(l,r,i)}else t.type&12}function eM(e,t){let n=kr(t,e);n[ye]&16||(n[ye]|=64)}function tM(e,t,n){let r=n.directiveStart,i=n.directiveEnd;js(n)&&KA(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||Cb(n,t);let o=n.initialInputs;for(let s=r;s<i;s++){let a=e.data[s],l=Uu(t,e,s,n);if(Bc(l,t),o!==null&&sM(t,s-r,l,a,n,o),pi(a)){let c=kr(n.index,t);c[en]=Uu(t,e,s,n)}}}function nM(e,t,n){let r=n.directiveStart,i=n.directiveEnd,o=n.index,s=yR();try{ko(o);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];$h(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&rM(l,c)}}finally{ko(-1),$h(s)}}function rM(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function vC(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let o=n[i];LA(t,o.selectors,!1)&&(r??=[],pi(o)?r.unshift(o):r.push(o))}return r}function iM(e,t,n,r,i,o){let s=Vr(e,t);oM(t[an],s,o,e.value,n,r,i)}function oM(e,t,n,r,i,o,s){if(o==null)e.removeAttribute(t,i,n);else{let a=s==null?Oc(o):s(o,r||"",i);e.setAttribute(t,i,a,n)}}function sM(e,t,n,r,i,o){let s=o[t];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];lm(r,n,l,c)}}function _C(e,t){let n=e[Sc],r=n?n.get(mi,null):null;r&&r.handleError(t)}function gg(e,t,n,r,i){let o=e.inputs?.[r],s=e.hostDirectiveInputs?.[r],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],d=s[l+1],h=t.data[c];lm(h,n[c],d,i),a=!0}if(o)for(let l of o){let c=n[l],d=t.data[l];lm(d,c,r,i),a=!0}return a}function aM(e,t){let n=kr(t,e),r=n[Se];cM(r,n);let i=n[_i];i!==null&&n[Cc]===null&&(n[Cc]=qb(i,n[Sc])),pt(18),yg(r,n,n[en]),pt(19,n[en])}function cM(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function yg(e,t,n){Zm(t);try{let r=e.viewQuery;r!==null&&em(1,r,n);let i=e.template;i!==null&&mC(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[fi]?.finishViewCreation(e),e.staticContentQueries&&Yb(e,t),e.staticViewQueries&&em(2,e.viewQuery,n);let o=e.components;o!==null&&lM(t,o)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[ye]&=-5,Xm()}}function lM(e,t){for(let n=0;n<t.length;n++)aM(e,t[n])}function ud(e,t,n,r){let i=Ve(null);try{let o=t.tView,s=e[ye]&4096?4096:16,a=pg(e,o,n,s,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Mo]=l;let c=e[fi];return c!==null&&(a[fi]=c.createEmbeddedView(o)),yg(o,a,n),a}finally{Ve(i)}}function xc(e,t){return!t||t.firstChild===null||Pb(e)}var uM;function vg(e,t){return uM(e,t)}var Fr=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Fr||{});function EC(e){return(e.flags&32)===32}function Ms(e,t,n,r,i){if(r!=null){let o,s=!1;Ei(r)?o=r:$i(r)&&(s=!0,r=r[_i]);let a=Pr(r);e===0&&n!==null?i==null?uC(t,n,a):Wu(t,n,a,i||null,!0):e===1&&n!==null?Wu(t,n,a,i||null,!0):e===2?WA(t,a,s):e===3&&t.destroyNode(a),o!=null&&bM(t,e,o,n,i)}}function dM(e,t){wC(e,t),t[_i]=null,t[br]=null}function fM(e,t,n,r,i,o){r[_i]=i,r[br]=t,fd(e,r,n,1,i,o)}function wC(e,t){t[di].changeDetectionScheduler?.notify(9),fd(e,t,t[an],2,null,null)}function pM(e){let t=e[Ic];if(!t)return Th(e[Se],e);for(;t;){let n=null;if($i(t))n=t[Ic];else{let r=t[Cn];r&&(n=r)}if(!n){for(;t&&!t[Er]&&t!==e;)$i(t)&&Th(t[Se],t),t=t[Sn];t===null&&(t=e),$i(t)&&Th(t[Se],t),n=t&&t[Er]}t=n}}function _g(e,t){let n=e[Ls],r=n.indexOf(t);n.splice(r,1)}function dd(e,t){if(kc(t))return;let n=t[an];n.destroyNode&&fd(e,t,n,3,null,null),pM(t)}function Th(e,t){if(kc(t))return;let n=Ve(null);try{t[ye]&=-129,t[ye]|=256,t[zn]&&uh(t[zn]),mM(e,t),hM(e,t),t[Se].type===1&&t[an].destroy();let r=t[Mo];if(r!==null&&Ei(t[Sn])){r!==t[Sn]&&_g(r,t);let i=t[fi];i!==null&&i.detachView(e)}Xh(t)}finally{Ve(n)}}function hM(e,t){let n=e.cleanup,r=t[Ou];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[Ou]=null);let i=t[Hi];if(i!==null){t[Hi]=null;for(let s=0;s<i.length;s++){let a=i[s];a()}}let o=t[Pu];if(o!==null){t[Pu]=null;for(let s of o)s.destroy()}}function mM(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof Dc)){let o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=i[o[s]],l=o[s+1];pt(4,a,l);try{l.call(a)}finally{pt(5,a,l)}}else{pt(4,i,o);try{o.call(i)}finally{pt(5,i,o)}}}}}function gM(e,t,n){return yM(e,t.parent,n)}function yM(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[_i];if(js(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Lr.None||i===Lr.Emulated)return null}return Vr(r,n)}function vM(e,t,n){return EM(e,t,n)}function _M(e,t,n){return e.type&40?Vr(e,n):null}var EM=_M,dw;function Eg(e,t,n,r){let i=gM(e,r,t),o=t[an],s=r.parent||t[br],a=vM(s,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)uw(o,i,n[l],a,!1);else uw(o,i,n,a,!1);dw!==void 0&&dw(o,r,t,n,i)}function yc(e,t){if(t!==null){let n=t.type;if(n&3)return Vr(t,e);if(n&4)return um(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return yc(e,r);{let i=e[t.index];return Ei(i)?um(-1,i):Pr(i)}}else{if(n&128)return yc(e,t.next);if(n&32)return vg(t,e)()||Pr(e[t.index]);{let r=bC(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Po(e[wr]);return yc(i,r)}else return yc(e,t.next)}}}return null}function bC(e,t){if(t!==null){let n=e[wr][br],r=t.projection;return n.projection[r]}return null}function um(e,t){let n=Cn+e+1;if(n<t.length){let r=t[n],i=r[Se].firstChild;if(i!==null)return yc(r,i)}return t[Oo]}function wg(e,t,n,r,i,o,s){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(s&&t===0&&(a&&Bc(Pr(a),r),n.flags|=2),!EC(n))if(l&8)wg(e,t,n.child,r,i,o,!1),Ms(t,e,i,a,o);else if(l&32){let c=vg(n,r),d;for(;d=c();)Ms(t,e,i,d,o);Ms(t,e,i,a,o)}else l&16?wM(e,t,r,n,i,o):Ms(t,e,i,a,o);n=s?n.projectionNext:n.next}}function fd(e,t,n,r,i,o){wg(n,r,e.firstChild,t,i,o,!1)}function wM(e,t,n,r,i,o){let s=n[wr],a=s[br].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];Ms(t,e,i,c,o)}else{let l=a,c=s[Sn];Pb(r)&&(l.flags|=128),wg(e,t,l,c,i,o,!0)}}function bM(e,t,n,r,i){let o=n[Oo],s=Pr(n);o!==s&&Ms(t,e,r,o,i);for(let a=Cn;a<n.length;a++){let l=n[a];fd(l[Se],l,e,t,r,o)}}function CM(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let o=r.indexOf("-")===-1?void 0:Fr.DashCase;i==null?e.removeStyle(n,r,o):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=Fr.Important),e.setStyle(n,r,i,o))}}function Gu(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let o=t[n.index];o!==null&&r.push(Pr(o)),Ei(o)&&SM(o,r);let s=n.type;if(s&8)Gu(e,t,n.child,r);else if(s&32){let a=vg(n,t),l;for(;l=a();)r.push(l)}else if(s&16){let a=bC(t,n);if(Array.isArray(a))r.push(...a);else{let l=Po(t[wr]);Gu(l[Se],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function SM(e,t){for(let n=Cn;n<e.length;n++){let r=e[n],i=r[Se].firstChild;i!==null&&Gu(r[Se],r,i,t)}e[Oo]!==e[_i]&&t.push(e[Oo])}function CC(e){if(e[Ps]!==null){for(let t of e[Ps])t.impl.addSequence(t);e[Ps].length=0}}var SC=[];function IM(e){return e[zn]??DM(e)}function DM(e){let t=SC.pop()??Object.create(xM);return t.lView=e,t}function TM(e){e.lView[zn]!==e&&(e.lView=null,SC.push(e))}var xM=ne(w({},Wl),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{Lc(e.lView)},consumerOnSignalRead(){this.lView[zn]=this}});function NM(e){let t=e[zn]??Object.create(RM);return t.lView=e,t}var RM=ne(w({},Wl),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Po(e.lView);for(;t&&!IC(t[Se]);)t=Po(t);t&&qm(t)},consumerOnSignalRead(){this.lView[zn]=this}});function IC(e){return e.type!==2}function DC(e){if(e[Pu]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Pu])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[ye]&8192)}}var AM=100;function TC(e,t=!0,n=0){let r=e[di].rendererFactory,i=!1;i||r.begin?.();try{MM(e,n)}catch(o){throw t&&_C(e,o),o}finally{i||r.end?.()}}function MM(e,t){let n=ub();try{qE(!0),dm(e,t);let r=0;for(;rd(e);){if(r===AM)throw new Re(103,!1);r++,dm(e,1)}}finally{qE(n)}}function OM(e,t,n,r){if(kc(t))return;let i=t[ye],o=!1,s=!1;Zm(t);let a=!0,l=null,c=null;o||(IC(e)?(c=IM(t),l=ch(c)):K_()===null?(a=!1,c=NM(t),l=ch(c)):t[zn]&&(uh(t[zn]),t[zn]=null));try{rb(t),pR(e.bindingStartIndex),n!==null&&mC(e,t,n,2,r);let d=(i&3)===3;if(!o)if(d){let g=e.preOrderCheckHooks;g!==null&&Su(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Iu(t,g,0,null),Sh(t,0)}if(s||PM(t),DC(t),xC(t,0),e.contentQueries!==null&&Yb(e,t),!o)if(d){let g=e.contentCheckHooks;g!==null&&Su(t,g)}else{let g=e.contentHooks;g!==null&&Iu(t,g,1),Sh(t,1)}LM(e,t);let h=e.components;h!==null&&RC(t,h,0);let f=e.viewQuery;if(f!==null&&em(2,f,r),!o)if(d){let g=e.viewCheckHooks;g!==null&&Su(t,g)}else{let g=e.viewHooks;g!==null&&Iu(t,g,2),Sh(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Ch]){for(let g of t[Ch])g();t[Ch]=null}o||(CC(t),t[ye]&=-73)}catch(d){throw o||Lc(t),d}finally{c!==null&&(Q_(c,l),a&&TM(c)),Xm()}}function xC(e,t){for(let n=Fb(e);n!==null;n=Bb(n))for(let r=Cn;r<n.length;r++){let i=n[r];NC(i,t)}}function PM(e){for(let t=Fb(e);t!==null;t=Bb(t)){if(!(t[ye]&2))continue;let n=t[Ls];for(let r=0;r<n.length;r++){let i=n[r];qm(i)}}}function kM(e,t,n){pt(18);let r=kr(t,e);NC(r,n),pt(19,r[en])}function NC(e,t){zm(e)&&dm(e,t)}function dm(e,t){let n=e[Se],r=e[ye],i=e[zn],o=!!(t===0&&r&16);if(o||=!!(r&64&&t===0),o||=!!(r&1024),o||=!!(i?.dirty&&lh(i)),o||=!1,i&&(i.dirty=!1),e[ye]&=-9217,o)OM(n,e,n.template,e[en]);else if(r&8192){DC(e),xC(e,1);let s=n.components;s!==null&&RC(e,s,1),CC(e)}}function RC(e,t,n){for(let r=0;r<t.length;r++)kM(e,t[r],n)}function LM(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)ko(~i);else{let o=i,s=n[++r],a=n[++r];gR(s,o);let l=t[o];pt(24,l),a(2,l),pt(25,l)}}}finally{ko(-1)}}function bg(e,t){let n=ub()?64:1088;for(e[di].changeDetectionScheduler?.notify(t);e;){e[ye]|=n;let r=Po(e);if(Lu(e)&&!r)return e;e=r}return null}function AC(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function MC(e,t){let n=Cn+t;if(n<e.length)return e[n]}function pd(e,t,n,r=!0){let i=t[Se];if(FM(i,t,e,n),r){let s=um(n,e),a=t[an],l=a.parentNode(e[Oo]);l!==null&&fM(i,e[br],a,t,l,s)}let o=t[Cc];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function OC(e,t){let n=Nc(e,t);return n!==void 0&&dd(n[Se],n),n}function Nc(e,t){if(e.length<=Cn)return;let n=Cn+t,r=e[n];if(r){let i=r[Mo];i!==null&&i!==e&&_g(i,r),t>0&&(e[n-1][Er]=r[Er]);let o=Au(e,Cn+t);dM(r[Se],r);let s=o[fi];s!==null&&s.detachView(o[Se]),r[Sn]=null,r[Er]=null,r[ye]&=-129}return r}function FM(e,t,n,r){let i=Cn+r,o=n.length;r>0&&(n[i-1][Er]=t),r<o-Cn?(t[Er]=n[i],Fw(n,Cn+r,t)):(n.push(t),t[Er]=null),t[Sn]=n;let s=t[Mo];s!==null&&n!==s&&PC(s,t);let a=t[fi];a!==null&&a.insertView(e),jh(t),t[ye]|=128}function PC(e,t){let n=e[Ls],r=t[Sn];if($i(r))e[ye]|=2;else{let i=r[Sn][wr];t[wr]!==i&&(e[ye]|=2)}n===null?e[Ls]=[t]:n.push(t)}var Lo=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[Se];return Gu(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[en]}get dirty(){return!!(this._lView[ye]&9280)||!!this._lView[zn]?.dirty}set context(e){this._lView[en]=e}get destroyed(){return kc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Sn];if(Ei(e)){let t=e[ku],n=t?t.indexOf(this):-1;n>-1&&(Nc(e,n),Au(t,n))}this._attachedToViewContainer=!1}dd(this._lView[Se],this._lView)}onDestroy(e){ib(this._lView,e)}markForCheck(){bg(this._cdRefInjectingView||this._lView,4)}markForRefresh(){qm(this._cdRefInjectingView||this._lView)}detach(){this._lView[ye]&=-129}reattach(){jh(this._lView),this._lView[ye]|=128}detectChanges(){this._lView[ye]|=1024,TC(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Re(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Lu(this._lView),t=this._lView[Mo];t!==null&&!e&&_g(t,this._lView),wC(this._lView[Se],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Re(902,!1);this._appRef=e;let t=Lu(this._lView),n=this._lView[Mo];n!==null&&!t&&PC(n,this._lView),jh(this._lView)}},Br=(()=>{class e{static __NG_ELEMENT_ID__=UM}return e})(),BM=Br,VM=class extends BM{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=ud(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new Lo(r)}};function UM(){return Cg(Cr(),ze())}function Cg(e,t){return e.type&4?new VM(t,e,Ws(e,t)):null}function hd(e,t,n,r,i){let o=e.data[t];if(o===null)o=jM(e,t,n,r,i),mR()&&(o.flags|=32);else if(o.type&64){o.type=n,o.value=r,o.attrs=i;let s=uR();o.injectorIndex=s===null?-1:s.injectorIndex}return Hs(o,!0),o}function jM(e,t,n,r,i){let o=cb(),s=lb(),a=s?o:o&&o.parent,l=e.data[t]=$M(e,a,n,t,r,i);return HM(e,l,o,s),l}function HM(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function $M(e,t,n,r,i,o){let s=t?t.injectorIndex:-1,a=0;return aR()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var g3=new RegExp(`^(\\d+)*(${oA}|${iA})*(.*)`),WM=()=>null;function Rc(e,t){return WM(e,t)}var fm=class{},zu=class{},pm=class{resolveComponentFactory(e){throw Error(`No component factory found for ${or(e)}.`)}},Gi=class{static NULL=new pm},An=class{},qs=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>GM()}return e})();function GM(){let e=ze(),t=Cr(),n=kr(t.index,e);return($i(n)?n:e)[an]}var zM=(()=>{class e{static \u0275prov=ie({token:e,providedIn:"root",factory:()=>null})}return e})();function fw(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,o=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")o=a;else if(o==1)i=VE(i,a);else if(o==2){let l=a,c=t[++s];r=VE(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Yt(e,t=Ge.Default){let n=ze();if(n===null)return Ze(e,t);let r=Cr();return Tb(r,n,ir(e),t)}function kC(e,t,n,r,i){let o=r===null?null:{"":-1},s=i(e,n);if(s!==null){let a,l=null,c=null,d=YM(s);d===null?a=s:[a,l,c]=d,XM(e,t,n,a,o,l,c)}o!==null&&r!==null&&qM(n,r,o)}function qM(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let o=n[t[i+1]];if(o==null)throw new Re(-301,!1);r.push(t[i],o)}}function YM(e){let t=null,n=!1;for(let s=0;s<e.length;s++){let a=e[s];if(s===0&&pi(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,o=null;for(let s of e)s.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,o??=new Map,KM(s,r,o,i)),s===t&&(r??=[],r.push(s));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,o]):null}function KM(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function ZM(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function XM(e,t,n,r,i,o,s){let a=r.length,l=!1;for(let f=0;f<a;f++){let g=r[f];!l&&pi(g)&&(l=!0,ZM(e,n,f)),kR(Cb(n,t),e,g.type)}rO(n,e.data.length,a);for(let f=0;f<a;f++){let g=r[f];g.providersResolver&&g.providersResolver(g)}let c=!1,d=!1,h=pC(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=Tc(n.mergedAttrs,g.hostAttrs),QM(e,n,t,h,g),nO(h,g,i),s!==null&&s.has(g)){let[b,I]=s.get(g);n.directiveToIndex.set(g.type,[h,b+n.directiveStart,I+n.directiveStart])}else(o===null||!o.has(g))&&n.directiveToIndex.set(g.type,h);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),c=!0),!d&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),d=!0),h++}JM(e,n,o)}function JM(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))pw(0,t,i,r),pw(1,t,i,r),mw(t,r,!1);else{let o=n.get(i);hw(0,t,o,r),hw(1,t,o,r),mw(t,r,!0)}}}function pw(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s;e===0?s=t.inputs??={}:s=t.outputs??={},s[o]??=[],s[o].push(r),LC(t,o)}}function hw(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,o),LC(t,s)}}function LC(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function mw(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:o}=e;if(r===null||!n&&i===null||n&&o===null||dg(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let c=i[l];for(let d of c)if(d===t){s??=[],s.push(l,r[a+1]);break}}else if(n&&o.hasOwnProperty(l)){let c=o[l];for(let d=0;d<c.length;d+=2)if(c[d]===t){s??=[],s.push(c[d+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(s)}function QM(e,t,n,r,i){e.data[r]=i;let o=i.factory||(i.factory=No(i.type,!0)),s=new Dc(o,pi(i),Yt);e.blueprint[r]=s,n[r]=s,eO(e,t,r,pC(e,n,i.hostVars,bi),i)}function eO(e,t,n,r,i){let o=i.hostBindings;if(o){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;tO(s)!=a&&s.push(a),s.push(n,r,o)}}function tO(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function nO(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;pi(t)&&(n[""]=e)}}function rO(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function FC(e,t,n,r,i,o,s,a){let l=t.consts,c=Fs(l,s),d=hd(t,e,2,r,c);return o&&kC(t,n,d,Fs(l,a),i),d.mergedAttrs=Tc(d.mergedAttrs,d.attrs),d.attrs!==null&&fw(d,d.attrs,!1),d.mergedAttrs!==null&&fw(d,d.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,d),d}function BC(e,t){vb(e,t),Xw(t)&&e.queries.elementEnd(t)}var hm=class extends Gi{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Ao(e);return new Ac(t,this.ngModule)}};function iO(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],o={propName:n,templateName:t,isSignal:(r&ld.SignalBased)!==0};return i&&(o.transform=i),o})}function oO(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function sO(e,t,n){let r=t instanceof Un?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Wh(n,r):n}function aO(e){let t=e.get(An,null);if(t===null)throw new Re(407,!1);let n=e.get(zM,null),r=e.get(hi,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function cO(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return lC(t,n,n==="svg"?tb:n==="math"?JN:null)}var Ac=class extends zu{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return iO(this.componentDef.inputs)}get outputs(){return oO(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=UA(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){pt(22);let i=Ve(null);try{let o=this.componentDef,s=n?["ng-version","19.2.0"]:jA(this.componentDef.selectors[0]),a=fg(0,null,null,1,0,null,null,null,null,[s],null),l=sO(o,r||this.ngModule,e),c=aO(l),d=c.rendererFactory.createRenderer(null,o),h=n?ZA(d,n,o.encapsulation,l):cO(o,d),f=pg(null,a,null,512|fC(o),null,null,c,d,l,null,qb(h,l,!0));f[vn]=h,Zm(f);let g=null;try{let m=FC(vn,a,f,"#host",()=>[this.componentDef],!0,0);h&&(dC(d,h,m),Bc(h,f)),mg(a,f,m),Kb(a,m,f),BC(a,m),t!==void 0&&lO(m,this.ngContentSelectors,t),g=kr(m.index,f),f[en]=g[en],yg(a,f,null)}catch(m){throw g!==null&&Xh(g),Xh(f),m}finally{pt(23),Xm()}return new mm(this.componentType,f)}finally{Ve(i)}}},mm=class extends fm{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Wm(t[Se],vn),this.location=Ws(this._tNode,t),this.instance=kr(this._tNode.index,t)[en],this.hostView=this.changeDetectorRef=new Lo(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,i=gg(n,r[Se],r,e,t);this.previousInputValues.set(e,t);let o=kr(n.index,r);bg(o,1)}get injector(){return new xo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function lO(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let o=n[i];r.push(o!=null&&o.length?Array.from(o):null)}}var Zi=(()=>{class e{static __NG_ELEMENT_ID__=uO}return e})();function uO(){let e=Cr();return UC(e,ze())}var dO=Zi,VC=class extends dO{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Ws(this._hostTNode,this._hostLView)}get injector(){return new xo(this._hostTNode,this._hostLView)}get parentInjector(){let e=tg(this._hostTNode,this._hostLView);if(Eb(e)){let t=Bu(e,this._hostLView),n=Fu(e),r=t[Se].data[n+8];return new xo(r,t)}else return new xo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=gw(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Cn}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let o=Rc(this._lContainer,e.ssrId),s=e.createEmbeddedViewImpl(t||{},i,o);return this.insertImpl(s,r,xc(this._hostTNode,o)),s}createComponent(e,t,n,r,i){let o=e&&!qN(e),s;if(o)s=t;else{let g=t||{};s=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=o?e:new Ac(Ao(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(o?l:this.parentInjector).get(Un,null);g&&(i=g)}let c=Ao(a.componentType??{}),d=Rc(this._lContainer,c?.id??null),h=d?.firstChild??null,f=a.create(l,r,h,i);return this.insertImpl(f.hostView,s,xc(this._hostTNode,d)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(eR(r)){let s=this.indexOf(e);if(s!==-1)this.detach(s);else{let a=r[Sn],l=new VC(a,a[br],a[Sn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),o=this._lContainer;return pd(o,r,i,n),e.attachToViewContainerRef(),Fw(xh(o),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=gw(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Nc(this._lContainer,t);n&&(Au(xh(this._lContainer),t),dd(n[Se],n))}detach(e){let t=this._adjustIndex(e,-1),n=Nc(this._lContainer,t);return n&&Au(xh(this._lContainer),t)!=null?new Lo(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function gw(e){return e[ku]}function xh(e){return e[ku]||(e[ku]=[])}function UC(e,t){let n,r=t[e.index];return Ei(r)?n=r:(n=AC(r,t,null,e),t[e.index]=n,hg(t,n)),pO(n,t,e,r),new VC(n,e,t)}function fO(e,t){let n=e[an],r=n.createComment(""),i=Vr(t,e),o=n.parentNode(i);return Wu(n,o,r,n.nextSibling(i),!1),r}var pO=gO,hO=()=>!1;function mO(e,t,n){return hO(e,t,n)}function gO(e,t,n,r){if(e[Oo])return;let i;n.type&8?i=Pr(r):i=fO(t,n),e[Oo]=i}var gm=class O0{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new O0(this.queryList)}setDirty(){this.queryList.setDirty()}},ym=class N0{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let o=0;o<r;o++){let s=n.getByIndex(o),a=this.queries[s.indexInDeclarationView];i.push(a.clone())}return new N0(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)Sg(t,n).matches!==null&&this.queries[n].setDirty()}},vm=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=SO(e):this.predicate=e}},_m=class P0{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,o=this.getByIndex(r).embeddedTView(t,i);o&&(o.indexInDeclarationView=r,n!==null?n.push(o):n=[o])}return n!==null?new P0(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},Em=class R0{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new R0(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let o=r[i];this.matchTNodeWithReadOption(t,n,yO(n,o)),this.matchTNodeWithReadOption(t,n,Du(n,t,o,!1,!1))}else r===Br?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Du(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===qt||i===Zi||i===Br&&n.type&4)this.addMatch(n.index,-2);else{let o=Du(n,t,i,!1,!1);o!==null&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function yO(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function vO(e,t){return e.type&11?Ws(e,t):e.type&4?Cg(e,t):null}function _O(e,t,n,r){return n===-1?vO(t,e):n===-2?EO(e,t,r):Uu(e,e[Se],n,t)}function EO(e,t,n){if(n===qt)return Ws(t,e);if(n===Br)return Cg(t,e);if(n===Zi)return UC(t,e)}function jC(e,t,n,r){let i=t[fi].queries[r];if(i.matches===null){let o=e.data,s=n.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let d=o[c];a.push(_O(t,d,s[l+1],n.metadata.read))}}i.matches=a}return i.matches}function wm(e,t,n,r){let i=e.queries.getByIndex(n),o=i.matches;if(o!==null){let s=jC(e,t,i,n);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)r.push(s[a/2]);else{let c=o[a+1],d=t[-l];for(let h=Cn;h<d.length;h++){let f=d[h];f[Mo]===f[Sn]&&wm(f[Se],f,c,r)}if(d[Ls]!==null){let h=d[Ls];for(let f=0;f<h.length;f++){let g=h[f];wm(g[Se],g,c,r)}}}}}return r}function wO(e,t){return e[fi].queries[t].queryList}function bO(e,t,n){let r=new Zh((n&4)===4);return rR(e,t,r,r.destroy),(t[fi]??=new ym).queries.push(new gm(r))-1}function CO(e,t,n){let r=In();return r.firstCreatePass&&(IO(r,new vm(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),bO(r,ze(),t)}function SO(e){return e.split(",").map(t=>t.trim())}function IO(e,t,n){e.queries===null&&(e.queries=new _m),e.queries.track(new Em(t,n))}function Sg(e,t){return e.queries.getByIndex(t)}function DO(e,t){let n=e[Se],r=Sg(n,t);return r.crossesNgTemplate?wm(n,e,t,[]):jC(n,e,r,t)}var yi=class{},qu=class extends yi{injector;componentFactoryResolver=new hm(this);instance=null;constructor(e){super();let t=new bc([...e.providers,{provide:yi,useValue:this},{provide:Gi,useValue:this.componentFactoryResolver}],e.parent||td(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function TO(e,t,n=null){return new qu({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var xO=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=$w(!1,n.type),i=r.length>0?TO([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ie({token:e,providedIn:"environment",factory:()=>new e(Ze(Un))})}return e})();function St(e){return Ju(()=>{let t=HC(e),n=ne(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===kb.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(xO).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Lr.Emulated,styles:e.styles||Wi,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&qi("NgStandalone"),$C(n);let r=e.dependencies;return n.directiveDefs=yw(r,!1),n.pipeDefs=yw(r,!0),n.id=OO(n),n})}function NO(e){return Ao(e)||Uw(e)}function RO(e){return e!==null}function AO(e,t){if(e==null)return Ro;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],o,s,a,l;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,l=i[3]||null):(o=i,s=i,a=ld.None,l=null),n[o]=[r,a,l],t[o]=s}return n}function MO(e){if(e==null)return Ro;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Xi(e){return Ju(()=>{let t=HC(e);return $C(t),t})}function Vo(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function HC(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Ro,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Wi,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:AO(e.inputs,t),outputs:MO(e.outputs),debugInfo:null}}function $C(e){e.features?.forEach(t=>t(e))}function yw(e,t){if(!e)return null;let n=t?jw:NO;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(RO)}function OO(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function PO(e){return Object.getPrototypeOf(e.prototype).constructor}function Ys(e){let t=PO(e.type),n=!0,r=[e];for(;t;){let i;if(pi(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Re(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let s=e;s.inputs=Nh(e.inputs),s.declaredInputs=Nh(e.declaredInputs),s.outputs=Nh(e.outputs);let a=i.hostBindings;a&&VO(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&FO(e,l),c&&BO(e,c),kO(e,i),dN(e.outputs,i.outputs),pi(i)&&i.data.animation){let d=e.data;d.animation=(d.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(e),a===Ys&&(n=!1)}}t=Object.getPrototypeOf(t)}LO(r)}function kO(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function LO(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=Tc(i.hostAttrs,n=Tc(n,i.hostAttrs))}}function Nh(e){return e===Ro?{}:e===Wi?[]:e}function FO(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function BO(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,o)=>{t(r,i,o),n(r,i,o)}:e.contentQueries=t}function VO(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function WC(e){return e!==null&&(typeof e=="function"||typeof e=="object")}function GC(e,t,n){return e[t]=n}function vi(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function UO(e,t,n,r){let i=vi(e,t,n);return vi(e,t+1,r)||i}function jO(e,t,n,r,i,o,s,a,l){let c=t.consts,d=hd(t,e,4,s||null,a||null);ab()&&kC(t,n,d,Fs(c,l),vC),d.mergedAttrs=Tc(d.mergedAttrs,d.attrs),vb(t,d);let h=d.tView=fg(2,d,r,i,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,d),h.queries=t.queries.embeddedTView(d)),d}function bm(e,t,n,r,i,o,s,a,l,c){let d=n+vn,h=t.firstCreatePass?jO(d,t,e,r,i,o,s,a,l):t.data[d];Hs(h,!1);let f=HO(t,e,h,n);Qm()&&Eg(t,e,f,h),Bc(f,e);let g=AC(f,e,f,h);return e[d]=g,hg(e,g),mO(g,h,e),$m(h)&&mg(t,e,h),l!=null&&gC(e,h,c),h}function At(e,t,n,r,i,o,s,a){let l=ze(),c=In(),d=Fs(c.consts,o);return bm(l,c,e,t,n,r,i,d,s,a),At}var HO=$O;function $O(e,t,n,r){return eg(!0),t[an].createComment("")}var zC=new ve(""),WO=(()=>{class e{static \u0275prov=ie({token:e,providedIn:"root",factory:()=>new Cm})}return e})(),Cm=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function Ig(e){return!!e&&typeof e.then=="function"}function qC(e){return!!e&&typeof e.subscribe=="function"}var GO=new ve(""),YC=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=P(GO,{optional:!0})??[];injector=P(bt);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let o=zw(this.injector,i);if(Ig(o))n.push(o);else if(qC(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),zO=new ve("");function qO(){oE(()=>{throw new Re(600,!1)})}function YO(e){return e.isBoundToModule}var KO=10,sr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=P(KR);afterRenderManager=P(Gb);zonelessEnabled=P(od);rootEffectScheduler=P(WO);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new Ne;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=P(sd).hasPendingTasks.pipe(Mr(n=>!n));constructor(){P(zs,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=P(Un);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){pt(10);let i=n instanceof zu;if(!this._injector.get(YC).done){let h=!i&&kN(n),f=!1;throw new Re(405,f)}let o;i?o=n:o=this._injector.get(Gi).resolveComponentFactory(n),this.componentTypes.push(o.componentType);let s=YO(o)?void 0:this._injector.get(yi),a=r||o.selector,l=o.create(bt.NULL,[],a,s),c=l.location.nativeElement,d=l.injector.get(zC,null);return d?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),Tu(this.components,l),d?.unregisterApplication(c)}),this._loadComponent(l),pt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){pt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(cg.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Re(101,!1);let n=Ve(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Ve(n),this.afterTick.next(),pt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(An,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<KO;)pt(14),this.synchronizeOnce(),pt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)ZO(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>rd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;Tu(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(zO,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Tu(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Re(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Tu(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function ZO(e,t,n,r){!n&&!rd(e)||TC(e,t,n&&!r?0:1)}function Dg(e,t,n,r){let i=ze(),o=Fc();if(vi(i,o,t)){let s=In(),a=Jm();iM(a,i,e,t,n,r)}return Dg}function KC(e,t,n,r){return vi(e,Fc(),n)?t+Oc(n)+r:bi}function bu(e,t){return e<<17|t<<2}function Fo(e){return e>>17&32767}function XO(e){return(e&2)==2}function JO(e,t){return e&131071|t<<17}function Sm(e){return e|2}function Bs(e){return(e&131068)>>2}function Rh(e,t){return e&-131069|t<<2}function QO(e){return(e&1)===1}function Im(e){return e|1}function e1(e,t,n,r,i,o){let s=o?t.classBindings:t.styleBindings,a=Fo(s),l=Bs(s);e[r]=n;let c=!1,d;if(Array.isArray(n)){let h=n;d=h[1],(d===null||Pc(h,d)>0)&&(c=!0)}else d=n;if(i)if(l!==0){let h=Fo(e[a+1]);e[r+1]=bu(h,a),h!==0&&(e[h+1]=Rh(e[h+1],r)),e[a+1]=JO(e[a+1],r)}else e[r+1]=bu(a,0),a!==0&&(e[a+1]=Rh(e[a+1],r)),a=r;else e[r+1]=bu(l,0),a===0?a=r:e[l+1]=Rh(e[l+1],r),l=r;c&&(e[r+1]=Sm(e[r+1])),vw(e,d,r,!0),vw(e,d,r,!1),t1(t,d,e,r,o),s=bu(a,l),o?t.classBindings=s:t.styleBindings=s}function t1(e,t,n,r,i){let o=i?e.residualClasses:e.residualStyles;o!=null&&typeof t=="string"&&Pc(o,t)>=0&&(n[r+1]=Im(n[r+1]))}function vw(e,t,n,r){let i=e[n+1],o=t===null,s=r?Fo(i):Bs(i),a=!1;for(;s!==0&&(a===!1||o);){let l=e[s],c=e[s+1];n1(l,t)&&(a=!0,e[s+1]=r?Im(c):Sm(c)),s=r?Fo(c):Bs(c)}a&&(e[n+1]=r?Sm(i):Im(i))}function n1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Pc(e,t)>=0:!1}function Ue(e,t,n){let r=ze(),i=Fc();if(vi(r,i,t)){let o=In(),s=Jm();yC(o,s,r,e,t,r[an],n,!1)}return Ue}function _w(e,t,n,r,i){gg(t,e,n,i?"class":"style",r)}function Ji(e,t,n){return ZC(e,t,n,!1),Ji}function Qi(e,t){return ZC(e,t,null,!0),Qi}function ZC(e,t,n,r){let i=ze(),o=In(),s=hR(2);if(o.firstUpdatePass&&i1(o,e,s,r),t!==bi&&vi(i,s,t)){let a=o.data[zi()];l1(o,a,i,i[an],e,i[s+1]=u1(t,n),r,s)}}function r1(e,t){return t>=e.expandoStartIndex}function i1(e,t,n,r){let i=e.data;if(i[n+1]===null){let o=i[zi()],s=r1(e,n);d1(o,r)&&t===null&&!s&&(t=!1),t=o1(i,o,t,r),e1(i,o,t,n,s,r)}}function o1(e,t,n,r){let i=vR(e),o=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=Ah(null,e,t,n,r),n=Mc(n,t.attrs,r),o=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==i)if(n=Ah(i,e,t,n,r),o===null){let a=s1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=Ah(null,e,t,a[1],r),a=Mc(a,t.attrs,r),a1(e,t,r,a))}else o=c1(e,t,r)}return o!==void 0&&(r?t.residualClasses=o:t.residualStyles=o),n}function s1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Bs(r)!==0)return e[Fo(r)]}function a1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Fo(i)]=r}function c1(e,t,n){let r,i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<i;o++){let s=e[o].hostAttrs;r=Mc(r,s,n)}return Mc(r,t.attrs,n)}function Ah(e,t,n,r,i){let o=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(o=t[a],r=Mc(r,o.hostAttrs,i),o!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Mc(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let o=0;o<t.length;o++){let s=t[o];typeof s=="number"?i=s:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),ON(e,s,n?!0:t[++o]))}return e===void 0?null:e}function l1(e,t,n,r,i,o,s,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],d=QO(c)?Ew(l,t,n,i,Bs(c),s):void 0;if(!Yu(d)){Yu(o)||XO(c)&&(o=Ew(l,null,n,i,a,s));let h=nb(zi(),n);CM(r,s,h,i,o)}}function Ew(e,t,n,r,i,o){let s=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),d=c?l[1]:l,h=d===null,f=n[i+1];f===bi&&(f=h?Wi:void 0);let g=h?wh(f,r):d===r?f:void 0;if(c&&!Yu(g)&&(g=wh(l,r)),Yu(g)&&(a=g,s))return a;let m=e[i+1];i=s?Fo(m):Bs(m)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=wh(l,r))}return a}function Yu(e){return e!==void 0}function u1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=or(Ur(e)))),e}function d1(e,t){return(e.flags&(t?8:16))!==0}var Dm=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let o=this.detach(n);this.attach(n,i),this.attach(r,o)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function Mh(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function f1(e,t,n){let r,i,o=0,s=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;o<=s&&o<=l;){let c=e.at(o),d=t[o],h=Mh(o,c,o,d,n);if(h!==0){h<0&&e.updateValue(o,d),o++;continue}let f=e.at(s),g=t[l],m=Mh(s,f,l,g,n);if(m!==0){m<0&&e.updateValue(s,g),s--,l--;continue}let b=n(o,c),I=n(s,f),R=n(o,d);if(Object.is(R,I)){let j=n(l,g);Object.is(j,b)?(e.swap(o,s),e.updateValue(s,g),l--,s--):e.move(s,o),e.updateValue(o,d),o++;continue}if(r??=new Ku,i??=bw(e,o,s,n),Tm(e,r,o,R))e.updateValue(o,d),o++,s++;else if(i.has(R))r.set(b,e.detach(o)),s--;else{let j=e.create(o,t[o]);e.attach(o,j),o++,s++}}for(;o<=l;)ww(e,r,n,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let d=e.at(o),h=c.value,f=Mh(o,d,o,h,n);if(f!==0)f<0&&e.updateValue(o,h),o++,c=l.next();else{r??=new Ku,i??=bw(e,o,s,n);let g=n(o,h);if(Tm(e,r,o,g))e.updateValue(o,h),o++,s++,c=l.next();else if(!i.has(g))e.attach(o,e.create(o,h)),o++,s++,c=l.next();else{let m=n(o,d);r.set(m,e.detach(o)),s--}}}for(;!c.done;)ww(e,r,n,e.length,c.value),c=l.next()}for(;o<=s;)e.destroy(e.detach(s--));r?.forEach(l=>{e.destroy(l)})}function Tm(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function ww(e,t,n,r,i){if(Tm(e,t,r,n(r,i)))e.updateValue(r,i);else{let o=e.create(r,i);e.attach(r,o)}}function bw(e,t,n,r){let i=new Set;for(let o=t;o<=n;o++)i.add(r(o,e.at(o)));return i}var Ku=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function Ut(e,t){qi("NgControlFlow");let n=ze(),r=Fc(),i=n[r]!==bi?n[r]:-1,o=i!==-1?Zu(n,vn+i):void 0,s=0;if(vi(n,r,e)){let a=Ve(null);try{if(o!==void 0&&OC(o,s),e!==-1){let l=vn+e,c=Zu(n,l),d=Am(n[Se],l),h=Rc(c,d.tView.ssrId),f=ud(n,d,t,{dehydratedView:h});pd(c,f,s,xc(d,h))}}finally{Ve(a)}}else if(o!==void 0){let a=MC(o,s);a!==void 0&&(a[en]=t)}}var xm=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Cn}};function Ci(e,t){return t}var Nm=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Kt(e,t,n,r,i,o,s,a,l,c,d,h,f){qi("NgControlFlow");let g=ze(),m=In(),b=l!==void 0,I=ze(),R=a?s.bind(I[wr][en]):s,j=new Nm(b,R);I[vn+e]=j,bm(g,m,e+1,t,n,r,i,Fs(m.consts,o)),b&&bm(g,m,e+2,l,c,d,h,Fs(m.consts,f))}var Rm=class extends Dm{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-Cn}at(e){return this.getLView(e)[en].$implicit}attach(e,t){let n=t[Cc];this.needsIndexUpdate||=e!==this.length,pd(this.lContainer,t,e,xc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,p1(this.lContainer,e)}create(e,t){let n=Rc(this.lContainer,this.templateTNode.tView.ssrId),r=ud(this.hostLView,this.templateTNode,new xm(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){dd(e[Se],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[en].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[en].$index=e}getLView(e){return h1(this.lContainer,e)}};function Zt(e){let t=Ve(null),n=zi();try{let r=ze(),i=r[Se],o=r[n],s=n+1,a=Zu(r,s);if(o.liveCollection===void 0){let c=Am(i,s);o.liveCollection=new Rm(a,r,c)}else o.liveCollection.reset();let l=o.liveCollection;if(f1(l,e,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let c=Fc(),d=l.length===0;if(vi(r,c,d)){let h=n+2,f=Zu(r,h);if(d){let g=Am(i,h),m=Rc(f,g.tView.ssrId),b=ud(r,g,void 0,{dehydratedView:m});pd(f,b,0,xc(g,m))}else OC(f,0)}}}finally{Ve(t)}}function Zu(e,t){return e[t]}function p1(e,t){return Nc(e,t)}function h1(e,t){return MC(e,t)}function Am(e,t){return Wm(e,t)}function X(e,t,n,r){let i=ze(),o=In(),s=vn+e,a=i[an],l=o.firstCreatePass?FC(s,o,i,t,vC,ab(),n,r):o.data[s],c=m1(o,i,l,a,t,e);i[s]=c;let d=$m(l);return Hs(l,!0),dC(a,c,l),!EC(l)&&Qm()&&Eg(o,i,c,l),(iR()===0||d)&&Bc(c,i),oR(),d&&(mg(o,i,l),Kb(o,l,i)),r!==null&&gC(i,l),X}function Q(){let e=Cr();lb()?dR():(e=e.parent,Hs(e,!1));let t=e;cR(t)&&lR(),sR();let n=In();return n.firstCreatePass&&BC(n,t),t.classesWithoutHost!=null&&DR(t)&&_w(n,t,ze(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&TR(t)&&_w(n,t,ze(),t.stylesWithoutHost,!1),Q}function qe(e,t,n,r){return X(e,t,n,r),Q(),qe}var m1=(e,t,n,r,i,o)=>(eg(!0),lC(r,i,bR()));function _n(){return ze()}var Xu="en-US",g1=Xu;function y1(e){typeof e=="string"&&(g1=e.toLowerCase().replace(/_/g,"-"))}var v1=(e,t,n)=>{};function at(e,t,n,r){let i=ze(),o=In(),s=Cr();return E1(o,i,i[an],s,e,t,r),at}function _1(e,t,n,r){let i=e.cleanup;if(i!=null)for(let o=0;o<i.length-1;o+=2){let s=i[o];if(s===n&&i[o+1]===r){let a=t[Ou],l=i[o+2];return a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function E1(e,t,n,r,i,o,s){let a=$m(r),l=e.firstCreatePass?sb(e):null,c=t[en],d=ob(t),h=!0;if(r.type&3||s){let f=Vr(r,t),g=s?s(f):f,m=d.length,b=s?R=>s(Pr(R[r.index])):r.index,I=null;if(!s&&a&&(I=_1(e,t,i,r.index)),I!==null){let R=I.__ngLastListenerFn__||I;R.__ngNextListenerFn__=o,I.__ngLastListenerFn__=o,h=!1}else{o=Iw(r,t,c,o),v1(f,i,o);let R=n.listen(g,i,o);d.push(o,R),l&&l.push(i,b,m,m+1)}}else o=Iw(r,t,c,o);if(h){let f=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],I=g[m+1];Cw(r,e,t,b,I,i,o,d,l)}if(f&&f.length)for(let m of f)Cw(r,e,t,m,i,i,o,d,l)}}function Cw(e,t,n,r,i,o,s,a,l){let c=n[r],d=t.data[r].outputs[i],h=c[d].subscribe(s),f=a.length;a.push(s,h),l&&l.push(o,e.index,f,-(f+1))}function Sw(e,t,n,r){let i=Ve(null);try{return pt(6,t,n),n(r)!==!1}catch(o){return _C(e,o),!1}finally{pt(7,t,n),Ve(i)}}function Iw(e,t,n,r){return function i(o){if(o===Function)return r;let s=js(e)?kr(e.index,t):t;bg(s,5);let a=Sw(t,n,r,o),l=i.__ngNextListenerFn__;for(;l;)a=Sw(t,n,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function re(e=1){return ER(e)}function jn(e,t,n){return Si(e,"",t,"",n),jn}function Si(e,t,n,r,i){let o=ze(),s=KC(o,t,n,r);if(s!==bi){let a=In(),l=Jm();yC(a,l,o,e,s,o[an],i,!1)}return Si}function eo(e,t,n){CO(e,t,n)}function to(e){let t=ze(),n=In(),r=db();Km(r+1);let i=Sg(n,r);if(e.dirty&&QN(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let o=DO(t,r);e.reset(o,XR),e.notifyOnChanges()}return!0}return!1}function no(){return wO(ze(),db())}function Tg(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function jt(e,t=""){let n=ze(),r=In(),i=e+vn,o=r.firstCreatePass?hd(r,i,1,t,null):r.data[i],s=w1(r,n,o,t,e);n[i]=s,Qm()&&Eg(r,n,s,o),Hs(o,!1)}var w1=(e,t,n,r,i)=>(eg(!0),HA(t[an],r));function Ks(e){return Ir("",e,""),Ks}function Ir(e,t,n){let r=ze(),i=KC(r,e,t,n);return i!==bi&&b1(r,zi(),i),Ir}function b1(e,t,n){let r=nb(t,e);$A(e[an],r,n)}var XC={};function Hr(e){let t=In(),n=ze(),r=e+vn,i=hd(t,r,128,null,null);return Hs(i,!1),Tg(t,n,r,XC),Hr}function Uo(e){qi("NgLet");let t=In(),n=ze(),r=zi();return Tg(t,n,r,e),e}function Hn(e){let t=fR(),n=Gm(t,vn+e);if(n===XC)throw new Re(314,!1);return n}function JC(e,t,n,r){return e0(ze(),Ym(),e,t,n,r)}function QC(e,t){let n=e[t];return n===bi?void 0:n}function e0(e,t,n,r,i,o){let s=t+n;return vi(e,s,i)?GC(e,s+1,o?r.call(o,i):r(i)):QC(e,s+1)}function C1(e,t,n,r,i,o,s){let a=t+n;return UO(e,a,i,o)?GC(e,a+2,s?r.call(s,i,o):r(i,o)):QC(e,a+2)}function ar(e,t){let n=In(),r,i=e+vn;n.firstCreatePass?(r=S1(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let o=r.factory||(r.factory=No(r.type,!0)),s,a=Vn(Yt);try{let l=Vu(!1),c=o();return Vu(l),Tg(n,ze(),i,c),c}finally{Vn(a)}}function S1(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Dr(e,t,n){let r=e+vn,i=ze(),o=Gm(i,r);return n0(i,r)?e0(i,Ym(),t,o.transform,n,o):o.transform(n)}function t0(e,t,n,r){let i=e+vn,o=ze(),s=Gm(o,i);return n0(o,i)?C1(o,Ym(),t,s.transform,n,r,s):s.transform(n,r)}function n0(e,t){return e[Se].data[t].pure}var Vs=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},xg=new Vs("19.2.0"),I1=(()=>{class e{zone=P(Ke);changeDetectionScheduler=P(hi);applicationRef=P(sr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function D1({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Ke(ne(w({},T1()),{scheduleInRootZone:n})),[{provide:Ke,useFactory:e},{provide:wc,multi:!0,useFactory:()=>{let r=P(I1,{optional:!0});return()=>r.initialize()}},{provide:wc,multi:!0,useFactory:()=>{let r=P(x1);return()=>{r.initialize()}}},t===!0?{provide:Ab,useValue:!0}:[],{provide:rg,useValue:n??Rb}]}function T1(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var x1=(()=>{class e{subscription=new Bt;initialized=!1;zone=P(Ke);pendingTasks=P(sd);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ke.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ke.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),r0=(()=>{class e{appRef=P(sr);taskService=P(sd);ngZone=P(Ke);zonelessEnabled=P(od);tracing=P(zs,{optional:!0});disableScheduling=P(Ab,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Bt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Hu):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(P(rg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof $u||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?QE:Mb;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Hu+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,QE(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function i0(){return qi("NgZoneless"),Hw([{provide:hi,useExisting:r0},{provide:Ke,useClass:$u},{provide:od,useValue:!0},{provide:rg,useValue:!1},[]])}function N1(){return typeof $localize<"u"&&$localize.locale||Xu}var Ng=new ve("",{providedIn:"root",factory:()=>P(Ng,Ge.Optional|Ge.SkipSelf)||N1()}),Mm=new ve(""),R1=new ve("");function mc(e){return!e.moduleRef}function A1(e){let t=mc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Ke);return n.run(()=>{mc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(mi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:o=>{r.handleError(o)}})}),mc(e)){let o=()=>t.destroy(),s=e.platformInjector.get(Mm);s.add(o),t.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>e.moduleRef.destroy(),s=e.platformInjector.get(Mm);s.add(o),e.moduleRef.onDestroy(()=>{Tu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),s.delete(o)})}return O1(r,n,()=>{let o=t.get(YC);return o.runInitializers(),o.donePromise.then(()=>{let s=t.get(Ng,Xu);if(y1(s||Xu),!t.get(R1,!0))return mc(e)?t.get(sr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(mc(e)){let a=t.get(sr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return M1(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function M1(e,t){let n=e.injector.get(sr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new Re(-403,!1);t.push(e)}function O1(e,t,n){try{let r=n();return Ig(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var xu=null;function P1(e=[],t){return bt.create({name:t,providers:[{provide:ed,useValue:"platform"},{provide:Mm,useValue:new Set([()=>xu=null])},...e]})}function k1(e=[]){if(xu)return xu;let t=P1(e);return xu=t,qO(),L1(t),t}function L1(e){let t=e.get(sg,null);zw(e,()=>{t?.forEach(n=>n())})}var jo=(()=>{class e{static __NG_ELEMENT_ID__=F1}return e})();function F1(e){return B1(Cr(),ze(),(e&16)===16)}function B1(e,t,n){if(js(e)&&!n){let r=kr(e.index,t);return new Lo(r,r)}else if(e.type&175){let r=t[wr];return new Lo(r,t)}return null}var Om=class{constructor(){}supports(e){return e instanceof Map||WC(e)}create(){return new Pm}},Pm=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(e){let t;for(t=this._mapHead;t!==null;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;t!==null;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;t!==null;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;t!==null;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;t!==null;t=t._nextRemoved)e(t)}diff(e){if(!e)e=new Map;else if(!(e instanceof Map||WC(e)))throw new Re(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(n,r)=>{if(t&&t.key===r)this._maybeAddToChanges(t,n),this._appendAfter=t,t=t._next;else{let i=this._getOrCreateRecordForKey(r,n);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let n=t;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){let n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){let r=this._records.get(e);this._maybeAddToChanges(r,t);let i=r._prev,o=r._next;return i&&(i._next=o),o&&(o._prev=i),r._next=null,r._prev=null,r}let n=new km(e);return this._records.set(e,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(n=>t(e[n],n))}},km=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(e){this.key=e}};function Dw(){return new Rg([new Om])}var Rg=(()=>{class e{static \u0275prov=ie({token:e,providedIn:"root",factory:Dw});factories;constructor(n){this.factories=n}static create(n,r){if(r){let i=r.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||Dw()),deps:[[e,new NN,new Um]]}}find(n){let r=this.factories.find(i=>i.supports(n));if(r)return r;throw new Re(901,!1)}}return e})();function o0(e){pt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=k1(r),o=[D1({}),{provide:hi,useExisting:r0},...n||[]],s=new qu({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1});return A1({r3Injector:s.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{pt(9)}}function Ag(e){let t=Ve(null);try{return e()}finally{Ve(t)}}var Tw=class{[li];constructor(e){this[li]=e}destroy(){this[li].destroy()}};function md(e,t){let n=Ao(e),r=t.elementInjector||td();return new Ac(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var V1={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function U1(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function j1(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Mg;function H1(e,t){if(!Mg){let n=Element.prototype;Mg=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Mg.call(e,t):!1}function $1(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[U1(r)]=[n,i]}),t}function W1(e,t){return t.get(Gi).resolveComponentFactory(e).inputs}function G1(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let a=n[o],l=z1(a,t,i);l!==-1&&r[l].push(a)}return r}function z1(e,t,n){let r=n;return j1(e)&&t.some((i,o)=>i!=="*"&&H1(e,i)?(r=o,!0):!1),r}var q1=10,Og=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(Gi).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new Pg(this.componentFactory,e,this.inputMap)}},Pg=class{componentFactory;injector;inputMap;eventEmitters=new bo(1);events=this.eventEmitters.pipe(yu(e=>hc(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,n){this.componentFactory=e,this.injector=t,this.inputMap=n,this.ngZone=this.injector.get(Ke),this.appRef=this.injector.get(sr),this.cdScheduler=t.get(hi),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=V1.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},q1))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=bt.create({providers:[],parent:this.injector}),n=G1(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=e.instance[n];return new dt(o=>{let s=i.subscribe(a=>o.next({name:r,value:a}));return()=>s.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},kg=class extends HTMLElement{ngElementEventsSubscription=null};function s0(e,t){let n=W1(e,t.injector),r=t.strategyFactory||new Og(e,t.injector),i=$1(n);class o extends kg{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let d=this[l];delete this[l],a.setInputValue(l,d,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,d){let[h,f]=i[a];this.ngElementStrategy.setInputValue(h,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(l){this.ngElementStrategy.setInputValue(s,l,a)},configurable:!0,enumerable:!0})}),o}var l0=null;function Zs(){return l0}function u0(e){l0??=e}var gd=class{},ct=new ve(""),d0=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:()=>P(K1),providedIn:"platform"})}return e})(),K1=(()=>{class e extends d0{_location;_history;_doc=P(ct);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Zs().getBaseHref(this._doc)}onPopState(n){let r=Zs().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Zs().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function f0(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function a0(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function Ho(e){return e&&e[0]!=="?"?`?${e}`:e}var Bg=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:()=>P(X1),providedIn:"root"})}return e})(),Z1=new ve(""),X1=(()=>{class e extends Bg{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??P(ct).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return f0(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+Ho(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,o){let s=this.prepareExternalUrl(i+Ho(o));this._platformLocation.pushState(n,r,s)}replaceState(n,r,i,o){let s=this.prepareExternalUrl(i+Ho(o));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||e)(Ze(d0),Ze(Z1,8))};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Vg=(()=>{class e{_subject=new Ne;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=eP(a0(c0(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+Ho(r))}normalize(n){return e.stripTrailingSlash(Q1(this._basePath,c0(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Ho(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Ho(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=Ho;static joinWithSlash=f0;static stripTrailingSlash=a0;static \u0275fac=function(n){return new(n||e)(Ze(Bg))};static \u0275prov=ie({token:e,factory:()=>J1(),providedIn:"root"})}return e})();function J1(){return new Vg(Ze(Bg))}function Q1(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function c0(e){return e.replace(/\/index.html$/,"")}function eP(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function p0(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}var h0=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(n,r,i){this._ngEl=n,this._differs=r,this._renderer=i}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,r){let[i,o]=n.split("."),s=i.indexOf("-")===-1?void 0:Fr.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,o?`${r}${o}`:r,s):this._renderer.removeStyle(this._ngEl.nativeElement,i,s)}_applyChanges(n){n.forEachRemovedItem(r=>this._setStyle(r.key,null)),n.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),n.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(n){return new(n||e)(Yt(qt),Yt(Rg),Yt(qs))};static \u0275dir=Xi({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),Ug="browser",tP="server";function m0(e){return e===Ug}function jg(e){return e===tP}var yd=class{},$g=class extends gd{supportsDOMEvents=!0},Wg=class L0 extends $g{static makeCurrent(){u0(new L0)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=nP();return n==null?null:rP(n)}resetBaseElement(){Hc=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return p0(document.cookie,t)}},Hc=null;function nP(){return Hc=Hc||document.querySelector("base"),Hc?Hc.getAttribute("href"):null}function rP(e){return new URL(e,document.baseURI).pathname}var iP=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),Gg=new ve(""),w0=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,o){return this._findPluginFor(r).addEventListener(n,r,i,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new Re(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Ze(Gg),Ze(Ke))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),_d=class{_doc;constructor(e){this._doc=e}manager},vd="ng-app-id";function g0(e){for(let t of e)t.remove()}function y0(e,t){let n=t.createElement("style");return n.textContent=e,n}function oP(e,t,n,r){let i=e.head?.querySelectorAll(`style[${vd}="${t}"],link[${vd}="${t}"]`);if(i)for(let o of i)o.removeAttribute(vd),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&n.set(o.textContent,{usage:0,elements:[o]})}function zg(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var b0=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=jg(o),oP(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,y0);r?.forEach(i=>this.addUsage(i,this.external,zg))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let o=r.get(n);o?o.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(g0(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])g0(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,y0(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,zg(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(vd,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Ze(ct),Ze(Vc),Ze(ag,8),Ze(Bo))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),Hg={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Yg=/%COMP%/g,C0="%COMP%",sP=`_nghost-${C0}`,aP=`_ngcontent-${C0}`,cP=!0,lP=new ve("",{providedIn:"root",factory:()=>cP});function uP(e){return aP.replace(Yg,e)}function dP(e){return sP.replace(Yg,e)}function S0(e,t){return t.map(n=>n.replace(Yg,e))}var v0=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,o,s,a,l,c=null,d=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=d,this.platformIsServer=jg(a),this.defaultRenderer=new $c(n,s,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Lr.ShadowDom&&(r=ne(w({},r),{encapsulation:Lr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Ed?i.applyToHost(n):i instanceof Wc&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,h=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Lr.Emulated:o=new Ed(l,c,r,this.appId,d,s,a,h,f);break;case Lr.ShadowDom:return new qg(l,c,n,r,s,a,this.nonce,h,f);default:o=new Wc(l,c,r,d,s,a,h,f);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(Ze(w0),Ze(b0),Ze(Vc),Ze(lP),Ze(ct),Ze(Bo),Ze(Ke),Ze(ag),Ze(zs,8))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),$c=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Hg[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(_0(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(_0(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Re(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let i=Hg[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Hg[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Fr.DashCase|Fr.Important)?e.style.setProperty(t,n,r&Fr.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Fr.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=Zs().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function _0(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var qg=class extends $c{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,o,s,a,l){super(e,i,o,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=r.styles;c=S0(r.id,c);for(let h of c){let f=document.createElement("style");s&&f.setAttribute("nonce",s),f.textContent=h,this.shadowRoot.appendChild(f)}let d=r.getExternalStyles?.();if(d)for(let h of d){let f=zg(h,i);s&&f.setAttribute("nonce",s),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Wc=class extends $c{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,o,s,a,l){super(e,i,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?S0(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Ed=class extends Wc{contentAttr;hostAttr;constructor(e,t,n,r,i,o,s,a,l){let c=r+"-"+n.id;super(e,t,n,i,o,s,a,l,c),this.contentAttr=uP(c),this.hostAttr=dP(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},fP=(()=>{class e extends _d{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,o){return n.addEventListener(r,i,o),()=>this.removeEventListener(n,r,i,o)}removeEventListener(n,r,i,o){return n.removeEventListener(r,i,o)}static \u0275fac=function(n){return new(n||e)(Ze(ct))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),E0=["alt","control","meta","shift"],pP={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},hP={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},mP=(()=>{class e extends _d{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Zs().onAndCancel(n,s.domEventName,a,o))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),E0.forEach(c=>{let d=r.indexOf(c);d>-1&&(r.splice(d,1),s+=c+".")}),s+=o,r.length!=0||o.length===0)return null;let l={};return l.domEventName=i,l.fullKey=s,l}static matchEventFullKeyCode(n,r){let i=pP[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),E0.forEach(s=>{if(s!==i){let a=hP[s];a(n)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{e.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(Ze(ct))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})();function I0(e){return o0(gP(e))}function gP(e){return{appProviders:[...wP,...e?.providers??[]],platformProviders:EP}}function yP(){Wg.makeCurrent()}function vP(){return new mi}function _P(){return Ub(document),document}var EP=[{provide:Bo,useValue:Ug},{provide:sg,useValue:yP,multi:!0},{provide:ct,useFactory:_P,deps:[]}],wP=[{provide:ed,useValue:"root"},{provide:mi,useFactory:vP,deps:[]},{provide:Gg,useClass:fP,multi:!0,deps:[ct]},{provide:Gg,useClass:mP,multi:!0,deps:[ct]},v0,b0,w0,{provide:An,useExisting:v0},{provide:yd,useClass:iP,deps:[]},[]],Kg=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Ze(bP),r},providedIn:"root"})}return e})(),bP=(()=>{class e extends Kg{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case jr.NONE:return r;case jr.HTML:return Ki(r,"HTML")?Ur(r):ug(this._doc,String(r)).toString();case jr.STYLE:return Ki(r,"Style")?Ur(r):r;case jr.SCRIPT:if(Ki(r,"Script"))return Ur(r);throw new Re(5200,!1);case jr.URL:return Ki(r,"URL")?Ur(r):cd(String(r));case jr.RESOURCE_URL:if(Ki(r,"ResourceURL"))return Ur(r);throw new Re(5201,!1);default:throw new Re(5202,!1)}}bypassSecurityTrustHtml(n){return Zb(n)}bypassSecurityTrustStyle(n){return Xb(n)}bypassSecurityTrustScript(n){return Jb(n)}bypassSecurityTrustUrl(n){return Qb(n)}bypassSecurityTrustResourceUrl(n){return eC(n)}static \u0275fac=function(n){return new(n||e)(Ze(ct))};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Dn={apiURL:"http://localhost:3003",debug:!0,mode:"local",styleURL:"http://localhost:8002/styles.css",widgetURL:"http://localhost:8002/main.js"},qn=Pe($o()),T0="9.5.2",k=class yp{static SDK_VERSION=T0;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static CTA_EVENT="letscooee:outbound:cta";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static 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"}];static{let t=yp.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");yp.SDK_VERSION_CODE=parseInt(t,10)}},S=class{static log(...e){qn.default.info(...e)}static debug(...e){qn.default.debug(...e)}static error(...e){qn.default.error(...e)}static warn(...e){qn.default.warn(...e)}static info(...e){qn.default.info(...e)}static trace(...e){qn.default.trace(...e)}static configure(e=k.LOG_PREFIX){qn.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?qn.default.setLevel(qn.default[localStorage.cooeeLogLevel]):qn.default.setLevel(Dn.debug?qn.default.TRACE:qn.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
8
8
  display: inline-block;
9
9
  font-size: 14px;
10
10
  background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
11
11
  color: white;
12
12
  padding: 4px;
13
13
  border-radius: 4px;
14
- `,n=`
15
- `;n+=`\u{1F4E3} Drive higher conversions with AI-powered onsite engagement
16
- `,n+=`\u{1F50D} Track real-time visitor intent & optimize engagement
17
- `,n+=`\u{1F4CA} Improve Meta Ads ROAS with intent-driven campaigns
18
- `,n+=`\u{1F6CD}\uFE0F Boost purchases & repeat sales effortlessly
19
- `,n+=`
14
+ `,t=`
15
+ `;t+=`\u{1F4E3} Drive higher conversions with AI-powered onsite engagement
16
+ `,t+=`\u{1F50D} Track real-time visitor intent & optimize engagement
17
+ `,t+=`\u{1F4CA} Improve Meta Ads ROAS with intent-driven campaigns
18
+ `,t+=`\u{1F6CD}\uFE0F Boost purchases & repeat sales effortlessly
19
+ `,t+=`
20
20
 
21
- `,n+=`Learn more: https://www.letscooee.com
22
- Cooee SDK: v${k.SDK_VERSION}`,console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",e),console.log(`%c${n}`,"font-size: 13px; line-height: 1.8;"),console.groupEnd()}};var x0={providers:[i0()]};var ff=Pe(Yn());var Dt=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 bd=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("."),a=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),c=s[1]?i+s[1]:"";return a+c}};var ln=class{id;mID;vID;vName;imageURL;name;link;quantity;price;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}};var Ae=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;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 ln(e)}};var TI=Pe(ea());var Xg=Pe(sS());function ta(t){return Xg.default.createInstance({name:"lc",storeName:t,driver:Xg.default.LOCALSTORAGE})}var ro=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 vt=class extends ro{static storeName="usr";static{this.storage=ta(this.storeName)}};var Ce=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"};var un=class extends ro{static storeName="ses";static{this.storage=ta(this.storeName)}};var aS=Object.prototype.toString;function Wo(t){switch(aS.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return $r(t,Error)}}function na(t,e){return aS.call(t)===`[object ${e}]`}function Sd(t){return na(t,"ErrorEvent")}function Id(t){return na(t,"DOMError")}function Jg(t){return na(t,"DOMException")}function Mn(t){return na(t,"String")}function ra(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Go(t){return t===null||ra(t)||typeof t!="object"&&typeof t!="function"}function Tr(t){return na(t,"Object")}function zo(t){return typeof Event<"u"&&$r(t,Event)}function Qg(t){return typeof Element<"u"&&$r(t,Element)}function ey(t){return na(t,"RegExp")}function Ii(t){return!!(t&&t.then&&typeof t.then=="function")}function ty(t){return Tr(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function $r(t,e){try{return t instanceof e}catch{return!1}}function Gc(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function Wr(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Dd(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{Gc(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function cS(t,e,n=!1){return Mn(t)?ey(e)?e.test(t):Mn(e)?n?t===e:t.includes(e):!1:!1}function ia(t,e=[],n=!1){return e.some(r=>cS(t,r,n))}function ry(t,e,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!$r(s.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=DP(ny(t,e,i,s.originalException,r,o.exception.values,a,0),n))}function ny(t,e,n,r,i,o,s,a){if(o.length>=n+1)return o;let c=[...o];if($r(r[i],Error)){lS(s,a);let l=t(e,r[i]),u=c.length;uS(l,i,u,a),c=ny(t,e,n,r[i],i,[l,...c],l,u)}return Array.isArray(r.errors)&&r.errors.forEach((l,u)=>{if($r(l,Error)){lS(s,a);let d=t(e,l),m=c.length;uS(d,`errors[${u}]`,m,a),c=ny(t,e,n,l,i,[d,...c],d,m)}}),c}function lS(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=ne(w(w({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function uS(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=ne(w({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function DP(t,e){return t.map(n=>(n.value&&(n.value=Wr(n.value,e)),n))}var cr="8.18.0";var ge=globalThis;function oa(t,e,n){let r=n||ge,i=r.__SENTRY__=r.__SENTRY__||{},o=i[cr]=i[cr]||{};return o[t]||(o[t]=e())}var iy=ge,TP=80;function zc(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],o=0,s=0,a=" > ",c=a.length,l,u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||TP;for(;n&&o++<r&&(l=xP(n,u),!(l==="html"||o>1&&s+i.length*c+l.length>=d));)i.push(l),s+=l.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function xP(t,e){let n=t,r=[];if(!n||!n.tagName)return"";if(iy.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=e&&e.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Mn(s)){let a=s.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function oy(){try{return iy.document.location.href}catch{return""}}function sy(t){if(!iy.HTMLElement)return null;let e=t,n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}var Gr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var NP="Sentry Logger ",qc=["debug","info","warn","error","log","assert","trace"],sa={};function aa(t){if(!("console"in ge))return t();let e=ge.console,n={},r=Object.keys(sa);r.forEach(i=>{let o=sa[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function RP(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Gr?qc.forEach(n=>{e[n]=(...r)=>{t&&aa(()=>{ge.console[n](`${NP}[${n}]:`,...r)})}}):qc.forEach(n=>{e[n]=()=>{}}),e}var oe=RP();var AP=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function MP(t){return t==="http"||t==="https"}function zr(t,e=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function dS(t){let e=AP.exec(t);if(!e){aa(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",a=""]=e.slice(1),c="",l=a,u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){let d=l.match(/^\d+/);d&&(l=d[0])}return fS({host:o,pass:i,path:c,projectId:l,port:s,protocol:n,publicKey:r})}function fS(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function OP(t){if(!Gr)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(oe.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?MP(r)?e&&isNaN(parseInt(e,10))?(oe.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(oe.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(oe.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Td(t){let e=typeof t=="string"?dS(t):fS(t);if(!(!e||!OP(e)))return e}var Tn=class extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}};function xt(t,e,n){if(!(e in t))return;let r=t[e],i=n(r);typeof i=="function"&&xd(i,r),t[e]=i}function On(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Gr&&oe.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function xd(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,On(t,"__sentry_original__",e)}catch{}}function qo(t){return t.__sentry_original__}function cy(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Nd(t){if(Wo(t))return w({message:t.message,name:t.name,stack:t.stack},hS(t));if(zo(t)){let e=w({type:t.type,target:pS(t.target),currentTarget:pS(t.currentTarget)},hS(t));return typeof CustomEvent<"u"&&$r(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function pS(t){try{return Qg(t)?zc(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function hS(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function ly(t,e=40){let n=Object.keys(Nd(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return Wr(r,e);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>e))return i===n.length?o:Wr(o,e)}return""}function tn(t){return ay(t,new Map)}function ay(t,e){if(PP(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let i of Object.keys(t))typeof t[i]<"u"&&(r[i]=ay(t[i],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(i=>{r.push(ay(i,e))}),r}return t}function PP(t){if(!Tr(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var qr="?",mS=/\(error: (.*)\)/,gS=/captureMessage|captureException/;function dy(...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(`
23
- `);for(let a=r;a<s.length;a++){let c=s[a];if(c.length>1024)continue;let l=mS.test(c)?c.replace(mS,"$1"):c;if(!l.match(/\S*Error: /)){for(let u of e){let d=u(l);if(d){o.push(d);break}}if(o.length>=50+i)break}}return yS(o.slice(i))}}function yS(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(Rd(e).function||"")&&e.pop(),e.reverse(),gS.test(Rd(e).function||"")&&(e.pop(),gS.test(Rd(e).function||"")&&e.pop()),e.slice(0,50).map(n=>ne(w({},n),{filename:n.filename||Rd(e).filename,function:n.function||qr}))}function Rd(t){return t[t.length-1]||{}}var uy="<anonymous>";function lr(t){try{return!t||typeof t!="function"?uy:t.name||uy}catch{return uy}}function Ad(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 Md={},vS={};function Pn(t,e){Md[t]=Md[t]||[],Md[t].push(e)}function kn(t,e){vS[t]||(e(),vS[t]=!0)}function nn(t,e){let n=t&&Md[t];if(n)for(let r of n)try{r(e)}catch(i){Gr&&oe.error(`Error while triggering instrumentation handler.
24
- Type: ${t}
21
+ `,t+=`Learn more: https://www.letscooee.com
22
+ Cooee SDK: v${k.SDK_VERSION}`,console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",e),console.log(`%c${t}`,"font-size: 13px; line-height: 1.8;"),console.groupEnd()}},x0={providers:[i0()]},ff=Pe(Yn()),Dt=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}},bd=class{static format(e,t){let n=/{{\s*(\w+)\s*}}/;return t.replace(n,(r,i)=>{switch(i){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 r}})}static formatWithDelimiters(e,t=2,n=",",r="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),o=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),s=i[1]?r+i[1]:"";return o+s}},ln=class{id;mID;vID;vName;imageURL;name;link;quantity;price;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}},Ae=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;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 ln(e)}},TI=Pe(ea()),Xg=Pe(sS());function ta(e){return Xg.default.createInstance({name:"lc",storeName:e,driver:Xg.default.LOCALSTORAGE})}var ro=class{static storage;static async get(e,t){return await this.storage?.getItem(e)??t}static set(e,t){return this.storage?.setItem(e,t)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},vt=class extends ro{static storeName="usr";static{this.storage=ta(this.storeName)}},Ce=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"},un=class extends ro{static storeName="ses";static{this.storage=ta(this.storeName)}},aS=Object.prototype.toString;function Wo(e){switch(aS.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return $r(e,Error)}}function na(e,t){return aS.call(e)===`[object ${t}]`}function Sd(e){return na(e,"ErrorEvent")}function Id(e){return na(e,"DOMError")}function Jg(e){return na(e,"DOMException")}function Mn(e){return na(e,"String")}function ra(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Go(e){return e===null||ra(e)||typeof e!="object"&&typeof e!="function"}function Tr(e){return na(e,"Object")}function zo(e){return typeof Event<"u"&&$r(e,Event)}function Qg(e){return typeof Element<"u"&&$r(e,Element)}function ey(e){return na(e,"RegExp")}function Ii(e){return!!(e&&e.then&&typeof e.then=="function")}function ty(e){return Tr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function $r(e,t){try{return e instanceof t}catch{return!1}}function Gc(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Wr(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Dd(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{Gc(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function cS(e,t,n=!1){return Mn(e)?ey(t)?t.test(e):Mn(t)?n?e===t:e.includes(t):!1:!1}function ia(e,t=[],n=!1){return t.some(r=>cS(e,r,n))}function ry(e,t,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!$r(s.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=DP(ny(e,t,i,s.originalException,r,o.exception.values,a,0),n))}function ny(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let l=[...o];if($r(r[i],Error)){lS(s,a);let c=e(t,r[i]),d=l.length;uS(c,i,d,a),l=ny(e,t,n,r[i],i,[c,...l],c,d)}return Array.isArray(r.errors)&&r.errors.forEach((c,d)=>{if($r(c,Error)){lS(s,a);let h=e(t,c),f=l.length;uS(h,`errors[${d}]`,f,a),l=ny(e,t,n,c,i,[h,...l],h,f)}}),l}function lS(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=ne(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function uS(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=ne(w({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function DP(e,t){return e.map(n=>(n.value&&(n.value=Wr(n.value,t)),n))}var cr="8.18.0",ge=globalThis;function oa(e,t,n){let r=n||ge,i=r.__SENTRY__=r.__SENTRY__||{},o=i[cr]=i[cr]||{};return o[e]||(o[e]=t())}var iy=ge,TP=80;function zc(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,i=[],o=0,s=0,a=" > ",l=a.length,c,d=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||TP;for(;n&&o++<r&&(c=xP(n,d),!(c==="html"||o>1&&s+i.length*l+c.length>=h));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function xP(e,t){let n=e,r=[];if(!n||!n.tagName)return"";if(iy.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t&&t.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Mn(s)){let a=s.split(/\s+/);for(let l of a)r.push(`.${l}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function oy(){try{return iy.document.location.href}catch{return""}}function sy(e){if(!iy.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}var Gr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,NP="Sentry Logger ",qc=["debug","info","warn","error","log","assert","trace"],sa={};function aa(e){if(!("console"in ge))return e();let t=ge.console,n={},r=Object.keys(sa);r.forEach(i=>{let o=sa[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function RP(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Gr?qc.forEach(n=>{t[n]=(...r)=>{e&&aa(()=>{ge.console[n](`${NP}[${n}]:`,...r)})}}):qc.forEach(n=>{t[n]=()=>{}}),t}var oe=RP(),AP=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function MP(e){return e==="http"||e==="https"}function zr(e,t=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function dS(e){let t=AP.exec(e);if(!t){aa(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",o="",s="",a=""]=t.slice(1),l="",c=a,d=c.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),c=d.pop()),c){let h=c.match(/^\d+/);h&&(c=h[0])}return fS({host:o,pass:i,path:l,projectId:c,port:s,protocol:n,publicKey:r})}function fS(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function OP(e){if(!Gr)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(oe.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?MP(r)?t&&isNaN(parseInt(t,10))?(oe.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(oe.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(oe.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Td(e){let t=typeof e=="string"?dS(e):fS(e);if(!(!t||!OP(t)))return t}var Tn=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function xt(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i=="function"&&xd(i,r),e[t]=i}function On(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Gr&&oe.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function xd(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,On(e,"__sentry_original__",t)}catch{}}function qo(e){return e.__sentry_original__}function cy(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Nd(e){if(Wo(e))return w({message:e.message,name:e.name,stack:e.stack},hS(e));if(zo(e)){let t=w({type:e.type,target:pS(e.target),currentTarget:pS(e.currentTarget)},hS(e));return typeof CustomEvent<"u"&&$r(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function pS(e){try{return Qg(e)?zc(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function hS(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function ly(e,t=40){let n=Object.keys(Nd(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Wr(r,t);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>t))return i===n.length?o:Wr(o,t)}return""}function tn(e){return ay(e,new Map)}function ay(e,t){if(PP(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let i of Object.keys(e))typeof e[i]<"u"&&(r[i]=ay(e[i],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(i=>{r.push(ay(i,t))}),r}return e}function PP(e){if(!Tr(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var qr="?",mS=/\(error: (.*)\)/,gS=/captureMessage|captureException/;function dy(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
23
+ `);for(let a=r;a<s.length;a++){let l=s[a];if(l.length>1024)continue;let c=mS.test(l)?l.replace(mS,"$1"):l;if(!c.match(/\S*Error: /)){for(let d of t){let h=d(c);if(h){o.push(h);break}}if(o.length>=50+i)break}}return yS(o.slice(i))}}function yS(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Rd(t).function||"")&&t.pop(),t.reverse(),gS.test(Rd(t).function||"")&&(t.pop(),gS.test(Rd(t).function||"")&&t.pop()),t.slice(0,50).map(n=>ne(w({},n),{filename:n.filename||Rd(t).filename,function:n.function||qr}))}function Rd(e){return e[e.length-1]||{}}var uy="<anonymous>";function lr(e){try{return!e||typeof e!="function"?uy:e.name||uy}catch{return uy}}function Ad(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var Md={},vS={};function Pn(e,t){Md[e]=Md[e]||[],Md[e].push(t)}function kn(e,t){vS[e]||(t(),vS[e]=!0)}function nn(e,t){let n=e&&Md[e];if(n)for(let r of n)try{r(t)}catch(i){Gr&&oe.error(`Error while triggering instrumentation handler.
24
+ Type: ${e}
25
25
  Name: ${lr(r)}
26
- Error:`,i)}}function fy(t){let e="console";Pn(e,t),kn(e,kP)}function kP(){"console"in ge&&qc.forEach(function(t){t in ge.console&&xt(ge.console,t,function(e){return sa[t]=e,function(...n){nn("console",{args:n,level:t});let i=sa[t];i&&i.apply(ge.console,n)}})})}var py=ge;function _S(){if(!("fetch"in py))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Yc(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function hy(){if(typeof EdgeRuntime=="string")return!0;if(!_S())return!1;if(Yc(py.fetch))return!0;let t=!1,e=py.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=Yc(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Gr&&oe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}var ES=1e3;function Yr(){return Date.now()/ES}function LP(){let{performance:t}=ge;if(!t||!t.now)return Yr;let e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/ES}var Kn=LP(),Kc,FP=(()=>{let{performance:t}=ge;if(!t||!t.now){Kc="none";return}let e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=i<e,s=t.timing&&t.timing.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):e,l=c<e;return o||l?i<=c?(Kc="timeOrigin",t.timeOrigin):(Kc="navigationStart",s):(Kc="dateNow",r)})();function gy(t){let e="fetch";Pn(e,t),kn(e,BP)}function BP(){hy()&&xt(ge,"fetch",function(t){return function(...e){let{method:n,url:r}=VP(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Kn()*1e3};nn("fetch",w({},i));let o=new Error().stack;return t.apply(ge,e).then(s=>{let a=ne(w({},i),{endTimestamp:Kn()*1e3,response:s});return nn("fetch",a),s},s=>{let a=ne(w({},i),{endTimestamp:Kn()*1e3,error:s});throw nn("fetch",a),Wo(s)&&s.stack===void 0&&(s.stack=o,On(s,"framesToPop",1)),s})}})}function my(t,e){return!!t&&typeof t=="object"&&!!t[e]}function wS(t){return typeof t=="string"?t:t?my(t,"url")?t.url:t.toString?t.toString():"":""}function VP(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:wS(n),method:my(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:wS(e),method:my(e,"method")?String(e.method).toUpperCase():"GET"}}var Od=null;function yy(t){let e="error";Pn(e,t),kn(e,UP)}function UP(){Od=ge.onerror,ge.onerror=function(t,e,n,r,i){return nn("error",{column:r,error:i,line:n,msg:t,url:e}),Od&&!Od.__SENTRY_LOADER__?Od.apply(this,arguments):!1},ge.onerror.__SENTRY_INSTRUMENTED__=!0}var Pd=null;function vy(t){let e="unhandledrejection";Pn(e,t),kn(e,jP)}function jP(){Pd=ge.onunhandledrejection,ge.onunhandledrejection=function(t){return nn("unhandledrejection",t),Pd&&!Pd.__SENTRY_LOADER__?Pd.apply(this,arguments):!0},ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function _y(){return"npm"}function bS(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let o=0;o<e.length;o++)if(e[o]===i)return!0;return e.push(i),!1}function r(i){if(t)e.delete(i);else for(let o=0;o<e.length;o++)if(e[o]===i){e.splice(o,1);break}}return[n,r]}function dn(){let t=ge,e=t.crypto||t.msCrypto,n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function CS(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function xr(t){let{message:e,event_id:n}=t;if(e)return e;let r=CS(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ca(t,e,n){let r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function Di(t,e){let n=CS(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=w(w(w({},r),i),e),e&&"data"in e){let o=w(w({},i&&i.data),e.data);n.mechanism.data=o}}function kd(t){if(t&&t.__sentry_captured__)return!0;try{On(t,"__sentry_captured__",!0)}catch{}return!1}function Ld(t){return Array.isArray(t)?t:[t]}function Nr(t,e=100,n=1/0){try{return Ey("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Fd(t,e=3,n=100*1024){let r=Nr(t,e);return GP(r)>n?Fd(t,e-1,n):r}function Ey(t,e,n=1/0,r=1/0,i=bS()){let[o,s]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;let a=HP(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;let c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(e))return"[Circular ~]";let l=e;if(l&&typeof l.toJSON=="function")try{let h=l.toJSON();return Ey("",h,c-1,r,i)}catch{}let u=Array.isArray(e)?[]:{},d=0,m=Nd(e);for(let h in m){if(!Object.prototype.hasOwnProperty.call(m,h))continue;if(d>=r){u[h]="[MaxProperties ~]";break}let v=m[h];u[h]=Ey(h,v,c-1,r,i),d++}return s(e),u}function HP(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(Gc(e))return"[VueViewModel]";if(ty(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${lr(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=$P(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function $P(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function WP(t){return~-encodeURI(t).split(/%..|./).length}function GP(t){return WP(JSON.stringify(t))}var Ti;(function(t){t[t.PENDING=0]="PENDING";let n=1;t[t.RESOLVED=n]="RESOLVED";let r=2;t[t.REJECTED=r]="REJECTED"})(Ti||(Ti={}));function ur(t){return new Rr(e=>{e(t)})}function io(t){return new Rr((e,n)=>{n(t)})}var Rr=class t{constructor(e){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),this._state=Ti.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,i)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,e&&e()},s=>{o=!0,i=s,e&&e()}).then(()=>{if(o){r(i);return}n(i)})})}__init(){this._resolve=e=>{this._setResult(Ti.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Ti.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===Ti.PENDING){if(Ii(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ti.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Ti.RESOLVED&&n[1](this._value),this._state===Ti.REJECTED&&n[2](this._value),n[0]=!0)})}}};function wy(t){let e=[];function n(){return t===void 0||e.length<t}function r(s){return e.splice(e.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return io(new Tn("Not adding Promise because buffer limit was reached."));let a=s();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new Rr((a,c)=>{let l=e.length;if(!l)return a(!0);let u=setTimeout(()=>{s&&s>0&&a(!1)},s);e.forEach(d=>{ur(d).then(()=>{--l||(clearTimeout(u),a(!0))},c)})})}return{$:e,add:i,drain:o}}function Zc(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}}var SS=["fatal","error","warning","log","info","debug"];function by(t){return t==="warn"?"warning":SS.includes(t)?t:"log"}var DS="sentry-",TS=/^sentry-/;function Cy(t){let e=xS(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(TS)){let s=i.slice(DS.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function xS(t){if(!(!t||!Mn(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=IS(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):IS(t)}function IS(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Kr(t,e=[]){return[t,e]}function Iy(t,e){let[n,r]=t;return[n,[...r,e]]}function Bd(t,e){let n=t[1];for(let r of n){let i=r[0].type;if(e(r,i))return!0}return!1}function Sy(t){return ge.__SENTRY__&&ge.__SENTRY__.encodePolyfill?ge.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function Dy(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Sy(r),o]:r.push(typeof o=="string"?Sy(o):o)}for(let o of n){let[s,a]=o;if(i(`
26
+ Error:`,i)}}function fy(e){let t="console";Pn(t,e),kn(t,kP)}function kP(){"console"in ge&&qc.forEach(function(e){e in ge.console&&xt(ge.console,e,function(t){return sa[e]=t,function(...n){nn("console",{args:n,level:e});let r=sa[e];r&&r.apply(ge.console,n)}})})}var py=ge;function _S(){if(!("fetch"in py))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Yc(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function hy(){if(typeof EdgeRuntime=="string")return!0;if(!_S())return!1;if(Yc(py.fetch))return!0;let e=!1,t=py.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Yc(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Gr&&oe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var ES=1e3;function Yr(){return Date.now()/ES}function LP(){let{performance:e}=ge;if(!e||!e.now)return Yr;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/ES}var Kn=LP(),Kc,FP=(()=>{let{performance:e}=ge;if(!e||!e.now){Kc="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=e.timing&&e.timing.navigationStart,a=typeof s=="number"?Math.abs(s+n-r):t,l=a<t;return o||l?i<=a?(Kc="timeOrigin",e.timeOrigin):(Kc="navigationStart",s):(Kc="dateNow",r)})();function gy(e){let t="fetch";Pn(t,e),kn(t,BP)}function BP(){hy()&&xt(ge,"fetch",function(e){return function(...t){let{method:n,url:r}=VP(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Kn()*1e3};nn("fetch",w({},i));let o=new Error().stack;return e.apply(ge,t).then(s=>{let a=ne(w({},i),{endTimestamp:Kn()*1e3,response:s});return nn("fetch",a),s},s=>{let a=ne(w({},i),{endTimestamp:Kn()*1e3,error:s});throw nn("fetch",a),Wo(s)&&s.stack===void 0&&(s.stack=o,On(s,"framesToPop",1)),s})}})}function my(e,t){return!!e&&typeof e=="object"&&!!e[t]}function wS(e){return typeof e=="string"?e:e?my(e,"url")?e.url:e.toString?e.toString():"":""}function VP(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:wS(n),method:my(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:wS(t),method:my(t,"method")?String(t.method).toUpperCase():"GET"}}var Od=null;function yy(e){let t="error";Pn(t,e),kn(t,UP)}function UP(){Od=ge.onerror,ge.onerror=function(e,t,n,r,i){return nn("error",{column:r,error:i,line:n,msg:e,url:t}),Od&&!Od.__SENTRY_LOADER__?Od.apply(this,arguments):!1},ge.onerror.__SENTRY_INSTRUMENTED__=!0}var Pd=null;function vy(e){let t="unhandledrejection";Pn(t,e),kn(t,jP)}function jP(){Pd=ge.onunhandledrejection,ge.onunhandledrejection=function(e){return nn("unhandledrejection",e),Pd&&!Pd.__SENTRY_LOADER__?Pd.apply(this,arguments):!0},ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function _y(){return"npm"}function bS(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let o=0;o<t.length;o++)if(t[o]===i)return!0;return t.push(i),!1}function r(i){if(e)t.delete(i);else for(let o=0;o<t.length;o++)if(t[o]===i){t.splice(o,1);break}}return[n,r]}function dn(){let e=ge,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function CS(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function xr(e){let{message:t,event_id:n}=e;if(t)return t;let r=CS(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ca(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Di(e,t){let n=CS(e);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=w(w(w({},r),i),t),t&&"data"in t){let o=w(w({},i&&i.data),t.data);n.mechanism.data=o}}function kd(e){if(e&&e.__sentry_captured__)return!0;try{On(e,"__sentry_captured__",!0)}catch{}return!1}function Ld(e){return Array.isArray(e)?e:[e]}function Nr(e,t=100,n=1/0){try{return Ey("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Fd(e,t=3,n=100*1024){let r=Nr(e,t);return GP(r)>n?Fd(e,t-1,n):r}function Ey(e,t,n=1/0,r=1/0,i=bS()){let[o,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let a=HP(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(o(t))return"[Circular ~]";let c=t;if(c&&typeof c.toJSON=="function")try{let g=c.toJSON();return Ey("",g,l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},h=0,f=Nd(t);for(let g in f){if(!Object.prototype.hasOwnProperty.call(f,g))continue;if(h>=r){d[g]="[MaxProperties ~]";break}let m=f[g];d[g]=Ey(g,m,l-1,r,i),h++}return s(t),d}function HP(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Gc(t))return"[VueViewModel]";if(ty(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${lr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=$P(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function $P(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function WP(e){return~-encodeURI(e).split(/%..|./).length}function GP(e){return WP(JSON.stringify(e))}var Ti;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"})(Ti||(Ti={}));function ur(e){return new Rr(t=>{t(e)})}function io(e){return new Rr((t,n)=>{n(e)})}var Rr=class _s{constructor(t){_s.prototype.__init.call(this),_s.prototype.__init2.call(this),_s.prototype.__init3.call(this),_s.prototype.__init4.call(this),this._state=Ti.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new _s((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new _s((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(Ti.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ti.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Ti.PENDING){if(Ii(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ti.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ti.RESOLVED&&n[1](this._value),this._state===Ti.REJECTED&&n[2](this._value),n[0]=!0)})}}};function wy(e){let t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return io(new Tn("Not adding Promise because buffer limit was reached."));let a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new Rr((a,l)=>{let c=t.length;if(!c)return a(!0);let d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(h=>{ur(h).then(()=>{--c||(clearTimeout(d),a(!0))},l)})})}return{$:t,add:i,drain:o}}function Zc(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}var SS=["fatal","error","warning","log","info","debug"];function by(e){return e==="warn"?"warning":SS.includes(e)?e:"log"}var DS="sentry-",TS=/^sentry-/;function Cy(e){let t=xS(e);if(!t)return;let n=Object.entries(t).reduce((r,[i,o])=>{if(i.match(TS)){let s=i.slice(DS.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function xS(e){if(!(!e||!Mn(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=IS(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):IS(e)}function IS(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Kr(e,t=[]){return[e,t]}function Iy(e,t){let[n,r]=e;return[n,[...r,t]]}function Bd(e,t){let n=e[1];for(let r of n){let i=r[0].type;if(t(r,i))return!0}return!1}function Sy(e){return ge.__SENTRY__&&ge.__SENTRY__.encodePolyfill?ge.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Dy(e){let[t,n]=e,r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Sy(r),o]:r.push(typeof o=="string"?Sy(o):o)}for(let o of n){let[s,a]=o;if(i(`
27
27
  ${JSON.stringify(s)}
28
- `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Nr(a))}i(c)}}return typeof r=="string"?r:zP(r)}function zP(t){let e=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(e),r=0;for(let i of t)n.set(i,r),r+=i.length;return n}function Ty(t){let e=typeof t.data=="string"?Sy(t.data):t.data;return[tn({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var qP={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Vd(t){return qP[t]}function Ud(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function xy(t,e,n,r){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return w(w(w({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:zr(r)}),i&&{trace:tn(w({},i))})}function Ny(t,e,n){let r=[{type:"client_report"},{timestamp:n||Yr(),discarded_events:t}];return Kr(e?{dsn:e}:{},[r])}function NS(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}function RS(t,e){return t[e]||t.all||0}function Ry(t,e,n=Date.now()){return RS(t,e)>n}function Ay(t,{statusCode:e,headers:n},r=Date.now()){let i=w({},t),o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let a of o.trim().split(",")){let[c,l,,,u]=a.split(":",5),d=parseInt(c,10),m=(isNaN(d)?60:d)*1e3;if(!l)i.all=r+m;else for(let h of l.split(";"))h==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(i[h]=r+m):i[h]=r+m}else s?i.all=r+NS(s,r):e===429&&(i.all=r+60*1e3);return i}function jd(){return{traceId:dn(),spanId:dn().substring(16)}}var Hd=ge;function My(){let t=Hd.chrome,e=t&&t.app&&t.app.runtime,n="history"in Hd&&!!Hd.history.pushState&&!!Hd.history.replaceState;return!e&&n}var ft=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yo(){return Xc(ge),ge}function Xc(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||cr,e[cr]=e[cr]||{}}function Jc(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Kn(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:dn()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}var Oy="_sentrySpan";function Py(t,e){e?On(t,Oy,e):delete t[Oy]}function ky(t){return t[Oy]}var ZP=100,Ly=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=jd()}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=w({},this._tags),e._extra=w({},this._extra),e._contexts=w({},this._contexts),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=w({},this._sdkProcessingMetadata),e._propagationContext=w({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,Py(e,ky(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Jc(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=w(w({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=ne(w({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=w(w({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=ne(w({},this._extra),{[e]:n}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e=="function"?e(this):e,[r,i]=n instanceof xn?[n.getScopeData(),n.getRequestSession()]:Tr(n)?[e,e.requestSession]:[],{tags:o,extra:s,user:a,contexts:c,level:l,fingerprint:u=[],propagationContext:d}=r||{};return this._tags=w(w({},this._tags),o),this._extra=w(w({},this._extra),s),this._contexts=w(w({},this._contexts),c),a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Py(this,void 0),this._attachments=[],this._propagationContext=jd(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:ZP;if(r<=0)return this;let i=w({timestamp:Yr()},e),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ky(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=w(w({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n&&n.event_id?n.event_id:dn();if(!this._client)return oe.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,ne(w({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r&&r.event_id?r.event_id:dn();if(!this._client)return oe.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,ne(w({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n&&n.event_id?n.event_id:dn();return this._client?(this._client.captureEvent(e,ne(w({},n),{event_id:r}),this),r):(oe.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}},xn=Ly;function AS(){return oa("defaultCurrentScope",()=>new xn)}function MS(){return oa("defaultIsolationScope",()=>new xn)}var Fy=class{constructor(e,n){let r;e?r=e:r=new xn;let i;n?i=n:i=new xn,this._stack=[{scope:r}],this._isolationScope=i}withScope(e){let n=this._pushScope(),r;try{r=e(n)}catch(i){throw this._popScope(),i}return Ii(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function la(){let t=Yo(),e=Xc(t);return e.stack=e.stack||new Fy(AS(),MS())}function XP(t){return la().withScope(t)}function JP(t,e){let n=la();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function OS(t){return la().withScope(()=>t(la().getIsolationScope()))}function PS(){return{withIsolationScope:OS,withScope:XP,withSetScope:JP,withSetIsolationScope:(t,e)=>OS(e),getCurrentScope:()=>la().getScope(),getIsolationScope:()=>la().getIsolationScope()}}function $d(t){let e=Xc(t);return e.acs?e.acs:PS()}function Ko(){let t=Yo();return $d(t).getCurrentScope()}function Zo(){let t=Yo();return $d(t).getIsolationScope()}function Wd(){return oa("globalScope",()=>new xn)}function Gd(...t){let e=Yo(),n=$d(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Mt(){return Ko().getClient()}var QP="_sentryMetrics";function kS(t){let e=t[QP];if(!e)return;let n={};for(let[,[r,i]]of e)(n[r]||(n[r]=[])).push(tn(i));return n}var By="sentry.source",Vy="sentry.sample_rate",Uy="sentry.op",jy="sentry.origin";var ek=1;function BS(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=Xo(t);return tn({parent_span_id:r,span_id:e,trace_id:n})}function LS(t){return typeof t=="number"?FS(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?FS(t.getTime()):Kn()}function FS(t){return t>9999999999?t/1e3:t}function Xo(t){if(nk(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(tk(t)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:c}=t;return tn({span_id:e,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:LS(i),timestamp:LS(s)||void 0,status:rk(c),op:r[Uy],origin:r[jy],_metrics_summary:kS(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function tk(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function nk(t){return typeof t.getSpanJSON=="function"}function VS(t){let{traceFlags:e}=t.spanContext();return e===ek}function rk(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var ik="_sentryRootSpan";function Qc(t){return t[ik]||t}var zd="production";var ok="_frozenDsc";function Hy(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i=tn({environment:n.environment||zd,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",i),i}function US(t){let e=Mt();if(!e)return{};let n=Hy(Xo(t).trace_id||"",e),r=Qc(t),i=r[ok];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),a=s&&Cy(s);if(a)return a;let c=Xo(r),l=c.data||{},u=l[Vy];u!=null&&(n.sample_rate=`${u}`);let d=l[By],m=c.description;return d!=="url"&&m&&(n.transaction=m),n.sampled=String(VS(r)),e.emit("createDsc",n,r),n}function jS(t){if(typeof t=="boolean")return Number(t);let e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){ft&&oe.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function sk(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function HS(t,e,n,r){let i=Ud(n),o=w(w({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:zr(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Kr(o,[s])}function $S(t,e,n,r){let i=Ud(n),o=t.type&&t.type!=="replay_event"?t.type:"event";sk(t,n&&n.sdk);let s=xy(t,i,r,e);return delete t.sdkProcessingMetadata,Kr(s,[[{type:o},t]])}function qd(t,e,n,r=0){return new Rr((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let a=s(w({},e),n);ft&&s.id&&a===null&&oe.log(`Event processor "${s.id}" dropped event`),Ii(a)?a.then(c=>qd(t,c,n,r+1).then(i)).then(null,o):qd(t,a,n,r+1).then(i).then(null,o)}})}function WS(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;ak(t,e),r&&uk(t,r),dk(t,n),ck(t,i),lk(t,o)}function $y(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:m,transactionName:h,span:v}=e;el(t,"extra",n),el(t,"tags",r),el(t,"user",i),el(t,"contexts",o),el(t,"sdkProcessingMetadata",a),s&&(t.level=s),h&&(t.transactionName=h),v&&(t.span=v),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),l.length&&(t.fingerprint=[...t.fingerprint,...l]),u.length&&(t.eventProcessors=[...t.eventProcessors,...u]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext=w(w({},t.propagationContext),m)}function el(t,e,n){if(n&&Object.keys(n).length){t[e]=w({},t[e]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function ak(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=e,c=tn(n);c&&Object.keys(c).length&&(t.extra=w(w({},c),t.extra));let l=tn(r);l&&Object.keys(l).length&&(t.tags=w(w({},l),t.tags));let u=tn(i);u&&Object.keys(u).length&&(t.user=w(w({},u),t.user));let d=tn(o);d&&Object.keys(d).length&&(t.contexts=w(w({},d),t.contexts)),s&&(t.level=s),a&&t.type!=="transaction"&&(t.transaction=a)}function ck(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function lk(t,e){t.sdkProcessingMetadata=w(w({},t.sdkProcessingMetadata),e)}function uk(t,e){t.contexts=w({trace:BS(e)},t.contexts),t.sdkProcessingMetadata=w({dynamicSamplingContext:US(e)},t.sdkProcessingMetadata);let n=Qc(e),r=Xo(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function dk(t,e){t.fingerprint=t.fingerprint?Ld(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function zS(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=t,c=ne(w({},e),{event_id:e.event_id||n.event_id||dn(),timestamp:e.timestamp||Yr()}),l=n.integrations||t.integrations.map(M=>M.name);fk(c,t),mk(c,l),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&pk(c,t.stackParser);let u=yk(r,n.captureContext);n.mechanism&&Di(c,n.mechanism);let d=i?i.getEventProcessors():[],m=Wd().getScopeData();if(o){let M=o.getScopeData();$y(m,M)}if(u){let M=u.getScopeData();$y(m,M)}let h=[...n.attachments||[],...m.attachments];h.length&&(n.attachments=h),WS(c,m);let v=[...d,...m.eventProcessors];return qd(v,c,n).then(M=>(M&&hk(M),typeof s=="number"&&s>0?gk(M,s,a):M))}function fk(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:zd),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=Wr(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=Wr(s.value,o));let a=t.request;a&&a.url&&(a.url=Wr(a.url,o))}var GS=new WeakMap;function pk(t,e){let n=ge._sentryDebugIds;if(!n)return;let r,i=GS.get(e);i?r=i:(r=new Map,GS.set(e,r));let o=Object.entries(n).reduce((s,[a,c])=>{let l,u=r.get(a);u?l=u:(l=e(a),r.set(a,l));for(let d=l.length-1;d>=0;d--){let m=l[d];if(m.filename){s[m.filename]=c;break}}return s},{});try{t.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function hk(t){let e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.entries(e).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function mk(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function gk(t,e,n){if(!t)return null;let r=w(w(w(w(w({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>w(w({},i),i.data&&{data:Nr(i.data,e,n)}))}),t.user&&{user:Nr(t.user,e,n)}),t.contexts&&{contexts:Nr(t.contexts,e,n)}),t.extra&&{extra:Nr(t.extra,e,n)});return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Nr(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>w(w({},i),i.data&&{data:Nr(i.data,e,n)}))),r}function yk(t,e){if(!e)return t;let n=t?t.clone():new xn;return n.update(e),n}function qS(t){if(t)return vk(t)?{captureContext:t}:Ek(t)?{captureContext:t}:t}function vk(t){return t instanceof xn||typeof t=="function"}var _k=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Ek(t){return Object.keys(t).some(e=>_k.includes(e))}function Yd(t,e){return Ko().captureException(t,qS(e))}function tl(t,e){return Ko().captureEvent(t,e)}var wk="7";function bk(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Ck(t){return`${bk(t)}${t.projectId}/envelope/`}function Sk(t,e){return cy(w({sentry_key:t.publicKey,sentry_version:wk},e&&{sentry_client:`${e.name}/${e.version}`}))}function KS(t,e,n){return e||`${Ck(t)}?${Sk(t,n)}`}var ZS=[];function XS(t,e){let n={};return e.forEach(r=>{r&&Gy(t,r,n)}),n}function Wy(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Gy(t,e,n){if(n[e.name]){ft&&oe.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,ZS.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),ZS.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,o)=>r(i,o,t))}if(typeof e.processEvent=="function"){let r=e.processEvent.bind(e),i=Object.assign((o,s)=>r(o,s,t),{id:e.name});t.addEventProcessor(i)}ft&&oe.log(`Integration installed: ${e.name}`)}var JS="Not capturing exception because it's already been captured.",nl=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Td(e.dsn):ft&&oe.warn("No DSN provided, client will not send events."),this._dsn){let n=KS(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(ne(w({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=dn();if(kd(e))return ft&&oe.log(JS),i;let o=w({event_id:i},n);return this._process(this.eventFromException(e,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(e,n,r,i){let o=w({event_id:dn()},r),s=ra(e)?e:String(e),a=Go(e)?this.eventFromMessage(s,n,o):this.eventFromException(e,o);return this._process(a.then(c=>this._captureEvent(c,o,i))),o.event_id}captureEvent(e,n,r){let i=dn();if(n&&n.originalException&&kd(n.originalException))return ft&&oe.log(JS),i;let o=w({event_id:i},n),a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,a||r)),o.event_id}captureSession(e){typeof e.release!="string"?ft&&oe.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Jc(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(i=>r&&i))):ur(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];Gy(this,e,this._integrations),n||Wy(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=$S(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=Iy(r,Ty(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let n=HS(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){let i=`${e}:${n}`;ft&&oe.log(`Adding outcome: "${i}"`),this._outcomes[i]=(this._outcomes[i]||0)+1}}on(e,n){let r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{let i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(e,...n){let r=this._hooks[e];r&&r.forEach(i=>i(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(ft&&oe.error("Error while sending event:",n),n)):(ft&&oe.error("Transport disabled"),ur({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=XS(this,e),Wy(this,e)}_updateSessionFromEvent(e,n){let r=!1,i=!1,o=n.exception&&n.exception.values;if(o){i=!0;for(let c of o){let l=c.mechanism;if(l&&l.handled===!1){r=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(Jc(e,ne(w({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new Rr(n=>{let r=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,e&&r>=e&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,i=Zo()){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),zS(o,e,n,r,this,i).then(a=>{if(a===null)return a;let c=w(w({},i.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(a.contexts&&a.contexts.trace)&&c){let{traceId:u,spanId:d,parentSpanId:m,dsc:h}=c;a.contexts=w({trace:tn({trace_id:u,span_id:d,parent_span_id:m})},a.contexts);let v=h||Hy(u,this);a.sdkProcessingMetadata=w({dynamicSamplingContext:v},a.sdkProcessingMetadata)}return a})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(i=>i.event_id,i=>{if(ft){let o=i;o.logLevel==="log"?oe.log(o.message):oe.warn(o)}})}_processEvent(e,n,r){let i=this.getOptions(),{sampleRate:o}=i,s=zy(e),a=QS(e),c=e.type||"error",l=`before send for type \`${c}\``,u=typeof o>"u"?void 0:jS(o);if(a&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",e),io(new Tn(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let d=c==="replay_event"?"replay":c,h=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,h).then(v=>{if(v===null)throw this.recordDroppedEvent("event_processor",d,e),new Tn("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return v;let M=Dk(this,i,v,n);return Ik(M,l)}).then(v=>{if(v===null){if(this.recordDroppedEvent("before_send",d,e),zy(e)){let O=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+O}throw new Tn(`${l} returned \`null\`, will not send event.`,"log")}let N=r&&r.getSession();!s&&N&&this._updateSessionFromEvent(N,v);let M=v.transaction_info;if(s&&M&&v.transaction!==e.transaction){let A="custom";v.transaction_info=ne(w({},M),{source:A})}return this.sendEvent(v,n),v}).then(null,v=>{throw v instanceof Tn?v:(this.captureException(v,{data:{__sentry__:!0},originalException:v}),new Tn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
29
- Reason: ${v}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{let[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}};function Ik(t,e){let n=`${e} must return \`null\` or a valid event.`;if(Ii(t))return t.then(r=>{if(!Tr(r)&&r!==null)throw new Tn(n);return r},r=>{throw new Tn(`${e} rejected with ${r}`)});if(!Tr(t)&&t!==null)throw new Tn(n);return t}function Dk(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e;if(QS(n)&&i)return i(n,r);if(zy(n)){if(n.spans&&s){let a=[];for(let c of n.spans){let l=s(c);l?a.push(l):t.recordDroppedEvent("before_send","span")}n.spans=a}if(o)return o(n,r)}return n}function QS(t){return t.type===void 0}function zy(t){return t.type==="transaction"}var Tk=64;function Kd(t,e,n=wy(t.bufferSize||Tk)){let r={},i=s=>n.drain(s);function o(s){let a=[];if(Bd(s,(d,m)=>{let h=Vd(m);if(Ry(r,h)){let v=eI(d,m);t.recordDroppedEvent("ratelimit_backoff",h,v)}else a.push(d)}),a.length===0)return ur({});let c=Kr(s[0],a),l=d=>{Bd(c,(m,h)=>{let v=eI(m,h);t.recordDroppedEvent(d,Vd(h),v)})},u=()=>e({body:Dy(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&ft&&oe.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Ay(r,d),d),d=>{throw l("network_error"),d});return n.add(u).then(d=>d,d=>{if(d instanceof Tn)return ft&&oe.error("Skipped sending event because buffer is full."),l("queue_overflow"),ur({});throw d})}return{send:o,flush:i}}function eI(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function qy(t,e,n=[e],r="npm"){let i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:cr})),version:cr}),t._metadata=i}var xk=100;function Zr(t,e){let n=Mt(),r=Zo();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=xk}=n.getOptions();if(o<=0)return;let s=Yr(),a=w({timestamp:s},t),c=i?aa(()=>i(a,e)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,o))}var tI,Nk="FunctionToString",nI=new WeakMap,Rk=()=>({name:Nk,setupOnce(){tI=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=qo(this),n=nI.has(Mt())&&e!==void 0?e:this;return tI.apply(n,t)}}catch{}},setup(t){nI.set(t,!0)}}),Zd=Rk;var Ak=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],Mk="InboundFilters",Ok=(t={})=>({name:Mk,processEvent(e,n,r){let i=r.getOptions(),o=Pk(t,i);return kk(e,o)?null:e}}),Jd=Ok;function Pk(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Ak],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function kk(t,e){return e.ignoreInternal&&jk(t)?(ft&&oe.warn(`Event dropped due to being internal Sentry Error.
30
- Event: ${xr(t)}`),!0):Lk(t,e.ignoreErrors)?(ft&&oe.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
31
- Event: ${xr(t)}`),!0):$k(t)?(ft&&oe.warn(`Event dropped due to not having an error message, error type or stacktrace.
32
- Event: ${xr(t)}`),!0):Fk(t,e.ignoreTransactions)?(ft&&oe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
33
- Event: ${xr(t)}`),!0):Bk(t,e.denyUrls)?(ft&&oe.warn(`Event dropped due to being matched by \`denyUrls\` option.
34
- Event: ${xr(t)}.
35
- Url: ${Xd(t)}`),!0):Vk(t,e.allowUrls)?!1:(ft&&oe.warn(`Event dropped due to not being matched by \`allowUrls\` option.
36
- Event: ${xr(t)}.
37
- Url: ${Xd(t)}`),!0)}function Lk(t,e){return t.type||!e||!e.length?!1:Uk(t).some(n=>ia(n,e))}function Fk(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?ia(n,e):!1}function Bk(t,e){if(!e||!e.length)return!1;let n=Xd(t);return n?ia(n,e):!1}function Vk(t,e){if(!e||!e.length)return!0;let n=Xd(t);return n?ia(n,e):!0}function Uk(t){let e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function jk(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Hk(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 Xd(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Hk(e):null}catch{return ft&&oe.error(`Cannot extract url for event ${xr(t)}`),null}}function $k(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}var Wk="Dedupe",Gk=()=>{let t;return{name:Wk,processEvent(e){if(e.type)return e;try{if(zk(e,t))return ft&&oe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Qd=Gk;function zk(t,e){return e?!!(qk(t,e)||Yk(t,e)):!1}function qk(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!oI(t,e)||!iI(t,e))}function Yk(t,e){let n=rI(e),r=rI(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!oI(t,e)||!iI(t,e))}function iI(t,e){let n=Ad(t),r=Ad(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 oI(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 rI(t){return t.exception&&t.exception.values&&t.exception.values[0]}var Ht=ge,Yy=0;function Ky(){return Yy>0}function aL(){Yy++,setTimeout(()=>{Yy--})}function Jo(t,e={},n){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(qo(t))return t}catch{return t}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>Jo(s,e));return t.apply(this,o)}catch(o){throw aL(),Gd(s=>{s.addEventProcessor(a=>(e.mechanism&&(ca(a,void 0,void 0),Di(a,e.mechanism)),a.extra=ne(w({},a.extra),{arguments:i}),a)),Yd(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}xd(r,t),On(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var xi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ef(t,e){let n=Jy(t,e),r={type:e&&e.name,value:fL(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function cL(t,e,n,r){let i=Mt(),o=i&&i.getOptions().normalizeDepth,s=mL(e),a={__serialized__:Fd(e,o)};if(s)return{exception:{values:[ef(t,s)]},extra:a};let c={exception:{values:[{type:zo(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:pL(e,{isUnhandledRejection:r})}]},extra:a};if(n){let l=Jy(t,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function Zy(t,e){return{exception:{values:[ef(t,e)]}}}function Jy(t,e){let n=e.stacktrace||e.stack||"",r=uL(e),i=dL(e);try{return t(n,r,i)}catch{}return[]}var lL=/Minified React error #\d+;/i;function uL(t){return t&&lL.test(t.message)?1:0}function dL(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function fL(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function lI(t,e,n,r){let i=n&&n.syntheticException||void 0,o=tf(t,e,i,r);return Di(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),ur(o)}function uI(t,e,n="info",r,i){let o=r&&r.syntheticException||void 0,s=Xy(t,e,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),ur(s)}function tf(t,e,n,r,i){let o;if(Sd(e)&&e.error)return Zy(t,e.error);if(Id(e)||Jg(e)){let s=e;if("stack"in e)o=Zy(t,e);else{let a=s.name||(Id(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;o=Xy(t,c,n,r),ca(o,c)}return"code"in s&&(o.tags=ne(w({},o.tags),{"DOMException.code":`${s.code}`})),o}return Wo(e)?Zy(t,e):Tr(e)||zo(e)?(o=cL(t,e,n,i),Di(o,{synthetic:!0}),o):(o=Xy(t,e,n,r),ca(o,`${e}`,void 0),Di(o,{synthetic:!0}),o)}function Xy(t,e,n,r){let i={};if(r&&n){let o=Jy(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}if(ra(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 pL(t,{isUnhandledRejection:e}){let n=ly(t),r=e?"promise rejection":"exception";return Sd(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:zo(t)?`Event \`${hL(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function hL(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function mL(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function dI(t,{metadata:e,tunnel:n,dsn:r}){let i=w(w({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!r&&{dsn:zr(r)}),o=gL(t);return Kr(i,[o])}function gL(t){return[{type:"user_report"},t]}var rl=class extends nl{constructor(e){let n=w({parentSpanIsAlwaysRootSpan:!0},e),r=Ht.SENTRY_SDK_SOURCE||_y();qy(n,"browser",["browser"],r),super(n),n.sendClientReports&&Ht.document&&Ht.document.addEventListener("visibilitychange",()=>{Ht.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return lI(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return uI(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){xi&&oe.warn("SDK not enabled, will not capture user feedback.");return}let n=dI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){xi&&oe.log("No outcomes to send");return}if(!this._dsn){xi&&oe.log("No dsn provided, will not send outcomes");return}xi&&oe.log("Sending outcomes:",e);let n=Ny(e,this._options.tunnel&&zr(this._dsn));this.sendEnvelope(n)}};var fI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Xt=ge;var yL=1e3,pI,Qy,ev;function tv(t){let e="dom";Pn(e,t),kn(e,vL)}function vL(){if(!Xt.document)return;let t=nn.bind(null,"dom"),e=hI(t,!0);Xt.document.addEventListener("click",e,!1),Xt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let r=Xt[n]&&Xt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(xt(r,"addEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},u=l[o]=l[o]||{refCount:0};if(!u.handler){let d=hI(t);u.handler=d,i.call(this,o,d,a)}u.refCount++}catch{}return i.call(this,o,s,a)}}),xt(r,"removeEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__||{},u=l[o];u&&(u.refCount--,u.refCount<=0&&(i.call(this,o,u.handler,a),u.handler=void 0,delete l[o]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,a)}}))})}function _L(t){if(t.type!==Qy)return!1;try{if(!t.target||t.target._sentryId!==ev)return!1}catch{}return!0}function EL(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function hI(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=wL(n);if(EL(n.type,r))return;On(n,"_sentryCaptured",!0),r&&!r._sentryId&&On(r,"_sentryId",dn());let i=n.type==="keypress"?"input":n.type;_L(n)||(t({event:n,name:i,global:e}),Qy=n.type,ev=r?r._sentryId:void 0),clearTimeout(pI),pI=Xt.setTimeout(()=>{ev=void 0,Qy=void 0},yL)}}function wL(t){try{return t.target}catch{return null}}var nf;function nv(t){let e="history";Pn(e,t),kn(e,bL)}function bL(){if(!My())return;let t=Xt.onpopstate;Xt.onpopstate=function(...n){let r=Xt.location.href,i=nf;if(nf=r,nn("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=nf,s=String(i);nf=s,nn("history",{from:o,to:s})}return n.apply(this,r)}}xt(Xt.history,"pushState",e),xt(Xt.history,"replaceState",e)}var rf={};function rv(t){let e=rf[t];if(e)return e;let n=Xt[t];if(Yc(n))return rf[t]=n.bind(Xt);let r=Xt.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&&o[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){fI&&oe.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(rf[t]=n.bind(Xt))}function of(t){rf[t]=void 0}var Qo="__sentry_xhr_v3__";function iv(t){let e="xhr";Pn(e,t),kn(e,CL)}function CL(){if(!Xt.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;xt(t,"open",function(e){return function(...n){let r=Kn()*1e3,i=Mn(n[0])?n[0].toUpperCase():void 0,o=SL(n[1]);if(!i||!o)return e.apply(this,n);this[Qo]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[Qo];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let c={endTimestamp:Kn()*1e3,startTimestamp:r,xhr:this};nn("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?xt(this,"onreadystatechange",function(a){return function(...c){return s(),a.apply(this,c)}}):this.addEventListener("readystatechange",s),xt(this,"setRequestHeader",function(a){return function(...c){let[l,u]=c,d=this[Qo];return d&&Mn(l)&&Mn(u)&&(d.request_headers[l.toLowerCase()]=u),a.apply(this,c)}}),e.apply(this,n)}}),xt(t,"send",function(e){return function(...n){let r=this[Qo];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:Kn()*1e3,xhr:this};return nn("xhr",i),e.apply(this,n)}})}function SL(t){if(Mn(t))return t;try{return t.toString()}catch{}}function ov(t,e=rv("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let a=w({body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return of("fetch"),io("No fetch implementation available");try{return e(t.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return of("fetch"),n-=s,r--,io(c)}}return Kd(t,i)}var IL=30;var DL=50;function sv(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?qr:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var TL=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,xL=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,NL=/\((\S*)(?::(\d+))(?::(\d+))\)/,RL=t=>{let e=TL.exec(t);if(e){let[,r,i,o]=e;return sv(r,qr,+i,+o)}let n=xL.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=NL.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=vI(n[1]||qr,n[2]);return sv(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},mI=[IL,RL],AL=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ML=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,OL=t=>{let e=AL.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=ML.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]||qr;return[i,r]=vI(i,r),sv(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},gI=[DL,OL];var yI=[mI,gI],av=dy(...yI),vI=(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]:qr,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var sf=1024,kL="Breadcrumbs",LL=(t={})=>{let e=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:kL,setup(n){e.console&&fy(VL(n)),e.dom&&tv(BL(n,e.dom)),e.xhr&&iv(UL(n)),e.fetch&&gy(jL(n)),e.history&&nv(HL(n)),e.sentry&&n.on("beforeSendEvent",FL(n))}}},_I=LL;function FL(t){return function(n){Mt()===t&&Zr({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:xr(n)},{event:n})}}function BL(t,e){return function(r){if(Mt()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>sf&&(xi&&oe.warn(`\`dom.maxStringLength\` cannot exceed ${sf}, but a value of ${a} was configured. Sentry will use ${sf} instead.`),a=sf),typeof s=="string"&&(s=[s]);try{let l=r.event,u=$L(l)?l.target:l;i=zc(u,{keyAttrs:s,maxStringLength:a}),o=sy(u)}catch{i="<unknown>"}if(i.length===0)return;let c={category:`ui.${r.name}`,message:i};o&&(c.data={"ui.component_name":o}),Zr(c,{event:r.event,name:r.name,global:r.global})}}function VL(t){return function(n){if(Mt()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:by(n.level),message:Dd(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Dd(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Zr(r,{input:n.args,level:n.level})}}function UL(t){return function(n){if(Mt()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[Qo];if(!r||!i||!o)return;let{method:s,url:a,status_code:c,body:l}=o,u={method:s,url:a,status_code:c},d={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:i};Zr({category:"xhr",data:u,type:"http"},d)}}function jL(t){return function(n){if(Mt()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};Zr({category:"fetch",data:o,level:"error",type:"http"},s)}else{let o=n.response,s=ne(w({},n.fetchData),{status_code:o&&o.status}),a={input:n.args,response:o,startTimestamp:r,endTimestamp:i};Zr({category:"fetch",data:s,type:"http"},a)}}}function HL(t){return function(n){if(Mt()!==t)return;let r=n.from,i=n.to,o=Zc(Ht.location.href),s=r?Zc(r):void 0,a=Zc(i);(!s||!s.path)&&(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),Zr({category:"navigation",data:{from:r,to:i}})}}function $L(t){return!!t&&!!t.target}var WL=["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"],GL="BrowserApiErrors",zL=(t={})=>{let e=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:GL,setupOnce(){e.setTimeout&&xt(Ht,"setTimeout",EI),e.setInterval&&xt(Ht,"setInterval",EI),e.requestAnimationFrame&&xt(Ht,"requestAnimationFrame",qL),e.XMLHttpRequest&&"XMLHttpRequest"in Ht&&xt(XMLHttpRequest.prototype,"send",YL);let n=e.eventTarget;n&&(Array.isArray(n)?n:WL).forEach(KL)}}},wI=zL;function EI(t){return function(...e){let n=e[0];return e[0]=Jo(n,{mechanism:{data:{function:lr(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function qL(t){return function(e){return t.apply(this,[Jo(e,{mechanism:{data:{function:"requestAnimationFrame",handler:lr(t)},handled:!1,type:"instrument"}})])}}function YL(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&xt(n,i,function(o){let s={mechanism:{data:{function:i,handler:lr(o)},handled:!1,type:"instrument"}},a=qo(o);return a&&(s.mechanism.data.handler=lr(a)),Jo(o,s)})}),t.apply(this,e)}}function KL(t){let e=Ht,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(xt(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=Jo(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:lr(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,Jo(o,{mechanism:{data:{function:"addEventListener",handler:lr(o),target:t},handled:!1,type:"instrument"}}),s])}}),xt(n,"removeEventListener",function(r){return function(i,o,s){let a=o;try{let c=a&&a.__sentry_wrapped__;c&&r.call(this,i,c,s)}catch{}return r.call(this,i,a,s)}}))}var ZL="GlobalHandlers",XL=(t={})=>{let e=w({onerror:!0,onunhandledrejection:!0},t);return{name:ZL,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(JL(n),bI("onerror")),e.onunhandledrejection&&(QL(n),bI("onunhandledrejection"))}}},CI=XL;function JL(t){yy(e=>{let{stackParser:n,attachStacktrace:r}=SI();if(Mt()!==t||Ky())return;let{msg:i,url:o,line:s,column:a,error:c}=e,l=nF(tf(n,c||i,void 0,r,!1),o,s,a);l.level="error",tl(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function QL(t){vy(e=>{let{stackParser:n,attachStacktrace:r}=SI();if(Mt()!==t||Ky())return;let i=eF(e),o=Go(i)?tF(i):tf(n,i,void 0,r,!0);o.level="error",tl(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function eF(t){if(Go(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 tF(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function nF(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=Mn(e)&&e.length>0?e:oy();return c.length===0&&c.push({colno:l,filename:d,function:qr,in_app:!0,lineno:u}),t}function bI(t){xi&&oe.log(`Global Handler attached: ${t}`)}function SI(){let t=Mt();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var II=()=>({name:"HttpContext",preprocessEvent(t){if(!Ht.navigator&&!Ht.location&&!Ht.document)return;let e=t.request&&t.request.url||Ht.location&&Ht.location.href,{referrer:n}=Ht.document||{},{userAgent:r}=Ht.navigator||{},i=w(w(w({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=ne(w(w({},t.request),e&&{url:e}),{headers:i});t.request=o}});var rF="cause",iF=5,oF="LinkedErrors",sF=(t={})=>{let e=t.limit||iF,n=t.key||rF;return{name:oF,preprocessEvent(r,i,o){let s=o.getOptions();ry(ef,s.stackParser,s.maxValueLength,n,e,r,i)}}},DI=sF;function cv(t){return[Jd(),Zd(),wI(),_I(),CI(),DI(),Qd(),II()]}var lv=class extends Error{cause;constructor(e,n){super(e),this.cause=n}},_t=class t{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}captureException(e,n,r){S.error(e),this.getNewScope(n,r).captureException(e)}captureMessage(e,n,r,i){this.getNewScope(r,i).captureMessage(e,n??"error")}captureError(e,n,r,i){S.error(e,n);let o=this.getNewScope(r,i),s=new lv(e,n);o.captureException(s)}setGlobalContext(e,n){this.contexts[e]=w({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,n){let r=new xn;if(r.setClient(this.client),r.setUser(this.user),e?.triggerContext){let i=e.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete e.triggerContext}return e&&r.setExtras(e),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",de.getTimezone()),r}init(){let e=cv({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new rl({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:ov,stackParser:av,integrations:e,environment:Dn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:Dn.debug}),this.client.init()}};var de=class{static tz;static isValidURL(e){try{return new URL(e)}catch{return}}static isNull(e){return!e||e==="null"||e==="undefined"}static removeFromArray(e,n){let r=e.indexOf(n);return r===-1?!1:(e.splice(r,1),!0)}static formatCurrency(e,n){if(e==0&&n)return"Free";let r=Ae.get(),i=Dt.get(),o=r.shopCurrencyCode||i.currency,s=r.currencyCode;s||S.warn("Currency code is not set in RuntimeData");let a=i.money?.format??r.moneyFormat,c;if(a&&o===s)c=bd.format(e*100,a);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s||o,minimumFractionDigits:0,maximumFractionDigits:2})}catch(u){return _t.getInstance().captureException(u,{currentCurrency:s,shopCurrency:o}),""}c=l.format(e),c=c.replace("\u20B9","Rs. "),i.money?.showCurrency&&s!=="INR"&&(c=c.concat(` ${s}`))}return c}static formatNumber(e){return new Intl.NumberFormat(this.getLang(),{notation:"compact"}).format(e)}static getLang(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}static getTimezone(){if(this.tz)return this.tz;try{return this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.tz}catch{return""}}static documentReady(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}static onDocumentLoaded(e){document.readyState==="complete"?e():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e()})}static showSnackbar(e){let n=document.createElement("span");n.id="snackbar",n.innerText=e,document.body.appendChild(n),n.className="show",setTimeout(()=>{n.classList.remove("show"),document.body.removeChild(n)},3e3)}static async retrySelectorForElements(e,n=10,r=document){let i=0,o=document.querySelectorAll("nonexistent-tag");for(;i<n;){let s=Math.min(100*2**i,5e3);if(await TI.JSUtils.sleep(s),o=r.querySelectorAll(e),o.length)return S.debug(`Attempt ${i+1}: ${o.length} elements found with ${e}`),o;S.debug(`Attempt ${i+1}: Elements not found with ${e}. Retrying after ${s}ms.`),i++}return S.warn(`Max attempts reached. Element not found with ${e}.`),o}static async retrySelector(e,n=10,r=document){return(await this.retrySelectorForElements(e,n,r)).item(0)}static async getCartAttributes(){let e=await vt.get(Ce.DEVICE_ID),n=await un.get(Ce.ID,"");return[{key:"letscooee_did",value:e},{key:"letscooee_sid",value:n},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}static onNodesRemoved(e,n,r=document.body){let i=new MutationObserver(o=>{o.forEach(s=>{s.removedNodes.forEach(a=>{(a===e||a.contains(e))&&(n(),i.disconnect())})})});i.observe(r,{childList:!0})}};function ua(t,e,n){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!1,value:n})}var Xr=class t{transform(e){return e==null?null:de.formatCurrency(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Vo({name:"cooeeCurrency",type:t,pure:!0})};var RI=Pe(lf());var aF=Object.prototype.toString,fa=Array.isArray||function(e){return aF.call(e)==="[object Array]"};function dv(t){return typeof t=="function"}function cF(t){return fa(t)?"array":typeof t}function uv(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function xI(t,e){return t!=null&&typeof t=="object"&&e in t}function lF(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var uF=RegExp.prototype.test;function dF(t,e){return uF.call(t,e)}var fF=/\S/;function pF(t){return!dF(fF,t)}var hF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function mF(t){return String(t).replace(/[&<>"'`=\/]/g,function(n){return hF[n]})}var gF=/\s*/,yF=/\s+/,NI=/\s*=/,vF=/\s*\}/,_F=/#|\^|\/|>|\{|&|=|!/;function EF(t,e){if(!t)return[];var n=!1,r=[],i=[],o=[],s=!1,a=!1,c="",l=0;function u(){if(s&&!a)for(;o.length;)delete i[o.pop()];else o=[];s=!1,a=!1}var d,m,h;function v(J){if(typeof J=="string"&&(J=J.split(yF,2)),!fa(J)||J.length!==2)throw new Error("Invalid tags: "+J);d=new RegExp(uv(J[0])+"\\s*"),m=new RegExp("\\s*"+uv(J[1])),h=new RegExp("\\s*"+uv("}"+J[1]))}v(e||dr.tags);for(var N=new ol(t),M,A,O,L,G,we;!N.eos();){if(M=N.pos,O=N.scanUntil(d),O)for(var j=0,fe=O.length;j<fe;++j)L=O.charAt(j),pF(L)?(o.push(i.length),c+=L):(a=!0,n=!0,c+=" "),i.push(["text",L,M,M+1]),M+=1,L===`
38
- `&&(u(),c="",l=0,n=!1);if(!N.scan(d))break;if(s=!0,A=N.scan(_F)||"name",N.scan(gF),A==="="?(O=N.scanUntil(NI),N.scan(NI),N.scanUntil(m)):A==="{"?(O=N.scanUntil(h),N.scan(vF),N.scanUntil(m),A="&"):O=N.scanUntil(m),!N.scan(m))throw new Error("Unclosed tag at "+N.pos);if(A==">"?G=[A,O,M,N.pos,c,l,n]:G=[A,O,M,N.pos],l++,i.push(G),A==="#"||A==="^")r.push(G);else if(A==="/"){if(we=r.pop(),!we)throw new Error('Unopened section "'+O+'" at '+M);if(we[1]!==O)throw new Error('Unclosed section "'+we[1]+'" at '+M)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&v(O)}if(u(),we=r.pop(),we)throw new Error('Unclosed section "'+we[1]+'" at '+N.pos);return bF(wF(i))}function wF(t){for(var e=[],n,r,i=0,o=t.length;i<o;++i)n=t[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(e.push(n),r=n));return e}function bF(t){for(var e=[],n=e,r=[],i,o,s=0,a=t.length;s<a;++s)switch(i=t[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:e;break;default:n.push(i)}return e}function ol(t){this.string=t,this.tail=t,this.pos=0}ol.prototype.eos=function(){return this.tail===""};ol.prototype.scan=function(e){var n=this.tail.match(e);if(!n||n.index!==0)return"";var r=n[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};ol.prototype.scanUntil=function(e){var n=this.tail.search(e),r;switch(n){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=r.length,r};function da(t,e){this.view=t,this.cache={".":this.view},this.parent=e}da.prototype.push=function(e){return new da(e,this)};da.prototype.lookup=function(e){var n=this.cache,r;if(n.hasOwnProperty(e))r=n[e];else{for(var i=this,o,s,a,c=!1;i;){if(e.indexOf(".")>0)for(o=i.view,s=e.split("."),a=0;o!=null&&a<s.length;)a===s.length-1&&(c=xI(o,s[a])||lF(o,s[a])),o=o[s[a++]];else o=i.view[e],c=xI(i.view,e);if(c){r=o;break}i=i.parent}n[e]=r}return dv(r)&&(r=r.call(this.view)),r};function Ln(){this.templateCache={_cache:{},set:function(e,n){this._cache[e]=n},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Ln.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Ln.prototype.parse=function(e,n){var r=this.templateCache,i=e+":"+(n||dr.tags).join(":"),o=typeof r<"u",s=o?r.get(i):void 0;return s==null&&(s=EF(e,n),o&&r.set(i,s)),s};Ln.prototype.render=function(e,n,r,i){var o=this.getConfigTags(i),s=this.parse(e,o),a=n instanceof da?n:new da(n,void 0);return this.renderTokens(s,a,r,e,i)};Ln.prototype.renderTokens=function(e,n,r,i,o){for(var s="",a,c,l,u=0,d=e.length;u<d;++u)l=void 0,a=e[u],c=a[0],c==="#"?l=this.renderSection(a,n,r,i,o):c==="^"?l=this.renderInverted(a,n,r,i,o):c===">"?l=this.renderPartial(a,n,r,o):c==="&"?l=this.unescapedValue(a,n):c==="name"?l=this.escapedValue(a,n,o):c==="text"&&(l=this.rawValue(a)),l!==void 0&&(s+=l);return s};Ln.prototype.renderSection=function(e,n,r,i,o){var s=this,a="",c=n.lookup(e[1]);function l(m){return s.render(m,n,r,o)}if(c){if(fa(c))for(var u=0,d=c.length;u<d;++u)a+=this.renderTokens(e[4],n.push(c[u]),r,i,o);else if(typeof c=="object"||typeof c=="string"||typeof c=="number")a+=this.renderTokens(e[4],n.push(c),r,i,o);else if(dv(c)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");c=c.call(n.view,i.slice(e[3],e[5]),l),c!=null&&(a+=c)}else a+=this.renderTokens(e[4],n,r,i,o);return a}};Ln.prototype.renderInverted=function(e,n,r,i,o){var s=n.lookup(e[1]);if(!s||fa(s)&&s.length===0)return this.renderTokens(e[4],n,r,i,o)};Ln.prototype.indentPartial=function(e,n,r){for(var i=n.replace(/[^ \t]/g,""),o=e.split(`
39
- `),s=0;s<o.length;s++)o[s].length&&(s>0||!r)&&(o[s]=i+o[s]);return o.join(`
40
- `)};Ln.prototype.renderPartial=function(e,n,r,i){if(r){var o=this.getConfigTags(i),s=dv(r)?r(e[1]):r[e[1]];if(s!=null){var a=e[6],c=e[5],l=e[4],u=s;c==0&&l&&(u=this.indentPartial(s,l,a));var d=this.parse(u,o);return this.renderTokens(d,n,r,u,i)}}};Ln.prototype.unescapedValue=function(e,n){var r=n.lookup(e[1]);if(r!=null)return r};Ln.prototype.escapedValue=function(e,n,r){var i=this.getConfigEscape(r)||dr.escape,o=n.lookup(e[1]);if(o!=null)return typeof o=="number"&&i===dr.escape?String(o):i(o)};Ln.prototype.rawValue=function(e){return e[1]};Ln.prototype.getConfigTags=function(e){return fa(e)?e:e&&typeof e=="object"?e.tags:void 0};Ln.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!fa(e))return e.escape};var dr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){il.templateCache=t},get templateCache(){return il.templateCache}},il=new Ln;dr.clearCache=function(){return il.clearCache()};dr.parse=function(e,n){return il.parse(e,n)};dr.render=function(e,n,r,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+cF(e)+'" was given as the first argument for mustache#render(template, view, partials)');return il.render(e,n,r,i)};dr.escape=mF;dr.Scanner=ol;dr.Context=da;dr.Writer=Ln;var fn=dr;fn.escape=RI.MustacheUtils.escapeHtml;var uf=class t{transform(e,n){return e?fn.render(e,w({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Vo({name:"cooeeDynamicVariables",type:t,pure:!0})};var fv={};(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",a=function(){if(!e.OffscreenCanvas)return!1;var T=new OffscreenCanvas(1,1),C=T.getContext("2d");C.fillRect(0,0,1,1);var Y=T.transferToImageBitmap();try{C.createPattern(Y,"no-repeat")}catch{return!1}return!0}();function c(){}function l(T){var C=n.exports.Promise,Y=C!==void 0?C:e.Promise;return typeof Y=="function"?new Y(T):(T(c,c),null)}var u=function(T,C){return{transform:function(Y){if(T)return Y;if(C.has(Y))return C.get(Y);var se=new OffscreenCanvas(Y.width,Y.height),pe=se.getContext("2d");return pe.drawImage(Y,0,0),C.set(Y,se),se},clear:function(){C.clear()}}}(a,new Map),d=function(){var T=Math.floor(16.666666666666668),C,Y,se={},pe=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(C=function(he){var _e=Math.random();return se[_e]=requestAnimationFrame(function ae(Ee){pe===Ee||pe+T-1<Ee?(pe=Ee,delete se[_e],he()):se[_e]=requestAnimationFrame(ae)}),_e},Y=function(he){se[he]&&cancelAnimationFrame(se[he])}):(C=function(he){return setTimeout(he,T)},Y=function(he){return clearTimeout(he)}),{frame:C,cancel:Y}}(),m=function(){var T,C,Y={};function se(pe){function he(_e,ae){pe.postMessage({options:_e||{},callback:ae})}pe.init=function(ae){var Ee=ae.transferControlToOffscreen();pe.postMessage({canvas:Ee},[Ee])},pe.fire=function(ae,Ee,Xe){if(C)return he(ae,null),C;var lt=Math.random().toString(36).slice(2);return C=l(function(Fe){function Me(ot){ot.data.callback===lt&&(delete Y[lt],pe.removeEventListener("message",Me),C=null,u.clear(),Xe(),Fe())}pe.addEventListener("message",Me),he(ae,lt),Y[lt]=Me.bind(null,{data:{callback:lt}})}),C},pe.reset=function(){pe.postMessage({reset:!0});for(var ae in Y)Y[ae](),delete Y[ae]}}return function(){if(T)return T;if(!r&&o){var pe=["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(`
41
- `);try{T=new Worker(URL.createObjectURL(new Blob([pe])))}catch(he){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",he),null}se(T)}return T}}(),h={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 v(T,C){return C?C(T):T}function N(T){return T!=null}function M(T,C,Y){return v(T&&N(T[C])?T[C]:h[C],Y)}function A(T){return T<0?0:Math.floor(T)}function O(T,C){return Math.floor(Math.random()*(C-T))+T}function L(T){return parseInt(T,16)}function G(T){return T.map(we)}function we(T){var C=String(T).replace(/[^0-9a-f]/gi,"");return C.length<6&&(C=C[0]+C[0]+C[1]+C[1]+C[2]+C[2]),{r:L(C.substring(0,2)),g:L(C.substring(2,4)),b:L(C.substring(4,6))}}function j(T){var C=M(T,"origin",Object);return C.x=M(C,"x",Number),C.y=M(C,"y",Number),C}function fe(T){T.width=document.documentElement.clientWidth,T.height=document.documentElement.clientHeight}function J(T){var C=T.getBoundingClientRect();T.width=C.width,T.height=C.height}function be(T){var C=document.createElement("canvas");return C.style.position="fixed",C.style.top="0px",C.style.left="0px",C.style.pointerEvents="none",C.style.zIndex=T,C}function it(T,C,Y,se,pe,he,_e,ae,Ee){T.save(),T.translate(C,Y),T.rotate(he),T.scale(se,pe),T.arc(0,0,1,_e,ae,Ee),T.restore()}function He(T){var C=T.angle*(Math.PI/180),Y=T.spread*(Math.PI/180);return{x:T.x,y:T.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:T.startVelocity*.5+Math.random()*T.startVelocity,angle2D:-C+(.5*Y-Math.random()*Y),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:T.color,shape:T.shape,tick:0,totalTicks:T.ticks,decay:T.decay,drift:T.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:T.gravity*3,ovalScalar:.6,scalar:T.scalar,flat:T.flat}}function et(T,C){C.x+=Math.cos(C.angle2D)*C.velocity+C.drift,C.y+=Math.sin(C.angle2D)*C.velocity+C.gravity,C.velocity*=C.decay,C.flat?(C.wobble=0,C.wobbleX=C.x+10*C.scalar,C.wobbleY=C.y+10*C.scalar,C.tiltSin=0,C.tiltCos=0,C.random=1):(C.wobble+=C.wobbleSpeed,C.wobbleX=C.x+10*C.scalar*Math.cos(C.wobble),C.wobbleY=C.y+10*C.scalar*Math.sin(C.wobble),C.tiltAngle+=.1,C.tiltSin=Math.sin(C.tiltAngle),C.tiltCos=Math.cos(C.tiltAngle),C.random=Math.random()+2);var Y=C.tick++/C.totalTicks,se=C.x+C.random*C.tiltCos,pe=C.y+C.random*C.tiltSin,he=C.wobbleX+C.random*C.tiltCos,_e=C.wobbleY+C.random*C.tiltSin;if(T.fillStyle="rgba("+C.color.r+", "+C.color.g+", "+C.color.b+", "+(1-Y)+")",T.beginPath(),s&&C.shape.type==="path"&&typeof C.shape.path=="string"&&Array.isArray(C.shape.matrix))T.fill(tt(C.shape.path,C.shape.matrix,C.x,C.y,Math.abs(he-se)*.1,Math.abs(_e-pe)*.1,Math.PI/10*C.wobble));else if(C.shape.type==="bitmap"){var ae=Math.PI/10*C.wobble,Ee=Math.abs(he-se)*.1,Xe=Math.abs(_e-pe)*.1,lt=C.shape.bitmap.width*C.scalar,Fe=C.shape.bitmap.height*C.scalar,Me=new DOMMatrix([Math.cos(ae)*Ee,Math.sin(ae)*Ee,-Math.sin(ae)*Xe,Math.cos(ae)*Xe,C.x,C.y]);Me.multiplySelf(new DOMMatrix(C.shape.matrix));var ot=T.createPattern(u.transform(C.shape.bitmap),"no-repeat");ot.setTransform(Me),T.globalAlpha=1-Y,T.fillStyle=ot,T.fillRect(C.x-lt/2,C.y-Fe/2,lt,Fe),T.globalAlpha=1}else if(C.shape==="circle")T.ellipse?T.ellipse(C.x,C.y,Math.abs(he-se)*C.ovalScalar,Math.abs(_e-pe)*C.ovalScalar,Math.PI/10*C.wobble,0,2*Math.PI):it(T,C.x,C.y,Math.abs(he-se)*C.ovalScalar,Math.abs(_e-pe)*C.ovalScalar,Math.PI/10*C.wobble,0,2*Math.PI);else if(C.shape==="star")for(var xe=Math.PI/2*3,y=4*C.scalar,f=8*C.scalar,p=C.x,E=C.y,x=5,F=Math.PI/x;x--;)p=C.x+Math.cos(xe)*f,E=C.y+Math.sin(xe)*f,T.lineTo(p,E),xe+=F,p=C.x+Math.cos(xe)*y,E=C.y+Math.sin(xe)*y,T.lineTo(p,E),xe+=F;else T.moveTo(Math.floor(C.x),Math.floor(C.y)),T.lineTo(Math.floor(C.wobbleX),Math.floor(pe)),T.lineTo(Math.floor(he),Math.floor(_e)),T.lineTo(Math.floor(se),Math.floor(C.wobbleY));return T.closePath(),T.fill(),C.tick<C.totalTicks}function Rt(T,C,Y,se,pe){var he=C.slice(),_e=T.getContext("2d"),ae,Ee,Xe=l(function(lt){function Fe(){ae=Ee=null,_e.clearRect(0,0,se.width,se.height),u.clear(),pe(),lt()}function Me(){r&&!(se.width===i.width&&se.height===i.height)&&(se.width=T.width=i.width,se.height=T.height=i.height),!se.width&&!se.height&&(Y(T),se.width=T.width,se.height=T.height),_e.clearRect(0,0,se.width,se.height),he=he.filter(function(ot){return et(_e,ot)}),he.length?ae=d.frame(Me):Fe()}ae=d.frame(Me),Ee=Fe});return{addFettis:function(lt){return he=he.concat(lt),Xe},canvas:T,promise:Xe,reset:function(){ae&&d.cancel(ae),Ee&&Ee()}}}function wt(T,C){var Y=!T,se=!!M(C||{},"resize"),pe=!1,he=M(C,"disableForReducedMotion",Boolean),_e=o&&!!M(C||{},"useWorker"),ae=_e?m():null,Ee=Y?fe:J,Xe=T&&ae?!!T.__confetti_initialized:!1,lt=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,Fe;function Me(xe,y,f){for(var p=M(xe,"particleCount",A),E=M(xe,"angle",Number),x=M(xe,"spread",Number),F=M(xe,"startVelocity",Number),V=M(xe,"decay",Number),me=M(xe,"gravity",Number),Be=M(xe,"drift",Number),K=M(xe,"colors",G),le=M(xe,"ticks",Number),q=M(xe,"shapes"),$e=M(xe,"scalar"),yn=!!M(xe,"flat"),Jt=j(xe),We=p,ue=[],Rn=T.width*Jt.x,Bi=T.height*Jt.y;We--;)ue.push(He({x:Rn,y:Bi,angle:E,spread:x,startVelocity:F,color:K[We%K.length],shape:q[O(0,q.length)],ticks:le,decay:V,gravity:me,drift:Be,scalar:$e,flat:yn}));return Fe?Fe.addFettis(ue):(Fe=Rt(T,ue,Ee,y,f),Fe.promise)}function ot(xe){var y=he||M(xe,"disableForReducedMotion",Boolean),f=M(xe,"zIndex",Number);if(y&&lt)return l(function(F){F()});Y&&Fe?T=Fe.canvas:Y&&!T&&(T=be(f),document.body.appendChild(T)),se&&!Xe&&Ee(T);var p={width:T.width,height:T.height};ae&&!Xe&&ae.init(T),Xe=!0,ae&&(T.__confetti_initialized=!0);function E(){if(ae){var F={getBoundingClientRect:function(){if(!Y)return T.getBoundingClientRect()}};Ee(F),ae.postMessage({resize:{width:F.width,height:F.height}});return}p.width=p.height=null}function x(){Fe=null,se&&(pe=!1,e.removeEventListener("resize",E)),Y&&T&&(document.body.contains(T)&&document.body.removeChild(T),T=null,Xe=!1)}return se&&!pe&&(pe=!0,e.addEventListener("resize",E,!1)),ae?ae.fire(xe,p,x):Me(xe,p,x)}return ot.reset=function(){ae&&ae.reset(),Fe&&Fe.reset()},ot}var Gt;function gn(){return Gt||(Gt=wt(null,{useWorker:!0,resize:!0})),Gt}function tt(T,C,Y,se,pe,he,_e){var ae=new Path2D(T),Ee=new Path2D;Ee.addPath(ae,new DOMMatrix(C));var Xe=new Path2D;return Xe.addPath(Ee,new DOMMatrix([Math.cos(_e)*pe,Math.sin(_e)*pe,-Math.sin(_e)*he,Math.cos(_e)*he,Y,se])),Xe}function Tt(T){if(!s)throw new Error("path confetti are not supported in this browser");var C,Y;typeof T=="string"?C=T:(C=T.path,Y=T.matrix);var se=new Path2D(C),pe=document.createElement("canvas"),he=pe.getContext("2d");if(!Y){for(var _e=1e3,ae=_e,Ee=_e,Xe=0,lt=0,Fe,Me,ot=0;ot<_e;ot+=2)for(var xe=0;xe<_e;xe+=2)he.isPointInPath(se,ot,xe,"nonzero")&&(ae=Math.min(ae,ot),Ee=Math.min(Ee,xe),Xe=Math.max(Xe,ot),lt=Math.max(lt,xe));Fe=Xe-ae,Me=lt-Ee;var y=10,f=Math.min(y/Fe,y/Me);Y=[f,0,0,f,-Math.round(Fe/2+ae)*f,-Math.round(Me/2+Ee)*f]}return{type:"path",path:C,matrix:Y}}function Te(T){var C,Y=1,se="#000000",pe='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof T=="string"?C=T:(C=T.text,Y="scalar"in T?T.scalar:Y,pe="fontFamily"in T?T.fontFamily:pe,se="color"in T?T.color:se);var he=10*Y,_e=""+he+"px "+pe,ae=new OffscreenCanvas(he,he),Ee=ae.getContext("2d");Ee.font=_e;var Xe=Ee.measureText(C),lt=Math.ceil(Xe.actualBoundingBoxRight+Xe.actualBoundingBoxLeft),Fe=Math.ceil(Xe.actualBoundingBoxAscent+Xe.actualBoundingBoxDescent),Me=2,ot=Xe.actualBoundingBoxLeft+Me,xe=Xe.actualBoundingBoxAscent+Me;lt+=Me+Me,Fe+=Me+Me,ae=new OffscreenCanvas(lt,Fe),Ee=ae.getContext("2d"),Ee.font=_e,Ee.fillStyle=se,Ee.fillText(C,ot,xe);var y=1/Y;return{type:"bitmap",bitmap:ae.transferToImageBitmap(),matrix:[y,0,0,y,-lt*y/2,-Fe*y/2]}}n.exports=function(){return gn().apply(this,arguments)},n.exports.reset=function(){gn().reset()},n.exports.create=wt,n.exports.shapeFromPath=Tt,n.exports.shapeFromText=Te})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),fv,!1);var AI=fv.exports,AY=fv.exports.create;var df=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 AI(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var pa=class t{constructor(e){this.sanitizer=e}transform(e){return e?this.sanitizer.bypassSecurityTrustHtml(e):""}static \u0275fac=function(n){return new(n||t)(Yt(Kg,16))};static \u0275pipe=Vo({name:"safeHtml",type:t,pure:!0})};var CF=(t,e)=>e.minValue;function SF(t,e){if(t&1&&(X(0,"li",6)(1,"div",7),qe(2,"div",8),ar(3,"cooeeCurrency"),ar(4,"safeHtml"),qe(5,"img",9),X(6,"div",10),jt(7),Q()()()),t&2){let n=e.$implicit,r=re(2);Ji("left",n.calculatedAlignment+"%"),Z(2),Ue("innerHTML",Dr(4,7,Dr(3,5,n.minValue)),jc),Z(3),Ue("src",r.getIconURL(n),cn),Z(2),Ks(n.label)}}function IF(t,e){if(t&1&&(Hr(0)(1),qe(2,"div",0),ar(3,"cooeeDynamicVariables"),ar(4,"safeHtml"),X(5,"div",1)(6,"ul",2)(7,"div",3),qe(8,"div",4),Q(),Kt(9,SF,8,9,"li",5,CF),Q()()),t&2){let n=re(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;Z(2),Ue("innerHTML",Dr(4,6,t0(3,3,i,n.localDynamicVariables())),jc),Z(6),Ji("width",r.cartValuePercentage+"%"),Z(),Zt(r.milestones)}}var pf=class t{constructor(e){this.elementRef=e;this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Gs({});calculatedState=Gs({});_engagementTrigger=Gs(null);set engagementTrigger(e){this._engagementTrigger.set(e)}ngOnInit(){S.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){S.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===ff.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===ff.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===ff.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>S.error(e))}async calculateMilestones(){let e=this._engagementTrigger();if(!e?.progressBarConfig?.milestones?.length){S.warn("Milestones not available in progress bar config",e);return}let n=await this.cart.getNormalisedCart(),r=e.progressBarConfig,i=r.milestones.at(-1),o=i.minValue+Math.floor(i.minValue*5/100),s=n.originalAmount,a=Math.min(s,o),c=100/r.milestones.length,l=c;for(let h of r.milestones)h.calculatedAlignment=l,l+=c;let u=this.calculateTrackedProgress(a,r.milestones);S.debug("Cart value:",s,`, percentage: ${u}%`),this.celebrate(e,s);let d={milestonesReady:!0,cartValuePercentage:u,milestones:r.milestones},m=r.milestones.find(h=>h.minValue>s);if(m){this.localDynamicVariables.set({amount_left:de.formatCurrency(m.minValue-s)}),d.nextMilestone=m,this.calculatedState.set(d);return}d.lastMilestone=i,this.calculatedState.set(d)}celebrate(e,n){let o=[...e.progressBarConfig.milestones].reverse().find(c=>c.minValue<n);if(!o)return;let s=`lc/en/${e.shortID}/${o.minValue}`;sessionStorage.getItem(s)||(sessionStorage.setItem(s,"1"),df.realistic())}calculateTrackedProgress(e,n){if(e<=n[0].minValue)return e/n[0].minValue*n[0].calculatedAlignment;if(e>=n[n.length-1].minValue)return 100;for(let r=0;r<n.length-1;r++){let i=n[r].minValue,o=n[r+1].minValue,s=n[r].calculatedAlignment,a=n[r+1].calculatedAlignment;if(e>=i&&e<=o)return(e-i)/(o-i)*(a-s)+s}return 0}static \u0275fac=function(n){return new(n||t)(Yt(qt))};static \u0275cmp=St({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart",engagementTrigger:"engagementTrigger"},decls:1,vars:1,consts:[["id","lc-heading",1,"lc:font-medium","lc:text-center","lc:text-[12px]","lc-primary-text",3,"innerHTML"],[1,"lc:mt-4","lc:w-[95%]"],["id","lc-milestone-list",1,"lc:flex","lc:items-center","lc:relative","lc:text-[10px]","lc:font-medium"],["id","lc-untracked-path",1,"lc:w-full","lc:bg-gray-200","lc:h-1","lc:absolute","lc-progress-rail"],["id","lc-tracked-path",1,"lc:bg-green-700","lc:h-full","lc:block!"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]",3,"left"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:justify-between","lc:absolute","lc:h-full","lc:w-[100px]"],["id","lc-milestone-value",1,"lc-milestone-value",3,"innerHTML"],["width","20","height","20","id","lc-milestone-icon","alt","milestone icon",1,"lc-milestone-icon","lc:bg-green-700",3,"src"],["id","lc-milestone-label",1,"lc="]],template:function(n,r){n&1&&At(0,IF,11,8),n&2&&Ut(r.calculatedState().milestonesReady?0:-1)},dependencies:[uf,pa,Xr],styles:["[_nghost-%COMP%]{display:block;padding:10px;background:linear-gradient(0deg,rgba(44,135,74,.1) 0%,transparent 100%)}.lc-milestone-icon[_ngcontent-%COMP%]{padding:5px;border-radius:1000px}.lc-progress-rail[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{transition:width .5s ease-in-out}"]})};function DF(t,e){return e={exports:{}},t(e,e.exports),e.exports}var TF=AF,xF=OF,NF=LF,Qr=[],pr=[],RF=typeof Uint8Array<"u"?Uint8Array:Array,pv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(es=0,MI=pv.length;es<MI;++es)Qr[es]=pv[es],pr[pv.charCodeAt(es)]=es;var es,MI;pr[45]=62;pr[95]=63;function YI(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function AF(t){var e=YI(t),n=e[0],r=e[1];return(n+r)*3/4-r}function MF(t,e,n){return(e+n)*3/4-n}function OF(t){var e,n=YI(t),r=n[0],i=n[1],o=new RF(MF(t,r,i)),s=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)e=pr[t.charCodeAt(c)]<<18|pr[t.charCodeAt(c+1)]<<12|pr[t.charCodeAt(c+2)]<<6|pr[t.charCodeAt(c+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=pr[t.charCodeAt(c)]<<2|pr[t.charCodeAt(c+1)]>>4,o[s++]=e&255),i===1&&(e=pr[t.charCodeAt(c)]<<10|pr[t.charCodeAt(c+1)]<<4|pr[t.charCodeAt(c+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function PF(t){return Qr[t>>18&63]+Qr[t>>12&63]+Qr[t>>6&63]+Qr[t&63]}function kF(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(PF(r));return i.join("")}function LF(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(kF(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(Qr[e>>2]+Qr[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Qr[e>>10]+Qr[e>>4&63]+Qr[e<<2&63]+"=")),i.join("")}var hv={byteLength:TF,toByteArray:xF,fromByteArray:NF};var FF=function(e,n,r,i,o){var s,a,c=o*8-i-1,l=(1<<c)-1,u=l>>1,d=-7,m=r?o-1:0,h=r?-1:1,v=e[n+m];for(m+=h,s=v&(1<<-d)-1,v>>=-d,d+=c;d>0;s=s*256+e[n+m],m+=h,d-=8);for(a=s&(1<<-d)-1,s>>=-d,d+=i;d>0;a=a*256+e[n+m],m+=h,d-=8);if(s===0)s=1-u;else{if(s===l)return a?NaN:(v?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-u}return(v?-1:1)*a*Math.pow(2,s-i)},BF=function(e,n,r,i,o,s){var a,c,l,u=s*8-o-1,d=(1<<u)-1,m=d>>1,h=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=i?0:s-1,N=i?1:-1,M=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(c=isNaN(n)?1:0,a=d):(a=Math.floor(Math.log(n)/Math.LN2),n*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+m>=1?n+=h/l:n+=h*Math.pow(2,1-m),n*l>=2&&(a++,l/=2),a+m>=d?(c=0,a=d):a+m>=1?(c=(n*l-1)*Math.pow(2,o),a=a+m):(c=n*Math.pow(2,m-1)*Math.pow(2,o),a=0));o>=8;e[r+v]=c&255,v+=N,c/=256,o-=8);for(a=a<<o|c,u+=o;u>0;e[r+v]=a&255,v+=N,a/=256,u-=8);e[r+v-N]|=M*128},ha={read:FF,write:BF},gf=DF(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var y=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(y,f),y.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(y){if(y>r)throw new RangeError('The value "'+y+'" is invalid for option "size"');var f=new Uint8Array(y);return Object.setPrototypeOf(f,s.prototype),f}function s(y,f,p){if(typeof y=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(y)}return a(y,f,p)}s.poolSize=8192;function a(y,f,p){if(typeof y=="string")return d(y,f);if(ArrayBuffer.isView(y))return h(y);if(y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(y));if(Me(y,ArrayBuffer)||y&&Me(y.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Me(y,SharedArrayBuffer)||y&&Me(y.buffer,SharedArrayBuffer)))return v(y,f,p);if(typeof y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=y.valueOf&&y.valueOf();if(E!=null&&E!==y)return s.from(E,f,p);var x=N(y);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof y[Symbol.toPrimitive]=="function")return s.from(y[Symbol.toPrimitive]("string"),f,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(y))}s.from=function(y,f,p){return a(y,f,p)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(y){if(typeof y!="number")throw new TypeError('"size" argument must be of type number');if(y<0)throw new RangeError('The value "'+y+'" is invalid for option "size"')}function l(y,f,p){return c(y),y<=0?o(y):f!==void 0?typeof p=="string"?o(y).fill(f,p):o(y).fill(f):o(y)}s.alloc=function(y,f,p){return l(y,f,p)};function u(y){return c(y),o(y<0?0:M(y)|0)}s.allocUnsafe=function(y){return u(y)},s.allocUnsafeSlow=function(y){return u(y)};function d(y,f){if((typeof f!="string"||f==="")&&(f="utf8"),!s.isEncoding(f))throw new TypeError("Unknown encoding: "+f);var p=O(y,f)|0,E=o(p),x=E.write(y,f);return x!==p&&(E=E.slice(0,x)),E}function m(y){for(var f=y.length<0?0:M(y.length)|0,p=o(f),E=0;E<f;E+=1)p[E]=y[E]&255;return p}function h(y){if(Me(y,Uint8Array)){var f=new Uint8Array(y);return v(f.buffer,f.byteOffset,f.byteLength)}return m(y)}function v(y,f,p){if(f<0||y.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(y.byteLength<f+(p||0))throw new RangeError('"length" is outside of buffer bounds');var E;return f===void 0&&p===void 0?E=new Uint8Array(y):p===void 0?E=new Uint8Array(y,f):E=new Uint8Array(y,f,p),Object.setPrototypeOf(E,s.prototype),E}function N(y){if(s.isBuffer(y)){var f=M(y.length)|0,p=o(f);return p.length===0||y.copy(p,0,0,f),p}if(y.length!==void 0)return typeof y.length!="number"||ot(y.length)?o(0):m(y);if(y.type==="Buffer"&&Array.isArray(y.data))return m(y.data)}function M(y){if(y>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return y|0}function A(y){return+y!=y&&(y=0),s.alloc(+y)}s.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==s.prototype},s.compare=function(f,p){if(Me(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),Me(p,Uint8Array)&&(p=s.from(p,p.offset,p.byteLength)),!s.isBuffer(f)||!s.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===p)return 0;for(var E=f.length,x=p.length,F=0,V=Math.min(E,x);F<V;++F)if(f[F]!==p[F]){E=f[F],x=p[F];break}return E<x?-1:x<E?1:0},s.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(f,p){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return s.alloc(0);var E;if(p===void 0)for(p=0,E=0;E<f.length;++E)p+=f[E].length;var x=s.allocUnsafe(p),F=0;for(E=0;E<f.length;++E){var V=f[E];if(Me(V,Uint8Array))F+V.length>x.length?s.from(V).copy(x,F):Uint8Array.prototype.set.call(x,V,F);else if(s.isBuffer(V))V.copy(x,F);else throw new TypeError('"list" argument must be an Array of Buffers');F+=V.length}return x};function O(y,f){if(s.isBuffer(y))return y.length;if(ArrayBuffer.isView(y)||Me(y,ArrayBuffer))return y.byteLength;if(typeof y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(y));var p=y.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&p===0)return 0;for(var x=!1;;)switch(f){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return ae(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return lt(y).length;default:if(x)return E?-1:ae(y).length;f=(""+f).toLowerCase(),x=!0}}s.byteLength=O;function L(y,f,p){var E=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,f>>>=0,p<=f))return"";for(y||(y="utf8");;)switch(y){case"hex":return Tt(this,f,p);case"utf8":case"utf-8":return Rt(this,f,p);case"ascii":return gn(this,f,p);case"latin1":case"binary":return tt(this,f,p);case"base64":return et(this,f,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te(this,f,p);default:if(E)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),E=!0}}s.prototype._isBuffer=!0;function G(y,f,p){var E=y[f];y[f]=y[p],y[p]=E}s.prototype.swap16=function(){var f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var p=0;p<f;p+=2)G(this,p,p+1);return this},s.prototype.swap32=function(){var f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var p=0;p<f;p+=4)G(this,p,p+3),G(this,p+1,p+2);return this},s.prototype.swap64=function(){var f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var p=0;p<f;p+=8)G(this,p,p+7),G(this,p+1,p+6),G(this,p+2,p+5),G(this,p+3,p+4);return this},s.prototype.toString=function(){var f=this.length;return f===0?"":arguments.length===0?Rt(this,0,f):L.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(f){if(!s.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:s.compare(this,f)===0},s.prototype.inspect=function(){var f="",p=e.INSPECT_MAX_BYTES;return f=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(f+=" ... "),"<Buffer "+f+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(f,p,E,x,F){if(Me(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(f));if(p===void 0&&(p=0),E===void 0&&(E=f?f.length:0),x===void 0&&(x=0),F===void 0&&(F=this.length),p<0||E>f.length||x<0||F>this.length)throw new RangeError("out of range index");if(x>=F&&p>=E)return 0;if(x>=F)return-1;if(p>=E)return 1;if(p>>>=0,E>>>=0,x>>>=0,F>>>=0,this===f)return 0;for(var V=F-x,me=E-p,Be=Math.min(V,me),K=this.slice(x,F),le=f.slice(p,E),q=0;q<Be;++q)if(K[q]!==le[q]){V=K[q],me=le[q];break}return V<me?-1:me<V?1:0};function we(y,f,p,E,x){if(y.length===0)return-1;if(typeof p=="string"?(E=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,ot(p)&&(p=x?0:y.length-1),p<0&&(p=y.length+p),p>=y.length){if(x)return-1;p=y.length-1}else if(p<0)if(x)p=0;else return-1;if(typeof f=="string"&&(f=s.from(f,E)),s.isBuffer(f))return f.length===0?-1:j(y,f,p,E,x);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(y,f,p):Uint8Array.prototype.lastIndexOf.call(y,f,p):j(y,[f],p,E,x);throw new TypeError("val must be string, number or Buffer")}function j(y,f,p,E,x){var F=1,V=y.length,me=f.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(y.length<2||f.length<2)return-1;F=2,V/=2,me/=2,p/=2}function Be(yn,Jt){return F===1?yn[Jt]:yn.readUInt16BE(Jt*F)}var K;if(x){var le=-1;for(K=p;K<V;K++)if(Be(y,K)===Be(f,le===-1?0:K-le)){if(le===-1&&(le=K),K-le+1===me)return le*F}else le!==-1&&(K-=K-le),le=-1}else for(p+me>V&&(p=V-me),K=p;K>=0;K--){for(var q=!0,$e=0;$e<me;$e++)if(Be(y,K+$e)!==Be(f,$e)){q=!1;break}if(q)return K}return-1}s.prototype.includes=function(f,p,E){return this.indexOf(f,p,E)!==-1},s.prototype.indexOf=function(f,p,E){return we(this,f,p,E,!0)},s.prototype.lastIndexOf=function(f,p,E){return we(this,f,p,E,!1)};function fe(y,f,p,E){p=Number(p)||0;var x=y.length-p;E?(E=Number(E),E>x&&(E=x)):E=x;var F=f.length;E>F/2&&(E=F/2);for(var V=0;V<E;++V){var me=parseInt(f.substr(V*2,2),16);if(ot(me))return V;y[p+V]=me}return V}function J(y,f,p,E){return Fe(ae(f,y.length-p),y,p,E)}function be(y,f,p,E){return Fe(Ee(f),y,p,E)}function it(y,f,p,E){return Fe(lt(f),y,p,E)}function He(y,f,p,E){return Fe(Xe(f,y.length-p),y,p,E)}s.prototype.write=function(f,p,E,x){if(p===void 0)x="utf8",E=this.length,p=0;else if(E===void 0&&typeof p=="string")x=p,E=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(E)?(E=E>>>0,x===void 0&&(x="utf8")):(x=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var F=this.length-p;if((E===void 0||E>F)&&(E=F),f.length>0&&(E<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");for(var V=!1;;)switch(x){case"hex":return fe(this,f,p,E);case"utf8":case"utf-8":return J(this,f,p,E);case"ascii":case"latin1":case"binary":return be(this,f,p,E);case"base64":return it(this,f,p,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return He(this,f,p,E);default:if(V)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),V=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function et(y,f,p){return f===0&&p===y.length?hv.fromByteArray(y):hv.fromByteArray(y.slice(f,p))}function Rt(y,f,p){p=Math.min(y.length,p);for(var E=[],x=f;x<p;){var F=y[x],V=null,me=F>239?4:F>223?3:F>191?2:1;if(x+me<=p){var Be,K,le,q;switch(me){case 1:F<128&&(V=F);break;case 2:Be=y[x+1],(Be&192)===128&&(q=(F&31)<<6|Be&63,q>127&&(V=q));break;case 3:Be=y[x+1],K=y[x+2],(Be&192)===128&&(K&192)===128&&(q=(F&15)<<12|(Be&63)<<6|K&63,q>2047&&(q<55296||q>57343)&&(V=q));break;case 4:Be=y[x+1],K=y[x+2],le=y[x+3],(Be&192)===128&&(K&192)===128&&(le&192)===128&&(q=(F&15)<<18|(Be&63)<<12|(K&63)<<6|le&63,q>65535&&q<1114112&&(V=q))}}V===null?(V=65533,me=1):V>65535&&(V-=65536,E.push(V>>>10&1023|55296),V=56320|V&1023),E.push(V),x+=me}return Gt(E)}var wt=4096;function Gt(y){var f=y.length;if(f<=wt)return String.fromCharCode.apply(String,y);for(var p="",E=0;E<f;)p+=String.fromCharCode.apply(String,y.slice(E,E+=wt));return p}function gn(y,f,p){var E="";p=Math.min(y.length,p);for(var x=f;x<p;++x)E+=String.fromCharCode(y[x]&127);return E}function tt(y,f,p){var E="";p=Math.min(y.length,p);for(var x=f;x<p;++x)E+=String.fromCharCode(y[x]);return E}function Tt(y,f,p){var E=y.length;(!f||f<0)&&(f=0),(!p||p<0||p>E)&&(p=E);for(var x="",F=f;F<p;++F)x+=xe[y[F]];return x}function Te(y,f,p){for(var E=y.slice(f,p),x="",F=0;F<E.length-1;F+=2)x+=String.fromCharCode(E[F]+E[F+1]*256);return x}s.prototype.slice=function(f,p){var E=this.length;f=~~f,p=p===void 0?E:~~p,f<0?(f+=E,f<0&&(f=0)):f>E&&(f=E),p<0?(p+=E,p<0&&(p=0)):p>E&&(p=E),p<f&&(p=f);var x=this.subarray(f,p);return Object.setPrototypeOf(x,s.prototype),x};function T(y,f,p){if(y%1!==0||y<0)throw new RangeError("offset is not uint");if(y+f>p)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(f,p,E){f=f>>>0,p=p>>>0,E||T(f,p,this.length);for(var x=this[f],F=1,V=0;++V<p&&(F*=256);)x+=this[f+V]*F;return x},s.prototype.readUintBE=s.prototype.readUIntBE=function(f,p,E){f=f>>>0,p=p>>>0,E||T(f,p,this.length);for(var x=this[f+--p],F=1;p>0&&(F*=256);)x+=this[f+--p]*F;return x},s.prototype.readUint8=s.prototype.readUInt8=function(f,p){return f=f>>>0,p||T(f,1,this.length),this[f]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(f,p){return f=f>>>0,p||T(f,2,this.length),this[f]|this[f+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(f,p){return f=f>>>0,p||T(f,2,this.length),this[f]<<8|this[f+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(f,p){return f=f>>>0,p||T(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(f,p){return f=f>>>0,p||T(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},s.prototype.readIntLE=function(f,p,E){f=f>>>0,p=p>>>0,E||T(f,p,this.length);for(var x=this[f],F=1,V=0;++V<p&&(F*=256);)x+=this[f+V]*F;return F*=128,x>=F&&(x-=Math.pow(2,8*p)),x},s.prototype.readIntBE=function(f,p,E){f=f>>>0,p=p>>>0,E||T(f,p,this.length);for(var x=p,F=1,V=this[f+--x];x>0&&(F*=256);)V+=this[f+--x]*F;return F*=128,V>=F&&(V-=Math.pow(2,8*p)),V},s.prototype.readInt8=function(f,p){return f=f>>>0,p||T(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},s.prototype.readInt16LE=function(f,p){f=f>>>0,p||T(f,2,this.length);var E=this[f]|this[f+1]<<8;return E&32768?E|4294901760:E},s.prototype.readInt16BE=function(f,p){f=f>>>0,p||T(f,2,this.length);var E=this[f+1]|this[f]<<8;return E&32768?E|4294901760:E},s.prototype.readInt32LE=function(f,p){return f=f>>>0,p||T(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},s.prototype.readInt32BE=function(f,p){return f=f>>>0,p||T(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},s.prototype.readFloatLE=function(f,p){return f=f>>>0,p||T(f,4,this.length),ha.read(this,f,!0,23,4)},s.prototype.readFloatBE=function(f,p){return f=f>>>0,p||T(f,4,this.length),ha.read(this,f,!1,23,4)},s.prototype.readDoubleLE=function(f,p){return f=f>>>0,p||T(f,8,this.length),ha.read(this,f,!0,52,8)},s.prototype.readDoubleBE=function(f,p){return f=f>>>0,p||T(f,8,this.length),ha.read(this,f,!1,52,8)};function C(y,f,p,E,x,F){if(!s.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>x||f<F)throw new RangeError('"value" argument is out of bounds');if(p+E>y.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(f,p,E,x){if(f=+f,p=p>>>0,E=E>>>0,!x){var F=Math.pow(2,8*E)-1;C(this,f,p,E,F,0)}var V=1,me=0;for(this[p]=f&255;++me<E&&(V*=256);)this[p+me]=f/V&255;return p+E},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(f,p,E,x){if(f=+f,p=p>>>0,E=E>>>0,!x){var F=Math.pow(2,8*E)-1;C(this,f,p,E,F,0)}var V=E-1,me=1;for(this[p+V]=f&255;--V>=0&&(me*=256);)this[p+V]=f/me&255;return p+E},s.prototype.writeUint8=s.prototype.writeUInt8=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,1,255,0),this[p]=f&255,p+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,2,65535,0),this[p]=f&255,this[p+1]=f>>>8,p+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,2,65535,0),this[p]=f>>>8,this[p+1]=f&255,p+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,4,4294967295,0),this[p+3]=f>>>24,this[p+2]=f>>>16,this[p+1]=f>>>8,this[p]=f&255,p+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,4,4294967295,0),this[p]=f>>>24,this[p+1]=f>>>16,this[p+2]=f>>>8,this[p+3]=f&255,p+4},s.prototype.writeIntLE=function(f,p,E,x){if(f=+f,p=p>>>0,!x){var F=Math.pow(2,8*E-1);C(this,f,p,E,F-1,-F)}var V=0,me=1,Be=0;for(this[p]=f&255;++V<E&&(me*=256);)f<0&&Be===0&&this[p+V-1]!==0&&(Be=1),this[p+V]=(f/me>>0)-Be&255;return p+E},s.prototype.writeIntBE=function(f,p,E,x){if(f=+f,p=p>>>0,!x){var F=Math.pow(2,8*E-1);C(this,f,p,E,F-1,-F)}var V=E-1,me=1,Be=0;for(this[p+V]=f&255;--V>=0&&(me*=256);)f<0&&Be===0&&this[p+V+1]!==0&&(Be=1),this[p+V]=(f/me>>0)-Be&255;return p+E},s.prototype.writeInt8=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,1,127,-128),f<0&&(f=255+f+1),this[p]=f&255,p+1},s.prototype.writeInt16LE=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,2,32767,-32768),this[p]=f&255,this[p+1]=f>>>8,p+2},s.prototype.writeInt16BE=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,2,32767,-32768),this[p]=f>>>8,this[p+1]=f&255,p+2},s.prototype.writeInt32LE=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,4,2147483647,-2147483648),this[p]=f&255,this[p+1]=f>>>8,this[p+2]=f>>>16,this[p+3]=f>>>24,p+4},s.prototype.writeInt32BE=function(f,p,E){return f=+f,p=p>>>0,E||C(this,f,p,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[p]=f>>>24,this[p+1]=f>>>16,this[p+2]=f>>>8,this[p+3]=f&255,p+4};function Y(y,f,p,E,x,F){if(p+E>y.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function se(y,f,p,E,x){return f=+f,p=p>>>0,x||Y(y,f,p,4),ha.write(y,f,p,E,23,4),p+4}s.prototype.writeFloatLE=function(f,p,E){return se(this,f,p,!0,E)},s.prototype.writeFloatBE=function(f,p,E){return se(this,f,p,!1,E)};function pe(y,f,p,E,x){return f=+f,p=p>>>0,x||Y(y,f,p,8),ha.write(y,f,p,E,52,8),p+8}s.prototype.writeDoubleLE=function(f,p,E){return pe(this,f,p,!0,E)},s.prototype.writeDoubleBE=function(f,p,E){return pe(this,f,p,!1,E)},s.prototype.copy=function(f,p,E,x){if(!s.isBuffer(f))throw new TypeError("argument should be a Buffer");if(E||(E=0),!x&&x!==0&&(x=this.length),p>=f.length&&(p=f.length),p||(p=0),x>0&&x<E&&(x=E),x===E||f.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),f.length-p<x-E&&(x=f.length-p+E);var F=x-E;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,E,x):Uint8Array.prototype.set.call(f,this.subarray(E,x),p),F},s.prototype.fill=function(f,p,E,x){if(typeof f=="string"){if(typeof p=="string"?(x=p,p=0,E=this.length):typeof E=="string"&&(x=E,E=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!s.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(f.length===1){var F=f.charCodeAt(0);(x==="utf8"&&F<128||x==="latin1")&&(f=F)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(p<0||this.length<p||this.length<E)throw new RangeError("Out of range index");if(E<=p)return this;p=p>>>0,E=E===void 0?this.length:E>>>0,f||(f=0);var V;if(typeof f=="number")for(V=p;V<E;++V)this[V]=f;else{var me=s.isBuffer(f)?f:s.from(f,x),Be=me.length;if(Be===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(V=0;V<E-p;++V)this[V+p]=me[V%Be]}return this};var he=/[^+/0-9A-Za-z-_]/g;function _e(y){if(y=y.split("=")[0],y=y.trim().replace(he,""),y.length<2)return"";for(;y.length%4!==0;)y=y+"=";return y}function ae(y,f){f=f||1/0;for(var p,E=y.length,x=null,F=[],V=0;V<E;++V){if(p=y.charCodeAt(V),p>55295&&p<57344){if(!x){if(p>56319){(f-=3)>-1&&F.push(239,191,189);continue}else if(V+1===E){(f-=3)>-1&&F.push(239,191,189);continue}x=p;continue}if(p<56320){(f-=3)>-1&&F.push(239,191,189),x=p;continue}p=(x-55296<<10|p-56320)+65536}else x&&(f-=3)>-1&&F.push(239,191,189);if(x=null,p<128){if((f-=1)<0)break;F.push(p)}else if(p<2048){if((f-=2)<0)break;F.push(p>>6|192,p&63|128)}else if(p<65536){if((f-=3)<0)break;F.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((f-=4)<0)break;F.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return F}function Ee(y){for(var f=[],p=0;p<y.length;++p)f.push(y.charCodeAt(p)&255);return f}function Xe(y,f){for(var p,E,x,F=[],V=0;V<y.length&&!((f-=2)<0);++V)p=y.charCodeAt(V),E=p>>8,x=p%256,F.push(x),F.push(E);return F}function lt(y){return hv.toByteArray(_e(y))}function Fe(y,f,p,E){for(var x=0;x<E&&!(x+p>=f.length||x>=y.length);++x)f[x+p]=y[x];return x}function Me(y,f){return y instanceof f||y!=null&&y.constructor!=null&&y.constructor.name!=null&&y.constructor.name===f.name}function ot(y){return y!==y}var xe=function(){for(var y="0123456789abcdef",f=new Array(256),p=0;p<16;++p)for(var E=p*16,x=0;x<16;++x)f[E+x]=y[p]+y[x];return f}()}),rt=gf.Buffer;gf.SlowBuffer;gf.INSPECT_MAX_BYTES;gf.kMaxLength;var _v=function(e,n){return _v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},_v(e,n)};function yf(t,e){_v(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ns=function(t){yf(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),Lt=function(t){yf(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function hf(t){return t&&t.Math==Math&&t}function KI(){return hf(typeof globalThis=="object"&&globalThis)||hf(typeof window=="object"&&window)||hf(typeof self=="object"&&self)||hf(typeof global=="object"&&global)||Function("return this")()}function VF(){var t=KI();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var UF=function(e){var n=VF()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=rt.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},jF=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(rt.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(rt.alloc(e))}:UF}},ZI=jF();function HF(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function wv(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function $F(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function WF(t){return ll(t)&&Object.prototype.toString.call(t)==="[object Date]"}function ll(t){return typeof t=="object"&&t!==null}function vf(t,e){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(e),n=!0),t.apply(this,i)}return r}function mf(t){if(ArrayBuffer.isView(t))return rt.from(t.buffer,t.byteOffset,t.byteLength);if(HF(t))return rt.from(t);throw new Lt("Must use either Buffer or TypedArray")}var GF=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,XI=function(t){return typeof t=="string"&&GF.test(t)},Ev=function(t){if(!XI(t))throw new Lt('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return rt.from(e,"hex")},OI=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")};var KY=Math.pow(2,63)-1,ZY=-Math.pow(2,63),zF=Math.pow(2,53),qF=-Math.pow(2,53);var JI=4;var rs=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new Lt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=rt.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=rt.from(e,"binary"):Array.isArray(e)?this.buffer=rt.from(e):this.buffer=mf(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Lt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Lt("only accepts single character Uint8Array or Array");var n;if(typeof e=="string"?n=e.charCodeAt(0):typeof e=="number"?n=e:n=e[0],n<0||n>255)throw new Lt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=rt.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(e,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+e.length){var r=rt.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(mf(e),n),this.position=n+e.byteLength>this.position?n+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,n,e.length,"binary"),this.position=n+e.length>this.position?n+e.length:this.position)},t.prototype.read=function(e,n){return n=n&&n>0?n:this.position,this.buffer.slice(e,e+n)},t.prototype.value=function(e){return e=!!e,e&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(e){return this.buffer.toString(e)},t.prototype.toExtendedJSON=function(e){e=e||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new PI(this.buffer.slice(0,this.position));throw new ns('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){n=n||{};var r,i;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=rt.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=rt.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=Ev(e.$uuid)),!r)throw new Lt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===JI?new PI(r):new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(rs.prototype,"_bsontype",{value:"Binary"});var mv=16,PI=function(t){yf(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=rt.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===mv)i=mf(n);else if(typeof n=="string")i=Ev(n);else throw new Lt("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=t.call(this,i,JI)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=OI(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=OI(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new rs(this.id,rs.SUBTYPE_UUID)},e.generate=function(){var n=ZI(mv);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,rt.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?XI(n):wv(n)?n.length!==mv?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Ev(n);return new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(rs),_f=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},t}();Object.defineProperty(_f.prototype,"_bsontype",{value:"Code"});function YF(t){return ll(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var al=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");o.length===2&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var n={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(al.prototype,"_bsontype",{value:"DBRef"});var fr=void 0;try{fr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var kI=65536,KF=1<<24,ga=kI*kI,QI=ga*ga,LI=QI/2,FI={},BI={},ce=function(){function t(e,n,r){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,r);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!n)):typeof e=="string"?Object.assign(this,t.fromString(e,!!n)):(this.low=e|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(e>>>=0,(o=0<=e&&e<256)&&(i=BI[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(BI[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=FI[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(FI[e]=r),r))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=QI)return t.MAX_UNSIGNED_VALUE}else{if(e<=-LI)return t.MIN_VALUE;if(e+1>=LI)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%ga|0,e/ga|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,a=0;a<e.length;a+=8){var c=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+c),r);if(c<8){var u=t.fromNumber(Math.pow(r,c));s=s.mul(u).add(t.fromNumber(l))}else s=s.mul(o),s=s.add(t.fromNumber(l))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(e){return ll(e)&&e.__isLong__===!0},t.fromValue=function(e,n){return typeof e=="number"?t.fromNumber(e,n):typeof e=="string"?t.fromString(e,n):t.fromBits(e.low,e.high,typeof n=="boolean"?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=e.high>>>16,a=e.high&65535,c=e.low>>>16,l=e.low&65535,u=0,d=0,m=0,h=0;return h+=o+l,m+=h>>>16,h&=65535,m+=i+c,d+=m>>>16,m&=65535,d+=r+a,u+=d>>>16,d&=65535,u+=n+s,u&=65535,t.fromBits(m<<16|h,u<<16|d,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(fr){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?fr.div_u:fr.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,fr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return r=s.div(e).shl(1),r.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)),o)}else if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),c=a<=48?1:Math.pow(2,a-48),l=t.fromNumber(r),u=l.mul(e);u.isNegative()||u.gt(i);)r-=c,l=t.fromNumber(r,this.unsigned),u=l.mul(e);l.isZero()&&(l=t.ONE),o=o.add(l),i=i.sub(u)}return o},t.prototype.div=function(e){return this.divide(e)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low},t.prototype.eq=function(e){return this.equals(e)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(e&1<<n)===0;n--);return this.high!==0?n+33:n+1},t.prototype.greaterThan=function(e){return this.comp(e)>0},t.prototype.gt=function(e){return this.greaterThan(e)},t.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},t.prototype.gte=function(e){return this.greaterThanOrEqual(e)},t.prototype.ge=function(e){return this.greaterThanOrEqual(e)},t.prototype.isEven=function(){return(this.low&1)===0},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return(this.low&1)===1},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return this.high===0&&this.low===0},t.prototype.lessThan=function(e){return this.comp(e)<0},t.prototype.lt=function(e){return this.lessThan(e)},t.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},t.prototype.lte=function(e){return this.lessThanOrEqual(e)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),fr){var n=(this.unsigned?fr.rem_u:fr.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,fr.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(e){return this.modulo(e)},t.prototype.rem=function(e){return this.modulo(e)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),fr){var n=fr.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,fr.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=e.high>>>16,c=e.high&65535,l=e.low>>>16,u=e.low&65535,d=0,m=0,h=0,v=0;return v+=s*u,h+=v>>>16,v&=65535,h+=o*u,m+=h>>>16,h&=65535,h+=s*l,m+=h>>>16,h&=65535,m+=i*u,d+=m>>>16,m&=65535,m+=o*l,d+=m>>>16,m&=65535,m+=s*c,d+=m>>>16,m&=65535,d+=r*u+i*l+o*c+s*a,d&=65535,t.fromBits(h<<16|v,d<<16|m,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*ga+(this.low>>>0):this.high*ga+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,a="";;){var c=s.div(o),l=s.sub(c.mul(o)).toInt()>>>0,u=l.toString(e);if(s=c,s.isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(KF),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(ce.prototype,"__isLong__",{value:!0});Object.defineProperty(ce.prototype,"_bsontype",{value:"Long"});var ZF=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,XF=/^(\+|-)?(Infinity|inf)$/i,JF=/^(\+|-)?NaN$/i,sl=6111,gv=-6176,VI=6176,QF=34,yv=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),UI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),jI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),eB=/^([-+])?(\d+)?$/,tB=31,HI=16383,nB=30,rB=31;function $I(t){return!isNaN(parseInt(t,10))}function iB(t){var e=ce.fromNumber(1e9),n=ce.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new ce(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function oB(t,e){if(!t&&!e)return{high:ce.fromNumber(0),low:ce.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new ce(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new ce(e.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),c=r.multiply(i),l=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new ce(a.getLowBits(),0).add(c).add(l.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),l=a.shiftLeft(32).add(new ce(l.getLowBits(),0)),{high:s,low:l}}function sB(t,e){var n=t.high>>>0,r=e.high>>>0;if(n<r)return!0;if(n===r){var i=t.low>>>0,o=e.low>>>0;if(i<o)return!0}return!1}function ma(t,e){throw new Lt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var bv=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(wv(e)){if(e.byteLength!==16)throw new Lt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Lt("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,r=!1,i=!1,o=0,s=0,a=0,c=0,l=0,u=[0],d=0,m=0,h=0,v=0,N=0,M=0,A=new ce(0,0),O=new ce(0,0),L=0,G=0;if(e.length>=7e3)throw new Lt(""+e+" not a valid Decimal128 string");var we=e.match(ZF),j=e.match(XF),fe=e.match(JF);if(!we&&!j&&!fe||e.length===0)throw new Lt(""+e+" not a valid Decimal128 string");if(we){var J=we[2],be=we[4],it=we[5],He=we[6];be&&He===void 0&&ma(e,"missing exponent power"),be&&J===void 0&&ma(e,"missing exponent base"),be===void 0&&(it||He)&&ma(e,"missing e before exponent")}if((e[G]==="+"||e[G]==="-")&&(n=e[G++]==="-"),!$I(e[G])&&e[G]!=="."){if(e[G]==="i"||e[G]==="I")return new t(rt.from(n?UI:jI));if(e[G]==="N")return new t(rt.from(yv))}for(;$I(e[G])||e[G]===".";){if(e[G]==="."){r&&ma(e,"contains multiple periods"),r=!0,G=G+1;continue}d<34&&(e[G]!=="0"||i)&&(i||(l=s),i=!0,u[m++]=parseInt(e[G],10),d=d+1),i&&(a=a+1),r&&(c=c+1),s=s+1,G=G+1}if(r&&!s)throw new Lt(""+e+" not a valid Decimal128 string");if(e[G]==="e"||e[G]==="E"){var et=e.substr(++G).match(eB);if(!et||!et[2])return new t(rt.from(yv));N=parseInt(et[0],10),G=G+et[0].length}if(e[G])return new t(rt.from(yv));if(h=0,!d)h=0,v=0,u[0]=0,a=1,d=1,o=0;else if(v=d-1,o=a,o!==1)for(;u[l+o-1]===0;)o=o-1;for(N<=c&&c-N>16384?N=gv:N=N-c;N>sl;){if(v=v+1,v-h>QF){var Rt=u.join("");if(Rt.match(/^0+$/)){N=sl;break}ma(e,"overflow")}N=N-1}for(;N<gv||d<a;){if(v===0&&o<d){N=gv,o=0;break}if(d<a?a=a-1:v=v-1,N<sl)N=N+1;else{var Rt=u.join("");if(Rt.match(/^0+$/)){N=sl;break}ma(e,"overflow")}}if(v-h+1<o){var wt=s;r&&(l=l+1,wt=wt+1),n&&(l=l+1,wt=wt+1);var Gt=parseInt(e[l+v+1],10),gn=0;if(Gt>=5&&(gn=1,Gt===5)){for(gn=u[v]%2===1?1:0,M=l+v+2;M<wt;M++)if(parseInt(e[M],10)){gn=1;break}}if(gn){for(var tt=v;tt>=0;tt--)if(++u[tt]>9&&(u[tt]=0,tt===0))if(N<sl)N=N+1,u[tt]=1;else return new t(rt.from(n?UI:jI))}}if(A=ce.fromNumber(0),O=ce.fromNumber(0),o===0)A=ce.fromNumber(0),O=ce.fromNumber(0);else if(v-h<17){var tt=h;for(O=ce.fromNumber(u[tt++]),A=new ce(0,0);tt<=v;tt++)O=O.multiply(ce.fromNumber(10)),O=O.add(ce.fromNumber(u[tt]))}else{var tt=h;for(A=ce.fromNumber(u[tt++]);tt<=v-17;tt++)A=A.multiply(ce.fromNumber(10)),A=A.add(ce.fromNumber(u[tt]));for(O=ce.fromNumber(u[tt++]);tt<=v;tt++)O=O.multiply(ce.fromNumber(10)),O=O.add(ce.fromNumber(u[tt]))}var Tt=oB(A,ce.fromString("100000000000000000"));Tt.low=Tt.low.add(O),sB(Tt.low,O)&&(Tt.high=Tt.high.add(ce.fromNumber(1))),L=N+VI;var Te={low:ce.fromNumber(0),high:ce.fromNumber(0)};Tt.high.shiftRightUnsigned(49).and(ce.fromNumber(1)).equals(ce.fromNumber(1))?(Te.high=Te.high.or(ce.fromNumber(3).shiftLeft(61)),Te.high=Te.high.or(ce.fromNumber(L).and(ce.fromNumber(16383).shiftLeft(47))),Te.high=Te.high.or(Tt.high.and(ce.fromNumber(0x7fffffffffff)))):(Te.high=Te.high.or(ce.fromNumber(L&16383).shiftLeft(49)),Te.high=Te.high.or(Tt.high.and(ce.fromNumber(562949953421311)))),Te.low=Tt.low,n&&(Te.high=Te.high.or(ce.fromString("9223372036854775808")));var T=rt.alloc(16);return G=0,T[G++]=Te.low.low&255,T[G++]=Te.low.low>>8&255,T[G++]=Te.low.low>>16&255,T[G++]=Te.low.low>>24&255,T[G++]=Te.low.high&255,T[G++]=Te.low.high>>8&255,T[G++]=Te.low.high>>16&255,T[G++]=Te.low.high>>24&255,T[G++]=Te.high.low&255,T[G++]=Te.high.low>>8&255,T[G++]=Te.high.low>>16&255,T[G++]=Te.high.low>>24&255,T[G++]=Te.high.high&255,T[G++]=Te.high.high>>8&255,T[G++]=Te.high.high>>16&255,T[G++]=Te.high.high>>24&255,new t(T)},t.prototype.toString=function(){for(var e,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,a,c={parts:[0,0,0,0]},l,u,d=[];o=0;var m=this.bytes,h=m[o++]|m[o++]<<8|m[o++]<<16|m[o++]<<24,v=m[o++]|m[o++]<<8|m[o++]<<16|m[o++]<<24,N=m[o++]|m[o++]<<8|m[o++]<<16|m[o++]<<24,M=m[o++]|m[o++]<<8|m[o++]<<16|m[o++]<<24;o=0;var A={low:new ce(h,v),high:new ce(N,M)};A.high.lessThan(ce.ZERO)&&d.push("-");var O=M>>26&tB;if(O>>3===3){if(O===nB)return d.join("")+"Infinity";if(O===rB)return"NaN";e=M>>15&HI,a=8+(M>>14&1)}else a=M>>14&7,e=M>>17&HI;var L=e-VI;if(c.parts[0]=(M&16383)+((a&15)<<14),c.parts[1]=N,c.parts[2]=v,c.parts[3]=h,c.parts[0]===0&&c.parts[1]===0&&c.parts[2]===0&&c.parts[3]===0)s=!0;else for(u=3;u>=0;u--){var G=0,we=iB(c);if(c=we.quotient,G=we.rem.low,!!G)for(l=8;l>=0;l--)r[u*9+l]=G%10,G=Math.floor(G/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var j=n-1+L;if(j>=34||j<=-7||L>0){if(n>34)return d.push("".concat(0)),L>0?d.push("E+".concat(L)):L<0&&d.push("E".concat(L)),d.join("");d.push("".concat(r[o++])),n=n-1,n&&d.push(".");for(var i=0;i<n;i++)d.push("".concat(r[o++]));d.push("E"),j>0?d.push("+".concat(j)):d.push("".concat(j))}else if(L>=0)for(var i=0;i<n;i++)d.push("".concat(r[o++]));else{var fe=n+L;if(fe>0)for(var i=0;i<fe;i++)d.push("".concat(r[o++]));else d.push("0");for(d.push(".");fe++<0;)d.push("0");for(var i=0;i<n-Math.max(fe-1,0);i++)d.push("".concat(r[o++]))}return d.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(bv.prototype,"_bsontype",{value:"Decimal128"});var Ef=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},t}();Object.defineProperty(Ef.prototype,"_bsontype",{value:"Double"});var wf=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e|0}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(wf.prototype,"_bsontype",{value:"Int32"});var Cv=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(Cv.prototype,"_bsontype",{value:"MaxKey"});var Sv=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(Sv.prototype,"_bsontype",{value:"MinKey"});var aB=new RegExp("^[0-9a-fA-F]{24}$"),ts=null,Jr=Symbol("id"),rn=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new Lt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=rt.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[Jr]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[Jr]=n instanceof rt?n:mf(n);else if(typeof n=="string")if(n.length===12){var r=rt.from(n);if(r.byteLength===12)this[Jr]=r;else throw new Lt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&aB.test(n))this[Jr]=rt.from(n,"hex");else throw new Lt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Lt("Argument passed in does not match the accepted types");t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[Jr]},set:function(e){this[Jr]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=rt.alloc(12);return r.writeUInt32BE(e,0),ts===null&&(ts=ZI(5)),r[4]=ts[0],r[5]=ts[1],r[6]=ts[2],r[7]=ts[3],r[8]=ts[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(e==null)return!1;if(e instanceof t)return this[Jr][11]===e[Jr][11]&&this[Jr].equals(e[Jr]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&wv(this.id))return e===rt.prototype.toString.call(this.id,"latin1");if(typeof e=="string"&&t.isValid(e)&&e.length===24)return e.toLowerCase()===this.toHexString();if(typeof e=="string"&&t.isValid(e)&&e.length===12)return rt.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var e=new Date,n=this.id.readUInt32BE(0);return e.setTime(Math.floor(n)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var n=rt.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new Lt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(rt.from(e,"hex"))},t.isValid=function(e){if(e==null)return!1;try{return new t(e),!0}catch{return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(Math.random()*16777215),t}();Object.defineProperty(rn.prototype,"generate",{value:vf(function(t){return rn.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(rn.prototype,"getInc",{value:vf(function(){return rn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(rn.prototype,"get_inc",{value:vf(function(){return rn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(rn,"get_inc",{value:vf(function(){return rn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(rn.prototype,"_bsontype",{value:"ObjectID"});function cB(t){return t.split("").sort().join("")}var cl=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=cB(n??""),this.pattern.indexOf("\0")!==-1)throw new ns("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new ns("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new ns("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(e){return e?e.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new Lt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(cl.prototype,"_bsontype",{value:"BSONRegExp"});var Iv=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty(Iv.prototype,"_bsontype",{value:"Symbol"});var lB=ce,eD=function(t){yf(e,t);function e(n,r){var i=this;return i instanceof e?(ce.isLong(n)?i=t.call(this,n.low,n.high,!0)||this:ll(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=t.call(this,n.i,n.t,!0)||this:i=t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(ce.fromInt(n,!0))},e.fromNumber=function(n){return new e(ce.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(ce.fromString(n,!0,r))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(n){return new e(n.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=ce.MAX_UNSIGNED_VALUE,e}(lB);function uB(t){return ll(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var tD=2147483647,nD=-2147483648,rD=9223372036854776e3,iD=-9223372036854776e3,dB={$oid:rn,$binary:rs,$uuid:rs,$symbol:Iv,$numberInt:wf,$numberDecimal:bv,$numberDouble:Ef,$numberLong:ce,$minKey:Sv,$maxKey:Cv,$regex:cl,$regularExpression:cl,$timestamp:eD};function oD(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=nD&&t<=tD)return new wf(t);if(t>=iD&&t<=rD)return ce.fromNumber(t)}return new Ef(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(d){return d.startsWith("$")&&t[d]!=null}),r=0;r<n.length;r++){var i=dB[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var o=t.$date,s=new Date;return e.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):ce.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&e.relaxed&&s.setTime(o),s}if(t.$code!=null){var a=Object.assign({},t);return t.$scope&&(a.$scope=oD(t.$scope)),_f.fromExtendedJSON(t)}if(YF(t)||t.$dbPointer){var c=t.$ref?t:t.$dbPointer;if(c instanceof al)return c;var l=Object.keys(c).filter(function(d){return d.startsWith("$")}),u=!0;if(l.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(u=!1)}),u)return al.fromExtendedJSON(c)}return t}function fB(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return so(n,e)}finally{e.seenObjects.pop()}})}function WI(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function so(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(A){return A.obj===t});if(n!==-1){var r=e.seenObjects.map(function(A){return A.propertyName}),i=r.slice(0,n).map(function(A){return"".concat(A," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=r[r.length-1],c=" ".repeat(i.length+o.length/2),l="-".repeat(s.length+(o.length+a.length)/2-1);throw new Lt(`Converting circular structure to EJSON:
28
+ `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Nr(a))}i(l)}}return typeof r=="string"?r:zP(r)}function zP(e){let t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function Ty(e){let t=typeof e.data=="string"?Sy(e.data):e.data;return[tn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var qP={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Vd(e){return qP[e]}function Ud(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function xy(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return w(w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:zr(r)}),i&&{trace:tn(w({},i))})}function Ny(e,t,n){let r=[{type:"client_report"},{timestamp:n||Yr(),discarded_events:e}];return Kr(t?{dsn:t}:{},[r])}function NS(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function RS(e,t){return e[t]||e.all||0}function Ry(e,t,n=Date.now()){return RS(e,t)>n}function Ay(e,{statusCode:t,headers:n},r=Date.now()){let i=w({},e),o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let a of o.trim().split(",")){let[l,c,,,d]=a.split(":",5),h=parseInt(l,10),f=(isNaN(h)?60:h)*1e3;if(!c)i.all=r+f;else for(let g of c.split(";"))g==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(i[g]=r+f):i[g]=r+f}else s?i.all=r+NS(s,r):t===429&&(i.all=r+60*1e3);return i}function jd(){return{traceId:dn(),spanId:dn().substring(16)}}var Hd=ge;function My(){let e=Hd.chrome,t=e&&e.app&&e.app.runtime,n="history"in Hd&&!!Hd.history.pushState&&!!Hd.history.replaceState;return!t&&n}var ft=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yo(){return Xc(ge),ge}function Xc(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||cr,t[cr]=t[cr]||{}}function Jc(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Kn(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:dn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}var Oy="_sentrySpan";function Py(e,t){t?On(e,Oy,t):delete e[Oy]}function ky(e){return e[Oy]}var ZP=100,Ly=class M0{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=jd()}clone(){let t=new M0;return t._breadcrumbs=[...this._breadcrumbs],t._tags=w({},this._tags),t._extra=w({},this._extra),t._contexts=w({},this._contexts),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata=w({},this._sdkProcessingMetadata),t._propagationContext=w({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,Py(t,ky(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Jc(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags=w(w({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=ne(w({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=w(w({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=ne(w({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,[r,i]=n instanceof xn?[n.getScopeData(),n.getRequestSession()]:Tr(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:a,contexts:l,level:c,fingerprint:d=[],propagationContext:h}=r||{};return this._tags=w(w({},this._tags),o),this._extra=w(w({},this._extra),s),this._contexts=w(w({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),d.length&&(this._fingerprint=d),h&&(this._propagationContext=h),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Py(this,void 0),this._attachments=[],this._propagationContext=jd(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:ZP;if(r<=0)return this;let i=w({timestamp:Yr()},t),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ky(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=w(w({},this._sdkProcessingMetadata),t),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:dn();if(!this._client)return oe.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,ne(w({originalException:t,syntheticException:i},n),{event_id:r}),this),r}captureMessage(t,n,r){let i=r&&r.event_id?r.event_id:dn();if(!this._client)return oe.warn("No client configured on scope - will not capture message!"),i;let o=new Error(t);return this._client.captureMessage(t,n,ne(w({originalException:t,syntheticException:o},r),{event_id:i}),this),i}captureEvent(t,n){let r=n&&n.event_id?n.event_id:dn();return this._client?(this._client.captureEvent(t,ne(w({},n),{event_id:r}),this),r):(oe.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},xn=Ly;function AS(){return oa("defaultCurrentScope",()=>new xn)}function MS(){return oa("defaultIsolationScope",()=>new xn)}var Fy=class{constructor(e,t){let n;e?n=e:n=new xn;let r;t?r=t:r=new xn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(r){throw this._popScope(),r}return Ii(n)?n.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function la(){let e=Yo(),t=Xc(e);return t.stack=t.stack||new Fy(AS(),MS())}function XP(e){return la().withScope(e)}function JP(e,t){let n=la();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function OS(e){return la().withScope(()=>e(la().getIsolationScope()))}function PS(){return{withIsolationScope:OS,withScope:XP,withSetScope:JP,withSetIsolationScope:(e,t)=>OS(t),getCurrentScope:()=>la().getScope(),getIsolationScope:()=>la().getIsolationScope()}}function $d(e){let t=Xc(e);return t.acs?t.acs:PS()}function Ko(){let e=Yo();return $d(e).getCurrentScope()}function Zo(){let e=Yo();return $d(e).getIsolationScope()}function Wd(){return oa("globalScope",()=>new xn)}function Gd(...e){let t=Yo(),n=$d(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Mt(){return Ko().getClient()}var QP="_sentryMetrics";function kS(e){let t=e[QP];if(!t)return;let n={};for(let[,[r,i]]of t)(n[r]||(n[r]=[])).push(tn(i));return n}var By="sentry.source",Vy="sentry.sample_rate",Uy="sentry.op",jy="sentry.origin",ek=1;function BS(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=Xo(e);return tn({parent_span_id:r,span_id:t,trace_id:n})}function LS(e){return typeof e=="number"?FS(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?FS(e.getTime()):Kn()}function FS(e){return e>9999999999?e/1e3:e}function Xo(e){if(nk(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(tk(e)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:l}=e;return tn({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:LS(i),timestamp:LS(s)||void 0,status:rk(l),op:r[Uy],origin:r[jy],_metrics_summary:kS(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function tk(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function nk(e){return typeof e.getSpanJSON=="function"}function VS(e){let{traceFlags:t}=e.spanContext();return t===ek}function rk(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var ik="_sentryRootSpan";function Qc(e){return e[ik]||e}var zd="production",ok="_frozenDsc";function Hy(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=tn({environment:n.environment||zd,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function US(e){let t=Mt();if(!t)return{};let n=Hy(Xo(e).trace_id||"",t),r=Qc(e),i=r[ok];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),a=s&&Cy(s);if(a)return a;let l=Xo(r),c=l.data||{},d=c[Vy];d!=null&&(n.sample_rate=`${d}`);let h=c[By],f=l.description;return h!=="url"&&f&&(n.transaction=f),n.sampled=String(VS(r)),t.emit("createDsc",n,r),n}function jS(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){ft&&oe.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function sk(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function HS(e,t,n,r){let i=Ud(n),o=w(w({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:zr(t)}),s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Kr(o,[s])}function $S(e,t,n,r){let i=Ud(n),o=e.type&&e.type!=="replay_event"?e.type:"event";sk(e,n&&n.sdk);let s=xy(e,i,r,t);return delete e.sdkProcessingMetadata,Kr(s,[[{type:o},e]])}function qd(e,t,n,r=0){return new Rr((i,o)=>{let s=e[r];if(t===null||typeof s!="function")i(t);else{let a=s(w({},t),n);ft&&s.id&&a===null&&oe.log(`Event processor "${s.id}" dropped event`),Ii(a)?a.then(l=>qd(e,l,n,r+1).then(i)).then(null,o):qd(e,a,n,r+1).then(i).then(null,o)}})}function WS(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;ak(e,t),r&&uk(e,r),dk(e,n),ck(e,i),lk(e,o)}function $y(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:d,attachments:h,propagationContext:f,transactionName:g,span:m}=t;el(e,"extra",n),el(e,"tags",r),el(e,"user",i),el(e,"contexts",o),el(e,"sdkProcessingMetadata",a),s&&(e.level=s),g&&(e.transactionName=g),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),h.length&&(e.attachments=[...e.attachments,...h]),e.propagationContext=w(w({},e.propagationContext),f)}function el(e,t,n){if(n&&Object.keys(n).length){e[t]=w({},e[t]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function ak(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t,l=tn(n);l&&Object.keys(l).length&&(e.extra=w(w({},l),e.extra));let c=tn(r);c&&Object.keys(c).length&&(e.tags=w(w({},c),e.tags));let d=tn(i);d&&Object.keys(d).length&&(e.user=w(w({},d),e.user));let h=tn(o);h&&Object.keys(h).length&&(e.contexts=w(w({},h),e.contexts)),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function ck(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function lk(e,t){e.sdkProcessingMetadata=w(w({},e.sdkProcessingMetadata),t)}function uk(e,t){e.contexts=w({trace:BS(t)},e.contexts),e.sdkProcessingMetadata=w({dynamicSamplingContext:US(t)},e.sdkProcessingMetadata);let n=Qc(t),r=Xo(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function dk(e,t){e.fingerprint=e.fingerprint?Ld(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function zS(e,t,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l=ne(w({},t),{event_id:t.event_id||n.event_id||dn(),timestamp:t.timestamp||Yr()}),c=n.integrations||e.integrations.map(b=>b.name);fk(l,e),mk(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&pk(l,e.stackParser);let d=yk(r,n.captureContext);n.mechanism&&Di(l,n.mechanism);let h=i?i.getEventProcessors():[],f=Wd().getScopeData();if(o){let b=o.getScopeData();$y(f,b)}if(d){let b=d.getScopeData();$y(f,b)}let g=[...n.attachments||[],...f.attachments];g.length&&(n.attachments=g),WS(l,f);let m=[...h,...f.eventProcessors];return qd(m,l,n).then(b=>(b&&hk(b),typeof s=="number"&&s>0?gk(b,s,a):b))}function fk(e,t){let{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:zd),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Wr(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Wr(s.value,o));let a=e.request;a&&a.url&&(a.url=Wr(a.url,o))}var GS=new WeakMap;function pk(e,t){let n=ge._sentryDebugIds;if(!n)return;let r,i=GS.get(t);i?r=i:(r=new Map,GS.set(t,r));let o=Object.entries(n).reduce((s,[a,l])=>{let c,d=r.get(a);d?c=d:(c=t(a),r.set(a,c));for(let h=c.length-1;h>=0;h--){let f=c[h];if(f.filename){s[f.filename]=l;break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function hk(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function mk(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function gk(e,t,n){if(!e)return null;let r=w(w(w(w(w({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>w(w({},i),i.data&&{data:Nr(i.data,t,n)}))}),e.user&&{user:Nr(e.user,t,n)}),e.contexts&&{contexts:Nr(e.contexts,t,n)}),e.extra&&{extra:Nr(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Nr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>w(w({},i),i.data&&{data:Nr(i.data,t,n)}))),r}function yk(e,t){if(!t)return e;let n=e?e.clone():new xn;return n.update(t),n}function qS(e){if(e)return vk(e)?{captureContext:e}:Ek(e)?{captureContext:e}:e}function vk(e){return e instanceof xn||typeof e=="function"}var _k=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Ek(e){return Object.keys(e).some(t=>_k.includes(t))}function Yd(e,t){return Ko().captureException(e,qS(t))}function tl(e,t){return Ko().captureEvent(e,t)}var wk="7";function bk(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Ck(e){return`${bk(e)}${e.projectId}/envelope/`}function Sk(e,t){return cy(w({sentry_key:e.publicKey,sentry_version:wk},t&&{sentry_client:`${t.name}/${t.version}`}))}function KS(e,t,n){return t||`${Ck(e)}?${Sk(e,n)}`}var ZS=[];function XS(e,t){let n={};return t.forEach(r=>{r&&Gy(e,r,n)}),n}function Wy(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Gy(e,t,n){if(n[t.name]){ft&&oe.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,ZS.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),ZS.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}ft&&oe.log(`Integration installed: ${t.name}`)}var JS="Not capturing exception because it's already been captured.",nl=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Td(e.dsn):ft&&oe.warn("No DSN provided, client will not send events."),this._dsn){let t=KS(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(ne(w({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){let r=dn();if(kd(e))return ft&&oe.log(JS),r;let i=w({event_id:r},t);return this._process(this.eventFromException(e,i).then(o=>this._captureEvent(o,i,n))),i.event_id}captureMessage(e,t,n,r){let i=w({event_id:dn()},n),o=ra(e)?e:String(e),s=Go(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(s.then(a=>this._captureEvent(a,i,r))),i.event_id}captureEvent(e,t,n){let r=dn();if(t&&t.originalException&&kd(t.originalException))return ft&&oe.log(JS),r;let i=w({event_id:r},t),o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,o||n)),i.event_id}captureSession(e){typeof e.release!="string"?ft&&oe.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Jc(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(r=>n&&r))):ur(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];Gy(this,e,this._integrations),t||Wy(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=$S(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])n=Iy(n,Ty(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=HS(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;ft&&oe.log(`Adding outcome: "${r}"`),this._outcomes[r]=(this._outcomes[r]||0)+1}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let r=n.indexOf(t);r>-1&&n.splice(r,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(r=>r(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(ft&&oe.error("Error while sending event:",t),t)):(ft&&oe.error("Transport disabled"),ur({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=XS(this,e),Wy(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let s of i){let a=s.mechanism;if(a&&a.handled===!1){n=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&n)&&(Jc(e,ne(w({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new Rr(t=>{let n=0,r=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(n+=r,e&&n>=e&&(clearInterval(i),t(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r=Zo()){let i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),zS(i,e,t,n,this,r).then(s=>{if(s===null)return s;let a=w(w({},r.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(s.contexts&&s.contexts.trace)&&a){let{traceId:l,spanId:c,parentSpanId:d,dsc:h}=a;s.contexts=w({trace:tn({trace_id:l,span_id:c,parent_span_id:d})},s.contexts);let f=h||Hy(l,this);s.sdkProcessingMetadata=w({dynamicSamplingContext:f},s.sdkProcessingMetadata)}return s})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(ft){let i=r;i.logLevel==="log"?oe.log(i.message):oe.warn(i)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,o=zy(e),s=QS(e),a=e.type||"error",l=`before send for type \`${a}\``,c=typeof i>"u"?void 0:jS(i);if(s&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),io(new Tn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let d=a==="replay_event"?"replay":a,h=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,h).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",d,e),new Tn("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return f;let g=Dk(this,r,f,t);return Ik(g,l)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",d,e),zy(e)){let b=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+b}throw new Tn(`${l} returned \`null\`, will not send event.`,"log")}let g=n&&n.getSession();!o&&g&&this._updateSessionFromEvent(g,f);let m=f.transaction_info;if(o&&m&&f.transaction!==e.transaction){let b="custom";f.transaction_info=ne(w({},m),{source:b})}return this.sendEvent(f,t),f}).then(null,f=>{throw f instanceof Tn?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Tn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
29
+ Reason: ${f}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,n])=>{let[r,i]=t.split(":");return{reason:r,category:i,quantity:n}})}};function Ik(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Ii(e))return e.then(r=>{if(!Tr(r)&&r!==null)throw new Tn(n);return r},r=>{throw new Tn(`${t} rejected with ${r}`)});if(!Tr(e)&&e!==null)throw new Tn(n);return e}function Dk(e,t,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t;if(QS(n)&&i)return i(n,r);if(zy(n)){if(n.spans&&s){let a=[];for(let l of n.spans){let c=s(l);c?a.push(c):e.recordDroppedEvent("before_send","span")}n.spans=a}if(o)return o(n,r)}return n}function QS(e){return e.type===void 0}function zy(e){return e.type==="transaction"}var Tk=64;function Kd(e,t,n=wy(e.bufferSize||Tk)){let r={},i=s=>n.drain(s);function o(s){let a=[];if(Bd(s,(h,f)=>{let g=Vd(f);if(Ry(r,g)){let m=eI(h,f);e.recordDroppedEvent("ratelimit_backoff",g,m)}else a.push(h)}),a.length===0)return ur({});let l=Kr(s[0],a),c=h=>{Bd(l,(f,g)=>{let m=eI(f,g);e.recordDroppedEvent(h,Vd(g),m)})},d=()=>t({body:Dy(l)}).then(h=>(h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&ft&&oe.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),r=Ay(r,h),h),h=>{throw c("network_error"),h});return n.add(d).then(h=>h,h=>{if(h instanceof Tn)return ft&&oe.error("Skipped sending event because buffer is full."),c("queue_overflow"),ur({});throw h})}return{send:o,flush:i}}function eI(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function qy(e,t,n=[t],r="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:cr})),version:cr}),e._metadata=i}var xk=100;function Zr(e,t){let n=Mt(),r=Zo();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=xk}=n.getOptions();if(o<=0)return;let s=Yr(),a=w({timestamp:s},e),l=i?aa(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,o))}var tI,Nk="FunctionToString",nI=new WeakMap,Rk=()=>({name:Nk,setupOnce(){tI=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=qo(this),n=nI.has(Mt())&&t!==void 0?t:this;return tI.apply(n,e)}}catch{}},setup(e){nI.set(e,!0)}}),Zd=Rk,Ak=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],Mk="InboundFilters",Ok=(e={})=>({name:Mk,processEvent(t,n,r){let i=r.getOptions(),o=Pk(e,i);return kk(t,o)?null:t}}),Jd=Ok;function Pk(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ak],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function kk(e,t){return t.ignoreInternal&&jk(e)?(ft&&oe.warn(`Event dropped due to being internal Sentry Error.
30
+ Event: ${xr(e)}`),!0):Lk(e,t.ignoreErrors)?(ft&&oe.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
31
+ Event: ${xr(e)}`),!0):$k(e)?(ft&&oe.warn(`Event dropped due to not having an error message, error type or stacktrace.
32
+ Event: ${xr(e)}`),!0):Fk(e,t.ignoreTransactions)?(ft&&oe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
33
+ Event: ${xr(e)}`),!0):Bk(e,t.denyUrls)?(ft&&oe.warn(`Event dropped due to being matched by \`denyUrls\` option.
34
+ Event: ${xr(e)}.
35
+ Url: ${Xd(e)}`),!0):Vk(e,t.allowUrls)?!1:(ft&&oe.warn(`Event dropped due to not being matched by \`allowUrls\` option.
36
+ Event: ${xr(e)}.
37
+ Url: ${Xd(e)}`),!0)}function Lk(e,t){return e.type||!t||!t.length?!1:Uk(e).some(n=>ia(n,t))}function Fk(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?ia(n,t):!1}function Bk(e,t){if(!t||!t.length)return!1;let n=Xd(e);return n?ia(n,t):!1}function Vk(e,t){if(!t||!t.length)return!0;let n=Xd(e);return n?ia(n,t):!0}function Uk(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function jk(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Hk(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Xd(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Hk(t):null}catch{return ft&&oe.error(`Cannot extract url for event ${xr(e)}`),null}}function $k(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}var Wk="Dedupe",Gk=()=>{let e;return{name:Wk,processEvent(t){if(t.type)return t;try{if(zk(t,e))return ft&&oe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Qd=Gk;function zk(e,t){return t?!!(qk(e,t)||Yk(e,t)):!1}function qk(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!oI(e,t)||!iI(e,t))}function Yk(e,t){let n=rI(t),r=rI(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!oI(e,t)||!iI(e,t))}function iI(e,t){let n=Ad(e),r=Ad(t);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 oI(e,t){let n=e.fingerprint,r=t.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 rI(e){return e.exception&&e.exception.values&&e.exception.values[0]}var Ht=ge,Yy=0;function Ky(){return Yy>0}function aL(){Yy++,setTimeout(()=>{Yy--})}function Jo(e,t={},n){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(qo(e))return e}catch{return e}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>Jo(s,t));return e.apply(this,o)}catch(o){throw aL(),Gd(s=>{s.addEventProcessor(a=>(t.mechanism&&(ca(a,void 0,void 0),Di(a,t.mechanism)),a.extra=ne(w({},a.extra),{arguments:i}),a)),Yd(o)}),o}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}xd(r,e),On(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var xi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ef(e,t){let n=Jy(e,t),r={type:t&&t.name,value:fL(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function cL(e,t,n,r){let i=Mt(),o=i&&i.getOptions().normalizeDepth,s=mL(t),a={__serialized__:Fd(t,o)};if(s)return{exception:{values:[ef(e,s)]},extra:a};let l={exception:{values:[{type:zo(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:pL(t,{isUnhandledRejection:r})}]},extra:a};if(n){let c=Jy(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function Zy(e,t){return{exception:{values:[ef(e,t)]}}}function Jy(e,t){let n=t.stacktrace||t.stack||"",r=uL(t),i=dL(t);try{return e(n,r,i)}catch{}return[]}var lL=/Minified React error #\d+;/i;function uL(e){return e&&lL.test(e.message)?1:0}function dL(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function fL(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function lI(e,t,n,r){let i=n&&n.syntheticException||void 0,o=tf(e,t,i,r);return Di(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),ur(o)}function uI(e,t,n="info",r,i){let o=r&&r.syntheticException||void 0,s=Xy(e,t,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),ur(s)}function tf(e,t,n,r,i){let o;if(Sd(t)&&t.error)return Zy(e,t.error);if(Id(t)||Jg(t)){let s=t;if("stack"in t)o=Zy(e,t);else{let a=s.name||(Id(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;o=Xy(e,l,n,r),ca(o,l)}return"code"in s&&(o.tags=ne(w({},o.tags),{"DOMException.code":`${s.code}`})),o}return Wo(t)?Zy(e,t):Tr(t)||zo(t)?(o=cL(e,t,n,i),Di(o,{synthetic:!0}),o):(o=Xy(e,t,n,r),ca(o,`${t}`,void 0),Di(o,{synthetic:!0}),o)}function Xy(e,t,n,r){let i={};if(r&&n){let o=Jy(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(ra(t)){let{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function pL(e,{isUnhandledRejection:t}){let n=ly(e),r=t?"promise rejection":"exception";return Sd(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:zo(e)?`Event \`${hL(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function hL(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function mL(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function dI(e,{metadata:t,tunnel:n,dsn:r}){let i=w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:zr(r)}),o=gL(e);return Kr(i,[o])}function gL(e){return[{type:"user_report"},e]}var rl=class extends nl{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),n=Ht.SENTRY_SDK_SOURCE||_y();qy(t,"browser",["browser"],n),super(t),t.sendClientReports&&Ht.document&&Ht.document.addEventListener("visibilitychange",()=>{Ht.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return lI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return uI(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){xi&&oe.warn("SDK not enabled, will not capture user feedback.");return}let t=dI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){xi&&oe.log("No outcomes to send");return}if(!this._dsn){xi&&oe.log("No dsn provided, will not send outcomes");return}xi&&oe.log("Sending outcomes:",e);let t=Ny(e,this._options.tunnel&&zr(this._dsn));this.sendEnvelope(t)}},fI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Xt=ge,yL=1e3,pI,Qy,ev;function tv(e){let t="dom";Pn(t,e),kn(t,vL)}function vL(){if(!Xt.document)return;let e=nn.bind(null,"dom"),t=hI(e,!0);Xt.document.addEventListener("click",t,!1),Xt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=Xt[n]&&Xt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(xt(r,"addEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=c[o]=c[o]||{refCount:0};if(!d.handler){let h=hI(e);d.handler=h,i.call(this,o,h,a)}d.refCount++}catch{}return i.call(this,o,s,a)}}),xt(r,"removeEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__||{},d=c[o];d&&(d.refCount--,d.refCount<=0&&(i.call(this,o,d.handler,a),d.handler=void 0,delete c[o]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,a)}}))})}function _L(e){if(e.type!==Qy)return!1;try{if(!e.target||e.target._sentryId!==ev)return!1}catch{}return!0}function EL(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function hI(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=wL(n);if(EL(n.type,r))return;On(n,"_sentryCaptured",!0),r&&!r._sentryId&&On(r,"_sentryId",dn());let i=n.type==="keypress"?"input":n.type;_L(n)||(e({event:n,name:i,global:t}),Qy=n.type,ev=r?r._sentryId:void 0),clearTimeout(pI),pI=Xt.setTimeout(()=>{ev=void 0,Qy=void 0},yL)}}function wL(e){try{return e.target}catch{return null}}var nf;function nv(e){let t="history";Pn(t,e),kn(t,bL)}function bL(){if(!My())return;let e=Xt.onpopstate;Xt.onpopstate=function(...n){let r=Xt.location.href,i=nf;if(nf=r,nn("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=nf,s=String(i);nf=s,nn("history",{from:o,to:s})}return n.apply(this,r)}}xt(Xt.history,"pushState",t),xt(Xt.history,"replaceState",t)}var rf={};function rv(e){let t=rf[e];if(t)return t;let n=Xt[e];if(Yc(n))return rf[e]=n.bind(Xt);let r=Xt.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&&o[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){fI&&oe.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(rf[e]=n.bind(Xt))}function of(e){rf[e]=void 0}var Qo="__sentry_xhr_v3__";function iv(e){let t="xhr";Pn(t,e),kn(t,CL)}function CL(){if(!Xt.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;xt(e,"open",function(t){return function(...n){let r=Kn()*1e3,i=Mn(n[0])?n[0].toUpperCase():void 0,o=SL(n[1]);if(!i||!o)return t.apply(this,n);this[Qo]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[Qo];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:Kn()*1e3,startTimestamp:r,xhr:this};nn("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?xt(this,"onreadystatechange",function(a){return function(...l){return s(),a.apply(this,l)}}):this.addEventListener("readystatechange",s),xt(this,"setRequestHeader",function(a){return function(...l){let[c,d]=l,h=this[Qo];return h&&Mn(c)&&Mn(d)&&(h.request_headers[c.toLowerCase()]=d),a.apply(this,l)}}),t.apply(this,n)}}),xt(e,"send",function(t){return function(...n){let r=this[Qo];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:Kn()*1e3,xhr:this};return nn("xhr",i),t.apply(this,n)}})}function SL(e){if(Mn(e))return e;try{return e.toString()}catch{}}function ov(e,t=rv("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let a=w({body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return of("fetch"),io("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=s,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return of("fetch"),n-=s,r--,io(l)}}return Kd(e,i)}var IL=30,DL=50;function sv(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?qr:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var TL=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,xL=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,NL=/\((\S*)(?::(\d+))(?::(\d+))\)/,RL=e=>{let t=TL.exec(e);if(t){let[,r,i,o]=t;return sv(r,qr,+i,+o)}let n=xL.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let o=NL.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}let[r,i]=vI(n[1]||qr,n[2]);return sv(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},mI=[IL,RL],AL=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ML=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,OL=e=>{let t=AL.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=ML.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||qr;return[r,n]=vI(r,n),sv(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},gI=[DL,OL],yI=[mI,gI],av=dy(...yI),vI=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:qr,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},sf=1024,kL="Breadcrumbs",LL=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:kL,setup(n){t.console&&fy(VL(n)),t.dom&&tv(BL(n,t.dom)),t.xhr&&iv(UL(n)),t.fetch&&gy(jL(n)),t.history&&nv(HL(n)),t.sentry&&n.on("beforeSendEvent",FL(n))}}},_I=LL;function FL(e){return function(t){Mt()===e&&Zr({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:xr(t)},{event:t})}}function BL(e,t){return function(n){if(Mt()!==e)return;let r,i,o=typeof t=="object"?t.serializeAttribute:void 0,s=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;s&&s>sf&&(xi&&oe.warn(`\`dom.maxStringLength\` cannot exceed ${sf}, but a value of ${s} was configured. Sentry will use ${sf} instead.`),s=sf),typeof o=="string"&&(o=[o]);try{let l=n.event,c=$L(l)?l.target:l;r=zc(c,{keyAttrs:o,maxStringLength:s}),i=sy(c)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),Zr(a,{event:n.event,name:n.name,global:n.global})}}function VL(e){return function(t){if(Mt()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:by(t.level),message:Dd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${Dd(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;Zr(n,{input:t.args,level:t.level})}}function UL(e){return function(t){if(Mt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Qo];if(!n||!r||!i)return;let{method:o,url:s,status_code:a,body:l}=i,c={method:o,url:s,status_code:a},d={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r};Zr({category:"xhr",data:c,type:"http"},d)}}function jL(e){return function(t){if(Mt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};Zr({category:"fetch",data:i,level:"error",type:"http"},o)}else{let i=t.response,o=ne(w({},t.fetchData),{status_code:i&&i.status}),s={input:t.args,response:i,startTimestamp:n,endTimestamp:r};Zr({category:"fetch",data:o,type:"http"},s)}}}function HL(e){return function(t){if(Mt()!==e)return;let n=t.from,r=t.to,i=Zc(Ht.location.href),o=n?Zc(n):void 0,s=Zc(r);(!o||!o.path)&&(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Zr({category:"navigation",data:{from:n,to:r}})}}function $L(e){return!!e&&!!e.target}var WL=["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"],GL="BrowserApiErrors",zL=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:GL,setupOnce(){t.setTimeout&&xt(Ht,"setTimeout",EI),t.setInterval&&xt(Ht,"setInterval",EI),t.requestAnimationFrame&&xt(Ht,"requestAnimationFrame",qL),t.XMLHttpRequest&&"XMLHttpRequest"in Ht&&xt(XMLHttpRequest.prototype,"send",YL);let n=t.eventTarget;n&&(Array.isArray(n)?n:WL).forEach(KL)}}},wI=zL;function EI(e){return function(...t){let n=t[0];return t[0]=Jo(n,{mechanism:{data:{function:lr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function qL(e){return function(t){return e.apply(this,[Jo(t,{mechanism:{data:{function:"requestAnimationFrame",handler:lr(e)},handled:!1,type:"instrument"}})])}}function YL(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&xt(n,r,function(i){let o={mechanism:{data:{function:r,handler:lr(i)},handled:!1,type:"instrument"}},s=qo(i);return s&&(o.mechanism.data.handler=lr(s)),Jo(i,o)})}),e.apply(this,t)}}function KL(e){let t=Ht,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(xt(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=Jo(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:lr(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,Jo(o,{mechanism:{data:{function:"addEventListener",handler:lr(o),target:e},handled:!1,type:"instrument"}}),s])}}),xt(n,"removeEventListener",function(r){return function(i,o,s){let a=o;try{let l=a&&a.__sentry_wrapped__;l&&r.call(this,i,l,s)}catch{}return r.call(this,i,a,s)}}))}var ZL="GlobalHandlers",XL=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:ZL,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(JL(n),bI("onerror")),t.onunhandledrejection&&(QL(n),bI("onunhandledrejection"))}}},CI=XL;function JL(e){yy(t=>{let{stackParser:n,attachStacktrace:r}=SI();if(Mt()!==e||Ky())return;let{msg:i,url:o,line:s,column:a,error:l}=t,c=nF(tf(n,l||i,void 0,r,!1),o,s,a);c.level="error",tl(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function QL(e){vy(t=>{let{stackParser:n,attachStacktrace:r}=SI();if(Mt()!==e||Ky())return;let i=eF(t),o=Go(i)?tF(i):tf(n,i,void 0,r,!0);o.level="error",tl(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function eF(e){if(Go(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function tF(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function nF(e,t,n,r){let i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,h=Mn(t)&&t.length>0?t:oy();return l.length===0&&l.push({colno:c,filename:h,function:qr,in_app:!0,lineno:d}),e}function bI(e){xi&&oe.log(`Global Handler attached: ${e}`)}function SI(){let e=Mt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var II=()=>({name:"HttpContext",preprocessEvent(e){if(!Ht.navigator&&!Ht.location&&!Ht.document)return;let t=e.request&&e.request.url||Ht.location&&Ht.location.href,{referrer:n}=Ht.document||{},{userAgent:r}=Ht.navigator||{},i=w(w(w({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=ne(w(w({},e.request),t&&{url:t}),{headers:i});e.request=o}}),rF="cause",iF=5,oF="LinkedErrors",sF=(e={})=>{let t=e.limit||iF,n=e.key||rF;return{name:oF,preprocessEvent(r,i,o){let s=o.getOptions();ry(ef,s.stackParser,s.maxValueLength,n,t,r,i)}}},DI=sF;function cv(e){return[Jd(),Zd(),wI(),_I(),CI(),DI(),Qd(),II()]}var lv=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},_t=class B0{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new B0),this.INSTANCE}captureException(t,n,r){S.error(t),this.getNewScope(n,r).captureException(t)}captureMessage(t,n,r,i){this.getNewScope(r,i).captureMessage(t,n??"error")}captureError(t,n,r,i){S.error(t,n);let o=this.getNewScope(r,i),s=new lv(t,n);o.captureException(s)}setGlobalContext(t,n){this.contexts[t]=w({context:n},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,n){let r=new xn;if(r.setClient(this.client),r.setUser(this.user),t?.triggerContext){let i=t.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&r.setExtras(t),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",de.getTimezone()),r}init(){let t=cv({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new rl({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:ov,stackParser:av,integrations:t,environment:Dn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:Dn.debug}),this.client.init()}},de=class{static tz;static isValidURL(e){try{return new URL(e)}catch{return}}static isNull(e){return!e||e==="null"||e==="undefined"}static removeFromArray(e,t){let n=e.indexOf(t);return n===-1?!1:(e.splice(n,1),!0)}static formatCurrency(e,t){if(e==0&&t)return"Free";let n=Ae.get(),r=Dt.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||S.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,a;if(s&&i===o)a=bd.format(e*100,s);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(c){return _t.getInstance().captureException(c,{currentCurrency:o,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(a=a.concat(` ${o}`))}return a}static formatNumber(e){return new Intl.NumberFormat(this.getLang(),{notation:"compact"}).format(e)}static getLang(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}static getTimezone(){if(this.tz)return this.tz;try{return this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.tz}catch{return""}}static documentReady(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}static onDocumentLoaded(e){document.readyState==="complete"?e():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e()})}static showSnackbar(e){let t=document.createElement("span");t.id="snackbar",t.innerText=e,document.body.appendChild(t),t.className="show",setTimeout(()=>{t.classList.remove("show"),document.body.removeChild(t)},3e3)}static async retrySelectorForElements(e,t=10,n=document){let r=0,i=document.querySelectorAll("nonexistent-tag");for(;r<t;){let o=Math.min(100*2**r,5e3);if(await TI.JSUtils.sleep(o),i=n.querySelectorAll(e),i.length)return S.debug(`Attempt ${r+1}: ${i.length} elements found with ${e}`),i;S.debug(`Attempt ${r+1}: Elements not found with ${e}. Retrying after ${o}ms.`),r++}return S.warn(`Max attempts reached. Element not found with ${e}.`),i}static async retrySelector(e,t=10,n=document){return(await this.retrySelectorForElements(e,t,n)).item(0)}static async getCartAttributes(){let e=await vt.get(Ce.DEVICE_ID),t=await un.get(Ce.ID,"");return[{key:"letscooee_did",value:e},{key:"letscooee_sid",value:t},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}static onNodesRemoved(e,t,n=document.body){let r=new MutationObserver(i=>{i.forEach(o=>{o.removedNodes.forEach(s=>{(s===e||s.contains(e))&&(t(),r.disconnect())})})});r.observe(n,{childList:!0})}};function ua(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:n})}var Xr=class Yp{transform(t){return t==null?null:de.formatCurrency(t)}static \u0275fac=function(t){return new(t||Yp)};static \u0275pipe=Vo({name:"cooeeCurrency",type:Yp,pure:!0})},RI=Pe(lf()),aF=Object.prototype.toString,fa=Array.isArray||function(e){return aF.call(e)==="[object Array]"};function dv(e){return typeof e=="function"}function cF(e){return fa(e)?"array":typeof e}function uv(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function xI(e,t){return e!=null&&typeof e=="object"&&t in e}function lF(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var uF=RegExp.prototype.test;function dF(e,t){return uF.call(e,t)}var fF=/\S/;function pF(e){return!dF(fF,e)}var hF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function mF(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return hF[t]})}var gF=/\s*/,yF=/\s+/,NI=/\s*=/,vF=/\s*\}/,_F=/#|\^|\/|>|\{|&|=|!/;function EF(e,t){if(!e)return[];var n=!1,r=[],i=[],o=[],s=!1,a=!1,l="",c=0;function d(){if(s&&!a)for(;o.length;)delete i[o.pop()];else o=[];s=!1,a=!1}var h,f,g;function m(V){if(typeof V=="string"&&(V=V.split(yF,2)),!fa(V)||V.length!==2)throw new Error("Invalid tags: "+V);h=new RegExp(uv(V[0])+"\\s*"),f=new RegExp("\\s*"+uv(V[1])),g=new RegExp("\\s*"+uv("}"+V[1]))}m(t||dr.tags);for(var b=new ol(e),I,R,j,U,M,q;!b.eos();){if(I=b.pos,j=b.scanUntil(h),j)for(var xe=0,st=j.length;xe<st;++xe)U=j.charAt(xe),pF(U)?(o.push(i.length),l+=U):(a=!0,n=!0,l+=" "),i.push(["text",U,I,I+1]),I+=1,U===`
38
+ `&&(d(),l="",c=0,n=!1);if(!b.scan(h))break;if(s=!0,R=b.scan(_F)||"name",b.scan(gF),R==="="?(j=b.scanUntil(NI),b.scan(NI),b.scanUntil(f)):R==="{"?(j=b.scanUntil(g),b.scan(vF),b.scanUntil(f),R="&"):j=b.scanUntil(f),!b.scan(f))throw new Error("Unclosed tag at "+b.pos);if(R==">"?M=[R,j,I,b.pos,l,c,n]:M=[R,j,I,b.pos],c++,i.push(M),R==="#"||R==="^")r.push(M);else if(R==="/"){if(q=r.pop(),!q)throw new Error('Unopened section "'+j+'" at '+I);if(q[1]!==j)throw new Error('Unclosed section "'+q[1]+'" at '+I)}else R==="name"||R==="{"||R==="&"?a=!0:R==="="&&m(j)}if(d(),q=r.pop(),q)throw new Error('Unclosed section "'+q[1]+'" at '+b.pos);return bF(wF(i))}function wF(e){for(var t=[],n,r,i=0,o=e.length;i<o;++i)n=e[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(t.push(n),r=n));return t}function bF(e){for(var t=[],n=t,r=[],i,o,s=0,a=e.length;s<a;++s)switch(i=e[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:t;break;default:n.push(i)}return t}function ol(e){this.string=e,this.tail=e,this.pos=0}ol.prototype.eos=function(){return this.tail===""};ol.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};ol.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function da(e,t){this.view=e,this.cache={".":this.view},this.parent=t}da.prototype.push=function(e){return new da(e,this)};da.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var r=this,i,o,s,a=!1;r;){if(e.indexOf(".")>0)for(i=r.view,o=e.split("."),s=0;i!=null&&s<o.length;)s===o.length-1&&(a=xI(i,o[s])||lF(i,o[s])),i=i[o[s++]];else i=r.view[e],a=xI(r.view,e);if(a){n=i;break}r=r.parent}t[e]=n}return dv(n)&&(n=n.call(this.view)),n};function Ln(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Ln.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Ln.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||dr.tags).join(":"),i=typeof n<"u",o=i?n.get(r):void 0;return o==null&&(o=EF(e,t),i&&n.set(r,o)),o};Ln.prototype.render=function(e,t,n,r){var i=this.getConfigTags(r),o=this.parse(e,i),s=t instanceof da?t:new da(t,void 0);return this.renderTokens(o,s,n,e,r)};Ln.prototype.renderTokens=function(e,t,n,r,i){for(var o="",s,a,l,c=0,d=e.length;c<d;++c)l=void 0,s=e[c],a=s[0],a==="#"?l=this.renderSection(s,t,n,r,i):a==="^"?l=this.renderInverted(s,t,n,r,i):a===">"?l=this.renderPartial(s,t,n,i):a==="&"?l=this.unescapedValue(s,t):a==="name"?l=this.escapedValue(s,t,i):a==="text"&&(l=this.rawValue(s)),l!==void 0&&(o+=l);return o};Ln.prototype.renderSection=function(e,t,n,r,i){var o=this,s="",a=t.lookup(e[1]);function l(h){return o.render(h,t,n,i)}if(a){if(fa(a))for(var c=0,d=a.length;c<d;++c)s+=this.renderTokens(e[4],t.push(a[c]),n,r,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")s+=this.renderTokens(e[4],t.push(a),n,r,i);else if(dv(a)){if(typeof r!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(t.view,r.slice(e[3],e[5]),l),a!=null&&(s+=a)}else s+=this.renderTokens(e[4],t,n,r,i);return s}};Ln.prototype.renderInverted=function(e,t,n,r,i){var o=t.lookup(e[1]);if(!o||fa(o)&&o.length===0)return this.renderTokens(e[4],t,n,r,i)};Ln.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),i=e.split(`
39
+ `),o=0;o<i.length;o++)i[o].length&&(o>0||!n)&&(i[o]=r+i[o]);return i.join(`
40
+ `)};Ln.prototype.renderPartial=function(e,t,n,r){if(n){var i=this.getConfigTags(r),o=dv(n)?n(e[1]):n[e[1]];if(o!=null){var s=e[6],a=e[5],l=e[4],c=o;a==0&&l&&(c=this.indentPartial(o,l,s));var d=this.parse(c,i);return this.renderTokens(d,t,n,c,r)}}};Ln.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Ln.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||dr.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&r===dr.escape?String(i):r(i)};Ln.prototype.rawValue=function(e){return e[1]};Ln.prototype.getConfigTags=function(e){return fa(e)?e:e&&typeof e=="object"?e.tags:void 0};Ln.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!fa(e))return e.escape};var dr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){il.templateCache=e},get templateCache(){return il.templateCache}},il=new Ln;dr.clearCache=function(){return il.clearCache()};dr.parse=function(e,t){return il.parse(e,t)};dr.render=function(e,t,n,r){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+cF(e)+'" was given as the first argument for mustache#render(template, view, partials)');return il.render(e,t,n,r)};dr.escape=mF;dr.Scanner=ol;dr.Context=da;dr.Writer=Ln;var fn=dr;fn.escape=RI.MustacheUtils.escapeHtml;var uf=class Zp{transform(t,n){return t?fn.render(t,w({},n)):null}static \u0275fac=function(t){return new(t||Zp)};static \u0275pipe=Vo({name:"cooeeDynamicVariables",type:Zp,pure:!0})},fv={};(function e(t,n,r,i){var o=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var D=new OffscreenCanvas(1,1),x=D.getContext("2d");x.fillRect(0,0,1,1);var Y=D.transferToImageBitmap();try{x.createPattern(Y,"no-repeat")}catch{return!1}return!0}();function l(){}function c(D){var x=n.exports.Promise,Y=x!==void 0?x:t.Promise;return typeof Y=="function"?new Y(D):(D(l,l),null)}var d=function(D,x){return{transform:function(Y){if(D)return Y;if(x.has(Y))return x.get(Y);var te=new OffscreenCanvas(Y.width,Y.height),se=te.getContext("2d");return se.drawImage(Y,0,0),x.set(Y,te),te},clear:function(){x.clear()}}}(a,new Map),h=function(){var D=Math.floor(16.666666666666668),x,Y,te={},se=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(x=function(_e){var me=Math.random();return te[me]=requestAnimationFrame(function le(be){se===be||se+D-1<be?(se=be,delete te[me],_e()):te[me]=requestAnimationFrame(le)}),me},Y=function(_e){te[_e]&&cancelAnimationFrame(te[_e])}):(x=function(_e){return setTimeout(_e,D)},Y=function(_e){return clearTimeout(_e)}),{frame:x,cancel:Y}}(),f=function(){var D,x,Y={};function te(se){function _e(me,le){se.postMessage({options:me||{},callback:le})}se.init=function(me){var le=me.transferControlToOffscreen();se.postMessage({canvas:le},[le])},se.fire=function(me,le,be){if(x)return _e(me,null),x;var Be=Math.random().toString(36).slice(2);return x=c(function(Tt){function Fe(Xe){Xe.data.callback===Be&&(delete Y[Be],se.removeEventListener("message",Fe),x=null,d.clear(),be(),Tt())}se.addEventListener("message",Fe),_e(me,Be),Y[Be]=Fe.bind(null,{data:{callback:Be}})}),x},se.reset=function(){se.postMessage({reset:!0});for(var me in Y)Y[me](),delete Y[me]}}return function(){if(D)return D;if(!r&&o){var se=["var CONFETTI, SIZE = {}, module = {};","("+e.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(`
41
+ `);try{D=new Worker(URL.createObjectURL(new Blob([se])))}catch(_e){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",_e),null}te(D)}return D}}(),g={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 m(D,x){return x?x(D):D}function b(D){return D!=null}function I(D,x,Y){return m(D&&b(D[x])?D[x]:g[x],Y)}function R(D){return D<0?0:Math.floor(D)}function j(D,x){return Math.floor(Math.random()*(x-D))+D}function U(D){return parseInt(D,16)}function M(D){return D.map(q)}function q(D){var x=String(D).replace(/[^0-9a-f]/gi,"");return x.length<6&&(x=x[0]+x[0]+x[1]+x[1]+x[2]+x[2]),{r:U(x.substring(0,2)),g:U(x.substring(2,4)),b:U(x.substring(4,6))}}function xe(D){var x=I(D,"origin",Object);return x.x=I(x,"x",Number),x.y=I(x,"y",Number),x}function st(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function V(D){var x=D.getBoundingClientRect();D.width=x.width,D.height=x.height}function he(D){var x=document.createElement("canvas");return x.style.position="fixed",x.style.top="0px",x.style.left="0px",x.style.pointerEvents="none",x.style.zIndex=D,x}function ee(D,x,Y,te,se,_e,me,le,be){D.save(),D.translate(x,Y),D.rotate(_e),D.scale(te,se),D.arc(0,0,1,me,le,be),D.restore()}function ue(D){var x=D.angle*(Math.PI/180),Y=D.spread*(Math.PI/180);return{x:D.x,y:D.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:D.startVelocity*.5+Math.random()*D.startVelocity,angle2D:-x+(.5*Y-Math.random()*Y),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:D.color,shape:D.shape,tick:0,totalTicks:D.ticks,decay:D.decay,drift:D.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:D.gravity*3,ovalScalar:.6,scalar:D.scalar,flat:D.flat}}function Oe(D,x){x.x+=Math.cos(x.angle2D)*x.velocity+x.drift,x.y+=Math.sin(x.angle2D)*x.velocity+x.gravity,x.velocity*=x.decay,x.flat?(x.wobble=0,x.wobbleX=x.x+10*x.scalar,x.wobbleY=x.y+10*x.scalar,x.tiltSin=0,x.tiltCos=0,x.random=1):(x.wobble+=x.wobbleSpeed,x.wobbleX=x.x+10*x.scalar*Math.cos(x.wobble),x.wobbleY=x.y+10*x.scalar*Math.sin(x.wobble),x.tiltAngle+=.1,x.tiltSin=Math.sin(x.tiltAngle),x.tiltCos=Math.cos(x.tiltAngle),x.random=Math.random()+2);var Y=x.tick++/x.totalTicks,te=x.x+x.random*x.tiltCos,se=x.y+x.random*x.tiltSin,_e=x.wobbleX+x.random*x.tiltCos,me=x.wobbleY+x.random*x.tiltSin;if(D.fillStyle="rgba("+x.color.r+", "+x.color.g+", "+x.color.b+", "+(1-Y)+")",D.beginPath(),s&&x.shape.type==="path"&&typeof x.shape.path=="string"&&Array.isArray(x.shape.matrix))D.fill(We(x.shape.path,x.shape.matrix,x.x,x.y,Math.abs(_e-te)*.1,Math.abs(me-se)*.1,Math.PI/10*x.wobble));else if(x.shape.type==="bitmap"){var le=Math.PI/10*x.wobble,be=Math.abs(_e-te)*.1,Be=Math.abs(me-se)*.1,Tt=x.shape.bitmap.width*x.scalar,Fe=x.shape.bitmap.height*x.scalar,Xe=new DOMMatrix([Math.cos(le)*be,Math.sin(le)*be,-Math.sin(le)*Be,Math.cos(le)*Be,x.x,x.y]);Xe.multiplySelf(new DOMMatrix(x.shape.matrix));var Rt=D.createPattern(d.transform(x.shape.bitmap),"no-repeat");Rt.setTransform(Xe),D.globalAlpha=1-Y,D.fillStyle=Rt,D.fillRect(x.x-Tt/2,x.y-Fe/2,Tt,Fe),D.globalAlpha=1}else if(x.shape==="circle")D.ellipse?D.ellipse(x.x,x.y,Math.abs(_e-te)*x.ovalScalar,Math.abs(me-se)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI):ee(D,x.x,x.y,Math.abs(_e-te)*x.ovalScalar,Math.abs(me-se)*x.ovalScalar,Math.PI/10*x.wobble,0,2*Math.PI);else if(x.shape==="star")for(var Te=Math.PI/2*3,u=4*x.scalar,p=8*x.scalar,v=x.x,T=x.y,L=5,F=Math.PI/L;L--;)v=x.x+Math.cos(Te)*p,T=x.y+Math.sin(Te)*p,D.lineTo(v,T),Te+=F,v=x.x+Math.cos(Te)*u,T=x.y+Math.sin(Te)*u,D.lineTo(v,T),Te+=F;else D.moveTo(Math.floor(x.x),Math.floor(x.y)),D.lineTo(Math.floor(x.wobbleX),Math.floor(se)),D.lineTo(Math.floor(_e),Math.floor(me)),D.lineTo(Math.floor(te),Math.floor(x.wobbleY));return D.closePath(),D.fill(),x.tick<x.totalTicks}function lt(D,x,Y,te,se){var _e=x.slice(),me=D.getContext("2d"),le,be,Be=c(function(Tt){function Fe(){le=be=null,me.clearRect(0,0,te.width,te.height),d.clear(),se(),Tt()}function Xe(){r&&!(te.width===i.width&&te.height===i.height)&&(te.width=D.width=i.width,te.height=D.height=i.height),!te.width&&!te.height&&(Y(D),te.width=D.width,te.height=D.height),me.clearRect(0,0,te.width,te.height),_e=_e.filter(function(Rt){return Oe(me,Rt)}),_e.length?le=h.frame(Xe):Fe()}le=h.frame(Xe),be=Fe});return{addFettis:function(Tt){return _e=_e.concat(Tt),Be},canvas:D,promise:Be,reset:function(){le&&h.cancel(le),be&&be()}}}function ot(D,x){var Y=!D,te=!!I(x||{},"resize"),se=!1,_e=I(x,"disableForReducedMotion",Boolean),me=o&&!!I(x||{},"useWorker"),le=me?f():null,be=Y?st:V,Be=D&&le?!!D.__confetti_initialized:!1,Tt=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,Fe;function Xe(Te,u,p){for(var v=I(Te,"particleCount",R),T=I(Te,"angle",Number),L=I(Te,"spread",Number),F=I(Te,"startVelocity",Number),K=I(Te,"decay",Number),et=I(Te,"gravity",Number),He=I(Te,"drift",Number),Me=I(Te,"colors",M),ut=I(Te,"ticks",Number),J=I(Te,"shapes"),Ee=I(Te,"scalar"),pe=!!I(Te,"flat"),tt=xe(Te),yn=v,gn=[],it=D.width*tt.x,fe=D.height*tt.y;yn--;)gn.push(ue({x:it,y:fe,angle:T,spread:L,startVelocity:F,color:Me[yn%Me.length],shape:J[j(0,J.length)],ticks:ut,decay:K,gravity:et,drift:He,scalar:Ee,flat:pe}));return Fe?Fe.addFettis(gn):(Fe=lt(D,gn,be,u,p),Fe.promise)}function Rt(Te){var u=_e||I(Te,"disableForReducedMotion",Boolean),p=I(Te,"zIndex",Number);if(u&&Tt)return c(function(F){F()});Y&&Fe?D=Fe.canvas:Y&&!D&&(D=he(p),document.body.appendChild(D)),te&&!Be&&be(D);var v={width:D.width,height:D.height};le&&!Be&&le.init(D),Be=!0,le&&(D.__confetti_initialized=!0);function T(){if(le){var F={getBoundingClientRect:function(){if(!Y)return D.getBoundingClientRect()}};be(F),le.postMessage({resize:{width:F.width,height:F.height}});return}v.width=v.height=null}function L(){Fe=null,te&&(se=!1,t.removeEventListener("resize",T)),Y&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,Be=!1)}return te&&!se&&(se=!0,t.addEventListener("resize",T,!1)),le?le.fire(Te,v,L):Xe(Te,v,L)}return Rt.reset=function(){le&&le.reset(),Fe&&Fe.reset()},Rt}var y;function Ft(){return y||(y=ot(null,{useWorker:!0,resize:!0})),y}function We(D,x,Y,te,se,_e,me){var le=new Path2D(D),be=new Path2D;be.addPath(le,new DOMMatrix(x));var Be=new Path2D;return Be.addPath(be,new DOMMatrix([Math.cos(me)*se,Math.sin(me)*se,-Math.sin(me)*_e,Math.cos(me)*_e,Y,te])),Be}function Gt(D){if(!s)throw new Error("path confetti are not supported in this browser");var x,Y;typeof D=="string"?x=D:(x=D.path,Y=D.matrix);var te=new Path2D(x),se=document.createElement("canvas"),_e=se.getContext("2d");if(!Y){for(var me=1e3,le=me,be=me,Be=0,Tt=0,Fe,Xe,Rt=0;Rt<me;Rt+=2)for(var Te=0;Te<me;Te+=2)_e.isPointInPath(te,Rt,Te,"nonzero")&&(le=Math.min(le,Rt),be=Math.min(be,Te),Be=Math.max(Be,Rt),Tt=Math.max(Tt,Te));Fe=Be-le,Xe=Tt-be;var u=10,p=Math.min(u/Fe,u/Xe);Y=[p,0,0,p,-Math.round(Fe/2+le)*p,-Math.round(Xe/2+be)*p]}return{type:"path",path:x,matrix:Y}}function we(D){var x,Y=1,te="#000000",se='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof D=="string"?x=D:(x=D.text,Y="scalar"in D?D.scalar:Y,se="fontFamily"in D?D.fontFamily:se,te="color"in D?D.color:te);var _e=10*Y,me=""+_e+"px "+se,le=new OffscreenCanvas(_e,_e),be=le.getContext("2d");be.font=me;var Be=be.measureText(x),Tt=Math.ceil(Be.actualBoundingBoxRight+Be.actualBoundingBoxLeft),Fe=Math.ceil(Be.actualBoundingBoxAscent+Be.actualBoundingBoxDescent),Xe=2,Rt=Be.actualBoundingBoxLeft+Xe,Te=Be.actualBoundingBoxAscent+Xe;Tt+=Xe+Xe,Fe+=Xe+Xe,le=new OffscreenCanvas(Tt,Fe),be=le.getContext("2d"),be.font=me,be.fillStyle=te,be.fillText(x,Rt,Te);var u=1/Y;return{type:"bitmap",bitmap:le.transferToImageBitmap(),matrix:[u,0,0,u,-Tt*u/2,-Fe*u/2]}}n.exports=function(){return Ft().apply(this,arguments)},n.exports.reset=function(){Ft().reset()},n.exports.create=ot,n.exports.shapeFromPath=Gt,n.exports.shapeFromText=we})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),fv,!1);var AI=fv.exports,AY=fv.exports.create,df=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 t=[],n=Date.now()+2e3,r=()=>{t.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<n&&e>0&&(requestAnimationFrame(r),e--)};r(),await Promise.all(t)}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 AI(e)}static async realisticFire(e,t){let n={origin:{y:.7}};await this.fire(Object.assign({},n,t,{particleCount:Math.floor(200*e)}))}},pa=class Xp{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||Xp)(Yt(Kg,16))};static \u0275pipe=Vo({name:"safeHtml",type:Xp,pure:!0})},CF=(e,t)=>t.minValue;function SF(e,t){if(e&1&&(X(0,"li",6)(1,"div",7),qe(2,"div",8),ar(3,"cooeeCurrency"),ar(4,"safeHtml"),qe(5,"img",9),X(6,"div",10),jt(7),Q()()()),e&2){let n=t.$implicit,r=re(2);Ji("left",n.calculatedAlignment+"%"),Z(2),Ue("innerHTML",Dr(4,7,Dr(3,5,n.minValue)),jc),Z(3),Ue("src",r.getIconURL(n),cn),Z(2),Ks(n.label)}}function IF(e,t){if(e&1&&(Hr(0)(1),qe(2,"div",0),ar(3,"cooeeDynamicVariables"),ar(4,"safeHtml"),X(5,"div",1)(6,"ul",2)(7,"div",3),qe(8,"div",4),Q(),Kt(9,SF,8,9,"li",5,CF),Q()()),e&2){let n=re(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;Z(2),Ue("innerHTML",Dr(4,6,t0(3,3,i,n.localDynamicVariables())),jc),Z(6),Ji("width",r.cartValuePercentage+"%"),Z(),Zt(r.milestones)}}var pf=class Kp{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Gs({});calculatedState=Gs({});_engagementTrigger=Gs(null);set engagementTrigger(t){this._engagementTrigger.set(t)}ngOnInit(){S.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){S.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===ff.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===ff.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===ff.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>S.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){S.warn("Milestones not available in progress bar config",t);return}let n=await this.cart.getNormalisedCart(),r=t.progressBarConfig,i=r.milestones.at(-1),o=i.minValue+Math.floor(i.minValue*5/100),s=n.originalAmount,a=Math.min(s,o),l=100/r.milestones.length,c=l;for(let g of r.milestones)g.calculatedAlignment=c,c+=l;let d=this.calculateTrackedProgress(a,r.milestones);S.debug("Cart value:",s,`, percentage: ${d}%`),this.celebrate(t,s);let h={milestonesReady:!0,cartValuePercentage:d,milestones:r.milestones},f=r.milestones.find(g=>g.minValue>s);if(f){this.localDynamicVariables.set({amount_left:de.formatCurrency(f.minValue-s)}),h.nextMilestone=f,this.calculatedState.set(h);return}h.lastMilestone=i,this.calculatedState.set(h)}celebrate(t,n){let r=[...t.progressBarConfig.milestones].reverse().find(o=>o.minValue<n);if(!r)return;let i=`lc/en/${t.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),df.realistic())}calculateTrackedProgress(t,n){if(t<=n[0].minValue)return t/n[0].minValue*n[0].calculatedAlignment;if(t>=n[n.length-1].minValue)return 100;for(let r=0;r<n.length-1;r++){let i=n[r].minValue,o=n[r+1].minValue,s=n[r].calculatedAlignment,a=n[r+1].calculatedAlignment;if(t>=i&&t<=o)return(t-i)/(o-i)*(a-s)+s}return 0}static \u0275fac=function(t){return new(t||Kp)(Yt(qt))};static \u0275cmp=St({type:Kp,selectors:[["cooee-progressbar"]],inputs:{cart:"cart",engagementTrigger:"engagementTrigger"},decls:1,vars:1,consts:[["id","lc-heading",1,"lc:font-medium","lc:text-center","lc:text-[12px]","lc-primary-text",3,"innerHTML"],[1,"lc:mt-4","lc:w-[95%]"],["id","lc-milestone-list",1,"lc:flex","lc:items-center","lc:relative","lc:text-[10px]","lc:font-medium"],["id","lc-untracked-path",1,"lc:w-full","lc:bg-gray-200","lc:h-1","lc:absolute","lc-progress-rail"],["id","lc-tracked-path",1,"lc:bg-green-700","lc:h-full","lc:block!"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]",3,"left"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:justify-between","lc:absolute","lc:h-full","lc:w-[100px]"],["id","lc-milestone-value",1,"lc-milestone-value",3,"innerHTML"],["width","20","height","20","id","lc-milestone-icon","alt","milestone icon",1,"lc-milestone-icon","lc:bg-green-700",3,"src"],["id","lc-milestone-label",1,"lc="]],template:function(t,n){t&1&&At(0,IF,11,8),t&2&&Ut(n.calculatedState().milestonesReady?0:-1)},dependencies:[uf,pa,Xr],styles:["[_nghost-%COMP%]{display:block;padding:10px;background:linear-gradient(0deg,rgba(44,135,74,.1) 0%,transparent 100%)}.lc-milestone-icon[_ngcontent-%COMP%]{padding:5px;border-radius:1000px}.lc-progress-rail[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{transition:width .5s ease-in-out}"]})};function DF(e,t){return t={exports:{}},e(t,t.exports),t.exports}var TF=AF,xF=OF,NF=LF,Qr=[],pr=[],RF=typeof Uint8Array<"u"?Uint8Array:Array,pv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(es=0,MI=pv.length;es<MI;++es)Qr[es]=pv[es],pr[pv.charCodeAt(es)]=es;var es,MI;pr[45]=62;pr[95]=63;function YI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function AF(e){var t=YI(e),n=t[0],r=t[1];return(n+r)*3/4-r}function MF(e,t,n){return(t+n)*3/4-n}function OF(e){var t,n=YI(e),r=n[0],i=n[1],o=new RF(MF(e,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=pr[e.charCodeAt(l)]<<18|pr[e.charCodeAt(l+1)]<<12|pr[e.charCodeAt(l+2)]<<6|pr[e.charCodeAt(l+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return i===2&&(t=pr[e.charCodeAt(l)]<<2|pr[e.charCodeAt(l+1)]>>4,o[s++]=t&255),i===1&&(t=pr[e.charCodeAt(l)]<<10|pr[e.charCodeAt(l+1)]<<4|pr[e.charCodeAt(l+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function PF(e){return Qr[e>>18&63]+Qr[e>>12&63]+Qr[e>>6&63]+Qr[e&63]}function kF(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(PF(r));return i.join("")}function LF(e){for(var t,n=e.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(kF(e,s,s+o>a?a:s+o));return r===1?(t=e[n-1],i.push(Qr[t>>2]+Qr[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(Qr[t>>10]+Qr[t>>4&63]+Qr[t<<2&63]+"=")),i.join("")}var hv={byteLength:TF,toByteArray:xF,fromByteArray:NF},FF=function(e,t,n,r,i){var o,s,a=i*8-r-1,l=(1<<a)-1,c=l>>1,d=-7,h=n?i-1:0,f=n?-1:1,g=e[t+h];for(h+=f,o=g&(1<<-d)-1,g>>=-d,d+=a;d>0;o=o*256+e[t+h],h+=f,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=r;d>0;s=s*256+e[t+h],h+=f,d-=8);if(o===0)o=1-c;else{if(o===l)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-c}return(g?-1:1)*s*Math.pow(2,o-r)},BF=function(e,t,n,r,i,o){var s,a,l,c=o*8-i-1,d=(1<<c)-1,h=d>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-1,m=r?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=f/l:t+=f*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=d?(a=0,s=d):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+g]=a&255,g+=m,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+g]=s&255,g+=m,s/=256,c-=8);e[n+g-m]|=b*128},ha={read:FF,write:BF},gf=DF(function(e,t){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=R,t.INSPECT_MAX_BYTES=50;var r=2147483647;t.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var u=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(u,p),u.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(u){if(u>r)throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=new Uint8Array(u);return Object.setPrototypeOf(p,s.prototype),p}function s(u,p,v){if(typeof u=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(u)}return a(u,p,v)}s.poolSize=8192;function a(u,p,v){if(typeof u=="string")return h(u,p);if(ArrayBuffer.isView(u))return g(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u));if(Xe(u,ArrayBuffer)||u&&Xe(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xe(u,SharedArrayBuffer)||u&&Xe(u.buffer,SharedArrayBuffer)))return m(u,p,v);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var T=u.valueOf&&u.valueOf();if(T!=null&&T!==u)return s.from(T,p,v);var L=b(u);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return s.from(u[Symbol.toPrimitive]("string"),p,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u))}s.from=function(u,p,v){return a(u,p,v)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function c(u,p,v){return l(u),u<=0?o(u):p!==void 0?typeof v=="string"?o(u).fill(p,v):o(u).fill(p):o(u)}s.alloc=function(u,p,v){return c(u,p,v)};function d(u){return l(u),o(u<0?0:I(u)|0)}s.allocUnsafe=function(u){return d(u)},s.allocUnsafeSlow=function(u){return d(u)};function h(u,p){if((typeof p!="string"||p==="")&&(p="utf8"),!s.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var v=j(u,p)|0,T=o(v),L=T.write(u,p);return L!==v&&(T=T.slice(0,L)),T}function f(u){for(var p=u.length<0?0:I(u.length)|0,v=o(p),T=0;T<p;T+=1)v[T]=u[T]&255;return v}function g(u){if(Xe(u,Uint8Array)){var p=new Uint8Array(u);return m(p.buffer,p.byteOffset,p.byteLength)}return f(u)}function m(u,p,v){if(p<0||u.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<p+(v||0))throw new RangeError('"length" is outside of buffer bounds');var T;return p===void 0&&v===void 0?T=new Uint8Array(u):v===void 0?T=new Uint8Array(u,p):T=new Uint8Array(u,p,v),Object.setPrototypeOf(T,s.prototype),T}function b(u){if(s.isBuffer(u)){var p=I(u.length)|0,v=o(p);return v.length===0||u.copy(v,0,0,p),v}if(u.length!==void 0)return typeof u.length!="number"||Rt(u.length)?o(0):f(u);if(u.type==="Buffer"&&Array.isArray(u.data))return f(u.data)}function I(u){if(u>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return u|0}function R(u){return+u!=u&&(u=0),s.alloc(+u)}s.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==s.prototype},s.compare=function(u,p){if(Xe(u,Uint8Array)&&(u=s.from(u,u.offset,u.byteLength)),Xe(p,Uint8Array)&&(p=s.from(p,p.offset,p.byteLength)),!s.isBuffer(u)||!s.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===p)return 0;for(var v=u.length,T=p.length,L=0,F=Math.min(v,T);L<F;++L)if(u[L]!==p[L]){v=u[L],T=p[L];break}return v<T?-1:T<v?1:0},s.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(u,p){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return s.alloc(0);var v;if(p===void 0)for(p=0,v=0;v<u.length;++v)p+=u[v].length;var T=s.allocUnsafe(p),L=0;for(v=0;v<u.length;++v){var F=u[v];if(Xe(F,Uint8Array))L+F.length>T.length?s.from(F).copy(T,L):Uint8Array.prototype.set.call(T,F,L);else if(s.isBuffer(F))F.copy(T,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=F.length}return T};function j(u,p){if(s.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||Xe(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(u));var v=u.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&v===0)return 0;for(var L=!1;;)switch(p){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return le(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return Tt(u).length;default:if(L)return T?-1:le(u).length;p=(""+p).toLowerCase(),L=!0}}s.byteLength=j;function U(u,p,v){var T=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,p>>>=0,v<=p))return"";for(u||(u="utf8");;)switch(u){case"hex":return Gt(this,p,v);case"utf8":case"utf-8":return lt(this,p,v);case"ascii":return Ft(this,p,v);case"latin1":case"binary":return We(this,p,v);case"base64":return Oe(this,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,p,v);default:if(T)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),T=!0}}s.prototype._isBuffer=!0;function M(u,p,v){var T=u[p];u[p]=u[v],u[v]=T}s.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var p=0;p<u;p+=2)M(this,p,p+1);return this},s.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var p=0;p<u;p+=4)M(this,p,p+3),M(this,p+1,p+2);return this},s.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var p=0;p<u;p+=8)M(this,p,p+7),M(this,p+1,p+6),M(this,p+2,p+5),M(this,p+3,p+4);return this},s.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?lt(this,0,u):U.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(u){if(!s.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:s.compare(this,u)===0},s.prototype.inspect=function(){var u="",p=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(u+=" ... "),"<Buffer "+u+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(u,p,v,T,L){if(Xe(u,Uint8Array)&&(u=s.from(u,u.offset,u.byteLength)),!s.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(u));if(p===void 0&&(p=0),v===void 0&&(v=u?u.length:0),T===void 0&&(T=0),L===void 0&&(L=this.length),p<0||v>u.length||T<0||L>this.length)throw new RangeError("out of range index");if(T>=L&&p>=v)return 0;if(T>=L)return-1;if(p>=v)return 1;if(p>>>=0,v>>>=0,T>>>=0,L>>>=0,this===u)return 0;for(var F=L-T,K=v-p,et=Math.min(F,K),He=this.slice(T,L),Me=u.slice(p,v),ut=0;ut<et;++ut)if(He[ut]!==Me[ut]){F=He[ut],K=Me[ut];break}return F<K?-1:K<F?1:0};function q(u,p,v,T,L){if(u.length===0)return-1;if(typeof v=="string"?(T=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Rt(v)&&(v=L?0:u.length-1),v<0&&(v=u.length+v),v>=u.length){if(L)return-1;v=u.length-1}else if(v<0)if(L)v=0;else return-1;if(typeof p=="string"&&(p=s.from(p,T)),s.isBuffer(p))return p.length===0?-1:xe(u,p,v,T,L);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(u,p,v):Uint8Array.prototype.lastIndexOf.call(u,p,v):xe(u,[p],v,T,L);throw new TypeError("val must be string, number or Buffer")}function xe(u,p,v,T,L){var F=1,K=u.length,et=p.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(u.length<2||p.length<2)return-1;F=2,K/=2,et/=2,v/=2}function He(pe,tt){return F===1?pe[tt]:pe.readUInt16BE(tt*F)}var Me;if(L){var ut=-1;for(Me=v;Me<K;Me++)if(He(u,Me)===He(p,ut===-1?0:Me-ut)){if(ut===-1&&(ut=Me),Me-ut+1===et)return ut*F}else ut!==-1&&(Me-=Me-ut),ut=-1}else for(v+et>K&&(v=K-et),Me=v;Me>=0;Me--){for(var J=!0,Ee=0;Ee<et;Ee++)if(He(u,Me+Ee)!==He(p,Ee)){J=!1;break}if(J)return Me}return-1}s.prototype.includes=function(u,p,v){return this.indexOf(u,p,v)!==-1},s.prototype.indexOf=function(u,p,v){return q(this,u,p,v,!0)},s.prototype.lastIndexOf=function(u,p,v){return q(this,u,p,v,!1)};function st(u,p,v,T){v=Number(v)||0;var L=u.length-v;T?(T=Number(T),T>L&&(T=L)):T=L;var F=p.length;T>F/2&&(T=F/2);for(var K=0;K<T;++K){var et=parseInt(p.substr(K*2,2),16);if(Rt(et))return K;u[v+K]=et}return K}function V(u,p,v,T){return Fe(le(p,u.length-v),u,v,T)}function he(u,p,v,T){return Fe(be(p),u,v,T)}function ee(u,p,v,T){return Fe(Tt(p),u,v,T)}function ue(u,p,v,T){return Fe(Be(p,u.length-v),u,v,T)}s.prototype.write=function(u,p,v,T){if(p===void 0)T="utf8",v=this.length,p=0;else if(v===void 0&&typeof p=="string")T=p,v=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(v)?(v=v>>>0,T===void 0&&(T="utf8")):(T=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-p;if((v===void 0||v>L)&&(v=L),u.length>0&&(v<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var F=!1;;)switch(T){case"hex":return st(this,u,p,v);case"utf8":case"utf-8":return V(this,u,p,v);case"ascii":case"latin1":case"binary":return he(this,u,p,v);case"base64":return ee(this,u,p,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,u,p,v);default:if(F)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),F=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Oe(u,p,v){return p===0&&v===u.length?hv.fromByteArray(u):hv.fromByteArray(u.slice(p,v))}function lt(u,p,v){v=Math.min(u.length,v);for(var T=[],L=p;L<v;){var F=u[L],K=null,et=F>239?4:F>223?3:F>191?2:1;if(L+et<=v){var He,Me,ut,J;switch(et){case 1:F<128&&(K=F);break;case 2:He=u[L+1],(He&192)===128&&(J=(F&31)<<6|He&63,J>127&&(K=J));break;case 3:He=u[L+1],Me=u[L+2],(He&192)===128&&(Me&192)===128&&(J=(F&15)<<12|(He&63)<<6|Me&63,J>2047&&(J<55296||J>57343)&&(K=J));break;case 4:He=u[L+1],Me=u[L+2],ut=u[L+3],(He&192)===128&&(Me&192)===128&&(ut&192)===128&&(J=(F&15)<<18|(He&63)<<12|(Me&63)<<6|ut&63,J>65535&&J<1114112&&(K=J))}}K===null?(K=65533,et=1):K>65535&&(K-=65536,T.push(K>>>10&1023|55296),K=56320|K&1023),T.push(K),L+=et}return y(T)}var ot=4096;function y(u){var p=u.length;if(p<=ot)return String.fromCharCode.apply(String,u);for(var v="",T=0;T<p;)v+=String.fromCharCode.apply(String,u.slice(T,T+=ot));return v}function Ft(u,p,v){var T="";v=Math.min(u.length,v);for(var L=p;L<v;++L)T+=String.fromCharCode(u[L]&127);return T}function We(u,p,v){var T="";v=Math.min(u.length,v);for(var L=p;L<v;++L)T+=String.fromCharCode(u[L]);return T}function Gt(u,p,v){var T=u.length;(!p||p<0)&&(p=0),(!v||v<0||v>T)&&(v=T);for(var L="",F=p;F<v;++F)L+=Te[u[F]];return L}function we(u,p,v){for(var T=u.slice(p,v),L="",F=0;F<T.length-1;F+=2)L+=String.fromCharCode(T[F]+T[F+1]*256);return L}s.prototype.slice=function(u,p){var v=this.length;u=~~u,p=p===void 0?v:~~p,u<0?(u+=v,u<0&&(u=0)):u>v&&(u=v),p<0?(p+=v,p<0&&(p=0)):p>v&&(p=v),p<u&&(p=u);var T=this.subarray(u,p);return Object.setPrototypeOf(T,s.prototype),T};function D(u,p,v){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+p>v)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u],L=1,F=0;++F<p&&(L*=256);)T+=this[u+F]*L;return T},s.prototype.readUintBE=s.prototype.readUIntBE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u+--p],L=1;p>0&&(L*=256);)T+=this[u+--p]*L;return T},s.prototype.readUint8=s.prototype.readUInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]|this[u+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]<<8|this[u+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},s.prototype.readIntLE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=this[u],L=1,F=0;++F<p&&(L*=256);)T+=this[u+F]*L;return L*=128,T>=L&&(T-=Math.pow(2,8*p)),T},s.prototype.readIntBE=function(u,p,v){u=u>>>0,p=p>>>0,v||D(u,p,this.length);for(var T=p,L=1,F=this[u+--T];T>0&&(L*=256);)F+=this[u+--T]*L;return L*=128,F>=L&&(F-=Math.pow(2,8*p)),F},s.prototype.readInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},s.prototype.readInt16LE=function(u,p){u=u>>>0,p||D(u,2,this.length);var v=this[u]|this[u+1]<<8;return v&32768?v|4294901760:v},s.prototype.readInt16BE=function(u,p){u=u>>>0,p||D(u,2,this.length);var v=this[u+1]|this[u]<<8;return v&32768?v|4294901760:v},s.prototype.readInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},s.prototype.readInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},s.prototype.readFloatLE=function(u,p){return u=u>>>0,p||D(u,4,this.length),ha.read(this,u,!0,23,4)},s.prototype.readFloatBE=function(u,p){return u=u>>>0,p||D(u,4,this.length),ha.read(this,u,!1,23,4)},s.prototype.readDoubleLE=function(u,p){return u=u>>>0,p||D(u,8,this.length),ha.read(this,u,!0,52,8)},s.prototype.readDoubleBE=function(u,p){return u=u>>>0,p||D(u,8,this.length),ha.read(this,u,!1,52,8)};function x(u,p,v,T,L,F){if(!s.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>L||p<F)throw new RangeError('"value" argument is out of bounds');if(v+T>u.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(u,p,v,T){if(u=+u,p=p>>>0,v=v>>>0,!T){var L=Math.pow(2,8*v)-1;x(this,u,p,v,L,0)}var F=1,K=0;for(this[p]=u&255;++K<v&&(F*=256);)this[p+K]=u/F&255;return p+v},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(u,p,v,T){if(u=+u,p=p>>>0,v=v>>>0,!T){var L=Math.pow(2,8*v)-1;x(this,u,p,v,L,0)}var F=v-1,K=1;for(this[p+F]=u&255;--F>=0&&(K*=256);)this[p+F]=u/K&255;return p+v},s.prototype.writeUint8=s.prototype.writeUInt8=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,1,255,0),this[p]=u&255,p+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,65535,0),this[p]=u&255,this[p+1]=u>>>8,p+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,65535,0),this[p]=u>>>8,this[p+1]=u&255,p+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,4294967295,0),this[p+3]=u>>>24,this[p+2]=u>>>16,this[p+1]=u>>>8,this[p]=u&255,p+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,4294967295,0),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4},s.prototype.writeIntLE=function(u,p,v,T){if(u=+u,p=p>>>0,!T){var L=Math.pow(2,8*v-1);x(this,u,p,v,L-1,-L)}var F=0,K=1,et=0;for(this[p]=u&255;++F<v&&(K*=256);)u<0&&et===0&&this[p+F-1]!==0&&(et=1),this[p+F]=(u/K>>0)-et&255;return p+v},s.prototype.writeIntBE=function(u,p,v,T){if(u=+u,p=p>>>0,!T){var L=Math.pow(2,8*v-1);x(this,u,p,v,L-1,-L)}var F=v-1,K=1,et=0;for(this[p+F]=u&255;--F>=0&&(K*=256);)u<0&&et===0&&this[p+F+1]!==0&&(et=1),this[p+F]=(u/K>>0)-et&255;return p+v},s.prototype.writeInt8=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,1,127,-128),u<0&&(u=255+u+1),this[p]=u&255,p+1},s.prototype.writeInt16LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,32767,-32768),this[p]=u&255,this[p+1]=u>>>8,p+2},s.prototype.writeInt16BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,2,32767,-32768),this[p]=u>>>8,this[p+1]=u&255,p+2},s.prototype.writeInt32LE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,2147483647,-2147483648),this[p]=u&255,this[p+1]=u>>>8,this[p+2]=u>>>16,this[p+3]=u>>>24,p+4},s.prototype.writeInt32BE=function(u,p,v){return u=+u,p=p>>>0,v||x(this,u,p,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4};function Y(u,p,v,T,L,F){if(v+T>u.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function te(u,p,v,T,L){return p=+p,v=v>>>0,L||Y(u,p,v,4),ha.write(u,p,v,T,23,4),v+4}s.prototype.writeFloatLE=function(u,p,v){return te(this,u,p,!0,v)},s.prototype.writeFloatBE=function(u,p,v){return te(this,u,p,!1,v)};function se(u,p,v,T,L){return p=+p,v=v>>>0,L||Y(u,p,v,8),ha.write(u,p,v,T,52,8),v+8}s.prototype.writeDoubleLE=function(u,p,v){return se(this,u,p,!0,v)},s.prototype.writeDoubleBE=function(u,p,v){return se(this,u,p,!1,v)},s.prototype.copy=function(u,p,v,T){if(!s.isBuffer(u))throw new TypeError("argument should be a Buffer");if(v||(v=0),!T&&T!==0&&(T=this.length),p>=u.length&&(p=u.length),p||(p=0),T>0&&T<v&&(T=v),T===v||u.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),u.length-p<T-v&&(T=u.length-p+v);var L=T-v;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,v,T):Uint8Array.prototype.set.call(u,this.subarray(v,T),p),L},s.prototype.fill=function(u,p,v,T){if(typeof u=="string"){if(typeof p=="string"?(T=p,p=0,v=this.length):typeof v=="string"&&(T=v,v=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!s.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(u.length===1){var L=u.charCodeAt(0);(T==="utf8"&&L<128||T==="latin1")&&(u=L)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(p<0||this.length<p||this.length<v)throw new RangeError("Out of range index");if(v<=p)return this;p=p>>>0,v=v===void 0?this.length:v>>>0,u||(u=0);var F;if(typeof u=="number")for(F=p;F<v;++F)this[F]=u;else{var K=s.isBuffer(u)?u:s.from(u,T),et=K.length;if(et===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(F=0;F<v-p;++F)this[F+p]=K[F%et]}return this};var _e=/[^+/0-9A-Za-z-_]/g;function me(u){if(u=u.split("=")[0],u=u.trim().replace(_e,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function le(u,p){p=p||1/0;for(var v,T=u.length,L=null,F=[],K=0;K<T;++K){if(v=u.charCodeAt(K),v>55295&&v<57344){if(!L){if(v>56319){(p-=3)>-1&&F.push(239,191,189);continue}else if(K+1===T){(p-=3)>-1&&F.push(239,191,189);continue}L=v;continue}if(v<56320){(p-=3)>-1&&F.push(239,191,189),L=v;continue}v=(L-55296<<10|v-56320)+65536}else L&&(p-=3)>-1&&F.push(239,191,189);if(L=null,v<128){if((p-=1)<0)break;F.push(v)}else if(v<2048){if((p-=2)<0)break;F.push(v>>6|192,v&63|128)}else if(v<65536){if((p-=3)<0)break;F.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((p-=4)<0)break;F.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return F}function be(u){for(var p=[],v=0;v<u.length;++v)p.push(u.charCodeAt(v)&255);return p}function Be(u,p){for(var v,T,L,F=[],K=0;K<u.length&&!((p-=2)<0);++K)v=u.charCodeAt(K),T=v>>8,L=v%256,F.push(L),F.push(T);return F}function Tt(u){return hv.toByteArray(me(u))}function Fe(u,p,v,T){for(var L=0;L<T&&!(L+v>=p.length||L>=u.length);++L)p[L+v]=u[L];return L}function Xe(u,p){return u instanceof p||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===p.name}function Rt(u){return u!==u}var Te=function(){for(var u="0123456789abcdef",p=new Array(256),v=0;v<16;++v)for(var T=v*16,L=0;L<16;++L)p[T+L]=u[v]+u[L];return p}()}),rt=gf.Buffer;gf.SlowBuffer;gf.INSPECT_MAX_BYTES;gf.kMaxLength;var _v=function(e,t){return _v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},_v(e,t)};function yf(e,t){_v(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ns=function(e){yf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),Lt=function(e){yf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function hf(e){return e&&e.Math==Math&&e}function KI(){return hf(typeof globalThis=="object"&&globalThis)||hf(typeof window=="object"&&window)||hf(typeof self=="object"&&self)||hf(typeof global=="object"&&global)||Function("return this")()}function VF(){var e=KI();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var UF=function(e){var t=VF()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(t);for(var n=rt.alloc(e),r=0;r<e;++r)n[r]=Math.floor(Math.random()*256);return n},jF=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(rt.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(rt.alloc(t))}:UF}},ZI=jF();function HF(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function wv(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function $F(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function WF(e){return ll(e)&&Object.prototype.toString.call(e)==="[object Date]"}function ll(e){return typeof e=="object"&&e!==null}function vf(e,t){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(t),n=!0),e.apply(this,i)}return r}function mf(e){if(ArrayBuffer.isView(e))return rt.from(e.buffer,e.byteOffset,e.byteLength);if(HF(e))return rt.from(e);throw new Lt("Must use either Buffer or TypedArray")}var GF=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,XI=function(e){return typeof e=="string"&&GF.test(e)},Ev=function(e){if(!XI(e))throw new Lt('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return rt.from(t,"hex")},OI=function(e,t){return t===void 0&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},KY=Math.pow(2,63)-1,ZY=-Math.pow(2,63),zF=Math.pow(2,53),qF=-Math.pow(2,53),JI=4,rs=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new Lt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=rt.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=rt.from(t,"binary"):Array.isArray(t)?this.buffer=rt.from(t):this.buffer=mf(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new Lt("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new Lt("only accepts single character Uint8Array or Array");var n;if(typeof t=="string"?n=t.charCodeAt(0):typeof t=="number"?n=t:n=t[0],n<0||n>255)throw new Lt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=rt.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},e.prototype.write=function(t,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+t.length){var r=rt.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set(mf(t),n),this.position=n+t.byteLength>this.position?n+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,n,t.length,"binary"),this.position=n+t.length>this.position?n+t.length:this.position)},e.prototype.read=function(t,n){return n=n&&n>0?n:this.position,this.buffer.slice(t,t+n)},e.prototype.value=function(t){return t=!!t,t&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(t){return this.buffer.toString(t)},e.prototype.toExtendedJSON=function(t){t=t||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new PI(this.buffer.slice(0,this.position));throw new ns('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){n=n||{};var r,i;if("$binary"in t?n.legacy&&typeof t.$binary=="string"&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,r=rt.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=rt.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=Ev(t.$uuid)),!r)throw new Lt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===JI?new PI(r):new e(r,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(rs.prototype,"_bsontype",{value:"Binary"});var mv=16,PI=function(e){yf(t,e);function t(n){var r=this,i,o;if(n==null)i=t.generate();else if(n instanceof t)i=rt.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===mv)i=mf(n);else if(typeof n=="string")i=Ev(n);else throw new Lt("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=e.call(this,i,JI)||this,r.__id=o,r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,t.cacheHexString&&(this.__id=OI(n))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(n){if(n===void 0&&(n=!0),t.cacheHexString&&this.__id)return this.__id;var r=OI(this.id,n);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(n){if(!n)return!1;if(n instanceof t)return n.id.equals(this.id);try{return new t(n).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new rs(this.id,rs.SUBTYPE_UUID)},t.generate=function(){var n=ZI(mv);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,rt.from(n)},t.isValid=function(n){return n?n instanceof t?!0:typeof n=="string"?XI(n):wv(n)?n.length!==mv?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},t.createFromHexString=function(n){var r=Ev(n);return new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(rs),_f=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},e}();Object.defineProperty(_f.prototype,"_bsontype",{value:"Code"});function YF(e){return ll(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var al=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var o=t.split(".");o.length===2&&(r=o.shift(),t=o.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t},e.prototype.toExtendedJSON=function(t){t=t||{};var n={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(al.prototype,"_bsontype",{value:"DBRef"});var fr=void 0;try{fr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var kI=65536,KF=1<<24,ga=kI*kI,QI=ga*ga,LI=QI/2,FI={},BI={},ce=function(){function e(t,n,r){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,n,r);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!n)):typeof t=="string"?Object.assign(this,e.fromString(t,!!n)):(this.low=t|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,o;return n?(t>>>=0,(o=0<=t&&t<256)&&(i=BI[t],i)?i:(r=e.fromBits(t,(t|0)<0?-1:0,!0),o&&(BI[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(i=FI[t],i)?i:(r=e.fromBits(t,t<0?-1:0,!1),o&&(FI[t]=r),r))},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=QI)return e.MAX_UNSIGNED_VALUE}else{if(t<=-LI)return e.MIN_VALUE;if(t+1>=LI)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%ga|0,t/ga|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return e.fromString(t.substring(1),n,r).neg();for(var o=e.fromNumber(Math.pow(r,8)),s=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+l),r);if(l<8){var d=e.fromNumber(Math.pow(r,l));s=s.mul(d).add(e.fromNumber(c))}else s=s.mul(o),s=s.add(e.fromNumber(c))}return s.unsigned=n,s},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(t){return ll(t)&&t.__isLong__===!0},e.fromValue=function(t,n){return typeof t=="number"?e.fromNumber(t,n):typeof t=="string"?e.fromString(t,n):e.fromBits(t.low,t.high,typeof n=="boolean"?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=t.high>>>16,a=t.high&65535,l=t.low>>>16,c=t.low&65535,d=0,h=0,f=0,g=0;return g+=o+c,f+=g>>>16,g&=65535,f+=i+l,h+=f>>>16,f&=65535,h+=r+a,d+=h>>>16,h&=65535,d+=n+s,d&=65535,e.fromBits(f<<16|g,d<<16|h,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(t){return this.compare(t)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(fr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?fr.div_u:fr.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,fr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=e.UZERO}else{if(this.eq(e.MIN_VALUE)){if(t.eq(e.ONE)||t.eq(e.NEG_ONE))return e.MIN_VALUE;if(t.eq(e.MIN_VALUE))return e.ONE;var s=this.shr(1);return r=s.div(t).shl(1),r.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),o=r.add(i.div(t)),o)}else if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),c=e.fromNumber(r),d=c.mul(t);d.isNegative()||d.gt(i);)r-=l,c=e.fromNumber(r,this.unsigned),d=c.mul(t);c.isZero()&&(c=e.ONE),o=o.add(c),i=i.sub(d)}return o},e.prototype.div=function(t){return this.divide(t)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},e.prototype.eq=function(t){return this.equals(t)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(t&1<<n)===0;n--);return this.high!==0?n+33:n+1},e.prototype.greaterThan=function(t){return this.comp(t)>0},e.prototype.gt=function(t){return this.greaterThan(t)},e.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},e.prototype.gte=function(t){return this.greaterThanOrEqual(t)},e.prototype.ge=function(t){return this.greaterThanOrEqual(t)},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.lessThan=function(t){return this.comp(t)<0},e.prototype.lt=function(t){return this.lessThan(t)},e.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},e.prototype.lte=function(t){return this.lessThanOrEqual(t)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),fr){var n=(this.unsigned?fr.rem_u:fr.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,fr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(t){return this.modulo(t)},e.prototype.rem=function(t){return this.modulo(t)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),fr){var n=fr.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,fr.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=t.high>>>16,l=t.high&65535,c=t.low>>>16,d=t.low&65535,h=0,f=0,g=0,m=0;return m+=s*d,g+=m>>>16,m&=65535,g+=o*d,f+=g>>>16,g&=65535,g+=s*c,f+=g>>>16,g&=65535,f+=i*d,h+=f>>>16,f&=65535,f+=o*c,h+=f>>>16,f&=65535,f+=s*l,h+=f>>>16,f&=65535,h+=r*d+i*c+o*l+s*a,h&=65535,e.fromBits(g<<16|m,h<<16|f,this.unsigned)},e.prototype.mul=function(t){return this.multiply(t)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(t){return!this.equals(t)},e.prototype.neq=function(t){return this.notEquals(t)},e.prototype.ne=function(t){return this.notEquals(t)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(t){return this.shiftLeft(t)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(t){return this.shiftRight(t)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},e.prototype.shru=function(t){return this.shiftRightUnsigned(t)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(t){return this.subtract(t)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*ga+(this.low>>>0):this.high*ga+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var l=s.div(o),c=s.sub(l.mul(o)).toInt()>>>0,d=c.toString(t);if(s=l,s.isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(t){return this.lessThanOrEqual(t)},e.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(KF),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(ce.prototype,"__isLong__",{value:!0});Object.defineProperty(ce.prototype,"_bsontype",{value:"Long"});var ZF=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,XF=/^(\+|-)?(Infinity|inf)$/i,JF=/^(\+|-)?NaN$/i,sl=6111,gv=-6176,VI=6176,QF=34,yv=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),UI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),jI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),eB=/^([-+])?(\d+)?$/,tB=31,HI=16383,nB=30,rB=31;function $I(e){return!isNaN(parseInt(e,10))}function iB(e){var t=ce.fromNumber(1e9),n=ce.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new ce(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function oB(e,t){if(!e&&!t)return{high:ce.fromNumber(0),low:ce.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new ce(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new ce(t.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),l=r.multiply(i),c=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new ce(a.getLowBits(),0).add(l).add(c.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),c=a.shiftLeft(32).add(new ce(c.getLowBits(),0)),{high:s,low:c}}function sB(e,t){var n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){var i=e.low>>>0,o=t.low>>>0;if(i<o)return!0}return!1}function ma(e,t){throw new Lt('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var bv=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(wv(t)){if(t.byteLength!==16)throw new Lt("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new Lt("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var n=!1,r=!1,i=!1,o=0,s=0,a=0,l=0,c=0,d=[0],h=0,f=0,g=0,m=0,b=0,I=0,R=new ce(0,0),j=new ce(0,0),U=0,M=0;if(t.length>=7e3)throw new Lt(""+t+" not a valid Decimal128 string");var q=t.match(ZF),xe=t.match(XF),st=t.match(JF);if(!q&&!xe&&!st||t.length===0)throw new Lt(""+t+" not a valid Decimal128 string");if(q){var V=q[2],he=q[4],ee=q[5],ue=q[6];he&&ue===void 0&&ma(t,"missing exponent power"),he&&V===void 0&&ma(t,"missing exponent base"),he===void 0&&(ee||ue)&&ma(t,"missing e before exponent")}if((t[M]==="+"||t[M]==="-")&&(n=t[M++]==="-"),!$I(t[M])&&t[M]!=="."){if(t[M]==="i"||t[M]==="I")return new e(rt.from(n?UI:jI));if(t[M]==="N")return new e(rt.from(yv))}for(;$I(t[M])||t[M]===".";){if(t[M]==="."){r&&ma(t,"contains multiple periods"),r=!0,M=M+1;continue}h<34&&(t[M]!=="0"||i)&&(i||(c=s),i=!0,d[f++]=parseInt(t[M],10),h=h+1),i&&(a=a+1),r&&(l=l+1),s=s+1,M=M+1}if(r&&!s)throw new Lt(""+t+" not a valid Decimal128 string");if(t[M]==="e"||t[M]==="E"){var Oe=t.substr(++M).match(eB);if(!Oe||!Oe[2])return new e(rt.from(yv));b=parseInt(Oe[0],10),M=M+Oe[0].length}if(t[M])return new e(rt.from(yv));if(g=0,!h)g=0,m=0,d[0]=0,a=1,h=1,o=0;else if(m=h-1,o=a,o!==1)for(;d[c+o-1]===0;)o=o-1;for(b<=l&&l-b>16384?b=gv:b=b-l;b>sl;){if(m=m+1,m-g>QF){var lt=d.join("");if(lt.match(/^0+$/)){b=sl;break}ma(t,"overflow")}b=b-1}for(;b<gv||h<a;){if(m===0&&o<h){b=gv,o=0;break}if(h<a?a=a-1:m=m-1,b<sl)b=b+1;else{var lt=d.join("");if(lt.match(/^0+$/)){b=sl;break}ma(t,"overflow")}}if(m-g+1<o){var ot=s;r&&(c=c+1,ot=ot+1),n&&(c=c+1,ot=ot+1);var y=parseInt(t[c+m+1],10),Ft=0;if(y>=5&&(Ft=1,y===5)){for(Ft=d[m]%2===1?1:0,I=c+m+2;I<ot;I++)if(parseInt(t[I],10)){Ft=1;break}}if(Ft){for(var We=m;We>=0;We--)if(++d[We]>9&&(d[We]=0,We===0))if(b<sl)b=b+1,d[We]=1;else return new e(rt.from(n?UI:jI))}}if(R=ce.fromNumber(0),j=ce.fromNumber(0),o===0)R=ce.fromNumber(0),j=ce.fromNumber(0);else if(m-g<17){var We=g;for(j=ce.fromNumber(d[We++]),R=new ce(0,0);We<=m;We++)j=j.multiply(ce.fromNumber(10)),j=j.add(ce.fromNumber(d[We]))}else{var We=g;for(R=ce.fromNumber(d[We++]);We<=m-17;We++)R=R.multiply(ce.fromNumber(10)),R=R.add(ce.fromNumber(d[We]));for(j=ce.fromNumber(d[We++]);We<=m;We++)j=j.multiply(ce.fromNumber(10)),j=j.add(ce.fromNumber(d[We]))}var Gt=oB(R,ce.fromString("100000000000000000"));Gt.low=Gt.low.add(j),sB(Gt.low,j)&&(Gt.high=Gt.high.add(ce.fromNumber(1))),U=b+VI;var we={low:ce.fromNumber(0),high:ce.fromNumber(0)};Gt.high.shiftRightUnsigned(49).and(ce.fromNumber(1)).equals(ce.fromNumber(1))?(we.high=we.high.or(ce.fromNumber(3).shiftLeft(61)),we.high=we.high.or(ce.fromNumber(U).and(ce.fromNumber(16383).shiftLeft(47))),we.high=we.high.or(Gt.high.and(ce.fromNumber(0x7fffffffffff)))):(we.high=we.high.or(ce.fromNumber(U&16383).shiftLeft(49)),we.high=we.high.or(Gt.high.and(ce.fromNumber(562949953421311)))),we.low=Gt.low,n&&(we.high=we.high.or(ce.fromString("9223372036854775808")));var D=rt.alloc(16);return M=0,D[M++]=we.low.low&255,D[M++]=we.low.low>>8&255,D[M++]=we.low.low>>16&255,D[M++]=we.low.low>>24&255,D[M++]=we.low.high&255,D[M++]=we.low.high>>8&255,D[M++]=we.low.high>>16&255,D[M++]=we.low.high>>24&255,D[M++]=we.high.low&255,D[M++]=we.high.low>>8&255,D[M++]=we.high.low>>16&255,D[M++]=we.high.low>>24&255,D[M++]=we.high.high&255,D[M++]=we.high.high>>8&255,D[M++]=we.high.high>>16&255,D[M++]=we.high.high>>24&255,new e(D)},e.prototype.toString=function(){for(var t,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,a,l={parts:[0,0,0,0]},c,d,h=[];o=0;var f=this.bytes,g=f[o++]|f[o++]<<8|f[o++]<<16|f[o++]<<24,m=f[o++]|f[o++]<<8|f[o++]<<16|f[o++]<<24,b=f[o++]|f[o++]<<8|f[o++]<<16|f[o++]<<24,I=f[o++]|f[o++]<<8|f[o++]<<16|f[o++]<<24;o=0;var R={low:new ce(g,m),high:new ce(b,I)};R.high.lessThan(ce.ZERO)&&h.push("-");var j=I>>26&tB;if(j>>3===3){if(j===nB)return h.join("")+"Infinity";if(j===rB)return"NaN";t=I>>15&HI,a=8+(I>>14&1)}else a=I>>14&7,t=I>>17&HI;var U=t-VI;if(l.parts[0]=(I&16383)+((a&15)<<14),l.parts[1]=b,l.parts[2]=m,l.parts[3]=g,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)s=!0;else for(d=3;d>=0;d--){var M=0,q=iB(l);if(l=q.quotient,M=q.rem.low,!!M)for(c=8;c>=0;c--)r[d*9+c]=M%10,M=Math.floor(M/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var xe=n-1+U;if(xe>=34||xe<=-7||U>0){if(n>34)return h.push("".concat(0)),U>0?h.push("E+".concat(U)):U<0&&h.push("E".concat(U)),h.join("");h.push("".concat(r[o++])),n=n-1,n&&h.push(".");for(var i=0;i<n;i++)h.push("".concat(r[o++]));h.push("E"),xe>0?h.push("+".concat(xe)):h.push("".concat(xe))}else if(U>=0)for(var i=0;i<n;i++)h.push("".concat(r[o++]));else{var st=n+U;if(st>0)for(var i=0;i<st;i++)h.push("".concat(r[o++]));else h.push("0");for(h.push(".");st++<0;)h.push("0");for(var i=0;i<n-Math.max(st-1,0);i++)h.push("".concat(r[o++]))}return h.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(bv.prototype,"_bsontype",{value:"Decimal128"});var Ef=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},e}();Object.defineProperty(Ef.prototype,"_bsontype",{value:"Double"});var wf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t|0}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(wf.prototype,"_bsontype",{value:"Int32"});var Cv=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(Cv.prototype,"_bsontype",{value:"MaxKey"});var Sv=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(Sv.prototype,"_bsontype",{value:"MinKey"});var aB=new RegExp("^[0-9a-fA-F]{24}$"),ts=null,Jr=Symbol("id"),rn=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new Lt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=rt.from(t.toHexString(),"hex"):n=t.id}else n=t;if(n==null||typeof n=="number")this[Jr]=e.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[Jr]=n instanceof rt?n:mf(n);else if(typeof n=="string")if(n.length===12){var r=rt.from(n);if(r.byteLength===12)this[Jr]=r;else throw new Lt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&aB.test(n))this[Jr]=rt.from(n,"hex");else throw new Lt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Lt("Argument passed in does not match the accepted types");e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[Jr]},set:function(t){this[Jr]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),r=rt.alloc(12);return r.writeUInt32BE(t,0),ts===null&&(ts=ZI(5)),r[4]=ts[0],r[5]=ts[1],r[6]=ts[2],r[7]=ts[3],r[8]=ts[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},e.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(t==null)return!1;if(t instanceof e)return this[Jr][11]===t[Jr][11]&&this[Jr].equals(t[Jr]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&wv(this.id))return t===rt.prototype.toString.call(this.id,"latin1");if(typeof t=="string"&&e.isValid(t)&&t.length===24)return t.toLowerCase()===this.toHexString();if(typeof t=="string"&&e.isValid(t)&&t.length===12)return rt.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var n=t.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var t=new Date,n=this.id.readUInt32BE(0);return t.setTime(Math.floor(n)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var n=rt.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new Lt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(rt.from(t,"hex"))},e.isValid=function(t){if(t==null)return!1;try{return new e(t),!0}catch{return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(Math.random()*16777215),e}();Object.defineProperty(rn.prototype,"generate",{value:vf(function(e){return rn.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(rn.prototype,"getInc",{value:vf(function(){return rn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(rn.prototype,"get_inc",{value:vf(function(){return rn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(rn,"get_inc",{value:vf(function(){return rn.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(rn.prototype,"_bsontype",{value:"ObjectID"});function cB(e){return e.split("").sort().join("")}var cl=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=cB(n??""),this.pattern.indexOf("\0")!==-1)throw new ns("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new ns("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new ns("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(t){return t?t.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new e(t.$regex,e.parseOptions(t.$options));if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new Lt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(cl.prototype,"_bsontype",{value:"BSONRegExp"});var Iv=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(Iv.prototype,"_bsontype",{value:"Symbol"});var lB=ce,eD=function(e){yf(t,e);function t(n,r){var i=this;return i instanceof t?(ce.isLong(n)?i=e.call(this,n.low,n.high,!0)||this:ll(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=e.call(this,n.i,n.t,!0)||this:i=e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(n){return new t(ce.fromInt(n,!0))},t.fromNumber=function(n){return new t(ce.fromNumber(n,!0))},t.fromBits=function(n,r){return new t(n,r)},t.fromString=function(n,r){return new t(ce.fromString(n,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(n){return new t(n.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=ce.MAX_UNSIGNED_VALUE,t}(lB);function uB(e){return ll(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var tD=2147483647,nD=-2147483648,rD=9223372036854776e3,iD=-9223372036854776e3,dB={$oid:rn,$binary:rs,$uuid:rs,$symbol:Iv,$numberInt:wf,$numberDecimal:bv,$numberDouble:Ef,$numberLong:ce,$minKey:Sv,$maxKey:Cv,$regex:cl,$regularExpression:cl,$timestamp:eD};function oD(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=nD&&e<=tD)return new wf(e);if(e>=iD&&e<=rD)return ce.fromNumber(e)}return new Ef(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter(function(h){return h.startsWith("$")&&e[h]!=null}),r=0;r<n.length;r++){var i=dB[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var o=e.$date,s=new Date;return t.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):ce.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&t.relaxed&&s.setTime(o),s}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=oD(e.$scope)),_f.fromExtendedJSON(e)}if(YF(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof al)return l;var c=Object.keys(l).filter(function(h){return h.startsWith("$")}),d=!0;if(c.forEach(function(h){["$ref","$id","$db"].indexOf(h)===-1&&(d=!1)}),d)return al.fromExtendedJSON(l)}return e}function fB(e,t){return e.map(function(n,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return so(n,t)}finally{t.seenObjects.pop()}})}function WI(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function so(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var n=t.seenObjects.findIndex(function(R){return R.obj===e});if(n!==-1){var r=t.seenObjects.map(function(R){return R.propertyName}),i=r.slice(0,n).map(function(R){return"".concat(R," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(R){return"".concat(R," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new Lt(`Converting circular structure to EJSON:
42
42
  `+" ".concat(i).concat(o).concat(s).concat(a,`
43
- `)+" ".concat(c,"\\").concat(l,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return fB(t,e);if(t===void 0)return null;if(t instanceof Date||WF(t)){var u=t.getTime(),d=u>-1&&u<2534023188e5;return e.legacy?e.relaxed&&d?{$date:t.getTime()}:{$date:WI(t)}:e.relaxed&&d?{$date:WI(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var m=t>=nD&&t<=tD,h=t>=iD&&t<=rD;if(m)return{$numberInt:t.toString()};if(h)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||$F(t)){var v=t.flags;if(v===void 0){var N=t.toString().match(/[gimuy]*$/);N&&(v=N[0])}var M=new cl(t.source,v);return M.toExtendedJSON(e)}return t!=null&&typeof t=="object"?hB(t,e):t}var pB={Binary:function(t){return new rs(t.value(),t.sub_type)},Code:function(t){return new _f(t.code,t.scope)},DBRef:function(t){return new al(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new bv(t.bytes)},Double:function(t){return new Ef(t.value)},Int32:function(t){return new wf(t.value)},Long:function(t){return ce.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new Cv},MinKey:function(){return new Sv},ObjectID:function(t){return new rn(t)},ObjectId:function(t){return new rn(t)},BSONRegExp:function(t){return new cl(t.pattern,t.options)},Symbol:function(t){return new Iv(t.value)},Timestamp:function(t){return eD.fromBits(t.low,t.high)}};function hB(t,e){if(t==null||typeof t!="object")throw new ns("not an object instance");var n=t._bsontype;if(typeof n>"u"){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=so(t[i],e);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}else if(uB(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var a=pB[t._bsontype];if(!a)throw new Lt("Unrecognized or invalid _bsontype: "+t._bsontype);s=a(s)}return n==="Code"&&s.scope?s=new _f(s.code,so(s.scope,e)):n==="DBRef"&&s.oid&&(s=new al(so(s.collection,e),so(s.oid,e),so(s.db,e),so(s.fields,e))),s.toExtendedJSON(e)}else throw new ns("_bsontype must be a string, but was: "+typeof n)}var GI;(function(t){function e(o,s){var a=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(o,function(c,l){if(c.indexOf("\0")!==-1)throw new ns("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(c)));return oD(l,a)})}t.parse=e;function n(o,s,a,c){a!=null&&typeof a=="object"&&(c=a,a=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(c=s,s=void 0,a=0);var l=Object.assign({relaxed:!0,legacy:!1},c,{seenObjects:[{propertyName:"(root)",obj:null}]}),u=so(o,l);return JSON.stringify(u,s,a)}t.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}t.serialize=r;function i(o,s){return s=s||{},e(JSON.stringify(o),s)}t.deserialize=i})(GI||(GI={}));var zI,qI=KI();qI.Map?zI=qI.Map:zI=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var n=0;n<e.length;n++)if(e[n]!=null){var r=e[n],i=r[0],o=r[1];this._keys.push(i),this._values[i]={v:o,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var n=this._values[e];return n==null?!1:(delete this._values[e],this._keys.splice(n.i,1),!0)},t.prototype.entries=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?[r,e._values[r].v]:void 0,done:r===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];e.call(n,this._values[i].v,i,n)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},t.prototype.set=function(e,n){return this._values[e]?(this._values[e].v=n,this):(this._keys.push(e),this._values[e]={v:n,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?e._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var XY=ce.fromNumber(zF),JY=ce.fromNumber(qF);var vv=new Uint8Array(8),QY=new DataView(vv.buffer,vv.byteOffset,vv.byteLength);var mB=1024*1024*17,e9=rt.alloc(mB);var ya=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}};var Ye=class{constructor(e,n={},r,i){this.name=e;this.properties=n;this.id=i?new rn(i):new rn,this.occurred=new Date,r&&(this.trigger=new ya(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};var ul=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},va=class extends ul{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,n,r,i,o){super(),this.component=e,this.viewContainerRef=n,this.injector=r,this.projectableNodes=o}},Ea=class extends ul{templateRef;viewContainerRef;context;injector;constructor(e,n,r,i){super(),this.templateRef=e,this.viewContainerRef=n,this.context=r,this.injector=i}get origin(){return this.templateRef.elementRef}attach(e,n=this.context){return this.context=n,super.attach(e)}detach(){return this.context=void 0,super.detach()}},Dv=class extends ul{element;constructor(e){super(),this.element=e instanceof qt?e.nativeElement:e}},wa=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof va)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Ea)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Dv)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var bf=class extends wa{outletElement;_appRef;_defaultInjector;_document;constructor(e,n,r,i,o){super(),this.outletElement=e,this._appRef=r,this._defaultInjector=i,this._document=o}attachComponentPortal(e){let n;if(e.viewContainerRef){let r=e.injector||e.viewContainerRef.injector,i=r.get(yi,null,{optional:!0})||void 0;n=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:r,ngModuleRef:i,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>n.destroy())}else{let r=this._appRef,i=e.injector||this._defaultInjector||bt.NULL,o=i.get(Un,r.injector);n=md(e.component,{elementInjector:i,environmentInjector:o,projectableNodes:e.projectableNodes||void 0}),r.attachView(n.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(n.hostView),n.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(n)),this._attachedPortal=e,n}attachTemplatePortal(e){let n=e.viewContainerRef,r=n.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return r.rootNodes.forEach(i=>this.outletElement.appendChild(i)),r.detectChanges(),this.setDisposeFn(()=>{let i=n.indexOf(r);i!==-1&&n.remove(i)}),this._attachedPortal=e,r}attachDomPortal=e=>{let n=e.element;n.parentNode;let r=this._document.createComment("dom-portal");n.parentNode.insertBefore(r,n),this.outletElement.appendChild(n),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(n,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Tv=(()=>{class t extends wa{_moduleRef=P(yi,{optional:!0});_document=P(ct);_viewContainerRef=P(Zi);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new yt;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Xi({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ys]})}return t})();function sD(t){return t.buttons===0||t.detail===0}function aD(t){let e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}var xv;function yB(){if(xv==null){let t=typeof document<"u"?document.head:null;xv=!!(t&&(t.createShadowRoot||t.attachShadow))}return xv}function cD(t){if(yB()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function Cf(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}function Ni(t){return t.composedPath?t.composedPath()[0]:t.target}function Ri(t,e,n,r,i){let o=parseInt(xg.major),s=parseInt(xg.minor);return o>19||o===19&&s>0||o===0&&s===0?t.listen(e,n,r,i):(e.addEventListener(n,r,i),()=>{e.removeEventListener(n,r,i)})}var Nv;try{Nv=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Nv=!1}var $n=(()=>{class t{_platformId=P(Bo);isBrowser=this._platformId?m0(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Nv)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var dl;function vB(){if(dl==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>dl=!0}))}finally{dl=dl||!1}return dl}function lD(t){return vB()?t:!!t.capture}function ba(t){return t instanceof qt?t.nativeElement:t}var _B=new ve("cdk-input-modality-detector-options"),EB={ignoreKeys:[18,17,224,91,16]},uD=650,Rv={passive:!0,capture:!0},wB=(()=>{class t{_platform=P($n);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ui(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Ni(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<uD||(this._modality.next(sD(n)?"keyboard":"mouse"),this._mostRecentTarget=Ni(n))};_onTouchstart=n=>{if(aD(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Ni(n)};constructor(){let n=P(Ke),r=P(ct),i=P(_B,{optional:!0});if(this._options=w(w({},EB),i),this.modalityDetected=this._modality.pipe(Eh(1)),this.modalityChanged=this.modalityDetected.pipe(gu()),this._platform.isBrowser){let o=P(An).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Ri(o,r,"keydown",this._onKeydown,Rv),Ri(o,r,"mousedown",this._onMousedown,Rv),Ri(o,r,"touchstart",this._onTouchstart,Rv)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),If=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(If||{}),bB=new ve("cdk-focus-monitor-default-options"),Sf=lD({passive:!0,capture:!0}),dD=(()=>{class t{_ngZone=P(Ke);_platform=P($n);_inputModalityDetector=P(wB);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=P(ct,{optional:!0});_stopInputModalityDetector=new Ne;constructor(){let n=P(bB,{optional:!0});this._detectionMode=n?.detectionMode||If.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=Ni(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=ba(n);if(!this._platform.isBrowser||i.nodeType!==1)return So();let o=cD(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new Ne,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=ba(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=ba(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,c])=>this._originChanged(a,r,c)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===If.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===If.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?uD:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=Ni(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Sf),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Sf)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(xs(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Sf),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Sf),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Df=new WeakMap,fl=(()=>{class t{_appRef;_injector=P(bt);_environmentInjector=P(Un);load(n){let r=this._appRef=this._appRef||this._injector.get(sr),i=Df.get(r);i||(i={loaders:new Set,refs:[]},Df.set(r,i),r.onDestroy(()=>{Df.get(r)?.refs.forEach(o=>o.destroy()),Df.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(md(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var fD=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=St({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
44
- `],encapsulation:2,changeDetection:0})}return t})();function Av(t){return Array.isArray(t)?t:[t]}var Ov=(()=>{class t{_platform=P($n);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return SB(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=CB(MB(n));if(r&&(pD(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=pD(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!RB(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return AB(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function CB(t){try{return t.frameElement}catch{return null}}function SB(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function IB(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function DB(t){return xB(t)&&t.type=="hidden"}function TB(t){return NB(t)&&t.hasAttribute("href")}function xB(t){return t.nodeName.toLowerCase()=="input"}function NB(t){return t.nodeName.toLowerCase()=="a"}function hD(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function pD(t){if(!hD(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function RB(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function AB(t){return DB(t)?!1:IB(t)||TB(t)||t.hasAttribute("contenteditable")||hD(t)}function MB(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Mv=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,n,r,i,o=!1,s){this._element=e,this._checker=n,this._ngZone=r,this._document=i,this._injector=s,o||this.attachAnchors()}destroy(){let e=this._startAnchor,n=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),n&&(n.removeEventListener("focus",this.endAnchorListener),n.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let n=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?n.length?n[0]:this._getFirstTabbableElement(this._element):n.length?n[n.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let n=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(n){if(!this._checker.isFocusable(n)){let r=this._getFirstTabbableElement(n);return r?.focus(e),!!r}return n.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let n=this._getRegionBoundary("start");return n&&n.focus(e),!!n}focusLastTabbableElement(e){let n=this._getRegionBoundary("end");return n&&n.focus(e),!!n}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=0;r<n.length;r++){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(n[r]):null;if(i)return i}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=n.length-1;r>=0;r--){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(n[r]):null;if(i)return i}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,n){e?n.setAttribute("tabindex","0"):n.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?Yi(e,{injector:this._injector}):setTimeout(e)}},mD=(()=>{class t{_checker=P(Ov);_ngZone=P(Ke);_document=P(ct);_injector=P(bt);constructor(){P(fl).load(fD)}create(n,r=!1){return new Mv(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Pv(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function $t(t){return t==null?"":typeof t=="string"?t:`${t}px`}var OB=new ve("cdk-dir-doc",{providedIn:"root",factory:PB});function PB(){return P(ct)}var kB=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function LB(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?kB.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var pl=(()=>{class t{value="ltr";change=new yt;constructor(){let n=P(OB,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=LB(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var is;function gD(){if(is==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return is=!1,is;if("scrollBehavior"in document.documentElement.style)is=!0;else{let t=Element.prototype.scrollTo;t?is=!/\{\s*\[native code\]\s*\}/.test(t.toString()):is=!1}}return is}var FB=20,yD=(()=>{class t{_ngZone=P(Ke);_platform=P($n);_renderer=P(An).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new Ne;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=FB){return this._platform.isBrowser?new dt(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(mu(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):So()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(Do(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,n)&&r.push(o)}),r}_scrollableContainsElement(n,r){let i=ba(r),o=n.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var BB=20,kv=(()=>{class t{_platform=P($n);_listeners;_viewportSize;_change=new Ne;_document=P(ct,{optional:!0});constructor(){let n=P(Ke),r=P(An).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,o=i.getBoundingClientRect(),s=-o.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(n=BB){return n>0?this._change.pipe(mu(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Lv={},Tf=(()=>{class t{_appId=P(Vc);getId(n){return this._appId!=="ng"&&(n+=this._appId),Lv.hasOwnProperty(n)||(Lv[n]=0),`${n}${Lv[n]++}`}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function vD(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var _D=gD(),Fv=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,n){this._viewportRuler=e,this._document=n}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=$t(-this._previousScrollPosition.left),e.style.top=$t(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,n=this._document.body,r=e.style,i=n.style,o=r.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),_D&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),_D&&(r.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let n=this._document.documentElement,r=this._viewportRuler.getViewportSize();return n.scrollHeight>r.height||n.scrollWidth>r.width}};var Bv=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,n,r,i){this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Do(n=>!n||!this._overlayRef.overlayElement.contains(n.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let n=this._viewportRuler.getViewportScrollPosition().top;Math.abs(n-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},xf=class{enable(){}disable(){}attach(){}};function Vv(t,e){return e.some(n=>{let r=t.bottom<n.top,i=t.top>n.bottom,o=t.right<n.left,s=t.left>n.right;return r||i||o||s})}function ED(t,e){return e.some(n=>{let r=t.top<n.top,i=t.bottom>n.bottom,o=t.left<n.left,s=t.right>n.right;return r||i||o||s})}var Uv=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,n,r,i){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let n=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:i}=this._viewportRuler.getViewportSize();Vv(n,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},UB=(()=>{class t{_scrollDispatcher=P(yD);_viewportRuler=P(kv);_ngZone=P(Ke);_document=P(ct);constructor(){}noop=()=>new xf;close=n=>new Bv(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new Fv(this._viewportRuler,this._document);reposition=n=>new Uv(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),hl=class{positionStrategy;scrollStrategy=new xf;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let n=Object.keys(e);for(let r of n)e[r]!==void 0&&(this[r]=e[r])}}};var jv=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var DD=(()=>{class t{_attachedOverlays=[];_document=P(ct);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),jB=(()=>{class t extends DD{_ngZone=P(Ke);_renderer=P(An).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=id(t)))(i||t)}})();static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),HB=(()=>{class t extends DD{_platform=P($n);_ngZone=P(Ke);_renderer=P(An).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Ri(this._renderer,r,"pointerdown",this._pointerDownListener,i),Ri(this._renderer,r,"click",this._clickListener,i),Ri(this._renderer,r,"auxclick",this._clickListener,i),Ri(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=Ni(n)};_clickListener=n=>{let r=Ni(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(wD(a.overlayElement,r)||wD(a.overlayElement,i))break;let c=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>c.next(n)):c.next(n)}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=id(t)))(i||t)}})();static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function wD(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=e;for(;r;){if(r===t)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var TD=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=St({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
45
- `],encapsulation:2,changeDetection:0})}return t})(),Nf=(()=>{class t{_platform=P($n);_containerElement;_document=P(ct);_styleLoader=P(fl);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Pv()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),Pv()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(TD)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Hv=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,n,r,i){this._renderer=n,this._ngZone=r,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=n.listen(this.element,"click",i)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Ca=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new Ne;_attachments=new Ne;_detachments=new Ne;_positionStrategy;_scrollStrategy;_locationChanges=Bt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new Ne;_outsidePointerEvents=new Ne;_renders=new Ne;_afterRenderRef;_afterNextRenderRef;constructor(e,n,r,i,o,s,a,c,l,u=!1,d,m){this._portalOutlet=e,this._host=n,this._pane=r,this._config=i,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=c,this._outsideClickDispatcher=l,this._animationsDisabled=u,this._injector=d,this._renderer=m,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy,this._afterRenderRef=Ag(()=>lg(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let n=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Yi(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof n?.onDestroy=="function"&&n.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),n}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=w(w({},this._config),e),this._updateElementSize()}setDirection(e){this._config=ne(w({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=$t(this._config.width),e.height=$t(this._config.height),e.minWidth=$t(this._config.minWidth),e.minHeight=$t(this._config.minHeight),e.maxWidth=$t(this._config.maxWidth),e.maxHeight=$t(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Hv(this._document,this._renderer,this._ngZone,n=>{this._backdropClick.next(n)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,n,r){let i=Av(n||[]).filter(o=>!!o);i.length&&(r?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(xs(hc(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},bD="cdk-overlay-connected-position-bounding-box",$B=/([A-Za-z%]+)$/,$v=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new Ne;_resizeSubscription=Bt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,n,r,i,o){this._viewportRuler=n,this._document=r,this._platform=i,this._overlayContainer=o,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(bD),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,n=this._overlayRect,r=this._viewportRect,i=this._containerRect,o=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(e,i,a),l=this._getOverlayPoint(c,n,a),u=this._getOverlayFit(l,n,r,a);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(u,l,r)){o.push({position:a,origin:c,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleArea<u.visibleArea)&&(s={overlayFit:u,overlayPoint:l,originPoint:c,position:a,overlayRect:n})}if(o.length){let a=null,c=-1;for(let l of o){let u=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);u>c&&(c=u,a=l)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&os(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(bD),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,n)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,n,r){let i;if(r.originX=="center")i=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;i=r.originX=="start"?s:a}n.left<0&&(i-=n.left);let o;return r.originY=="center"?o=e.top+e.height/2:o=r.originY=="top"?e.top:e.bottom,n.top<0&&(o-=n.top),{x:i,y:o}}_getOverlayPoint(e,n,r){let i;r.overlayX=="center"?i=-n.width/2:r.overlayX==="start"?i=this._isRtl()?-n.width:0:i=this._isRtl()?0:-n.width;let o;return r.overlayY=="center"?o=-n.height/2:o=r.overlayY=="top"?0:-n.height,{x:e.x+i,y:e.y+o}}_getOverlayFit(e,n,r,i){let o=SD(n),{x:s,y:a}=e,c=this._getOffset(i,"x"),l=this._getOffset(i,"y");c&&(s+=c),l&&(a+=l);let u=0-s,d=s+o.width-r.width,m=0-a,h=a+o.height-r.height,v=this._subtractOverflows(o.width,u,d),N=this._subtractOverflows(o.height,m,h),M=v*N;return{visibleArea:M,isCompletelyWithinViewport:o.width*o.height===M,fitsInViewportVertically:N===o.height,fitsInViewportHorizontally:v==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=CD(this._overlayRef.getConfig().minHeight),a=CD(this._overlayRef.getConfig().minWidth),c=e.fitsInViewportVertically||s!=null&&s<=i,l=e.fitsInViewportHorizontally||a!=null&&a<=o;return c&&l}return!1}_pushOverlayOnScreen(e,n,r){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let i=SD(n),o=this._viewportRect,s=Math.max(e.x+i.width-o.width,0),a=Math.max(e.y+i.height-o.height,0),c=Math.max(o.top-r.top-e.y,0),l=Math.max(o.left-r.left-e.x,0),u=0,d=0;return i.width<=o.width?u=l||-s:u=e.x<this._viewportMargin?o.left-r.left-e.x:0,i.height<=o.height?d=c||-a:d=e.y<this._viewportMargin?o.top-r.top-e.y:0,this._previousPushAmount={x:u,y:d},{x:e.x+u,y:e.y+d}}_applyPosition(e,n){if(this._setTransformOrigin(e),this._setOverlayElementStyles(n,e),this._setBoundingBoxStyles(n,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!WB(this._lastScrollVisibility,r)){let i=new jv(e,r);this._positionChanges.next(i)}this._lastScrollVisibility=r}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r,i=e.overlayY;e.overlayX==="center"?r="center":this._isRtl()?r=e.overlayX==="start"?"right":"left":r=e.overlayX==="start"?"left":"right";for(let o=0;o<n.length;o++)n[o].style.transformOrigin=`${r} ${i}`}_calculateBoundingBoxRect(e,n){let r=this._viewportRect,i=this._isRtl(),o,s,a;if(n.overlayY==="top")s=e.y,o=r.height-s+this._viewportMargin;else if(n.overlayY==="bottom")a=r.height-e.y+this._viewportMargin*2,o=r.height-a+this._viewportMargin;else{let h=Math.min(r.bottom-e.y+r.top,e.y),v=this._lastBoundingBoxSize.height;o=h*2,s=e.y-h,o>v&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-v/2)}let c=n.overlayX==="start"&&!i||n.overlayX==="end"&&i,l=n.overlayX==="end"&&!i||n.overlayX==="start"&&i,u,d,m;if(l)m=r.width-e.x+this._viewportMargin*2,u=e.x-this._viewportMargin;else if(c)d=e.x,u=r.right-e.x;else{let h=Math.min(r.right-e.x+r.left,e.x),v=this._lastBoundingBoxSize.width;u=h*2,d=e.x-h,u>v&&!this._isInitialRender&&!this._growAfterOpen&&(d=e.x-v/2)}return{top:s,left:d,bottom:a,right:m,width:u,height:o}}_setBoundingBoxStyles(e,n){let r=this._calculateBoundingBoxRect(e,n);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=$t(r.height),i.top=$t(r.top),i.bottom=$t(r.bottom),i.width=$t(r.width),i.left=$t(r.left),i.right=$t(r.right),n.overlayX==="center"?i.alignItems="center":i.alignItems=n.overlayX==="end"?"flex-end":"flex-start",n.overlayY==="center"?i.justifyContent="center":i.justifyContent=n.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=$t(o)),s&&(i.maxWidth=$t(s))}this._lastBoundingBoxSize=r,os(this._boundingBox.style,i)}_resetBoundingBoxStyles(){os(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){os(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,n){let r={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let u=this._viewportRuler.getViewportScrollPosition();os(r,this._getExactOverlayY(n,e,u)),os(r,this._getExactOverlayX(n,e,u))}else r.position="static";let a="",c=this._getOffset(n,"x"),l=this._getOffset(n,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),r.transform=a.trim(),s.maxHeight&&(i?r.maxHeight=$t(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=$t(s.maxWidth):o&&(r.maxWidth="")),os(this._pane.style,r)}_getExactOverlayY(e,n,r){let i={top:"",bottom:""},o=this._getOverlayPoint(n,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=$t(o.y);return i}_getExactOverlayX(e,n,r){let i={left:"",right:""},o=this._getOverlayPoint(n,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;i.right=`${a-(o.x+this._overlayRect.width)}px`}else i.left=$t(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:ED(e,r),isOriginOutsideView:Vv(e,r),isOverlayClipped:ED(n,r),isOverlayOutsideView:Vv(n,r)}}_subtractOverflows(e,...n){return n.reduce((r,i)=>r-Math.max(i,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,n=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+e-this._viewportMargin,bottom:r.top+n-this._viewportMargin,width:e-2*this._viewportMargin,height:n-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,n){return n==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&Av(e).forEach(n=>{n!==""&&this._appliedPanelClasses.indexOf(n)===-1&&(this._appliedPanelClasses.push(n),this._pane.classList.add(n))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof qt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let n=e.width||0,r=e.height||0;return{top:e.y,bottom:e.y+r,left:e.x,right:e.x+n,height:r,width:n}}};function os(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function CD(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split($B);return!n||n==="px"?parseFloat(e):null}return t||null}function SD(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function WB(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var ID="cdk-global-overlay-wrapper",Wv=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let n=e.getConfig();this._overlayRef=e,this._width&&!n.width&&e.updateSize({width:this._width}),this._height&&!n.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(ID),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:a}=r,c=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),u=this._xPosition,d=this._xOffset,m=this._overlayRef.getConfig().direction==="rtl",h="",v="",N="";c?N="flex-start":u==="center"?(N="center",m?v=d:h=d):m?u==="left"||u==="end"?(N="flex-end",h=d):(u==="right"||u==="start")&&(N="flex-start",v=d):u==="left"||u==="start"?(N="flex-start",h=d):(u==="right"||u==="end")&&(N="flex-end",v=d),e.position=this._cssPosition,e.marginLeft=c?"0":h,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=c?"0":v,n.justifyContent=N,n.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement,r=n.style;n.classList.remove(ID),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},GB=(()=>{class t{_viewportRuler=P(kv);_document=P(ct);_platform=P($n);_overlayContainer=P(Nf);constructor(){}global(){return new Wv}flexibleConnectedTo(n){return new $v(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Gv=(()=>{class t{scrollStrategies=P(UB);_overlayContainer=P(Nf);_positionBuilder=P(GB);_keyboardDispatcher=P(jB);_injector=P(bt);_ngZone=P(Ke);_document=P(ct);_directionality=P(pl);_location=P(Vg);_outsideClickDispatcher=P(HB);_animationsModuleType=P(Hb,{optional:!0});_idGenerator=P(Tf);_renderer=P(An).createRenderer(null,null);_appRef;_styleLoader=P(fl);constructor(){}create(n){this._styleLoader.load(TD);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new hl(n);return s.direction=s.direction||this._directionality.value,new Ca(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Un),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(sr)),new bf(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function zB(t,e){}var Sa=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext};var qB=(()=>{class t extends wa{_elementRef=P(qt);_focusTrapFactory=P(mD);_config;_interactivityChecker=P(Ov);_ngZone=P(Ke);_overlayRef=P(Ca);_focusMonitor=P(dD);_renderer=P(qs);_platform=P($n);_document=P(ct,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=P(jo);_injector=P(bt);_isDestroyed=!1;constructor(){super(),this._config=P(Sa,{optional:!0})||new Sa,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||Yi(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=Cf(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=Cf();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Cf()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=St({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&eo(Tv,7),r&2){let o;to(o=no())&&(i._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,i){r&2&&Dg("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[Ys],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,i){r&1&&At(0,zB,0,0,"ng-template",0)},dependencies:[Tv],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
46
- `],encapsulation:2})}return t})(),Ai=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new Ne;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,n){this.overlayRef=e,this.config=n,this.disableClose=n.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=n.id,this.keydownEvents.subscribe(r=>{r.keyCode===27&&!this.disableClose&&!vD(r)&&(r.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{n.closeOnOverlayDetachments!==!1&&this.close()})}close(e,n){if(this.containerInstance){let r=this.closed;this.containerInstance._closeInteractionType=n?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),r.next(e),r.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",n=""){return this.overlayRef.updateSize({width:e,height:n}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},YB=new ve("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=P(Gv);return()=>t.scrollStrategies.block()}}),ml=new ve("DialogData"),KB=new ve("DefaultDialogConfig");var xD=(()=>{class t{_overlay=P(Gv);_injector=P(bt);_defaultOptions=P(KB,{optional:!0});_parentDialog=P(t,{optional:!0,skipSelf:!0});_overlayContainer=P(Nf);_idGenerator=P(Tf);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Ne;_afterOpenedAtThisLevel=new Ne;_ariaHiddenElements=new Map;_scrollStrategy=P(YB);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=_h(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(To(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Sa;r=w(w({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),a=new Ai(s,r),c=this._attachContainer(s,a,r);return a.containerInstance=c,this._attachDialogContent(n,a,c,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){zv(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){zv(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),zv(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new hl({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let o=i.injector||i.viewContainerRef?.injector,s=[{provide:Sa,useValue:i},{provide:Ai,useValue:r},{provide:Ca,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,s.push(...i.container.providers(i))):a=qB;let c=new va(a,i.viewContainerRef,bt.create({parent:o||this._injector,providers:s}));return n.attach(c).instance}_attachDialogContent(n,r,i,o){if(n instanceof Br){let s=this._createInjector(o,r,i,void 0),a={$implicit:o.data,dialogRef:r};o.templateContext&&(a=w(w({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new Ea(n,null,a,s))}else{let s=this._createInjector(o,r,i,this._injector),a=i.attachComponentPortal(new va(n,o.viewContainerRef,s));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,a=[{provide:ml,useValue:n.data},{provide:Ai,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!s||!s.get(pl,null,{optional:!0}))&&a.push({provide:pl,useValue:{value:n.direction,change:So()}}),bt.create({parent:s||o,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(r){return new(r||t)};static \u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function zv(t,e){let n=t.length;for(;n--;)e(t[n])}var En=class{static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.defer=!0,e.includes("localhost")&&(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 injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e==="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let a of s)if(a.type==CSSRule.FONT_FACE_RULE){let c=e.split("/"),l=c.slice(0,c.length-1).join("/"),u=a.cssText;u=u.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${l}/$4")`);let d=document.createElement("style");d.appendChild(document.createTextNode(u)),document.head.appendChild(d)}}}),n.appendChild(r)}};var Yv=Pe(Yn());function ZB(t,e){if(t&1&&(X(0,"div",11),jt(1,"OPEN CART "),Q()),t&2){let n=re();Qi("animate-slide-up-enter",n.atcClicked)("hidden",!n.atcClicked)}}function XB(t,e){if(t&1&&(X(0,"div",11),jt(1,"ADD TO CART "),Q()),t&2){let n=re();Qi("animate-slide-up-exit",n.atcClicked)("hidden",n.atcClicked)}}var Ia=class t{items;clicked=new yt;performCTA=new yt;atcClicked=!1;clickAddToCart(e,n){e.stopPropagation(),this.performCTA.emit({item:n,cta:this.atcClicked?Yv.ClickActionType.OPEN_CART:Yv.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=St({type:t,selectors:[["cooee-product-card"]],inputs:{items:"items"},outputs:{clicked:"clicked",performCTA:"performCTA"},decls:15,vars:12,consts:[[1,"lc:absolute","lc:flex","lc:bottom-2","lc:gap-2","lc:w-full","lc:z-10"],[1,"lc:flex","lc:px-20","lc:w-full"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-col","lc:gap-1","lc:bg-white/50","lc:rounded-lg","lc:p-2","lc:w-full","lc:cursor-pointer","lc:backdrop-blur-xs",3,"click","keydown"],[1,"lc:flex","lc:gap-2","lc:w-full","lc:p-1"],["id","lc-item-image",1,"lc:w-16","lc:h-16","lc:object-cover","lc:box-border","lc:rounded-lg",3,"alt","src"],[1,"lc:flex","lc:flex-col","lc:gap-1","lc:text-xs"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-2"],["id","lc-item-price"],["id","lc-cta-button","tabindex","{0}",1,"lc:py-2","lc:rounded","lc:w-full","lc:text-center","lc:font-normal","lc:cursor-pointer",3,"click","keydown"],[1,"lc:text-white","lc:text-lg","lc:font-bold",3,"animate-slide-up-enter","hidden"],[1,"lc:text-white","lc:text-lg","lc:font-bold",3,"animate-slide-up-exit","hidden"],[1,"lc:text-white","lc:text-lg","lc:font-bold"]],template:function(n,r){if(n&1){let i=_n();X(0,"div",0)(1,"div",1),Hr(2),X(3,"div",2),at("click",function(){Je(i);let s=Hn(2);return Qe(r.clicked.emit(s))})("keydown",function(){Je(i);let s=Hn(2);return Qe(r.clicked.emit(s))}),X(4,"div",3),qe(5,"img",4),X(6,"div",5)(7,"span",6),jt(8),Q(),X(9,"span",7),jt(10),ar(11,"cooeeCurrency"),Q()()(),X(12,"div",8),at("click",function(s){Je(i);let a=Hn(2);return Qe(r.clickAddToCart(s,a))})("keydown",function(s){Je(i);let a=Hn(2);return Qe(r.clickAddToCart(s,a))}),At(13,ZB,2,4,"div",9)(14,XB,2,4,"div",10),Q()()()()}if(n&2){Z(2);let i=Uo(r.items==null?null:r.items[0]);Z(3),jn("alt",i.name),Ue("src",i.imageURL,cn),Z(3),Ir(" ",i.name," "),Z(2),Ir(" ",Dr(11,10,i.price)," "),Z(2),Qi("lc:bg-pink-500",!r.atcClicked)("lc:bg-black",r.atcClicked),Z(),Ut(r.atcClicked?13:14)}},dependencies:[Xr],styles:["@keyframes _ngcontent-%COMP%_slideUpExit{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@keyframes _ngcontent-%COMP%_slideUpEnter{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}[_nghost-%COMP%] .animate-slide-up-exit[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpExit .3s ease-out forwards}[_nghost-%COMP%] .animate-slide-up-enter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpEnter .3s ease-out forwards}"]})};var ht=class{static COOEE_URL_PREFIX="?from=cooee";static isShopify(){return!!window.Shopify}static getShopName(){if(this.isShopify())return window.Shopify.shop?.split(".")?.[0]}static getPageName(){if(!this.isShopify())return;let n=new URL(window.location.href).pathname.slice(1).split("/"),r=n[0];if(r==="")return"home";if(r==="collections")return n[2]==="products"?"product":"collection";if(r==="products")return"product";if(r==="cart")return"cart";if(location.href.includes("thank_you"))return"thank_you"}static getProductSlug(e){let i=(e.includes("://")?new URL(e).pathname:e).match(/\/products\/([^/]+?)(?:\.html)?$/);return i?i[1]:null}static getRootPrefix(){return window.Shopify?.routes?.root??"/"}static getCartURL(e){return this.getRootPrefix()+e+this.COOEE_URL_PREFIX}};var ND=Pe(Xv());var JB=(0,ND.default)(fetch),Rf=class{static async getAjaxItem(e){let n=this.getItemSlug(e);if(!n)return;let r,i=ht.getRootPrefix()+`products/${n}.js`;try{r=await(await JB(i)).json()}catch(o){S.error(`Failed to fetch ${i}`,o);let s=_t.getInstance();o instanceof Response?s.captureMessage(`Shopify product fetch failed ${o.status}`,"error",{mID:e.mID,path:i}):s.captureException(o,{mID:e.mID,path:i});return}if(!r){S.error("Item not found after AJAX call for:",e.mID);return}return r}static getItemSlug(e){if(e.link)try{let r=new URL(e.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return r?r[1]:void 0}catch{return}}};var Af=Pe(Yn());var QB=(t,e)=>e.id;function e2(t,e){if(t&1&&qe(0,"img",10),t&2){let n=e.$implicit,r=re(2);Ue("src",n,cn)("alt",r.item.name)}}function t2(t,e){if(t&1&&Kt(0,e2,1,2,"img",10,Ci),t&2){let n=re();Zt(n.ajaxItem.images)}}function n2(t,e){if(t&1&&qe(0,"img",10),t&2){let n=re();Ue("src",n.item.imageURL,cn)("alt",n.item.name)}}function r2(t,e){if(t&1){let n=_n();X(0,"div",20),at("click",function(){let i=Je(n).$implicit,o=re();return Qe(o.selectedVariant=i)})("keydown",function(){let i=Je(n).$implicit,o=re();return Qe(o.selectedVariant=i)}),X(1,"span",21),jt(2),Q()()}if(t&2){let n=e.$implicit,r=re();Qi("lc:bg-pink-100",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id)("lc:border-pink-300",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id)("lc:text-pink-700",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),Z(2),Ks(n.title)}}function i2(t,e){if(t&1&&(X(0,"div",16)(1,"h4",22),jt(2,"Description"),Q(),qe(3,"div",23),ar(4,"safeHtml"),Q()),t&2){let n=re();Z(3),Ue("innerHTML",Dr(4,1,n.ajaxItem==null?null:n.ajaxItem.description),jc)}}function o2(t,e){t&1&&jt(0," OPEN CART ")}function s2(t,e){t&1&&jt(0," ADD TO CART ")}var Da=class t{item;closeModel=new yt;performCTA=new yt;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=Af.ClickActionType;async ngOnInit(){this.ajaxItem=await Rf.getAjaxItem(this.item),this.processVariants()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){e.vID=this.selectedVariant?.id,e.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:e,cta:this.atcClicked?Af.ClickActionType.OPEN_CART:Af.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants.filter(e=>e.available)??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=St({type:t,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:29,vars:7,consts:[[1,"lc:bg-white","lc:flex","lc:flex-col","lc:h-full","lc:w-full"],[1,"lc:flex","lc:items-center","lc:justify-between","lc:px-4","lc:py-3","lc:border-b"],[1,"lc:text-xl","lc:font-bold"],[1,"lc:bg-transparent","lc:text-black/50","lc:border-0","lc:cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:flex-1","lc:overflow-y-auto","lc:p-4"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:gap-4"],[1,"lc:w-full","lc:flex","lc:overflow-x-auto","lc:gap-2","lc:flex-nowrap"],[1,"lc:w-28","lc:h-28","lc:object-contain",3,"src","alt"],[1,"lc:flex","lc:flex-col","lc:gap-2","lc:mt-4","lc:w-full"],[1,"lc:text-lg","lc:font-bold","lc:m-0"],[1,"lc:text-pink-600","lc:font-bold","lc:text-lg"],[1,"lc:flex","lc:flex-wrap","lc:gap-2","lc:pt-2","lc:w-full"],["tabindex","{0}",1,"lc:px-3","lc:py-2","lc:rounded-lg","lc:bg-gray-100","lc:text-gray-800","lc:text-sm","lc:cursor-pointer","lc:border","lc:border-gray-200","lc:flex","lc:items-center","lc:gap-1",3,"lc:bg-pink-100","lc:border-pink-300","lc:text-pink-700"],[1,"lc:mt-4","lc:border-t","lc:pt-4","lc:w-full"],[1,"lc:flex","lc:justify-center","lc:items-center","lc:px-4","lc:py-4","lc:bg-black/30","lc:rounded-lg","lc:gap-4","lc:rounded-b-none","lc:shadow-zinc-400"],["tabindex","{0}",1,"lc:bg-black","lc:text-white","lc:px-4","lc:py-2","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["tabindex","{0}",1,"lc:bg-pink-100","lc:text-pink-600","lc:px-4","lc:py-2","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["tabindex","{0}",1,"lc:px-3","lc:py-2","lc:rounded-lg","lc:bg-gray-100","lc:text-gray-800","lc:text-sm","lc:cursor-pointer","lc:border","lc:border-gray-200","lc:flex","lc:items-center","lc:gap-1",3,"click","keydown"],[1,"lc:truncate","lc:max-w-[200px]"],[1,"lc:font-semibold","lc:m-0"],[3,"innerHTML"]],template:function(n,r){n&1&&(X(0,"div",0)(1,"div",1)(2,"h2",2),jt(3,"Shop Now"),Q(),X(4,"button",3),at("click",function(){return r.closeDialog()}),Sr(),X(5,"svg",4),qe(6,"path",5)(7,"path",6),Q()()(),$s(),X(8,"div",7)(9,"div",8)(10,"div",9),At(11,t2,2,0)(12,n2,1,2,"img",10),Q(),X(13,"div",11)(14,"h3",12),jt(15),Q(),X(16,"span",13),jt(17),ar(18,"cooeeCurrency"),Q()(),X(19,"div",14),Kt(20,r2,3,7,"div",15,QB),Q(),At(22,i2,5,3,"div",16),Q()(),X(23,"div",17)(24,"div",18),at("click",function(){return r.clickAddToCart(r.item)})("keydown",function(){return r.clickAddToCart(r.item)}),At(25,o2,1,0)(26,s2,1,0),Q(),X(27,"div",19),at("click",function(){return r.performCTA.emit({item:r.item,cta:r.ClickActionType.GO_TO_PRODUCT})})("keydown",function(){return r.performCTA.emit({item:r.item,cta:r.ClickActionType.GO_TO_PRODUCT})}),jt(28," MORE INFO "),Q()()()),n&2&&(Z(11),Ut(!(r.ajaxItem==null||r.ajaxItem.images==null)&&r.ajaxItem.images.length?11:12),Z(4),Ks(r.item.name),Z(2),Ir(" ",Dr(18,5,(r.selectedVariant==null?null:r.selectedVariant.price)/100)," "),Z(3),Zt(r.availableVariants),Z(2),Ut(r.ajaxItem!=null&&r.ajaxItem.description?22:-1),Z(3),Ut(r.atcClicked?25:26))},dependencies:[pa,Xr],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px;overflow:hidden}"]})};function a2(t,e){t&1&&(Sr(),X(0,"svg",1),qe(1,"path",2)(2,"path",3),Q())}function c2(t,e){t&1&&(Sr(),X(0,"svg",1),qe(1,"path",2)(2,"path",4),Q())}var Ta=class t{muted;buttonClicked=new yt;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=St({type:t,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:1,consts:[["id","lc-mute-button",1,"lc:bg-black/50","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:border-none","lc:cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(n,r){n&1&&(X(0,"button",0),at("click",function(){return r.buttonClicked.emit()}),At(1,a2,3,0,":svg:svg",1)(2,c2,3,0,":svg:svg",1),Q()),n&2&&(Z(),Ut(r.muted?1:2))},encapsulation:2})};var xa=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=St({type:t,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:4,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(n,r){n&1&&(X(0,"div",0)(1,"div",1)(2,"div",2),qe(3,"div",3),Q()()()),n&2&&(Z(3),Ji("width",r.width,"%"))},encapsulation:2})};var vo=Pe(Yn());var RT=Pe(Mf()),AT=Pe($o());var l2=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|cookiehubscan|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab",u2=/bot|crawl|http|lighthouse|scan|search|spider/i,gl;function d2(){if(gl instanceof RegExp)return gl;try{gl=new RegExp(l2,"i")}catch{gl=u2}return gl}function MD(t){return!!t&&d2().test(t)}var OD=Pe(Jv());var yl=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let e;try{e=new OD.URLBuilder(location.href)}catch{return{}}let n={};this.UTM_PARAMS.forEach(i=>{let o=e.getQueryParam(i);o&&(n[i]=o)});let r={};return Object.keys(this.TW_PARAMS).forEach(i=>{let o=e.getQueryParam(this.TW_PARAMS[i]);o&&(r[i]=o)}),w(w({},r),n)}};var ei=class t{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(e){this.name=e.name,this.path=e.path,this.qs=e.qs,this.referrer=e.referrer,this.utmSource=e.utmSource||e.utm_source,this.utmMedium=e.utmMedium||e.utm_medium,this.utmCampaign=e.utmCampaign||e.utm_campaign,this.utmId=e.utmId||e.utm_id,this.utmTerm=e.utmTerm||e.utm_term,this.utmContent=e.utmContent||e.utm_content}static parseFromCurrent(){let e=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new t(w({origin:location.origin,path:e,qs:location.search,referrer:yl.getReferrer(),name:Ae.get().pageName},yl.getUTMParams()))}};var ke=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}};var Qv={d:(t,e)=>{for(var n in e)Qv.o(e,n)&&!Qv.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e_={};Qv.d(e_,{A:()=>m2,k:()=>t_});var p2=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(l){try{c(r.next(l))}catch(u){o(u)}}function a(l){try{c(r.throw(l))}catch(u){o(u)}}function c(l){var u;l.done?i(l.value):(u=l.value,u instanceof n?u:new n(function(d){d(u)})).then(s,a)}c((r=r.apply(t,e||[])).next())})},h2=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!((i=i.length>0&&i[i.length-1])||u[0]!==6&&u[0]!==2)){s=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(u[0]===6&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(d){u=[6,d],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}};function t_(){return p2(this,void 0,Promise,function(){return h2(this,function(_a){switch(_a.label){case 0:return[4,new Promise(function(resolve,reject){var browserName="Unknown";function __callback(t){resolve({isPrivate:t,browserName})}function identifyChromium(){var t=navigator.userAgent;return t.match(/Chrome/)?navigator.brave!==void 0?"Brave":t.match(/Edg/)?"Edge":t.match(/OPR/)?"Opera":"Chrome":"Chromium"}function assertEvalToString(t){return t===eval.toString().length}function feid(){var toFixedEngineID=0;try{eval("(-1).toFixed(-1);")}catch(t){toFixedEngineID=t.message.length}return toFixedEngineID}function isSafari(){return feid()===44}function isChrome(){return feid()===51}function isFirefox(){return feid()===25}function isMSIE(){return navigator.msSaveBlob!==void 0&&assertEvalToString(39)}function newSafariTest(){var t=String(Math.random());try{window.indexedDB.open(t,1).onupgradeneeded=function(e){var n,r,i=(n=e.target)===null||n===void 0?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(s){var o=s;return s instanceof Error&&(o=(r=s.message)!==null&&r!==void 0?r:s),typeof o!="string"?void __callback(!1):void __callback(o.includes("BlobURLs are not yet supported"))}finally{i.close(),window.indexedDB.deleteDatabase(t)}}}catch{__callback(!1)}}function oldSafariTest(){var t=window.openDatabase,e=window.localStorage;try{t(null,null,null,null)}catch{return void __callback(!0)}try{e.setItem("test","1"),e.removeItem("test")}catch{return void __callback(!0)}__callback(!1)}function safariPrivateTest(){navigator.maxTouchPoints!==void 0?newSafariTest():oldSafariTest()}function getQuotaLimit(){var t=window;return t.performance!==void 0&&t.performance.memory!==void 0&&t.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824}function storageQuotaChromePrivateTest(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(t,e){__callback(Math.round(e/1048576)<2*Math.round(getQuotaLimit()/1048576))},function(t){reject(new Error("detectIncognito somehow failed to query storage quota: "+t.message))})}function oldChromePrivateTest(){(0,window.webkitRequestFileSystem)(0,1,function(){__callback(!1)},function(){__callback(!0)})}function chromePrivateTest(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?storageQuotaChromePrivateTest():oldChromePrivateTest()}function firefoxPrivateTest(){__callback(navigator.serviceWorker===void 0)}function msiePrivateTest(){__callback(window.indexedDB===void 0)}function main(){isSafari()?(browserName="Safari",safariPrivateTest()):isChrome()?(browserName=identifyChromium(),chromePrivateTest()):isFirefox()?(browserName="Firefox",firefoxPrivateTest()):isMSIE()?(browserName="Internet Explorer",msiePrivateTest()):reject(new Error("detectIncognito cannot determine the browser"))}main()})];case 1:return[2,_a.sent()]}})})}typeof window<"u"&&(window.detectIncognito=t_);var m2=t_,PD=e_.A,wZ=e_.k;var DT=Pe($o());var kD=Pe(n_()),Zn=class t{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new kD.default;constructor(){}static get(){return t._instance||(t._instance=new t),t._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===t.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===t.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(e){let n=e.max,r=e.cont.w,i=e.cont.h,o=e.spc,s=t.get().getWidth(),a=t.get().getHeight();n&&(s=s?Math.min(s,n):n,a=a?Math.min(a,n):n),a&&(s-=o.getHorizontal(),a-=o.getVertical(),s/a<r/i?this.scalingFactor=s/r:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(e){return this.doc.createElement(e)}appendChild(e,n){e.appendChild(n)}setStyles(e,n){Object.assign(e.style,n)}setStyle(e,n,r){if(n){if(!r){e.style.removeProperty(n);return}e.style.setProperty(n,r,"important")}}setAttribute(e,n,r){e.setAttribute(n,r)}removeInApp(e){let n=document.querySelector(`.${e.rootClassName}`);n&&n.parentElement.removeChild(n)}setParentContainer(e){this.parentContainer=e,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}};var kf=class{parser;result={};constructor(){this.parser=Zn.get().getUAParser()}async get(){let e=this.result;return this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),await this.getBatteryInfo(),await this.getLocation(),e.locale=navigator.language,e.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},e.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},e.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},e.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},e.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},e.navigatorUA=navigator.userAgent,e.isHeadless=navigator.webdriver,e}getDeviceMemory(){let e=navigator;if(!e.deviceMemory)return;let n=e.deviceMemory;this.result.mem={tot:n*1024}}getNetworkType(){let e=navigator,n=e.connection||e.mozConnection||e.webkitConnection;n?.effectiveType&&(this.result.net={type:n.effectiveType})}getOrientation(){let e=screen.orientation?.type;e&&(this.result.orientation=e)}getDPI(){let e=document.createElement("div");e.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(e);let n=window.devicePixelRatio||1,r=e.offsetWidth*n;return document.body.removeChild(e),r}async getLocation(){if(!(!navigator.geolocation||!navigator.permissions||(await navigator.permissions.query({name:"geolocation"})).state!="granted"))return new Promise(n=>{navigator.geolocation.getCurrentPosition(r=>{this.result.coords=[r.coords.latitude,r.coords.longitude],n()},()=>n())})}async getBatteryInfo(){if("getBattery"in navigator)try{let n=await navigator.getBattery();this.result.bat={l:n.level*100,c:n.charging}}catch{}}};var Ra=class{isLocked=!1;queue=[];async acquire(){if(this.isLocked)await new Promise(e=>this.queue.push(e));else{this.isLocked=!0;return}}release(){if(this.queue.length>0){let e=this.queue.shift();e&&e()}else this.isLocked=!1}};var je=class t{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new Ra;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new t),this.CURRENT}async getNormalisedCart(e){await this.fetchCartFromShopify(e);let n=this.convertToCooeeCart();return e&&await vt.set(Ce.CURRENT_CART,n),n}async addCooeeAttributes(){await this.lock.acquire();let e=await un.get(Ce.ID),n=await vt.get(Ce.DEVICE_ID);if(this.attributes?.letscooee_did===n&&this.attributes?.letscooee_sid===e){S.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let r={letscooee_did:n,letscooee_sid:e,__letscooee_time:new Date().toLocaleString()};S.debug("Updating Shopify cart with attributes:",r);let i=ht.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:r})})).json();S.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),this.lock.release()}update(e){return this.token=e.token,this.items=e.items,this.total_price=e.total_price,this.original_total_price=e.original_total_price,this.currency=e.currency,this.item_count=e.item_count,this.attributes=e.attributes,Ae.get().currencyCode=this.currency,S.log("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}convertToCooeeCart(){return{amount:this.total_price/100,originalAmount:this.original_total_price/100,currency:this.currency,itemCount:this.item_count,items:this.normaliseItems(this.items),token:this.token}}normaliseItems(e){if(!e)return S.error("No item received to be sent"),[];Array.isArray(e)||(e=[e]);let n=[];for(let r of e){if(!r.id||!r.title){S.warn("Invalid item received",r);continue}let i={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,properties:r.properties},o=r.selling_plan_allocation?.selling_plan;if(!o){n.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:o.fixed_selling_plan,id:o.id,name:o.name,recurringDeliveries:o.recurring_deliveries}},n.push(i)}return n}async fetchCartFromShopify(e){if(!e&&this.token){S.debug("Not fetching cart");return}S.debug("Fetching cart");let n=ht.getCartURL("cart.js"),r=await(await fetch(n)).json();this.update(r)}};var ss=(r=>(r[r.LOW=1]="LOW",r[r.MEDIUM=2]="MEDIUM",r[r.HIGH=3]="HIGH",r))(ss||{});var Aa=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let n=ss[e]?.toLowerCase();n&&(S.debug(`Sending ${n} intent to MS Clarity`),window.clarity("set","Cooee Intent",n))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}};var hr=class{static isOn=!1;static element;static watch(){let e=S.getDebugParam();(e==="1"||e==="on")&&Le.getInstance().updateDeviceProps({debugTill:this.getDebugMillis()}),e==="on"?sessionStorage.cooeeDebug="1":e==="off"&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())}static prepend(e){if(!this.isOn)return;let n=document.createElement("div");n.innerHTML="&#x2022; "+new Date().toLocaleString()+" - "+e,this.element.prepend(n)}static renderDebugBar(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),document.body.appendChild(this.element)}static dragElement(){let e=0,n=0,r=0,i=0,o=c=>{c=c||window.event,c.preventDefault(),r=c.clientX,i=c.clientY,document.onmouseup=a,document.onmousemove=s},s=c=>{c=c||window.event,c.preventDefault(),e=r-c.clientX,n=i-c.clientY,r=c.clientX,i=c.clientY,this.element.style.top=this.element.offsetTop-n+"px",this.element.style.left=this.element.offsetLeft-e+"px"},a=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=o}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}};var _l=class extends ro{static storeName="app";static{this.storage=ta(this.storeName)}};var Lf=Pe($o());var ti=class t{static INSTANCE=new t;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(e,n){this.topics[e]||(this.topics[e]=new Ne),this.topics[e].next(n)}subscriber(e){return this.topics[e]||(this.topics[e]=new Ne),this.topics[e].asObservable()}};var Wt=class t{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=Dt.get().website??{};currentState=!1;drawerSubject=new ui({open:!1,firstOpen:!1});mutationObserver;firstOpen=!0;selector;shadowParentElementSelector;iconSelector=['button[drawer-to-open="cart-drawer"]','a[href="/cart"]',".header__icon--cart","#cart-icon-bubble",".cart-icon-bubble",".cart-count",'a[onclick*="handleFloCartBtn"]'].join(",");cartSelector=[t.DEFAULT_SELECTOR,"#halo-cart-sidebar",'[role="dialog"][class*="cart" i]','[id*="section-cart" i]',"#sidebar-cart","#rebuy-cart","#mini-cart","#flo-cart-wrapper","#drawer-cart","#UpcartPopupBackDrop",'[id$="CartDrawer" i]'].join(",");constructor(){this.initialize(),document.addEventListener(k.CTA_AFTER_REFRESH_UI,this.updateBubble.bind(this))}get element(){return this.cartDrawerElement}static get(){return t._instance||(t._instance=new t),t._instance}static forceUpdate(){t._instance=new t}isOpen(){let e=this.inShadow?this.isPresent():this.isVisible();return Lf.default.log(`Cart drawer is currently ${e?"open":"close"}`),e}open(){if(this.isOpen()){S.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let e=document.querySelector(this.iconSelector);if(!e){S.debug("No clickable cart icon found with selector",this.iconSelector);return}e.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===t.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(e,n=!0){if(this.isMiniCart()&&this.element?._rerenderCart)this.element._rerenderCart({detail:{cart:e}});else if(this.isShopifyDefaultDrawer())this.element?.renderContents&&e&&(this.element.classList.remove("is-empty"),this.element.renderContents?.(e));else if(this.element?.onCartDrawerUpdate)this.element.onCartDrawerUpdate();else if(window.cartGiftUpdate){if(!e?.items?.[0])return;let r=e.items[0].id,i=e.items[0].quantity,o=e.items[0].price;window.cartGiftUpdate(r,o,i,"","ADD_TO_CART")}else if(window.icartCartActivityEvent)window.icartCartActivityEvent();else if(window.theme?.CartDrawer)window.theme?.CartDrawer.init?new window.theme.CartDrawer().init():new window.theme.CartDrawer;else if(window.Hs_CartDrawer?.updateSlideCart)window.Hs_CartDrawer.updateSlideCart();else if(window.theme?.fetch_side_cart)window.theme.fetch_side_cart();else if(window.theme?.Cart?.updateCart)window.theme.Cart.updateCart();else if(window.cartUpdate)window.cartUpdate();else if(this.element?._onCartRefresh)this.element._onCartRefresh();else if(window.cart?.getCart)window.cart.getCart();else if(this.element?.tagName?.toLowerCase()==="cart-drawer-component")document.dispatchEvent(new CustomEvent("action:cart:updateCartandShowCart"));else if(this.element?.id==="sidebar-cart")document.body.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{}}));else if(this.element?.id==="quick-cart"){let r=document.querySelector('a[href="/cart"]');r&&r.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():S.info("No method found to update the cart without refreshing");document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),n&&ti.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let e=this.configWebsite.cartDrawerSelector;if(!e){await this.findCartDrawer();return}let n=e.split(k.SHADOW_SPLITTER);n.length===1?(this.selector=n[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=n[0]?.trim(),this.selector=n[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!ht.isShopify())return;let e=this.selector||this.cartSelector;if(this.cartDrawerElement=await de.retrySelector(e),!this.cartDrawerElement){Lf.default.warn("Max attempts exhausted to find cart drawer");return}Lf.default.log("Found",this.cartDrawerElement,`from selector: ${e}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!ht.isShopify()||!this.shadowParentElementSelector)return;let n=(await de.retrySelector(this.shadowParentElementSelector))?.shadowRoot;n?.mode==="open"&&(this.cartDrawerShadowElement=n,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;let e=this.cartDrawerElement.getBoundingClientRect(),n=(window.innerHeight||document.documentElement.clientHeight)+.5,r=(window.innerWidth||document.documentElement.clientWidth)+.5,i=e.top<=n&&e.bottom>=0,o=e.left<=r&&e.right>=0,s=i&&o,a=this.cartDrawerElement.tagName.toLowerCase()===t.DEFAULT_SELECTOR&&this.cartDrawerElement.open,c=getComputedStyle(this.cartDrawerElement),l=c.display!=="none"&&c.visibility!=="hidden"&&parseFloat(c.opacity)>0,u=!this.cartDrawerElement.hidden,d=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,m=c.transform.match(/matrix\(([^)]+)\)/),h=0,v=0;if(m){let we=m[1].split(", ").map(parseFloat);h=we[4],v=we[5]}let N=h+e.left>r||h+e.right<0||v+e.top>n||v+e.bottom<0,M=Math.max(0,Math.min(e.right,r)-Math.max(e.left,0)),A=Math.max(0,Math.min(e.bottom,n)-Math.max(e.top,0)),O=M*A,L=e.width*e.height,G=L>0&&O/L>=.1;return(s||a||!N)&&l&&u&&d&&G}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(de.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let e=this.cartDrawerElement||this.cartDrawerShadowElement,n=new Ne;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{n.next()}),this.mutationObserver.observe(e,{attributes:!0,subtree:!0,childList:this.inShadow}),n.pipe(vr(500)).subscribe(()=>{let r=this.isOpen();this.currentState!==r&&(this.currentState=r,this.drawerSubject.next({open:r,firstOpen:this.firstOpen}),this.firstOpen&&(this.firstOpen=!1))})}isPresent(){return!this.selector||!this.cartDrawerShadowElement?!1:!!this.cartDrawerShadowElement.querySelector(this.selector)}async updateBubble(){let e=(await je.getCurrent().getNormalisedCart(!0)).itemCount,n=document.querySelector(".cart-link__bubble");n&&(n.innerText=e+"")}};var Ff=class{static processConfiguration(){let e=Dt.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Le.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await vt.get(Ce.GA_CLIENT_ID),n=await this.getClientIDViaGTag();if(e!==n)return await vt.set(Ce.GA_CLIENT_ID,n),n}static async getClientIDViaGTag(){let n=Dt.get().gaMeasurementID;if(!(!n||!window.gtag))return new Promise(r=>{window.gtag("get",n,"client_id",i=>{r(i)})})}};var ST=Pe(lf());var Fn=Pe(Yn()),po=Pe(Mf()),L_=Pe(i_());var Hf,nt,UD,c_,as,LD,jD,o_,HD,l_,s_,a_,g2,El={},$D=[],y2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,u_=Array.isArray;function ao(t,e){for(var n in e)t[n]=e[n];return t}function d_(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function f_(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Hf.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Uf(t,s,r,i,null)}function Uf(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++UD,__i:-1,__u:0};return i==null&&nt.vnode!=null&&nt.vnode(o),o}function ri(t){return t.children}function ni(t,e){this.props=t,this.context=e}function Ma(t,e){if(e==null)return t.__?Ma(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Ma(t):null}function WD(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return WD(t)}}function FD(t){(!t.__d&&(t.__d=!0)&&as.push(t)&&!jf.__r++||LD!==nt.debounceRendering)&&((LD=nt.debounceRendering)||jD)(jf)}function jf(){var t,e,n,r,i,o,s,a;for(as.sort(o_);t=as.shift();)t.__d&&(e=as.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=ao({},i)).__v=i.__v+1,nt.vnode&&nt.vnode(r),p_(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Ma(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,qD(s,r,a),r.__e!=o&&WD(r)),as.length>e&&as.sort(o_));jf.__r=0}function GD(t,e,n,r,i,o,s,a,c,l,u){var d,m,h,v,N,M,A=r&&r.__k||$D,O=e.length;for(c=v2(n,e,A,c,O),d=0;d<O;d++)(h=n.__k[d])!=null&&(m=h.__i===-1?El:A[h.__i]||El,h.__i=d,M=p_(t,h,m,i,o,s,a,c,l,u),v=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&h_(m.ref,null,h),u.push(h.ref,h.__c||v,h)),N==null&&v!=null&&(N=v),4&h.__u||m.__k===h.__k?c=zD(h,c,t):typeof h.type=="function"&&M!==void 0?c=M:v&&(c=v.nextSibling),h.__u&=-7);return n.__e=N,c}function v2(t,e,n,r,i){var o,s,a,c,l,u=n.length,d=u,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Uf(null,s,null,null,null):u_(s)?Uf(ri,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Uf(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(l=s.__i=_2(s,n,c,d))!==-1&&(d--,(a=n[l])&&(a.__u|=2)),a==null||a.__v===null?(l==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):l!=c&&(l==c-1?m--:l==c+1?m++:(l>c?m--:m++,s.__u|=4))):t.__k[o]=null;if(d)for(o=0;o<u;o++)(a=n[o])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Ma(a)),YD(a,a));return r}function zD(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=zD(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Ma(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function _2(t,e,n,r){var i,o,s=t.key,a=t.type,c=e[n];if(c===null||c&&s==c.key&&a===c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((c=e[i])&&(2&c.__u)==0&&s==c.key&&a===c.type)return i;i--}if(o<e.length){if((c=e[o])&&(2&c.__u)==0&&s==c.key&&a===c.type)return o;o++}}return-1}function BD(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||y2.test(e)?n:n+"px"}function Vf(t,e,n,r,i){var o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||BD(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||BD(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(HD,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=l_,t.addEventListener(e,o?a_:s_,o)):t.removeEventListener(e,o?a_:s_,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function VD(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=l_++;else if(e.t<n.u)return;return n(nt.event?nt.event(e):e)}}}function p_(t,e,n,r,i,o,s,a,c,l){var u,d,m,h,v,N,M,A,O,L,G,we,j,fe,J,be,it,He=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=e.__e=n.__e]),(u=nt.__b)&&u(e);e:if(typeof He=="function")try{if(A=e.props,O="prototype"in He&&He.prototype.render,L=(u=He.contextType)&&r[u.__c],G=u?L?L.props.value:u.__:r,n.__c?M=(d=e.__c=n.__c).__=d.__E:(O?e.__c=d=new He(A,G):(e.__c=d=new ni(A,G),d.constructor=He,d.render=w2),L&&L.sub(d),d.props=A,d.state||(d.state={}),d.context=G,d.__n=r,m=d.__d=!0,d.__h=[],d._sb=[]),O&&d.__s==null&&(d.__s=d.state),O&&He.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ao({},d.__s)),ao(d.__s,He.getDerivedStateFromProps(A,d.__s))),h=d.props,v=d.state,d.__v=e,m)O&&He.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),O&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(O&&He.getDerivedStateFromProps==null&&A!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,G),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,G)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(d.props=A,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(et){et&&(et.__=e)}),we=0;we<d._sb.length;we++)d.__h.push(d._sb[we]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,G),O&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,v,N)})}if(d.context=G,d.props=A,d.__P=t,d.__e=!1,j=nt.__r,fe=0,O){for(d.state=d.__s,d.__d=!1,j&&j(e),u=d.render(d.props,d.state,d.context),J=0;J<d._sb.length;J++)d.__h.push(d._sb[J]);d._sb=[]}else do d.__d=!1,j&&j(e),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++fe<25);d.state=d.__s,d.getChildContext!=null&&(r=ao(ao({},r),d.getChildContext())),O&&!m&&d.getSnapshotBeforeUpdate!=null&&(N=d.getSnapshotBeforeUpdate(h,v)),a=GD(t,u_(be=u!=null&&u.type===ri&&u.key==null?u.props.children:u)?be:[be],e,n,r,i,o,s,a,c,l),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),M&&(d.__E=d.__=null)}catch(et){if(e.__v=null,c||o!=null)if(et.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(it=o.length;it--;)d_(o[it]);else e.__e=n.__e,e.__k=n.__k;nt.__e(et,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=E2(n.__e,e,n,r,i,o,s,c,l);return(u=nt.diffed)&&u(e),128&e.__u?void 0:a}function qD(t,e,n){for(var r=0;r<n.length;r++)h_(n[r],n[++r],n[++r]);nt.__c&&nt.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){nt.__e(o,i.__v)}})}function E2(t,e,n,r,i,o,s,a,c){var l,u,d,m,h,v,N,M=n.props,A=e.props,O=e.type;if(O=="svg"?i="http://www.w3.org/2000/svg":O=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(l=0;l<o.length;l++)if((h=o[l])&&"setAttribute"in h==!!O&&(O?h.localName==O:h.nodeType==3)){t=h,o[l]=null;break}}if(t==null){if(O==null)return document.createTextNode(A);t=document.createElementNS(i,O,A.is&&A),a&&(nt.__m&&nt.__m(e,o),a=!1),o=null}if(O===null)M===A||a&&t.data===A||(t.data=A);else{if(o=o&&Hf.call(t.childNodes),M=n.props||El,!a&&o!=null)for(M={},l=0;l<t.attributes.length;l++)M[(h=t.attributes[l]).name]=h.value;for(l in M)if(h=M[l],l!="children"){if(l=="dangerouslySetInnerHTML")d=h;else if(!(l in A)){if(l=="value"&&"defaultValue"in A||l=="checked"&&"defaultChecked"in A)continue;Vf(t,l,null,h,i)}}for(l in A)h=A[l],l=="children"?m=h:l=="dangerouslySetInnerHTML"?u=h:l=="value"?v=h:l=="checked"?N=h:a&&typeof h!="function"||M[l]===h||Vf(t,l,h,M[l],i);if(u)a||d&&(u.__html===d.__html||u.__html===t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(d&&(t.innerHTML=""),GD(t,u_(m)?m:[m],e,n,r,O=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ma(n,0),a,c),o!=null)for(l=o.length;l--;)d_(o[l]);a||(l="value",O=="progress"&&v==null?t.removeAttribute("value"):v!==void 0&&(v!==t[l]||O=="progress"&&!v||O=="option"&&v!==M[l])&&Vf(t,l,v,M[l],i),l="checked",N!==void 0&&N!==t[l]&&Vf(t,l,N,M[l],i))}return t}function h_(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){nt.__e(i,n)}}function YD(t,e,n){var r,i;if(nt.unmount&&nt.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||h_(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){nt.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&YD(r[i],e,n||typeof t.type!="function");n||d_(t.__e),t.__c=t.__=t.__e=void 0}function w2(t,e,n){return this.constructor(t,n)}function KD(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),nt.__&&nt.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],p_(e,t=(!r&&n||e).__k=f_(ri,null,[t]),i||El,El,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Hf.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),qD(o,t,s)}Hf=$D.slice,nt={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},UD=0,c_=function(t){return t!=null&&t.constructor==null},ni.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ao({},this.state),typeof t=="function"&&(t=t(ao({},n),this.props)),t&&ao(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),FD(this))},ni.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),FD(this))},ni.prototype.render=ri,as=[],jD=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o_=function(t,e){return t.__v.__b-e.__v.__b},jf.__r=0,HD=/(PointerCapture)$|Capture$/i,l_=0,s_=VD(!1),a_=VD(!0),g2=0;var g_,Xn,m_,ZD,XD=0,oT=[],on=nt,JD=on.__b,QD=on.__r,eT=on.diffed,tT=on.__c,nT=on.unmount,rT=on.__;function b2(t,e){on.__h&&on.__h(Xn,t,XD||e),XD=0;var n=Xn.__H||(Xn.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function v_(t,e){var n=b2(g_++,7);return I2(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function C2(){for(var t;t=oT.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($f),t.__H.__h.forEach(y_),t.__H.__h=[]}catch(e){t.__H.__h=[],on.__e(e,t.__v)}}on.__b=function(t){Xn=null,JD&&JD(t)},on.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rT&&rT(t,e)},on.__r=function(t){QD&&QD(t),g_=0;var e=(Xn=t.__c).__H;e&&(m_===Xn?(e.__h=[],Xn.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach($f),e.__h.forEach(y_),e.__h=[],g_=0)),m_=Xn},on.diffed=function(t){eT&&eT(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(oT.push(e)!==1&&ZD===on.requestAnimationFrame||((ZD=on.requestAnimationFrame)||S2)(C2)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),m_=Xn=null},on.__c=function(t,e){e.some(function(n){try{n.__h.forEach($f),n.__h=n.__h.filter(function(r){return!r.__||y_(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],on.__e(r,n.__v)}}),tT&&tT(t,e)},on.unmount=function(t){nT&&nT(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{$f(r)}catch(i){e=i}}),n.__H=void 0,e&&on.__e(e,n.__v))};var iT=typeof requestAnimationFrame=="function";function S2(t){var e,n=function(){clearTimeout(r),iT&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);iT&&(e=requestAnimationFrame(n))}function $f(t){var e=Xn,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Xn=e}function y_(t){var e=Xn;t.__c=t.__(),Xn=e}function I2(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var D2=Symbol.for("preact-signals");function E_(){if(Oa>1)Oa--;else{for(var t,e=!1;wl!==void 0;){var n=wl;for(wl=void 0,__++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&aT(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(__=0,Oa--,e)throw t}}var Et=void 0;var wl=void 0,Oa=0,__=0,Wf=0;function sT(t){if(Et!==void 0){var e=t.n;if(e===void 0||e.t!==Et)return e={i:0,S:t,p:Et.s,n:void 0,t:Et,e:void 0,x:void 0,r:e},Et.s!==void 0&&(Et.s.n=e),Et.s=e,t.n=e,32&Et.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=Et.s,e.n=void 0,Et.s.n=e,Et.s=e),e}}function sn(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}sn.prototype.brand=D2;sn.prototype.h=function(){return!0};sn.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};sn.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}};sn.prototype.subscribe=function(t){var e=this;return wn(function(){var n=e.value,r=Et;Et=void 0;try{t(n)}finally{Et=r}})};sn.prototype.valueOf=function(){return this.value};sn.prototype.toString=function(){return this.value+""};sn.prototype.toJSON=function(){return this.value};sn.prototype.peek=function(){var t=Et;Et=void 0;try{return this.value}finally{Et=t}};Object.defineProperty(sn.prototype,"value",{get:function(){var t=sT(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(__>100)throw new Error("Cycle detected");this.v=t,this.i++,Wf++,Oa++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{E_()}}}});function mr(t){return new sn(t)}function aT(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function cT(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function lT(t){for(var e=t.s,n=void 0;e!==void 0;){var r=e.p;e.i===-1?(e.S.U(e),r!==void 0&&(r.n=e.n),e.n!==void 0&&(e.n.p=r)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=r}t.s=n}function Pa(t){sn.call(this,void 0),this.x=t,this.s=void 0,this.g=Wf-1,this.f=4}(Pa.prototype=new sn).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Wf))return!0;if(this.g=Wf,this.f|=1,this.i>0&&!aT(this))return this.f&=-2,!0;var t=Et;try{cT(this),Et=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Et=t,lT(this),this.f&=-2,!0};Pa.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}sn.prototype.S.call(this,t)};Pa.prototype.U=function(t){if(this.t!==void 0&&(sn.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Pa.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Pa.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=sT(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function w_(t){return new Pa(t)}function uT(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Oa++;var n=Et;Et=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,b_(t),r}finally{Et=n,E_()}}}function b_(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,uT(t)}function T2(t){if(Et!==this)throw new Error("Out-of-order effect");lT(this),Et=t,this.f&=-2,8&this.f&&b_(this),E_()}function bl(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}bl.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};bl.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,uT(this),cT(this),Oa++;var t=Et;return Et=this,T2.bind(this,t)};bl.prototype.N=function(){2&this.f||(this.f|=2,this.o=wl,wl=this)};bl.prototype.d=function(){this.f|=8,1&this.f||b_(this)};function wn(t){var e=new bl(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var S_,C_;function ka(t,e){nt[t]=e.bind(null,nt[t]||function(){})}function Gf(t){C_&&C_(),C_=t&&t.S()}function dT(t){var e=this,n=t.data,r=N2(n);r.value=n;var i=v_(function(){for(var o=e.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return e.__$u.c=function(){var s,a=e.__$u.S(),c=i.value;a(),c_(c)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=c},w_(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}dT.displayName="_st";Object.defineProperties(sn.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:dT},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ka("__b",function(t,e){if(typeof e.type=="string"){var n,r=e.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof sn&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});ka("__r",function(t,e){Gf();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return wn(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),S_=r,Gf(n),t(e)});ka("__e",function(t,e,n,r){Gf(),S_=void 0,t(e,n,r)});ka("diffed",function(t,e){Gf(),S_=void 0;var n;if(typeof e.type=="string"&&(n=e.__e)){var r=e.__np,i=e.props;if(r){var o=n.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in r)&&(a.d(),o[s]=void 0)}else n.U=o={};for(var c in r){var l=o[c],u=r[c];l===void 0?(l=x2(n,c,u,i),o[c]=l):l.o(u,i)}}}t(e)});function x2(t,e,n,r){var i=e in t&&t.ownerSVGElement===void 0,o=mr(n);return{o:function(s,a){o.value=s,r=a},d:wn(function(){var s=o.value.value;r[e]!==s&&(r[e]=s,i?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}ka("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=e.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}t(e)});ka("__h",function(t,e,n,r){(r<3||r===9)&&(e.__$f|=2),t(e,n,r)});ni.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u,r=n&&n.s!==void 0;for(var i in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in t)if(o!=="__source"&&t[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in t))return!0;return!1};function N2(t){return v_(function(){return mr(t)},[])}var zf=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}};var qf=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}};var I_=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},ii=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(n=>new zf(n))??[],this.link=e.link,this.price=new qf(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=mr(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=mr(void 0)),this.sellingPlans=e.sellingPlans?.map(n=>{let r=new I_(n);return r.isSelected&&(this.selectedSellingPlan.value=r),r})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}};var Wn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;selectedOrFirstVariant;selected=mr(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=mr(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}set variants(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}update(e){return this.id=e.id,this.mID=e.mID,this.name=e.name,this.status=e.status,this.ctg=e.ctg,this.imgs=e.imgs,this.desc=e.desc,this.sDesc=e.sDesc,this.link=e.link,this.slug=e.slug,this.quantity=e.quantity,this.meta=e.meta,this.category=e.category,this.videos=e.videos,this.reviews=e.reviews,this.portraitVideos=e.videos?.filter(n=>n.orientation==="PORTRAIT"),e.vars&&(this.vars=e.vars.map(n=>new ii(n))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new ln({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}};var Yf=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}};var D_=class{enabled;constructor(e){this.enabled=e.enabled}},T_=class extends D_{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},Kf=class{productQuantity;constructor(e){e??={},this.productQuantity=new T_(e.productQuantity)}};var cs=class{s;g;i;constructor(e){e.s&&(this.s=new Ot(e.s)),e.g&&(this.g=new Cl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}};var Sl="a-f\\d",R2=`#?[${Sl}]{3}[${Sl}]?`,A2=`#?[${Sl}]{6}([${Sl}]{2})?`,M2=new RegExp(`[^#${Sl}]`,"gi"),O2=new RegExp(`^${R2}$|^${A2}$`,"i");function x_(t,e={}){if(typeof t!="string"||M2.test(t)||!O2.test(t))throw new TypeError("Expected a valid hex string");t=t.replace(/^#/,"");let n=1;t.length===8&&(n=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),t.length===4&&(n=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let r=Number.parseInt(t,16),i=r>>16,o=r>>8&255,s=r&255,a=typeof e.alpha=="number"?e.alpha:n;if(e.format==="array")return[i,o,s,a];if(e.format==="css"){let c=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${o} ${s}${c})`}return{red:i,green:o,blue:s,alpha:a}}var Ot=class{h;a=100;g;constructor(e){e??={},this.h=e.h,this.a=e.a,this.g=e.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return x_(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}};var ls=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Ot(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return fT[this.s??1]}},fT=(n=>(n[n.SOLID=1]="SOLID",n[n.DASHED=2]="DASHED",n))(fT||{});var Cl=class t{static DEFAULT_FALLBACK=new Ot({h:"#000000",a:50});r;c;fb;constructor(e){this.r=e.r,e.c&&(this.c=new Ot(e.c)),e.fb&&(this.fb=new Ot(e.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??t.DEFAULT_FALLBACK}};var Il=class{blur;spr;clr;x;y;constructor(e){e=e??{},this.blur=e.blur??0,this.spr=e.spr??0,this.x=e.x??0,this.y=e.y??0,this.clr=new Ot(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}};var Mi=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(e){e=e??{},this.pl=e.pl??0,this.pr=e.pr??0,this.pt=e.pt??0,this.pb=e.pb??0,this.ml=e.ml??0,this.mr=e.mr??0,this.mt=e.mt??0,this.mb=e.mb??0,this.cent=e.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}};var us=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}};var Jn=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new cs(e.bg)),e.br&&(this.br=new ls(e.br)),e.shd&&(this.shd=new Il(e.shd)),e.spc&&(this.spc=new Mi(e.spc)),this.trf=new us(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Nt[this.t]}get click(){return this.clc}},Nt=(L=>(L[L.IMAGE=1]="IMAGE",L[L.TEXT=2]="TEXT",L[L.BUTTON=3]="BUTTON",L[L.FLEXBOX=4]="FLEXBOX",L[L.MULTI_COLUMN=5]="MULTI_COLUMN",L[L.CHECKBOX=6]="CHECKBOX",L[L.PRODUCTS=11]="PRODUCTS",L[L.PRODUCT=12]="PRODUCT",L[L.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",L[L.PRODUCT_TITLE=14]="PRODUCT_TITLE",L[L.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",L[L.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",L[L.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",L[L.PRODUCT_RATING=19]="PRODUCT_RATING",L[L.EMAIL_INPUT=51]="EMAIL_INPUT",L[L.PHONE_INPUT=52]="PHONE_INPUT",L[L.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",L[L.CAROUSEL=62]="CAROUSEL",L[L.SHAPE=100]="SHAPE",L))(Nt||{});var ds=class extends Jn{constructor(e){super(e)}};var Oi=class extends Jn{src;constructor(e){super(e),this.src=e.src}};var La=(i=>(i[i.START=0]="START",i[i.CENTER=1]="CENTER",i[i.END=2]="END",i[i.JUSTIFY=3]="JUSTIFY",i))(La||{});var Zf=class{name;fonts;constructor(e){e=e??{},e.name&&(e.name=e.name!=="Arial"?e.name:""),this.name=e.name,this.fonts=e.fonts?.map(n=>new N_(n))}},N_=class{style;url;constructor(e){e=e??{},this.style=e.style,this.url=e.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}};var bn=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return La[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(e){e=e??{},e.lh&&(this.lh=e.lh),e.tdc&&(this.tdc=new Ot(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Ot(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new Zf(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}};var oi=class extends Jn{typo;constructor(e){super(e);let n=w(w({},e.f),e.typo);e.alg&&(n.ta=e.alg),e.c&&(n.tc=e.c),this.typo=new bn(n)}get color(){return this.typography.tc}get typography(){return this.typo}};var co=class extends oi{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}};var Xf=class extends Jn{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}};var Fa=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,n){let r=new Date;e===2?(r.setSeconds(r.getSeconds()+this.ss),r.setMinutes(r.getMinutes()+this.mm),r.setHours(r.getHours()+this.hh),r.setDate(r.getDate()+this.dd)):r=this.date??new Date;let i=window.setInterval(()=>{let o=new Date().getTime(),s=r.getTime()-o;if(s<1){clearInterval(i);return}let a=Math.floor(s/(1e3*60*60*24)),c=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),u=Math.floor(s%(1e3*60)/1e3);n({days:a,hours:c,minutes:l,seconds:u})},1e3);return i}};var Ba=class extends oi{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new Fa(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}};var Jf=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Ot(e.c??{})}get text(){return this.txt}get color(){return this.c}};var lo=class extends oi{ph;constructor(e){super(e),this.ph=new Jf(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}};var Va=class extends lo{constructor(e){e??={},super(e)}};var Ua=class extends lo{};var ja=class extends lo{};var Ha=class extends Oi{};var Qf=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}};var Dl=class extends Jn{gvt;max;cover;anim;embedded;position;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new Qf(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new Mi({pl:k.IN_APP_DEFAULT_PADDING,pr:k.IN_APP_DEFAULT_PADDING,pt:k.IN_APP_DEFAULT_PADDING,pb:k.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}};var ep=class extends Dl{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new Xf(e.cont),this.mob=new Dl(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(n=>{n.t===1?this.elems.push(new Oi(n)):n.t===2?this.elems.push(new co(n)):n.t===3?this.elems.push(new co(n)):n.t===100?this.elems.push(new ds(n)):n.t===51?this.elems.push(new Ua(n)):n.t===52?this.elems.push(new ja(n)):n.t===61?this.elems.push(new Ba(n)):n.t===15||n.t===16?this.elems.push(new Va(n)):n.t===13&&this.elems.push(new Ha(n))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},n,r;return this.gvt===1?(n="flex-start",r="flex-start"):this.gvt===2?(n="center",r="flex-start"):this.gvt===3?(n="flex-end",r="flex-start"):this.gvt===4?(n="flex-start",r="center"):this.gvt===6?(n="flex-end",r="center"):this.gvt===7?(n="flex-start",r="flex-end"):this.gvt===8?(n="center",r="flex-end"):this.gvt===9?(n="flex-end",r="flex-end"):(n="center",r="center"),e.alignItems=r,e.justifyContent=n,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}};var $a=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}};var tp=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}};var np=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}};var rp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new Mi(e.spc),e.size&&(this.size=new np(e.size)),e.bg&&(this.bg=new cs(e.bg)),e.br&&(this.br=new ls(e.br)),e.typo&&(this.typo=new bn(e.typo)),e.lout&&(this.lout=new tp(e.lout)),e.flex&&(this.flex=new $a(e.flex))}},Wa=class{sm;lg;constructor(e){e??={},this.sm=new rp(e.sm),this.lg=new rp(e.lg)}};var pn=class{t;style;hide;when;clc;constructor(e,n){n??={},this.t=e,this.style=new Wa(n.style),this.hide=n.hide,n.when?.op&&(this.when=n.when),n.clc&&(this.clc=n.clc)}get stringType(){return Nt[this.t]}};var hn=class extends pn{text;constructor(e,n){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(n??2,e),e??={},this.text=e.text}};var fs=class extends hn{constructor(e,n){super(e,n??3)}};var Ga=class extends pn{value;constructor(e){super(6,e),e??={},this.value=e.value}};var za=class extends hn{constructor(e=15,n){super(n,e)}};var ip=class extends pn{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Ot(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}};var pT=Pe($o());var R_=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Ot(e.color)}},A_=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Ot(e.color)}},Tl=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new A_(e.navigation),this.pagination=new R_(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},op=class extends pn{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=Qn.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Tl(e.conf),this.allowedTypes=e.allowedTypes}};var sp=class extends hn{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new Fa(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}};var uo=class extends pn{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(n=>{let r=Qn.getParsedElement(n);r&&this.elems.push(r)})}};var ps=class extends pn{src;sm;lg;constructor(e,n){super(n??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}};var Qn=class t{static getParsedElements(e){let n=[];return e?.forEach(r=>{let i=t.getParsedElement(r);i&&n.push(i)}),n}static getParsedElement(e){switch(e.t){case 2:return new hn(e);case 3:return new fs(e);case 6:return new Ga(e);case 11:return new ap(e);case 12:return new fo(e);case 61:return new sp(e);case 4:return new uo(e);case 1:return new ps(e);case 13:return new ps(e,13);case 14:return new hn(e,14);case 15:case 16:return new za(e.t,e);case 18:return new fs(e,18);case 62:return new op(e);case 19:return new ip(e);default:pT.default.error("Unknown element type",e.t);return}}static parseAlignmentToJustifyContent(e){switch(e){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}};var fo=class extends pn{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=Qn.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new Ga(e.cBox)),this.elems.push(new ps(e.img,13));let n=new hn(e.title,14);n.hide=!e.show?.title,n.text="{{ product.name }}",this.elems.push(n);let r=new hn(e.price);r.text="{{ product.price }}",r.hide=!e.show?.price;let i=new hn(e.compareAt);i.text="{{ product.compare_price }}",i.hide=!e.show?.price,e.compareAt||(i.style=new Wa(r.style),i.style.lg.typo=new bn(ne(w({},i.style.lg.typo),{td:"line-through"})),i.style.sm.typo=new bn(ne(w({},i.style.sm.typo),{td:"line-through"})));let o=new uo({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:Qn.parseAlignmentToJustifyContent(r.style.lg.typo?.ta)}}}});o.elems.push(i),o.elems.push(r),this.elems.push(o);let s=new za(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let a=new fs(e.btn,18);a.hide=!e.show?.btn,this.elems.push(a)}}e.symbol&&(this.symbol=new hn(e.symbol))}};var ap=class extends pn{conf;prod;constructor(e){super(11,e),e??={},this.conf=new M_(e.conf),this.prod=new fo(e.prod)}};var cp=class extends Tl{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},M_=class{lg;sm;constructor(e){e??={},this.lg=new cp(e.lg),this.sm=new cp(e.sm)}};var lp=class extends uo{constructor(e){super(e)}};var qa=class{cont;elems=[];constructor(e){e=e??{},this.cont=new lp(e.cont),e.elems?.forEach(n=>{this.addRawElement(n)})}addRawElement(e){let n=Qn.getParsedElement(e);return n&&this.elems.push(n),n}};var hT=Pe(Yn()),O_=class{minValue;rewardType;label;reachingText;reachedText;discount;items;calculatedAlignment;constructor(e){this.minValue=e.minValue,this.rewardType=e.rewardType,this.label=e.label,this.reachingText=e.reachingText,this.reachedText=e.reachedText,this.discount=e.discount,this.items=e.items?.map(n=>new ln(n))}},up=class{layout;milestones;constructor(e){this.layout=e.layout??hT.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(n=>new O_(n))??[]}};var dp=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}};var fp=class{id;alt;sources;items;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.items=e.items?e.items.map(n=>new ln(n)):[]}};var P_=(n=>(n.GALLERY="GALLERY",n.CURRENT_PRODUCT="CURRENT_PRODUCT",n))(P_||{}),k_=(n=>(n.SWIPER="SWIPER",n.STORY="STORY",n))(k_||{}),pp=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(n=>new fp(n))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}};var F_=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===Fn.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===Fn.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===Fn.EngagementContentType.SINGLE}},er=class t extends F_{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;discountData=mr({});constructor(e){super(e),this.id=e.id,this.nudgeID=e.nudgeID,this.currency=Ae.get().currencyCode??"USD",this.contentID=e.contentID,this.variation=e.variation,e.widget&&(this.widget=new qa(e.widget)),this.previewType=e.previewType,this.occurred=e.occurred??new Date,this.props=e.props,this.embeddedItems=e.embeddedItems?.map(n=>new ln(n)),this.items=e.items?.map(n=>new Wn(n))??[],this.nonMutableItems=e.items?.map(n=>new Wn(n))??[],this.collections=e.collections?.map(n=>new Yf(n))??[],this.discount=e.discount,this.placement=e.placement,this.customerData=e.customerData,this.ian=e.ian?this.processPopup(e.ian):void 0,this.promotionType=e.promotionType,this.manipulation=new Kf(e.manipulation),this.contentSource=e.contentSource,this.klaviyoFormID=e.klaviyoFormID,this.hasMultiplePlacement=e.hasMultiplePlacement,this.skipSubscribedItems=e.skipSubscribedItems,e.progressBarConfig&&(this.progressBarConfig=new up(e.progressBarConfig)),e.bundleConfig&&(this.bundleConfig=new dp(e.bundleConfig)),e.bundleFrom&&(this.bundleFrom=new Wn(e.bundleFrom)),e.content?.videoConfig&&(this.content={videoConfig:new pp(e.content.videoConfig)})}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let e=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-e}isBundle(){return this.objective===Fn.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Fn.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Fn.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===Fn.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===Fn.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===Fn.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===Fn.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isBYOB(){return this.objective===Fn.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===Fn.EngagementObjective.SHOPPABLE_VIDEO}processPopup(e){let n=JSON.stringify(e),r=this.items[0],i={},o={};if(r){let c=r.selectedOrFirstVariant.value;i={name:r.name,id:r.mID,link:r.link,vID:c.mID,image:r.variantImage,price:de.formatCurrency(c.price.d),comparePrice:de.formatCurrency(c.price.cmp),quantity:r.quantity},o={quantity:c.quantity}}let s={productCount:je.getCurrent().item_count},a=fn.render(n,{product:i,variant:o,cart:s,discount:this.discount,customer:this.customerData});return r&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),r.variantImage??r.imageURL)),new ep(JSON.parse(a))}calculateDiscountData(e,n){let r=L_.ArrayUtils.sum(e,o=>o.selectedOrFirstVariant.value.price.d),i={actualPrice:r,discountAmount:0,discountPercentage:0,discountedPrice:r};if(!e?.length||!n||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if(po.DiscountType.BXGY===this.discount.type&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],this.updateEffectivePrice(e,i.discountPercentage,!0),i.discountAmount=i.actualPrice-L_.ArrayUtils.sum(e,o=>o.selectedOrFirstVariant.value.effectivePrice.value);else if([po.DiscountType.UNIQUE_FLAT_ITEMS,po.DiscountType.STATIC].includes(this.discount.type)&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],i.discountAmount=i.actualPrice*i.discountPercentage/100,this.updateEffectivePrice(e,i.discountPercentage);else if(this.discount.type===po.DiscountType.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)i.discountAmount=i.actualPrice-this.discount.values[0],i.discountPercentage=i.discountAmount/i.actualPrice*100,this.updateEffectivePrice(e,i.discountPercentage);else if(this.discount.type===po.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){e.sort((s,a)=>a.selectedOrFirstVariant.value.price.d-s.selectedOrFirstVariant.value.price.d);let o=e[e.length-1];o.selectedOrFirstVariant.value.effectivePrice.value=0,i.discountAmount=o.selectedOrFirstVariant.value.price.d,i.discountPercentage=i.discountAmount/i.actualPrice*100}i.discountedPrice=i.actualPrice-i.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(i)}getPrivateAttributesForLineItem(){return Dt.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return Dt.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[po.DiscountType.UNIQUE_FIXED_ITEMS,po.DiscountType.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let e=this.widget?.elems.find(r=>t.SWIPER_ELEMENTS.has(r.t));if(!e)return!1;if(e.t===62)return!0;let n=Zn.get().isMobile()?"sm":"lg";return e.conf[n].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let e=je.getCurrent();return{productCount:e.item_count,amount:de.formatCurrency(e.total_price/100),originalAmount:de.formatCurrency(e.original_total_price/100)}}updateEffectivePrice(e,n,r=!1){let i=Ae.get().getCurrentItem();e.forEach(o=>{let s=o.selectedOrFirstVariant.value,a=s.price;if(r&&o.mID===i.mID)s.effectivePrice.value=a.d;else{let c=a.d*n/100;s.effectivePrice.value=a.d-c}})}formatCurrencyAndNumber(e){if(!e)return{};let n={discountPercentage:de.formatNumber(e.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice"].map(r=>{n[r]=de.formatCurrency(e[r])}),n}};var Fl=Pe(Yn()),vT=Pe(i_()),_T=Pe(ea());var Ya=class{constructor(e,n){this._startTime=e;this._triggerData=n}intervals=[];selectedEmbeddedItems;renderer;closeCallback;inputFields=[];get startTime(){return this._startTime}get triggerData(){return this._triggerData}get inputs(){return this.inputFields}get rootClassName(){let e=this.triggerData.shortID??this.triggerData.id.slice(-6);return e==="test"&&(e="test-"+this.startTime.getTime().toString()),k.IN_APP_WRAPPER_NAME+"-"+e}get selectedItems(){return this.triggerData.items.filter(e=>e.selected.value)}get shouldGiveFBTDiscount(){let e=this.selectedItems.length;return this.triggerData.bundleConfig?.applyDiscountOnMinimum?this.triggerData.bundleConfig.applyDiscountOnMinimum<=e:e===this.triggerData.items.length}onClose(e){this.closeCallback=e}closeInApp(e,n){n??={};let r=(new Date().getTime()-this.startTime.getTime())/1e3,i=w({eventName:e,duration:r},n);this.stopIntervals(),this.closeCallback&&this.closeCallback(i)}addInputField(e,n){this.inputFields.push({id:e,type:n,isValid:!1})}updateValidation(e,n){this.inputFields.forEach(r=>{if(r.id===e){r.isValid=n;return}})}hasManipulatedProductQuantity(){let e=this.triggerData.manipulation.productQuantity;return e?.enabled&&e.min!=null&&e.max!=null}getManipulatedQuantity(e){let{min:n=1,max:r=100}=this.triggerData.manipulation.productQuantity;if(n>r)return S.error("Invalid range: min should be less than or equal to max."),e;if(e>=n&&e<=r)return e;let i=e%100;return i<n?n:i>r?r:i}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}};var ET=Pe($o());var mT=Pe(Xv());var hs=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return ht.isShopify()}};var k2=(0,mT.default)(fetch),L2={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(t,e,n)=>t>=k.API_CALL_MAX_ATTEMPTS?!1:!!(e!==null||n?.status&&n?.status>=500)},Nn=class t{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}async validateSession(e){return this.post("/v1/event/validate-session",e)}updateUserData(e){this.put("/v1/user/update",e).then(async n=>{S.log("Updated user profile"),await ms.getInstance().storeAndPopulateAuthData(n)}).catch(n=>{S.error("Error saving user profile",n)})}trackOrder(e){this.post("/v1/event/track-order",e).then(()=>{S.log("Sent Order")}).catch(n=>{S.error("Error sending track order",n)})}generateDiscount(e){return this.post("/v1/event/generate-discount",e)}updateDeviceProps(e){this.put("/v1/device/update",e).then(()=>{S.log("Updated device property")}).catch(async n=>{S.error("Error saving device property",n)})}setAPIToken(e){this.apiToken=e??""}setFirstSeen(e){this.firstSeen=e?.toUTCString()??""}get(e){return this.requestBackend("GET",e)}post(e,n){return this.requestBackend("POST",e,n)}put(e,n){return this.requestBackend("PUT",e,n)}async requestBackend(e,n,r){if(!hs.isECommerceApp()&&!hs.getFlags().allowEvents)return S.log(`Rejecting ${e} ${n} as this is not e-commerce app`),Promise.reject();n.startsWith("http")||(n=Dn.apiURL+n);let i=this.getDefaultHeaders(),o="keepalive"in new Request("");if(r&&!o&&JSON.stringify(r).includes("CE App Background"))try{return this.performXMLHttpRequest(n,i,r)}catch(a){return _t.getInstance().captureException(a,{body:JSON.stringify(r)}),{}}let s={method:e,headers:i,keepalive:!0};return r&&(s.body=JSON.stringify(r)),this.request(n,s)}async request(e,n){let r=w(w({},L2),n),i=await k2(e,r);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(e,n,r){return new Promise((i,o)=>{let s=new XMLHttpRequest;s.open("POST",e,!0),n.forEach((a,c)=>{s.setRequestHeader(c,a)}),s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE)if(s.status>=200&&s.status<300)try{s.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(s.responseText)):o(new Error("Content-Type of response header is not json"))}catch(a){o(a)}else o(new Error(`Received status - ${s.status}(${s.statusText})`))},s.onerror=()=>{o(new Error("Network error occurred during the request."))},s.send(JSON.stringify(r))})}getDefaultHeaders(){let e=new Headers;return e.set("content-type","application/json"),e.set("cooee-sdk",k.SDK),e.set("cooee-sdk-code",k.SDK_VERSION_CODE.toString()),e.set("cooee-sdk-version",k.SDK_VERSION),e.set("cooee-first-seen",this.firstSeen),this.apiToken&&e.append("cooee-sdk-token",this.apiToken),Dn.debug&&e.set("cooee-sdk-debug",String(1)),e}};var Ka=class{static sentryService=_t.getInstance();static httpApiService=Nn.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let a=(await je.getCurrent().getNormalisedCart()).items.map(c=>c.mID);e.items=e.items.filter(c=>!a.includes(c.mID))}if(Dt.get().currencyCount<=1)return e.items;let n=e.items.length,r=e.items.map(s=>this.updatedItem(s,e.engagementID)),o=(await Promise.all(r)).filter(s=>s!=null);if(n&&!o.length){let s="Failed to fetch any product from Ajax API",a=new Ye(k.EVENT_CAMPAIGN_FAILED,{reason:s,currency:e.currency},e);throw Le.getInstance().sendEvent(a),new Error(s)}if(e.isCartRecovery()){let s=je.getCurrent().items,a=[];for(let c of o)for(let l of c.vars){if(!l.isAvailable)continue;let u=s.find(h=>h.variant_id.toString()===l.mID);if(!u)continue;let d=new Wn(c);d.name=u.title;let m=new ii(l);m.name=u.variant_title,m.price.d=u.discounted_price/100,d.variants=[m],a.push(d)}return a}return o}static async updatedItem(e,n){let r=e,i,o=ht.getRootPrefix()+`products/${r.slug}.js`;try{i=await this.httpApiService.request(o)}catch(a){return S.error(`Failed to fetch ${o}`,a),a instanceof Response?this.sentryService.captureMessage(`Shopify product fetch failed ${a.status}`,"error",{item:r,path:o},{"engagement.id":n}):this.sentryService.captureException(a,{item:r,path:o},{"engagement.id":n}),null}if(!i)return S.error("Item not found after AJAX call for:",r),null;r.name=i.title;let s=r.selectedOrFirstVariant.value;return r.vars.map(a=>{let c=i.variants.find(l=>l.id===+a.mID);a.name=c.title,a.isAvailable=c.available,a.price.d=c.price?c.price/100:c.price,a.price.effective=a.price.d,a.price.cmp=c.compare_at_price?c.compare_at_price/100:c.compare_at_price,+s.mID===c.id&&(s.effectivePrice.value=a.price.d)}),r}};var Za=class{constructor(e){this.scalingFactor=e}getLayoutStyles(e){if(!e)return{display:"block"};let n={display:e.disp};return e.of&&(n.objectFit=e.of),e.pos==="absolute"&&(n.width="auto !important",n.position="absolute",n.right=e.right+"px",n.left=e.left+"px",n.top=e.top+"px",n.bottom=e.bottom+"px"),n}getSizeStyles(e){let n={};return e?.w&&(n.width=e.w),e?.h&&(n.height=e.h),e?.maxW&&(n.maxWidth=e.maxW),e?.maxH&&(n.maxHeight=e.maxH),e?.minW&&(n.minWidth=e.minW),e?.minH&&(n.minHeight=e.minH),n}getBorderStyles(e){if(!e)return{};let n={};return e.radius&&e.radius>0&&(n.borderRadius=this.getSizePx(e.radius)),e.width&&e.width>0&&(n.borderWidth=this.getSizePx(e.width),n.borderStyle=e.style?.toLowerCase(),e.color?this.getColourStyles(e.color,"border-color",n):n.borderColor="black"),n}getFlexStyles(e){return e?{gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai,width:"100%"}:{}}getSpaceStyles(e){let n={};return e?(n.paddingTop=this.getSizePx(e.pt),n.paddingBottom=this.getSizePx(e.pb),n.paddingLeft=this.getSizePx(e.pl),n.paddingRight=this.getSizePx(e.pr),n.marginTop=this.getSizePx(e.mt),n.marginBottom=this.getSizePx(e.mb),n.marginLeft=e.cent?"auto":this.getSizePx(e.ml),n.marginRight=e.cent?"auto":this.getSizePx(e.mr),n):(n.margin="0 !important",n.padding="unset",n)}getBackgroundStyles(e){if(!e)return{};let n={};if(e.glossy){let r="backdrop-filter",i="-webkit-"+r,o=`blur(${e.glossy.radius}px)`;if(!CSS.supports(i,o)&&!CSS.supports(r,o))return{background:e.glossy.fallback.rgba};if(n[i]=o,n[r]=o,e.glossy.color)return this.getColourStyles(e.glossy.color,"background",n)}else if(e.solid){if(e.solid.grad)return this.getGradientStyles(e.solid.grad,"background",n);if(e.solid.hex)return{backgroundColor:e.solid.rgba}}else if(e.img){if(!e.img.src)return{};let r=(e.img.a??0)/100;n.background=`linear-gradient(rgba(0, 0, 0, ${r}), rgba(0, 0, 0, ${r})),url("${e.img.src}") no-repeat center`,n.backgroundSize="cover",e.img.a&&(n["-webkit-backdrop-filter"]=`opacity(${e.img.a})`,n.backdropFilter=`opacity(${e.img.a})`)}return n}getGradientStyles(e,n,r){if(r??={},e.type==="LINEAR"){let i=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(i+=`, ${e.c3}`),i+=")",r[n]=i}return r}getColourStyles(e,n="color",r){return r??={},e?e.grad?this.getGradientStyles(e.grad,n,r):(e.hex&&(r[n]=e.rgba),r):r}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}};var mt=class extends ni{stylesConverter=new Za(1);renderer=Zn.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new ho(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(ne(w(w(w(w(w(w({},this.stylesConverter.getFlexStyles(this.mediaStyle.flex)),this.stylesConverter.getBackgroundStyles(this.mediaStyle.bg)),this.stylesConverter.getBorderStyles(this.mediaStyle.br)),this.stylesConverter.getSizeStyles(this.mediaStyle.size)),this.stylesConverter.getSpaceStyles(this.mediaStyle.spc)),this.stylesConverter.getLayoutStyles(this.mediaStyle.lout)),{boxSizing:"border-box",outline:"none"}),this.getComponentStyles()),this.props.style)}matchWhenCondition(e){if(!e?.op)return!0;let{lhs:n,rhs:r}=e;switch(e.op){case"eq":return n===r;case"gt":return+n>+r;case"gte":return+n>=+r;case"lt":return+n<+r;case"lte":return+n<=+r;case"ne":return n!==r;case"null":return n==null;case"empty":return n.trim()==="";default:return S.error(`Invalid operator found for when condition - ${e.op}`),!1}}putStyleAccordingToDevice(){let e=this.props.element;this.mediaStyle=e.style.lg,this.renderer.isMobile()&&e.style.sm&&Object.keys(e.style.sm).length&&(this.mediaStyle=w(w({},this.mediaStyle),e.style.sm))}sendTriggerClicked(e,n){this.clickExecutor.sendTriggerClicked(e,n)}async onClick(e){await this.clickExecutor.execute(e)}};var F2=0,dne=Array.isArray;function W(t,e,n,r,i,o){e||(e={});var s,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?s=e[a]:c[a]=e[a];var l={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--F2,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return nt.vnode&&nt.vnode(l),l}var tr=class extends mt{componentDidMount(){this.setState(()=>({text:this.props.element.text})),wn(this.onChange.bind(this))}componentWillReceiveProps(e){this.props.element=e.element,this.onChange()}render(){let e=this.getCompiledStyles(),n=this.state.text;return n||(e.display="none",n=""),W("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:W("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:n}})})}customOnClick(){this.props.onClick&&this.props.onClick("title")}onChange(){if(this.props.element.text==null)return;let e=this.props.triggerContext.triggerData,n={bundle:e.discountData.value,customer:e.customerData,cart:e.getCartMagicVariables()},r=fn.render(JSON.stringify(this.props.element),n),i=new hn(JSON.parse(r));if(!this.matchWhenCondition(i.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:i.text}))}getTypoStyles(){let e={},n=this.mediaStyle.typo??new bn;return e.letterSpacing=n.letterSpacing,e.fontSize=n.fs+"px",e.lineHeight=n.lh,e.fontFamily=n.fam.name||"inherit",e.textAlign=n.alignment,e.fontWeight=n.fw,e.textDecoration=n.td??"none",this.stylesConverter.getColourStyles(n.tc,"color",e),e}getComponentStyles(){return w({},this.getTypoStyles())}getSpanStyle(){return{overflow:"hidden",display:"-webkit-box",webkitBoxOrient:"vertical",webkitLineClamp:2,color:"inherit",fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit"}}};var gs=class extends tr{render(){return W("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:()=>this.onClick({item:this.props.item}),children:W("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return ne(w({},super.getComponentStyles()),{cursor:"pointer"})}};var B_=class extends ni{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?W("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[W("span",{children:this.props.time}),W("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):W("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[W("span",{style:this.getTimeLabelStyle(),children:this.props.label}),W("span",{children:this.props.time})]})}getDesign(){}getTimeLabelStyle(){return{fontSize:"0.5em",alignContent:"center"}}getElementStyle(){let e={display:"flex",flexDirection:"column",placeContent:"center center",textAlign:"center"};return this.props.element.horizontal&&(e.gridTemplateColumns="repeat(2, minmax(0, 1fr))"),e}},xl=class extends tr{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return W("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>W(B_,{styles:this.getCompiledStyles(),label:e,time:this.state[e],element:this.props.element}))})}getLabelsParentStyle(){return{display:"grid",justifyContent:"center",gridTemplateColumns:"repeat(4, auto)",gap:this.stylesConverter.getSizePx(this.props.element.gap)}}getDisplayStyles(){return{display:"grid",placeContent:"center center"}}getComponentStyles(){return w(w({},super.getComponentStyles()),this.getDisplayStyles())}processAndStartTimer(){this.props.element.timer.start(this.props.element.timerType,e=>{this.labels.Days=String(e.days).padStart(2,"0"),this.labels.Hours=String(e.hours).padStart(2,"0"),this.labels.Minutes=String(e.minutes).padStart(2,"0"),this.labels.Seconds=String(e.seconds).padStart(2,"0"),this.setState(()=>w({},this.labels))})}};var Nl=class extends mt{componentDidMount(){wn(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return W("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:W("input",{type:"checkbox",checked:this.state.checked,onChange:this.onChange.bind(this),style:{appearance:"auto"}})})}onChange(e){let{checked:n}=e.target;this.props.item.selected.value=n}getTypoStyles(){let e={},n=this.mediaStyle.typo??new bn;return e.textAlign=n.alignment,e.justifyContent=n.alignment,e}getComponentStyles(){return ne(w({},this.getTypoStyles()),{display:"flex"})}};var Pi=class extends mt{constructor(e,n){super(e,n)}render(){let e=this.props.element[this.deviceTypeKey],n=e?.src||this.props.element.src||this.props.element.lg?.src;return W("img",{onClick:this.customOnClick.bind(this),className:"lc-image",alt:e?.name||"Image",onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),src:n,style:this.getCompiledStyles()})}customOnClick(){this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let n={zIndex:e.zIndex};return this.mediaStyle.size?.w&&(n.width=this.mediaStyle.size.w),this.mediaStyle.size?.h&&(n.height=this.mediaStyle.size.h),n}handleMouseEnter(e){let n=this.props.element[this.deviceTypeKey]?.secondarySrc;n&&(e.currentTarget.src=n)}handleMouseLeave(e){e.currentTarget.src=this.props.element[this.deviceTypeKey]?.src}};var ki=class extends mt{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return W("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:W(mo,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new $a,n={display:"flex",gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai};return e.wrap==="nowrap"&&e.scroll&&(e.dir==="column"?n["overflow-y"]="auto":n["overflow-x"]="auto"),n}};var Rl=class extends ki{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return W("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:W(Xa,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}};var Al=class extends mt{render(){return W("select",{style:this.getCompiledStyles(),value:this.props.selectedVariant.selectedSellingPlan.value?.mID??"",onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){wn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},n=this.mediaStyle.typo??new bn;return e.letterSpacing=n.letterSpacing,e.fontSize=n.fs+"px",e.lineHeight=n.lh,e.fontFamily="inherit",e.textAlign=n.alignment,e.fontWeight=n.fw,this.stylesConverter.getColourStyles(n.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.selectedVariant.sellingPlans?.length||(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[],n=this.props.selectedVariant;if(!n.sellingPlans?.length)return[];this.props.triggerContext.triggerData.skipSubscribedItems?n.selectedSellingPlan.value||(n.sellingPlans[0].isSelected=!0,n.changeSellingPlan(n.sellingPlans[0])):e.push(W("option",{value:"",selected:!n.selectedSellingPlan,children:"One time purchase"}));for(let r of n.sellingPlans??[])e.push(W("option",{value:r.mID,selected:r.isSelected,children:r.name}));return e}onChange(e){let n=e.target.value;n?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(r=>r.mID===n):this.props.selectedVariant.selectedSellingPlan.value=void 0}};var gT=Pe(lf());var Ml=class extends mt{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),fn.escape=gT.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),n=this.getRating();return n||(e.display="none",n=""),W("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:n}})}getRating(){let e=this.props.element.fullStar,n=this.props.element.halfStart,r={size:this.props.element.iconSize,color:this.props.element.c.hex};e=fn.render(e,{svg:r}),n=fn.render(n,{svg:r});let i=this.props.review;if(!i?.rating)return"";let o="";if(this.props.element.showSingleStar)o=e;else{let s=5,a=`${i.rating}`.split(".");for(let c=0;c<+a[0];c++)o+=e,s--;a[1]&&(o+=n,s--);for(let c=0;c<s;c++)o+=e.replace(this.colorRegex,'fill="#f1f1f1')}return o}getComponentStyles(){return{display:"flex",alignItems:"center"}}};var Ol=class extends mt{render(){return W("select",{style:this.getCompiledStyles(),value:this.props.item.selectedOrFirstVariant.value.mID,onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){wn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},n=this.mediaStyle.typo??new bn;return e.letterSpacing=n.letterSpacing,e.fontSize=n.fs+"px",e.lineHeight=n.lh,e.fontFamily="inherit",e.textAlign=n.alignment,e.fontWeight=n.fw,this.stylesConverter.getColourStyles(n.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"&&(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[];for(let n of this.props.item.vars)e.push(W("option",{value:n.mID,disabled:!n.isAvailable,children:n.name}));return e}onChange(e){let n=e.target.value;this.props.item.selectedOrFirstVariant.value=this.props.item.vars.find(r=>r.mID===n)}};var Xa=class extends mt{constructor(e,n){super(e,n),this.setState(()=>({decoration:"unset"}))}renderElement(e){if(!(e.hide||!this.matchWhenCondition(e.when))){if(e.t===4){let n=e;return W(Rl,{element:n,triggerContext:this.props.triggerContext,elements:n.elems,item:this.props.item,noLinks:this.props.noLinks})}if(e.t===6)return this.props.triggerContext.triggerData.isBundle()?W(Nl,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let n=e,r=this.props.item,i=r.variantImage??r.imageURL,o=r.variantSecondaryImage??r.secondaryImageURL;n.lg=n.sm={src:i,name:r.name,secondarySrc:o};let s=W(Pi,{element:n,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?s:W("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block"},children:s})}if(e.t===14)return this.renderProductTitle(e);if(e.t===15){let n=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:W(Ol,{element:n,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?W(Al,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?W(Ml,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?W(gs,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):W(mo,{elements:[e],element:this.props.element,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}renderProductTitle(e){let n=W(tr,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?n:W("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block",textDecoration:this.state.decoration},onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),children:n})}customOnClick(e){this.sendTriggerClicked([this.props.item.toEmbed()],{from:e})}onMouseEnter(){this.setState(()=>({decoration:"underline"}))}onMouseLeave(){this.setState(()=>({decoration:"unset"}))}};var yT=Pe(Mf());var ys=class extends mt{productElement;constructor(e,n){super(e,n),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),n=fn.render(e,this.getProductData());if(this.productElement=new fo(JSON.parse(n)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return W("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:W(Xa,{element:this.productElement,elements:this.productElement.elems,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.productElement.noLinks})})}getComponentStyles(){return{flexShrink:0}}getProductData(){if(!this.props.item)return{};let e=this.props.item.selectedOrFirstVariant.value,n=e.price,r=this.props.item.name,i=this.props.item.category,o=de.formatCurrency(n.d,!0),s=this.props.item.variantImage??this.props.item.imageURL,a=this.props.item.meta,c=this.props.item.reviews?.rating,l=this.props.item.reviews?.totalReviews,u=n.cmp&&n.cmp>n.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,m={name:r,price:o,quantity:d,image_url:s,meta:a,category:i,rating:c,reviews:l},h=e.effectivePrice.value!==n.d;h&&(m.effective_price=de.formatCurrency(e.effectivePrice.value));let v=this.props.triggerContext.triggerData.discount.type===yT.DiscountType.BXGY;if(!h&&v&&(m.effective_price=de.formatCurrency(e.effectivePrice.value),m.price=""),u){m.compare_price=de.formatCurrency(n.cmp);let M=n.cmp-n.d;m.discount_percent=(M/n.cmp*100).toFixed(0),m.discount_price=de.formatCurrency(M)}let N={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:m,variant:N,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function hp(){return new Promise(t=>{let e="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(r=>r.src.includes(e))){t();return}let n=document.createElement("script");n.src=e,n.onload=()=>{t()},document.body.appendChild(n)})}function mp(t,e){if(!t||!window.Swiper)return;let n=new window.Swiper(t,{loop:!0,slidesPerView:e.maxInRow,spaceBetween:e.gap+"px",pagination:{type:e.pagination.type,el:t.querySelector(".swiper-pagination"),clickable:!0,renderBullet:(r,i)=>`
43
+ `)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return fB(e,t);if(e===void 0)return null;if(e instanceof Date||WF(e)){var d=e.getTime(),h=d>-1&&d<2534023188e5;return t.legacy?t.relaxed&&h?{$date:e.getTime()}:{$date:WI(e)}:t.relaxed&&h?{$date:WI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=nD&&e<=tD,g=e>=iD&&e<=rD;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||$F(e)){var m=e.flags;if(m===void 0){var b=e.toString().match(/[gimuy]*$/);b&&(m=b[0])}var I=new cl(e.source,m);return I.toExtendedJSON(t)}return e!=null&&typeof e=="object"?hB(e,t):e}var pB={Binary:function(e){return new rs(e.value(),e.sub_type)},Code:function(e){return new _f(e.code,e.scope)},DBRef:function(e){return new al(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new bv(e.bytes)},Double:function(e){return new Ef(e.value)},Int32:function(e){return new wf(e.value)},Long:function(e){return ce.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new Cv},MinKey:function(){return new Sv},ObjectID:function(e){return new rn(e)},ObjectId:function(e){return new rn(e)},BSONRegExp:function(e){return new cl(e.pattern,e.options)},Symbol:function(e){return new Iv(e.value)},Timestamp:function(e){return eD.fromBits(e.low,e.high)}};function hB(e,t){if(e==null||typeof e!="object")throw new ns("not an object instance");var n=e._bsontype;if(typeof n>"u"){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var o=so(e[i],t);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{t.seenObjects.pop()}}return r}else if(uB(e)){var s=e;if(typeof s.toExtendedJSON!="function"){var a=pB[e._bsontype];if(!a)throw new Lt("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return n==="Code"&&s.scope?s=new _f(s.code,so(s.scope,t)):n==="DBRef"&&s.oid&&(s=new al(so(s.collection,t),so(s.oid,t),so(s.db,t),so(s.fields,t))),s.toExtendedJSON(t)}else throw new ns("_bsontype must be a string, but was: "+typeof n)}var GI;(function(e){function t(o,s){var a=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(o,function(l,c){if(l.indexOf("\0")!==-1)throw new ns("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return oD(c,a)})}e.parse=t;function n(o,s,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(l=s,s=void 0,a=0);var c=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),d=so(o,c);return JSON.stringify(d,s,a)}e.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}e.serialize=r;function i(o,s){return s=s||{},t(JSON.stringify(o),s)}e.deserialize=i})(GI||(GI={}));var zI,qI=KI();qI.Map?zI=qI.Map:zI=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var n=0;n<t.length;n++)if(t[n]!=null){var r=t[n],i=r[0],o=r[1];this._keys.push(i),this._values[i]={v:o,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var n=this._values[t];return n==null?!1:(delete this._values[t],this._keys.splice(n.i,1),!0)},e.prototype.entries=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?[r,t._values[r].v]:void 0,done:r===void 0}}}},e.prototype.forEach=function(t,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];t.call(n,this._values[i].v,i,n)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},e.prototype.set=function(t,n){return this._values[t]?(this._values[t].v=n,this):(this._keys.push(t),this._values[t]={v:n,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?t._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var XY=ce.fromNumber(zF),JY=ce.fromNumber(qF),vv=new Uint8Array(8),QY=new DataView(vv.buffer,vv.byteOffset,vv.byteLength),mB=1024*1024*17,e9=rt.alloc(mB),ya=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}},Ye=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new rn(r):new rn,this.occurred=new Date,n&&(this.trigger=new ya(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},ul=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},va=class extends ul{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,n,r,i){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.projectableNodes=i}},Ea=class extends ul{templateRef;viewContainerRef;context;injector;constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},Dv=class extends ul{element;constructor(e){super(),this.element=e instanceof qt?e.nativeElement:e}},wa=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof va)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Ea)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Dv)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},bf=class extends wa{outletElement;_appRef;_defaultInjector;_document;constructor(e,t,n,r,i){super(),this.outletElement=e,this._appRef=n,this._defaultInjector=r,this._document=i}attachComponentPortal(e){let t;if(e.viewContainerRef){let n=e.injector||e.viewContainerRef.injector,r=n.get(yi,null,{optional:!0})||void 0;t=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let n=this._appRef,r=e.injector||this._defaultInjector||bt.NULL,i=r.get(Un,n.injector);t=md(e.component,{elementInjector:r,environmentInjector:i,projectableNodes:e.projectableNodes||void 0}),n.attachView(t.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=e,t}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");t.parentNode.insertBefore(n,t),this.outletElement.appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},Tv=(()=>{class e extends wa{_moduleRef=P(yi,{optional:!0});_document=P(ct);_viewContainerRef=P(Zi);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new yt;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(n){return new(n||e)};static \u0275dir=Xi({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ys]})}return e})();function sD(e){return e.buttons===0||e.detail===0}function aD(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var xv;function yB(){if(xv==null){let e=typeof document<"u"?document.head:null;xv=!!(e&&(e.createShadowRoot||e.attachShadow))}return xv}function cD(e){if(yB()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Cf(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}function Ni(e){return e.composedPath?e.composedPath()[0]:e.target}function Ri(e,t,n,r,i){let o=parseInt(xg.major),s=parseInt(xg.minor);return o>19||o===19&&s>0||o===0&&s===0?e.listen(t,n,r,i):(t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)})}var Nv;try{Nv=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Nv=!1}var $n=(()=>{class e{_platformId=P(Bo);isBrowser=this._platformId?m0(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Nv)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),dl;function vB(){if(dl==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>dl=!0}))}finally{dl=dl||!1}return dl}function lD(e){return vB()?e:!!e.capture}function ba(e){return e instanceof qt?e.nativeElement:e}var _B=new ve("cdk-input-modality-detector-options"),EB={ignoreKeys:[18,17,224,91,16]},uD=650,Rv={passive:!0,capture:!0},wB=(()=>{class e{_platform=P($n);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ui(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Ni(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<uD||(this._modality.next(sD(n)?"keyboard":"mouse"),this._mostRecentTarget=Ni(n))};_onTouchstart=n=>{if(aD(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Ni(n)};constructor(){let n=P(Ke),r=P(ct),i=P(_B,{optional:!0});if(this._options=w(w({},EB),i),this.modalityDetected=this._modality.pipe(Eh(1)),this.modalityChanged=this.modalityDetected.pipe(gu()),this._platform.isBrowser){let o=P(An).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Ri(o,r,"keydown",this._onKeydown,Rv),Ri(o,r,"mousedown",this._onMousedown,Rv),Ri(o,r,"touchstart",this._onTouchstart,Rv)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),If=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(If||{}),bB=new ve("cdk-focus-monitor-default-options"),Sf=lD({passive:!0,capture:!0}),dD=(()=>{class e{_ngZone=P(Ke);_platform=P($n);_inputModalityDetector=P(wB);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=P(ct,{optional:!0});_stopInputModalityDetector=new Ne;constructor(){let n=P(bB,{optional:!0});this._detectionMode=n?.detectionMode||If.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=Ni(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=ba(n);if(!this._platform.isBrowser||i.nodeType!==1)return So();let o=cD(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new Ne,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=ba(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=ba(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===If.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===If.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?uD:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=Ni(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Sf),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Sf)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(xs(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Sf),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Sf),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Df=new WeakMap,fl=(()=>{class e{_appRef;_injector=P(bt);_environmentInjector=P(Un);load(n){let r=this._appRef=this._appRef||this._injector.get(sr),i=Df.get(r);i||(i={loaders:new Set,refs:[]},Df.set(r,i),r.onDestroy(()=>{Df.get(r)?.refs.forEach(o=>o.destroy()),Df.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(md(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),fD=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=St({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
44
+ `],encapsulation:2,changeDetection:0})}return e})();function Av(e){return Array.isArray(e)?e:[e]}var Ov=(()=>{class e{_platform=P($n);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return SB(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=CB(MB(n));if(r&&(pD(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=pD(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!RB(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return AB(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function CB(e){try{return e.frameElement}catch{return null}}function SB(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function IB(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function DB(e){return xB(e)&&e.type=="hidden"}function TB(e){return NB(e)&&e.hasAttribute("href")}function xB(e){return e.nodeName.toLowerCase()=="input"}function NB(e){return e.nodeName.toLowerCase()=="a"}function hD(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function pD(e){if(!hD(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function RB(e){let t=e.nodeName.toLowerCase(),n=t==="input"&&e.type;return n==="text"||n==="password"||t==="select"||t==="textarea"}function AB(e){return DB(e)?!1:IB(e)||TB(e)||e.hasAttribute("contenteditable")||hD(e)}function MB(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var Mv=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,t,n,r,i=!1,o){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=o,i||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let n=this._getFirstTabbableElement(t);return n?.focus(e),!!n}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){let t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=0;n<t.length;n++){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=t.length-1;n>=0;n--){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?Yi(e,{injector:this._injector}):setTimeout(e)}},mD=(()=>{class e{_checker=P(Ov);_ngZone=P(Ke);_document=P(ct);_injector=P(bt);constructor(){P(fl).load(fD)}create(n,r=!1){return new Mv(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Pv(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function $t(e){return e==null?"":typeof e=="string"?e:`${e}px`}var OB=new ve("cdk-dir-doc",{providedIn:"root",factory:PB});function PB(){return P(ct)}var kB=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function LB(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?kB.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var pl=(()=>{class e{value="ltr";change=new yt;constructor(){let n=P(OB,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=LB(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),is;function gD(){if(is==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return is=!1,is;if("scrollBehavior"in document.documentElement.style)is=!0;else{let e=Element.prototype.scrollTo;e?is=!/\{\s*\[native code\]\s*\}/.test(e.toString()):is=!1}}return is}var FB=20,yD=(()=>{class e{_ngZone=P(Ke);_platform=P($n);_renderer=P(An).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new Ne;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=FB){return this._platform.isBrowser?new dt(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(mu(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):So()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(Do(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,n)&&r.push(o)}),r}_scrollableContainsElement(n,r){let i=ba(r),o=n.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),BB=20,kv=(()=>{class e{_platform=P($n);_listeners;_viewportSize;_change=new Ne;_document=P(ct,{optional:!0});constructor(){let n=P(Ke),r=P(An).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,o=i.getBoundingClientRect(),s=-o.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(n=BB){return n>0?this._change.pipe(mu(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Lv={},Tf=(()=>{class e{_appId=P(Vc);getId(n){return this._appId!=="ng"&&(n+=this._appId),Lv.hasOwnProperty(n)||(Lv[n]=0),`${n}${Lv[n]++}`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function vD(e,...t){return t.length?t.some(n=>e[n]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var _D=gD(),Fv=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,t){this._viewportRuler=e,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=$t(-this._previousScrollPosition.left),e.style.top=$t(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,i=n.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),_D&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),_D&&(n.scrollBehavior=i,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}},Bv=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Do(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},xf=class{enable(){}disable(){}attach(){}};function Vv(e,t){return t.some(n=>{let r=e.bottom<n.top,i=e.top>n.bottom,o=e.right<n.left,s=e.left>n.right;return r||i||o||s})}function ED(e,t){return t.some(n=>{let r=e.top<n.top,i=e.bottom>n.bottom,o=e.left<n.left,s=e.right>n.right;return r||i||o||s})}var Uv=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();Vv(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},UB=(()=>{class e{_scrollDispatcher=P(yD);_viewportRuler=P(kv);_ngZone=P(Ke);_document=P(ct);constructor(){}noop=()=>new xf;close=n=>new Bv(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new Fv(this._viewportRuler,this._document);reposition=n=>new Uv(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),hl=class{positionStrategy;scrollStrategy=new xf;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}},jv=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},DD=(()=>{class e{_attachedOverlays=[];_document=P(ct);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jB=(()=>{class e extends DD{_ngZone=P(Ke);_renderer=P(An).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=id(e)))(r||e)}})();static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),HB=(()=>{class e extends DD{_platform=P($n);_ngZone=P(Ke);_renderer=P(An).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Ri(this._renderer,r,"pointerdown",this._pointerDownListener,i),Ri(this._renderer,r,"click",this._clickListener,i),Ri(this._renderer,r,"auxclick",this._clickListener,i),Ri(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=Ni(n)};_clickListener=n=>{let r=Ni(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(wD(a.overlayElement,r)||wD(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(n)):l.next(n)}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=id(e)))(r||e)}})();static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function wD(e,t){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=t;for(;r;){if(r===e)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var TD=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=St({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
45
+ `],encapsulation:2,changeDetection:0})}return e})(),Nf=(()=>{class e{_platform=P($n);_containerElement;_document=P(ct);_styleLoader=P(fl);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Pv()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),Pv()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(TD)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Hv=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,t,n,r){this._renderer=t,this._ngZone=n,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",r)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Ca=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new Ne;_attachments=new Ne;_detachments=new Ne;_positionStrategy;_scrollStrategy;_locationChanges=Bt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new Ne;_outsidePointerEvents=new Ne;_renders=new Ne;_afterRenderRef;_afterNextRenderRef;constructor(e,t,n,r,i,o,s,a,l,c=!1,d,h){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=o,this._document=s,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=c,this._injector=d,this._renderer=h,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=Ag(()=>lg(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Yi(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=w(w({},this._config),e),this._updateElementSize()}setDirection(e){this._config=ne(w({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=$t(this._config.width),e.height=$t(this._config.height),e.minWidth=$t(this._config.minWidth),e.minHeight=$t(this._config.minHeight),e.maxWidth=$t(this._config.maxWidth),e.maxHeight=$t(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Hv(this._document,this._renderer,this._ngZone,t=>{this._backdropClick.next(t)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,t,n){let r=Av(t||[]).filter(i=>!!i);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(xs(hc(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},bD="cdk-overlay-connected-position-bounding-box",$B=/([A-Za-z%]+)$/,$v=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new Ne;_resizeSubscription=Bt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,t,n,r,i){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=i,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(bD),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,i=[],o;for(let s of this._preferredPositions){let a=this._getOriginPoint(e,r,s),l=this._getOverlayPoint(a,t,s),c=this._getOverlayFit(l,t,n,s);if(c.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(s,a);return}if(this._canFitWithFlexibleDimensions(c,l,n)){i.push({position:s,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,s)});continue}(!o||o.overlayFit.visibleArea<c.visibleArea)&&(o={overlayFit:c,overlayPoint:l,originPoint:a,position:s,overlayRect:t})}if(i.length){let s=null,a=-1;for(let l of i){let c=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);c>a&&(a=c,s=l)}this._isPushed=!1,this._applyPosition(s.position,s.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(o.position,o.originPoint);return}this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&os(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(bD),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let o=this._isRtl()?e.right:e.left,s=this._isRtl()?e.left:e.right;r=n.originX=="start"?o:s}t.left<0&&(r-=t.left);let i;return n.originY=="center"?i=e.top+e.height/2:i=n.originY=="top"?e.top:e.bottom,t.top<0&&(i-=t.top),{x:r,y:i}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let i;return n.overlayY=="center"?i=-t.height/2:i=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+i}}_getOverlayFit(e,t,n,r){let i=SD(t),{x:o,y:s}=e,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(o+=a),l&&(s+=l);let c=0-o,d=o+i.width-n.width,h=0-s,f=s+i.height-n.height,g=this._subtractOverflows(i.width,c,d),m=this._subtractOverflows(i.height,h,f),b=g*m;return{visibleArea:b,isCompletelyWithinViewport:i.width*i.height===b,fitsInViewportVertically:m===i.height,fitsInViewportHorizontally:g==i.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,i=n.right-t.x,o=CD(this._overlayRef.getConfig().minHeight),s=CD(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||o!=null&&o<=r,l=e.fitsInViewportHorizontally||s!=null&&s<=i;return a&&l}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=SD(t),i=this._viewportRect,o=Math.max(e.x+r.width-i.width,0),s=Math.max(e.y+r.height-i.height,0),a=Math.max(i.top-n.top-e.y,0),l=Math.max(i.left-n.left-e.x,0),c=0,d=0;return r.width<=i.width?c=l||-o:c=e.x<this._viewportMargin?i.left-n.left-e.x:0,r.height<=i.height?d=a||-s:d=e.y<this._viewportMargin?i.top-n.top-e.y:0,this._previousPushAmount={x:c,y:d},{x:e.x+c,y:e.y+d}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!WB(this._lastScrollVisibility,n)){let r=new jv(e,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=e.overlayY;e.overlayX==="center"?n="center":this._isRtl()?n=e.overlayX==="start"?"right":"left":n=e.overlayX==="start"?"left":"right";for(let i=0;i<t.length;i++)t[i].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(e,t){let n=this._viewportRect,r=this._isRtl(),i,o,s;if(t.overlayY==="top")o=e.y,i=n.height-o+this._viewportMargin;else if(t.overlayY==="bottom")s=n.height-e.y+this._viewportMargin*2,i=n.height-s+this._viewportMargin;else{let f=Math.min(n.bottom-e.y+n.top,e.y),g=this._lastBoundingBoxSize.height;i=f*2,o=e.y-f,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.y-g/2)}let a=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,l=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,c,d,h;if(l)h=n.width-e.x+this._viewportMargin*2,c=e.x-this._viewportMargin;else if(a)d=e.x,c=n.right-e.x;else{let f=Math.min(n.right-e.x+n.left,e.x),g=this._lastBoundingBoxSize.width;c=f*2,d=e.x-f,c>g&&!this._isInitialRender&&!this._growAfterOpen&&(d=e.x-g/2)}return{top:o,left:d,bottom:s,right:h,width:c,height:i}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=$t(n.height),r.top=$t(n.top),r.bottom=$t(n.bottom),r.width=$t(n.width),r.left=$t(n.left),r.right=$t(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(r.maxHeight=$t(i)),o&&(r.maxWidth=$t(o))}this._lastBoundingBoxSize=n,os(this._boundingBox.style,r)}_resetBoundingBoxStyles(){os(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){os(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){let c=this._viewportRuler.getViewportScrollPosition();os(n,this._getExactOverlayY(t,e,c)),os(n,this._getExactOverlayX(t,e,c))}else n.position="static";let s="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(s+=`translateX(${a}px) `),l&&(s+=`translateY(${l}px)`),n.transform=s.trim(),o.maxHeight&&(r?n.maxHeight=$t(o.maxHeight):i&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=$t(o.maxWidth):i&&(n.maxWidth="")),os(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),e.overlayY==="bottom"){let o=this._document.documentElement.clientHeight;r.bottom=`${o-(i.y+this._overlayRect.height)}px`}else r.top=$t(i.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let o;if(this._isRtl()?o=e.overlayX==="end"?"left":"right":o=e.overlayX==="end"?"right":"left",o==="right"){let s=this._document.documentElement.clientWidth;r.right=`${s-(i.x+this._overlayRect.width)}px`}else r.left=$t(i.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:ED(e,n),isOriginOutsideView:Vv(e,n),isOverlayClipped:ED(t,n),isOverlayOutsideView:Vv(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&Av(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof qt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function os(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function CD(e){if(typeof e!="number"&&e!=null){let[t,n]=e.split($B);return!n||n==="px"?parseFloat(t):null}return e||null}function SD(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}function WB(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var ID="cdk-global-overlay-wrapper",Wv=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(ID),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:i,maxWidth:o,maxHeight:s}=n,a=(r==="100%"||r==="100vw")&&(!o||o==="100%"||o==="100vw"),l=(i==="100%"||i==="100vh")&&(!s||s==="100%"||s==="100vh"),c=this._xPosition,d=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",f="",g="",m="";a?m="flex-start":c==="center"?(m="center",h?g=d:f=d):h?c==="left"||c==="end"?(m="flex-end",f=d):(c==="right"||c==="start")&&(m="flex-start",g=d):c==="left"||c==="start"?(m="flex-start",f=d):(c==="right"||c==="end")&&(m="flex-end",g=d),e.position=this._cssPosition,e.marginLeft=a?"0":f,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=a?"0":g,t.justifyContent=m,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(ID),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},GB=(()=>{class e{_viewportRuler=P(kv);_document=P(ct);_platform=P($n);_overlayContainer=P(Nf);constructor(){}global(){return new Wv}flexibleConnectedTo(n){return new $v(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Gv=(()=>{class e{scrollStrategies=P(UB);_overlayContainer=P(Nf);_positionBuilder=P(GB);_keyboardDispatcher=P(jB);_injector=P(bt);_ngZone=P(Ke);_document=P(ct);_directionality=P(pl);_location=P(Vg);_outsideClickDispatcher=P(HB);_animationsModuleType=P(Hb,{optional:!0});_idGenerator=P(Tf);_renderer=P(An).createRenderer(null,null);_appRef;_styleLoader=P(fl);constructor(){}create(n){this._styleLoader.load(TD);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new hl(n);return s.direction=s.direction||this._directionality.value,new Ca(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Un),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(sr)),new bf(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zB(e,t){}var Sa=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext},qB=(()=>{class e extends wa{_elementRef=P(qt);_focusTrapFactory=P(mD);_config;_interactivityChecker=P(Ov);_ngZone=P(Ke);_overlayRef=P(Ca);_focusMonitor=P(dD);_renderer=P(qs);_platform=P($n);_document=P(ct,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=P(jo);_injector=P(bt);_isDestroyed=!1;constructor(){super(),this._config=P(Sa,{optional:!0})||new Sa,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||Yi(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=Cf(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=Cf();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Cf()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=St({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&eo(Tv,7),n&2){let i;to(i=no())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&Dg("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[Ys],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&At(0,zB,0,0,"ng-template",0)},dependencies:[Tv],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
46
+ `],encapsulation:2})}return e})(),Ai=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new Ne;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,t){this.overlayRef=e,this.config=t,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!vD(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(e),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},YB=new ve("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=P(Gv);return()=>e.scrollStrategies.block()}}),ml=new ve("DialogData"),KB=new ve("DefaultDialogConfig"),xD=(()=>{class e{_overlay=P(Gv);_injector=P(bt);_defaultOptions=P(KB,{optional:!0});_parentDialog=P(e,{optional:!0,skipSelf:!0});_overlayContainer=P(Nf);_idGenerator=P(Tf);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Ne;_afterOpenedAtThisLevel=new Ne;_ariaHiddenElements=new Map;_scrollStrategy=P(YB);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=_h(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(To(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Sa;r=w(w({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),a=new Ai(s,r),l=this._attachContainer(s,a,r);return a.containerInstance=l,this._attachDialogContent(n,a,l,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){zv(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){zv(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),zv(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new hl({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let o=i.injector||i.viewContainerRef?.injector,s=[{provide:Sa,useValue:i},{provide:Ai,useValue:r},{provide:Ca,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,s.push(...i.container.providers(i))):a=qB;let l=new va(a,i.viewContainerRef,bt.create({parent:o||this._injector,providers:s}));return n.attach(l).instance}_attachDialogContent(n,r,i,o){if(n instanceof Br){let s=this._createInjector(o,r,i,void 0),a={$implicit:o.data,dialogRef:r};o.templateContext&&(a=w(w({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new Ea(n,null,a,s))}else{let s=this._createInjector(o,r,i,this._injector),a=i.attachComponentPortal(new va(n,o.viewContainerRef,s));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,a=[{provide:ml,useValue:n.data},{provide:Ai,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!s||!s.get(pl,null,{optional:!0}))&&a.push({provide:pl,useValue:{value:n.direction,change:So()}}),bt.create({parent:s||o,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zv(e,t){let n=e.length;for(;n--;)t(e[n])}var En=class{static injectScriptURL(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,n.defer=!0,e.includes("localhost")&&(n.type="module"),document.head.appendChild(n)}static injectRawScript(e){if(!e)return;let t=document.createElement("script");t.id="cooee-app-script",t.innerHTML=e,document.head.appendChild(t)}static injectRawCSS(e,t=document.head){if(!e)return;let n=document.createElement("style");n.textContent=e,t.appendChild(n)}static injectStylesheet(e,t=document.head){if(!e)return;let n=document.createElement("link");n.rel="stylesheet",n.href=e,e==="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let o of i)if(o.type==CSSRule.FONT_FACE_RULE){let s=e.split("/"),a=s.slice(0,s.length-1).join("/"),l=o.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let c=document.createElement("style");c.appendChild(document.createTextNode(l)),document.head.appendChild(c)}}}),t.appendChild(n)}},Yv=Pe(Yn());function ZB(e,t){if(e&1&&(X(0,"div",11),jt(1,"OPEN CART "),Q()),e&2){let n=re();Qi("animate-slide-up-enter",n.atcClicked)("hidden",!n.atcClicked)}}function XB(e,t){if(e&1&&(X(0,"div",11),jt(1,"ADD TO CART "),Q()),e&2){let n=re();Qi("animate-slide-up-exit",n.atcClicked)("hidden",n.atcClicked)}}var Ia=class af{items;clicked=new yt;performCTA=new yt;atcClicked=!1;clickAddToCart(t,n){t.stopPropagation(),this.performCTA.emit({item:n,cta:this.atcClicked?Yv.ClickActionType.OPEN_CART:Yv.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||af)};static \u0275cmp=St({type:af,selectors:[["cooee-product-card"]],inputs:{items:"items"},outputs:{clicked:"clicked",performCTA:"performCTA"},decls:15,vars:12,consts:[[1,"lc:absolute","lc:flex","lc:bottom-2","lc:gap-2","lc:w-full","lc:z-10"],[1,"lc:flex","lc:px-20","lc:w-full"],["id","lc-single-product","tabindex","{0}",1,"lc:flex","lc:flex-col","lc:gap-1","lc:bg-white/50","lc:rounded-lg","lc:p-2","lc:w-full","lc:cursor-pointer","lc:backdrop-blur-xs",3,"click","keydown"],[1,"lc:flex","lc:gap-2","lc:w-full","lc:p-1"],["id","lc-item-image",1,"lc:w-16","lc:h-16","lc:object-cover","lc:box-border","lc:rounded-lg",3,"alt","src"],[1,"lc:flex","lc:flex-col","lc:gap-1","lc:text-xs"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-2"],["id","lc-item-price"],["id","lc-cta-button","tabindex","{0}",1,"lc:py-2","lc:rounded","lc:w-full","lc:text-center","lc:font-normal","lc:cursor-pointer",3,"click","keydown"],[1,"lc:text-white","lc:text-lg","lc:font-bold",3,"animate-slide-up-enter","hidden"],[1,"lc:text-white","lc:text-lg","lc:font-bold",3,"animate-slide-up-exit","hidden"],[1,"lc:text-white","lc:text-lg","lc:font-bold"]],template:function(t,n){if(t&1){let r=_n();X(0,"div",0)(1,"div",1),Hr(2),X(3,"div",2),at("click",function(){Je(r);let i=Hn(2);return Qe(n.clicked.emit(i))})("keydown",function(){Je(r);let i=Hn(2);return Qe(n.clicked.emit(i))}),X(4,"div",3),qe(5,"img",4),X(6,"div",5)(7,"span",6),jt(8),Q(),X(9,"span",7),jt(10),ar(11,"cooeeCurrency"),Q()()(),X(12,"div",8),at("click",function(i){Je(r);let o=Hn(2);return Qe(n.clickAddToCart(i,o))})("keydown",function(i){Je(r);let o=Hn(2);return Qe(n.clickAddToCart(i,o))}),At(13,ZB,2,4,"div",9)(14,XB,2,4,"div",10),Q()()()()}if(t&2){Z(2);let r=Uo(n.items[0]);Z(3),jn("alt",r.name),Ue("src",r.imageURL,cn),Z(3),Ir(" ",r.name," "),Z(2),Ir(" ",Dr(11,10,r.price)," "),Z(2),Qi("lc:bg-pink-500",!n.atcClicked)("lc:bg-black",n.atcClicked),Z(),Ut(n.atcClicked?13:14)}},dependencies:[Xr],styles:["@keyframes _ngcontent-%COMP%_slideUpExit{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@keyframes _ngcontent-%COMP%_slideUpEnter{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}[_nghost-%COMP%] .animate-slide-up-exit[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpExit .3s ease-out forwards}[_nghost-%COMP%] .animate-slide-up-enter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpEnter .3s ease-out forwards}"]})},ht=class{static COOEE_URL_PREFIX="?from=cooee";static isShopify(){return!!window.Shopify}static getShopName(){if(this.isShopify())return window.Shopify.shop?.split(".")?.[0]}static getPageName(){if(!this.isShopify())return;let e=new URL(window.location.href).pathname.slice(1).split("/"),t=e[0];if(t==="")return"home";if(t==="collections")return e[2]==="products"?"product":"collection";if(t==="products")return"product";if(t==="cart")return"cart";if(location.href.includes("thank_you"))return"thank_you"}static getProductSlug(e){let t=(e.includes("://")?new URL(e).pathname:e).match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:null}static getRootPrefix(){return window.Shopify?.routes?.root??"/"}static getCartURL(e){return this.getRootPrefix()+e+this.COOEE_URL_PREFIX}},ND=Pe(Xv()),JB=(0,ND.default)(fetch),Rf=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let n,r=ht.getRootPrefix()+`products/${t}.js`;try{n=await(await JB(r)).json()}catch(i){S.error(`Failed to fetch ${r}`,i);let o=_t.getInstance();i instanceof Response?o.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:r}):o.captureException(i,{mID:e.mID,path:r});return}if(!n){S.error("Item not found after AJAX call for:",e.mID);return}return n}static getItemSlug(e){if(e.link)try{let t=new URL(e.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:void 0}catch{return}}},Af=Pe(Yn()),QB=(e,t)=>t.id;function e2(e,t){if(e&1&&qe(0,"img",10),e&2){let n=t.$implicit,r=re(2);Ue("src",n,cn)("alt",r.item.name)}}function t2(e,t){if(e&1&&Kt(0,e2,1,2,"img",10,Ci),e&2){let n=re();Zt(n.ajaxItem.images)}}function n2(e,t){if(e&1&&qe(0,"img",10),e&2){let n=re();Ue("src",n.item.imageURL,cn)("alt",n.item.name)}}function r2(e,t){if(e&1){let n=_n();X(0,"div",20),at("click",function(){let r=Je(n).$implicit,i=re();return Qe(i.selectedVariant=r)})("keydown",function(){let r=Je(n).$implicit,i=re();return Qe(i.selectedVariant=r)}),X(1,"span",21),jt(2),Q()()}if(e&2){let n=t.$implicit,r=re();Qi("lc:bg-pink-100",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id)("lc:border-pink-300",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id)("lc:text-pink-700",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),Z(2),Ks(n.title)}}function i2(e,t){if(e&1&&(X(0,"div",16)(1,"h4",22),jt(2,"Description"),Q(),qe(3,"div",23),ar(4,"safeHtml"),Q()),e&2){let n=re();Z(3),Ue("innerHTML",Dr(4,1,n.ajaxItem==null?null:n.ajaxItem.description),jc)}}function o2(e,t){e&1&&jt(0," OPEN CART ")}function s2(e,t){e&1&&jt(0," ADD TO CART ")}var Da=class cf{item;closeModel=new yt;performCTA=new yt;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=Af.ClickActionType;async ngOnInit(){this.ajaxItem=await Rf.getAjaxItem(this.item),this.processVariants()}closeDialog(){this.closeModel.emit()}clickAddToCart(t){t.vID=this.selectedVariant?.id,t.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:t,cta:this.atcClicked?Af.ClickActionType.OPEN_CART:Af.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants.filter(t=>t.available)??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||cf)};static \u0275cmp=St({type:cf,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:29,vars:7,consts:[[1,"lc:bg-white","lc:flex","lc:flex-col","lc:h-full","lc:w-full"],[1,"lc:flex","lc:items-center","lc:justify-between","lc:px-4","lc:py-3","lc:border-b"],[1,"lc:text-xl","lc:font-bold"],[1,"lc:bg-transparent","lc:text-black/50","lc:border-0","lc:cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:flex-1","lc:overflow-y-auto","lc:p-4"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:gap-4"],[1,"lc:w-full","lc:flex","lc:overflow-x-auto","lc:gap-2","lc:flex-nowrap"],[1,"lc:w-28","lc:h-28","lc:object-contain",3,"src","alt"],[1,"lc:flex","lc:flex-col","lc:gap-2","lc:mt-4","lc:w-full"],[1,"lc:text-lg","lc:font-bold","lc:m-0"],[1,"lc:text-pink-600","lc:font-bold","lc:text-lg"],[1,"lc:flex","lc:flex-wrap","lc:gap-2","lc:pt-2","lc:w-full"],["tabindex","{0}",1,"lc:px-3","lc:py-2","lc:rounded-lg","lc:bg-gray-100","lc:text-gray-800","lc:text-sm","lc:cursor-pointer","lc:border","lc:border-gray-200","lc:flex","lc:items-center","lc:gap-1",3,"lc:bg-pink-100","lc:border-pink-300","lc:text-pink-700"],[1,"lc:mt-4","lc:border-t","lc:pt-4","lc:w-full"],[1,"lc:flex","lc:justify-center","lc:items-center","lc:px-4","lc:py-4","lc:bg-black/30","lc:rounded-lg","lc:gap-4","lc:rounded-b-none","lc:shadow-zinc-400"],["tabindex","{0}",1,"lc:bg-black","lc:text-white","lc:px-4","lc:py-2","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["tabindex","{0}",1,"lc:bg-pink-100","lc:text-pink-600","lc:px-4","lc:py-2","lc:rounded-lg","lc:font-semibold","lc:w-1/2","lc:flex","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["tabindex","{0}",1,"lc:px-3","lc:py-2","lc:rounded-lg","lc:bg-gray-100","lc:text-gray-800","lc:text-sm","lc:cursor-pointer","lc:border","lc:border-gray-200","lc:flex","lc:items-center","lc:gap-1",3,"click","keydown"],[1,"lc:truncate","lc:max-w-[200px]"],[1,"lc:font-semibold","lc:m-0"],[3,"innerHTML"]],template:function(t,n){t&1&&(X(0,"div",0)(1,"div",1)(2,"h2",2),jt(3,"Shop Now"),Q(),X(4,"button",3),at("click",function(){return n.closeDialog()}),Sr(),X(5,"svg",4),qe(6,"path",5)(7,"path",6),Q()()(),$s(),X(8,"div",7)(9,"div",8)(10,"div",9),At(11,t2,2,0)(12,n2,1,2,"img",10),Q(),X(13,"div",11)(14,"h3",12),jt(15),Q(),X(16,"span",13),jt(17),ar(18,"cooeeCurrency"),Q()(),X(19,"div",14),Kt(20,r2,3,7,"div",15,QB),Q(),At(22,i2,5,3,"div",16),Q()(),X(23,"div",17)(24,"div",18),at("click",function(){return n.clickAddToCart(n.item)})("keydown",function(){return n.clickAddToCart(n.item)}),At(25,o2,1,0)(26,s2,1,0),Q(),X(27,"div",19),at("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})})("keydown",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),jt(28," MORE INFO "),Q()()()),t&2&&(Z(11),Ut(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?11:12),Z(4),Ks(n.item.name),Z(2),Ir(" ",Dr(18,5,(n.selectedVariant==null?null:n.selectedVariant.price)/100)," "),Z(3),Zt(n.availableVariants),Z(2),Ut(n.ajaxItem!=null&&n.ajaxItem.description?22:-1),Z(3),Ut(n.atcClicked?25:26))},dependencies:[pa,Xr],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px;overflow:hidden}"]})};function a2(e,t){e&1&&(Sr(),X(0,"svg",1),qe(1,"path",2)(2,"path",3),Q())}function c2(e,t){e&1&&(Sr(),X(0,"svg",1),qe(1,"path",2)(2,"path",4),Q())}var Ta=class Of{muted;buttonClicked=new yt;static \u0275fac=function(t){return new(t||Of)};static \u0275cmp=St({type:Of,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:1,consts:[["id","lc-mute-button",1,"lc:bg-black/50","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:border-none","lc:cursor-pointer",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(t,n){t&1&&(X(0,"button",0),at("click",function(){return n.buttonClicked.emit()}),At(1,a2,3,0,":svg:svg",1)(2,c2,3,0,":svg:svg",1),Q()),t&2&&(Z(),Ut(n.muted?1:2))},encapsulation:2})},xa=class Pf{width;static \u0275fac=function(t){return new(t||Pf)};static \u0275cmp=St({type:Pf,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(t,n){t&1&&(X(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),qe(4,"div"),Q()()()()),t&2&&(Z(3),Ji("width",n.width,"%"))},encapsulation:2})},vo=Pe(Yn()),RT=Pe(Mf()),AT=Pe($o()),l2=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|cookiehubscan|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab",u2=/bot|crawl|http|lighthouse|scan|search|spider/i,gl;function d2(){if(gl instanceof RegExp)return gl;try{gl=new RegExp(l2,"i")}catch{gl=u2}return gl}function MD(e){return!!e&&d2().test(e)}var OD=Pe(Jv()),yl=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let e;try{e=new OD.URLBuilder(location.href)}catch{return{}}let t={};this.UTM_PARAMS.forEach(r=>{let i=e.getQueryParam(r);i&&(t[r]=i)});let n={};return Object.keys(this.TW_PARAMS).forEach(r=>{let i=e.getQueryParam(this.TW_PARAMS[r]);i&&(n[r]=i)}),w(w({},n),t)}},ei=class U0{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(t){this.name=t.name,this.path=t.path,this.qs=t.qs,this.referrer=t.referrer,this.utmSource=t.utmSource||t.utm_source,this.utmMedium=t.utmMedium||t.utm_medium,this.utmCampaign=t.utmCampaign||t.utm_campaign,this.utmId=t.utmId||t.utm_id,this.utmTerm=t.utmTerm||t.utm_term,this.utmContent=t.utmContent||t.utm_content}static parseFromCurrent(){let t=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new U0(w({origin:location.origin,path:t,qs:location.search,referrer:yl.getReferrer(),name:Ae.get().pageName},yl.getUTMParams()))}},ke=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},Qv={d:(e,t)=>{for(var n in t)Qv.o(t,n)&&!Qv.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},e_={};Qv.d(e_,{A:()=>m2,k:()=>t_});var p2=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(c){try{l(r.next(c))}catch(d){o(d)}}function a(c){try{l(r.throw(c))}catch(d){o(d)}}function l(c){var d;c.done?i(c.value):(d=c.value,d instanceof n?d:new n(function(h){h(d)})).then(s,a)}l((r=r.apply(e,t||[])).next())})},h2=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(c){return function(d){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,d[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&d[0]?r.return:d[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,d[1])).done)return i;switch(r=0,i&&(d=[2&d[0],i.value]),d[0]){case 0:case 1:i=d;break;case 4:return s.label++,{value:d[1],done:!1};case 5:s.label++,r=d[1],d=[0];continue;case 7:d=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!((i=i.length>0&&i[i.length-1])||d[0]!==6&&d[0]!==2)){s=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){s.label=d[1];break}if(d[0]===6&&s.label<i[1]){s.label=i[1],i=d;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(d);break}i[2]&&s.ops.pop(),s.trys.pop();continue}d=t.call(e,s)}catch(h){d=[6,h],r=0}finally{n=i=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([l,c])}}};function t_(){return p2(this,void 0,Promise,function(){return h2(this,function(_a){switch(_a.label){case 0:return[4,new Promise(function(resolve,reject){var browserName="Unknown";function __callback(e){resolve({isPrivate:e,browserName})}function identifyChromium(){var e=navigator.userAgent;return e.match(/Chrome/)?navigator.brave!==void 0?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}function assertEvalToString(e){return e===eval.toString().length}function feid(){var toFixedEngineID=0;try{eval("(-1).toFixed(-1);")}catch(e){toFixedEngineID=e.message.length}return toFixedEngineID}function isSafari(){return feid()===44}function isChrome(){return feid()===51}function isFirefox(){return feid()===25}function isMSIE(){return navigator.msSaveBlob!==void 0&&assertEvalToString(39)}function newSafariTest(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var n,r,i=(n=t.target)===null||n===void 0?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(s){var o=s;return s instanceof Error&&(o=(r=s.message)!==null&&r!==void 0?r:s),typeof o!="string"?void __callback(!1):void __callback(o.includes("BlobURLs are not yet supported"))}finally{i.close(),window.indexedDB.deleteDatabase(e)}}}catch{__callback(!1)}}function oldSafariTest(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch{return void __callback(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch{return void __callback(!0)}__callback(!1)}function safariPrivateTest(){navigator.maxTouchPoints!==void 0?newSafariTest():oldSafariTest()}function getQuotaLimit(){var e=window;return e.performance!==void 0&&e.performance.memory!==void 0&&e.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824}function storageQuotaChromePrivateTest(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){__callback(Math.round(t/1048576)<2*Math.round(getQuotaLimit()/1048576))},function(e){reject(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function oldChromePrivateTest(){(0,window.webkitRequestFileSystem)(0,1,function(){__callback(!1)},function(){__callback(!0)})}function chromePrivateTest(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?storageQuotaChromePrivateTest():oldChromePrivateTest()}function firefoxPrivateTest(){__callback(navigator.serviceWorker===void 0)}function msiePrivateTest(){__callback(window.indexedDB===void 0)}function main(){isSafari()?(browserName="Safari",safariPrivateTest()):isChrome()?(browserName=identifyChromium(),chromePrivateTest()):isFirefox()?(browserName="Firefox",firefoxPrivateTest()):isMSIE()?(browserName="Internet Explorer",msiePrivateTest()):reject(new Error("detectIncognito cannot determine the browser"))}main()})];case 1:return[2,_a.sent()]}})})}typeof window<"u"&&(window.detectIncognito=t_);var m2=t_,PD=e_.A,wZ=e_.k,DT=Pe($o()),kD=Pe(n_()),Zn=class Bi{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new kD.default;constructor(){}static get(){return Bi._instance||(Bi._instance=new Bi),Bi._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===Bi.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===Bi.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(t){let n=t.max,r=t.cont.w,i=t.cont.h,o=t.spc,s=Bi.get().getWidth(),a=Bi.get().getHeight();n&&(s=s?Math.min(s,n):n,a=a?Math.min(a,n):n),a&&(s-=o.getHorizontal(),a-=o.getVertical(),s/a<r/i?this.scalingFactor=s/r:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(t){return this.doc.createElement(t)}appendChild(t,n){t.appendChild(n)}setStyles(t,n){Object.assign(t.style,n)}setStyle(t,n,r){if(n){if(!r){t.style.removeProperty(n);return}t.style.setProperty(n,r,"important")}}setAttribute(t,n,r){t.setAttribute(n,r)}removeInApp(t){let n=document.querySelector(`.${t.rootClassName}`);n&&n.parentElement.removeChild(n)}setParentContainer(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},kf=class{parser;result={};constructor(){this.parser=Zn.get().getUAParser()}async get(){let e=this.result;return this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),await this.getBatteryInfo(),await this.getLocation(),e.locale=navigator.language,e.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},e.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},e.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},e.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},e.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},e.navigatorUA=navigator.userAgent,e.isHeadless=navigator.webdriver,e}getDeviceMemory(){let e=navigator;if(!e.deviceMemory)return;let t=e.deviceMemory;this.result.mem={tot:t*1024}}getNetworkType(){let e=navigator,t=e.connection||e.mozConnection||e.webkitConnection;t?.effectiveType&&(this.result.net={type:t.effectiveType})}getOrientation(){let e=screen.orientation?.type;e&&(this.result.orientation=e)}getDPI(){let e=document.createElement("div");e.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(e);let t=window.devicePixelRatio||1,n=e.offsetWidth*t;return document.body.removeChild(e),n}async getLocation(){if(!(!navigator.geolocation||!navigator.permissions||(await navigator.permissions.query({name:"geolocation"})).state!="granted"))return new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{this.result.coords=[t.coords.latitude,t.coords.longitude],e()},()=>e())})}async getBatteryInfo(){if("getBattery"in navigator)try{let e=await navigator.getBattery();this.result.bat={l:e.level*100,c:e.charging}}catch{}}},Ra=class{isLocked=!1;queue=[];async acquire(){if(this.isLocked)await new Promise(e=>this.queue.push(e));else{this.isLocked=!0;return}}release(){if(this.queue.length>0){let e=this.queue.shift();e&&e()}else this.isLocked=!1}},je=class F0{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new Ra;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new F0),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let n=this.convertToCooeeCart();return t&&await vt.set(Ce.CURRENT_CART,n),n}async addCooeeAttributes(){await this.lock.acquire();let t=await un.get(Ce.ID),n=await vt.get(Ce.DEVICE_ID);if(this.attributes?.letscooee_did===n&&this.attributes?.letscooee_sid===t){S.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let r={letscooee_did:n,letscooee_sid:t,__letscooee_time:new Date().toLocaleString()};S.debug("Updating Shopify cart with attributes:",r);let i=ht.getCartURL("cart/update.js"),o=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:r})})).json();S.debug("Updated cart attributes",JSON.stringify(o)),this.update(o),this.lock.release()}update(t){return this.token=t.token,this.items=t.items,this.total_price=t.total_price,this.original_total_price=t.original_total_price,this.currency=t.currency,this.item_count=t.item_count,this.attributes=t.attributes,Ae.get().currencyCode=this.currency,S.log("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}convertToCooeeCart(){return{amount:this.total_price/100,originalAmount:this.original_total_price/100,currency:this.currency,itemCount:this.item_count,items:this.normaliseItems(this.items),token:this.token}}normaliseItems(t){if(!t)return S.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let n=[];for(let r of t){if(!r.id||!r.title){S.warn("Invalid item received",r);continue}let i={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,properties:r.properties,key:r.key},o=r.selling_plan_allocation?.selling_plan;if(!o){n.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:o.fixed_selling_plan,id:o.id,name:o.name,recurringDeliveries:o.recurring_deliveries}},n.push(i)}return n}async fetchCartFromShopify(t){if(!t&&this.token){S.debug("Not fetching cart");return}S.debug("Fetching cart");let n=ht.getCartURL("cart.js"),r=await(await fetch(n)).json();this.update(r)}},ss=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(ss||{}),Aa=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=ss[e]?.toLowerCase();t&&(S.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},hr=class{static isOn=!1;static element;static watch(){let e=S.getDebugParam();(e==="1"||e==="on")&&Le.getInstance().updateDeviceProps({debugTill:this.getDebugMillis()}),e==="on"?sessionStorage.cooeeDebug="1":e==="off"&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())}static prepend(e){if(!this.isOn)return;let t=document.createElement("div");t.innerHTML="&#x2022; "+new Date().toLocaleString()+" - "+e,this.element.prepend(t)}static renderDebugBar(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),document.body.appendChild(this.element)}static dragElement(){let e=0,t=0,n=0,r=0,i=a=>{a=a||window.event,a.preventDefault(),n=a.clientX,r=a.clientY,document.onmouseup=s,document.onmousemove=o},o=a=>{a=a||window.event,a.preventDefault(),e=n-a.clientX,t=r-a.clientY,n=a.clientX,r=a.clientY,this.element.style.top=this.element.offsetTop-t+"px",this.element.style.left=this.element.offsetLeft-e+"px"},s=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=i}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}},_l=class extends ro{static storeName="app";static{this.storage=ta(this.storeName)}},Lf=Pe($o()),ti=class j0{static INSTANCE=new j0;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,n){this.topics[t]||(this.topics[t]=new Ne),this.topics[t].next(n)}subscriber(t){return this.topics[t]||(this.topics[t]=new Ne),this.topics[t].asObservable()}},Wt=class ci{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=Dt.get().website??{};currentState=!1;drawerSubject=new ui({open:!1,firstOpen:!1});mutationObserver;firstOpen=!0;selector;shadowParentElementSelector;iconSelector=['button[drawer-to-open="cart-drawer"]','a[href="/cart"]',".header__icon--cart","#cart-icon-bubble",".cart-icon-bubble",".cart-count",'a[onclick*="handleFloCartBtn"]'].join(",");cartSelector=[ci.DEFAULT_SELECTOR,"#halo-cart-sidebar",'[role="dialog"][class*="cart" i]','[id*="section-cart" i]',"#sidebar-cart","#rebuy-cart","#mini-cart","#flo-cart-wrapper","#drawer-cart","#UpcartPopupBackDrop",'[id$="CartDrawer" i]'].join(",");constructor(){this.initialize(),document.addEventListener(k.CTA_AFTER_REFRESH_UI,this.updateBubble.bind(this))}get element(){return this.cartDrawerElement}static get(){return ci._instance||(ci._instance=new ci),ci._instance}static forceUpdate(){ci._instance=new ci}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return Lf.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){S.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){S.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===ci.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(t,n=!0){if(this.isMiniCart()&&this.element?._rerenderCart)this.element._rerenderCart({detail:{cart:t}});else if(this.isShopifyDefaultDrawer())this.element?.renderContents&&t&&(this.element.classList.remove("is-empty"),this.element.renderContents?.(t));else if(this.element?.onCartDrawerUpdate)this.element.onCartDrawerUpdate();else if(window.cartGiftUpdate){if(!t?.items?.[0])return;let r=t.items[0].id,i=t.items[0].quantity,o=t.items[0].price;window.cartGiftUpdate(r,o,i,"","ADD_TO_CART")}else if(window.icartCartActivityEvent)window.icartCartActivityEvent();else if(window.theme?.CartDrawer)window.theme?.CartDrawer.init?new window.theme.CartDrawer().init():new window.theme.CartDrawer;else if(window.Hs_CartDrawer?.updateSlideCart)window.Hs_CartDrawer.updateSlideCart();else if(window.theme?.fetch_side_cart)window.theme.fetch_side_cart();else if(window.theme?.Cart?.updateCart)window.theme.Cart.updateCart();else if(window.cartUpdate)window.cartUpdate();else if(this.element?._onCartRefresh)this.element._onCartRefresh();else if(window.cart?.getCart)window.cart.getCart();else if(this.element?.tagName?.toLowerCase()==="cart-drawer-component")document.dispatchEvent(new CustomEvent("action:cart:updateCartandShowCart"));else if(this.element?.id==="sidebar-cart")document.body.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{}}));else if(this.element?.id==="quick-cart"){let r=document.querySelector('a[href="/cart"]');r&&r.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():S.info("No method found to update the cart without refreshing");document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),n&&ti.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let t=this.configWebsite.cartDrawerSelector;if(!t){await this.findCartDrawer();return}let n=t.split(k.SHADOW_SPLITTER);n.length===1?(this.selector=n[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=n[0]?.trim(),this.selector=n[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!ht.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await de.retrySelector(t),!this.cartDrawerElement){Lf.default.warn("Max attempts exhausted to find cart drawer");return}Lf.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!ht.isShopify()||!this.shadowParentElementSelector)return;let t=(await de.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;let t=this.cartDrawerElement.getBoundingClientRect(),n=(window.innerHeight||document.documentElement.clientHeight)+.5,r=(window.innerWidth||document.documentElement.clientWidth)+.5,i=t.top<=n&&t.bottom>=0,o=t.left<=r&&t.right>=0,s=i&&o,a=this.cartDrawerElement.tagName.toLowerCase()===ci.DEFAULT_SELECTOR&&this.cartDrawerElement.open,l=getComputedStyle(this.cartDrawerElement),c=l.display!=="none"&&l.visibility!=="hidden"&&parseFloat(l.opacity)>0,d=!this.cartDrawerElement.hidden,h=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,f=l.transform.match(/matrix\(([^)]+)\)/),g=0,m=0;if(f){let q=f[1].split(", ").map(parseFloat);g=q[4],m=q[5]}let b=g+t.left>r||g+t.right<0||m+t.top>n||m+t.bottom<0,I=Math.max(0,Math.min(t.right,r)-Math.max(t.left,0)),R=Math.max(0,Math.min(t.bottom,n)-Math.max(t.top,0)),j=I*R,U=t.width*t.height,M=U>0&&j/U>=.1;return(s||a||!b)&&c&&d&&h&&M}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(de.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,n=new Ne;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{n.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),n.pipe(vr(500)).subscribe(()=>{let r=this.isOpen();this.currentState!==r&&(this.currentState=r,this.drawerSubject.next({open:r,firstOpen:this.firstOpen}),this.firstOpen&&(this.firstOpen=!1))})}isPresent(){return!this.selector||!this.cartDrawerShadowElement?!1:!!this.cartDrawerShadowElement.querySelector(this.selector)}async updateBubble(){let t=(await je.getCurrent().getNormalisedCart(!0)).itemCount,n=document.querySelector(".cart-link__bubble");n&&(n.innerText=t+"")}},Ff=class{static processConfiguration(){let e=Dt.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Le.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await vt.get(Ce.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await vt.set(Ce.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=Dt.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",n=>{t(n)})})}},ST=Pe(lf()),Fn=Pe(Yn()),po=Pe(Mf()),L_=Pe(i_()),Hf,nt,UD,c_,as,LD,jD,o_,HD,l_,s_,a_,g2,El={},$D=[],y2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,u_=Array.isArray;function ao(e,t){for(var n in t)e[n]=t[n];return e}function d_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function f_(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Hf.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Uf(e,s,r,i,null)}function Uf(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++UD,__i:-1,__u:0};return i==null&&nt.vnode!=null&&nt.vnode(o),o}function ri(e){return e.children}function ni(e,t){this.props=e,this.context=t}function Ma(e,t){if(t==null)return e.__?Ma(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ma(e):null}function WD(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return WD(e)}}function FD(e){(!e.__d&&(e.__d=!0)&&as.push(e)&&!jf.__r++||LD!==nt.debounceRendering)&&((LD=nt.debounceRendering)||jD)(jf)}function jf(){var e,t,n,r,i,o,s,a;for(as.sort(o_);e=as.shift();)e.__d&&(t=as.length,r=void 0,o=(i=(n=e).__v).__e,s=[],a=[],n.__P&&((r=ao({},i)).__v=i.__v+1,nt.vnode&&nt.vnode(r),p_(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Ma(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,qD(s,r,a),r.__e!=o&&WD(r)),as.length>t&&as.sort(o_));jf.__r=0}function GD(e,t,n,r,i,o,s,a,l,c,d){var h,f,g,m,b,I,R=r&&r.__k||$D,j=t.length;for(l=v2(n,t,R,l,j),h=0;h<j;h++)(g=n.__k[h])!=null&&(f=g.__i===-1?El:R[g.__i]||El,g.__i=h,I=p_(e,g,f,i,o,s,a,l,c,d),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&h_(f.ref,null,g),d.push(g.ref,g.__c||m,g)),b==null&&m!=null&&(b=m),4&g.__u||f.__k===g.__k?l=zD(g,l,e):typeof g.type=="function"&&I!==void 0?l=I:m&&(l=m.nextSibling),g.__u&=-7);return n.__e=b,l}function v2(e,t,n,r,i){var o,s,a,l,c,d=n.length,h=d,f=0;for(e.__k=new Array(i),o=0;o<i;o++)(s=t[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=o+f,(s=e.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Uf(null,s,null,null,null):u_(s)?Uf(ri,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Uf(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(c=s.__i=_2(s,n,l,h))!==-1&&(h--,(a=n[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&f--,typeof s.type!="function"&&(s.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,s.__u|=4))):e.__k[o]=null;if(h)for(o=0;o<d;o++)(a=n[o])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Ma(a)),YD(a,a));return r}function zD(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=zD(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Ma(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function _2(e,t,n,r){var i,o,s=e.key,a=e.type,l=t[n];if(l===null||l&&s==l.key&&a===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&s==l.key&&a===l.type)return i;i--}if(o<t.length){if((l=t[o])&&(2&l.__u)==0&&s==l.key&&a===l.type)return o;o++}}return-1}function BD(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||y2.test(t)?n:n+"px"}function Vf(e,t,n,r,i){var o;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||BD(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||BD(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(HD,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=l_,e.addEventListener(t,o?a_:s_,o)):e.removeEventListener(t,o?a_:s_,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function VD(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=l_++;else if(t.t<n.u)return;return n(nt.event?nt.event(t):t)}}}function p_(e,t,n,r,i,o,s,a,l,c){var d,h,f,g,m,b,I,R,j,U,M,q,xe,st,V,he,ee,ue=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(d=nt.__b)&&d(t);e:if(typeof ue=="function")try{if(R=t.props,j="prototype"in ue&&ue.prototype.render,U=(d=ue.contextType)&&r[d.__c],M=d?U?U.props.value:d.__:r,n.__c?I=(h=t.__c=n.__c).__=h.__E:(j?t.__c=h=new ue(R,M):(t.__c=h=new ni(R,M),h.constructor=ue,h.render=w2),U&&U.sub(h),h.props=R,h.state||(h.state={}),h.context=M,h.__n=r,f=h.__d=!0,h.__h=[],h._sb=[]),j&&h.__s==null&&(h.__s=h.state),j&&ue.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=ao({},h.__s)),ao(h.__s,ue.getDerivedStateFromProps(R,h.__s))),g=h.props,m=h.state,h.__v=t,f)j&&ue.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),j&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(j&&ue.getDerivedStateFromProps==null&&R!==g&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(R,M),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(R,h.__s,M)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(h.props=R,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Oe){Oe&&(Oe.__=t)}),q=0;q<h._sb.length;q++)h.__h.push(h._sb[q]);h._sb=[],h.__h.length&&s.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(R,h.__s,M),j&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(g,m,b)})}if(h.context=M,h.props=R,h.__P=e,h.__e=!1,xe=nt.__r,st=0,j){for(h.state=h.__s,h.__d=!1,xe&&xe(t),d=h.render(h.props,h.state,h.context),V=0;V<h._sb.length;V++)h.__h.push(h._sb[V]);h._sb=[]}else do h.__d=!1,xe&&xe(t),d=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++st<25);h.state=h.__s,h.getChildContext!=null&&(r=ao(ao({},r),h.getChildContext())),j&&!f&&h.getSnapshotBeforeUpdate!=null&&(b=h.getSnapshotBeforeUpdate(g,m)),a=GD(e,u_(he=d!=null&&d.type===ri&&d.key==null?d.props.children:d)?he:[he],t,n,r,i,o,s,a,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&s.push(h),I&&(h.__E=h.__=null)}catch(Oe){if(t.__v=null,l||o!=null)if(Oe.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else for(ee=o.length;ee--;)d_(o[ee]);else t.__e=n.__e,t.__k=n.__k;nt.__e(Oe,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=E2(n.__e,t,n,r,i,o,s,l,c);return(d=nt.diffed)&&d(t),128&t.__u?void 0:a}function qD(e,t,n){for(var r=0;r<n.length;r++)h_(n[r],n[++r],n[++r]);nt.__c&&nt.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){nt.__e(o,i.__v)}})}function E2(e,t,n,r,i,o,s,a,l){var c,d,h,f,g,m,b,I=n.props,R=t.props,j=t.type;if(j=="svg"?i="http://www.w3.org/2000/svg":j=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c<o.length;c++)if((g=o[c])&&"setAttribute"in g==!!j&&(j?g.localName==j:g.nodeType==3)){e=g,o[c]=null;break}}if(e==null){if(j==null)return document.createTextNode(R);e=document.createElementNS(i,j,R.is&&R),a&&(nt.__m&&nt.__m(t,o),a=!1),o=null}if(j===null)I===R||a&&e.data===R||(e.data=R);else{if(o=o&&Hf.call(e.childNodes),I=n.props||El,!a&&o!=null)for(I={},c=0;c<e.attributes.length;c++)I[(g=e.attributes[c]).name]=g.value;for(c in I)if(g=I[c],c!="children"){if(c=="dangerouslySetInnerHTML")h=g;else if(!(c in R)){if(c=="value"&&"defaultValue"in R||c=="checked"&&"defaultChecked"in R)continue;Vf(e,c,null,g,i)}}for(c in R)g=R[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?d=g:c=="value"?m=g:c=="checked"?b=g:a&&typeof g!="function"||I[c]===g||Vf(e,c,g,I[c],i);if(d)a||h&&(d.__html===h.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(h&&(e.innerHTML=""),GD(e,u_(f)?f:[f],t,n,r,j=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ma(n,0),a,l),o!=null)for(c=o.length;c--;)d_(o[c]);a||(c="value",j=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||j=="progress"&&!m||j=="option"&&m!==I[c])&&Vf(e,c,m,I[c],i),c="checked",b!==void 0&&b!==e[c]&&Vf(e,c,b,I[c],i))}return e}function h_(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){nt.__e(i,n)}}function YD(e,t,n){var r,i;if(nt.unmount&&nt.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||h_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){nt.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&YD(r[i],t,n||typeof e.type!="function");n||d_(e.__e),e.__c=e.__=e.__e=void 0}function w2(e,t,n){return this.constructor(e,n)}function KD(e,t,n){var r,i,o,s;t==document&&(t=document.documentElement),nt.__&&nt.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],p_(t,e=(!r&&n||t).__k=f_(ri,null,[e]),i||El,El,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?Hf.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),qD(o,e,s)}Hf=$D.slice,nt={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},UD=0,c_=function(e){return e!=null&&e.constructor==null},ni.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ao({},this.state),typeof e=="function"&&(e=e(ao({},n),this.props)),e&&ao(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),FD(this))},ni.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),FD(this))},ni.prototype.render=ri,as=[],jD=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o_=function(e,t){return e.__v.__b-t.__v.__b},jf.__r=0,HD=/(PointerCapture)$|Capture$/i,l_=0,s_=VD(!1),a_=VD(!0),g2=0;var g_,Xn,m_,ZD,XD=0,oT=[],on=nt,JD=on.__b,QD=on.__r,eT=on.diffed,tT=on.__c,nT=on.unmount,rT=on.__;function b2(e,t){on.__h&&on.__h(Xn,e,XD||t),XD=0;var n=Xn.__H||(Xn.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v_(e,t){var n=b2(g_++,7);return I2(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C2(){for(var e;e=oT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach($f),e.__H.__h.forEach(y_),e.__H.__h=[]}catch(t){e.__H.__h=[],on.__e(t,e.__v)}}on.__b=function(e){Xn=null,JD&&JD(e)},on.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),rT&&rT(e,t)},on.__r=function(e){QD&&QD(e),g_=0;var t=(Xn=e.__c).__H;t&&(m_===Xn?(t.__h=[],Xn.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach($f),t.__h.forEach(y_),t.__h=[],g_=0)),m_=Xn},on.diffed=function(e){eT&&eT(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(oT.push(t)!==1&&ZD===on.requestAnimationFrame||((ZD=on.requestAnimationFrame)||S2)(C2)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),m_=Xn=null},on.__c=function(e,t){t.some(function(n){try{n.__h.forEach($f),n.__h=n.__h.filter(function(r){return!r.__||y_(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],on.__e(r,n.__v)}}),tT&&tT(e,t)},on.unmount=function(e){nT&&nT(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{$f(r)}catch(i){t=i}}),n.__H=void 0,t&&on.__e(t,n.__v))};var iT=typeof requestAnimationFrame=="function";function S2(e){var t,n=function(){clearTimeout(r),iT&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);iT&&(t=requestAnimationFrame(n))}function $f(e){var t=Xn,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Xn=t}function y_(e){var t=Xn;e.__c=e.__(),Xn=t}function I2(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var D2=Symbol.for("preact-signals");function E_(){if(Oa>1)Oa--;else{for(var e,t=!1;wl!==void 0;){var n=wl;for(wl=void 0,__++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&aT(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(__=0,Oa--,t)throw e}}var Et=void 0,wl=void 0,Oa=0,__=0,Wf=0;function sT(e){if(Et!==void 0){var t=e.n;if(t===void 0||t.t!==Et)return t={i:0,S:e,p:Et.s,n:void 0,t:Et,e:void 0,x:void 0,r:t},Et.s!==void 0&&(Et.s.n=t),Et.s=t,e.n=t,32&Et.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Et.s,t.n=void 0,Et.s.n=t,Et.s=t),t}}function sn(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}sn.prototype.brand=D2;sn.prototype.h=function(){return!0};sn.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};sn.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};sn.prototype.subscribe=function(e){var t=this;return wn(function(){var n=t.value,r=Et;Et=void 0;try{e(n)}finally{Et=r}})};sn.prototype.valueOf=function(){return this.value};sn.prototype.toString=function(){return this.value+""};sn.prototype.toJSON=function(){return this.value};sn.prototype.peek=function(){var e=Et;Et=void 0;try{return this.value}finally{Et=e}};Object.defineProperty(sn.prototype,"value",{get:function(){var e=sT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(__>100)throw new Error("Cycle detected");this.v=e,this.i++,Wf++,Oa++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{E_()}}}});function mr(e){return new sn(e)}function aT(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function cT(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function lT(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Pa(e){sn.call(this,void 0),this.x=e,this.s=void 0,this.g=Wf-1,this.f=4}(Pa.prototype=new sn).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Wf))return!0;if(this.g=Wf,this.f|=1,this.i>0&&!aT(this))return this.f&=-2,!0;var e=Et;try{cT(this),Et=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Et=e,lT(this),this.f&=-2,!0};Pa.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}sn.prototype.S.call(this,e)};Pa.prototype.U=function(e){if(this.t!==void 0&&(sn.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Pa.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Pa.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=sT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function w_(e){return new Pa(e)}function uT(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Oa++;var n=Et;Et=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,b_(e),r}finally{Et=n,E_()}}}function b_(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,uT(e)}function T2(e){if(Et!==this)throw new Error("Out-of-order effect");lT(this),Et=e,this.f&=-2,8&this.f&&b_(this),E_()}function bl(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}bl.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};bl.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,uT(this),cT(this),Oa++;var e=Et;return Et=this,T2.bind(this,e)};bl.prototype.N=function(){2&this.f||(this.f|=2,this.o=wl,wl=this)};bl.prototype.d=function(){this.f|=8,1&this.f||b_(this)};function wn(e){var t=new bl(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var S_,C_;function ka(e,t){nt[e]=t.bind(null,nt[e]||function(){})}function Gf(e){C_&&C_(),C_=e&&e.S()}function dT(e){var t=this,n=e.data,r=N2(n);r.value=n;var i=v_(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s,a=t.__$u.S(),l=i.value;a(),c_(l)||((s=t.base)==null?void 0:s.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},w_(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}dT.displayName="_st";Object.defineProperties(sn.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:dT},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ka("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof sn&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)});ka("__r",function(e,t){Gf();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return wn(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),S_=r,Gf(n),e(t)});ka("__e",function(e,t,n,r){Gf(),S_=void 0,e(t,n,r)});ka("diffed",function(e,t){Gf(),S_=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in r)&&(a.d(),o[s]=void 0)}else n.U=o={};for(var l in r){var c=o[l],d=r[l];c===void 0?(c=x2(n,l,d,i),o[l]=c):c.o(d,i)}}}e(t)});function x2(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,o=mr(n);return{o:function(s,a){o.value=s,r=a},d:wn(function(){var s=o.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}ka("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)});ka("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});ni.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function N2(e){return v_(function(){return mr(e)},[])}var zf=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},qf=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},I_=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},ii=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(t=>new zf(t))??[],this.link=e.link,this.price=new qf(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=mr(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=mr(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let n=new I_(t);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Wn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;selectedOrFirstVariant;selected=mr(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=mr(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}set variants(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}update(e){return this.id=e.id,this.mID=e.mID,this.name=e.name,this.status=e.status,this.ctg=e.ctg,this.imgs=e.imgs,this.desc=e.desc,this.sDesc=e.sDesc,this.link=e.link,this.slug=e.slug,this.quantity=e.quantity,this.meta=e.meta,this.category=e.category,this.videos=e.videos,this.reviews=e.reviews,this.portraitVideos=e.videos?.filter(t=>t.orientation==="PORTRAIT"),e.vars&&(this.vars=e.vars.map(t=>new ii(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new ln({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}},Yf=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}},D_=class{enabled;constructor(e){this.enabled=e.enabled}},T_=class extends D_{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},Kf=class{productQuantity;constructor(e){e??={},this.productQuantity=new T_(e.productQuantity)}},cs=class{s;g;i;constructor(e){e.s&&(this.s=new Ot(e.s)),e.g&&(this.g=new Cl(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},Sl="a-f\\d",R2=`#?[${Sl}]{3}[${Sl}]?`,A2=`#?[${Sl}]{6}([${Sl}]{2})?`,M2=new RegExp(`[^#${Sl}]`,"gi"),O2=new RegExp(`^${R2}$|^${A2}$`,"i");function x_(e,t={}){if(typeof e!="string"||M2.test(e)||!O2.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let r=Number.parseInt(e,16),i=r>>16,o=r>>8&255,s=r&255,a=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[i,o,s,a];if(t.format==="css"){let l=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${o} ${s}${l})`}return{red:i,green:o,blue:s,alpha:a}}var Ot=class{h;a=100;g;constructor(e){e??={},this.h=e.h,this.a=e.a,this.g=e.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return x_(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},ls=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Ot(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return fT[this.s??1]}},fT=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(fT||{}),Cl=class V0{static DEFAULT_FALLBACK=new Ot({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new Ot(t.c)),t.fb&&(this.fb=new Ot(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??V0.DEFAULT_FALLBACK}},Il=class{blur;spr;clr;x;y;constructor(e){e=e??{},this.blur=e.blur??0,this.spr=e.spr??0,this.x=e.x??0,this.y=e.y??0,this.clr=new Ot(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},Mi=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(e){e=e??{},this.pl=e.pl??0,this.pr=e.pr??0,this.pt=e.pt??0,this.pb=e.pb??0,this.ml=e.ml??0,this.mr=e.mr??0,this.mt=e.mt??0,this.mb=e.mb??0,this.cent=e.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},us=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},Jn=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new cs(e.bg)),e.br&&(this.br=new ls(e.br)),e.shd&&(this.shd=new Il(e.shd)),e.spc&&(this.spc=new Mi(e.spc)),this.trf=new us(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Nt[this.t]}get click(){return this.clc}},Nt=(e=>(e[e.IMAGE=1]="IMAGE",e[e.TEXT=2]="TEXT",e[e.BUTTON=3]="BUTTON",e[e.FLEXBOX=4]="FLEXBOX",e[e.MULTI_COLUMN=5]="MULTI_COLUMN",e[e.CHECKBOX=6]="CHECKBOX",e[e.PRODUCTS=11]="PRODUCTS",e[e.PRODUCT=12]="PRODUCT",e[e.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",e[e.PRODUCT_TITLE=14]="PRODUCT_TITLE",e[e.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",e[e.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",e[e.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",e[e.PRODUCT_RATING=19]="PRODUCT_RATING",e[e.EMAIL_INPUT=51]="EMAIL_INPUT",e[e.PHONE_INPUT=52]="PHONE_INPUT",e[e.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",e[e.CAROUSEL=62]="CAROUSEL",e[e.SHAPE=100]="SHAPE",e))(Nt||{}),ds=class extends Jn{constructor(e){super(e)}},Oi=class extends Jn{src;constructor(e){super(e),this.src=e.src}},La=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(La||{}),Zf=class{name;fonts;constructor(e){e=e??{},e.name&&(e.name=e.name!=="Arial"?e.name:""),this.name=e.name,this.fonts=e.fonts?.map(t=>new N_(t))}},N_=class{style;url;constructor(e){e=e??{},this.style=e.style,this.url=e.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},bn=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return La[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(e){e=e??{},e.lh&&(this.lh=e.lh),e.tdc&&(this.tdc=new Ot(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Ot(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new Zf(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},oi=class extends Jn{typo;constructor(e){super(e);let t=w(w({},e.f),e.typo);e.alg&&(t.ta=e.alg),e.c&&(t.tc=e.c),this.typo=new bn(t)}get color(){return this.typography.tc}get typography(){return this.typo}},co=class extends oi{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},Xf=class extends Jn{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},Fa=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,t){let n=new Date;e===2?(n.setSeconds(n.getSeconds()+this.ss),n.setMinutes(n.getMinutes()+this.mm),n.setHours(n.getHours()+this.hh),n.setDate(n.getDate()+this.dd)):n=this.date??new Date;let r=window.setInterval(()=>{let i=new Date().getTime(),o=n.getTime()-i;if(o<1){clearInterval(r);return}let s=Math.floor(o/(1e3*60*60*24)),a=Math.floor(o%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(o%(1e3*60*60)/(1e3*60)),c=Math.floor(o%(1e3*60)/1e3);t({days:s,hours:a,minutes:l,seconds:c})},1e3);return r}},Ba=class extends oi{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new Fa(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},Jf=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Ot(e.c??{})}get text(){return this.txt}get color(){return this.c}},lo=class extends oi{ph;constructor(e){super(e),this.ph=new Jf(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},Va=class extends lo{constructor(e){e??={},super(e)}},Ua=class extends lo{},ja=class extends lo{},Ha=class extends Oi{},Qf=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},Dl=class extends Jn{gvt;max;cover;anim;embedded;position;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new Qf(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new Mi({pl:k.IN_APP_DEFAULT_PADDING,pr:k.IN_APP_DEFAULT_PADDING,pt:k.IN_APP_DEFAULT_PADDING,pb:k.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},ep=class extends Dl{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new Xf(e.cont),this.mob=new Dl(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new Oi(t)):t.t===2?this.elems.push(new co(t)):t.t===3?this.elems.push(new co(t)):t.t===100?this.elems.push(new ds(t)):t.t===51?this.elems.push(new Ua(t)):t.t===52?this.elems.push(new ja(t)):t.t===61?this.elems.push(new Ba(t)):t.t===15||t.t===16?this.elems.push(new Va(t)):t.t===13&&this.elems.push(new Ha(t))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},t,n;return this.gvt===1?(t="flex-start",n="flex-start"):this.gvt===2?(t="center",n="flex-start"):this.gvt===3?(t="flex-end",n="flex-start"):this.gvt===4?(t="flex-start",n="center"):this.gvt===6?(t="flex-end",n="center"):this.gvt===7?(t="flex-start",n="flex-end"):this.gvt===8?(t="center",n="flex-end"):this.gvt===9?(t="flex-end",n="flex-end"):(t="center",n="center"),e.alignItems=n,e.justifyContent=t,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},$a=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}},tp=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}},np=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}},rp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new Mi(e.spc),e.size&&(this.size=new np(e.size)),e.bg&&(this.bg=new cs(e.bg)),e.br&&(this.br=new ls(e.br)),e.typo&&(this.typo=new bn(e.typo)),e.lout&&(this.lout=new tp(e.lout)),e.flex&&(this.flex=new $a(e.flex))}},Wa=class{sm;lg;constructor(e){e??={},this.sm=new rp(e.sm),this.lg=new rp(e.lg)}},pn=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new Wa(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return Nt[this.t]}},hn=class extends pn{text;constructor(e,t){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(t??2,e),e??={},this.text=e.text}},fs=class extends hn{constructor(e,t){super(e,t??3)}},Ga=class extends pn{value;constructor(e){super(6,e),e??={},this.value=e.value}},za=class extends hn{constructor(e=15,t){super(t,e)}},ip=class extends pn{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Ot(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},pT=Pe($o()),R_=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Ot(e.color)}},A_=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Ot(e.color)}},Tl=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new A_(e.navigation),this.pagination=new R_(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},op=class extends pn{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=Qn.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Tl(e.conf),this.allowedTypes=e.allowedTypes}},sp=class extends hn{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new Fa(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},uo=class extends pn{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let n=Qn.getParsedElement(t);n&&this.elems.push(n)})}},ps=class extends pn{src;sm;lg;constructor(e,t){super(t??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}},Qn=class H0{static getParsedElements(t){let n=[];return t?.forEach(r=>{let i=H0.getParsedElement(r);i&&n.push(i)}),n}static getParsedElement(t){switch(t.t){case 2:return new hn(t);case 3:return new fs(t);case 6:return new Ga(t);case 11:return new ap(t);case 12:return new fo(t);case 61:return new sp(t);case 4:return new uo(t);case 1:return new ps(t);case 13:return new ps(t,13);case 14:return new hn(t,14);case 15:case 16:return new za(t.t,t);case 18:return new fs(t,18);case 62:return new op(t);case 19:return new ip(t);default:pT.default.error("Unknown element type",t.t);return}}static parseAlignmentToJustifyContent(t){switch(t){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},fo=class extends pn{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=Qn.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new Ga(e.cBox)),this.elems.push(new ps(e.img,13));let t=new hn(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let n=new hn(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let r=new hn(e.compareAt);r.text="{{ product.compare_price }}",r.hide=!e.show?.price,e.compareAt||(r.style=new Wa(n.style),r.style.lg.typo=new bn(ne(w({},r.style.lg.typo),{td:"line-through"})),r.style.sm.typo=new bn(ne(w({},r.style.sm.typo),{td:"line-through"})));let i=new uo({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:Qn.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(r),i.elems.push(n),this.elems.push(i);let o=new za(15,e.variantDD);if(o.hide=!e.show?.variantDD,this.elems.push(o),e.btn){let s=new fs(e.btn,18);s.hide=!e.show?.btn,this.elems.push(s)}}e.symbol&&(this.symbol=new hn(e.symbol))}},ap=class extends pn{conf;prod;constructor(e){super(11,e),e??={},this.conf=new M_(e.conf),this.prod=new fo(e.prod)}},cp=class extends Tl{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},M_=class{lg;sm;constructor(e){e??={},this.lg=new cp(e.lg),this.sm=new cp(e.sm)}},lp=class extends uo{constructor(e){super(e)}},qa=class{cont;elems=[];constructor(e){e=e??{},this.cont=new lp(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=Qn.getParsedElement(e);return t&&this.elems.push(t),t}},hT=Pe(Yn()),O_=class{minValue;rewardType;label;reachingText;reachedText;discount;items;calculatedAlignment;constructor(e){this.minValue=e.minValue,this.rewardType=e.rewardType,this.label=e.label,this.reachingText=e.reachingText,this.reachedText=e.reachedText,this.discount=e.discount,this.items=e.items?.map(t=>new ln(t))}},up=class{layout;milestones;onlyLatestGift;constructor(e){this.layout=e.layout??hT.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new O_(t))??[],this.onlyLatestGift=e.onlyLatestGift}},dp=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},fp=class{id;alt;sources;items;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.items=e.items?e.items.map(t=>new ln(t)):[]}},P_=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(P_||{}),k_=(e=>(e.SWIPER="SWIPER",e.STORY="STORY",e))(k_||{}),pp=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(t=>new fp(t))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}},F_=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===Fn.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===Fn.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===Fn.EngagementContentType.SINGLE}},er=class $0 extends F_{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;discountData=mr({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=Ae.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new qa(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(n=>new ln(n)),this.items=t.items?.map(n=>new Wn(n))??[],this.nonMutableItems=t.items?.map(n=>new Wn(n))??[],this.collections=t.collections?.map(n=>new Yf(n))??[],this.discount=t.discount,this.placement=t.placement,this.customerData=t.customerData,this.ian=t.ian?this.processPopup(t.ian):void 0,this.promotionType=t.promotionType,this.manipulation=new Kf(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,t.progressBarConfig&&(this.progressBarConfig=new up(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new dp(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Wn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new pp(t.content.videoConfig)})}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let t=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-t}isBundle(){return this.objective===Fn.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Fn.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Fn.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===Fn.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===Fn.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===Fn.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===Fn.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isBYOB(){return this.objective===Fn.EngagementObjective.BYOB}isShoppableVideo(){return this.objective===Fn.EngagementObjective.SHOPPABLE_VIDEO}processPopup(t){let n=JSON.stringify(t),r=this.items[0],i={},o={};if(r){let l=r.selectedOrFirstVariant.value;i={name:r.name,id:r.mID,link:r.link,vID:l.mID,image:r.variantImage,price:de.formatCurrency(l.price.d),comparePrice:de.formatCurrency(l.price.cmp),quantity:r.quantity},o={quantity:l.quantity}}let s={productCount:je.getCurrent().item_count},a=fn.render(n,{product:i,variant:o,cart:s,discount:this.discount,customer:this.customerData});return r&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),r.variantImage??r.imageURL)),new ep(JSON.parse(a))}calculateDiscountData(t,n){let r=L_.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.price.d),i={actualPrice:r,discountAmount:0,discountPercentage:0,discountedPrice:r};if(!t?.length||!n||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if(po.DiscountType.BXGY===this.discount.type&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],this.updateEffectivePrice(t,i.discountPercentage,!0),i.discountAmount=i.actualPrice-L_.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.effectivePrice.value);else if([po.DiscountType.UNIQUE_FLAT_ITEMS,po.DiscountType.STATIC].includes(this.discount.type)&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],i.discountAmount=i.actualPrice*i.discountPercentage/100,this.updateEffectivePrice(t,i.discountPercentage);else if(this.discount.type===po.DiscountType.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)i.discountAmount=i.actualPrice-this.discount.values[0],i.discountPercentage=i.discountAmount/i.actualPrice*100,this.updateEffectivePrice(t,i.discountPercentage);else if(this.discount.type===po.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((s,a)=>a.selectedOrFirstVariant.value.price.d-s.selectedOrFirstVariant.value.price.d);let o=t[t.length-1];o.selectedOrFirstVariant.value.effectivePrice.value=0,i.discountAmount=o.selectedOrFirstVariant.value.price.d,i.discountPercentage=i.discountAmount/i.actualPrice*100}i.discountedPrice=i.actualPrice-i.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(i)}getPrivateAttributesForLineItem(){return Dt.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return Dt.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[po.DiscountType.UNIQUE_FIXED_ITEMS,po.DiscountType.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let t=this.widget?.elems.find(r=>$0.SWIPER_ELEMENTS.has(r.t));if(!t)return!1;if(t.t===62)return!0;let n=Zn.get().isMobile()?"sm":"lg";return t.conf[n].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=je.getCurrent();return{productCount:t.item_count,amount:de.formatCurrency(t.total_price/100),originalAmount:de.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,n,r=!1){let i=Ae.get().getCurrentItem();t.forEach(o=>{let s=o.selectedOrFirstVariant.value,a=s.price;if(r&&o.mID===i.mID)s.effectivePrice.value=a.d;else{let l=a.d*n/100;s.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(t){if(!t)return{};let n={discountPercentage:de.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice"].map(r=>{n[r]=de.formatCurrency(t[r])}),n}},Fl=Pe(Yn()),vT=Pe(i_()),_T=Pe(ea()),Ya=class{constructor(e,t){this._startTime=e,this._triggerData=t}intervals=[];selectedEmbeddedItems;renderer;closeCallback;inputFields=[];get startTime(){return this._startTime}get triggerData(){return this._triggerData}get inputs(){return this.inputFields}get rootClassName(){let e=this.triggerData.shortID??this.triggerData.id.slice(-6);return e==="test"&&(e="test-"+this.startTime.getTime().toString()),k.IN_APP_WRAPPER_NAME+"-"+e}get selectedItems(){return this.triggerData.items.filter(e=>e.selected.value)}get shouldGiveFBTDiscount(){let e=this.selectedItems.length;return this.triggerData.bundleConfig?.applyDiscountOnMinimum?this.triggerData.bundleConfig.applyDiscountOnMinimum<=e:e===this.triggerData.items.length}onClose(e){this.closeCallback=e}closeInApp(e,t){t??={};let n=(new Date().getTime()-this.startTime.getTime())/1e3,r=w({eventName:e,duration:n},t);this.stopIntervals(),this.closeCallback&&this.closeCallback(r)}addInputField(e,t){this.inputFields.push({id:e,type:t,isValid:!1})}updateValidation(e,t){this.inputFields.forEach(n=>{if(n.id===e){n.isValid=t;return}})}hasManipulatedProductQuantity(){let e=this.triggerData.manipulation.productQuantity;return e?.enabled&&e.min!=null&&e.max!=null}getManipulatedQuantity(e){let{min:t=1,max:n=100}=this.triggerData.manipulation.productQuantity;if(t>n)return S.error("Invalid range: min should be less than or equal to max."),e;if(e>=t&&e<=n)return e;let r=e%100;return r<t?t:r>n?n:r}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}},ET=Pe($o()),mT=Pe(Xv()),hs=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return ht.isShopify()}},k2=(0,mT.default)(fetch),L2={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(e,t,n)=>e>=k.API_CALL_MAX_ATTEMPTS?!1:!!(t!==null||n?.status&&n?.status>=500)},Nn=class z0{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new z0),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async n=>{S.log("Updated user profile"),await ms.getInstance().storeAndPopulateAuthData(n)}).catch(n=>{S.error("Error saving user profile",n)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{S.log("Sent Order")}).catch(n=>{S.error("Error sending track order",n)})}generateDiscount(t){return this.post("/v1/event/generate-discount",t)}updateDeviceProps(t){this.put("/v1/device/update",t).then(()=>{S.log("Updated device property")}).catch(async n=>{S.error("Error saving device property",n)})}setAPIToken(t){this.apiToken=t??""}setFirstSeen(t){this.firstSeen=t?.toUTCString()??""}get(t){return this.requestBackend("GET",t)}post(t,n){return this.requestBackend("POST",t,n)}put(t,n){return this.requestBackend("PUT",t,n)}async requestBackend(t,n,r){if(!hs.isECommerceApp()&&!hs.getFlags().allowEvents)return S.log(`Rejecting ${t} ${n} as this is not e-commerce app`),Promise.reject();n.startsWith("http")||(n=Dn.apiURL+n);let i=this.getDefaultHeaders(),o="keepalive"in new Request("");if(r&&!o&&JSON.stringify(r).includes("CE App Background"))try{return this.performXMLHttpRequest(n,i,r)}catch(a){return _t.getInstance().captureException(a,{body:JSON.stringify(r)}),{}}let s={method:t,headers:i,keepalive:!0};return r&&(s.body=JSON.stringify(r)),this.request(n,s)}async request(t,n){let r=w(w({},L2),n),i=await k2(t,r);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(t,n,r){return new Promise((i,o)=>{let s=new XMLHttpRequest;s.open("POST",t,!0),n.forEach((a,l)=>{s.setRequestHeader(l,a)}),s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE)if(s.status>=200&&s.status<300)try{s.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(s.responseText)):o(new Error("Content-Type of response header is not json"))}catch(a){o(a)}else o(new Error(`Received status - ${s.status}(${s.statusText})`))},s.onerror=()=>{o(new Error("Network error occurred during the request."))},s.send(JSON.stringify(r))})}getDefaultHeaders(){let t=new Headers;return t.set("content-type","application/json"),t.set("cooee-sdk",k.SDK),t.set("cooee-sdk-code",k.SDK_VERSION_CODE.toString()),t.set("cooee-sdk-version",k.SDK_VERSION),t.set("cooee-first-seen",this.firstSeen),this.apiToken&&t.append("cooee-sdk-token",this.apiToken),Dn.debug&&t.set("cooee-sdk-debug",String(1)),t}},Ka=class{static sentryService=_t.getInstance();static httpApiService=Nn.getInstance();static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await je.getCurrent().getNormalisedCart()).items.map(o=>o.mID);e.items=e.items.filter(o=>!i.includes(o.mID))}if(Dt.get().currencyCount<=1)return e.items;let t=e.items.length,n=e.items.map(i=>this.updatedItem(i,e.engagementID)),r=(await Promise.all(n)).filter(i=>i!=null);if(t&&!r.length){let i="Failed to fetch any product from Ajax API",o=new Ye(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Le.getInstance().sendEvent(o),new Error(i)}if(e.isCartRecovery()){let i=je.getCurrent().items,o=[];for(let s of r)for(let a of s.vars){if(!a.isAvailable)continue;let l=i.find(h=>h.variant_id.toString()===a.mID);if(!l)continue;let c=new Wn(s);c.name=l.title;let d=new ii(a);d.name=l.variant_title,d.price.d=l.discounted_price/100,c.variants=[d],o.push(c)}return o}return r}static async updatedItem(e,t){let n=e,r,i=ht.getRootPrefix()+`products/${n.slug}.js`;try{r=await this.httpApiService.request(i)}catch(s){return S.error(`Failed to fetch ${i}`,s),s instanceof Response?this.sentryService.captureMessage(`Shopify product fetch failed ${s.status}`,"error",{item:n,path:i},{"engagement.id":t}):this.sentryService.captureException(s,{item:n,path:i},{"engagement.id":t}),null}if(!r)return S.error("Item not found after AJAX call for:",n),null;n.name=r.title;let o=n.selectedOrFirstVariant.value;return n.vars.map(s=>{let a=r.variants.find(l=>l.id===+s.mID);s.name=a.title,s.isAvailable=a.available,s.price.d=a.price?a.price/100:a.price,s.price.effective=s.price.d,s.price.cmp=a.compare_at_price?a.compare_at_price/100:a.compare_at_price,+o.mID===a.id&&(o.effectivePrice.value=s.price.d)}),n}},Za=class{constructor(e){this.scalingFactor=e}getLayoutStyles(e){if(!e)return{display:"block"};let t={display:e.disp};return e.of&&(t.objectFit=e.of),e.pos==="absolute"&&(t.width="auto !important",t.position="absolute",t.right=e.right+"px",t.left=e.left+"px",t.top=e.top+"px",t.bottom=e.bottom+"px"),t}getSizeStyles(e){let t={};return e?.w&&(t.width=e.w),e?.h&&(t.height=e.h),e?.maxW&&(t.maxWidth=e.maxW),e?.maxH&&(t.maxHeight=e.maxH),e?.minW&&(t.minWidth=e.minW),e?.minH&&(t.minHeight=e.minH),t}getBorderStyles(e){if(!e)return{};let t={};return e.radius&&e.radius>0&&(t.borderRadius=this.getSizePx(e.radius)),e.width&&e.width>0&&(t.borderWidth=this.getSizePx(e.width),t.borderStyle=e.style?.toLowerCase(),e.color?this.getColourStyles(e.color,"border-color",t):t.borderColor="black"),t}getFlexStyles(e){return e?{gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai,width:"100%"}:{}}getSpaceStyles(e){let t={};return e?(t.paddingTop=this.getSizePx(e.pt),t.paddingBottom=this.getSizePx(e.pb),t.paddingLeft=this.getSizePx(e.pl),t.paddingRight=this.getSizePx(e.pr),t.marginTop=this.getSizePx(e.mt),t.marginBottom=this.getSizePx(e.mb),t.marginLeft=e.cent?"auto":this.getSizePx(e.ml),t.marginRight=e.cent?"auto":this.getSizePx(e.mr),t):(t.margin="0 !important",t.padding="unset",t)}getBackgroundStyles(e){if(!e)return{};let t={};if(e.glossy){let n="backdrop-filter",r="-webkit-"+n,i=`blur(${e.glossy.radius}px)`;if(!CSS.supports(r,i)&&!CSS.supports(n,i))return{background:e.glossy.fallback.rgba};if(t[r]=i,t[n]=i,e.glossy.color)return this.getColourStyles(e.glossy.color,"background",t)}else if(e.solid){if(e.solid.grad)return this.getGradientStyles(e.solid.grad,"background",t);if(e.solid.hex)return{backgroundColor:e.solid.rgba}}else if(e.img){if(!e.img.src)return{};let n=(e.img.a??0)/100;t.background=`linear-gradient(rgba(0, 0, 0, ${n}), rgba(0, 0, 0, ${n})),url("${e.img.src}") no-repeat center`,t.backgroundSize="cover",e.img.a&&(t["-webkit-backdrop-filter"]=`opacity(${e.img.a})`,t.backdropFilter=`opacity(${e.img.a})`)}return t}getGradientStyles(e,t,n){if(n??={},e.type==="LINEAR"){let r=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(r+=`, ${e.c3}`),r+=")",n[t]=r}return n}getColourStyles(e,t="color",n){return n??={},e?e.grad?this.getGradientStyles(e.grad,t,n):(e.hex&&(n[t]=e.rgba),n):n}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}},mt=class extends ni{stylesConverter=new Za(1);renderer=Zn.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new ho(this.props.triggerContext,this.props.element)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(ne(w(w(w(w(w(w({},this.stylesConverter.getFlexStyles(this.mediaStyle.flex)),this.stylesConverter.getBackgroundStyles(this.mediaStyle.bg)),this.stylesConverter.getBorderStyles(this.mediaStyle.br)),this.stylesConverter.getSizeStyles(this.mediaStyle.size)),this.stylesConverter.getSpaceStyles(this.mediaStyle.spc)),this.stylesConverter.getLayoutStyles(this.mediaStyle.lout)),{boxSizing:"border-box",outline:"none"}),this.getComponentStyles()),this.props.style)}matchWhenCondition(e){if(!e?.op)return!0;let{lhs:t,rhs:n}=e;switch(e.op){case"eq":return t===n;case"gt":return+t>+n;case"gte":return+t>=+n;case"lt":return+t<+n;case"lte":return+t<=+n;case"ne":return t!==n;case"null":return t==null;case"empty":return t.trim()==="";default:return S.error(`Invalid operator found for when condition - ${e.op}`),!1}}putStyleAccordingToDevice(){let e=this.props.element;this.mediaStyle=e.style.lg,this.renderer.isMobile()&&e.style.sm&&Object.keys(e.style.sm).length&&(this.mediaStyle=w(w({},this.mediaStyle),e.style.sm))}sendTriggerClicked(e,t){this.clickExecutor.sendTriggerClicked(e,t)}async onClick(e){await this.clickExecutor.execute(e)}},F2=0,dne=Array.isArray;function W(e,t,n,r,i,o){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--F2,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return nt.vnode&&nt.vnode(c),c}var tr=class extends mt{componentDidMount(){this.setState(()=>({text:this.props.element.text})),wn(this.onChange.bind(this))}componentWillReceiveProps(e){this.props.element=e.element,this.onChange()}render(){let e=this.getCompiledStyles(),t=this.state.text;return t||(e.display="none",t=""),W("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:W("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:t}})})}customOnClick(){this.props.onClick&&this.props.onClick("title")}onChange(){if(this.props.element.text==null)return;let e=this.props.triggerContext.triggerData,t={bundle:e.discountData.value,customer:e.customerData,cart:e.getCartMagicVariables()},n=fn.render(JSON.stringify(this.props.element),t),r=new hn(JSON.parse(n));if(!this.matchWhenCondition(r.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:r.text}))}getTypoStyles(){let e={},t=this.mediaStyle.typo??new bn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily=t.fam.name||"inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,e.textDecoration=t.td??"none",this.stylesConverter.getColourStyles(t.tc,"color",e),e}getComponentStyles(){return w({},this.getTypoStyles())}getSpanStyle(){return{overflow:"hidden",display:"-webkit-box",webkitBoxOrient:"vertical",webkitLineClamp:2,color:"inherit",fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit"}}},gs=class extends tr{render(){return W("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:()=>this.onClick({item:this.props.item}),children:W("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return ne(w({},super.getComponentStyles()),{cursor:"pointer"})}},B_=class extends ni{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?W("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[W("span",{children:this.props.time}),W("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):W("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[W("span",{style:this.getTimeLabelStyle(),children:this.props.label}),W("span",{children:this.props.time})]})}getDesign(){}getTimeLabelStyle(){return{fontSize:"0.5em",alignContent:"center"}}getElementStyle(){let e={display:"flex",flexDirection:"column",placeContent:"center center",textAlign:"center"};return this.props.element.horizontal&&(e.gridTemplateColumns="repeat(2, minmax(0, 1fr))"),e}},xl=class extends tr{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return W("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>W(B_,{styles:this.getCompiledStyles(),label:e,time:this.state[e],element:this.props.element}))})}getLabelsParentStyle(){return{display:"grid",justifyContent:"center",gridTemplateColumns:"repeat(4, auto)",gap:this.stylesConverter.getSizePx(this.props.element.gap)}}getDisplayStyles(){return{display:"grid",placeContent:"center center"}}getComponentStyles(){return w(w({},super.getComponentStyles()),this.getDisplayStyles())}processAndStartTimer(){this.props.element.timer.start(this.props.element.timerType,e=>{this.labels.Days=String(e.days).padStart(2,"0"),this.labels.Hours=String(e.hours).padStart(2,"0"),this.labels.Minutes=String(e.minutes).padStart(2,"0"),this.labels.Seconds=String(e.seconds).padStart(2,"0"),this.setState(()=>w({},this.labels))})}},Nl=class extends mt{componentDidMount(){wn(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return W("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:W("input",{type:"checkbox",checked:this.state.checked,onChange:this.onChange.bind(this),style:{appearance:"auto"}})})}onChange(e){let{checked:t}=e.target;this.props.item.selected.value=t}getTypoStyles(){let e={},t=this.mediaStyle.typo??new bn;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return ne(w({},this.getTypoStyles()),{display:"flex"})}},Pi=class extends mt{constructor(e,t){super(e,t)}render(){let e=this.props.element[this.deviceTypeKey],t=e?.src||this.props.element.src||this.props.element.lg?.src;return W("img",{onClick:this.customOnClick.bind(this),className:"lc-image",alt:e?.name||"Image",onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),src:t,style:this.getCompiledStyles()})}customOnClick(){this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex};return this.mediaStyle.size?.w&&(t.width=this.mediaStyle.size.w),this.mediaStyle.size?.h&&(t.height=this.mediaStyle.size.h),t}handleMouseEnter(e){let t=this.props.element[this.deviceTypeKey]?.secondarySrc;t&&(e.currentTarget.src=t)}handleMouseLeave(e){e.currentTarget.src=this.props.element[this.deviceTypeKey]?.src}},ki=class extends mt{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return W("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:W(mo,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new $a,t={display:"flex",gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai};return e.wrap==="nowrap"&&e.scroll&&(e.dir==="column"?t["overflow-y"]="auto":t["overflow-x"]="auto"),t}},Rl=class extends ki{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return W("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:W(Xa,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},Al=class extends mt{render(){return W("select",{style:this.getCompiledStyles(),value:this.props.selectedVariant.selectedSellingPlan.value?.mID??"",onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){wn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new bn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.selectedVariant.sellingPlans?.length||(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[],t=this.props.selectedVariant;if(!t.sellingPlans?.length)return[];this.props.triggerContext.triggerData.skipSubscribedItems?t.selectedSellingPlan.value||(t.sellingPlans[0].isSelected=!0,t.changeSellingPlan(t.sellingPlans[0])):e.push(W("option",{value:"",selected:!t.selectedSellingPlan,children:"One time purchase"}));for(let n of t.sellingPlans??[])e.push(W("option",{value:n.mID,selected:n.isSelected,children:n.name}));return e}onChange(e){let t=e.target.value;t?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(n=>n.mID===t):this.props.selectedVariant.selectedSellingPlan.value=void 0}},gT=Pe(lf()),Ml=class extends mt{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),fn.escape=gT.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),t=this.getRating();return t||(e.display="none",t=""),W("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:t}})}getRating(){let e=this.props.element.fullStar,t=this.props.element.halfStart,n={size:this.props.element.iconSize,color:this.props.element.c.hex};e=fn.render(e,{svg:n}),t=fn.render(t,{svg:n});let r=this.props.review;if(!r?.rating)return"";let i="";if(this.props.element.showSingleStar)i=e;else{let o=5,s=`${r.rating}`.split(".");for(let a=0;a<+s[0];a++)i+=e,o--;s[1]&&(i+=t,o--);for(let a=0;a<o;a++)i+=e.replace(this.colorRegex,'fill="#f1f1f1')}return i}getComponentStyles(){return{display:"flex",alignItems:"center"}}},Ol=class extends mt{render(){return W("select",{style:this.getCompiledStyles(),value:this.props.item.selectedOrFirstVariant.value.mID,onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){wn(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new bn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"&&(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[];for(let t of this.props.item.vars)e.push(W("option",{value:t.mID,disabled:!t.isAvailable,children:t.name}));return e}onChange(e){let t=e.target.value;this.props.item.selectedOrFirstVariant.value=this.props.item.vars.find(n=>n.mID===t)}},Xa=class extends mt{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}renderElement(e){if(!(e.hide||!this.matchWhenCondition(e.when))){if(e.t===4){let t=e;return W(Rl,{element:t,triggerContext:this.props.triggerContext,elements:t.elems,item:this.props.item,noLinks:this.props.noLinks})}if(e.t===6)return this.props.triggerContext.triggerData.isBundle()?W(Nl,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let t=e,n=this.props.item,r=n.variantImage??n.imageURL,i=n.variantSecondaryImage??n.secondaryImageURL;t.lg=t.sm={src:r,name:n.name,secondarySrc:i};let o=W(Pi,{element:t,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?o:W("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block"},children:o})}if(e.t===14)return this.renderProductTitle(e);if(e.t===15){let t=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:W(Ol,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?W(Al,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?W(Ml,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?W(gs,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):W(mo,{elements:[e],element:this.props.element,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}renderProductTitle(e){let t=W(tr,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?t:W("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block",textDecoration:this.state.decoration},onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),children:t})}customOnClick(e){this.sendTriggerClicked([this.props.item.toEmbed()],{from:e})}onMouseEnter(){this.setState(()=>({decoration:"underline"}))}onMouseLeave(){this.setState(()=>({decoration:"unset"}))}},yT=Pe(Mf()),ys=class extends mt{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=fn.render(e,this.getProductData());if(this.productElement=new fo(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return W("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:W(Xa,{element:this.productElement,elements:this.productElement.elems,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.productElement.noLinks})})}getComponentStyles(){return{flexShrink:0}}getProductData(){if(!this.props.item)return{};let e=this.props.item.selectedOrFirstVariant.value,t=e.price,n=this.props.item.name,r=this.props.item.category,i=de.formatCurrency(t.d,!0),o=this.props.item.variantImage??this.props.item.imageURL,s=this.props.item.meta,a=this.props.item.reviews?.rating,l=this.props.item.reviews?.totalReviews,c=t.cmp&&t.cmp>t.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,h={name:n,price:i,quantity:d,image_url:o,meta:s,category:r,rating:a,reviews:l},f=e.effectivePrice.value!==t.d;f&&(h.effective_price=de.formatCurrency(e.effectivePrice.value));let g=this.props.triggerContext.triggerData.discount.type===yT.DiscountType.BXGY;if(!f&&g&&(h.effective_price=de.formatCurrency(e.effectivePrice.value),h.price=""),c){h.compare_price=de.formatCurrency(t.cmp);let b=t.cmp-t.d;h.discount_percent=(b/t.cmp*100).toFixed(0),h.discount_price=de.formatCurrency(b)}let m={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:h,variant:m,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function hp(){return new Promise(e=>{let t="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(r=>r.src.includes(t))){e();return}let n=document.createElement("script");n.src=t,n.onload=()=>{e()},document.body.appendChild(n)})}function mp(e,t){if(!e||!window.Swiper)return;let n=new window.Swiper(e,{loop:!0,slidesPerView:t.maxInRow,spaceBetween:t.gap+"px",pagination:{type:t.pagination.type,el:e.querySelector(".swiper-pagination"),clickable:!0,renderBullet:(r,i)=>`
47
47
  <span class="${i}"
48
- style="background-color: ${e.pagination.color?.rgba};"></span>
48
+ style="background-color: ${t.pagination.color?.rgba};"></span>
49
49
  `,renderProgressbar:r=>`
50
50
  <span class="${r}"
51
- style="background-color: ${e.pagination.color?.rgba};">
51
+ style="background-color: ${t.pagination.color?.rgba};">
52
52
  </span>
53
- `},navigation:{nextEl:t.querySelector(".swiper-button-next"),prevEl:t.querySelector(".swiper-button-prev")},autoplay:e.autoplay?.enabled?{delay:e.autoplay?.delay,disableOnInteraction:!1}:!1,autoHeight:!0});return t.style.setProperty("--swiper-navigation-size",`${e.navigation.size}px`),n}function gp(t,e,n){let r={color:t.navigation.color?.rgba};return t.pagination.enabled&&(r.transform="translateY(-25%)"),W("div",{class:"swiper-container",ref:e,children:[W("div",{class:"swiper-wrapper",children:n()}),t.navigation.enabled&&W("div",{class:"swiper-button-next",style:r,children:W("span",{})}),t.navigation.enabled&&W("div",{class:"swiper-button-prev",style:r,children:W("span",{})}),t.pagination.enabled&&W("div",{className:"swiper-pagination",style:{bottom:0,top:"unset",position:"relative",color:t.pagination.color?.rgba}})]})}var Pl=class extends mt{swiperRef=null;swiperInstance=null;configuration;gap;constructor(e,n){super(e,n),this.configuration=this.renderer.isMobile()?this.props.element.conf.sm:this.props.element.conf.lg,this.gap=(this.configuration.gap??15)+"px"}componentDidMount(){this.props.element.conf[this.deviceTypeKey].disp===2&&hp().then(()=>{this.swiperInstance=mp(this.swiperRef,this.props.element.conf[this.deviceTypeKey])})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.triggerContext.triggerData.items;e.splice(this.configuration.maxItems??10);let n;if(this.configuration.disp===2){let r=o=>{this.swiperRef=o},i=()=>e?.map(o=>W("div",{class:"swiper-slide",children:this.getProductFragment(o)}));n=W("div",{style:ne(w({},this.getCompiledStyles()),{display:"block"}),class:"lc-product-swiper-list",children:gp(this.configuration,r,i)})}else n=W("div",{style:this.getCompiledStyles(),class:"lc-product-list",children:e?.map((r,i)=>this.getProductFragment(r,i!==e.length-1))});return n}getComponentStyles(){let e=[0,2].includes(this.configuration.disp),n={display:e?"flex":"grid",justifyContent:"safe "+(this.mediaStyle.flex?.jc??"center"),gap:this.gap,flexDirection:this.mediaStyle.flex?.dir??"row"};if(n.flexDirection==="row"){if(e)n.maxWidth="100%",n.overflowY="auto";else if(this.configuration.disp===1){let r=this.props.triggerContext.triggerData,i=r.items.length,o;r.isBundle()?o=this.props.element.prod.symbol?.hide!==!0?i*2-1:i:o=this.props.element.conf[this.deviceTypeKey].maxInRow,n.gridTemplateColumns=`repeat(${o}, auto)`}}return n}getProductFragment(e,n=!1){return W(ri,{children:[W(ys,{element:this.props.element.prod,item:e,triggerContext:this.props.triggerContext}),this.props.triggerContext.triggerData.isBundle()&&n&&this.props.element.prod.symbol&&!this.props.element.prod.symbol.hide&&W("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:W(tr,{element:this.props.element.prod.symbol,triggerContext:this.props.triggerContext})})]},e.mID)}};var kl=class extends mt{swiperRef=null;swiperInstance=null;constructor(e,n){super(e,n)}componentDidMount(){hp().then(()=>{this.swiperInstance=mp(this.swiperRef,this.props.element.conf)})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.element,n=i=>{this.swiperRef=i},r=()=>e.values?.map(i=>W("div",{class:"swiper-slide",onClick:()=>this.onClick({clickAction:this.getClickAction(i)}),children:this.renderElement(i)}));return gp(e.conf,n,r)}getComponentStyles(){return{}}renderElement(e){let n=this.valueAddedSlide(this.props.element.slide,e);switch(n?.t){case 1:return W(Pi,{element:n,triggerContext:this.props.triggerContext});case 4:return W(ki,{elements:n.elems,element:n,triggerContext:this.props.triggerContext});default:S.warn("Unknown slide type for carousal")}}valueAddedSlide(e,n){let r=JSON.stringify(e),i=fn.render(r,{form:n});return Qn.getParsedElement(JSON.parse(i))}getClickAction(e){let n=w({},this.props.element.clc),r=JSON.stringify(n),i=fn.render(r,{form:e});return JSON.parse(i)}};var mo=class extends mt{constructor(e,n){super(e,n),this.setState(()=>({decoration:"unset"})),wn(()=>{this.setState(()=>({showButton:!this.props.triggerContext.triggerData.isBundle()||!!this.props.triggerContext.selectedItems.length}))})}renderElement(e){if(!e.hide){if(e.t===4){let n=e;return W(ki,{element:n,triggerContext:this.props.triggerContext,elements:n.elems})}if(e.t===61)return W(xl,{element:e,triggerContext:this.props.triggerContext});if(e.t===3)return this.state.showButton?W(gs,{element:e,triggerContext:this.props.triggerContext}):void 0;if(e.t===2)return W(tr,{element:e,triggerContext:this.props.triggerContext});if(e.t===1)return W(Pi,{element:e,triggerContext:this.props.triggerContext});if(e.t===11)return W(Pl,{element:e,triggerContext:this.props.triggerContext});if(e.t===12)return W(ys,{element:e,item:this.props.triggerContext.triggerData.items[0],triggerContext:this.props.triggerContext});if(e.t===62)return W(kl,{element:e,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}};var Ll=class extends mt{clickAction;isClickable;constructor(e,n){super(e,n),this.clickAction=this.props.element.clc,this.isClickable=this.clickAction?.at===4&&this.clickAction.gu?.u}componentDidMount(){wn(()=>{let e=this.props.triggerContext.triggerData,n=this.props.triggerContext.selectedItems;e.calculateDiscountData(n,this.props.triggerContext.shouldGiveFBTDiscount)})}render(){return W(ri,{children:[W("div",{style:this.getCompiledStyles(),class:"lc-container",onClick:()=>{this.onClick({clickAction:this.clickAction})},children:W(mo,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})}),this.props.triggerContext.triggerData.id==="preview"&&W("div",{class:"letscooee-preview-badge",children:["#",this.props.triggerContext.triggerData.shortID," preview"]})]})}getComponentStyles(){let e={position:"relative",overflow:"hidden",display:"block"};return this.isClickable&&(e.cursor="pointer"),e}async onClick(e){if(this.isClickable)return super.onClick(e)}};var Gn=class t{constructor(e){this.engagementTrigger=e;this.triggerContext=new Ya(new Date,this.engagementTrigger)}static renderedEngagements=[];static engagementIDsWithTrackedDisplay=new Set;static DEBOUNCE_TIME=1e3;rootContainer;widgetElement;widget;triggerContext;observers=[];runtimeData=Ae.get();widgetAPIService=ke.get(Ar);safeHTTPService=ke.get(Le);scrollSubscription;variation;isExclusionWithBVariation;renderSilently(){this.render().catch(e=>_t.getInstance().captureException(e,w({},this.engagementTrigger.sentryContext())))}destroy(){S.log(`${this.engagementTrigger} will be destroyed`),this.scrollSubscription?.unsubscribe(),this.observers.forEach(e=>{e?.disconnect&&e.disconnect()}),this.rootContainer?.remove(),t.engagementIDsWithTrackedDisplay.delete(this.engagementTrigger.shortID)}async render(){if(this.engagementTrigger.hasMultiplePlacement){let e=await this.getVariation();this.handleVariationResponse(e)}if(this.rootContainer=await this.getWidgetContainer(!0),!this.rootContainer){S.warn(`${this.engagementTrigger} no section found to render the widget`);return}this.widget=this.engagementTrigger.widget,await this.getVariationIfRequired(),!this.shouldStopRendering()&&(await this.startRendering(),this.attachScroll(),await this.checkAndSendEvent(),this.triggerContext.renderer=this)}isSameTrigger(e){return this.engagementTrigger.shortID===e.shortID}update(e){ET.default.log(`${this.engagementTrigger} will be updated`),this.updateItems(e.items,this.engagementTrigger.items)}shouldStopRendering(){return!this.widget&&!this.isExclusionWithBVariation}async getVariationIfRequired(){if(this.engagementTrigger.isSingleContent()||this.engagementTrigger.widget){S.log(`${this.engagementTrigger} already has required data to render widget`);return}let e=await this.observeWidgetContainerInViewport();this.handleVariationResponse(e)}handleVariationResponse(e){e&&(S.log(`${this.engagementTrigger} visitor has been assigned to variation ${e.variation}`),e.items?.length&&(this.engagementTrigger.items=e.items.map(n=>new Wn(n)),this.engagementTrigger.nonMutableItems=e.items.map(n=>new Wn(n))),e.bundleFrom&&(this.engagementTrigger.bundleFrom=new Wn(e.bundleFrom)),e.discount&&(this.engagementTrigger.discount=e.discount),e.placement&&(this.triggerContext.triggerData.placement=e.placement),e.props&&_T.JSUtils.hasKeys(e.props)&&(this.engagementTrigger.props=w(w({},this.engagementTrigger.props),e.props)),this.triggerContext.triggerData.widget=this.widget=new qa(e.widget),this.triggerContext.triggerData.contentID=e.contentID,this.triggerContext.triggerData.variation=this.variation=e.variation,this.triggerContext.triggerData.placement=e.placement,this.triggerContext.triggerData.manipulation=e.manipulation,this.isExclusionWithBVariation=this.engagementTrigger.isExclusionTesting()&&this.variation==="b",this.isExclusionWithBVariation&&(this.rootContainer.style.height="0.5px"))}addToRendered(){t.renderedEngagements.push(this)}async getVariation(){S.log(`${this.engagementTrigger} get variation`);let e={engagementID:this.engagementTrigger.engagementID,isPreview:this.engagementTrigger.id==="preview"};try{return await this.widgetAPIService.getVariation(e)}catch(n){S.error(`${this.engagementTrigger} unable to get the variation`,n);return}}async observeWidgetContainerInViewport(){if(!this.rootContainer){S.warn(`${this.engagementTrigger} No root container found to watch for viewport`);return}let e=window.innerHeight*.3,n={root:null,rootMargin:`-${e}px 0px ${e}px 0px`,threshold:0};return await this.isInViewport()?this.getVariation():new Promise(r=>{let i=new IntersectionObserver((o,s)=>{o.forEach(async a=>{if(a.isIntersecting){S.log(`${this.engagementTrigger} root container is near the viewport. Fetching variation`);let c=await this.getVariation();r(c),s.unobserve(this.rootContainer)}})},n);i.observe(this.rootContainer),this.observers.push(i)})}attachScroll(){this.scrollSubscription=Io(window,"scroll").pipe(vr(t.DEBOUNCE_TIME)).subscribe(()=>{this.checkAndSendEvent()})}async checkAndSendEvent(){let e=this.engagementTrigger.shortID;if(t.engagementIDsWithTrackedDisplay.has(e)||!await this.isInViewport())return;let r={};this.triggerContext.triggerData.items?.length&&(r.promotedMIDs=this.engagementTrigger.items?.map(s=>s.mID));let i=this.isExclusionWithBVariation?k.EVENT_CAMPAIGN_HOLDOUT:k.EVENT_TRIGGER_DISPLAYED,o=new Ye(i,r,this.engagementTrigger);o.name===k.EVENT_CAMPAIGN_HOLDOUT&&(o.trigger.holdout=!0),this.safeHTTPService.sendEvent(o),t.engagementIDsWithTrackedDisplay.add(e),this.scrollSubscription.unsubscribe()}generateParentElementID(){return`letscooee-${this.engagementTrigger.shortID}`}async isInViewport(){let e=(await this.getWidgetContainer())?.getBoundingClientRect();if(!e)return!1;let n=window.innerHeight||document.documentElement.clientHeight,i=(Math.min(e.bottom,n)-Math.max(e.top,0))*e.width,o=e.width*e.height,s=i/o*100;return this.engagementTrigger.isAnySplit()?s>0:s>=30}async getWidgetContainer(e){if(this.rootContainer?.isConnected)return this.rootContainer;let n=await this.createParentElementWithPlacement(e);if(n)return n;let r=`.letscooee[data-engagement-id="${this.triggerContext.triggerData.shortID}"]`;return document.querySelector(r)}async createParentElementWithPlacement(e){let n=this.engagementTrigger.placement;if(!n?.selector)return S.warn(`${this.engagementTrigger} does not have a selector`),null;let r=n.selector,i;if(r.includes(k.SHADOW_SPLITTER)){let c=r.split(k.SHADOW_SPLITTER);i=(await de.retrySelector(c[0].trim()))?.shadowRoot,r=c[1].trim(),i&&En.injectStylesheet(Dn.styleURL,i);let l=Dt.get().website.commonCSS;i&&l&&En.injectRawCSS(l,i)}S.debug(`${this.engagementTrigger} attempt to render ${n.position}-${r}`);let o=await de.retrySelector(r,10,i??document);if(!o)return S.warn(`${this.engagementTrigger} no placement found with ${r}`),null;let s=this.generateParentElementID(),a=this.getParentElement(s);if(!e)return a;switch(n.position){case Fl.EngagementPlacementPosition.BEFORE:{o.parentElement?.insertBefore(a,o);break}case Fl.EngagementPlacementPosition.INSIDE_FIRST:{o.insertBefore(a,o.firstChild);break}case Fl.EngagementPlacementPosition.INSIDE_LAST:{o.appendChild(a);break}case Fl.EngagementPlacementPosition.AFTER:default:o.parentElement?.insertBefore(a,o.nextSibling)}return a}async startRendering(){let e;try{e=await Ka.refreshItems(this.engagementTrigger)}catch(n){S.error(`${this.engagementTrigger} error refreshing the items`,n);return}if(!e?.length&&this.engagementTrigger.isProductPromoted()){S.warn(`${this.engagementTrigger} is of ${this.engagementTrigger.objective} but no product found`);return}this.engagementTrigger.items=e,this.renderContainer()}getParentElement(e,n=document){let r=n.getElementById(e);if(r)return r;let i=this.engagementTrigger.shortID;return r=document.createElement("div"),r.id=e,r.className=`letscooee letscooee-engagement engagement-${i}`,r.dataset.engagementId=i,this.engagementTrigger.id==="preview"&&(r.className+=" letscooee-preview"),r.style.display="block",r.style.minHeight="0.5px",r.style.minWidth="0.5px",r}renderContainer(){if(!this.widget)return;let e=this.rootContainer;if(this.triggerContext.triggerData.hasSwiperElement()){let r=this.rootContainer?.shadowRoot||this.rootContainer?.attachShadow({mode:"open"}),i=Dt.get().website.commonCSS;i&&En.injectRawCSS(i,r),En.injectStylesheet(Dn.styleURL,r),En.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",r),e=r}KD(f_(Ll,{element:this.widget.cont,triggerContext:this.triggerContext,elements:this.widget.elems}),e),this.addToRendered()}updateItems(e,n){let r=this.getItemDiff(e,n),i=this.getItemDiff(n,e);n.push(...r);for(let o of i)vT.ArrayUtils.remove(n,o)}getItemDiff(e,n){return e.filter(r=>!n.some(i=>i.selectedOrFirstVariant.value.mID===r.selectedOrFirstVariant.value.mID))}};var si=class t extends Gn{static renderedEngagements=[];constructor(e){super(e)}addToRendered(){t.renderedEngagements.push(this)}observeWidgetContainerInViewport(){return this.getVariation()}generateParentElementID(){let e=super.generateParentElementID();return this.engagementTrigger.isSubscriptionUpsell()&&(e+=`-${this.engagementTrigger.items[0].selectedOrFirstVariant.value.mID}`),e}async checkAndSendEvent(){if(!Wt.get().isOpen()&&this.runtimeData.pageName!=="cart"){S.log("Do not send display event as neither the cart drawer nor the cart page is open.");return}return super.checkAndSendEvent()}};var vp=class t{constructor(e,n){this.engagementTrigger=e;this.element=n;this.cartItems=je.getCurrent().items}cartItems;static renderCartUpsell(e){let n=e.placement;if(!n?.selector){S.warn(`No placement available for ${e.objective}`,e.shortID);return}let r=Array.from(document.querySelectorAll(n.selector));if(!r?.length){S.warn(`No placement found for ${e.objective}`,e.shortID);return}for(let i of r)new t(e,i).render()}render(){let e=this.findCartItemFromHTMLElement();if(!e||this.engagementTrigger.skipSubscribedItems&&e.selling_plan_allocation)return;let n=this.engagementTrigger.items.find(u=>u.mID===e.product_id.toString());if(!n)return;let r=n.vars.find(u=>u.mID===e.id.toString());if(!r)return;let i=new ii(r),o=e.selling_plan_allocation?.selling_plan;if(o)for(let u of i.sellingPlans??[])u.mID===o.id.toString()&&(u.isSelected=!0,i.changeSellingPlan(u));let s=new Wn(n);s.vars=[i],s.selectedOrFirstVariant.value=i;let a=`lc-cart-item-${this.engagementTrigger.shortID}-${n.mID}`;this.element.classList.add(a);let c=new er(this.engagementTrigger);c.placement.selector=`.${a}`,c.items=[s];let l=new si(c);l.renderSilently(),this.watchForCartItemDeletion(l,a)}watchForCartItemDeletion(e,n){let r=new MutationObserver(i=>{i.forEach(o=>{o.removedNodes.forEach(s=>{s===this.element&&(S.debug(`${n} has been removed`),e.destroy(),r.disconnect())})})});r.observe(this.element.parentElement,{childList:!0,subtree:!0})}findCartItemFromHTMLElement(){let e=this.element.innerHTML;return this.cartItems.find(n=>{if(!(e.includes(n.url)||e.includes(n.variant_id))&&(!e.includes(n.product_title)||n.variant_title&&!e.includes(n.variant_title)))return!1;let r=n.selling_plan_allocation?.selling_plan?.name;return!(r&&!e.includes(r))})}};var bT=Pe(Yn());var Li=Pe(Yn());var B2=`
53
+ `},navigation:{nextEl:e.querySelector(".swiper-button-next"),prevEl:e.querySelector(".swiper-button-prev")},autoplay:t.autoplay?.enabled?{delay:t.autoplay?.delay,disableOnInteraction:!1}:!1,autoHeight:!0});return e.style.setProperty("--swiper-navigation-size",`${t.navigation.size}px`),n}function gp(e,t,n){let r={color:e.navigation.color?.rgba};return e.pagination.enabled&&(r.transform="translateY(-25%)"),W("div",{class:"swiper-container",ref:t,children:[W("div",{class:"swiper-wrapper",children:n()}),e.navigation.enabled&&W("div",{class:"swiper-button-next",style:r,children:W("span",{})}),e.navigation.enabled&&W("div",{class:"swiper-button-prev",style:r,children:W("span",{})}),e.pagination.enabled&&W("div",{className:"swiper-pagination",style:{bottom:0,top:"unset",position:"relative",color:e.pagination.color?.rgba}})]})}var Pl=class extends mt{swiperRef=null;swiperInstance=null;configuration;gap;constructor(e,t){super(e,t),this.configuration=this.renderer.isMobile()?this.props.element.conf.sm:this.props.element.conf.lg,this.gap=(this.configuration.gap??15)+"px"}componentDidMount(){this.props.element.conf[this.deviceTypeKey].disp===2&&hp().then(()=>{this.swiperInstance=mp(this.swiperRef,this.props.element.conf[this.deviceTypeKey])})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.triggerContext.triggerData.items;e.splice(this.configuration.maxItems??10);let t;if(this.configuration.disp===2){let n=i=>{this.swiperRef=i},r=()=>e?.map(i=>W("div",{class:"swiper-slide",children:this.getProductFragment(i)}));t=W("div",{style:ne(w({},this.getCompiledStyles()),{display:"block"}),class:"lc-product-swiper-list",children:gp(this.configuration,n,r)})}else t=W("div",{style:this.getCompiledStyles(),class:"lc-product-list",children:e?.map((n,r)=>this.getProductFragment(n,r!==e.length-1))});return t}getComponentStyles(){let e=[0,2].includes(this.configuration.disp),t={display:e?"flex":"grid",justifyContent:"safe "+(this.mediaStyle.flex?.jc??"center"),gap:this.gap,flexDirection:this.mediaStyle.flex?.dir??"row"};if(t.flexDirection==="row"){if(e)t.maxWidth="100%",t.overflowY="auto";else if(this.configuration.disp===1){let n=this.props.triggerContext.triggerData,r=n.items.length,i;n.isBundle()?i=this.props.element.prod.symbol?.hide!==!0?r*2-1:r:i=this.props.element.conf[this.deviceTypeKey].maxInRow,t.gridTemplateColumns=`repeat(${i}, auto)`}}return t}getProductFragment(e,t=!1){return W(ri,{children:[W(ys,{element:this.props.element.prod,item:e,triggerContext:this.props.triggerContext}),this.props.triggerContext.triggerData.isBundle()&&t&&this.props.element.prod.symbol&&!this.props.element.prod.symbol.hide&&W("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:W(tr,{element:this.props.element.prod.symbol,triggerContext:this.props.triggerContext})})]},e.mID)}},kl=class extends mt{swiperRef=null;swiperInstance=null;constructor(e,t){super(e,t)}componentDidMount(){hp().then(()=>{this.swiperInstance=mp(this.swiperRef,this.props.element.conf)})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.element,t=r=>{this.swiperRef=r},n=()=>e.values?.map(r=>W("div",{class:"swiper-slide",onClick:()=>this.onClick({clickAction:this.getClickAction(r)}),children:this.renderElement(r)}));return gp(e.conf,t,n)}getComponentStyles(){return{}}renderElement(e){let t=this.valueAddedSlide(this.props.element.slide,e);switch(t?.t){case 1:return W(Pi,{element:t,triggerContext:this.props.triggerContext});case 4:return W(ki,{elements:t.elems,element:t,triggerContext:this.props.triggerContext});default:S.warn("Unknown slide type for carousal")}}valueAddedSlide(e,t){let n=JSON.stringify(e),r=fn.render(n,{form:t});return Qn.getParsedElement(JSON.parse(r))}getClickAction(e){let t=w({},this.props.element.clc),n=JSON.stringify(t),r=fn.render(n,{form:e});return JSON.parse(r)}},mo=class extends mt{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"})),wn(()=>{this.setState(()=>({showButton:!this.props.triggerContext.triggerData.isBundle()||!!this.props.triggerContext.selectedItems.length}))})}renderElement(e){if(!e.hide){if(e.t===4){let t=e;return W(ki,{element:t,triggerContext:this.props.triggerContext,elements:t.elems})}if(e.t===61)return W(xl,{element:e,triggerContext:this.props.triggerContext});if(e.t===3)return this.state.showButton?W(gs,{element:e,triggerContext:this.props.triggerContext}):void 0;if(e.t===2)return W(tr,{element:e,triggerContext:this.props.triggerContext});if(e.t===1)return W(Pi,{element:e,triggerContext:this.props.triggerContext});if(e.t===11)return W(Pl,{element:e,triggerContext:this.props.triggerContext});if(e.t===12)return W(ys,{element:e,item:this.props.triggerContext.triggerData.items[0],triggerContext:this.props.triggerContext});if(e.t===62)return W(kl,{element:e,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}},Ll=class extends mt{clickAction;isClickable;constructor(e,t){super(e,t),this.clickAction=this.props.element.clc,this.isClickable=this.clickAction?.at===4&&this.clickAction.gu?.u}componentDidMount(){wn(()=>{let e=this.props.triggerContext.triggerData,t=this.props.triggerContext.selectedItems;e.calculateDiscountData(t,this.props.triggerContext.shouldGiveFBTDiscount)})}render(){return W(ri,{children:[W("div",{style:this.getCompiledStyles(),class:"lc-container",onClick:()=>{this.onClick({clickAction:this.clickAction})},children:W(mo,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})}),this.props.triggerContext.triggerData.id==="preview"&&W("div",{class:"letscooee-preview-badge",children:["#",this.props.triggerContext.triggerData.shortID," preview"]})]})}getComponentStyles(){let e={position:"relative",overflow:"hidden",display:"block"};return this.isClickable&&(e.cursor="pointer"),e}async onClick(e){if(this.isClickable)return super.onClick(e)}},Gn=class Js{constructor(t){this.engagementTrigger=t,this.triggerContext=new Ya(new Date,this.engagementTrigger)}static renderedEngagements=[];static engagementIDsWithTrackedDisplay=new Set;static DEBOUNCE_TIME=1e3;rootContainer;widgetElement;widget;triggerContext;observers=[];runtimeData=Ae.get();widgetAPIService=ke.get(Ar);safeHTTPService=ke.get(Le);scrollSubscription;variation;isExclusionWithBVariation;renderSilently(){this.render().catch(t=>_t.getInstance().captureException(t,w({},this.engagementTrigger.sentryContext())))}destroy(){S.log(`${this.engagementTrigger} will be destroyed`),this.scrollSubscription?.unsubscribe(),this.observers.forEach(t=>{t?.disconnect&&t.disconnect()}),this.rootContainer?.remove(),Js.engagementIDsWithTrackedDisplay.delete(this.engagementTrigger.shortID)}async render(){if(this.engagementTrigger.hasMultiplePlacement){let t=await this.getVariation();this.handleVariationResponse(t)}if(this.rootContainer=await this.getWidgetContainer(!0),!this.rootContainer){S.warn(`${this.engagementTrigger} no section found to render the widget`);return}this.widget=this.engagementTrigger.widget,await this.getVariationIfRequired(),!this.shouldStopRendering()&&(await this.startRendering(),this.attachScroll(),await this.checkAndSendEvent(),this.triggerContext.renderer=this)}isSameTrigger(t){return this.engagementTrigger.shortID===t.shortID}update(t){ET.default.log(`${this.engagementTrigger} will be updated`),this.updateItems(t.items,this.engagementTrigger.items)}shouldStopRendering(){return!this.widget&&!this.isExclusionWithBVariation}async getVariationIfRequired(){if(this.engagementTrigger.isSingleContent()||this.engagementTrigger.widget){S.log(`${this.engagementTrigger} already has required data to render widget`);return}let t=await this.observeWidgetContainerInViewport();this.handleVariationResponse(t)}handleVariationResponse(t){t&&(S.log(`${this.engagementTrigger} visitor has been assigned to variation ${t.variation}`),t.items?.length&&(this.engagementTrigger.items=t.items.map(n=>new Wn(n)),this.engagementTrigger.nonMutableItems=t.items.map(n=>new Wn(n))),t.bundleFrom&&(this.engagementTrigger.bundleFrom=new Wn(t.bundleFrom)),t.discount&&(this.engagementTrigger.discount=t.discount),t.placement&&(this.triggerContext.triggerData.placement=t.placement),t.props&&_T.JSUtils.hasKeys(t.props)&&(this.engagementTrigger.props=w(w({},this.engagementTrigger.props),t.props)),this.triggerContext.triggerData.widget=this.widget=new qa(t.widget),this.triggerContext.triggerData.contentID=t.contentID,this.triggerContext.triggerData.variation=this.variation=t.variation,this.triggerContext.triggerData.placement=t.placement,this.triggerContext.triggerData.manipulation=t.manipulation,this.isExclusionWithBVariation=this.engagementTrigger.isExclusionTesting()&&this.variation==="b",this.isExclusionWithBVariation&&(this.rootContainer.style.height="0.5px"))}addToRendered(){Js.renderedEngagements.push(this)}async getVariation(){S.log(`${this.engagementTrigger} get variation`);let t={engagementID:this.engagementTrigger.engagementID,isPreview:this.engagementTrigger.id==="preview"};try{return await this.widgetAPIService.getVariation(t)}catch(n){S.error(`${this.engagementTrigger} unable to get the variation`,n);return}}async observeWidgetContainerInViewport(){if(!this.rootContainer){S.warn(`${this.engagementTrigger} No root container found to watch for viewport`);return}let t=window.innerHeight*.3,n={root:null,rootMargin:`-${t}px 0px ${t}px 0px`,threshold:0};return await this.isInViewport()?this.getVariation():new Promise(r=>{let i=new IntersectionObserver((o,s)=>{o.forEach(async a=>{if(a.isIntersecting){S.log(`${this.engagementTrigger} root container is near the viewport. Fetching variation`);let l=await this.getVariation();r(l),s.unobserve(this.rootContainer)}})},n);i.observe(this.rootContainer),this.observers.push(i)})}attachScroll(){this.scrollSubscription=Io(window,"scroll").pipe(vr(Js.DEBOUNCE_TIME)).subscribe(()=>{this.checkAndSendEvent()})}async checkAndSendEvent(){let t=this.engagementTrigger.shortID;if(Js.engagementIDsWithTrackedDisplay.has(t)||!await this.isInViewport())return;let n={};this.triggerContext.triggerData.items?.length&&(n.promotedMIDs=this.engagementTrigger.items?.map(o=>o.mID));let r=this.isExclusionWithBVariation?k.EVENT_CAMPAIGN_HOLDOUT:k.EVENT_TRIGGER_DISPLAYED,i=new Ye(r,n,this.engagementTrigger);i.name===k.EVENT_CAMPAIGN_HOLDOUT&&(i.trigger.holdout=!0),this.safeHTTPService.sendEvent(i),Js.engagementIDsWithTrackedDisplay.add(t),this.scrollSubscription.unsubscribe()}generateParentElementID(){return`letscooee-${this.engagementTrigger.shortID}`}async isInViewport(){let t=(await this.getWidgetContainer())?.getBoundingClientRect();if(!t)return!1;let n=window.innerHeight||document.documentElement.clientHeight,r=(Math.min(t.bottom,n)-Math.max(t.top,0))*t.width,i=t.width*t.height,o=r/i*100;return this.engagementTrigger.isAnySplit()?o>0:o>=30}async getWidgetContainer(t){if(this.rootContainer?.isConnected)return this.rootContainer;let n=await this.createParentElementWithPlacement(t);if(n)return n;let r=`.letscooee[data-engagement-id="${this.triggerContext.triggerData.shortID}"]`;return document.querySelector(r)}async createParentElementWithPlacement(t){let n=this.engagementTrigger.placement;if(!n?.selector)return S.warn(`${this.engagementTrigger} does not have a selector`),null;let r=n.selector,i;if(r.includes(k.SHADOW_SPLITTER)){let l=r.split(k.SHADOW_SPLITTER);i=(await de.retrySelector(l[0].trim()))?.shadowRoot,r=l[1].trim(),i&&En.injectStylesheet(Dn.styleURL,i);let c=Dt.get().website.commonCSS;i&&c&&En.injectRawCSS(c,i)}S.debug(`${this.engagementTrigger} attempt to render ${n.position}-${r}`);let o=await de.retrySelector(r,10,i??document);if(!o)return S.warn(`${this.engagementTrigger} no placement found with ${r}`),null;let s=this.generateParentElementID(),a=this.getParentElement(s);if(!t)return a;switch(n.position){case Fl.EngagementPlacementPosition.BEFORE:{o.parentElement?.insertBefore(a,o);break}case Fl.EngagementPlacementPosition.INSIDE_FIRST:{o.insertBefore(a,o.firstChild);break}case Fl.EngagementPlacementPosition.INSIDE_LAST:{o.appendChild(a);break}case Fl.EngagementPlacementPosition.AFTER:default:o.parentElement?.insertBefore(a,o.nextSibling)}return a}async startRendering(){let t;try{t=await Ka.refreshItems(this.engagementTrigger)}catch(n){S.error(`${this.engagementTrigger} error refreshing the items`,n);return}if(!t?.length&&this.engagementTrigger.isProductPromoted()){S.warn(`${this.engagementTrigger} is of ${this.engagementTrigger.objective} but no product found`);return}this.engagementTrigger.items=t,this.renderContainer()}getParentElement(t,n=document){let r=n.getElementById(t);if(r)return r;let i=this.engagementTrigger.shortID;return r=document.createElement("div"),r.id=t,r.className=`letscooee letscooee-engagement engagement-${i}`,r.dataset.engagementId=i,this.engagementTrigger.id==="preview"&&(r.className+=" letscooee-preview"),r.style.display="block",r.style.minHeight="0.5px",r.style.minWidth="0.5px",r}renderContainer(){if(!this.widget)return;let t=this.rootContainer;if(this.triggerContext.triggerData.hasSwiperElement()){let n=this.rootContainer?.shadowRoot||this.rootContainer?.attachShadow({mode:"open"}),r=Dt.get().website.commonCSS;r&&En.injectRawCSS(r,n),En.injectStylesheet(Dn.styleURL,n),En.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",n),t=n}KD(f_(Ll,{element:this.widget.cont,triggerContext:this.triggerContext,elements:this.widget.elems}),t),this.addToRendered()}updateItems(t,n){let r=this.getItemDiff(t,n),i=this.getItemDiff(n,t);n.push(...r);for(let o of i)vT.ArrayUtils.remove(n,o)}getItemDiff(t,n){return t.filter(r=>!n.some(i=>i.selectedOrFirstVariant.value.mID===r.selectedOrFirstVariant.value.mID))}},si=class W0 extends Gn{static renderedEngagements=[];constructor(t){super(t)}addToRendered(){W0.renderedEngagements.push(this)}observeWidgetContainerInViewport(){return this.getVariation()}generateParentElementID(){let t=super.generateParentElementID();return this.engagementTrigger.isSubscriptionUpsell()&&(t+=`-${this.engagementTrigger.items[0].selectedOrFirstVariant.value.mID}`),t}async checkAndSendEvent(){if(!Wt.get().isOpen()&&this.runtimeData.pageName!=="cart"){S.log("Do not send display event as neither the cart drawer nor the cart page is open.");return}return super.checkAndSendEvent()}},vp=class G0{constructor(t,n){this.engagementTrigger=t,this.element=n,this.cartItems=je.getCurrent().items}cartItems;static renderCartUpsell(t){let n=t.placement;if(!n?.selector){S.warn(`No placement available for ${t.objective}`,t.shortID);return}let r=Array.from(document.querySelectorAll(n.selector));if(!r?.length){S.warn(`No placement found for ${t.objective}`,t.shortID);return}for(let i of r)new G0(t,i).render()}render(){let t=this.findCartItemFromHTMLElement();if(!t||this.engagementTrigger.skipSubscribedItems&&t.selling_plan_allocation)return;let n=this.engagementTrigger.items.find(d=>d.mID===t.product_id.toString());if(!n)return;let r=n.vars.find(d=>d.mID===t.id.toString());if(!r)return;let i=new ii(r),o=t.selling_plan_allocation?.selling_plan;if(o)for(let d of i.sellingPlans??[])d.mID===o.id.toString()&&(d.isSelected=!0,i.changeSellingPlan(d));let s=new Wn(n);s.vars=[i],s.selectedOrFirstVariant.value=i;let a=`lc-cart-item-${this.engagementTrigger.shortID}-${n.mID}`;this.element.classList.add(a);let l=new er(this.engagementTrigger);l.placement.selector=`.${a}`,l.items=[s];let c=new si(l);c.renderSilently(),this.watchForCartItemDeletion(c,a)}watchForCartItemDeletion(t,n){let r=new MutationObserver(i=>{i.forEach(o=>{o.removedNodes.forEach(s=>{s===this.element&&(S.debug(`${n} has been removed`),t.destroy(),r.disconnect())})})});r.observe(this.element.parentElement,{childList:!0,subtree:!0})}findCartItemFromHTMLElement(){let t=this.element.innerHTML;return this.cartItems.find(n=>{if(!(t.includes(n.url)||t.includes(n.variant_id))&&(!t.includes(n.product_title)||n.variant_title&&!t.includes(n.variant_title)))return!1;let r=n.selling_plan_allocation?.selling_plan?.name;return!(r&&!t.includes(r))})}},bT=Pe(Yn()),Li=Pe(Yn()),B2=`
54
54
  mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
55
55
  cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {
56
56
  cart {
@@ -62,7 +62,7 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
62
62
  }
63
63
  }
64
64
  }
65
- `,go=class{static navigate(e,n,r){let i=`${location.origin}/discount/${e}`;switch(S.log(`Applying discount code ${e}`,n,r),n){case Li.RedirectBehaviour.CART_PAGE:location.href=`${i}?redirect=/cart`;break;case Li.RedirectBehaviour.CART_DRAWER:location.href=`${i}?redirect=${location.pathname}#${k.HASH_OPEN_CART_DRAWER}=1`;break;case Li.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href=`${i}?redirect=/checkout`;break;case Li.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`${i}?redirect=/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;default:location.href=`${i}?redirect=${r||location.pathname}`}}static navigateWithoutDiscount(e,n){let r=Wt.get();switch(e){case Li.RedirectBehaviour.CART_PAGE:location.href="/cart";break;case Li.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href="/checkout";break;case Li.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;case Li.RedirectBehaviour.CART_DRAWER:{r.open();break}}n&&r.refreshUI(n)}static async applyWithStorefront(e){let n=Dt.get().storefrontToken;if(!n)throw new Error("Storefront token not set for the store");let r=new Headers;r.append("Content-Type","application/json"),r.append("X-Shopify-Storefront-Access-Token",n);let i=JSON.stringify({query:B2,variables:{cartId:`gid://shopify/Cart/${je.getCurrent().token}`,discountCodes:[e]}}),o={method:"POST",headers:r,body:i};await Nn.getInstance().request(k.GRAPHQL_API_PATH,o)}static checkThirdPartyMethods(e){window.triggerGokwikCustomCheckout?window.triggerGokwikCustomCheckout():window.shiprocketCheckoutEvents?.buyCart?window.shiprocketCheckoutEvents.buyCart():window.openCheckout?window.openCheckout():window.openRzpCheckout?window.openRzpCheckout():location.href=e}};var wT=Pe(ea());var V2=`
65
+ `,go=class{static navigate(e,t,n){let r=`${location.origin}/discount/${e}`;switch(S.log(`Applying discount code ${e}`,t,n),t){case Li.RedirectBehaviour.CART_PAGE:location.href=`${r}?redirect=/cart`;break;case Li.RedirectBehaviour.CART_DRAWER:location.href=`${r}?redirect=${location.pathname}#${k.HASH_OPEN_CART_DRAWER}=1`;break;case Li.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href=`${r}?redirect=/checkout`;break;case Li.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`${r}?redirect=/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;default:location.href=`${r}?redirect=${n||location.pathname}`}}static navigateWithoutDiscount(e,t){let n=Wt.get();switch(e){case Li.RedirectBehaviour.CART_PAGE:location.href="/cart";break;case Li.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href="/checkout";break;case Li.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;case Li.RedirectBehaviour.CART_DRAWER:{n.open();break}}t&&n.refreshUI(t)}static async applyWithStorefront(e){let t=Dt.get().storefrontToken;if(!t)throw new Error("Storefront token not set for the store");let n=new Headers;n.append("Content-Type","application/json"),n.append("X-Shopify-Storefront-Access-Token",t);let r=JSON.stringify({query:B2,variables:{cartId:`gid://shopify/Cart/${je.getCurrent().token}`,discountCodes:[e]}}),i={method:"POST",headers:n,body:r};await Nn.getInstance().request(k.GRAPHQL_API_PATH,i)}static checkThirdPartyMethods(e){window.triggerGokwikCustomCheckout?window.triggerGokwikCustomCheckout():window.shiprocketCheckoutEvents?.buyCart?window.shiprocketCheckoutEvents.buyCart():window.openCheckout?window.openCheckout():window.openRzpCheckout?window.openRzpCheckout():location.href=e}},wT=Pe(ea()),V2=`
66
66
  mutation cartCreate($input: CartInput) {
67
67
  cartCreate(input: $input) {
68
68
  cart {
@@ -75,4 +75,4 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
75
75
  }
76
76
  }
77
77
  }
78
- `,yo=class{listen(){document.addEventListener(k.CTA_EVENT,async e=>{await this.processEvent(e)},!1)}async performAddToCart(e,n){if(!e.length)return;let r=e.map(c=>{let{vID:l,quantity:u}=this.getVIDAndQuantity(c);return{id:l?+l:+c.mID,quantity:u,properties:n.getPrivateAttributesForLineItem()}}),i=ht.getCartURL("cart/add.js"),o={items:r},s=Wt.get();s.isMiniCart()?o.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(o.sections=s.element.getSectionsToRender?.().map(c=>c.section??c.id));let a=JSON.stringify(o);try{let c=await fetch(i,{body:a,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302)return S.log(`Added ${e.length} items to Cart`),de.showSnackbar("Product added to your cart"),c.json()}catch(c){S.error("Failed to add product in cart",c)}}async performUpdate(e,n){if(!wT.JSUtils.hasKeys(n)){S.warn("No update fields provided");return}let r=ht.getCartURL("cart/change.js"),i=w({id:+e.vID},n),o=JSON.stringify(i);try{let s=await fetch(r,{body:o,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(S.log(`Updated ${e}`),je.getCurrent().update(s.json()))}catch(s){S.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),S.log(`Code-${e} copied`),de.showSnackbar("Discount code copied")}catch(n){S.error("Failed to copy code",n)}}performGoToItem(e){if(!e?.link)return;let n=ht.getProductSlug(e.link);n&&(location.pathname=ht.getRootPrefix()+"products/"+n)}async upgradeToSubscription(e,n){if(!e){S.warn("Trying to upgrade to subscription with no item");return}let r=await je.getCurrent().getNormalisedCart(),i=e.selectedOrFirstVariant.value,o=r.items.findIndex(u=>u.vID===i.mID),s=i.selectedSellingPlan.value,a=ht.getCartURL("cart/change.js"),c={line:o+1,selling_plan:s?.mID||null,properties:n.getPrivateAttributesForLineItem()},l=JSON.stringify(c);try{let u=await fetch(a,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(u.status===200||u.status===302){S.log(`Upgraded ${e} selling plan`),de.showSnackbar("Line item updated");let d=await u.json();return je.getCurrent().update(d),d}}catch(u){S.error("Failed to update subscription for item in cart",u)}}async performCartCreate(e,n,r){let i=Dt.get().storefrontToken;if(!i)throw new Error("Storefront token not set for the store");if(!e?.vID){S.error("No variant ID found to perform Buy now",e);return}let o=n?[n]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:r.getKVFormatPrivateAttributesForLineItem()}],a=await de.getCartAttributes(),c=new Headers;c.append("Content-Type","application/json"),c.append("X-Shopify-Storefront-Access-Token",i);let l=JSON.stringify({query:V2,variables:{input:{lines:s,discountCodes:o,attributes:a}}});return(await Nn.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:c,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let n=e?.detail;if(!n)return;let r=n.clickAction,i=n.items,o=n.triggerData;if(r.at){let s=r;if(S.log(`Performing ${JSON.stringify(s)} action`),s.at===101)i?.length&&this.performGoToItem(i[0]);else if(s.at===102)i?.length&&await this.performAddToCart(i,o);else if(s.at===103)await this.performCopyCoupon(o.discount.code);else if(s.at===105)Wt.get().open();else if(s.at===104){let a=n.collections;if(!a?.length)return;location.pathname=ht.getRootPrefix()+"collections/"+a[0].handle}}r.applyDiscount&&o.discount?.code&&go.navigate(o.discount.code,o.redirectBehaviour)}getVIDAndQuantity(e){let n,r;if(e instanceof ln)n=e.vID,r=e.quantity??1;else{if(!e.vars?.length)return{};n=e.selectedOrFirstVariant.value.mID,r=1}return{vID:n,quantity:r}}};var _p=class extends si{ctaListener=new yo;constructor(e){super(e),ti.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(To(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-progressbar");e.className="cooee-root",e.cart=je.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await je.getCurrent().getNormalisedCart(),r=[...this.engagementTrigger.progressBarConfig.milestones];for(let i of r){if(e.amount<i.minValue)break;if(S.log("Current milestone",i),i.rewardType===bT.MilestoneRewardType.FREE_AUTO_GIFT){let o=i.items[0];if(e.items.find(a=>a.vID===o.vID||a.mID===o.mID)){S.log(`Item(vID:${o.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(o,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});break}else{let a=await this.ctaListener.performAddToCart([o],this.engagementTrigger);Wt.get().refreshUI(a,!1),await this.removeOtherFreeGifts(o)}}}}async removeOtherFreeGifts(e){let r=(await je.getCurrent().getNormalisedCart()).items.filter(i=>i.vID!==e?.vID&&i.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(r.length)for(let i of r)await this.ctaListener.performUpdate(i,{quantity:0})}};var Ep=class extends Gn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-shoppable-videos");e.className="cooee-root",e.triggerContext=this.triggerContext,e.addEventListener("sendEvent",n=>{let r=n.detail;this.safeHTTPService.sendEvent(r)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}};var CT=Pe(ea());var wp=class extends Gn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let n=this.engagementTrigger,r=`Engagement(id: ${n.engagementID}, shortID: ${n.shortID})`,i=e.detail;if(!CT.JSUtils.hasKeys(i)){S.error(`No detail received for ${r}`);return}S.log("Detail received for BYOB",i);let o=i.campaignID??i.campaignId??i.campaign_id;if(o!==n.shortID&&o!==n.engagementID){S.warn(`Current ${r} is not BYOB. Received: ${o}`);return}let s=i.items;if(!s?.length)return;let a=s.map(c=>new ln({mID:c.product_id,vID:c.variant_id,quantity:c.quantity||1}));await new ho(this.triggerContext).execute({embeddedItems:a,clickAction:{at:108,applyDiscount:!0}})}};var Ja=class{runtimeData=Ae.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let n=[...si.renderedEngagements];si.renderedEngagements.length=0;for(let r of e)S.log(`\u{1F4E3} ${r} received as cart embed`),!this.findAndUpdateCurrent(r,n)&&(S.log(`${r} is new`),r.isProgressBar()?new _p(r).renderSilently():r.isSubscriptionUpsell()?vp.renderCartUpsell(r):new si(r).renderSilently());this.removeOldWidgets(n)}processPageWidgetResponse(e){let n=[...Gn.renderedEngagements];Gn.renderedEngagements.length=0;for(let r of e)S.log(`\u{1F4E3} ${r} received as page embed`),!this.findAndUpdateCurrent(r,n)&&(S.log(`${r} is new`),r.isShoppableVideo()?new Ep(r).renderSilently():r.isBYOB()?new wp(r).renderSilently():new Gn(r).renderSilently());this.removeOldWidgets(n)}findAndUpdateCurrent(e,n){let r=n.findIndex(i=>i.isSameTrigger(e));return r<0||e.isSubscriptionUpsell()?!1:(n[r].update(e),n[r].renderSilently(),n.splice(r,1),!0)}removeOldWidgets(e){for(let n of e)n.destroy()}};var Ar=class t{static INSTANCE;httpService=ke.get(Nn);sessionManager=ke.get(mn);runtimeData=Ae.get();loadWidgetsSubject=new Ne;constructor(){this.loadWidgetsSubject.pipe(vr(300)).subscribe(()=>{this.loadCartWidgets().catch(e=>S.error("Unable to initiate cart widgets",e)),this.loadPageWidgets().catch(e=>S.error("Unable to initiate page widgets",e))}),ti.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){mn.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(e=>S.error("Unable to initiate load page widgets",e))})}loadCartWidgetsSilently(){mn.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(e=>S.error("Unable to initiate cart widgets",e))})}loadWidgetsSilently(){mn.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let e=await this.getWidgetProps();S.log("Load widgets",e),this.httpService.post("/v1/engagement/page-widgets",e).then(async n=>{let r=n.widgets.map(i=>new er(i));new Ja().processPageWidgetResponse(r)}).catch(n=>{S.error("Error sending widget getter",n)})}async loadCartWidgets(){let e=await this.getWidgetProps();S.log("Load cart widgets",e),this.httpService.post("/v1/engagement/cart-widgets",e).then(async n=>{let r=n.widgets.map(i=>new er(i));new Ja().processCartWidgetResponse(r)}).catch(n=>{S.error("Error sending widget getter",n)})}async getVariation(e){let n=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},e),n))}renderCachedCartWidgets(){new Ja().processCartWidgetResponse(this.runtimeData.cartEngagements)}async addSessionContext(e){let n=await this.sessionManager.checkSessionAndGetContext();e.sessionID=n[0],e.sessionNumber=n[1],e.landingPage=n[2],e.page=ei.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),n=[];return e.forEach(r=>{let i=r.dataset.engagementId;i&&+i&&n.push(i)}),n}async getWidgetProps(){let e={};e.engagementIDs=this.addAvailableEngagementShortIDs(),e.locale=this.runtimeData.locale,await this.addSessionContext(e),e.currentItem=this.runtimeData.getCurrentItem();try{e.cart=await je.getCurrent().getNormalisedCart()}catch(o){S.error("Error fetching Shopify cart before sending widget call",o)}let n=new URLSearchParams(location.search),r=n.get("cooee-preview");r?e.previewIDs=r.trim().split(",").filter(o=>Number.isInteger(+o)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let i=n.get("cooee-variant");return i?e.previewVariant=i:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}};var bp=class{runtimeData=Ae.get();widgetAPIService=ke.get(Ar);meddle(){let e=gt.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=gt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.previewWidget=gt.previewWidget.bind(gt),e.previewPopup=gt.previewPopup.bind(gt)}overwritePush(e,n){ua(e,"push",n)}meddleAccount(){this.overwritePush(gt.globalRef.account,(...e)=>{this.processAccount(e[0])}),gt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(gt.globalRef.events,(...e)=>{this.processEvent(e[0])}),gt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(gt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),gt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(gt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),gt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&gt.authenticate(e),e.flags&&hs.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?gt.sendEvent(e[0],e[1],this.runtimeData.jsLoadTime):gt.sendEvent(e[0],e[1]))}processProfile(e){e&&gt.updateProfile(e)}processPageName(e){e&&gt.setPageName(e)}meddlePage(){this.overwritePush(gt.globalRef.page,(...e)=>{this.processPage(e[0])}),gt.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&gt.setPageName(e.pageName)}};var Qa=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,n){return this.getItem(e)||n}static setString(e,n){this.setItem(e,n)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,n){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),n)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}};var ec=class t{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=ke.get(Le);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(e){this._lastScreenOrScroll=e}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}resetScrollID(e){Qa.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=e??new Date}listen(){if(window.scrollY){let e=this.getPercentScrolledY();this.shouldSendScroll(e)&&this.sendScroll(e)}de.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Io(window,"scroll").pipe(vr(t.DEBOUNCE_TIME),Mr(()=>{let e=this.getPercentScrolledY();if(e>100){S.warn("Received scroll percent is more than 100",e);return}if(this.shouldSendScroll(e))return e})).subscribe(e=>{this.sendScroll(e)})}shouldSendScroll(e){return Math.abs(this.lastPercent-e)>=t.THRESHOLD||this.lastPercent!==e&&e===100}sendScroll(e){if(e==null)return;let n={percent:e,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=e;let r=Qa.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new Ye(k.EVENT_SCROLL,n,null,r);this.safeHttpService.sendEvent(i),Qa.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let e=window.document.body.scrollHeight,n=window.innerHeight;return Math.ceil((window.scrollY+n)/e*100)}};var Cp=class t{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=ke.get(Le);runtimeData=Ae.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let e=await this.runtimeData.setInactive();if(e===0){S.info("Not sending background event as user was inactive on website");return}S.info(`Sending background event with ${e} seconds`);let n={};n[t.ACTIVE_DURATION]=e,this.apiService.sendEvent(new Ye(k.EVENT_APP_BACKGROUND,n))}};var Sp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(n=>{n instanceof oi&&this.loadFamily(n.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let n=[];e.fonts.forEach(i=>{if(i.url){let o=new FontFace(k.COOEE+e.name,i.getURL(),i.getFontDescriptor());n.push(o.load())}}),this.loadedFonts.push(e.name),(await Promise.all(n)).forEach(i=>{document.fonts.add(i)})}};var Ip=class{static updateIdentity(e){if(!this.isInstalled())return;let n={};e.email&&(n.email=e.email),e.mobile&&(n.phone_number=e.mobile),S.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",n])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}};var Dp=class{apiService;action;triggerContext;constructor(e,n){this.action=e,this.apiService=Le.getInstance(),this.triggerContext=n}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:this.collectFormData();break;case void 0:case 105:break;default:S.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;de.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}closeTriggerAndSendEvent(e,n){this.triggerContext.closeInApp(e,n),this.dispatchEvent()}shareAction(){if(!this.action.share)return;if(!navigator.share){S.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(n=>console.log(n)).catch(n=>console.error(n))}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){S.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(n=>n.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),n=await this.checkPermission("geolocation"),r=Notification.permission;return{camera:e,location:n,notification:r}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}collectFormData(){let e={};for(let n of this.triggerContext.inputs){if(!n.isValid)return;let i=document.getElementById(n.id).value;n.type===51?e.email=i:n.type===52&&(e.mobile=i)}this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),de.showSnackbar("Coupon applied on cart"),Ip.updateIdentity(e)}dispatchEvent(){let e=this.triggerContext.triggerData,n={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};document.dispatchEvent(new CustomEvent(k.CTA_EVENT,{detail:n}));let r={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}};var gr=class{renderer=Zn.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,n,r){this.parentHTMLEl=e,this.inappElement=n,this.triggerContext=r,this.stylesConverter=new Za(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=ne(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let n=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",n)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new us(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",n=>{n.stopPropagation(),new Dp(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}};var ai=class extends gr{constructor(e,n,r){super(e,n,r)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},n=this.inappElement.typography;return n&&(e.fontSize=this.stylesConverter.getSizePx(n.fs),e.fontFamily=k.COOEE+n.fam?.name,e.lineHeight=`${n.lh}`,e.letterSpacing=n.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,n){let r=[];n.u&&r.push("underline"),n.st&&r.push("line-through"),r.length||r.push("normal"),this.renderer.setStyle(e,"font-weight",n.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",n.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",r.join(" ")),this.renderer.setStyle(e,"color",n.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,n=e?La[e]?.toLowerCase():this.inappElement.typography.alignment;n||(n="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",n)}};var Bl=class extends ai{constructor(e,n,r){super(e,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let n=this.renderer.createElement("span");n.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(n,e),this.renderer.appendChild(this.inappHTMLEl,n)}),this.processCommonBlocks()}};var Vl=class extends gr{constructor(e,n,r){super(e,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}};var vs=class extends gr{constructor(e,n,r){super(e,n,r),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}};var Ul=class t extends gr{constructor(n,r,i){super(n,r,i);this.parent=n;this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",t.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let n=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let r=this.inappElement.spc,i=this.stylesConverter.getScaledSize(n.w)+r.getHorizontal(),o=this.stylesConverter.getScaledSize(n.h)+r.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",i+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",o+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}};var Tp=class extends gr{constructor(e,n,r){super(e,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}};var tc=class extends ai{borderColor="";constructor(e,n,r){super(e,n,r),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",n=>{n.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}};var xp=class t extends tc{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(e,n,r){super(e,n,r)}setInputType(){let e=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",e),e}addListener(e,n){e.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),e.value.match(t.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}};var Np=class t extends tc{static MOBILE_REGEX=/^\d+$/;constructor(e,n,r){super(e,n,r)}setInputType(){let e=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",e),e}addListener(e,n){e.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),e.value.match(t.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}};var Rp=class t extends ai{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(e,n,r){super(e,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let e=ne(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(e)}getBackgroundStyles(){return{}}processFontBlock(){let e=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.addStylesToTimer(e),e}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(e){this.elements.forEach(n=>this.renderer.setStyles(n,e))}addTimerChildren(){let e=this.inappElement.show;this.elements=[],e.day&&this.elements.push(this.getChild(t.DAYS)),e.hour&&this.elements.push(this.getChild(t.HOURS)),e.minute&&this.elements.push(this.getChild(t.MINUTES)),e.second&&this.elements.push(this.getChild(t.SECONDS)),this.elements.forEach(n=>this.inappHTMLEl.appendChild(n))}getChild(e){let n=this.renderer.createElement("div"),r=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=e,r.innerText="00",r.id=`lc-${e}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(r,"text-align","center"),this.renderer.setStyle(r,"font-family","inherit"),this.inappElement.lblPos==="start"?(n.appendChild(i),n.appendChild(r)):(n.appendChild(r),n.appendChild(i)),this.renderer.setStyle(n,"display","flex"),this.renderer.setStyle(n,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(n,"justify-content","center"),this.renderer.setStyle(n,"align-items","center"),this.renderer.setStyle(n,"gap","5px"),this.spans.push(r),n}processAndStartTimer(){let e=this.inappElement.timer.start(this.inappElement.timerType,n=>{this.spans.forEach(r=>{r.id===`lc-${t.DAYS}`?r.innerText=String(n.days).padStart(2,"0"):r.id===`lc-${t.HOURS}`?r.innerText=String(n.hours).padStart(2,"0"):r.id===`lc-${t.MINUTES}`?r.innerText=String(n.minutes).padStart(2,"0"):r.id===`lc-${t.SECONDS}`&&(r.innerText=String(n.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(e)}};var Ap=class extends ai{constructor(e,n,r){super(e,n,r),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",n=>{n.stopPropagation()}),e.addEventListener("change",()=>{let n=new ii(JSON.parse(e.value));this.updateItems(n)})}updateItems(e){let n=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[n.toEmbed(e)];let r=this.parentHTMLEl.querySelector("#coo-13");if(!r)return;let i=e.imgs[0]??n.imgs?.at(0);i?.url&&r.setAttribute("src",i.url)}addOptions(){let e=this.triggerContext.triggerData.items,n=this.inappHTMLEl;if(!e?.length){n.add(this.createOption(this.inappElement.placeholderText));return}let r=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(i=>{n.add(this.createOption(i.name??"Default",i,i.mID===r?.vID))})}createOption(e,n,r){let i=this.renderer.createElement("option");return i.text=e,i.value=JSON.stringify(n),r&&(i.selected=!0),n||(i.disabled=!0),i}};var Mp=class extends vs{constructor(e,n,r){super(e,n,r)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}};var nc=class t{static ACTIVE_TRIGGER_DATA;renderer=Zn.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(e){this.safeHTTP=Le.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(e)}setParentContainer(e){this.parent=e??document.body,this.renderer.setParentContainer(this.parent)}render(e){this.renderEngagement(new er(e))}async renderEngagement(e){if(this.triggerContext=new Ya(new Date,e),this.triggerContext.onClose(n=>{this.closeInApp(n)}),this.ian=e.ian,(this.renderer.isMobile()||e.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let n=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(n)}await this.preloadImages(e),e.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},e.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Wt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Wt.get().onToggle().subscribe(({open:n})=>{!n&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){t.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(e){_t.getInstance().captureException(e,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let e=this.triggerContext.triggerData;if(!e.previewType&&t.ACTIVE_TRIGGER_DATA){let r={triggerShown:new ya(t.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(e,r),!0}if(Ae.get().isGoKwikPopupOpen)return this.skipTrigger(e,{reason:"GoKwik popup is open"}),!0;let n=k.PAYMENT_MODAL_DETAILS.find(r=>!!document.querySelector(r.identifier));return n?(this.skipTrigger(e,{reason:`${n.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new Ul(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(e){throw S.error(e),e}}sendTriggerDisplayed(){let e={};this.triggerContext.triggerData.items?.length&&(e.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let n=new Ye(k.EVENT_TRIGGER_DISPLAYED,e,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n);let r={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}sendTriggerClosed(e){let n=e.eventName;delete e.eventName;let r=new Ye(n,e,this.triggerContext.triggerData);r.name===k.EVENT_TRIGGER_CLICKED&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(r)}addEnterAnimation(e){this.containerHTMLElement.animate(e.getEnterAnimation(),{duration:500})}renderElement(e,n,r){n instanceof Ua?new xp(e,n,r).render():n instanceof ja?new Np(e,n,r).render():n instanceof co?new Bl(e,n,r).render():n instanceof Ha?new Mp(e,n,r).render():n instanceof Oi?new vs(e,n,r).render():n instanceof ds?new Vl(e,n,r).render():n instanceof Ba?new Rp(e,n,r).render():n instanceof Va?new Ap(e,n,r).render():S.error("Unsupported element type- "+n.type)}renderContainer(e){let n=this.ian?.cont;n&&(this.containerHTMLElement=new Tp(this.rootContainer,n,e).render().getHTMLElement(),new Sp().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,e)}),this.addEnterAnimation(this.ian.anim))}closeInApp(e){let n=this.ian.anim.getExitAnimation();this.sendTriggerClosed(e),t.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"});r.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){Zn.get().removeInApp(this.triggerContext)}skipTrigger(e,n){let r=new Ye(k.EVENT_CAMPAIGN_REJECTED,n,e);this.safeHTTP.sendEvent(r)}async preloadImages(e){let n=e.ian;if(!n)return;let r=[];n.elems.forEach(i=>{let o=i.bg?.img?.src;if(o&&r.push(this.getPromise(o)),i.t===1){let s=i.src;if(!s)return;r.push(this.getPromise(s))}}),n.bg?.img?.src&&r.push(this.getPromise(n.bg.img.src)),n.cont.bg?.img?.src&&r.push(this.getPromise(n.cont.bg.img.src)),await Promise.all(r)}getPromise(e){return new Promise(n=>{let r=new Image;r.onload=n,r.src=e,r.style.display="none"})}};var Op=class{compareCartItemSubject=new Ne;constructor(){this.compareCartItemSubject.pipe(vr(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,n=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(r=>S.error("Unable to process cart change in XMLHttpRequest",r))}),n.apply(this,arguments)},S.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,n=window.fetch;window.fetch=function(r){return n.apply(window,arguments).then(i=>(e.performEvent(r.toString()).catch(o=>S.error("Unable to process cart change in fetch",o)),i))},S.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Ae.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,n){let r=e?.items,i=n.items,o=[],s=[];if(S.debug(`Comparing cart change with old count ${r?.length} to new count ${i.length}`),i?.forEach(a=>{let c=r?.find(l=>l.vID===a.vID);if(c){if(c.quantity!==a.quantity){let l=c.quantity<a.quantity,u=Math.abs(c.quantity-a.quantity),d=ne(w({},a),{quantity:u});l?o.push(d):s.push(d)}r&&de.removeFromArray(r,c)}else o.push(a)}),r)for(let a of r)s.push(a);S.debug(`Cart delta: added: ${o.length}, removed: ${s.length}`),o.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:o}),s.length&&e.token===n.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||o.length)&&ti.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:o,itemsRemoved:s})}sendEvent(e,n){let r=new Ye(e,n);ke.get(Le).sendEvent(r)}async compareCartItems(){let e=await vt.get(Ce.CURRENT_CART,{}),n=await je.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,n)}};var Pp=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,n=window.fetch;window.fetch=async function(r,i){try{await e.modifyRequest(r,i)}catch(o){_t.getInstance().captureError("Failed to modify graphql request",o,{body:JSON.stringify(i?.body)})}return n(r,i)},S.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,n){let r=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(r.includes("graphql.json")&&n?.method==="POST")||!n.body)return;let i;if(typeof n.body=="string")try{i=JSON.parse(n.body)}catch{return}else i=n.body;S.debug("Intercepted fetch request of:",r),i?.query.includes("cartCreate")&&(n.body=await this.updatedBody(i),this.sendBuyNowEvent())}async updatedBody(e){let n=e.variables.input.attributes??[],r=await de.getCartAttributes();return e.variables.input.attributes=[...n,...r],JSON.stringify(e)}sendBuyNowEvent(){let e=Ae.get().getCurrentItem();if(!e)return;let n=new Ye(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Le.getInstance().sendEvent(n)}};var rc=class{constructor(e,n){this.selectors=e;this.eventName=n;this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let n=e.currentTarget,r=new Ye(this.eventName,{class:n.className||void 0,tagName:n.tagName||void 0,id:n.id||void 0});Le.getInstance().sendEvent(r),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>S.error(e))}async listen(){this.elements=await de.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(n=>{n.removeEventListener("click",e)})}};var kp=class t extends rc{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(t.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}};var Lp=class t extends rc{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(t.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}};var Fp=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){de.onDocumentLoaded(()=>{S.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let n=document.querySelector(this.selector);if(!n){S.debug("No clickable cart checkout button found");return}S.debug("Clickable cart checkout button found",n),n.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Wt.get().open()}};var Bp=class{trackSilently(){this.track().catch(e=>_t.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,n=window.Shopify?.Checkout;if(!e&&!n)return;let r={};this.processSmallCheckout(e,r),this.processBigCheckout(n,r);let i=this.getTokenFromCurrentURLPath();if(i&&(r.urlToken=i),!Object.keys(r).length){S.warn("No processable data found in",e,n);return}r.referrer=document.referrer,r.url=location.href;let o=await ke.get(mn).checkSessionAndGetContext();r.sessionID=o[0],this.trackOrder(r)}processSmallCheckout(e,n){e&&(e.order_id&&(n.orderID=e.order_id.toString()),e.token&&(n.checkoutToken=e.token.toString()),e.customer_id&&(n.customerID=e.customer_id.toString()))}processBigCheckout(e,n){e&&(e.token&&!n.checkoutToken&&(n.checkoutToken=e.token.toString()),e.cartToken&&(n.cartToken=e.cartToken.toString()))}trackOrder(e){S.info("Found order to be send",e),Le.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(n=>n.length&&e.test(n))}};var jl=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await je.getCurrent().getNormalisedCart(),n={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},r=new Ye(k.EVENT_CHECKOUT_STARTED,n);Le.getInstance().sendEvent(r)})}};var Vp=class{async migrate(){}};fn.escape=ST.MustacheUtils.escapeHtml;var gt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new Vp().migrate(),this.autoAuthenticate(),new bp().meddle(),new Cp().listen(),new Bp().trackSilently(),new yo().listen(),new Op().listen(),new Pp().listen(),new Fp().listen(),ke.get(ec).listen(),ke.get(Lp).listenSilently(),ke.get(kp).listenSilently(),ke.get(Ar).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),hr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||ua(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,ua(this.globalRef,"config",new Dt),ua(this.globalRef,"runtimeData",new Ae),S.debug("Global reference initialised")}static injectWidgetAssets(){En.injectScriptURL(Dn.widgetURL,"cooee-widget-sdk"),En.injectStylesheet(Dn.styleURL)}static autoAuthenticate(){let e=ht.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let n=e.appID?.trim(),r=e.shopifyShop;if((de.isNull(n)||n.length!==24)&&de.isNull(r)){S.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,ke.get(mn).init(e)}static sendEvent(e,n,r){for(let o in n)if(o.length>3&&o.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");let i=new Ye(e,n);i.occurred=r??new Date,ke.get(Le).sendEvent(i)}static updateProfile(e){for(let n in e)if(n.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");ke.get(Le).updateProfile(e)}static setPageName(e){if(!e)return;let n=Ae.get(),r=n.pageName;if(e===r)return;if(n.pageName=e,e==="cart"&&ke.get(Ar).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){ke.get(ec).resetScrollID();return}let i={};r&&(i.ps=r);let o=new Ye(k.EVENT_SCREEN_VIEW,i);o.occurred=n.jsLoadTime,ke.get(Le).sendEvent(o),ke.get(ec).resetScrollID(o.occurred)}static previewPopup(e,n){new nc(n).render(e)}static previewWidget(e){new Gn(new er(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){S.error(e)}window.addEventListener("message",e=>{if(S.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let n=e.data;typeof n=="object"&&(n.action==="POPUP_PREVIEW"?(this.previewPopup(n.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):n.action==="WIDGET_PREVIEW"&&(this.previewWidget(n.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Ae.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",n=>{let{token:r}=n.detail;r&&this.updateProfile({goKwikToken:r})}),window.gokwikSdk?jl.attachCheckoutListener():window.addEventListener("gokwikLoaded",jl.attachCheckoutListener)}static storePreviewParams(){let e=Ae.get(),n=new URLSearchParams(location.search),r=n.get("cooee-preview");r&&(e.previewIDs=r.trim().split(",").filter(o=>Number.isInteger(+o)));let i=n.get("cooee-variant");i&&(e.previewVariant=i)}};var Up=class t{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}init(){_l.get(Ce.APP_CONFIG,{}).then(e=>this.updateGlobalConfig(e))}async processAppConfigurations(e){S.log("Received app configuration",e),e.currencyCount=e.currencies?.length;let n=this.updateGlobalConfig(e);_l.set(Ce.APP_CONFIG,n).catch(r=>S.error(r)),Ff.processConfiguration(),n.website&&(En.injectRawScript(n.website.commonJS),En.injectRawCSS(n.website.commonCSS)),Wt.get().onToggle().subscribe(async({open:r})=>{S.info("Cart drawer is now",r?"open":"closed"),r&&(ke.get(Ar).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(e){let n=gt.globalRef.config.update(e);return Wt.forceUpdate(),S.debug("App configurations",n),n}async trackViewCartEvent(){let e=await je.getCurrent().getNormalisedCart(),n={value:e.amount,currency:e.currency},r={items:e.items,amount:n,drawer:!0};Le.getInstance().sendEvent(new Ye(k.EVENT_VIEW_CART,r))}};var IT=Pe(Jv()),jp=class t{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(e){this.adID=e.adID,this.campaignID=e.campaignID,this.source=e.source}static getAdParams(){let e;try{e=new IT.URLBuilder(location.href)}catch{return{}}let n={};if(this.META_REQUIRED_FIELDS.every(o=>Array.from(e.getParams().keys()).includes(o)))return n={source:"META",adID:e.getQueryParam("ad_id")?.trim(),campaignID:e.getQueryParam("campaign_id")?.trim()},new t(n);if(this.GOOGLE_REQUIRED_FIELDS.every(o=>Array.from(e.getParams().keys()).includes(o)))return n={source:"GOOGLE"},new t(n)}};var ms=class t{static INSTANCE=new t;httpAPIService=Nn.getInstance();coreService=Up.getInstance();sentryService=_t.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE}init(e){this.appID=e.appID,this.shopifyShop=e.shopifyShop}async storeAndPopulateAuthData(e){e&&(e.userID&&(this.userID=e.userID,await vt.set(Ce.ID,e.userID)),e.deviceID&&(this.deviceID=e.deviceID,await vt.set(Ce.DEVICE_ID,e.deviceID)),e.sdkToken&&(this.sdkToken=e.sdkToken,await vt.set(Ce.SDK_TOKEN,e.sdkToken)),this.updateAPIClient())}async validateSession(e){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),S.log("Validating session with server");let n=await this.getSessionValidateData(e);try{let r=await this.httpAPIService.validateSession(n);S.log("Validating session Response",r),await this.coreService.processAppConfigurations(r.appSettings),await this.storeAndPopulateAuthData(r)}catch(r){throw S.error(r),r}}async populateUserDataFromStorage(){if(this.sdkToken=await vt.get(Ce.SDK_TOKEN),!this.sdkToken){S.warn("No SDK token found in local storage");return}this.userID=await vt.get(Ce.ID),this.deviceID=await vt.get(Ce.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){S.debug("SDK Token:",this.sdkToken),S.log("Device ID:",this.deviceID),S.log("User ID:",this.userID),Aa.trackDeviceID(this.deviceID),hr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(e){let n=await new kf().get();n.host=location.origin;try{(await PD())?.isPrivate&&(n.private=!0)}catch(i){DT.default.error("Unable to detect private/incognito window",i)}let r=await vt.get(Ce.DEVICE_ID);return r||(r=new rn().toHexString(),await vt.set(Ce.DEVICE_ID,r)),ne(w({deviceID:r,deviceProps:n,appID:this.appID,shopifyShop:this.shopifyShop},e),{sdk:k.SDK,page:ei.parseFromCurrent(),ad:jp.getAdParams(),occurred:this.getSessionStartTime(Ae.get().jsLoadTime),currentItem:Ae.get().getCurrentItem(),cart:await je.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let e=await vt.get(Ce.FIRST_SEEN),n=e?new Date(e):new Date;e||await vt.set(Ce.FIRST_SEEN,n.toISOString()),this.httpAPIService.setFirstSeen(n),this.sentryService.setGlobalContext("Visitor Info",{first_seen:n.toISOString()})}getSessionStartTime(e){return(new Date().getTime()-e.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:e}};var mn=class t{static replaySubject=new bo(1);static INSTANCE;sentryService=ke.get(_t);lock=new Ra;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}init(e){if(S.debug("Initialising SDK",e),MD(navigator.userAgent)){S.info("This seems to be a bot. Disabling SDK");return}ms.getInstance().init(e),t.INSTANCE.checkForNewSession(!0).then(async()=>{t.replaySubject.next(!0),t.replaySubject.complete()}).catch(n=>S.error("Unable to perform device init",n))}getCurrentSessionID(){return un.set(Ce.SESSION_LAST_USED_TIME,new Date().getTime()),un.get(Ce.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let e=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:e[0],number:e[1],landing_page:e[2]}),e}async checkForNewSession(e){await this.lock.acquire();let n=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),e=!0,n=!0):await this.notSynced()&&(n=!0),e){let r=await this.getContext();await ms.getInstance().validateSession({sessionID:r[0],sessionNumber:r[1],landingPage:r[2],newSession:n}),await un.set(Ce.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){S.debug("Starting new session"),await un.clear(),S.debug("Cleared SessionStorage before starting new session");let e=new Date,n=new rn().toHexString();S.debug("New session ID to be used",n);let r=await vt.get(Ce.SESSION_NUMBER,0)+1;hr.prepend(`New Session ID: <strong>${n}</strong> & number: ${r}`),await Promise.all([vt.set(Ce.SESSION_NUMBER,r),un.set(Ce.ID,n),un.set(Ce.SESSION_LAST_USED_TIME,e.getTime()),un.set(Ce.SESSION_LANDING_PAGE,ei.parseFromCurrent())])}getLandingPage(){return un.get(Ce.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return vt.get(Ce.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await un.get(Ce.ID))return!0;let e=await un.get(Ce.SESSION_LAST_USED_TIME,0);return e?(new Date().getTime()-e)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await un.get(Ce.SESSION_SYNCED,!1)}};var NT=Pe(Yn());var TT=Pe(Yn()),xT=Pe(ea());var Hp=class{triggerData;safeHttpService=Le.getInstance();render(e){e.contentSource===TT.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let n=e.detail;if(n.formId!==this.triggerData.klaviyoFormID){S.warn("Received invalid trigger callback");return}switch(n.type){case"open":this.safeHttpService.sendEvent(new Ye(k.EVENT_TRIGGER_DISPLAYED,{form:{id:n.formId}},this.triggerData));break;case"stepSubmit":{let r=this.getFormDetails(n);this.safeHttpService.sendEvent(new Ye(k.EVENT_FORM_SUBMITTED,{form:r},this.triggerData)),this.safeHttpService.updateProfile(r);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new Ye(k.EVENT_TRIGGER_CLOSED,{form:{id:n.formId}},this.triggerData));break}}getFormDetails(e){let n={id:e.formId},r=e.metaData;if(xT.JSUtils.hasKeys(r)){let i=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(r).forEach(a=>{i.includes(a)||(n[a]=r[a])}),n.email=r.$email??r.email,n.mobile=r.$phone_number??r.phone_number;let o=r.$first_name??r.first_name,s=r.$last_name??r.last_name;(o?.length||s?.length)&&(n.name=o+" "+s)}return n}};var $p=class{static trackIntent(e){if(!this.isInstalled()){S.log("Facebook pixel not installed");return}if(!Dt.get().pixelPush){S.log("Facebook pixel push not enabled");return}let r=ss[e.intent]?.toLowerCase(),i=e.segmentName;!r&&!i||(S.debug(`Sending ${r} intent and ${i} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:r,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}};var Wp=class t{static INSTANCE;httpService=ke.get(Nn);sentryService=ke.get(_t);sessionManager=ke.get(mn);runtime=Ae.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}sendSilently(e){this.send(e).catch(n=>S.error(`Failed to send ${e.name}`,n))}async send(e){if(S.debug(`Sending event ${e.name}`),hr.prepend(`Sending event <strong>${e.name}</strong> with id ${e.id}`),this.shouldReject(e)){S.warn(`Rejecting event ${e.name}`);return}await Promise.all([this.addSessionContext(e),this.addShopifyContext(e)]),this.addShopifyAttributes(),e.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),e.currentItem=this.runtime.getCurrentItem(),e.locale=this.runtime.locale,this.httpService.post("/v1/event/track",e).then(async n=>{S.log("\u2705 Event tracked:",e.name),hr.prepend(`\u2705 Event <strong>${n.eventName}</strong> tracked`),this.processEventResponse(e,n)}).catch(n=>{S.error(`Error sending event ${e.name} to server`,n)})}shouldReject(e){return e.trigger?.triggerID==="test"||e.trigger?.triggerID==="preview"?(S.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(e){let n=await this.sessionManager.checkSessionAndGetContext();e.sessionID=n[0],e.sessionNumber=n[1],e.landingPage=n[2],e.page=ei.parseFromCurrent()}async addShopifyContext(e){if(ht.isShopify())try{e.cart=await je.getCurrent().getNormalisedCart()}catch(n){S.error("Error fetching Shopify cart before sending the event",n)}}processEventResponse(e,n){this.renderWidgetIfAny(e,n).catch(r=>{S.error("Failed to display a campaign",r,e,n),this.sentryService.captureException(r,{event:e,response:n})}),this.utiliseIntentIfCalculated(n)}async renderWidgetIfAny(e,n){if(!n.triggerData){S.log(`Nothing to engage after ${e.name}`);return}S.log(`\u{1F4E3} Engagement(id=${n.triggerData.shortID}) will be shown`,n.triggerData);let r=new er(n.triggerData);r.occurred=e.occurred;let i;try{i=await Ka.refreshItems(r)}catch(o){S.error("Failed to refresh the products",o);return}if(r.items=i,r.contentSource===NT.EngagementContentSource.KLAVIYO){new Hp().render(r);return}new nc().renderEngagement(r).catch(o=>{S.error("Failed to render popup",o),this.sentryService.captureException(o,{event:e,triggerData:r})})}utiliseIntentIfCalculated(e){e.intent&&(Aa.trackIntent(e.intent),$p.trackIntent(e),hr.prepend(`Intent is <strong>${ss[e.intent]}</strong>`))}addShopifyAttributes(){ht.isShopify()&&je.getCurrent().addCooeeAttributes().catch(e=>{S.error("Fail to add attributes in cart",e)})}};var Le=class t{static INSTANCE;httpApiService=Nn.getInstance();eventAPIService=Wp.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}sendEvent(e){S.debug(`Waiting for auth to send event ${e.name}`),mn.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(e)})}updateProfile(e){mn.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(e??{})})}trackOrder(e){mn.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(e)})}updateDeviceProps(e){mn.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:e})})}generateDiscount(e){return this.httpApiService.generateDiscount(e)}};var ho=class{constructor(e,n){this.triggerContext=e;this.element=n}safeHTTP=Le.getInstance();async execute(e){let n=Ae.get().getCurrentItem(),r=e.clickAction||this.element?.clc;if(!r)return;let i=e.item,o=this.triggerContext,s=new yo,a=o.triggerData.redirectBehaviour,c=!!o.triggerData.discount.type&&!!r?.applyDiscount,l={selectedVariants:o.triggerData.nonMutableItems.map(M=>({itemMID:M.mID,mID:M.selectedOrFirstVariant.value.mID})),eID:o.triggerData.engagementID,cID:o.triggerData.contentID},u="",d=[],m=[];if(i?m=[i.toEmbed()]:e.embeddedItem&&(m=[e.embeddedItem]),r.at===108){let M=o.selectedItems;if(m=e.embeddedItems??M.map(A=>A.toEmbed()),o.shouldGiveFBTDiscount||e.embeddedItems?.length){let A;e.embeddedItems?A=e.embeddedItems.map(L=>({itemMID:L.mID,mID:L.vID,quantity:L.quantity})):A=M.map(L=>({itemMID:L.mID,mID:L.selectedOrFirstVariant.value.mID}));let O=o.triggerData.bundleFrom;o.triggerData.isBundleOnCartDrawer()&&O&&A.push({itemMID:O.mID,mID:O.selectedOrFirstVariant.value.mID,isPrimary:!0}),l.selectedVariants=A,o.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(L=>{L.mID===n.vID&&(L.isPrimary=!0)})}else l=void 0;d=e.embeddedItems??M}else if(r.at===107){let M=await je.getCurrent().getNormalisedCart();m=M.items,l.selectedVariants=M.items.map(A=>({itemMID:A.mID,mID:A.vID}))}else if(r.at===102)d=i?[i]:[e.embeddedItem];else if(r.at===101)u=i?ht.getRootPrefix()+"products/"+i.slug:e.embeddedItem?.link;else if(r.at===4){let M=de.isValidURL(r.gu?.u);M&&(u=M.href)}else if(r.at===109){let M=await s.upgradeToSubscription(i,o.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Wt.get().refreshUI(M)}if(this.sendTriggerClicked(m,{from:"button"},e.video),S.debug({redirectPath:u,redirectBehaviour:a,hasDiscount:c}),!c&&u){location.href=u;return}let h,v=!1;try{h=await this.getOrGenerateDiscountCode(l),S.debug("Discount code (if any) to apply",h)}catch(M){if(!this.triggerContext.triggerData.isBYOB()){AT.default.error("Unable to get a discount code",M);return}}if(h&&r.at===103)await s.performCopyCoupon(h);else if(r.at===110){let M=await s.performCartCreate(n,h,o.triggerData);M&&(location.href=M);return}try{h&&await go.applyWithStorefront(h)}catch(M){S.error(M),v=!0}let N;if(d?.length&&(N=await s.performAddToCart(d,o.triggerData)),v&&h){go.navigate(h,a,u);return}if(u){location.href=u;return}go.navigateWithoutDiscount(a,N)}sendTriggerClicked(e,n,r){let i=k.EVENT_TRIGGER_CLICKED,o=new Ye(i,n,this.triggerContext.triggerData);o.items=e,r?.id&&(o.videos=[r.id]),this.safeHTTP.sendEvent(o)}async getOrGenerateDiscountCode(e){let n=this.triggerContext.triggerData.discount;if(!n?.type)return;let r="";if(n.type===RT.DiscountType.STATIC){if(!n.code)throw _t.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return n.code}if(e){if(r=await this.generateDiscount(e),!r)throw S.error("No discount code found",e),new Error("Discount code not found or generated");return r}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(n){throw de.showSnackbar("Failed to generate a discount code"),S.error("Error generating discount code",n,e),_t.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:n}),n}}};var Fi=class{static getBestSources(e){if(!e)return[];let n=[],r=e.filter(o=>o.format==="mp4").sort((o,s)=>s.width-o.width)[0];r&&n.push(r);let i=e.filter(o=>o.format==="m3u8").sort((o,s)=>s.width-o.width)[0];return i&&n.push(i),n}static async performCTA(e,n){let r={applyDiscount:!0};n.cta===vo.ClickActionType.ADD_TO_CART?r={at:vo.ClickActionType.ADD_TO_CART,applyDiscount:!0}:n.cta===vo.ClickActionType.GO_TO_PRODUCT?r={at:vo.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0}:n.cta===vo.ClickActionType.OPEN_CART&&(e.triggerData.redirectBehaviour=vo.RedirectBehaviour.CART_DRAWER),await new ho(e).execute({clickAction:r,embeddedItem:new ln(n.item)})}};var U2=["swiperContainer"],j2=["videoPlayers"],MT=(t,e)=>e.url;function H2(t,e){if(t&1&&qe(0,"source",15),t&2){let n=e.$implicit;jn("type",n.mimeType),Si("media","(max-width: ",n.width,"px)"),Ue("src",n.url,cn)}}function $2(t,e){if(t&1&&qe(0,"source",16),t&2){let n=e.$implicit;jn("type",n.mimeType),Ue("src",n.url,cn)}}function W2(t,e){if(t&1){let n=_n();X(0,"video",14,1),at("timeupdate",function(i){Je(n);let o=re().$index,s=re();return Qe(s.updateProgress(i,o))})("click",function(){Je(n);let i=re().$index,o=re();return Qe(o.currentIndex===i&&o.toggleMute())}),Kt(2,H2,1,4,"source",15,MT),Kt(4,$2,1,2,"source",16,MT),Q()}if(t&2){let n=re(),r=n.$implicit,i=n.$index,o=re();Ue("autoplay",o.currentIndex===i)("muted",o.muted),Z(2),Zt(r.sources),Z(2),Zt(o.VideoUtils.getBestSources(r.sources))}}function G2(t,e){if(t&1){let n=_n();X(0,"div",18)(1,"cooee-product-modal",19),at("performCTA",function(i){Je(n);let o=re(2).$implicit,s=re();return Qe(s.performClickToAction(i,o))})("closeModel",function(){Je(n);let i=re(3);return Qe(i.selectedItem=null)}),Q()()}if(t&2){let n=re(3);Z(),Ue("item",n.selectedItem)}}function z2(t,e){if(t&1){let n=_n();X(0,"div",20)(1,"cooee-mute-toggle",21),at("buttonClicked",function(){Je(n);let i=re(3);return Qe(i.toggleMute())}),Q()(),X(2,"cooee-product-card",22),at("performCTA",function(i){Je(n);let o=re(2).$implicit,s=re();return Qe(s.performClickToAction(i,o))})("clicked",function(i){Je(n);let o=re(3);return Qe(o.selectedItem=i)}),Q()}if(t&2){let n=re(2).$implicit,r=re();Z(),Ue("muted",r.muted),Z(),Ue("items",n.items)}}function q2(t,e){if(t&1&&(qe(0,"cooee-video-progress-bar",17),At(1,G2,2,1,"div",18)(2,z2,3,2)),t&2){let n=re().$index,r=re();Ue("width",r.videoProgress[n]||0),Z(),Ut(r.selectedItem?1:2)}}function Y2(t,e){if(t&1&&(X(0,"div",5),At(1,W2,6,2,"video",13)(2,q2,3,2),Q()),t&2){let n=e.$index,r=re();Z(),Ut(r.currentIndex===n||r.currentIndex-1===n||r.currentIndex+1===n?1:-1),Z(),Ut(r.currentIndex===n?2:-1)}}var Gp=class t{constructor(e){this.cdr=e}videos=[];currentIndex=0;closeDialog=new yt;performCTA=new yt;swiperContainerRef;videoPlayers;videoProgress=[];muted=!0;selectedItem=null;VideoUtils=Fi;swiperInstance;ngAfterViewInit(){let e=this.swiperContainerRef.nativeElement.getRootNode();En.injectStylesheet(Dn.styleURL,e),En.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",e),this.loadSwiperScript().then(()=>this.initSwiper()),this.playAndUnmuteActiveVideo()}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(){this.closeDialog.emit({lastVideoID:this.videos[this.currentIndex].id,lastVideoIndex:this.currentIndex})}pauseAll(){this.videoPlayers.forEach(e=>e.nativeElement.pause())}playAndUnmuteActiveVideo(){this.pauseAll();let e=this.videoPlayers.get(Math.min(this.currentIndex,1))?.nativeElement;e&&(e.currentTime=1,e.play().then(()=>{e.muted=!1,this.muted=!1}))}updateProgress(e,n){let r=e.target;this.videoProgress[n]=r.currentTime/r.duration*100,this.cdr.detectChanges()}toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(e=>e.nativeElement.muted=this.muted),this.cdr.detectChanges()}performClickToAction(e,n){this.performCTA.emit({cta:e.cta,item:e.item,video:n})}loadSwiperScript(){return new Promise(e=>{let n="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(i=>i.src.includes(n))){e();return}let r=document.createElement("script");r.src=n,r.onload=()=>e(),document.body.appendChild(r)})}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{effect:"coverflow",slidesPerView:3,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:150,modifier:2,slideShadows:!0},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")},on:{slideChange:e=>{this.currentIndex=e.realIndex,this.cdr.detectChanges(),this.playAndUnmuteActiveVideo(),this.selectedItem=null}}}),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-size","50px"),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-color","white")}static \u0275fac=function(n){return new(n||t)(Yt(jo))};static \u0275cmp=St({type:t,selectors:[["cooee-video-swiper"]],viewQuery:function(n,r){if(n&1&&(eo(U2,5),eo(j2,5)),n&2){let i;to(i=no())&&(r.swiperContainerRef=i.first),to(i=no())&&(r.videoPlayers=i)}},inputs:{videos:"videos",currentIndex:"currentIndex"},outputs:{closeDialog:"closeDialog",performCTA:"performCTA"},decls:13,vars:0,consts:[["swiperContainer",""],["videoPlayers",""],[1,"lc:relative","lc:w-screen","lc:h-screen","lc:bg-black/70","lc:flex","lc:justify-center","lc:items-center"],[1,"swiper-container","lc:w-[70vw]","lc:h-[80vh]"],[1,"swiper-wrapper"],[1,"swiper-slide","lc:relative","lc:flex","lc:justify-center","lc:items-center"],[1,"swiper-button-prev","lc:text-white"],[1,"swiper-button-next","lc:text-white"],[1,"lc:absolute","lc:top-10","lc:right-20","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button","tabindex","{0}",1,"lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["xmlns","http://www.w3.org/2000/svg","height","40px","viewBox","0 0 24 24","width","40px","fill","#FFFFFF"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],["loop","",1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"autoplay","muted"],["loop","",1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"timeupdate","click","autoplay","muted"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"performCTA","closeModel","item"],[1,"lc:absolute","lc:top-4","lc:right-4","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"performCTA","clicked","items"]],template:function(n,r){if(n&1){let i=_n();X(0,"div",2)(1,"div",3,0)(3,"div",4),Kt(4,Y2,3,2,"div",5,Ci),Q(),qe(6,"div",6)(7,"div",7),Q(),X(8,"div",8)(9,"div",9),at("click",function(){return Je(i),Qe(r.close())})("keydown",function(){return Je(i),Qe(r.close())}),Sr(),X(10,"svg",10),qe(11,"path",11)(12,"path",12),Q()()()()}n&2&&(Z(4),Zt(r.videos))},dependencies:[Ia,Da,Ta,xa],encapsulation:3})};var zp=class t{constructor(e,n){this.dialogRef=e;this.data=n}static \u0275fac=function(n){return new(n||t)(Yt(Ai),Yt(ml))};static \u0275cmp=St({type:t,selectors:[["cooee-desktop-video-carousel"]],decls:1,vars:2,consts:[[3,"closeDialog","performCTA","videos","currentIndex"]],template:function(n,r){n&1&&(X(0,"cooee-video-swiper",0),at("closeDialog",function(o){return r.dialogRef.close(o)})("performCTA",function(o){return r.data.onCTAPerformed(o)}),Q()),n&2&&Ue("videos",r.data.videos)("currentIndex",r.data.currentIndex)},dependencies:[Gp],encapsulation:2})};var jT=Pe(n_());var K2=["videoPlayers"],Z2=t=>({transform:t}),OT=(t,e)=>e.url;function X2(t,e){if(t&1&&qe(0,"source",5),t&2){let n=e.$implicit;jn("type",n.mimeType),Si("media","(max-width: ",n.width,"px)"),Ue("src",n.url,cn)}}function J2(t,e){if(t&1&&qe(0,"source",6),t&2){let n=e.$implicit;jn("type",n.mimeType),Ue("src",n.url,cn)}}function Q2(t,e){if(t&1){let n=_n();X(0,"div",15)(1,"cooee-product-modal",17),at("performCTA",function(i){Je(n);let o=re(2);return Qe(o.data.onCTAPerformed(i))})("closeModel",function(){Je(n);let i=re(2);return Qe(i.selectedItem=null)}),Q()()}if(t&2){let n=re(2);Z(),Ue("item",n.selectedItem)}}function eV(t,e){if(t&1){let n=_n();X(0,"cooee-product-card",18),at("performCTA",function(i){Je(n);let o=re(2);return Qe(o.data.onCTAPerformed(i))})("clicked",function(i){Je(n);let o=re(2);return Qe(o.selectedItem=i)}),Q()}if(t&2){let n=re().$implicit;Ue("items",n.items)}}function tV(t,e){if(t&1){let n=_n();X(0,"div",3)(1,"video",4,0),at("timeupdate",function(i){let o=Je(n).$index,s=re();return Qe(s.updateProgress(i,o))})("click",function(){let i=Je(n).$index,o=re();return Qe(o.currentIndex===i&&o.toggleMute())}),Kt(3,X2,1,4,"source",5,OT),Kt(5,J2,1,2,"source",6,OT),Q(),X(7,"div",7)(8,"button",8),at("click",function(){let i=Je(n),o=i.$implicit,s=i.$index,a=re();return Qe(a.dialogRef.close({lastVideoId:o.id,lastVideoIndex:s}))}),Sr(),X(9,"svg",9),qe(10,"path",10)(11,"path",11),Q()()(),$s(),X(12,"div",12)(13,"cooee-mute-toggle",13),at("buttonClicked",function(){Je(n);let i=re();return Qe(i.toggleMute())}),Q()(),qe(14,"cooee-video-progress-bar",14),At(15,Q2,2,1,"div",15)(16,eV,1,1,"cooee-product-card",16),Q()}if(t&2){let n=e.$implicit,r=e.$index,i=re();Z(),Ue("muted",i.muted)("height","100%"),Z(2),Zt(n.sources),Z(2),Zt(i.VideoUtils.getBestSources(n.sources)),Z(8),Ue("muted",i.muted),Z(),Ue("width",i.videoProgress[r]||0),Z(),Ut(i.selectedItem?15:16)}}var qp=class t{constructor(e,n){this.dialogRef=e;this.data=n;this.videos=n.videos,this.currentIndex=n.currentIndex}videoPlayers;videos;currentIndex=0;muted=!0;videoProgress=[];selectedItem=null;VideoUtils=Fi;lastScrollTime=0;scrollCooldown=500;touchStartY=null;touchThreshold=50;onScroll(e){e.stopPropagation();let n=Date.now();n-this.lastScrollTime<this.scrollCooldown||(e.deltaY>50?this.next():e.deltaY<-50&&this.prev(),this.lastScrollTime=n)}onTouchStart(e){e.stopPropagation(),this.touchStartY=e.touches[0].clientY}onTouchEnd(e){if(e.stopPropagation(),this.touchStartY===null)return;let n=e.changedTouches[0].clientY,r=this.touchStartY-n;Math.abs(r)>this.touchThreshold&&(r>0?this.next():this.prev(),this.lastScrollTime=Date.now()),this.touchStartY=null}ngAfterViewInit(){this.playAndUnmuteActiveVideo()}next(){this.videos.length>0&&(this.currentIndex=(this.currentIndex+1)%this.videos.length,this.playAndUnmuteActiveVideo())}prev(){this.videos.length>0&&(this.currentIndex=(this.currentIndex-1+this.videos.length)%this.videos.length,this.playAndUnmuteActiveVideo())}toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(e=>e.nativeElement.muted=this.muted)}updateProgress(e,n){let r=e.target;this.videoProgress[n]=r.currentTime/r.duration*100}pauseAll(){this.videoPlayers.forEach(e=>e.nativeElement.pause())}playAndUnmuteActiveVideo(){this.pauseAll();let e=this.videoPlayers.get(this.currentIndex)?.nativeElement;e&&(e.currentTime=1,e.play().then(()=>{e.muted=!1,this.muted=!1}))}static \u0275fac=function(n){return new(n||t)(Yt(Ai),Yt(ml))};static \u0275cmp=St({type:t,selectors:[["cooee-video-scroller"]],viewQuery:function(n,r){if(n&1&&eo(K2,5),n&2){let i;to(i=no())&&(r.videoPlayers=i)}},hostBindings:function(n,r){n&1&&at("wheel",function(o){return r.onScroll(o)},!1,aC)("touchstart",function(o){return r.onTouchStart(o)})("touchend",function(o){return r.onTouchEnd(o)})},decls:4,vars:3,consts:[["videoPlayers",""],[1,"lc:relative","lc:w-full","lc:h-screen","lc:overflow-hidden"],[1,"lc:flex","lc:md:flex-row","lc:flex-col","lc:w-full","lc:h-full","lc:transition-transform","lc:duration-1000","lc:ease-in-out",3,"ngStyle"],[1,"lc:w-full","lc:h-full","lc:flex-shrink-0","lc:relative"],["autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover",3,"timeupdate","click","muted","height"],[3,"src","type","media"],[3,"src","type"],[1,"lc:absolute","lc:top-4","lc:right-2","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button",1,"lc:bg-white","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:absolute","lc:top-4","lc:right-16","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"items"],[3,"performCTA","closeModel","item"],[3,"performCTA","clicked","items"]],template:function(n,r){n&1&&(X(0,"div",1)(1,"div",2),Kt(2,tV,17,5,"div",3,Ci),Q()()),n&2&&(Z(),Ue("ngStyle",JC(1,Z2,"translateY(-"+r.currentIndex*100+"vh)")),Z(),Zt(r.videos))},dependencies:[h0,Ia,Da,Ta,xa],styles:["[_nghost-%COMP%]{display:block}"]})};var HT=Pe(UT());var Jp=(t,e)=>e.url;function rV(t,e){if(t&1&&(X(0,"div",0),jt(1),Q()),t&2){re();let n=Hn(1);Z(),Ir(" ",n," ")}}function iV(t,e){if(t&1&&qe(0,"source",6),t&2){let n=e.$implicit;jn("type",n.mimeType),Si("media","(max-width: ",n.width,"px)"),Ue("src",n.url,cn)}}function oV(t,e){if(t&1&&qe(0,"source",7),t&2){let n=e.$implicit;jn("type",n.mimeType),Ue("src",n.url,cn)}}function sV(t,e){if(t&1&&(X(0,"div",8)(1,"span",10),jt(2),Q(),X(3,"span",11),jt(4),ar(5,"cooeeCurrency"),Q()()),t&2){re();let n=Hn(0);Z(2),Ir(" ",n.name," "),Z(2),Ir(" ",Dr(5,2,n.price)," ")}}function aV(t,e){if(t&1){let n=_n();X(0,"div",12),at("click",function(){Je(n);let i=re().$implicit,o=Hn(0),s=re(2);return Qe(s.addToCartClicked(i,o))})("keydown",function(){Je(n);let i=re().$implicit,o=Hn(0),s=re(2);return Qe(s.addToCartClicked(i,o))}),jt(1," Add to cart "),Q()}}function cV(t,e){if(t&1){let n=_n();Hr(0),X(1,"div",3)(2,"div",4),at("click",function(){let i=Je(n),o=i.$implicit,s=i.$index,a=Hn(0),c=re(2);return Qe(c.openDialog(o,a,s))})("keydown",function(){let i=Je(n),o=i.$implicit,s=i.$index,a=Hn(0),c=re(2);return Qe(c.openDialog(o,a,s))}),X(3,"video",5),Kt(4,iV,1,4,"source",6,Jp),Kt(6,oV,1,2,"source",7,Jp),Q(),At(8,sV,6,4,"div",8),Q(),At(9,aV,2,0,"div",9),Q()}if(t&2){let n=e.$implicit,r=re(2),i=Hn(4);Uo(n.items==null?null:n.items[0]),Z(3),Ue("muted",!0),Z(),Zt(n.sources),Z(2),Zt(r.VideoUtils.getBestSources(n.sources)),Z(2),Ut(i?8:-1),Z(),Ut(i?9:-1)}}function lV(t,e){if(t&1&&(X(0,"div",1),Kt(1,cV,10,4,"div",3,Ci),Q()),t&2){let n=re();Z(),Zt(n.videos)}}function uV(t,e){if(t&1&&qe(0,"source",6),t&2){let n=e.$implicit;jn("type",n.mimeType),Si("media","(max-width: ",n.width,"px)"),Ue("src",n.url,cn)}}function dV(t,e){if(t&1&&qe(0,"source",7),t&2){let n=e.$implicit;jn("type",n.mimeType),Ue("src",n.url,cn)}}function fV(t,e){if(t&1){let n=_n();Hr(0),X(1,"div",13),Sr(),X(2,"svg",14),qe(3,"circle",15)(4,"circle",16),Q(),$s(),X(5,"div",17)(6,"video",18),at("click",function(){let i=Je(n),o=i.$implicit,s=i.$index,a=Hn(0),c=re(2);return Qe(c.openDialog(o,a,s))}),Kt(7,uV,1,4,"source",6,Jp),Kt(9,dV,1,2,"source",7,Jp),Q()()()}if(t&2){let n=e.$implicit,r=re(2);Uo(n.items==null?null:n.items[0]),Z(6),Ue("muted",!0),Z(),Zt(n.sources),Z(2),Zt(r.VideoUtils.getBestSources(n.sources))}}function pV(t,e){if(t&1&&(X(0,"div",2),Kt(1,fV,11,2,"div",13,Ci),Q()),t&2){let n=re();Z(),Zt(n.videos)}}var Qp=class t{constructor(e){this.dialog=e}sendEvent=new yt;videos;VideoUtils=Fi;VideoConfigSource=P_;VideoConfigTemplate=k_;_triggerContext=Gs(null);get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this.videos=e.triggerData.content?.videoConfig?.videos}sendTriggerClicked(e,n){let r=new Ye(k.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[e.id],r.items=[n],this.sendEvent.emit(r)}openDialog(e,n,r){this.sendTriggerClicked(e,n);let o=new jT.default().getDevice().type==="mobile"?qp:zp,s={videos:this.videos,currentIndex:r,onCTAPerformed:c=>this.performCTA(c)};this.dialog.open(o,{width:"100vw",height:"100vh",data:s}).closed.subscribe(c=>{let l=new Ye(k.EVENT_VIDEO_DIALOG_CLOSED,c,this.triggerContext?.triggerData);this.sendEvent.emit(l)})}performCTA(e){Fi.performCTA(this.triggerContext,e)}addToCartClicked(e,n){this.performCTA({cta:HT.ClickActionType.ADD_TO_CART,item:n,video:e})}static \u0275fac=function(n){return new(n||t)(Yt(xD))};static \u0275cmp=St({type:t,selectors:[["cooee-shoppable-videos"]],inputs:{triggerContext:"triggerContext"},outputs:{sendEvent:"sendEvent"},decls:8,vars:4,consts:[["id","lc-heading-text",1,"lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],["id","lc-video-swiper",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-10","lc:justify-center","lc:items-center"],["id","lc-video-stories",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-parent","lc:flex","lc:flex-col","lc:gap-1"],["id","lc-video","tabindex","{0}",1,"lc-video-card","lc:cursor-pointer","lc:rounded-lg","lc:min-w-[200px]",3,"click","keydown"],["width","100%","autoplay","","loop","",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"muted"],[3,"src","type","media"],[3,"src","type"],["id","lc-single-product",1,"lc:w-full","lc:flex","lc:flex-col","lc:gap-1","lc:text-sm","lc:mt-1","lc:mb-1"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-1"],["id","lc-item-price",1,"lc:font-medium"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1",3,"click","keydown"],["id","lc-video-story",1,"lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"lc:stroke-blue-500","animate-progress"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["id","lc-video","autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"]],template:function(n,r){if(n&1&&(Hr(0)(1),At(2,rV,2,1,"div",0),Hr(3)(4)(5),At(6,lV,3,0,"div",1)(7,pV,3,0,"div",2)),n&2){let i=r.triggerContext==null||r.triggerContext.triggerData==null||r.triggerContext.triggerData.content==null?null:r.triggerContext.triggerData.content.videoConfig;Z();let o=Uo(i==null?null:i.heading);Z(),Ut(o?2:-1);let s=i==null?null:i.source;Z(2),Uo(s===r.VideoConfigSource.GALLERY);let a=i==null?null:i.template;Z(2),Ut(a===r.VideoConfigTemplate.SWIPER?6:a===r.VideoConfigTemplate.STORY?7:-1)}},dependencies:[Xr],styles:["[_nghost-%COMP%]{display:block;margin-top:30px}.lc-video-card[_ngcontent-%COMP%] > video[_ngcontent-%COMP%]:hover{scale:1.1}@keyframes _ngcontent-%COMP%_progressLoop{0%{stroke-dashoffset:301.6}to{stroke-dashoffset:0}}.animate-progress[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_progressLoop 2s linear infinite}"]})};S.configure("CooeeWidgetSDK");(async()=>{let t=await I0(x0),e=(n,r)=>{let i=s0(n,{injector:t.injector});customElements.define(r,i)};e(pf,"cooee-progressbar"),e(Qp,"cooee-shoppable-videos")})();
78
+ `,yo=class{listen(){document.addEventListener(k.CTA_EVENT,async e=>{await this.processEvent(e)},!1)}async performAddToCart(e,t){if(!e.length)return;let n=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),r=ht.getCartURL("cart/add.js"),i={items:n},o=Wt.get();o.isMiniCart()?i.sections=["mini-cart"]:o.isShopifyDefaultDrawer()&&(i.sections=o.element.getSectionsToRender?.().map(a=>a.section??a.id));let s=JSON.stringify(i);try{let a=await fetch(r,{body:s,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return S.log(`Added ${e.length} items to Cart`),de.showSnackbar("Product added to your cart"),a.json()}catch(a){S.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!wT.JSUtils.hasKeys(t)){S.warn("No update fields provided");return}let n=ht.getCartURL("cart/change.js"),r=w({id:e.key},t),i=JSON.stringify(r);try{let o=await fetch(n,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(o.status===200||o.status===302)&&(S.log(`Updated ${e}`),je.getCurrent().update(o.json()))}catch(o){S.error("Failed to update item in cart",o,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),S.log(`Code-${e} copied`),de.showSnackbar("Discount code copied")}catch(t){S.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=ht.getProductSlug(e.link);t&&(location.pathname=ht.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){S.warn("Trying to upgrade to subscription with no item");return}let n=await je.getCurrent().getNormalisedCart(),r=e.selectedOrFirstVariant.value,i=n.items.findIndex(c=>c.vID===r.mID),o=r.selectedSellingPlan.value,s=ht.getCartURL("cart/change.js"),a={line:i+1,selling_plan:o?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(s,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){S.log(`Upgraded ${e} selling plan`),de.showSnackbar("Line item updated");let d=await c.json();return je.getCurrent().update(d),d}}catch(c){S.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,n){let r=Dt.get().storefrontToken;if(!r)throw new Error("Storefront token not set for the store");if(!e?.vID){S.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],o=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:n.getKVFormatPrivateAttributesForLineItem()}],s=await de.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",r);let l=JSON.stringify({query:V2,variables:{input:{lines:o,discountCodes:i,attributes:s}}});return(await Nn.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e?.detail;if(!t)return;let n=t.clickAction,r=t.items,i=t.triggerData;if(n.at){let o=n;if(S.log(`Performing ${JSON.stringify(o)} action`),o.at===101)r?.length&&this.performGoToItem(r[0]);else if(o.at===102)r?.length&&await this.performAddToCart(r,i);else if(o.at===103)await this.performCopyCoupon(i.discount.code);else if(o.at===105)Wt.get().open();else if(o.at===104){let s=t.collections;if(!s?.length)return;location.pathname=ht.getRootPrefix()+"collections/"+s[0].handle}}n.applyDiscount&&i.discount?.code&&go.navigate(i.discount.code,i.redirectBehaviour)}getVIDAndQuantity(e){let t,n;if(e instanceof ln)t=e.vID,n=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,n=1}return{vID:t,quantity:n}}},_p=class extends si{ctaListener=new yo;constructor(e){super(e),ti.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(To(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-progressbar");e.className="cooee-root",e.cart=je.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await je.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let n of t){if(e.amount<n.minValue)break;if(S.log("Current milestone",n),n.rewardType===bT.MilestoneRewardType.FREE_AUTO_GIFT){let r=n.items[0],i=e.items.find(o=>o.vID===r.vID||o.mID===r.mID);if(i)S.log(`Item(vID:${r.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let o=await this.ctaListener.performAddToCart([r],this.engagementTrigger);Wt.get().refreshUI(o,!1)}}}}async removeOtherFreeGifts(e){let t=(await je.getCurrent().getNormalisedCart()).items.filter(n=>n.vID!==e?.vID&&n.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let n of t)await this.ctaListener.performUpdate(n,{quantity:0})}},Ep=class extends Gn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-shoppable-videos");e.className="cooee-root",e.triggerContext=this.triggerContext,e.addEventListener("sendEvent",t=>{let n=t.detail;this.safeHTTPService.sendEvent(n)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},CT=Pe(ea()),wp=class extends Gn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let t=this.engagementTrigger,n=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,r=e.detail;if(!CT.JSUtils.hasKeys(r)){S.error(`No detail received for ${n}`);return}S.log("Detail received for BYOB",r);let i=r.campaignID??r.campaignId??r.campaign_id;if(i!==t.shortID&&i!==t.engagementID){S.warn(`Current ${n} is not BYOB. Received: ${i}`);return}let o=r.items;if(!o?.length)return;let s=o.map(a=>new ln({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new ho(this.triggerContext).execute({embeddedItems:s,clickAction:{at:108,applyDiscount:!0}})}},Ja=class{runtimeData=Ae.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...si.renderedEngagements];si.renderedEngagements.length=0;for(let n of e)S.log(`\u{1F4E3} ${n} received as cart embed`),!this.findAndUpdateCurrent(n,t)&&(S.log(`${n} is new`),n.isProgressBar()?new _p(n).renderSilently():n.isSubscriptionUpsell()?vp.renderCartUpsell(n):new si(n).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Gn.renderedEngagements];Gn.renderedEngagements.length=0;for(let n of e)S.log(`\u{1F4E3} ${n} received as page embed`),!this.findAndUpdateCurrent(n,t)&&(S.log(`${n} is new`),n.isShoppableVideo()?new Ep(n).renderSilently():n.isBYOB()?new wp(n).renderSilently():new Gn(n).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let n=t.findIndex(r=>r.isSameTrigger(e));return n<0||e.isSubscriptionUpsell()?!1:(t[n].update(e),t[n].renderSilently(),t.splice(n,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},Ar=class q0{static INSTANCE;httpService=ke.get(Nn);sessionManager=ke.get(mn);runtimeData=Ae.get();loadWidgetsSubject=new Ne;constructor(){this.loadWidgetsSubject.pipe(vr(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>S.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>S.error("Unable to initiate page widgets",t))}),ti.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new q0),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){mn.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>S.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){mn.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>S.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){mn.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();S.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async n=>{let r=n.widgets.map(i=>new er(i));new Ja().processPageWidgetResponse(r)}).catch(n=>{S.error("Error sending widget getter",n)})}async loadCartWidgets(){let t=await this.getWidgetProps();S.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async n=>{let r=n.widgets.map(i=>new er(i));new Ja().processCartWidgetResponse(r)}).catch(n=>{S.error("Error sending widget getter",n)})}async getVariation(t){let n=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),n))}renderCachedCartWidgets(){new Ja().processCartWidgetResponse(this.runtimeData.cartEngagements)}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=ei.parseFromCurrent()}addAvailableEngagementShortIDs(){let t=document.querySelectorAll(".letscooee-engagement"),n=[];return t.forEach(r=>{let i=r.dataset.engagementId;i&&+i&&n.push(i)}),n}async getWidgetProps(){let t={};t.engagementIDs=this.addAvailableEngagementShortIDs(),t.locale=this.runtimeData.locale,await this.addSessionContext(t),t.currentItem=this.runtimeData.getCurrentItem();try{t.cart=await je.getCurrent().getNormalisedCart()}catch(o){S.error("Error fetching Shopify cart before sending widget call",o)}let n=new URLSearchParams(location.search),r=n.get("cooee-preview");r?t.previewIDs=r.trim().split(",").filter(o=>Number.isInteger(+o)):this.runtimeData.previewIDs?.length&&(t.previewIDs=this.runtimeData.previewIDs);let i=n.get("cooee-variant");return i?t.previewVariant=i:this.runtimeData.previewVariant&&(t.previewVariant=this.runtimeData.previewVariant),t}},bp=class{runtimeData=Ae.get();widgetAPIService=ke.get(Ar);meddle(){let e=gt.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=gt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.previewWidget=gt.previewWidget.bind(gt),e.previewPopup=gt.previewPopup.bind(gt)}overwritePush(e,t){ua(e,"push",t)}meddleAccount(){this.overwritePush(gt.globalRef.account,(...e)=>{this.processAccount(e[0])}),gt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(gt.globalRef.events,(...e)=>{this.processEvent(e[0])}),gt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(gt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),gt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(gt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),gt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&gt.authenticate(e),e.flags&&hs.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?gt.sendEvent(e[0],e[1],this.runtimeData.jsLoadTime):gt.sendEvent(e[0],e[1]))}processProfile(e){e&&gt.updateProfile(e)}processPageName(e){e&&gt.setPageName(e)}meddlePage(){this.overwritePush(gt.globalRef.page,(...e)=>{this.processPage(e[0])}),gt.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&gt.setPageName(e.pageName)}},Qa=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,t){return this.getItem(e)||t}static setString(e,t){this.setItem(e,t)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,t){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),t)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}},ec=class sc{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=ke.get(Le);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new sc),this.INSTANCE}resetScrollID(t){Qa.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=t??new Date}listen(){if(window.scrollY){let t=this.getPercentScrolledY();this.shouldSendScroll(t)&&this.sendScroll(t)}de.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Io(window,"scroll").pipe(vr(sc.DEBOUNCE_TIME),Mr(()=>{let t=this.getPercentScrolledY();if(t>100){S.warn("Received scroll percent is more than 100",t);return}if(this.shouldSendScroll(t))return t})).subscribe(t=>{this.sendScroll(t)})}shouldSendScroll(t){return Math.abs(this.lastPercent-t)>=sc.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let n={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let r=Qa.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new Ye(k.EVENT_SCROLL,n,null,r);this.safeHttpService.sendEvent(i),Qa.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,n=window.innerHeight;return Math.ceil((window.scrollY+n)/t*100)}},Cp=class Y0{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=ke.get(Le);runtimeData=Ae.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let t=await this.runtimeData.setInactive();if(t===0){S.info("Not sending background event as user was inactive on website");return}S.info(`Sending background event with ${t} seconds`);let n={};n[Y0.ACTIVE_DURATION]=t,this.apiService.sendEvent(new Ye(k.EVENT_APP_BACKGROUND,n))}},Sp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof oi&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(n=>{if(n.url){let r=new FontFace(k.COOEE+e.name,n.getURL(),n.getFontDescriptor());t.push(r.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(n=>{document.fonts.add(n)})}},Ip=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),S.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},Dp=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Le.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:this.collectFormData();break;case void 0:case 105:break;default:S.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;de.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){S.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(e=>console.log(e)).catch(e=>console.error(e))}}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){S.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(t=>t.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),t=await this.checkPermission("geolocation"),n=Notification.permission;return{camera:e,location:t,notification:n}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let n=document.getElementById(t.id).value;t.type===51?e.email=n:t.type===52&&(e.mobile=n)}this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),de.showSnackbar("Coupon applied on cart"),Ip.updateIdentity(e)}dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};document.dispatchEvent(new CustomEvent(k.CTA_EVENT,{detail:t}));let n={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}},gr=class{renderer=Zn.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,n){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=n,this.stylesConverter=new Za(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=ne(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",t)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new us(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation(),new Dp(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},ai=class extends gr{constructor(e,t,n){super(e,t,n)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=this.stylesConverter.getSizePx(t.fs),e.fontFamily=k.COOEE+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,t){let n=[];t.u&&n.push("underline"),t.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(e,"font-weight",t.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",t.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",n.join(" ")),this.renderer.setStyle(e,"color",t.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,t=e?La[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},Bl=class extends ai{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let t=this.renderer.createElement("span");t.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(t,e),this.renderer.appendChild(this.inappHTMLEl,t)}),this.processCommonBlocks()}},Vl=class extends gr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},vs=class extends gr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}},Ul=class Z0 extends gr{constructor(t,n,r){super(t,n,r),this.parent=t,this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",Z0.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let n=this.inappElement.spc,r=this.stylesConverter.getScaledSize(t.w)+n.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+n.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",r+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",i+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}},Tp=class extends gr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}},tc=class extends ai{borderColor="";constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},xp=class X0 extends tc{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(X0.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},Np=class Q0 extends tc{static MOBILE_REGEX=/^\d+$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(Q0.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},Rp=class Vi extends ai{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,n,r){super(t,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=ne(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(t)}getBackgroundStyles(){return{}}processFontBlock(){let t=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",t),this.addStylesToTimer(t),t}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(t){this.elements.forEach(n=>this.renderer.setStyles(n,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(Vi.DAYS)),t.hour&&this.elements.push(this.getChild(Vi.HOURS)),t.minute&&this.elements.push(this.getChild(Vi.MINUTES)),t.second&&this.elements.push(this.getChild(Vi.SECONDS)),this.elements.forEach(n=>this.inappHTMLEl.appendChild(n))}getChild(t){let n=this.renderer.createElement("div"),r=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,r.innerText="00",r.id=`lc-${t}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(r,"text-align","center"),this.renderer.setStyle(r,"font-family","inherit"),this.inappElement.lblPos==="start"?(n.appendChild(i),n.appendChild(r)):(n.appendChild(r),n.appendChild(i)),this.renderer.setStyle(n,"display","flex"),this.renderer.setStyle(n,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(n,"justify-content","center"),this.renderer.setStyle(n,"align-items","center"),this.renderer.setStyle(n,"gap","5px"),this.spans.push(r),n}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,n=>{this.spans.forEach(r=>{r.id===`lc-${Vi.DAYS}`?r.innerText=String(n.days).padStart(2,"0"):r.id===`lc-${Vi.HOURS}`?r.innerText=String(n.hours).padStart(2,"0"):r.id===`lc-${Vi.MINUTES}`?r.innerText=String(n.minutes).padStart(2,"0"):r.id===`lc-${Vi.SECONDS}`&&(r.innerText=String(n.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},Ap=class extends ai{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new ii(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let n=this.parentHTMLEl.querySelector("#coo-13");if(!n)return;let r=e.imgs[0]??t.imgs?.at(0);r?.url&&n.setAttribute("src",r.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let n=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(r=>{t.add(this.createOption(r.name??"Default",r,r.mID===n?.vID))})}createOption(e,t,n){let r=this.renderer.createElement("option");return r.text=e,r.value=JSON.stringify(t),n&&(r.selected=!0),t||(r.disabled=!0),r}},Mp=class extends vs{constructor(e,t,n){super(e,t,n)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},nc=class Hl{static ACTIVE_TRIGGER_DATA;renderer=Zn.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Le.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(t)}setParentContainer(t){this.parent=t??document.body,this.renderer.setParentContainer(this.parent)}render(t){this.renderEngagement(new er(t))}async renderEngagement(t){if(this.triggerContext=new Ya(new Date,t),this.triggerContext.onClose(n=>{this.closeInApp(n)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let n=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(n)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Wt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Wt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){Hl.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){_t.getInstance().captureException(t,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&Hl.ACTIVE_TRIGGER_DATA){let r={triggerShown:new ya(Hl.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,r),!0}if(Ae.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let n=k.PAYMENT_MODAL_DETAILS.find(r=>!!document.querySelector(r.identifier));return n?(this.skipTrigger(t,{reason:`${n.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new Ul(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw S.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let n=new Ye(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n);let r={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}sendTriggerClosed(t){let n=t.eventName;delete t.eventName;let r=new Ye(n,t,this.triggerContext.triggerData);r.name===k.EVENT_TRIGGER_CLICKED&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(r)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,n,r){n instanceof Ua?new xp(t,n,r).render():n instanceof ja?new Np(t,n,r).render():n instanceof co?new Bl(t,n,r).render():n instanceof Ha?new Mp(t,n,r).render():n instanceof Oi?new vs(t,n,r).render():n instanceof ds?new Vl(t,n,r).render():n instanceof Ba?new Rp(t,n,r).render():n instanceof Va?new Ap(t,n,r).render():S.error("Unsupported element type- "+n.type)}renderContainer(t){let n=this.ian?.cont;n&&(this.containerHTMLElement=new Tp(this.rootContainer,n,t).render().getHTMLElement(),new Sp().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let n=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),Hl.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"});r.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){Zn.get().removeInApp(this.triggerContext)}skipTrigger(t,n){let r=new Ye(k.EVENT_CAMPAIGN_REJECTED,n,t);this.safeHTTP.sendEvent(r)}async preloadImages(t){let n=t.ian;if(!n)return;let r=[];n.elems.forEach(i=>{let o=i.bg?.img?.src;if(o&&r.push(this.getPromise(o)),i.t===1){let s=i.src;if(!s)return;r.push(this.getPromise(s))}}),n.bg?.img?.src&&r.push(this.getPromise(n.bg.img.src)),n.cont.bg?.img?.src&&r.push(this.getPromise(n.cont.bg.img.src)),await Promise.all(r)}getPromise(t){return new Promise(n=>{let r=new Image;r.onload=n,r.src=t,r.style.display="none"})}},Op=class{compareCartItemSubject=new Ne;constructor(){this.compareCartItemSubject.pipe(vr(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(n=>S.error("Unable to process cart change in XMLHttpRequest",n))}),t.apply(this,arguments)},S.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(n){return t.apply(window,arguments).then(r=>(e.performEvent(n.toString()).catch(i=>S.error("Unable to process cart change in fetch",i)),r))},S.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Ae.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let n=e?.items,r=t.items,i=[],o=[];if(S.debug(`Comparing cart change with old count ${n?.length} to new count ${r.length}`),r?.forEach(s=>{let a=n?.find(l=>l.vID===s.vID);if(a){if(a.quantity!==s.quantity){let l=a.quantity<s.quantity,c=Math.abs(a.quantity-s.quantity),d=ne(w({},s),{quantity:c});l?i.push(d):o.push(d)}n&&de.removeFromArray(n,a)}else i.push(s)}),n)for(let s of n)o.push(s);S.debug(`Cart delta: added: ${i.length}, removed: ${o.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),o.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:o}),(o.length||i.length)&&ti.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:o})}sendEvent(e,t){let n=new Ye(e,t);ke.get(Le).sendEvent(n)}async compareCartItems(){let e=await vt.get(Ce.CURRENT_CART,{}),t=await je.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},Pp=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(n,r){try{await e.modifyRequest(n,r)}catch(i){_t.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(r?.body)})}return t(n,r)},S.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let n=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(n.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let r;if(typeof t.body=="string")try{r=JSON.parse(t.body)}catch{return}else r=t.body;S.debug("Intercepted fetch request of:",n),r?.query.includes("cartCreate")&&(t.body=await this.updatedBody(r),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],n=await de.getCartAttributes();return e.variables.input.attributes=[...t,...n],JSON.stringify(e)}sendBuyNowEvent(){let e=Ae.get().getCurrentItem();if(!e)return;let t=new Ye(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Le.getInstance().sendEvent(t)}},rc=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,n=new Ye(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Le.getInstance().sendEvent(n),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>S.error(e))}async listen(){this.elements=await de.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},kp=class Bf extends rc{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(Bf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Bf),this.INSTANCE}},Lp=class Lg extends rc{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(Lg.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Lg),this.INSTANCE}},Fp=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){de.onDocumentLoaded(()=>{S.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let t=document.querySelector(this.selector);if(!t){S.debug("No clickable cart checkout button found");return}S.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Wt.get().open()}},Bp=class{trackSilently(){this.track().catch(e=>_t.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let n={};this.processSmallCheckout(e,n),this.processBigCheckout(t,n);let r=this.getTokenFromCurrentURLPath();if(r&&(n.urlToken=r),!Object.keys(n).length){S.warn("No processable data found in",e,t);return}n.referrer=document.referrer,n.url=location.href;let i=await ke.get(mn).checkSessionAndGetContext();n.sessionID=i[0],this.trackOrder(n)}processSmallCheckout(e,t){e&&(e.order_id&&(t.orderID=e.order_id.toString()),e.token&&(t.checkoutToken=e.token.toString()),e.customer_id&&(t.customerID=e.customer_id.toString()))}processBigCheckout(e,t){e&&(e.token&&!t.checkoutToken&&(t.checkoutToken=e.token.toString()),e.cartToken&&(t.cartToken=e.cartToken.toString()))}trackOrder(e){S.info("Found order to be send",e),Le.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(t=>t.length&&e.test(t))}},jl=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await je.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},n=new Ye(k.EVENT_CHECKOUT_STARTED,t);Le.getInstance().sendEvent(n)})}},Vp=class{async migrate(){}};fn.escape=ST.MustacheUtils.escapeHtml;var gt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new Vp().migrate(),this.autoAuthenticate(),new bp().meddle(),new Cp().listen(),new Bp().trackSilently(),new yo().listen(),new Op().listen(),new Pp().listen(),new Fp().listen(),ke.get(ec).listen(),ke.get(Lp).listenSilently(),ke.get(kp).listenSilently(),ke.get(Ar).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),hr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||ua(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,ua(this.globalRef,"config",new Dt),ua(this.globalRef,"runtimeData",new Ae),S.debug("Global reference initialised")}static injectWidgetAssets(){En.injectScriptURL(Dn.widgetURL,"cooee-widget-sdk"),En.injectStylesheet(Dn.styleURL)}static autoAuthenticate(){let e=ht.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),n=e.shopifyShop;if((de.isNull(t)||t.length!==24)&&de.isNull(n)){S.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,ke.get(mn).init(e)}static sendEvent(e,t,n){for(let i in t)if(i.length>3&&i.toLowerCase().startsWith("ce "))throw new Error("Event property name cannot start with 'CE '");let r=new Ye(e,t);r.occurred=n??new Date,ke.get(Le).sendEvent(r)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");ke.get(Le).updateProfile(e)}static setPageName(e){if(!e)return;let t=Ae.get(),n=t.pageName;if(e===n)return;if(t.pageName=e,e==="cart"&&ke.get(Ar).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(o=>e.includes(o))){ke.get(ec).resetScrollID();return}let r={};n&&(r.ps=n);let i=new Ye(k.EVENT_SCREEN_VIEW,r);i.occurred=t.jsLoadTime,ke.get(Le).sendEvent(i),ke.get(ec).resetScrollID(i.occurred)}static previewPopup(e,t){new nc(t).render(e)}static previewWidget(e){new Gn(new er(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){S.error(e)}window.addEventListener("message",e=>{if(S.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let t=e.data;typeof t=="object"&&(t.action==="POPUP_PREVIEW"?(this.previewPopup(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):t.action==="WIDGET_PREVIEW"&&(this.previewWidget(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Ae.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:n}=t.detail;n&&this.updateProfile({goKwikToken:n})}),window.gokwikSdk?jl.attachCheckoutListener():window.addEventListener("gokwikLoaded",jl.attachCheckoutListener)}static storePreviewParams(){let e=Ae.get(),t=new URLSearchParams(location.search),n=t.get("cooee-preview");n&&(e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)));let r=t.get("cooee-variant");r&&(e.previewVariant=r)}},Up=class K0{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new K0),this.INSTANCE}init(){_l.get(Ce.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){S.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let n=this.updateGlobalConfig(t);_l.set(Ce.APP_CONFIG,n).catch(r=>S.error(r)),Ff.processConfiguration(),n.website&&(En.injectRawScript(n.website.commonJS),En.injectRawCSS(n.website.commonCSS)),Wt.get().onToggle().subscribe(async({open:r})=>{S.info("Cart drawer is now",r?"open":"closed"),r&&(ke.get(Ar).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let n=gt.globalRef.config.update(t);return Wt.forceUpdate(),S.debug("App configurations",n),n}async trackViewCartEvent(){let t=await je.getCurrent().getNormalisedCart(),n={value:t.amount,currency:t.currency},r={items:t.items,amount:n,drawer:!0};Le.getInstance().sendEvent(new Ye(k.EVENT_VIEW_CART,r))}},IT=Pe(Jv()),jp=class Fg{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(t){this.adID=t.adID,this.campaignID=t.campaignID,this.source=t.source}static getAdParams(){let t;try{t=new IT.URLBuilder(location.href)}catch{return{}}let n={};if(this.META_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new Fg(n);if(this.GOOGLE_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"GOOGLE"},new Fg(n)}},ms=class J0{static INSTANCE=new J0;httpAPIService=Nn.getInstance();coreService=Up.getInstance();sentryService=_t.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await vt.set(Ce.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await vt.set(Ce.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await vt.set(Ce.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),S.log("Validating session with server");let n=await this.getSessionValidateData(t);try{let r=await this.httpAPIService.validateSession(n);S.log("Validating session Response",r),await this.coreService.processAppConfigurations(r.appSettings),await this.storeAndPopulateAuthData(r)}catch(r){throw S.error(r),r}}async populateUserDataFromStorage(){if(this.sdkToken=await vt.get(Ce.SDK_TOKEN),!this.sdkToken){S.warn("No SDK token found in local storage");return}this.userID=await vt.get(Ce.ID),this.deviceID=await vt.get(Ce.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){S.debug("SDK Token:",this.sdkToken),S.log("Device ID:",this.deviceID),S.log("User ID:",this.userID),Aa.trackDeviceID(this.deviceID),hr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(t){let n=await new kf().get();n.host=location.origin;try{(await PD())?.isPrivate&&(n.private=!0)}catch(i){DT.default.error("Unable to detect private/incognito window",i)}let r=await vt.get(Ce.DEVICE_ID);return r||(r=new rn().toHexString(),await vt.set(Ce.DEVICE_ID,r)),ne(w({deviceID:r,deviceProps:n,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:ei.parseFromCurrent(),ad:jp.getAdParams(),occurred:this.getSessionStartTime(Ae.get().jsLoadTime),currentItem:Ae.get().getCurrentItem(),cart:await je.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await vt.get(Ce.FIRST_SEEN),n=t?new Date(t):new Date;t||await vt.set(Ce.FIRST_SEEN,n.toISOString()),this.httpAPIService.setFirstSeen(n),this.sentryService.setGlobalContext("Visitor Info",{first_seen:n.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},mn=class ic{static replaySubject=new bo(1);static INSTANCE;sentryService=ke.get(_t);lock=new Ra;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new ic),this.INSTANCE}init(t){if(S.debug("Initialising SDK",t),MD(navigator.userAgent)){S.info("This seems to be a bot. Disabling SDK");return}ms.getInstance().init(t),ic.INSTANCE.checkForNewSession(!0).then(async()=>{ic.replaySubject.next(!0),ic.replaySubject.complete()}).catch(n=>S.error("Unable to perform device init",n))}getCurrentSessionID(){return un.set(Ce.SESSION_LAST_USED_TIME,new Date().getTime()),un.get(Ce.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let t=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:t[0],number:t[1],landing_page:t[2]}),t}async checkForNewSession(t){await this.lock.acquire();let n=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,n=!0):await this.notSynced()&&(n=!0),t){let r=await this.getContext();await ms.getInstance().validateSession({sessionID:r[0],sessionNumber:r[1],landingPage:r[2],newSession:n}),await un.set(Ce.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){S.debug("Starting new session"),await un.clear(),S.debug("Cleared SessionStorage before starting new session");let t=new Date,n=new rn().toHexString();S.debug("New session ID to be used",n);let r=await vt.get(Ce.SESSION_NUMBER,0)+1;hr.prepend(`New Session ID: <strong>${n}</strong> & number: ${r}`),await Promise.all([vt.set(Ce.SESSION_NUMBER,r),un.set(Ce.ID,n),un.set(Ce.SESSION_LAST_USED_TIME,t.getTime()),un.set(Ce.SESSION_LANDING_PAGE,ei.parseFromCurrent())])}getLandingPage(){return un.get(Ce.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return vt.get(Ce.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await un.get(Ce.ID))return!0;let t=await un.get(Ce.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await un.get(Ce.SESSION_SYNCED,!1)}},NT=Pe(Yn()),TT=Pe(Yn()),xT=Pe(ea()),Hp=class{triggerData;safeHttpService=Le.getInstance();render(e){e.contentSource===TT.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let t=e.detail;if(t.formId!==this.triggerData.klaviyoFormID){S.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new Ye(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let n=this.getFormDetails(t);this.safeHttpService.sendEvent(new Ye(k.EVENT_FORM_SUBMITTED,{form:n},this.triggerData)),this.safeHttpService.updateProfile(n);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new Ye(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},n=e.metaData;if(xT.JSUtils.hasKeys(n)){let r=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(n).forEach(s=>{r.includes(s)||(t[s]=n[s])}),t.email=n.$email??n.email,t.mobile=n.$phone_number??n.phone_number;let i=n.$first_name??n.first_name,o=n.$last_name??n.last_name;(i?.length||o?.length)&&(t.name=i+" "+o)}return t}},$p=class{static trackIntent(e){if(!this.isInstalled()){S.log("Facebook pixel not installed");return}if(!Dt.get().pixelPush){S.log("Facebook pixel push not enabled");return}let t=ss[e.intent]?.toLowerCase(),n=e.segmentName;!t&&!n||(S.debug(`Sending ${t} intent and ${n} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},Wp=class eS{static INSTANCE;httpService=ke.get(Nn);sentryService=ke.get(_t);sessionManager=ke.get(mn);runtime=Ae.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new eS),this.INSTANCE}sendSilently(t){this.send(t).catch(n=>S.error(`Failed to send ${t.name}`,n))}async send(t){if(S.debug(`Sending event ${t.name}`),hr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){S.warn(`Rejecting event ${t.name}`);return}await Promise.all([this.addSessionContext(t),this.addShopifyContext(t)]),this.addShopifyAttributes(),t.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),t.currentItem=this.runtime.getCurrentItem(),t.locale=this.runtime.locale,this.httpService.post("/v1/event/track",t).then(async n=>{S.log("\u2705 Event tracked:",t.name),hr.prepend(`\u2705 Event <strong>${n.eventName}</strong> tracked`),this.processEventResponse(t,n)}).catch(n=>{S.error(`Error sending event ${t.name} to server`,n)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(S.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=ei.parseFromCurrent()}async addShopifyContext(t){if(ht.isShopify())try{t.cart=await je.getCurrent().getNormalisedCart()}catch(n){S.error("Error fetching Shopify cart before sending the event",n)}}processEventResponse(t,n){this.renderWidgetIfAny(t,n).catch(r=>{S.error("Failed to display a campaign",r,t,n),this.sentryService.captureException(r,{event:t,response:n})}),this.utiliseIntentIfCalculated(n)}async renderWidgetIfAny(t,n){if(!n.triggerData){S.log(`Nothing to engage after ${t.name}`);return}S.log(`\u{1F4E3} Engagement(id=${n.triggerData.shortID}) will be shown`,n.triggerData);let r=new er(n.triggerData);r.occurred=t.occurred;let i;try{i=await Ka.refreshItems(r)}catch(o){S.error("Failed to refresh the products",o);return}if(r.items=i,r.contentSource===NT.EngagementContentSource.KLAVIYO){new Hp().render(r);return}new nc().renderEngagement(r).catch(o=>{S.error("Failed to render popup",o),this.sentryService.captureException(o,{event:t,triggerData:r})})}utiliseIntentIfCalculated(t){t.intent&&(Aa.trackIntent(t.intent),$p.trackIntent(t),hr.prepend(`Intent is <strong>${ss[t.intent]}</strong>`))}addShopifyAttributes(){ht.isShopify()&&je.getCurrent().addCooeeAttributes().catch(t=>{S.error("Fail to add attributes in cart",t)})}},Le=class tS{static INSTANCE;httpApiService=Nn.getInstance();eventAPIService=Wp.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new tS),this.INSTANCE}sendEvent(t){S.debug(`Waiting for auth to send event ${t.name}`),mn.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){mn.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){mn.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){mn.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},ho=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Le.getInstance();async execute(e){let t=Ae.get().getCurrentItem(),n=e.clickAction||this.element?.clc;if(!n)return;let r=e.item,i=this.triggerContext,o=new yo,s=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!n?.applyDiscount,l={selectedVariants:i.triggerData.nonMutableItems.map(b=>({itemMID:b.mID,mID:b.selectedOrFirstVariant.value.mID})),eID:i.triggerData.engagementID,cID:i.triggerData.contentID},c="",d=[],h=[];if(r?h=[r.toEmbed()]:e.embeddedItem&&(h=[e.embeddedItem]),n.at===108){let b=i.selectedItems;if(h=e.embeddedItems??b.map(I=>I.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let I;e.embeddedItems?I=e.embeddedItems.map(j=>({itemMID:j.mID,mID:j.vID,quantity:j.quantity})):I=b.map(j=>({itemMID:j.mID,mID:j.selectedOrFirstVariant.value.mID}));let R=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&R&&I.push({itemMID:R.mID,mID:R.selectedOrFirstVariant.value.mID,isPrimary:!0}),l.selectedVariants=I,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(j=>{j.mID===t.vID&&(j.isPrimary=!0)})}else l=void 0;d=e.embeddedItems??b}else if(n.at===107){let b=await je.getCurrent().getNormalisedCart();h=b.items,l.selectedVariants=b.items.map(I=>({itemMID:I.mID,mID:I.vID}))}else if(n.at===102)d=r?[r]:[e.embeddedItem];else if(n.at===101)c=r?ht.getRootPrefix()+"products/"+r.slug:e.embeddedItem?.link;else if(n.at===4){let b=de.isValidURL(n.gu?.u);b&&(c=b.href)}else if(n.at===109){let b=await o.upgradeToSubscription(r,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Wt.get().refreshUI(b)}if(this.sendTriggerClicked(h,{from:"button"},e.video),S.debug({redirectPath:c,redirectBehaviour:s,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),S.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){AT.default.error("Unable to get a discount code",b);return}}if(f&&n.at===103)await o.performCopyCoupon(f);else if(n.at===110){let b=await o.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await go.applyWithStorefront(f)}catch(b){S.error(b),g=!0}let m;if(d?.length&&(m=await o.performAddToCart(d,i.triggerData)),g&&f){go.navigate(f,s,c);return}if(c){location.href=c;return}go.navigateWithoutDiscount(s,m)}sendTriggerClicked(e,t,n){let r=k.EVENT_TRIGGER_CLICKED,i=new Ye(r,t,this.triggerContext.triggerData);i.items=e,n?.id&&(i.videos=[n.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let n="";if(t.type===RT.DiscountType.STATIC){if(!t.code)throw _t.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(n=await this.generateDiscount(e),!n)throw S.error("No discount code found",e),new Error("Discount code not found or generated");return n}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(t){throw de.showSnackbar("Failed to generate a discount code"),S.error("Error generating discount code",t,e),_t.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Fi=class{static getBestSources(e){if(!e)return[];let t=[],n=e.filter(i=>i.format==="mp4").sort((i,o)=>o.width-i.width)[0];n&&t.push(n);let r=e.filter(i=>i.format==="m3u8").sort((i,o)=>o.width-i.width)[0];return r&&t.push(r),t}static async performCTA(e,t){let n={applyDiscount:!0};t.cta===vo.ClickActionType.ADD_TO_CART?n={at:vo.ClickActionType.ADD_TO_CART,applyDiscount:!0}:t.cta===vo.ClickActionType.GO_TO_PRODUCT?n={at:vo.ClickActionType.GO_TO_PRODUCT,applyDiscount:!0}:t.cta===vo.ClickActionType.OPEN_CART&&(e.triggerData.redirectBehaviour=vo.RedirectBehaviour.CART_DRAWER),await new ho(e).execute({clickAction:n,embeddedItem:new ln(t.item)})}},U2=["swiperContainer"],j2=["videoPlayers"],MT=(e,t)=>t.url;function H2(e,t){if(e&1&&qe(0,"source",15),e&2){let n=t.$implicit;jn("type",n.mimeType),Si("media","(max-width: ",n.width,"px)"),Ue("src",n.url,cn)}}function $2(e,t){if(e&1&&qe(0,"source",16),e&2){let n=t.$implicit;jn("type",n.mimeType),Ue("src",n.url,cn)}}function W2(e,t){if(e&1){let n=_n();X(0,"video",14,1),at("timeupdate",function(r){Je(n);let i=re().$index,o=re();return Qe(o.updateProgress(r,i))})("click",function(){Je(n);let r=re().$index,i=re();return Qe(i.currentIndex===r&&i.toggleMute())}),Kt(2,H2,1,4,"source",15,MT),Kt(4,$2,1,2,"source",16,MT),Q()}if(e&2){let n=re(),r=n.$implicit,i=n.$index,o=re();Ue("autoplay",o.currentIndex===i)("muted",o.muted),Z(2),Zt(r.sources),Z(2),Zt(o.VideoUtils.getBestSources(r.sources))}}function G2(e,t){if(e&1){let n=_n();X(0,"div",18)(1,"cooee-product-modal",19),at("performCTA",function(r){Je(n);let i=re(2).$implicit,o=re();return Qe(o.performClickToAction(r,i))})("closeModel",function(){Je(n);let r=re(3);return Qe(r.selectedItem=null)}),Q()()}if(e&2){let n=re(3);Z(),Ue("item",n.selectedItem)}}function z2(e,t){if(e&1){let n=_n();X(0,"div",20)(1,"cooee-mute-toggle",21),at("buttonClicked",function(){Je(n);let r=re(3);return Qe(r.toggleMute())}),Q()(),X(2,"cooee-product-card",22),at("performCTA",function(r){Je(n);let i=re(2).$implicit,o=re();return Qe(o.performClickToAction(r,i))})("clicked",function(r){Je(n);let i=re(3);return Qe(i.selectedItem=r)}),Q()}if(e&2){let n=re(2).$implicit,r=re();Z(),Ue("muted",r.muted),Z(),Ue("items",n.items)}}function q2(e,t){if(e&1&&(qe(0,"cooee-video-progress-bar",17),At(1,G2,2,1,"div",18)(2,z2,3,2)),e&2){let n=re().$index,r=re();Ue("width",r.videoProgress[n]||0),Z(),Ut(r.selectedItem?1:2)}}function Y2(e,t){if(e&1&&(X(0,"div",5),At(1,W2,6,2,"video",13)(2,q2,3,2),Q()),e&2){let n=t.$index,r=re();Z(),Ut(r.currentIndex===n||r.currentIndex-1===n||r.currentIndex+1===n?1:-1),Z(),Ut(r.currentIndex===n?2:-1)}}var Gp=class Zg{constructor(t){this.cdr=t}videos=[];currentIndex=0;closeDialog=new yt;performCTA=new yt;swiperContainerRef;videoPlayers;videoProgress=[];muted=!0;selectedItem=null;VideoUtils=Fi;swiperInstance;ngAfterViewInit(){let t=this.swiperContainerRef.nativeElement.getRootNode();En.injectStylesheet(Dn.styleURL,t),En.injectStylesheet("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",t),this.loadSwiperScript().then(()=>this.initSwiper()),this.playAndUnmuteActiveVideo()}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(){this.closeDialog.emit({lastVideoID:this.videos[this.currentIndex].id,lastVideoIndex:this.currentIndex})}pauseAll(){this.videoPlayers.forEach(t=>t.nativeElement.pause())}playAndUnmuteActiveVideo(){this.pauseAll();let t=this.videoPlayers.get(Math.min(this.currentIndex,1))?.nativeElement;t&&(t.currentTime=1,t.play().then(()=>{t.muted=!1,this.muted=!1}))}updateProgress(t,n){let r=t.target;this.videoProgress[n]=r.currentTime/r.duration*100,this.cdr.detectChanges()}toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(t=>t.nativeElement.muted=this.muted),this.cdr.detectChanges()}performClickToAction(t,n){this.performCTA.emit({cta:t.cta,item:t.item,video:n})}loadSwiperScript(){return new Promise(t=>{let n="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";if(Array.from(document.scripts).some(i=>i.src.includes(n))){t();return}let r=document.createElement("script");r.src=n,r.onload=()=>t(),document.body.appendChild(r)})}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{effect:"coverflow",slidesPerView:3,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:150,modifier:2,slideShadows:!0},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")},on:{slideChange:t=>{this.currentIndex=t.realIndex,this.cdr.detectChanges(),this.playAndUnmuteActiveVideo(),this.selectedItem=null}}}),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-size","50px"),this.swiperContainerRef.nativeElement.style.setProperty("--swiper-navigation-color","white")}static \u0275fac=function(t){return new(t||Zg)(Yt(jo))};static \u0275cmp=St({type:Zg,selectors:[["cooee-video-swiper"]],viewQuery:function(t,n){if(t&1&&(eo(U2,5),eo(j2,5)),t&2){let r;to(r=no())&&(n.swiperContainerRef=r.first),to(r=no())&&(n.videoPlayers=r)}},inputs:{videos:"videos",currentIndex:"currentIndex"},outputs:{closeDialog:"closeDialog",performCTA:"performCTA"},decls:13,vars:0,consts:[["swiperContainer",""],["videoPlayers",""],[1,"lc:relative","lc:w-screen","lc:h-screen","lc:bg-black/70","lc:flex","lc:justify-center","lc:items-center"],[1,"swiper-container","lc:w-[70vw]","lc:h-[80vh]"],[1,"swiper-wrapper"],[1,"swiper-slide","lc:relative","lc:flex","lc:justify-center","lc:items-center"],[1,"swiper-button-prev","lc:text-white"],[1,"swiper-button-next","lc:text-white"],[1,"lc:absolute","lc:top-10","lc:right-20","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button","tabindex","{0}",1,"lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:cursor-pointer",3,"click","keydown"],["xmlns","http://www.w3.org/2000/svg","height","40px","viewBox","0 0 24 24","width","40px","fill","#FFFFFF"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],["loop","",1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"autoplay","muted"],["loop","",1,"lc:h-full","lc:w-full","lc:rounded-lg","lc:object-cover","lc:z-[-1]","lc:fixed",3,"timeupdate","click","autoplay","muted"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"performCTA","closeModel","item"],[1,"lc:absolute","lc:top-4","lc:right-4","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"performCTA","clicked","items"]],template:function(t,n){if(t&1){let r=_n();X(0,"div",2)(1,"div",3,0)(3,"div",4),Kt(4,Y2,3,2,"div",5,Ci),Q(),qe(6,"div",6)(7,"div",7),Q(),X(8,"div",8)(9,"div",9),at("click",function(){return Je(r),Qe(n.close())})("keydown",function(){return Je(r),Qe(n.close())}),Sr(),X(10,"svg",10),qe(11,"path",11)(12,"path",12),Q()()()()}t&2&&(Z(4),Zt(n.videos))},dependencies:[Ia,Da,Ta,xa],encapsulation:3})},zp=class qv{constructor(t,n){this.dialogRef=t,this.data=n}static \u0275fac=function(t){return new(t||qv)(Yt(Ai),Yt(ml))};static \u0275cmp=St({type:qv,selectors:[["cooee-desktop-video-carousel"]],decls:1,vars:2,consts:[[3,"closeDialog","performCTA","videos","currentIndex"]],template:function(t,n){t&1&&(X(0,"cooee-video-swiper",0),at("closeDialog",function(r){return n.dialogRef.close(r)})("performCTA",function(r){return n.data.onCTAPerformed(r)}),Q()),t&2&&Ue("videos",n.data.videos)("currentIndex",n.data.currentIndex)},dependencies:[Gp],encapsulation:2})},jT=Pe(n_()),K2=["videoPlayers"],Z2=e=>({transform:e}),OT=(e,t)=>t.url;function X2(e,t){if(e&1&&qe(0,"source",5),e&2){let n=t.$implicit;jn("type",n.mimeType),Si("media","(max-width: ",n.width,"px)"),Ue("src",n.url,cn)}}function J2(e,t){if(e&1&&qe(0,"source",6),e&2){let n=t.$implicit;jn("type",n.mimeType),Ue("src",n.url,cn)}}function Q2(e,t){if(e&1){let n=_n();X(0,"div",15)(1,"cooee-product-modal",17),at("performCTA",function(r){Je(n);let i=re(2);return Qe(i.data.onCTAPerformed(r))})("closeModel",function(){Je(n);let r=re(2);return Qe(r.selectedItem=null)}),Q()()}if(e&2){let n=re(2);Z(),Ue("item",n.selectedItem)}}function eV(e,t){if(e&1){let n=_n();X(0,"cooee-product-card",18),at("performCTA",function(r){Je(n);let i=re(2);return Qe(i.data.onCTAPerformed(r))})("clicked",function(r){Je(n);let i=re(2);return Qe(i.selectedItem=r)}),Q()}if(e&2){let n=re().$implicit;Ue("items",n.items)}}function tV(e,t){if(e&1){let n=_n();X(0,"div",3)(1,"video",4,0),at("timeupdate",function(r){let i=Je(n).$index,o=re();return Qe(o.updateProgress(r,i))})("click",function(){let r=Je(n).$index,i=re();return Qe(i.currentIndex===r&&i.toggleMute())}),Kt(3,X2,1,4,"source",5,OT),Kt(5,J2,1,2,"source",6,OT),Q(),X(7,"div",7)(8,"button",8),at("click",function(){let r=Je(n),i=r.$implicit,o=r.$index,s=re();return Qe(s.dialogRef.close({lastVideoId:i.id,lastVideoIndex:o}))}),Sr(),X(9,"svg",9),qe(10,"path",10)(11,"path",11),Q()()(),$s(),X(12,"div",12)(13,"cooee-mute-toggle",13),at("buttonClicked",function(){Je(n);let r=re();return Qe(r.toggleMute())}),Q()(),qe(14,"cooee-video-progress-bar",14),At(15,Q2,2,1,"div",15)(16,eV,1,1,"cooee-product-card",16),Q()}if(e&2){let n=t.$implicit,r=t.$index,i=re();Z(),Ue("muted",i.muted)("height","100%"),Z(2),Zt(n.sources),Z(2),Zt(i.VideoUtils.getBestSources(n.sources)),Z(8),Ue("muted",i.muted),Z(),Ue("width",i.videoProgress[r]||0),Z(),Ut(i.selectedItem?15:16)}}var qp=class Zv{constructor(t,n){this.dialogRef=t,this.data=n,this.videos=n.videos,this.currentIndex=n.currentIndex}videoPlayers;videos;currentIndex=0;muted=!0;videoProgress=[];selectedItem=null;VideoUtils=Fi;lastScrollTime=0;scrollCooldown=500;touchStartY=null;touchThreshold=50;onScroll(t){t.stopPropagation();let n=Date.now();n-this.lastScrollTime<this.scrollCooldown||(t.deltaY>50?this.next():t.deltaY<-50&&this.prev(),this.lastScrollTime=n)}onTouchStart(t){t.stopPropagation(),this.touchStartY=t.touches[0].clientY}onTouchEnd(t){if(t.stopPropagation(),this.touchStartY===null)return;let n=t.changedTouches[0].clientY,r=this.touchStartY-n;Math.abs(r)>this.touchThreshold&&(r>0?this.next():this.prev(),this.lastScrollTime=Date.now()),this.touchStartY=null}ngAfterViewInit(){this.playAndUnmuteActiveVideo()}next(){this.videos.length>0&&(this.currentIndex=(this.currentIndex+1)%this.videos.length,this.playAndUnmuteActiveVideo())}prev(){this.videos.length>0&&(this.currentIndex=(this.currentIndex-1+this.videos.length)%this.videos.length,this.playAndUnmuteActiveVideo())}toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(t=>t.nativeElement.muted=this.muted)}updateProgress(t,n){let r=t.target;this.videoProgress[n]=r.currentTime/r.duration*100}pauseAll(){this.videoPlayers.forEach(t=>t.nativeElement.pause())}playAndUnmuteActiveVideo(){this.pauseAll();let t=this.videoPlayers.get(this.currentIndex)?.nativeElement;t&&(t.currentTime=1,t.play().then(()=>{t.muted=!1,this.muted=!1}))}static \u0275fac=function(t){return new(t||Zv)(Yt(Ai),Yt(ml))};static \u0275cmp=St({type:Zv,selectors:[["cooee-video-scroller"]],viewQuery:function(t,n){if(t&1&&eo(K2,5),t&2){let r;to(r=no())&&(n.videoPlayers=r)}},hostBindings:function(t,n){t&1&&at("wheel",function(r){return n.onScroll(r)},!1,aC)("touchstart",function(r){return n.onTouchStart(r)})("touchend",function(r){return n.onTouchEnd(r)})},decls:4,vars:3,consts:[["videoPlayers",""],[1,"lc:relative","lc:w-full","lc:h-screen","lc:overflow-hidden"],[1,"lc:flex","lc:md:flex-row","lc:flex-col","lc:w-full","lc:h-full","lc:transition-transform","lc:duration-1000","lc:ease-in-out",3,"ngStyle"],[1,"lc:w-full","lc:h-full","lc:flex-shrink-0","lc:relative"],["autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover",3,"timeupdate","click","muted","height"],[3,"src","type","media"],[3,"src","type"],[1,"lc:absolute","lc:top-4","lc:right-2","lc:flex","lc:gap-2","lc:z-10"],["id","lc-close-button",1,"lc:bg-black/50","lc:rounded-full","lc:w-12","lc:h-12","lc:flex","lc:items-center","lc:justify-center","lc:border-none",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc:absolute","lc:top-4","lc:right-16","lc:flex","lc:gap-2","lc:z-10"],[3,"buttonClicked","muted"],[3,"width"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full"],[3,"items"],[3,"performCTA","closeModel","item"],[3,"performCTA","clicked","items"]],template:function(t,n){t&1&&(X(0,"div",1)(1,"div",2),Kt(2,tV,17,5,"div",3,Ci),Q()()),t&2&&(Z(),Ue("ngStyle",JC(1,Z2,"translateY(-"+n.currentIndex*100+"vh)")),Z(),Zt(n.videos))},dependencies:[h0,Ia,Da,Ta,xa],styles:["[_nghost-%COMP%]{display:block}"]})},HT=Pe(UT()),Jp=(e,t)=>t.url;function rV(e,t){if(e&1&&(X(0,"div",0),jt(1),Q()),e&2){re();let n=Hn(1);Z(),Ir(" ",n," ")}}function iV(e,t){if(e&1&&qe(0,"source",6),e&2){let n=t.$implicit;jn("type",n.mimeType),Si("media","(max-width: ",n.width,"px)"),Ue("src",n.url,cn)}}function oV(e,t){if(e&1&&qe(0,"source",7),e&2){let n=t.$implicit;jn("type",n.mimeType),Ue("src",n.url,cn)}}function sV(e,t){if(e&1&&(X(0,"div",8)(1,"span",10),jt(2),Q(),X(3,"span",11),jt(4),ar(5,"cooeeCurrency"),Q()()),e&2){re();let n=Hn(0);Z(2),Ir(" ",n.name," "),Z(2),Ir(" ",Dr(5,2,n.price)," ")}}function aV(e,t){if(e&1){let n=_n();X(0,"div",12),at("click",function(){Je(n);let r=re().$implicit,i=Hn(0),o=re(2);return Qe(o.addToCartClicked(r,i))})("keydown",function(){Je(n);let r=re().$implicit,i=Hn(0),o=re(2);return Qe(o.addToCartClicked(r,i))}),jt(1," Add to cart "),Q()}}function cV(e,t){if(e&1){let n=_n();Hr(0),X(1,"div",3)(2,"div",4),at("click",function(){let r=Je(n),i=r.$implicit,o=r.$index,s=Hn(0),a=re(2);return Qe(a.openDialog(i,s,o))})("keydown",function(){let r=Je(n),i=r.$implicit,o=r.$index,s=Hn(0),a=re(2);return Qe(a.openDialog(i,s,o))}),X(3,"video",5),Kt(4,iV,1,4,"source",6,Jp),Kt(6,oV,1,2,"source",7,Jp),Q(),At(8,sV,6,4,"div",8),Q(),At(9,aV,2,0,"div",9),Q()}if(e&2){let n=t.$implicit,r=re(2),i=Hn(4);Uo(n.items==null?null:n.items[0]),Z(3),Ue("muted",!0),Z(),Zt(n.sources),Z(2),Zt(r.VideoUtils.getBestSources(n.sources)),Z(2),Ut(i?8:-1),Z(),Ut(i?9:-1)}}function lV(e,t){if(e&1&&(X(0,"div",1),Kt(1,cV,10,4,"div",3,Ci),Q()),e&2){let n=re();Z(),Zt(n.videos)}}function uV(e,t){if(e&1&&qe(0,"source",6),e&2){let n=t.$implicit;jn("type",n.mimeType),Si("media","(max-width: ",n.width,"px)"),Ue("src",n.url,cn)}}function dV(e,t){if(e&1&&qe(0,"source",7),e&2){let n=t.$implicit;jn("type",n.mimeType),Ue("src",n.url,cn)}}function fV(e,t){if(e&1){let n=_n();Hr(0),X(1,"div",13),Sr(),X(2,"svg",14),qe(3,"circle",15)(4,"circle",16),Q(),$s(),X(5,"div",17)(6,"video",18),at("click",function(){let r=Je(n),i=r.$implicit,o=r.$index,s=Hn(0),a=re(2);return Qe(a.openDialog(i,s,o))}),Kt(7,uV,1,4,"source",6,Jp),Kt(9,dV,1,2,"source",7,Jp),Q()()()}if(e&2){let n=t.$implicit,r=re(2);Uo(n.items==null?null:n.items[0]),Z(6),Ue("muted",!0),Z(),Zt(n.sources),Z(2),Zt(r.VideoUtils.getBestSources(n.sources))}}function pV(e,t){if(e&1&&(X(0,"div",2),Kt(1,fV,11,2,"div",13,Ci),Q()),e&2){let n=re();Z(),Zt(n.videos)}}var Qp=class Kv{constructor(t){this.dialog=t}sendEvent=new yt;videos;VideoUtils=Fi;VideoConfigSource=P_;VideoConfigTemplate=k_;_triggerContext=Gs(null);get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this.videos=t.triggerData.content?.videoConfig?.videos}sendTriggerClicked(t,n){let r=new Ye(k.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[t.id],r.items=[n],this.sendEvent.emit(r)}openDialog(t,n,r){this.sendTriggerClicked(t,n);let i=new jT.default().getDevice().type==="mobile"?qp:zp,o={videos:this.videos,currentIndex:r,onCTAPerformed:s=>this.performCTA(s)};this.dialog.open(i,{width:"100vw",height:"100vh",data:o}).closed.subscribe(s=>{let a=new Ye(k.EVENT_VIDEO_DIALOG_CLOSED,s,this.triggerContext?.triggerData);this.sendEvent.emit(a)})}performCTA(t){Fi.performCTA(this.triggerContext,t)}addToCartClicked(t,n){this.performCTA({cta:HT.ClickActionType.ADD_TO_CART,item:n,video:t})}static \u0275fac=function(t){return new(t||Kv)(Yt(xD))};static \u0275cmp=St({type:Kv,selectors:[["cooee-shoppable-videos"]],inputs:{triggerContext:"triggerContext"},outputs:{sendEvent:"sendEvent"},decls:8,vars:4,consts:[["id","lc-heading-text",1,"lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],["id","lc-video-swiper",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-10","lc:justify-center","lc:items-center"],["id","lc-video-stories",1,"lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-parent","lc:flex","lc:flex-col","lc:gap-1"],["id","lc-video","tabindex","{0}",1,"lc-video-card","lc:cursor-pointer","lc:rounded-lg","lc:min-w-[200px]",3,"click","keydown"],["width","100%","autoplay","","loop","",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"muted"],[3,"src","type","media"],[3,"src","type"],["id","lc-single-product",1,"lc:w-full","lc:flex","lc:flex-col","lc:gap-1","lc:text-sm","lc:mt-1","lc:mb-1"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1"],["id","lc-item-name",1,"lc:font-semibold","lc:line-clamp-1"],["id","lc-item-price",1,"lc:font-medium"],["id","lc-cta-button","tabindex","{0}",1,"lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-1",3,"click","keydown"],["id","lc-video-story",1,"lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"lc:stroke-blue-500","animate-progress"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["id","lc-video","autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"]],template:function(t,n){if(t&1&&(Hr(0)(1),At(2,rV,2,1,"div",0),Hr(3)(4)(5),At(6,lV,3,0,"div",1)(7,pV,3,0,"div",2)),t&2){let r=n.triggerContext==null||n.triggerContext.triggerData==null||n.triggerContext.triggerData.content==null?null:n.triggerContext.triggerData.content.videoConfig;Z();let i=Uo(r==null?null:r.heading);Z(),Ut(i?2:-1);let o=r==null?null:r.source;Z(2),Uo(o===n.VideoConfigSource.GALLERY);let s=r==null?null:r.template;Z(2),Ut(s===n.VideoConfigTemplate.SWIPER?6:s===n.VideoConfigTemplate.STORY?7:-1)}},dependencies:[Xr],styles:["[_nghost-%COMP%]{display:block;margin-top:30px}.lc-video-card[_ngcontent-%COMP%] > video[_ngcontent-%COMP%]:hover{scale:1.1}@keyframes _ngcontent-%COMP%_progressLoop{0%{stroke-dashoffset:301.6}to{stroke-dashoffset:0}}.animate-progress[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_progressLoop 2s linear infinite}"]})};S.configure("CooeeWidgetSDK");(async()=>{let e=await I0(x0),t=(n,r)=>{let i=s0(n,{injector:e.injector});customElements.define(r,i)};t(pf,"cooee-progressbar"),t(Qp,"cooee-shoppable-videos")})();})();